generated-configure.sh revision 1327:6ebc4cb8a14d
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_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
682ZIP_DEBUGINFO_FILES
683ENABLE_DEBUG_SYMBOLS
684CFLAGS_WARNINGS_ARE_ERRORS
685COMPILER_SUPPORTS_TARGET_BITS_FLAG
686ZERO_ARCHFLAG
687LDFLAGS_CXX_JDK
688LDFLAGS_JDKEXE_SUFFIX
689LDFLAGS_JDKLIB_SUFFIX
690LDFLAGS_JDKEXE
691LDFLAGS_JDKLIB
692CXXFLAGS_JDKEXE
693CXXFLAGS_JDKLIB
694CFLAGS_JDKEXE
695CFLAGS_JDKLIB
696MACOSX_VERSION_MIN
697LEGACY_EXTRA_LDFLAGS
698LEGACY_EXTRA_CXXFLAGS
699LEGACY_EXTRA_CFLAGS
700CXX_O_FLAG_NONE
701CXX_O_FLAG_DEBUG
702CXX_O_FLAG_NORM
703CXX_O_FLAG_HI
704CXX_O_FLAG_HIGHEST
705C_O_FLAG_NONE
706C_O_FLAG_DEBUG
707C_O_FLAG_NORM
708C_O_FLAG_HI
709C_O_FLAG_HIGHEST
710CXXFLAGS_DEBUG_OPTIONS
711CFLAGS_DEBUG_OPTIONS
712CXXFLAGS_DEBUG_SYMBOLS
713CFLAGS_DEBUG_SYMBOLS
714CXX_FLAG_DEPS
715C_FLAG_DEPS
716SET_SHARED_LIBRARY_MAPFILE
717SET_SHARED_LIBRARY_NAME
718SET_SHARED_LIBRARY_ORIGIN
719SET_EXECUTABLE_ORIGIN
720SHARED_LIBRARY_FLAGS
721CXX_FLAG_REORDER
722C_FLAG_REORDER
723SYSROOT_LDFLAGS
724SYSROOT_CFLAGS
725RC_FLAGS
726AR_OUT_OPTION
727LD_OUT_OPTION
728EXE_OUT_OPTION
729CC_OUT_OPTION
730POST_MCS_CMD
731POST_STRIP_CMD
732ARFLAGS
733COMPILER_TARGET_BITS_FLAG
734JT_HOME
735JTREGEXE
736USING_BROKEN_SUSE_LD
737PACKAGE_PATH
738LDEXECXX
739LDEXE
740USE_CLANG
741HOTSPOT_LD
742HOTSPOT_CXX
743HOTSPOT_RC
744HOTSPOT_MT
745BUILD_LD
746BUILD_CXX
747BUILD_CC
748ac_ct_OBJDUMP
749OBJDUMP
750ac_ct_OBJCOPY
751OBJCOPY
752ac_ct_NM
753ac_ct_STRIP
754MCS
755GNM
756NM
757STRIP
758MSBUILD
759DUMPBIN
760RC
761MT
762LIPO
763ac_ct_OBJC
764OBJCFLAGS
765OBJC
766ac_ct_AR
767AR
768AS
769LDCXX
770LD
771CXXCPP
772CPP
773ac_ct_CXX
774CXXFLAGS
775CXX
776ac_ct_PROPER_COMPILER_CXX
777PROPER_COMPILER_CXX
778TOOLCHAIN_PATH_CXX
779POTENTIAL_CXX
780OBJEXT
781EXEEXT
782ac_ct_CC
783CPPFLAGS
784LDFLAGS
785CFLAGS
786CC
787ac_ct_PROPER_COMPILER_CC
788PROPER_COMPILER_CC
789TOOLCHAIN_PATH_CC
790POTENTIAL_CC
791VS_LIB
792VS_INCLUDE
793VS_PATH
794CYGWIN_LINK
795EXE_SUFFIX
796OBJ_SUFFIX
797STATIC_LIBRARY
798SHARED_LIBRARY
799STATIC_LIBRARY_SUFFIX
800SHARED_LIBRARY_SUFFIX
801LIBRARY_PREFIX
802TOOLCHAIN_TYPE
803BUILD_HOTSPOT
804HOTSPOT_DIST
805BUILD_OUTPUT
806OVERRIDE_SRC_ROOT
807ADD_SRC_ROOT
808JDK_TOPDIR
809NASHORN_TOPDIR
810HOTSPOT_TOPDIR
811JAXWS_TOPDIR
812JAXP_TOPDIR
813CORBA_TOPDIR
814LANGTOOLS_TOPDIR
815JAVAC_FLAGS
816BOOT_JDK_SOURCETARGET
817JARSIGNER
818NATIVE2ASCII
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
826COOKED_BUILD_NUMBER
827JDK_VERSION
828COPYRIGHT_YEAR
829MACOSX_BUNDLE_ID_BASE
830MACOSX_BUNDLE_NAME_BASE
831COMPANY_NAME
832JDK_RC_PLATFORM_NAME
833PRODUCT_SUFFIX
834PRODUCT_NAME
835LAUNCHER_NAME
836MILESTONE
837JDK_BUILD_NUMBER
838JDK_UPDATE_VERSION
839JDK_MICRO_VERSION
840JDK_MINOR_VERSION
841JDK_MAJOR_VERSION
842USER_RELEASE_SUFFIX
843COMPRESS_JARS
844RMICONNECTOR_IIOP
845UNLIMITED_CRYPTO
846CACERTS_FILE
847TEST_IN_BUILD
848BUILD_HEADLESS
849SUPPORT_HEADFUL
850SUPPORT_HEADLESS
851BDEPS_FTP
852BDEPS_UNZIP
853OS_VERSION_MICRO
854OS_VERSION_MINOR
855OS_VERSION_MAJOR
856PKG_CONFIG
857CODESIGN
858XATTR
859DSYMUTIL
860IS_GNU_TIME
861TIME
862STAT
863HG
864READELF
865OTOOL
866LDD
867ZIP
868UNZIP
869FIND_DELETE
870OUTPUT_SYNC
871OUTPUT_SYNC_SUPPORTED
872MAKE
873CHECK_TOOLSDIR_MAKE
874CHECK_TOOLSDIR_GMAKE
875CHECK_MAKE
876CHECK_GMAKE
877PKGHANDLER
878OUTPUT_ROOT
879CONF_NAME
880SPEC
881SDKROOT
882XCODEBUILD
883BUILD_VARIANT_RELEASE
884DEBUG_CLASSFILES
885FASTDEBUG
886VARIANT
887DEBUG_LEVEL
888MACOSX_UNIVERSAL
889INCLUDE_SA
890JVM_VARIANT_CORE
891JVM_VARIANT_ZEROSHARK
892JVM_VARIANT_ZERO
893JVM_VARIANT_KERNEL
894JVM_VARIANT_MINIMAL1
895JVM_VARIANT_CLIENT
896JVM_VARIANT_SERVER
897JVM_VARIANTS
898JVM_INTERPRETER
899JDK_VARIANT
900SET_OPENJDK
901BUILD_LOG_WRAPPER
902BUILD_LOG_PREVIOUS
903BUILD_LOG
904TOPDIR
905PATH_SEP
906ZERO_ARCHDEF
907DEFINE_CROSS_COMPILE_ARCH
908LP64
909OPENJDK_TARGET_OS_EXPORT_DIR
910OPENJDK_TARGET_CPU_JLI_CFLAGS
911OPENJDK_TARGET_CPU_OSARCH
912OPENJDK_TARGET_CPU_ISADIR
913OPENJDK_TARGET_CPU_LIBDIR
914OPENJDK_TARGET_CPU_LEGACY_LIB
915OPENJDK_TARGET_CPU_LEGACY
916REQUIRED_OS_VERSION
917REQUIRED_OS_NAME
918COMPILE_TYPE
919OPENJDK_TARGET_CPU_ENDIAN
920OPENJDK_TARGET_CPU_BITS
921OPENJDK_TARGET_CPU_ARCH
922OPENJDK_TARGET_CPU
923OPENJDK_TARGET_OS_ENV
924OPENJDK_TARGET_OS_TYPE
925OPENJDK_TARGET_OS
926OPENJDK_BUILD_CPU_ENDIAN
927OPENJDK_BUILD_CPU_BITS
928OPENJDK_BUILD_CPU_ARCH
929OPENJDK_BUILD_CPU
930OPENJDK_BUILD_OS_ENV
931OPENJDK_BUILD_OS_TYPE
932OPENJDK_BUILD_OS
933OPENJDK_BUILD_AUTOCONF_NAME
934OPENJDK_TARGET_AUTOCONF_NAME
935target_os
936target_vendor
937target_cpu
938target
939host_os
940host_vendor
941host_cpu
942host
943build_os
944build_vendor
945build_cpu
946build
947CPIO
948SETFILE
949DF
950READLINK
951CYGPATH
952SED
953FGREP
954EGREP
955GREP
956AWK
957XARGS
958WHICH
959WC
960UNIQ
961UNAME
962TR
963TOUCH
964TEE
965TAR
966TAIL
967SORT
968SH
969RM
970PRINTF
971NAWK
972MV
973MKTEMP
974MKDIR
975LS
976LN
977HEAD
978FIND
979FILE
980EXPR
981ECHO
982DIRNAME
983DIFF
984DATE
985CUT
986CP
987COMM
988CMP
989CHMOD
990CAT
991BASH
992BASENAME
993DATE_WHEN_CONFIGURED
994CONFIGURE_COMMAND_LINE
995target_alias
996host_alias
997build_alias
998LIBS
999ECHO_T
1000ECHO_N
1001ECHO_C
1002DEFS
1003mandir
1004localedir
1005libdir
1006psdir
1007pdfdir
1008dvidir
1009htmldir
1010infodir
1011docdir
1012oldincludedir
1013includedir
1014localstatedir
1015sharedstatedir
1016sysconfdir
1017datadir
1018datarootdir
1019libexecdir
1020sbindir
1021bindir
1022program_transform_name
1023prefix
1024exec_prefix
1025PACKAGE_URL
1026PACKAGE_BUGREPORT
1027PACKAGE_STRING
1028PACKAGE_VERSION
1029PACKAGE_TARNAME
1030PACKAGE_NAME
1031PATH_SEPARATOR
1032SHELL'
1033ac_subst_files=''
1034ac_user_opts='
1035enable_option_checking
1036with_target_bits
1037enable_openjdk_only
1038with_custom_make_dir
1039with_jdk_variant
1040with_jvm_interpreter
1041with_jvm_variants
1042enable_debug
1043with_debug_level
1044with_devkit
1045with_sys_root
1046with_sysroot
1047with_tools_dir
1048with_toolchain_path
1049with_extra_path
1050with_sdk_name
1051with_conf_name
1052with_output_sync
1053with_builddeps_conf
1054with_builddeps_server
1055with_builddeps_dir
1056with_builddeps_group
1057enable_headful
1058enable_hotspot_test_in_build
1059with_cacerts_file
1060enable_unlimited_crypto
1061enable_rmiconnector_iiop
1062with_milestone
1063with_update_version
1064with_user_release_suffix
1065with_build_number
1066with_copyright_year
1067with_boot_jdk
1068with_add_source_root
1069with_override_source_root
1070with_adds_and_overrides
1071with_override_langtools
1072with_override_corba
1073with_override_jaxp
1074with_override_jaxws
1075with_override_hotspot
1076with_override_nashorn
1077with_override_jdk
1078with_import_hotspot
1079with_toolchain_type
1080with_toolchain_version
1081with_jtreg
1082with_extra_cflags
1083with_extra_cxxflags
1084with_extra_ldflags
1085enable_debug_symbols
1086enable_zip_debug_info
1087with_x
1088with_cups
1089with_cups_include
1090with_freetype
1091with_freetype_include
1092with_freetype_lib
1093with_freetype_src
1094enable_freetype_bundling
1095with_alsa
1096with_alsa_include
1097with_alsa_lib
1098with_libjpeg
1099with_giflib
1100with_lcms
1101with_libpng
1102with_zlib
1103with_stdc__lib
1104with_msvcr_dll
1105with_msvcp_dll
1106with_dxsdk
1107with_dxsdk_lib
1108with_dxsdk_include
1109with_num_cores
1110with_memory_size
1111with_jobs
1112with_boot_jdk_jvmargs
1113with_sjavac_server_java
1114enable_sjavac
1115enable_precompiled_headers
1116enable_ccache
1117with_ccache_dir
1118'
1119      ac_precious_vars='build_alias
1120host_alias
1121target_alias
1122BASENAME
1123BASH
1124CAT
1125CHMOD
1126CMP
1127COMM
1128CP
1129CUT
1130DATE
1131DIFF
1132DIRNAME
1133ECHO
1134EXPR
1135FILE
1136FIND
1137HEAD
1138LN
1139LS
1140MKDIR
1141MKTEMP
1142MV
1143NAWK
1144PRINTF
1145RM
1146SH
1147SORT
1148TAIL
1149TAR
1150TEE
1151TOUCH
1152TR
1153UNAME
1154UNIQ
1155WC
1156WHICH
1157XARGS
1158AWK
1159GREP
1160EGREP
1161FGREP
1162SED
1163CYGPATH
1164READLINK
1165DF
1166SETFILE
1167CPIO
1168UNZIP
1169ZIP
1170LDD
1171OTOOL
1172READELF
1173HG
1174STAT
1175TIME
1176DSYMUTIL
1177XATTR
1178CODESIGN
1179PKG_CONFIG
1180JAVA
1181JAVAC
1182JAVAH
1183JAR
1184NATIVE2ASCII
1185JARSIGNER
1186CC
1187CFLAGS
1188LDFLAGS
1189LIBS
1190CPPFLAGS
1191CXX
1192CXXFLAGS
1193CCC
1194CPP
1195CXXCPP
1196AS
1197AR
1198OBJC
1199OBJCFLAGS
1200LIPO
1201STRIP
1202NM
1203GNM
1204MCS
1205OBJCOPY
1206OBJDUMP
1207BUILD_CC
1208BUILD_CXX
1209BUILD_LD
1210JTREGEXE
1211XMKMF
1212FREETYPE_CFLAGS
1213FREETYPE_LIBS
1214ALSA_CFLAGS
1215ALSA_LIBS
1216LCMS_CFLAGS
1217LCMS_LIBS
1218PNG_CFLAGS
1219PNG_LIBS
1220LIBFFI_CFLAGS
1221LIBFFI_LIBS
1222CCACHE'
1223
1224
1225# Initialize some variables set by options.
1226ac_init_help=
1227ac_init_version=false
1228ac_unrecognized_opts=
1229ac_unrecognized_sep=
1230# The variables have the same names as the options, with
1231# dashes changed to underlines.
1232cache_file=/dev/null
1233exec_prefix=NONE
1234no_create=
1235no_recursion=
1236prefix=NONE
1237program_prefix=NONE
1238program_suffix=NONE
1239program_transform_name=s,x,x,
1240silent=
1241site=
1242srcdir=
1243verbose=
1244x_includes=NONE
1245x_libraries=NONE
1246
1247# Installation directory options.
1248# These are left unexpanded so users can "make install exec_prefix=/foo"
1249# and all the variables that are supposed to be based on exec_prefix
1250# by default will actually change.
1251# Use braces instead of parens because sh, perl, etc. also accept them.
1252# (The list follows the same order as the GNU Coding Standards.)
1253bindir='${exec_prefix}/bin'
1254sbindir='${exec_prefix}/sbin'
1255libexecdir='${exec_prefix}/libexec'
1256datarootdir='${prefix}/share'
1257datadir='${datarootdir}'
1258sysconfdir='${prefix}/etc'
1259sharedstatedir='${prefix}/com'
1260localstatedir='${prefix}/var'
1261includedir='${prefix}/include'
1262oldincludedir='/usr/include'
1263docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1264infodir='${datarootdir}/info'
1265htmldir='${docdir}'
1266dvidir='${docdir}'
1267pdfdir='${docdir}'
1268psdir='${docdir}'
1269libdir='${exec_prefix}/lib'
1270localedir='${datarootdir}/locale'
1271mandir='${datarootdir}/man'
1272
1273ac_prev=
1274ac_dashdash=
1275for ac_option
1276do
1277  # If the previous option needs an argument, assign it.
1278  if test -n "$ac_prev"; then
1279    eval $ac_prev=\$ac_option
1280    ac_prev=
1281    continue
1282  fi
1283
1284  case $ac_option in
1285  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1286  *=)   ac_optarg= ;;
1287  *)    ac_optarg=yes ;;
1288  esac
1289
1290  # Accept the important Cygnus configure options, so we can diagnose typos.
1291
1292  case $ac_dashdash$ac_option in
1293  --)
1294    ac_dashdash=yes ;;
1295
1296  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1297    ac_prev=bindir ;;
1298  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1299    bindir=$ac_optarg ;;
1300
1301  -build | --build | --buil | --bui | --bu)
1302    ac_prev=build_alias ;;
1303  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1304    build_alias=$ac_optarg ;;
1305
1306  -cache-file | --cache-file | --cache-fil | --cache-fi \
1307  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1308    ac_prev=cache_file ;;
1309  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1310  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1311    cache_file=$ac_optarg ;;
1312
1313  --config-cache | -C)
1314    cache_file=config.cache ;;
1315
1316  -datadir | --datadir | --datadi | --datad)
1317    ac_prev=datadir ;;
1318  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1319    datadir=$ac_optarg ;;
1320
1321  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1322  | --dataroo | --dataro | --datar)
1323    ac_prev=datarootdir ;;
1324  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1325  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1326    datarootdir=$ac_optarg ;;
1327
1328  -disable-* | --disable-*)
1329    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1330    # Reject names that are not valid shell variable names.
1331    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1332      as_fn_error $? "invalid feature name: $ac_useropt"
1333    ac_useropt_orig=$ac_useropt
1334    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1335    case $ac_user_opts in
1336      *"
1337"enable_$ac_useropt"
1338"*) ;;
1339      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1340	 ac_unrecognized_sep=', ';;
1341    esac
1342    eval enable_$ac_useropt=no ;;
1343
1344  -docdir | --docdir | --docdi | --doc | --do)
1345    ac_prev=docdir ;;
1346  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1347    docdir=$ac_optarg ;;
1348
1349  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1350    ac_prev=dvidir ;;
1351  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1352    dvidir=$ac_optarg ;;
1353
1354  -enable-* | --enable-*)
1355    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1356    # Reject names that are not valid shell variable names.
1357    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1358      as_fn_error $? "invalid feature name: $ac_useropt"
1359    ac_useropt_orig=$ac_useropt
1360    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1361    case $ac_user_opts in
1362      *"
1363"enable_$ac_useropt"
1364"*) ;;
1365      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1366	 ac_unrecognized_sep=', ';;
1367    esac
1368    eval enable_$ac_useropt=\$ac_optarg ;;
1369
1370  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1371  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1372  | --exec | --exe | --ex)
1373    ac_prev=exec_prefix ;;
1374  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1375  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1376  | --exec=* | --exe=* | --ex=*)
1377    exec_prefix=$ac_optarg ;;
1378
1379  -gas | --gas | --ga | --g)
1380    # Obsolete; use --with-gas.
1381    with_gas=yes ;;
1382
1383  -help | --help | --hel | --he | -h)
1384    ac_init_help=long ;;
1385  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1386    ac_init_help=recursive ;;
1387  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1388    ac_init_help=short ;;
1389
1390  -host | --host | --hos | --ho)
1391    ac_prev=host_alias ;;
1392  -host=* | --host=* | --hos=* | --ho=*)
1393    host_alias=$ac_optarg ;;
1394
1395  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1396    ac_prev=htmldir ;;
1397  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1398  | --ht=*)
1399    htmldir=$ac_optarg ;;
1400
1401  -includedir | --includedir | --includedi | --included | --include \
1402  | --includ | --inclu | --incl | --inc)
1403    ac_prev=includedir ;;
1404  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1405  | --includ=* | --inclu=* | --incl=* | --inc=*)
1406    includedir=$ac_optarg ;;
1407
1408  -infodir | --infodir | --infodi | --infod | --info | --inf)
1409    ac_prev=infodir ;;
1410  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1411    infodir=$ac_optarg ;;
1412
1413  -libdir | --libdir | --libdi | --libd)
1414    ac_prev=libdir ;;
1415  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1416    libdir=$ac_optarg ;;
1417
1418  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1419  | --libexe | --libex | --libe)
1420    ac_prev=libexecdir ;;
1421  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1422  | --libexe=* | --libex=* | --libe=*)
1423    libexecdir=$ac_optarg ;;
1424
1425  -localedir | --localedir | --localedi | --localed | --locale)
1426    ac_prev=localedir ;;
1427  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1428    localedir=$ac_optarg ;;
1429
1430  -localstatedir | --localstatedir | --localstatedi | --localstated \
1431  | --localstate | --localstat | --localsta | --localst | --locals)
1432    ac_prev=localstatedir ;;
1433  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1434  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1435    localstatedir=$ac_optarg ;;
1436
1437  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1438    ac_prev=mandir ;;
1439  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1440    mandir=$ac_optarg ;;
1441
1442  -nfp | --nfp | --nf)
1443    # Obsolete; use --without-fp.
1444    with_fp=no ;;
1445
1446  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1447  | --no-cr | --no-c | -n)
1448    no_create=yes ;;
1449
1450  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1451  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1452    no_recursion=yes ;;
1453
1454  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1455  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1456  | --oldin | --oldi | --old | --ol | --o)
1457    ac_prev=oldincludedir ;;
1458  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1459  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1460  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1461    oldincludedir=$ac_optarg ;;
1462
1463  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1464    ac_prev=prefix ;;
1465  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1466    prefix=$ac_optarg ;;
1467
1468  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1469  | --program-pre | --program-pr | --program-p)
1470    ac_prev=program_prefix ;;
1471  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1472  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1473    program_prefix=$ac_optarg ;;
1474
1475  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1476  | --program-suf | --program-su | --program-s)
1477    ac_prev=program_suffix ;;
1478  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1479  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1480    program_suffix=$ac_optarg ;;
1481
1482  -program-transform-name | --program-transform-name \
1483  | --program-transform-nam | --program-transform-na \
1484  | --program-transform-n | --program-transform- \
1485  | --program-transform | --program-transfor \
1486  | --program-transfo | --program-transf \
1487  | --program-trans | --program-tran \
1488  | --progr-tra | --program-tr | --program-t)
1489    ac_prev=program_transform_name ;;
1490  -program-transform-name=* | --program-transform-name=* \
1491  | --program-transform-nam=* | --program-transform-na=* \
1492  | --program-transform-n=* | --program-transform-=* \
1493  | --program-transform=* | --program-transfor=* \
1494  | --program-transfo=* | --program-transf=* \
1495  | --program-trans=* | --program-tran=* \
1496  | --progr-tra=* | --program-tr=* | --program-t=*)
1497    program_transform_name=$ac_optarg ;;
1498
1499  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1500    ac_prev=pdfdir ;;
1501  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1502    pdfdir=$ac_optarg ;;
1503
1504  -psdir | --psdir | --psdi | --psd | --ps)
1505    ac_prev=psdir ;;
1506  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1507    psdir=$ac_optarg ;;
1508
1509  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1510  | -silent | --silent | --silen | --sile | --sil)
1511    silent=yes ;;
1512
1513  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1514    ac_prev=sbindir ;;
1515  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1516  | --sbi=* | --sb=*)
1517    sbindir=$ac_optarg ;;
1518
1519  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1520  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1521  | --sharedst | --shareds | --shared | --share | --shar \
1522  | --sha | --sh)
1523    ac_prev=sharedstatedir ;;
1524  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1525  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1526  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1527  | --sha=* | --sh=*)
1528    sharedstatedir=$ac_optarg ;;
1529
1530  -site | --site | --sit)
1531    ac_prev=site ;;
1532  -site=* | --site=* | --sit=*)
1533    site=$ac_optarg ;;
1534
1535  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1536    ac_prev=srcdir ;;
1537  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1538    srcdir=$ac_optarg ;;
1539
1540  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1541  | --syscon | --sysco | --sysc | --sys | --sy)
1542    ac_prev=sysconfdir ;;
1543  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1544  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1545    sysconfdir=$ac_optarg ;;
1546
1547  -target | --target | --targe | --targ | --tar | --ta | --t)
1548    ac_prev=target_alias ;;
1549  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1550    target_alias=$ac_optarg ;;
1551
1552  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1553    verbose=yes ;;
1554
1555  -version | --version | --versio | --versi | --vers | -V)
1556    ac_init_version=: ;;
1557
1558  -with-* | --with-*)
1559    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1560    # Reject names that are not valid shell variable names.
1561    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1562      as_fn_error $? "invalid package name: $ac_useropt"
1563    ac_useropt_orig=$ac_useropt
1564    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1565    case $ac_user_opts in
1566      *"
1567"with_$ac_useropt"
1568"*) ;;
1569      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1570	 ac_unrecognized_sep=', ';;
1571    esac
1572    eval with_$ac_useropt=\$ac_optarg ;;
1573
1574  -without-* | --without-*)
1575    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1576    # Reject names that are not valid shell variable names.
1577    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1578      as_fn_error $? "invalid package name: $ac_useropt"
1579    ac_useropt_orig=$ac_useropt
1580    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1581    case $ac_user_opts in
1582      *"
1583"with_$ac_useropt"
1584"*) ;;
1585      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1586	 ac_unrecognized_sep=', ';;
1587    esac
1588    eval with_$ac_useropt=no ;;
1589
1590  --x)
1591    # Obsolete; use --with-x.
1592    with_x=yes ;;
1593
1594  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1595  | --x-incl | --x-inc | --x-in | --x-i)
1596    ac_prev=x_includes ;;
1597  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1598  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1599    x_includes=$ac_optarg ;;
1600
1601  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1602  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1603    ac_prev=x_libraries ;;
1604  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1605  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1606    x_libraries=$ac_optarg ;;
1607
1608  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1609Try \`$0 --help' for more information"
1610    ;;
1611
1612  *=*)
1613    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1614    # Reject names that are not valid shell variable names.
1615    case $ac_envvar in #(
1616      '' | [0-9]* | *[!_$as_cr_alnum]* )
1617      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1618    esac
1619    eval $ac_envvar=\$ac_optarg
1620    export $ac_envvar ;;
1621
1622  *)
1623    # FIXME: should be removed in autoconf 3.0.
1624    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1625    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1626      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1627    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1628    ;;
1629
1630  esac
1631done
1632
1633if test -n "$ac_prev"; then
1634  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1635  as_fn_error $? "missing argument to $ac_option"
1636fi
1637
1638if test -n "$ac_unrecognized_opts"; then
1639  case $enable_option_checking in
1640    no) ;;
1641    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1642    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1643  esac
1644fi
1645
1646# Check all directory arguments for consistency.
1647for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1648		datadir sysconfdir sharedstatedir localstatedir includedir \
1649		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1650		libdir localedir mandir
1651do
1652  eval ac_val=\$$ac_var
1653  # Remove trailing slashes.
1654  case $ac_val in
1655    */ )
1656      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1657      eval $ac_var=\$ac_val;;
1658  esac
1659  # Be sure to have absolute directory names.
1660  case $ac_val in
1661    [\\/$]* | ?:[\\/]* )  continue;;
1662    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1663  esac
1664  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1665done
1666
1667# There might be people who depend on the old broken behavior: `$host'
1668# used to hold the argument of --host etc.
1669# FIXME: To remove some day.
1670build=$build_alias
1671host=$host_alias
1672target=$target_alias
1673
1674# FIXME: To remove some day.
1675if test "x$host_alias" != x; then
1676  if test "x$build_alias" = x; then
1677    cross_compiling=maybe
1678  elif test "x$build_alias" != "x$host_alias"; then
1679    cross_compiling=yes
1680  fi
1681fi
1682
1683ac_tool_prefix=
1684test -n "$host_alias" && ac_tool_prefix=$host_alias-
1685
1686test "$silent" = yes && exec 6>/dev/null
1687
1688
1689ac_pwd=`pwd` && test -n "$ac_pwd" &&
1690ac_ls_di=`ls -di .` &&
1691ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1692  as_fn_error $? "working directory cannot be determined"
1693test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1694  as_fn_error $? "pwd does not report name of working directory"
1695
1696
1697# Find the source files, if location was not specified.
1698if test -z "$srcdir"; then
1699  ac_srcdir_defaulted=yes
1700  # Try the directory containing this script, then the parent directory.
1701  ac_confdir=`$as_dirname -- "$as_myself" ||
1702$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1703	 X"$as_myself" : 'X\(//\)[^/]' \| \
1704	 X"$as_myself" : 'X\(//\)$' \| \
1705	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1706$as_echo X"$as_myself" |
1707    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1708	    s//\1/
1709	    q
1710	  }
1711	  /^X\(\/\/\)[^/].*/{
1712	    s//\1/
1713	    q
1714	  }
1715	  /^X\(\/\/\)$/{
1716	    s//\1/
1717	    q
1718	  }
1719	  /^X\(\/\).*/{
1720	    s//\1/
1721	    q
1722	  }
1723	  s/.*/./; q'`
1724  srcdir=$ac_confdir
1725  if test ! -r "$srcdir/$ac_unique_file"; then
1726    srcdir=..
1727  fi
1728else
1729  ac_srcdir_defaulted=no
1730fi
1731if test ! -r "$srcdir/$ac_unique_file"; then
1732  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1733  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1734fi
1735ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1736ac_abs_confdir=`(
1737	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1738	pwd)`
1739# When building in place, set srcdir=.
1740if test "$ac_abs_confdir" = "$ac_pwd"; then
1741  srcdir=.
1742fi
1743# Remove unnecessary trailing slashes from srcdir.
1744# Double slashes in file names in object file debugging info
1745# mess up M-x gdb in Emacs.
1746case $srcdir in
1747*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1748esac
1749for ac_var in $ac_precious_vars; do
1750  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1751  eval ac_env_${ac_var}_value=\$${ac_var}
1752  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1754done
1755
1756#
1757# Report the --help message.
1758#
1759if test "$ac_init_help" = "long"; then
1760  # Omit some internal or obsolete options to make the list less imposing.
1761  # This message is too long to be a string in the A/UX 3.1 sh.
1762  cat <<_ACEOF
1763\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1764
1765Usage: $0 [OPTION]... [VAR=VALUE]...
1766
1767To assign environment variables (e.g., CC, CFLAGS...), specify them as
1768VAR=VALUE.  See below for descriptions of some of the useful variables.
1769
1770Defaults for the options are specified in brackets.
1771
1772Configuration:
1773  -h, --help              display this help and exit
1774      --help=short        display options specific to this package
1775      --help=recursive    display the short help of all the included packages
1776  -V, --version           display version information and exit
1777  -q, --quiet, --silent   do not print \`checking ...' messages
1778      --cache-file=FILE   cache test results in FILE [disabled]
1779  -C, --config-cache      alias for \`--cache-file=config.cache'
1780  -n, --no-create         do not create output files
1781      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1782
1783Installation directories:
1784  --prefix=PREFIX         install architecture-independent files in PREFIX
1785                          [$ac_default_prefix]
1786  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1787                          [PREFIX]
1788
1789By default, \`make install' will install all the files in
1790\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1791an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1792for instance \`--prefix=\$HOME'.
1793
1794For better control, use the options below.
1795
1796Fine tuning of the installation directories:
1797  --bindir=DIR            user executables [EPREFIX/bin]
1798  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1799  --libexecdir=DIR        program executables [EPREFIX/libexec]
1800  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1801  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1802  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1803  --libdir=DIR            object code libraries [EPREFIX/lib]
1804  --includedir=DIR        C header files [PREFIX/include]
1805  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1806  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1807  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1808  --infodir=DIR           info documentation [DATAROOTDIR/info]
1809  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1810  --mandir=DIR            man documentation [DATAROOTDIR/man]
1811  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1812  --htmldir=DIR           html documentation [DOCDIR]
1813  --dvidir=DIR            dvi documentation [DOCDIR]
1814  --pdfdir=DIR            pdf documentation [DOCDIR]
1815  --psdir=DIR             ps documentation [DOCDIR]
1816_ACEOF
1817
1818  cat <<\_ACEOF
1819
1820X features:
1821  --x-includes=DIR    X include files are in DIR
1822  --x-libraries=DIR   X library files are in DIR
1823
1824System types:
1825  --build=BUILD     configure for building on BUILD [guessed]
1826  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1827  --target=TARGET   configure for building compilers for TARGET [HOST]
1828_ACEOF
1829fi
1830
1831if test -n "$ac_init_help"; then
1832  case $ac_init_help in
1833     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1834   esac
1835  cat <<\_ACEOF
1836
1837Optional Features:
1838  --disable-option-checking  ignore unrecognized --enable/--with options
1839  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1840  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1841  --enable-openjdk-only   suppress building custom source even if present
1842                          [disabled]
1843  --enable-debug          set the debug level to fastdebug (shorthand for
1844                          --with-debug-level=fastdebug) [disabled]
1845  --disable-headful       disable building headful support (graphical UI
1846                          support) [enabled]
1847  --enable-hotspot-test-in-build
1848                          run the Queens test after Hotspot build [disabled]
1849  --enable-unlimited-crypto
1850                          Enable unlimited crypto policy [disabled]
1851  --enable-rmiconnector-iiop
1852                          enable the JMX RMIConnector iiop transport
1853                          [disabled]
1854  --disable-debug-symbols disable generation of debug symbols [enabled]
1855  --disable-zip-debug-info
1856                          disable zipping of debug-info files [enabled]
1857  --disable-freetype-bundling
1858                          disable bundling of the freetype library with the
1859                          build result [enabled on Windows or when using
1860                          --with-freetype, disabled otherwise]
1861  --enable-sjavac         use sjavac to do fast incremental compiles
1862                          [disabled]
1863  --disable-precompiled-headers
1864                          disable using precompiled headers when compiling C++
1865                          [enabled]
1866  --enable-ccache         enable using ccache to speed up recompilations
1867                          [disabled]
1868
1869Optional Packages:
1870  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1871  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1872  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1873                          support it), e.g. --with-target-bits=32 [guessed]
1874  --with-custom-make-dir  Deprecated. Option is kept for backwards
1875                          compatibility and is ignored
1876  --with-jdk-variant      JDK variant to build (normal) [normal]
1877  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1878  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1879                          client, minimal1, kernel, zero, zeroshark, core)
1880                          [server]
1881  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1882                          optimized (HotSpot build only)) [release]
1883  --with-devkit           use this devkit for compilers, tools and resources
1884  --with-sys-root         alias for --with-sysroot for backwards compatability
1885  --with-sysroot          use this directory as sysroot
1886  --with-tools-dir        alias for --with-toolchain-path for backwards
1887                          compatibility
1888  --with-toolchain-path   prepend these directories when searching for
1889                          toolchain binaries (compilers etc)
1890  --with-extra-path       prepend these directories to the default path
1891  --with-sdk-name         use the platform SDK of the given name. [macosx]
1892  --with-conf-name        use this as the name of the configuration [generated
1893                          from important configuration options]
1894  --with-output-sync      set make output sync type if supported by make.
1895                          [recurse]
1896  --with-builddeps-conf   use this configuration file for the builddeps
1897  --with-builddeps-server download and use build dependencies from this server
1898                          url
1899  --with-builddeps-dir    store downloaded build dependencies here
1900                          [/localhome/builddeps]
1901  --with-builddeps-group  chgrp the downloaded build dependencies to this
1902                          group
1903  --with-cacerts-file     specify alternative cacerts file
1904  --with-milestone        Set milestone value for build [internal]
1905  --with-update-version   Set update version value for build [b00]
1906  --with-user-release-suffix
1907                          Add a custom string to the version string if build
1908                          number is not set.[username_builddateb00]
1909  --with-build-number     Set build number value for build [b00]
1910  --with-copyright-year   Set copyright year value for build [current year]
1911  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1912  --with-add-source-root  for each and every source directory, look in this
1913                          additional source root for the same directory; if it
1914                          exists and have files in it, include it in the build
1915  --with-override-source-root
1916                          for each and every source directory, look in this
1917                          override source root for the same directory; if it
1918                          exists, use that directory instead and ignore the
1919                          directory in the original source root
1920  --with-adds-and-overrides
1921                          use the subdirs 'adds' and 'overrides' in the
1922                          specified directory as add-source-root and
1923                          override-source-root
1924  --with-override-langtools
1925                          use this langtools dir for the build
1926  --with-override-corba   use this corba dir for the build
1927  --with-override-jaxp    use this jaxp dir for the build
1928  --with-override-jaxws   use this jaxws dir for the build
1929  --with-override-hotspot use this hotspot dir for the build
1930  --with-override-nashorn use this nashorn dir for the build
1931  --with-override-jdk     use this jdk dir for the build
1932  --with-import-hotspot   import hotspot binaries from this jdk image or
1933                          hotspot build dist dir instead of building from
1934                          source
1935  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1936                          to show possible values [platform dependent]
1937  --with-toolchain-version
1938                          the version of the toolchain to look for, use
1939                          '--help' to show possible values [platform
1940                          dependent]
1941  --with-jtreg            Regression Test Harness [probed]
1942  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1943  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1944  --with-extra-ldflags    extra flags to be used when linking jdk
1945  --with-x                use the X Window System
1946  --with-cups             specify prefix directory for the cups package
1947                          (expecting the headers under PATH/include)
1948  --with-cups-include     specify directory for the cups include files
1949  --with-freetype         specify prefix directory for the freetype package
1950                          (expecting the libraries under PATH/lib and the
1951                          headers under PATH/include)
1952  --with-freetype-include specify directory for the freetype include files
1953  --with-freetype-lib     specify directory for the freetype library
1954  --with-freetype-src     specify directory with freetype sources to
1955                          automatically build the library (experimental,
1956                          Windows-only)
1957  --with-alsa             specify prefix directory for the alsa package
1958                          (expecting the libraries under PATH/lib and the
1959                          headers under PATH/include)
1960  --with-alsa-include     specify directory for the alsa include files
1961  --with-alsa-lib         specify directory for the alsa library
1962  --with-libjpeg          use libjpeg from build system or OpenJDK source
1963                          (system, bundled) [bundled]
1964  --with-giflib           use giflib from build system or OpenJDK source
1965                          (system, bundled) [bundled]
1966  --with-lcms             use lcms2 from build system or OpenJDK source
1967                          (system, bundled) [bundled]
1968  --with-libpng           use libpng from build system or OpenJDK source
1969                          (system, bundled) [bundled]
1970  --with-zlib             use zlib from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-stdc++lib=<static>,<dynamic>,<default>
1973                          force linking of the C++ runtime on Linux to either
1974                          static or dynamic, default is static with dynamic as
1975                          fallback
1976  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1977                          (Windows only) [probed]
1978  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1979                          (Windows only) [probed]
1980  --with-dxsdk            Deprecated. Option is kept for backwards
1981                          compatibility and is ignored
1982  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1983                          compatibility and is ignored
1984  --with-dxsdk-include    Deprecated. Option is kept for backwards
1985                          compatibility and is ignored
1986  --with-num-cores        number of cores in the build system, e.g.
1987                          --with-num-cores=8 [probed]
1988  --with-memory-size      memory (in MB) available in the build system, e.g.
1989                          --with-memory-size=1024 [probed]
1990  --with-jobs             number of parallel jobs to let make run [calculated
1991                          based on cores and memory]
1992  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1993                          invocations of boot JDK, overriding the default
1994                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1995                          -enableassertions"
1996  --with-sjavac-server-java
1997                          use this java binary for running the sjavac
1998                          background server [Boot JDK java]
1999  --with-ccache-dir       where to store ccache files [~/.ccache]
2000
2001Some influential environment variables:
2002  BASENAME    Override default value for BASENAME
2003  BASH        Override default value for BASH
2004  CAT         Override default value for CAT
2005  CHMOD       Override default value for CHMOD
2006  CMP         Override default value for CMP
2007  COMM        Override default value for COMM
2008  CP          Override default value for CP
2009  CUT         Override default value for CUT
2010  DATE        Override default value for DATE
2011  DIFF        Override default value for DIFF
2012  DIRNAME     Override default value for DIRNAME
2013  ECHO        Override default value for ECHO
2014  EXPR        Override default value for EXPR
2015  FILE        Override default value for FILE
2016  FIND        Override default value for FIND
2017  HEAD        Override default value for HEAD
2018  LN          Override default value for LN
2019  LS          Override default value for LS
2020  MKDIR       Override default value for MKDIR
2021  MKTEMP      Override default value for MKTEMP
2022  MV          Override default value for MV
2023  NAWK        Override default value for NAWK
2024  PRINTF      Override default value for PRINTF
2025  RM          Override default value for RM
2026  SH          Override default value for SH
2027  SORT        Override default value for SORT
2028  TAIL        Override default value for TAIL
2029  TAR         Override default value for TAR
2030  TEE         Override default value for TEE
2031  TOUCH       Override default value for TOUCH
2032  TR          Override default value for TR
2033  UNAME       Override default value for UNAME
2034  UNIQ        Override default value for UNIQ
2035  WC          Override default value for WC
2036  WHICH       Override default value for WHICH
2037  XARGS       Override default value for XARGS
2038  AWK         Override default value for AWK
2039  GREP        Override default value for GREP
2040  EGREP       Override default value for EGREP
2041  FGREP       Override default value for FGREP
2042  SED         Override default value for SED
2043  CYGPATH     Override default value for CYGPATH
2044  READLINK    Override default value for READLINK
2045  DF          Override default value for DF
2046  SETFILE     Override default value for SETFILE
2047  CPIO        Override default value for CPIO
2048  UNZIP       Override default value for UNZIP
2049  ZIP         Override default value for ZIP
2050  LDD         Override default value for LDD
2051  OTOOL       Override default value for OTOOL
2052  READELF     Override default value for READELF
2053  HG          Override default value for HG
2054  STAT        Override default value for STAT
2055  TIME        Override default value for TIME
2056  DSYMUTIL    Override default value for DSYMUTIL
2057  XATTR       Override default value for XATTR
2058  CODESIGN    Override default value for CODESIGN
2059  PKG_CONFIG  path to pkg-config utility
2060  JAVA        Override default value for JAVA
2061  JAVAC       Override default value for JAVAC
2062  JAVAH       Override default value for JAVAH
2063  JAR         Override default value for JAR
2064  NATIVE2ASCII
2065              Override default value for NATIVE2ASCII
2066  JARSIGNER   Override default value for JARSIGNER
2067  CC          C compiler command
2068  CFLAGS      C compiler flags
2069  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2070              nonstandard directory <lib dir>
2071  LIBS        libraries to pass to the linker, e.g. -l<library>
2072  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2073              you have headers in a nonstandard directory <include dir>
2074  CXX         C++ compiler command
2075  CXXFLAGS    C++ compiler flags
2076  CPP         C preprocessor
2077  CXXCPP      C++ preprocessor
2078  AS          Override default value for AS
2079  AR          Override default value for AR
2080  OBJC        Objective C compiler command
2081  OBJCFLAGS   Objective C compiler flags
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  MCS         Override default value for MCS
2087  OBJCOPY     Override default value for OBJCOPY
2088  OBJDUMP     Override default value for OBJDUMP
2089  BUILD_CC    Override default value for BUILD_CC
2090  BUILD_CXX   Override default value for BUILD_CXX
2091  BUILD_LD    Override default value for BUILD_LD
2092  JTREGEXE    Override default value for JTREGEXE
2093  XMKMF       Path to xmkmf, Makefile generator for X Window System
2094  FREETYPE_CFLAGS
2095              C compiler flags for FREETYPE, overriding pkg-config
2096  FREETYPE_LIBS
2097              linker flags for FREETYPE, overriding pkg-config
2098  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2099  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2100  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2101  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2102  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2103  PNG_LIBS    linker flags for PNG, overriding pkg-config
2104  LIBFFI_CFLAGS
2105              C compiler flags for LIBFFI, overriding pkg-config
2106  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2107  CCACHE      Override default value for CCACHE
2108
2109Use these variables to override the choices made by `configure' or to help
2110it to find libraries and programs with nonstandard names/locations.
2111
2112Report bugs to <build-dev@openjdk.java.net>.
2113OpenJDK home page: <http://openjdk.java.net>.
2114_ACEOF
2115ac_status=$?
2116fi
2117
2118if test "$ac_init_help" = "recursive"; then
2119  # If there are subdirs, report their specific --help.
2120  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2121    test -d "$ac_dir" ||
2122      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2123      continue
2124    ac_builddir=.
2125
2126case "$ac_dir" in
2127.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2128*)
2129  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2130  # A ".." for each directory in $ac_dir_suffix.
2131  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2132  case $ac_top_builddir_sub in
2133  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2134  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2135  esac ;;
2136esac
2137ac_abs_top_builddir=$ac_pwd
2138ac_abs_builddir=$ac_pwd$ac_dir_suffix
2139# for backward compatibility:
2140ac_top_builddir=$ac_top_build_prefix
2141
2142case $srcdir in
2143  .)  # We are building in place.
2144    ac_srcdir=.
2145    ac_top_srcdir=$ac_top_builddir_sub
2146    ac_abs_top_srcdir=$ac_pwd ;;
2147  [\\/]* | ?:[\\/]* )  # Absolute name.
2148    ac_srcdir=$srcdir$ac_dir_suffix;
2149    ac_top_srcdir=$srcdir
2150    ac_abs_top_srcdir=$srcdir ;;
2151  *) # Relative name.
2152    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2153    ac_top_srcdir=$ac_top_build_prefix$srcdir
2154    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2155esac
2156ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2157
2158    cd "$ac_dir" || { ac_status=$?; continue; }
2159    # Check for guested configure.
2160    if test -f "$ac_srcdir/configure.gnu"; then
2161      echo &&
2162      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2163    elif test -f "$ac_srcdir/configure"; then
2164      echo &&
2165      $SHELL "$ac_srcdir/configure" --help=recursive
2166    else
2167      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2168    fi || ac_status=$?
2169    cd "$ac_pwd" || { ac_status=$?; break; }
2170  done
2171fi
2172
2173test -n "$ac_init_help" && exit $ac_status
2174if $ac_init_version; then
2175  cat <<\_ACEOF
2176OpenJDK configure jdk9
2177generated by GNU Autoconf 2.69
2178
2179Copyright (C) 2012 Free Software Foundation, Inc.
2180This configure script is free software; the Free Software Foundation
2181gives unlimited permission to copy, distribute and modify it.
2182_ACEOF
2183  exit
2184fi
2185
2186## ------------------------ ##
2187## Autoconf initialization. ##
2188## ------------------------ ##
2189
2190# ac_fn_c_try_compile LINENO
2191# --------------------------
2192# Try to compile conftest.$ac_ext, and return whether this succeeded.
2193ac_fn_c_try_compile ()
2194{
2195  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2196  rm -f conftest.$ac_objext
2197  if { { ac_try="$ac_compile"
2198case "(($ac_try" in
2199  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2200  *) ac_try_echo=$ac_try;;
2201esac
2202eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2203$as_echo "$ac_try_echo"; } >&5
2204  (eval "$ac_compile") 2>conftest.err
2205  ac_status=$?
2206  if test -s conftest.err; then
2207    grep -v '^ *+' conftest.err >conftest.er1
2208    cat conftest.er1 >&5
2209    mv -f conftest.er1 conftest.err
2210  fi
2211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2212  test $ac_status = 0; } && {
2213	 test -z "$ac_c_werror_flag" ||
2214	 test ! -s conftest.err
2215       } && test -s conftest.$ac_objext; then :
2216  ac_retval=0
2217else
2218  $as_echo "$as_me: failed program was:" >&5
2219sed 's/^/| /' conftest.$ac_ext >&5
2220
2221	ac_retval=1
2222fi
2223  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2224  as_fn_set_status $ac_retval
2225
2226} # ac_fn_c_try_compile
2227
2228# ac_fn_cxx_try_compile LINENO
2229# ----------------------------
2230# Try to compile conftest.$ac_ext, and return whether this succeeded.
2231ac_fn_cxx_try_compile ()
2232{
2233  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2234  rm -f conftest.$ac_objext
2235  if { { ac_try="$ac_compile"
2236case "(($ac_try" in
2237  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2238  *) ac_try_echo=$ac_try;;
2239esac
2240eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2241$as_echo "$ac_try_echo"; } >&5
2242  (eval "$ac_compile") 2>conftest.err
2243  ac_status=$?
2244  if test -s conftest.err; then
2245    grep -v '^ *+' conftest.err >conftest.er1
2246    cat conftest.er1 >&5
2247    mv -f conftest.er1 conftest.err
2248  fi
2249  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2250  test $ac_status = 0; } && {
2251	 test -z "$ac_cxx_werror_flag" ||
2252	 test ! -s conftest.err
2253       } && test -s conftest.$ac_objext; then :
2254  ac_retval=0
2255else
2256  $as_echo "$as_me: failed program was:" >&5
2257sed 's/^/| /' conftest.$ac_ext >&5
2258
2259	ac_retval=1
2260fi
2261  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2262  as_fn_set_status $ac_retval
2263
2264} # ac_fn_cxx_try_compile
2265
2266# ac_fn_c_try_cpp LINENO
2267# ----------------------
2268# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2269ac_fn_c_try_cpp ()
2270{
2271  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2272  if { { ac_try="$ac_cpp conftest.$ac_ext"
2273case "(($ac_try" in
2274  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2275  *) ac_try_echo=$ac_try;;
2276esac
2277eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2278$as_echo "$ac_try_echo"; } >&5
2279  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2280  ac_status=$?
2281  if test -s conftest.err; then
2282    grep -v '^ *+' conftest.err >conftest.er1
2283    cat conftest.er1 >&5
2284    mv -f conftest.er1 conftest.err
2285  fi
2286  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2287  test $ac_status = 0; } > conftest.i && {
2288	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2289	 test ! -s conftest.err
2290       }; then :
2291  ac_retval=0
2292else
2293  $as_echo "$as_me: failed program was:" >&5
2294sed 's/^/| /' conftest.$ac_ext >&5
2295
2296    ac_retval=1
2297fi
2298  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2299  as_fn_set_status $ac_retval
2300
2301} # ac_fn_c_try_cpp
2302
2303# ac_fn_cxx_try_cpp LINENO
2304# ------------------------
2305# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2306ac_fn_cxx_try_cpp ()
2307{
2308  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2309  if { { ac_try="$ac_cpp conftest.$ac_ext"
2310case "(($ac_try" in
2311  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2312  *) ac_try_echo=$ac_try;;
2313esac
2314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2315$as_echo "$ac_try_echo"; } >&5
2316  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2317  ac_status=$?
2318  if test -s conftest.err; then
2319    grep -v '^ *+' conftest.err >conftest.er1
2320    cat conftest.er1 >&5
2321    mv -f conftest.er1 conftest.err
2322  fi
2323  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2324  test $ac_status = 0; } > conftest.i && {
2325	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2326	 test ! -s conftest.err
2327       }; then :
2328  ac_retval=0
2329else
2330  $as_echo "$as_me: failed program was:" >&5
2331sed 's/^/| /' conftest.$ac_ext >&5
2332
2333    ac_retval=1
2334fi
2335  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2336  as_fn_set_status $ac_retval
2337
2338} # ac_fn_cxx_try_cpp
2339
2340# ac_fn_objc_try_compile LINENO
2341# -----------------------------
2342# Try to compile conftest.$ac_ext, and return whether this succeeded.
2343ac_fn_objc_try_compile ()
2344{
2345  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2346  rm -f conftest.$ac_objext
2347  if { { ac_try="$ac_compile"
2348case "(($ac_try" in
2349  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2350  *) ac_try_echo=$ac_try;;
2351esac
2352eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2353$as_echo "$ac_try_echo"; } >&5
2354  (eval "$ac_compile") 2>conftest.err
2355  ac_status=$?
2356  if test -s conftest.err; then
2357    grep -v '^ *+' conftest.err >conftest.er1
2358    cat conftest.er1 >&5
2359    mv -f conftest.er1 conftest.err
2360  fi
2361  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2362  test $ac_status = 0; } && {
2363	 test -z "$ac_objc_werror_flag" ||
2364	 test ! -s conftest.err
2365       } && test -s conftest.$ac_objext; then :
2366  ac_retval=0
2367else
2368  $as_echo "$as_me: failed program was:" >&5
2369sed 's/^/| /' conftest.$ac_ext >&5
2370
2371	ac_retval=1
2372fi
2373  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2374  as_fn_set_status $ac_retval
2375
2376} # ac_fn_objc_try_compile
2377
2378# ac_fn_c_try_link LINENO
2379# -----------------------
2380# Try to link conftest.$ac_ext, and return whether this succeeded.
2381ac_fn_c_try_link ()
2382{
2383  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2384  rm -f conftest.$ac_objext conftest$ac_exeext
2385  if { { ac_try="$ac_link"
2386case "(($ac_try" in
2387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2388  *) ac_try_echo=$ac_try;;
2389esac
2390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2391$as_echo "$ac_try_echo"; } >&5
2392  (eval "$ac_link") 2>conftest.err
2393  ac_status=$?
2394  if test -s conftest.err; then
2395    grep -v '^ *+' conftest.err >conftest.er1
2396    cat conftest.er1 >&5
2397    mv -f conftest.er1 conftest.err
2398  fi
2399  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2400  test $ac_status = 0; } && {
2401	 test -z "$ac_c_werror_flag" ||
2402	 test ! -s conftest.err
2403       } && test -s conftest$ac_exeext && {
2404	 test "$cross_compiling" = yes ||
2405	 test -x conftest$ac_exeext
2406       }; then :
2407  ac_retval=0
2408else
2409  $as_echo "$as_me: failed program was:" >&5
2410sed 's/^/| /' conftest.$ac_ext >&5
2411
2412	ac_retval=1
2413fi
2414  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2415  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2416  # interfere with the next link command; also delete a directory that is
2417  # left behind by Apple's compiler.  We do this before executing the actions.
2418  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2419  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2420  as_fn_set_status $ac_retval
2421
2422} # ac_fn_c_try_link
2423
2424# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2425# ---------------------------------------------------------
2426# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2427# the include files in INCLUDES and setting the cache variable VAR
2428# accordingly.
2429ac_fn_cxx_check_header_mongrel ()
2430{
2431  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2432  if eval \${$3+:} false; then :
2433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2434$as_echo_n "checking for $2... " >&6; }
2435if eval \${$3+:} false; then :
2436  $as_echo_n "(cached) " >&6
2437fi
2438eval ac_res=\$$3
2439	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2440$as_echo "$ac_res" >&6; }
2441else
2442  # Is the header compilable?
2443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2444$as_echo_n "checking $2 usability... " >&6; }
2445cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446/* end confdefs.h.  */
2447$4
2448#include <$2>
2449_ACEOF
2450if ac_fn_cxx_try_compile "$LINENO"; then :
2451  ac_header_compiler=yes
2452else
2453  ac_header_compiler=no
2454fi
2455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2457$as_echo "$ac_header_compiler" >&6; }
2458
2459# Is the header present?
2460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2461$as_echo_n "checking $2 presence... " >&6; }
2462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2463/* end confdefs.h.  */
2464#include <$2>
2465_ACEOF
2466if ac_fn_cxx_try_cpp "$LINENO"; then :
2467  ac_header_preproc=yes
2468else
2469  ac_header_preproc=no
2470fi
2471rm -f conftest.err conftest.i conftest.$ac_ext
2472{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2473$as_echo "$ac_header_preproc" >&6; }
2474
2475# So?  What about this header?
2476case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2477  yes:no: )
2478    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2479$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2480    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2481$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2482    ;;
2483  no:yes:* )
2484    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2485$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2486    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2487$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2488    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2489$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2490    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2491$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2492    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2493$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2494( $as_echo "## ----------------------------------------- ##
2495## Report this to build-dev@openjdk.java.net ##
2496## ----------------------------------------- ##"
2497     ) | sed "s/^/$as_me: WARNING:     /" >&2
2498    ;;
2499esac
2500  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2501$as_echo_n "checking for $2... " >&6; }
2502if eval \${$3+:} false; then :
2503  $as_echo_n "(cached) " >&6
2504else
2505  eval "$3=\$ac_header_compiler"
2506fi
2507eval ac_res=\$$3
2508	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2509$as_echo "$ac_res" >&6; }
2510fi
2511  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2512
2513} # ac_fn_cxx_check_header_mongrel
2514
2515# ac_fn_cxx_try_run LINENO
2516# ------------------------
2517# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2518# that executables *can* be run.
2519ac_fn_cxx_try_run ()
2520{
2521  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2522  if { { ac_try="$ac_link"
2523case "(($ac_try" in
2524  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2525  *) ac_try_echo=$ac_try;;
2526esac
2527eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2528$as_echo "$ac_try_echo"; } >&5
2529  (eval "$ac_link") 2>&5
2530  ac_status=$?
2531  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2532  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2533  { { case "(($ac_try" in
2534  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535  *) ac_try_echo=$ac_try;;
2536esac
2537eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2538$as_echo "$ac_try_echo"; } >&5
2539  (eval "$ac_try") 2>&5
2540  ac_status=$?
2541  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2542  test $ac_status = 0; }; }; then :
2543  ac_retval=0
2544else
2545  $as_echo "$as_me: program exited with status $ac_status" >&5
2546       $as_echo "$as_me: failed program was:" >&5
2547sed 's/^/| /' conftest.$ac_ext >&5
2548
2549       ac_retval=$ac_status
2550fi
2551  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2552  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2553  as_fn_set_status $ac_retval
2554
2555} # ac_fn_cxx_try_run
2556
2557# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2558# ---------------------------------------------------------
2559# Tests whether HEADER exists and can be compiled using the include files in
2560# INCLUDES, setting the cache variable VAR accordingly.
2561ac_fn_cxx_check_header_compile ()
2562{
2563  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2564  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2565$as_echo_n "checking for $2... " >&6; }
2566if eval \${$3+:} false; then :
2567  $as_echo_n "(cached) " >&6
2568else
2569  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2570/* end confdefs.h.  */
2571$4
2572#include <$2>
2573_ACEOF
2574if ac_fn_cxx_try_compile "$LINENO"; then :
2575  eval "$3=yes"
2576else
2577  eval "$3=no"
2578fi
2579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2580fi
2581eval ac_res=\$$3
2582	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2583$as_echo "$ac_res" >&6; }
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585
2586} # ac_fn_cxx_check_header_compile
2587
2588# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2589# ----------------------------------------------
2590# Tries to find the compile-time value of EXPR in a program that includes
2591# INCLUDES, setting VAR accordingly. Returns whether the value could be
2592# computed
2593ac_fn_cxx_compute_int ()
2594{
2595  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2596  if test "$cross_compiling" = yes; then
2597    # Depending upon the size, compute the lo and hi bounds.
2598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2599/* end confdefs.h.  */
2600$4
2601int
2602main ()
2603{
2604static int test_array [1 - 2 * !(($2) >= 0)];
2605test_array [0] = 0;
2606return test_array [0];
2607
2608  ;
2609  return 0;
2610}
2611_ACEOF
2612if ac_fn_cxx_try_compile "$LINENO"; then :
2613  ac_lo=0 ac_mid=0
2614  while :; do
2615    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2616/* end confdefs.h.  */
2617$4
2618int
2619main ()
2620{
2621static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2622test_array [0] = 0;
2623return test_array [0];
2624
2625  ;
2626  return 0;
2627}
2628_ACEOF
2629if ac_fn_cxx_try_compile "$LINENO"; then :
2630  ac_hi=$ac_mid; break
2631else
2632  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2633			if test $ac_lo -le $ac_mid; then
2634			  ac_lo= ac_hi=
2635			  break
2636			fi
2637			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2638fi
2639rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2640  done
2641else
2642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2643/* end confdefs.h.  */
2644$4
2645int
2646main ()
2647{
2648static int test_array [1 - 2 * !(($2) < 0)];
2649test_array [0] = 0;
2650return test_array [0];
2651
2652  ;
2653  return 0;
2654}
2655_ACEOF
2656if ac_fn_cxx_try_compile "$LINENO"; then :
2657  ac_hi=-1 ac_mid=-1
2658  while :; do
2659    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_lo=$ac_mid; break
2675else
2676  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2677			if test $ac_mid -le $ac_hi; then
2678			  ac_lo= ac_hi=
2679			  break
2680			fi
2681			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2682fi
2683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2684  done
2685else
2686  ac_lo= ac_hi=
2687fi
2688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689fi
2690rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2691# Binary search between lo and hi bounds.
2692while test "x$ac_lo" != "x$ac_hi"; do
2693  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2694  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2695/* end confdefs.h.  */
2696$4
2697int
2698main ()
2699{
2700static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2701test_array [0] = 0;
2702return test_array [0];
2703
2704  ;
2705  return 0;
2706}
2707_ACEOF
2708if ac_fn_cxx_try_compile "$LINENO"; then :
2709  ac_hi=$ac_mid
2710else
2711  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2712fi
2713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2714done
2715case $ac_lo in #((
2716?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2717'') ac_retval=1 ;;
2718esac
2719  else
2720    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2721/* end confdefs.h.  */
2722$4
2723static long int longval () { return $2; }
2724static unsigned long int ulongval () { return $2; }
2725#include <stdio.h>
2726#include <stdlib.h>
2727int
2728main ()
2729{
2730
2731  FILE *f = fopen ("conftest.val", "w");
2732  if (! f)
2733    return 1;
2734  if (($2) < 0)
2735    {
2736      long int i = longval ();
2737      if (i != ($2))
2738	return 1;
2739      fprintf (f, "%ld", i);
2740    }
2741  else
2742    {
2743      unsigned long int i = ulongval ();
2744      if (i != ($2))
2745	return 1;
2746      fprintf (f, "%lu", i);
2747    }
2748  /* Do not output a trailing newline, as this causes \r\n confusion
2749     on some platforms.  */
2750  return ferror (f) || fclose (f) != 0;
2751
2752  ;
2753  return 0;
2754}
2755_ACEOF
2756if ac_fn_cxx_try_run "$LINENO"; then :
2757  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2758else
2759  ac_retval=1
2760fi
2761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2762  conftest.$ac_objext conftest.beam conftest.$ac_ext
2763rm -f conftest.val
2764
2765  fi
2766  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2767  as_fn_set_status $ac_retval
2768
2769} # ac_fn_cxx_compute_int
2770
2771# ac_fn_cxx_try_link LINENO
2772# -------------------------
2773# Try to link conftest.$ac_ext, and return whether this succeeded.
2774ac_fn_cxx_try_link ()
2775{
2776  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2777  rm -f conftest.$ac_objext conftest$ac_exeext
2778  if { { ac_try="$ac_link"
2779case "(($ac_try" in
2780  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2781  *) ac_try_echo=$ac_try;;
2782esac
2783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2784$as_echo "$ac_try_echo"; } >&5
2785  (eval "$ac_link") 2>conftest.err
2786  ac_status=$?
2787  if test -s conftest.err; then
2788    grep -v '^ *+' conftest.err >conftest.er1
2789    cat conftest.er1 >&5
2790    mv -f conftest.er1 conftest.err
2791  fi
2792  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2793  test $ac_status = 0; } && {
2794	 test -z "$ac_cxx_werror_flag" ||
2795	 test ! -s conftest.err
2796       } && test -s conftest$ac_exeext && {
2797	 test "$cross_compiling" = yes ||
2798	 test -x conftest$ac_exeext
2799       }; then :
2800  ac_retval=0
2801else
2802  $as_echo "$as_me: failed program was:" >&5
2803sed 's/^/| /' conftest.$ac_ext >&5
2804
2805	ac_retval=1
2806fi
2807  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2808  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2809  # interfere with the next link command; also delete a directory that is
2810  # left behind by Apple's compiler.  We do this before executing the actions.
2811  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2812  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2813  as_fn_set_status $ac_retval
2814
2815} # ac_fn_cxx_try_link
2816
2817# ac_fn_cxx_check_func LINENO FUNC VAR
2818# ------------------------------------
2819# Tests whether FUNC exists, setting the cache variable VAR accordingly
2820ac_fn_cxx_check_func ()
2821{
2822  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2824$as_echo_n "checking for $2... " >&6; }
2825if eval \${$3+:} false; then :
2826  $as_echo_n "(cached) " >&6
2827else
2828  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829/* end confdefs.h.  */
2830/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2831   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2832#define $2 innocuous_$2
2833
2834/* System header to define __stub macros and hopefully few prototypes,
2835    which can conflict with char $2 (); below.
2836    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2837    <limits.h> exists even on freestanding compilers.  */
2838
2839#ifdef __STDC__
2840# include <limits.h>
2841#else
2842# include <assert.h>
2843#endif
2844
2845#undef $2
2846
2847/* Override any GCC internal prototype to avoid an error.
2848   Use char because int might match the return type of a GCC
2849   builtin and then its argument prototype would still apply.  */
2850#ifdef __cplusplus
2851extern "C"
2852#endif
2853char $2 ();
2854/* The GNU C library defines this for functions which it implements
2855    to always fail with ENOSYS.  Some functions are actually named
2856    something starting with __ and the normal name is an alias.  */
2857#if defined __stub_$2 || defined __stub___$2
2858choke me
2859#endif
2860
2861int
2862main ()
2863{
2864return $2 ();
2865  ;
2866  return 0;
2867}
2868_ACEOF
2869if ac_fn_cxx_try_link "$LINENO"; then :
2870  eval "$3=yes"
2871else
2872  eval "$3=no"
2873fi
2874rm -f core conftest.err conftest.$ac_objext \
2875    conftest$ac_exeext conftest.$ac_ext
2876fi
2877eval ac_res=\$$3
2878	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2879$as_echo "$ac_res" >&6; }
2880  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2881
2882} # ac_fn_cxx_check_func
2883
2884# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2885# -------------------------------------------------------
2886# Tests whether HEADER exists and can be compiled using the include files in
2887# INCLUDES, setting the cache variable VAR accordingly.
2888ac_fn_c_check_header_compile ()
2889{
2890  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2892$as_echo_n "checking for $2... " >&6; }
2893if eval \${$3+:} false; then :
2894  $as_echo_n "(cached) " >&6
2895else
2896  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2897/* end confdefs.h.  */
2898$4
2899#include <$2>
2900_ACEOF
2901if ac_fn_c_try_compile "$LINENO"; then :
2902  eval "$3=yes"
2903else
2904  eval "$3=no"
2905fi
2906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2907fi
2908eval ac_res=\$$3
2909	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2910$as_echo "$ac_res" >&6; }
2911  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2912
2913} # ac_fn_c_check_header_compile
2914cat >config.log <<_ACEOF
2915This file contains any messages produced by compilers while
2916running configure, to aid debugging if configure makes a mistake.
2917
2918It was created by OpenJDK $as_me jdk9, which was
2919generated by GNU Autoconf 2.69.  Invocation command line was
2920
2921  $ $0 $@
2922
2923_ACEOF
2924exec 5>>config.log
2925{
2926cat <<_ASUNAME
2927## --------- ##
2928## Platform. ##
2929## --------- ##
2930
2931hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2932uname -m = `(uname -m) 2>/dev/null || echo unknown`
2933uname -r = `(uname -r) 2>/dev/null || echo unknown`
2934uname -s = `(uname -s) 2>/dev/null || echo unknown`
2935uname -v = `(uname -v) 2>/dev/null || echo unknown`
2936
2937/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2938/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2939
2940/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2941/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2942/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2943/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2944/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2945/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2946/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2947
2948_ASUNAME
2949
2950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2951for as_dir in $PATH
2952do
2953  IFS=$as_save_IFS
2954  test -z "$as_dir" && as_dir=.
2955    $as_echo "PATH: $as_dir"
2956  done
2957IFS=$as_save_IFS
2958
2959} >&5
2960
2961cat >&5 <<_ACEOF
2962
2963
2964## ----------- ##
2965## Core tests. ##
2966## ----------- ##
2967
2968_ACEOF
2969
2970
2971# Keep a trace of the command line.
2972# Strip out --no-create and --no-recursion so they do not pile up.
2973# Strip out --silent because we don't want to record it for future runs.
2974# Also quote any args containing shell meta-characters.
2975# Make two passes to allow for proper duplicate-argument suppression.
2976ac_configure_args=
2977ac_configure_args0=
2978ac_configure_args1=
2979ac_must_keep_next=false
2980for ac_pass in 1 2
2981do
2982  for ac_arg
2983  do
2984    case $ac_arg in
2985    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2986    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2987    | -silent | --silent | --silen | --sile | --sil)
2988      continue ;;
2989    *\'*)
2990      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2991    esac
2992    case $ac_pass in
2993    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2994    2)
2995      as_fn_append ac_configure_args1 " '$ac_arg'"
2996      if test $ac_must_keep_next = true; then
2997	ac_must_keep_next=false # Got value, back to normal.
2998      else
2999	case $ac_arg in
3000	  *=* | --config-cache | -C | -disable-* | --disable-* \
3001	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3002	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3003	  | -with-* | --with-* | -without-* | --without-* | --x)
3004	    case "$ac_configure_args0 " in
3005	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3006	    esac
3007	    ;;
3008	  -* ) ac_must_keep_next=true ;;
3009	esac
3010      fi
3011      as_fn_append ac_configure_args " '$ac_arg'"
3012      ;;
3013    esac
3014  done
3015done
3016{ ac_configure_args0=; unset ac_configure_args0;}
3017{ ac_configure_args1=; unset ac_configure_args1;}
3018
3019# When interrupted or exit'd, cleanup temporary files, and complete
3020# config.log.  We remove comments because anyway the quotes in there
3021# would cause problems or look ugly.
3022# WARNING: Use '\'' to represent an apostrophe within the trap.
3023# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3024trap 'exit_status=$?
3025  # Save into config.log some information that might help in debugging.
3026  {
3027    echo
3028
3029    $as_echo "## ---------------- ##
3030## Cache variables. ##
3031## ---------------- ##"
3032    echo
3033    # The following way of writing the cache mishandles newlines in values,
3034(
3035  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3036    eval ac_val=\$$ac_var
3037    case $ac_val in #(
3038    *${as_nl}*)
3039      case $ac_var in #(
3040      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3041$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3042      esac
3043      case $ac_var in #(
3044      _ | IFS | as_nl) ;; #(
3045      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3046      *) { eval $ac_var=; unset $ac_var;} ;;
3047      esac ;;
3048    esac
3049  done
3050  (set) 2>&1 |
3051    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3052    *${as_nl}ac_space=\ *)
3053      sed -n \
3054	"s/'\''/'\''\\\\'\'''\''/g;
3055	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3056      ;; #(
3057    *)
3058      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3059      ;;
3060    esac |
3061    sort
3062)
3063    echo
3064
3065    $as_echo "## ----------------- ##
3066## Output variables. ##
3067## ----------------- ##"
3068    echo
3069    for ac_var in $ac_subst_vars
3070    do
3071      eval ac_val=\$$ac_var
3072      case $ac_val in
3073      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3074      esac
3075      $as_echo "$ac_var='\''$ac_val'\''"
3076    done | sort
3077    echo
3078
3079    if test -n "$ac_subst_files"; then
3080      $as_echo "## ------------------- ##
3081## File substitutions. ##
3082## ------------------- ##"
3083      echo
3084      for ac_var in $ac_subst_files
3085      do
3086	eval ac_val=\$$ac_var
3087	case $ac_val in
3088	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3089	esac
3090	$as_echo "$ac_var='\''$ac_val'\''"
3091      done | sort
3092      echo
3093    fi
3094
3095    if test -s confdefs.h; then
3096      $as_echo "## ----------- ##
3097## confdefs.h. ##
3098## ----------- ##"
3099      echo
3100      cat confdefs.h
3101      echo
3102    fi
3103    test "$ac_signal" != 0 &&
3104      $as_echo "$as_me: caught signal $ac_signal"
3105    $as_echo "$as_me: exit $exit_status"
3106  } >&5
3107  rm -f core *.core core.conftest.* &&
3108    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3109    exit $exit_status
3110' 0
3111for ac_signal in 1 2 13 15; do
3112  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3113done
3114ac_signal=0
3115
3116# confdefs.h avoids OS command line length limits that DEFS can exceed.
3117rm -f -r conftest* confdefs.h
3118
3119$as_echo "/* confdefs.h */" > confdefs.h
3120
3121# Predefined preprocessor variables.
3122
3123cat >>confdefs.h <<_ACEOF
3124#define PACKAGE_NAME "$PACKAGE_NAME"
3125_ACEOF
3126
3127cat >>confdefs.h <<_ACEOF
3128#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3129_ACEOF
3130
3131cat >>confdefs.h <<_ACEOF
3132#define PACKAGE_VERSION "$PACKAGE_VERSION"
3133_ACEOF
3134
3135cat >>confdefs.h <<_ACEOF
3136#define PACKAGE_STRING "$PACKAGE_STRING"
3137_ACEOF
3138
3139cat >>confdefs.h <<_ACEOF
3140#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3141_ACEOF
3142
3143cat >>confdefs.h <<_ACEOF
3144#define PACKAGE_URL "$PACKAGE_URL"
3145_ACEOF
3146
3147
3148# Let the site file select an alternate cache file if it wants to.
3149# Prefer an explicitly selected file to automatically selected ones.
3150ac_site_file1=NONE
3151ac_site_file2=NONE
3152if test -n "$CONFIG_SITE"; then
3153  # We do not want a PATH search for config.site.
3154  case $CONFIG_SITE in #((
3155    -*)  ac_site_file1=./$CONFIG_SITE;;
3156    */*) ac_site_file1=$CONFIG_SITE;;
3157    *)   ac_site_file1=./$CONFIG_SITE;;
3158  esac
3159elif test "x$prefix" != xNONE; then
3160  ac_site_file1=$prefix/share/config.site
3161  ac_site_file2=$prefix/etc/config.site
3162else
3163  ac_site_file1=$ac_default_prefix/share/config.site
3164  ac_site_file2=$ac_default_prefix/etc/config.site
3165fi
3166for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3167do
3168  test "x$ac_site_file" = xNONE && continue
3169  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3170    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3171$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3172    sed 's/^/| /' "$ac_site_file" >&5
3173    . "$ac_site_file" \
3174      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3176as_fn_error $? "failed to load site script $ac_site_file
3177See \`config.log' for more details" "$LINENO" 5; }
3178  fi
3179done
3180
3181if test -r "$cache_file"; then
3182  # Some versions of bash will fail to source /dev/null (special files
3183  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3184  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3185    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3186$as_echo "$as_me: loading cache $cache_file" >&6;}
3187    case $cache_file in
3188      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3189      *)                      . "./$cache_file";;
3190    esac
3191  fi
3192else
3193  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3194$as_echo "$as_me: creating cache $cache_file" >&6;}
3195  >$cache_file
3196fi
3197
3198# Check that the precious variables saved in the cache have kept the same
3199# value.
3200ac_cache_corrupted=false
3201for ac_var in $ac_precious_vars; do
3202  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3203  eval ac_new_set=\$ac_env_${ac_var}_set
3204  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3205  eval ac_new_val=\$ac_env_${ac_var}_value
3206  case $ac_old_set,$ac_new_set in
3207    set,)
3208      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3209$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3210      ac_cache_corrupted=: ;;
3211    ,set)
3212      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3213$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3214      ac_cache_corrupted=: ;;
3215    ,);;
3216    *)
3217      if test "x$ac_old_val" != "x$ac_new_val"; then
3218	# differences in whitespace do not lead to failure.
3219	ac_old_val_w=`echo x $ac_old_val`
3220	ac_new_val_w=`echo x $ac_new_val`
3221	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3222	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3223$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3224	  ac_cache_corrupted=:
3225	else
3226	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3227$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3228	  eval $ac_var=\$ac_old_val
3229	fi
3230	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3231$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3232	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3233$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3234      fi;;
3235  esac
3236  # Pass precious variables to config.status.
3237  if test "$ac_new_set" = set; then
3238    case $ac_new_val in
3239    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3240    *) ac_arg=$ac_var=$ac_new_val ;;
3241    esac
3242    case " $ac_configure_args " in
3243      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3244      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3245    esac
3246  fi
3247done
3248if $ac_cache_corrupted; then
3249  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3250$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3251  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3252$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3253  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3254fi
3255## -------------------- ##
3256## Main body of script. ##
3257## -------------------- ##
3258
3259ac_ext=c
3260ac_cpp='$CPP $CPPFLAGS'
3261ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3262ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3263ac_compiler_gnu=$ac_cv_c_compiler_gnu
3264
3265
3266
3267ac_aux_dir=
3268for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3269  if test -f "$ac_dir/install-sh"; then
3270    ac_aux_dir=$ac_dir
3271    ac_install_sh="$ac_aux_dir/install-sh -c"
3272    break
3273  elif test -f "$ac_dir/install.sh"; then
3274    ac_aux_dir=$ac_dir
3275    ac_install_sh="$ac_aux_dir/install.sh -c"
3276    break
3277  elif test -f "$ac_dir/shtool"; then
3278    ac_aux_dir=$ac_dir
3279    ac_install_sh="$ac_aux_dir/shtool install -c"
3280    break
3281  fi
3282done
3283if test -z "$ac_aux_dir"; then
3284  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
3285fi
3286
3287# These three variables are undocumented and unsupported,
3288# and are intended to be withdrawn in a future Autoconf release.
3289# They can cause serious problems if a builder's source tree is in a directory
3290# whose full name contains unusual characters.
3291ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3292ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3293ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3294
3295
3296# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3297
3298#
3299# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3300# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3301#
3302# This code is free software; you can redistribute it and/or modify it
3303# under the terms of the GNU General Public License version 2 only, as
3304# published by the Free Software Foundation.  Oracle designates this
3305# particular file as subject to the "Classpath" exception as provided
3306# by Oracle in the LICENSE file that accompanied this code.
3307#
3308# This code is distributed in the hope that it will be useful, but WITHOUT
3309# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3310# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3311# version 2 for more details (a copy is included in the LICENSE file that
3312# accompanied this code).
3313#
3314# You should have received a copy of the GNU General Public License version
3315# 2 along with this work; if not, write to the Free Software Foundation,
3316# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3317#
3318# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3319# or visit www.oracle.com if you need additional information or have any
3320# questions.
3321#
3322
3323#
3324# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3325#
3326# This program is free software; you can redistribute it and/or modify
3327# it under the terms of the GNU General Public License as published by
3328# the Free Software Foundation; either version 2 of the License, or
3329# (at your option) any later version.
3330#
3331# This program is distributed in the hope that it will be useful, but
3332# WITHOUT ANY WARRANTY; without even the implied warranty of
3333# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3334# General Public License for more details.
3335#
3336# You should have received a copy of the GNU General Public License
3337# along with this program; if not, write to the Free Software
3338# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3339#
3340# As a special exception to the GNU General Public License, if you
3341# distribute this file as part of a program that contains a
3342# configuration script generated by Autoconf, you may include it under
3343# the same distribution terms that you use for the rest of that program.
3344
3345# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3346# ----------------------------------
3347# PKG_PROG_PKG_CONFIG
3348
3349# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3350#
3351# Check to see whether a particular set of modules exists.  Similar
3352# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3353#
3354#
3355# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3356# this or PKG_CHECK_MODULES is called, or make sure to call
3357# PKG_CHECK_EXISTS manually
3358# --------------------------------------------------------------
3359
3360
3361
3362# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3363# ---------------------------------------------
3364# _PKG_CONFIG
3365
3366# _PKG_SHORT_ERRORS_SUPPORTED
3367# -----------------------------
3368# _PKG_SHORT_ERRORS_SUPPORTED
3369
3370
3371# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3372# [ACTION-IF-NOT-FOUND])
3373#
3374#
3375# Note that if there is a possibility the first call to
3376# PKG_CHECK_MODULES might not happen, you should be sure to include an
3377# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3378#
3379#
3380# --------------------------------------------------------------
3381# PKG_CHECK_MODULES
3382
3383
3384# Include these first...
3385#
3386# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3387# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3388#
3389# This code is free software; you can redistribute it and/or modify it
3390# under the terms of the GNU General Public License version 2 only, as
3391# published by the Free Software Foundation.  Oracle designates this
3392# particular file as subject to the "Classpath" exception as provided
3393# by Oracle in the LICENSE file that accompanied this code.
3394#
3395# This code is distributed in the hope that it will be useful, but WITHOUT
3396# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3397# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3398# version 2 for more details (a copy is included in the LICENSE file that
3399# accompanied this code).
3400#
3401# You should have received a copy of the GNU General Public License version
3402# 2 along with this work; if not, write to the Free Software Foundation,
3403# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3404#
3405# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3406# or visit www.oracle.com if you need additional information or have any
3407# questions.
3408#
3409
3410# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3411# If so, then append $1 to $2 \
3412# Also set JVM_ARG_OK to true/false depending on outcome.
3413
3414
3415# Appends a string to a path variable, only adding the : when needed.
3416
3417
3418# Prepends a string to a path variable, only adding the : when needed.
3419
3420
3421# This will make sure the given variable points to a full and proper
3422# path. This means:
3423# 1) There will be no spaces in the path. On unix platforms,
3424#    spaces in the path will result in an error. On Windows,
3425#    the path will be rewritten using short-style to be space-free.
3426# 2) The path will be absolute, and it will be in unix-style (on
3427#     cygwin).
3428# $1: The name of the variable to fix
3429
3430
3431# This will make sure the given variable points to a executable
3432# with a full and proper path. This means:
3433# 1) There will be no spaces in the path. On unix platforms,
3434#    spaces in the path will result in an error. On Windows,
3435#    the path will be rewritten using short-style to be space-free.
3436# 2) The path will be absolute, and it will be in unix-style (on
3437#     cygwin).
3438# Any arguments given to the executable is preserved.
3439# If the input variable does not have a directory specification, then
3440# it need to be in the PATH.
3441# $1: The name of the variable to fix
3442
3443
3444
3445
3446# Register a --with argument but mark it as deprecated
3447# $1: The name of the with argument to deprecate, not including --with-
3448
3449
3450# Register a --enable argument but mark it as deprecated
3451# $1: The name of the with argument to deprecate, not including --enable-
3452# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3453
3454
3455
3456
3457# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3458# $1: variable to check
3459
3460
3461# Check that there are no unprocessed overridden variables left.
3462# If so, they are an incorrect argument and we will exit with an error.
3463
3464
3465# Setup a tool for the given variable. If correctly specified by the user,
3466# use that value, otherwise search for the tool using the supplied code snippet.
3467# $1: variable to set
3468# $2: code snippet to call to look for the tool
3469
3470
3471# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3472# $1: variable to set
3473# $2: executable name (or list of names) to look for
3474
3475
3476# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3477# $1: variable to set
3478# $2: executable name (or list of names) to look for
3479
3480
3481# Like BASIC_PATH_PROGS but fails if no tool was found.
3482# $1: variable to set
3483# $2: executable name (or list of names) to look for
3484
3485
3486# Like BASIC_SETUP_TOOL but fails if no tool was found.
3487# $1: variable to set
3488# $2: autoconf macro to call to look for the special tool
3489
3490
3491# Setup the most fundamental tools that relies on not much else to set up,
3492# but is used by much of the early bootstrap code.
3493
3494
3495# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505#%%% Simple tools %%%
3506
3507# Check if we have found a usable version of make
3508# $1: the path to a potential make binary (or empty)
3509# $2: the description on how we found this
3510
3511
3512
3513
3514# Goes looking for a usable version of GNU make.
3515
3516
3517
3518
3519
3520
3521# Check if build directory is on local disk. If not possible to determine,
3522# we prefer to claim it's local.
3523# Argument 1: directory to test
3524# Argument 2: what to do if it is on local disk
3525# Argument 3: what to do otherwise (remote disk or failure)
3526
3527
3528# Check that source files have basic read permissions set. This might
3529# not be the case in cygwin in certain conditions.
3530
3531
3532
3533
3534#
3535# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3536# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3537#
3538# This code is free software; you can redistribute it and/or modify it
3539# under the terms of the GNU General Public License version 2 only, as
3540# published by the Free Software Foundation.  Oracle designates this
3541# particular file as subject to the "Classpath" exception as provided
3542# by Oracle in the LICENSE file that accompanied this code.
3543#
3544# This code is distributed in the hope that it will be useful, but WITHOUT
3545# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3546# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3547# version 2 for more details (a copy is included in the LICENSE file that
3548# accompanied this code).
3549#
3550# You should have received a copy of the GNU General Public License version
3551# 2 along with this work; if not, write to the Free Software Foundation,
3552# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3553#
3554# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3555# or visit www.oracle.com if you need additional information or have any
3556# questions.
3557#
3558
3559
3560
3561
3562
3563# Helper function which possibly converts a path using DOS-style short mode.
3564# If so, the updated path is stored in $new_path.
3565# $1: The path to check
3566
3567
3568# Helper function which possibly converts a path using DOS-style short mode.
3569# If so, the updated path is stored in $new_path.
3570# $1: The path to check
3571
3572
3573# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3574# and could probably be heavily simplified. However, all changes in this
3575# area tend to need lot of testing in different scenarios, and in lack of
3576# proper unit testing, cleaning this up has not been deemed worth the effort
3577# at the moment.
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3588
3589
3590
3591
3592#
3593# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3595#
3596# This code is free software; you can redistribute it and/or modify it
3597# under the terms of the GNU General Public License version 2 only, as
3598# published by the Free Software Foundation.  Oracle designates this
3599# particular file as subject to the "Classpath" exception as provided
3600# by Oracle in the LICENSE file that accompanied this code.
3601#
3602# This code is distributed in the hope that it will be useful, but WITHOUT
3603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3605# version 2 for more details (a copy is included in the LICENSE file that
3606# accompanied this code).
3607#
3608# You should have received a copy of the GNU General Public License version
3609# 2 along with this work; if not, write to the Free Software Foundation,
3610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3611#
3612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3613# or visit www.oracle.com if you need additional information or have any
3614# questions.
3615#
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627# ... then the rest
3628#
3629# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3630# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3631#
3632# This code is free software; you can redistribute it and/or modify it
3633# under the terms of the GNU General Public License version 2 only, as
3634# published by the Free Software Foundation.  Oracle designates this
3635# particular file as subject to the "Classpath" exception as provided
3636# by Oracle in the LICENSE file that accompanied this code.
3637#
3638# This code is distributed in the hope that it will be useful, but WITHOUT
3639# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3640# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3641# version 2 for more details (a copy is included in the LICENSE file that
3642# accompanied this code).
3643#
3644# You should have received a copy of the GNU General Public License version
3645# 2 along with this work; if not, write to the Free Software Foundation,
3646# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3647#
3648# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3649# or visit www.oracle.com if you need additional information or have any
3650# questions.
3651#
3652
3653########################################################################
3654# This file handles detection of the Boot JDK. The Boot JDK detection
3655# process has been developed as a response to solve a complex real-world
3656# problem. Initially, it was simple, but it has grown as platform after
3657# platform, idiosyncracy after idiosyncracy has been supported.
3658#
3659# The basic idea is this:
3660# 1) You need an acceptable *) JDK to use as a Boot JDK
3661# 2) There are several ways to locate a JDK, that are mostly platform
3662#    dependent **)
3663# 3) You can have multiple JDKs installed
3664# 4) If possible, configure should try to dig out an acceptable JDK
3665#    automatically, without having to resort to command-line options
3666#
3667# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3668#     javac) and not a JRE, etc.
3669#
3670# **) On Windows we typically use a well-known path.
3671#     On MacOSX we typically use the tool java_home.
3672#     On Linux we typically find javac in the $PATH, and then follow a
3673#     chain of symlinks that often ends up in a real JDK.
3674#
3675# This leads to the code where we check in different ways to locate a
3676# JDK, and if one is found, check if it is acceptable. If not, we print
3677# our reasons for rejecting it (useful when debugging non-working
3678# configure situations) and continue checking the next one.
3679########################################################################
3680
3681# Execute the check given as argument, and verify the result
3682# If the Boot JDK was previously found, do nothing
3683# $1 A command line (typically autoconf macro) to execute
3684
3685
3686# Test: Is bootjdk explicitely set by command line arguments?
3687
3688
3689# Test: Is bootjdk available from builddeps?
3690
3691
3692# Test: Is $JAVA_HOME set?
3693
3694
3695# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3696
3697
3698# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3699# $1: Argument to the java_home binary (optional)
3700
3701
3702# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3703
3704
3705# Look for a jdk in the given path. If there are multiple, try to select the newest.
3706# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3707# $1 = Path to directory containing jdk installations.
3708# $2 = String to append to the found JDK directory to get the proper JDK home
3709
3710
3711# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3712# environmental variable as base for where to look.
3713# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3714
3715
3716# Test: Is there a JDK installed in default, well-known locations?
3717
3718
3719# Check that a command-line tool in the Boot JDK is correct
3720# $1 = name of variable to assign
3721# $2 = name of binary
3722
3723
3724###############################################################################
3725#
3726# We need a Boot JDK to bootstrap the build.
3727#
3728
3729
3730
3731
3732
3733#
3734# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3735# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3736#
3737# This code is free software; you can redistribute it and/or modify it
3738# under the terms of the GNU General Public License version 2 only, as
3739# published by the Free Software Foundation.  Oracle designates this
3740# particular file as subject to the "Classpath" exception as provided
3741# by Oracle in the LICENSE file that accompanied this code.
3742#
3743# This code is distributed in the hope that it will be useful, but WITHOUT
3744# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3745# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3746# version 2 for more details (a copy is included in the LICENSE file that
3747# accompanied this code).
3748#
3749# You should have received a copy of the GNU General Public License version
3750# 2 along with this work; if not, write to the Free Software Foundation,
3751# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3752#
3753# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3754# or visit www.oracle.com if you need additional information or have any
3755# questions.
3756#
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777#
3778# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3779# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3780#
3781# This code is free software; you can redistribute it and/or modify it
3782# under the terms of the GNU General Public License version 2 only, as
3783# published by the Free Software Foundation.  Oracle designates this
3784# particular file as subject to the "Classpath" exception as provided
3785# by Oracle in the LICENSE file that accompanied this code.
3786#
3787# This code is distributed in the hope that it will be useful, but WITHOUT
3788# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3789# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3790# version 2 for more details (a copy is included in the LICENSE file that
3791# accompanied this code).
3792#
3793# You should have received a copy of the GNU General Public License version
3794# 2 along with this work; if not, write to the Free Software Foundation,
3795# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3796#
3797# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3798# or visit www.oracle.com if you need additional information or have any
3799# questions.
3800#
3801
3802
3803
3804
3805
3806# Documentation on common flags used for solstudio in HIGHEST.
3807#
3808# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3809#          done with care, there are some assumptions below that need to
3810#          be understood about the use of pointers, and IEEE behavior.
3811#
3812# -fns: Use non-standard floating point mode (not IEEE 754)
3813# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3814# -fsingle: Use single precision floating point with 'float'
3815# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3816#   (Source with excessing pointer casting and data access with mixed
3817#    pointer types are not recommended)
3818# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3819#   (If you expect perfect errno behavior, do not use this)
3820# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3821# -xrestrict: Pointer parameters to functions do not overlap
3822#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3823#    If you pass in multiple pointers to the same data, do not use this)
3824# -xlibmil: Inline some library routines
3825#   (If you expect perfect errno behavior, do not use this)
3826# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3827#   (If you expect perfect errno behavior, do not use this)
3828#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3829
3830    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3831    # Bug?
3832    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3833    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3834    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3835    #fi
3836
3837
3838
3839
3840
3841# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3842#                                   [RUN-IF-FALSE])
3843# ------------------------------------------------------------
3844# Check that the c and c++ compilers support an argument
3845
3846
3847# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3848#                                    [RUN-IF-FALSE])
3849# ------------------------------------------------------------
3850# Check that the linker support an argument
3851
3852
3853
3854
3855#
3856# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3857# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3858#
3859# This code is free software; you can redistribute it and/or modify it
3860# under the terms of the GNU General Public License version 2 only, as
3861# published by the Free Software Foundation.  Oracle designates this
3862# particular file as subject to the "Classpath" exception as provided
3863# by Oracle in the LICENSE file that accompanied this code.
3864#
3865# This code is distributed in the hope that it will be useful, but WITHOUT
3866# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3867# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3868# version 2 for more details (a copy is included in the LICENSE file that
3869# accompanied this code).
3870#
3871# You should have received a copy of the GNU General Public License version
3872# 2 along with this work; if not, write to the Free Software Foundation,
3873# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3874#
3875# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3876# or visit www.oracle.com if you need additional information or have any
3877# questions.
3878#
3879
3880
3881
3882
3883
3884cygwin_help() {
3885  case $1 in
3886    unzip)
3887      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3888      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3889      ;;
3890    zip)
3891      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3892      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3893      ;;
3894    make)
3895      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3896      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3897      ;;
3898    freetype)
3899      HELP_MSG="
3900The freetype library can now be build during the configure process.
3901Download the freetype sources and unpack them into an arbitrary directory:
3902
3903wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3904tar -xzf freetype-2.5.3.tar.gz
3905
3906Then run configure with '--with-freetype-src=<freetype_src>'. This will
3907automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3908builds or into '<freetype_src>/lib32' for 32-bit builds.
3909Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3910and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3911      ;;
3912  esac
3913}
3914
3915msys_help() {
3916  PKGHANDLER_COMMAND=""
3917}
3918
3919apt_help() {
3920  case $1 in
3921    devkit)
3922      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3923    openjdk)
3924      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3925    alsa)
3926      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3927    cups)
3928      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3929    freetype)
3930      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3931    pulse)
3932      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3933    x11)
3934      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3935    ccache)
3936      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3937  esac
3938}
3939
3940yum_help() {
3941  case $1 in
3942    devkit)
3943      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3944    openjdk)
3945      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3946    alsa)
3947      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3948    cups)
3949      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3950    freetype)
3951      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3952    pulse)
3953      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3954    x11)
3955      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3956    ccache)
3957      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3958  esac
3959}
3960
3961port_help() {
3962  PKGHANDLER_COMMAND=""
3963}
3964
3965pkgutil_help() {
3966  PKGHANDLER_COMMAND=""
3967}
3968
3969pkgadd_help() {
3970  PKGHANDLER_COMMAND=""
3971}
3972
3973# This function will check if we're called from the "configure" wrapper while
3974# printing --help. If so, we will print out additional information that can
3975# only be extracted within the autoconf script, and then exit. This must be
3976# called at the very beginning in configure.ac.
3977
3978
3979
3980
3981
3982
3983#
3984# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3985# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3986#
3987# This code is free software; you can redistribute it and/or modify it
3988# under the terms of the GNU General Public License version 2 only, as
3989# published by the Free Software Foundation.  Oracle designates this
3990# particular file as subject to the "Classpath" exception as provided
3991# by Oracle in the LICENSE file that accompanied this code.
3992#
3993# This code is distributed in the hope that it will be useful, but WITHOUT
3994# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3995# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3996# version 2 for more details (a copy is included in the LICENSE file that
3997# accompanied this code).
3998#
3999# You should have received a copy of the GNU General Public License version
4000# 2 along with this work; if not, write to the Free Software Foundation,
4001# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4002#
4003# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4004# or visit www.oracle.com if you need additional information or have any
4005# questions.
4006#
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017###############################################################################
4018#
4019# Should we build only OpenJDK even if closed sources are present?
4020#
4021
4022
4023
4024
4025###############################################################################
4026#
4027# Setup version numbers
4028#
4029
4030
4031
4032
4033
4034
4035#
4036# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4037# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4038#
4039# This code is free software; you can redistribute it and/or modify it
4040# under the terms of the GNU General Public License version 2 only, as
4041# published by the Free Software Foundation.  Oracle designates this
4042# particular file as subject to the "Classpath" exception as provided
4043# by Oracle in the LICENSE file that accompanied this code.
4044#
4045# This code is distributed in the hope that it will be useful, but WITHOUT
4046# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4047# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4048# version 2 for more details (a copy is included in the LICENSE file that
4049# accompanied this code).
4050#
4051# You should have received a copy of the GNU General Public License version
4052# 2 along with this work; if not, write to the Free Software Foundation,
4053# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4054#
4055# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4056# or visit www.oracle.com if you need additional information or have any
4057# questions.
4058#
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080#
4081# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4082# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4083#
4084# This code is free software; you can redistribute it and/or modify it
4085# under the terms of the GNU General Public License version 2 only, as
4086# published by the Free Software Foundation.  Oracle designates this
4087# particular file as subject to the "Classpath" exception as provided
4088# by Oracle in the LICENSE file that accompanied this code.
4089#
4090# This code is distributed in the hope that it will be useful, but WITHOUT
4091# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4092# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4093# version 2 for more details (a copy is included in the LICENSE file that
4094# accompanied this code).
4095#
4096# You should have received a copy of the GNU General Public License version
4097# 2 along with this work; if not, write to the Free Software Foundation,
4098# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4099#
4100# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4101# or visit www.oracle.com if you need additional information or have any
4102# questions.
4103#
4104
4105# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4106# Converts autoconf style CPU name to OpenJDK style, into
4107# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4108
4109
4110# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4111# Converts autoconf style OS name to OpenJDK style, into
4112# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4113
4114
4115# Expects $host_os $host_cpu $build_os and $build_cpu
4116# and $with_target_bits to have been setup!
4117#
4118# Translate the standard triplet(quadruplet) definition
4119# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4120# OPENJDK_BUILD_OS, etc.
4121
4122
4123# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4124# accordingly. Must be done after setting up build and target system, but before
4125# doing anything else with these values.
4126
4127
4128# Setup the legacy variables, for controlling the old makefiles.
4129#
4130
4131
4132
4133
4134#%%% Build and target systems %%%
4135
4136
4137
4138
4139# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4140# Add -mX to various FLAGS variables.
4141
4142
4143
4144
4145
4146
4147#
4148# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4149# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4150#
4151# This code is free software; you can redistribute it and/or modify it
4152# under the terms of the GNU General Public License version 2 only, as
4153# published by the Free Software Foundation.  Oracle designates this
4154# particular file as subject to the "Classpath" exception as provided
4155# by Oracle in the LICENSE file that accompanied this code.
4156#
4157# This code is distributed in the hope that it will be useful, but WITHOUT
4158# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4159# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4160# version 2 for more details (a copy is included in the LICENSE file that
4161# accompanied this code).
4162#
4163# You should have received a copy of the GNU General Public License version
4164# 2 along with this work; if not, write to the Free Software Foundation,
4165# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4166#
4167# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4168# or visit www.oracle.com if you need additional information or have any
4169# questions.
4170#
4171
4172
4173
4174
4175
4176
4177
4178
4179#
4180# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4181# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4182#
4183# This code is free software; you can redistribute it and/or modify it
4184# under the terms of the GNU General Public License version 2 only, as
4185# published by the Free Software Foundation.  Oracle designates this
4186# particular file as subject to the "Classpath" exception as provided
4187# by Oracle in the LICENSE file that accompanied this code.
4188#
4189# This code is distributed in the hope that it will be useful, but WITHOUT
4190# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4191# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4192# version 2 for more details (a copy is included in the LICENSE file that
4193# accompanied this code).
4194#
4195# You should have received a copy of the GNU General Public License version
4196# 2 along with this work; if not, write to the Free Software Foundation,
4197# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4198#
4199# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4200# or visit www.oracle.com if you need additional information or have any
4201# questions.
4202#
4203
4204########################################################################
4205# This file is responsible for detecting, verifying and setting up the
4206# toolchain, i.e. the compiler, linker and related utilities. It will setup
4207# proper paths to the binaries, but it will not setup any flags.
4208#
4209# The binaries used is determined by the toolchain type, which is the family of
4210# compilers and related tools that are used.
4211########################################################################
4212
4213
4214# All valid toolchains, regardless of platform (used by help.m4)
4215VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4216
4217# These toolchains are valid on different platforms
4218VALID_TOOLCHAINS_linux="gcc clang"
4219VALID_TOOLCHAINS_solaris="solstudio"
4220VALID_TOOLCHAINS_macosx="gcc clang"
4221VALID_TOOLCHAINS_aix="xlc"
4222VALID_TOOLCHAINS_windows="microsoft"
4223
4224# Toolchain descriptions
4225TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4226TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4227TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4228TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4229TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4230
4231# Setup a number of variables describing how native output files are
4232# named on this platform/toolchain.
4233
4234
4235# Determine which toolchain type to use, and make sure it is valid for this
4236# platform. Setup various information about the selected toolchain.
4237
4238
4239# Before we start detecting the toolchain executables, we might need some
4240# special setup, e.g. additional paths etc.
4241
4242
4243# Restore path, etc
4244
4245
4246# Check if a compiler is of the toolchain type we expect, and save the version
4247# information from it. If the compiler does not match the expected type,
4248# this function will abort using AC_MSG_ERROR. If it matches, the version will
4249# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4250# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4251#
4252# $1 = compiler to test (CC or CXX)
4253# $2 = human readable name of compiler (C or C++)
4254
4255
4256# Try to locate the given C or C++ compiler in the path, or otherwise.
4257#
4258# $1 = compiler to test (CC or CXX)
4259# $2 = human readable name of compiler (C or C++)
4260# $3 = list of compiler names to search for
4261
4262
4263# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4264# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4265# archiver (AR). Verify that the compilers are correct according to the
4266# toolchain type.
4267
4268
4269# Setup additional tools that is considered a part of the toolchain, but not the
4270# core part. Many of these are highly platform-specific and do not exist,
4271# and/or are not needed on all platforms.
4272
4273
4274# Setup the build tools (i.e, the compiler and linker used to build programs
4275# that should be run on the build platform, not the target platform, as a build
4276# helper). Since the non-cross-compile case uses the normal, target compilers
4277# for this, we can only do this after these have been setup.
4278
4279
4280# Setup legacy variables that are still needed as alternative ways to refer to
4281# parts of the toolchain.
4282
4283
4284# Do some additional checks on the detected tools.
4285
4286
4287# Setup the JTReg Regression Test Harness.
4288
4289
4290#
4291# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4292# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4293#
4294# This code is free software; you can redistribute it and/or modify it
4295# under the terms of the GNU General Public License version 2 only, as
4296# published by the Free Software Foundation.  Oracle designates this
4297# particular file as subject to the "Classpath" exception as provided
4298# by Oracle in the LICENSE file that accompanied this code.
4299#
4300# This code is distributed in the hope that it will be useful, but WITHOUT
4301# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4302# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4303# version 2 for more details (a copy is included in the LICENSE file that
4304# accompanied this code).
4305#
4306# You should have received a copy of the GNU General Public License version
4307# 2 along with this work; if not, write to the Free Software Foundation,
4308# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4309#
4310# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4311# or visit www.oracle.com if you need additional information or have any
4312# questions.
4313#
4314
4315################################################################################
4316
4317VALID_VS_VERSIONS="2010 2012 2013"
4318
4319VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4320VS_VERSION_INTERNAL_2010=100
4321VS_MSVCR_2010=msvcr100.dll
4322# We don't use msvcp on Visual Studio 2010
4323#VS_MSVCP_2010=msvcp100.dll
4324VS_ENVVAR_2010="VS100COMNTOOLS"
4325VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4326VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4327VS_VS_PLATFORM_NAME_2010="v100"
4328VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4329
4330VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4331VS_VERSION_INTERNAL_2012=110
4332VS_MSVCR_2012=msvcr110.dll
4333VS_MSVCP_2012=msvcp110.dll
4334VS_ENVVAR_2012="VS110COMNTOOLS"
4335VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4336VS_SDK_INSTALLDIR_2012=
4337VS_VS_PLATFORM_NAME_2012="v110"
4338VS_SDK_PLATFORM_NAME_2012=
4339
4340VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4341VS_VERSION_INTERNAL_2013=120
4342VS_MSVCR_2013=msvcr120.dll
4343VS_MSVCP_2013=msvcp120.dll
4344VS_ENVVAR_2013="VS120COMNTOOLS"
4345VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4346VS_SDK_INSTALLDIR_2013=
4347VS_VS_PLATFORM_NAME_2013="v120"
4348VS_SDK_PLATFORM_NAME_2013=
4349
4350################################################################################
4351
4352
4353
4354################################################################################
4355
4356
4357
4358################################################################################
4359# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4360# build environment and assigns it to VS_ENV_CMD
4361
4362
4363################################################################################
4364
4365
4366
4367################################################################################
4368# Check if the VS env variables were setup prior to running configure.
4369# If not, then find vcvarsall.bat and run it automatically, and integrate
4370# the set env variables into the spec file.
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384# This line needs to be here, verbatim, after all includes and the dummy hook
4385# definitions. It is replaced with custom functionality when building
4386# custom sources.
4387#CUSTOM_AUTOCONF_INCLUDE
4388
4389# Do not change or remove the following line, it is needed for consistency checks:
4390DATE_WHEN_GENERATED=1421420310
4391
4392###############################################################################
4393#
4394# Initialization / Boot-strapping
4395#
4396# The bootstrapping process needs to solve the "chicken or the egg" problem,
4397# thus it jumps back and forth, each time gaining something needed later on.
4398#
4399###############################################################################
4400
4401# If we are requested to print additional help, do that and then exit.
4402# This must be the very first call.
4403
4404  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4405    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4406    $PRINTF "Which are valid to use depends on the build platform.\n"
4407    for toolchain in $VALID_TOOLCHAINS_all; do
4408      # Use indirect variable referencing
4409      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4410      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4411      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4412    done
4413
4414    # And now exit directly
4415    exit 0
4416  fi
4417
4418
4419# Basic initialization that must happen first of all in the normal process.
4420
4421  # Save the original command line. This is passed to us by the wrapper configure script.
4422
4423  DATE_WHEN_CONFIGURED=`LANG=C date`
4424
4425  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4426$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4427  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4428$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4429
4430
4431  # Start with tools that do not need have cross compilation support
4432  # and can be expected to be found in the default PATH. These tools are
4433  # used by configure. Nor are these tools expected to be found in the
4434  # devkit from the builddeps server either, since they are
4435  # needed to download the devkit.
4436
4437  # First are all the simple required tools.
4438
4439
4440
4441  # Publish this variable in the help.
4442
4443
4444  if test "x$BASENAME" = x; then
4445    # The variable is not set by user, try to locate tool using the code snippet
4446    for ac_prog in basename
4447do
4448  # Extract the first word of "$ac_prog", so it can be a program name with args.
4449set dummy $ac_prog; ac_word=$2
4450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4451$as_echo_n "checking for $ac_word... " >&6; }
4452if ${ac_cv_path_BASENAME+:} false; then :
4453  $as_echo_n "(cached) " >&6
4454else
4455  case $BASENAME in
4456  [\\/]* | ?:[\\/]*)
4457  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4458  ;;
4459  *)
4460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4461for as_dir in $PATH
4462do
4463  IFS=$as_save_IFS
4464  test -z "$as_dir" && as_dir=.
4465    for ac_exec_ext in '' $ac_executable_extensions; do
4466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4467    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4469    break 2
4470  fi
4471done
4472  done
4473IFS=$as_save_IFS
4474
4475  ;;
4476esac
4477fi
4478BASENAME=$ac_cv_path_BASENAME
4479if test -n "$BASENAME"; then
4480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4481$as_echo "$BASENAME" >&6; }
4482else
4483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4484$as_echo "no" >&6; }
4485fi
4486
4487
4488  test -n "$BASENAME" && break
4489done
4490
4491  else
4492    # The variable is set, but is it from the command line or the environment?
4493
4494    # Try to remove the string !BASENAME! from our list.
4495    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4496    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4497      # If it failed, the variable was not from the command line. Ignore it,
4498      # but warn the user (except for BASH, which is always set by the calling BASH).
4499      if test "xBASENAME" != xBASH; then
4500        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4501$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4502      fi
4503      # Try to locate tool using the code snippet
4504      for ac_prog in basename
4505do
4506  # Extract the first word of "$ac_prog", so it can be a program name with args.
4507set dummy $ac_prog; ac_word=$2
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4509$as_echo_n "checking for $ac_word... " >&6; }
4510if ${ac_cv_path_BASENAME+:} false; then :
4511  $as_echo_n "(cached) " >&6
4512else
4513  case $BASENAME in
4514  [\\/]* | ?:[\\/]*)
4515  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4516  ;;
4517  *)
4518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4519for as_dir in $PATH
4520do
4521  IFS=$as_save_IFS
4522  test -z "$as_dir" && as_dir=.
4523    for ac_exec_ext in '' $ac_executable_extensions; do
4524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4525    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4527    break 2
4528  fi
4529done
4530  done
4531IFS=$as_save_IFS
4532
4533  ;;
4534esac
4535fi
4536BASENAME=$ac_cv_path_BASENAME
4537if test -n "$BASENAME"; then
4538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4539$as_echo "$BASENAME" >&6; }
4540else
4541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4542$as_echo "no" >&6; }
4543fi
4544
4545
4546  test -n "$BASENAME" && break
4547done
4548
4549    else
4550      # If it succeeded, then it was overridden by the user. We will use it
4551      # for the tool.
4552
4553      # First remove it from the list of overridden variables, so we can test
4554      # for unknown variables in the end.
4555      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4556
4557      # Check if the provided tool contains a complete path.
4558      tool_specified="$BASENAME"
4559      tool_basename="${tool_specified##*/}"
4560      if test "x$tool_basename" = "x$tool_specified"; then
4561        # A command without a complete path is provided, search $PATH.
4562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4563$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4564        # Extract the first word of "$tool_basename", so it can be a program name with args.
4565set dummy $tool_basename; ac_word=$2
4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567$as_echo_n "checking for $ac_word... " >&6; }
4568if ${ac_cv_path_BASENAME+:} false; then :
4569  $as_echo_n "(cached) " >&6
4570else
4571  case $BASENAME in
4572  [\\/]* | ?:[\\/]*)
4573  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4574  ;;
4575  *)
4576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4577for as_dir in $PATH
4578do
4579  IFS=$as_save_IFS
4580  test -z "$as_dir" && as_dir=.
4581    for ac_exec_ext in '' $ac_executable_extensions; do
4582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4583    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4585    break 2
4586  fi
4587done
4588  done
4589IFS=$as_save_IFS
4590
4591  ;;
4592esac
4593fi
4594BASENAME=$ac_cv_path_BASENAME
4595if test -n "$BASENAME"; then
4596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4597$as_echo "$BASENAME" >&6; }
4598else
4599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4600$as_echo "no" >&6; }
4601fi
4602
4603
4604        if test "x$BASENAME" = x; then
4605          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4606        fi
4607      else
4608        # Otherwise we believe it is a complete path. Use it as it is.
4609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4610$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4611        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4612$as_echo_n "checking for BASENAME... " >&6; }
4613        if test ! -x "$tool_specified"; then
4614          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4615$as_echo "not found" >&6; }
4616          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4617        fi
4618        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4619$as_echo "$tool_specified" >&6; }
4620      fi
4621    fi
4622  fi
4623
4624
4625
4626  if test "x$BASENAME" = x; then
4627    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4628  fi
4629
4630
4631
4632
4633
4634  # Publish this variable in the help.
4635
4636
4637  if test "x$BASH" = x; then
4638    # The variable is not set by user, try to locate tool using the code snippet
4639    for ac_prog in bash
4640do
4641  # Extract the first word of "$ac_prog", so it can be a program name with args.
4642set dummy $ac_prog; ac_word=$2
4643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4644$as_echo_n "checking for $ac_word... " >&6; }
4645if ${ac_cv_path_BASH+:} false; then :
4646  $as_echo_n "(cached) " >&6
4647else
4648  case $BASH in
4649  [\\/]* | ?:[\\/]*)
4650  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4651  ;;
4652  *)
4653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4654for as_dir in $PATH
4655do
4656  IFS=$as_save_IFS
4657  test -z "$as_dir" && as_dir=.
4658    for ac_exec_ext in '' $ac_executable_extensions; do
4659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4660    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4662    break 2
4663  fi
4664done
4665  done
4666IFS=$as_save_IFS
4667
4668  ;;
4669esac
4670fi
4671BASH=$ac_cv_path_BASH
4672if test -n "$BASH"; then
4673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4674$as_echo "$BASH" >&6; }
4675else
4676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4677$as_echo "no" >&6; }
4678fi
4679
4680
4681  test -n "$BASH" && break
4682done
4683
4684  else
4685    # The variable is set, but is it from the command line or the environment?
4686
4687    # Try to remove the string !BASH! from our list.
4688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4690      # If it failed, the variable was not from the command line. Ignore it,
4691      # but warn the user (except for BASH, which is always set by the calling BASH).
4692      if test "xBASH" != xBASH; then
4693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4694$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4695      fi
4696      # Try to locate tool using the code snippet
4697      for ac_prog in bash
4698do
4699  # Extract the first word of "$ac_prog", so it can be a program name with args.
4700set dummy $ac_prog; ac_word=$2
4701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4702$as_echo_n "checking for $ac_word... " >&6; }
4703if ${ac_cv_path_BASH+:} false; then :
4704  $as_echo_n "(cached) " >&6
4705else
4706  case $BASH in
4707  [\\/]* | ?:[\\/]*)
4708  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4709  ;;
4710  *)
4711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4712for as_dir in $PATH
4713do
4714  IFS=$as_save_IFS
4715  test -z "$as_dir" && as_dir=.
4716    for ac_exec_ext in '' $ac_executable_extensions; do
4717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4718    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4720    break 2
4721  fi
4722done
4723  done
4724IFS=$as_save_IFS
4725
4726  ;;
4727esac
4728fi
4729BASH=$ac_cv_path_BASH
4730if test -n "$BASH"; then
4731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4732$as_echo "$BASH" >&6; }
4733else
4734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4735$as_echo "no" >&6; }
4736fi
4737
4738
4739  test -n "$BASH" && break
4740done
4741
4742    else
4743      # If it succeeded, then it was overridden by the user. We will use it
4744      # for the tool.
4745
4746      # First remove it from the list of overridden variables, so we can test
4747      # for unknown variables in the end.
4748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4749
4750      # Check if the provided tool contains a complete path.
4751      tool_specified="$BASH"
4752      tool_basename="${tool_specified##*/}"
4753      if test "x$tool_basename" = "x$tool_specified"; then
4754        # A command without a complete path is provided, search $PATH.
4755        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4756$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4757        # Extract the first word of "$tool_basename", so it can be a program name with args.
4758set dummy $tool_basename; ac_word=$2
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760$as_echo_n "checking for $ac_word... " >&6; }
4761if ${ac_cv_path_BASH+:} false; then :
4762  $as_echo_n "(cached) " >&6
4763else
4764  case $BASH in
4765  [\\/]* | ?:[\\/]*)
4766  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4767  ;;
4768  *)
4769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in $PATH
4771do
4772  IFS=$as_save_IFS
4773  test -z "$as_dir" && as_dir=.
4774    for ac_exec_ext in '' $ac_executable_extensions; do
4775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4776    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4778    break 2
4779  fi
4780done
4781  done
4782IFS=$as_save_IFS
4783
4784  ;;
4785esac
4786fi
4787BASH=$ac_cv_path_BASH
4788if test -n "$BASH"; then
4789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4790$as_echo "$BASH" >&6; }
4791else
4792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793$as_echo "no" >&6; }
4794fi
4795
4796
4797        if test "x$BASH" = x; then
4798          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4799        fi
4800      else
4801        # Otherwise we believe it is a complete path. Use it as it is.
4802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4803$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4805$as_echo_n "checking for BASH... " >&6; }
4806        if test ! -x "$tool_specified"; then
4807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4808$as_echo "not found" >&6; }
4809          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4810        fi
4811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4812$as_echo "$tool_specified" >&6; }
4813      fi
4814    fi
4815  fi
4816
4817
4818
4819  if test "x$BASH" = x; then
4820    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4821  fi
4822
4823
4824
4825
4826
4827  # Publish this variable in the help.
4828
4829
4830  if test "x$CAT" = x; then
4831    # The variable is not set by user, try to locate tool using the code snippet
4832    for ac_prog in cat
4833do
4834  # Extract the first word of "$ac_prog", so it can be a program name with args.
4835set dummy $ac_prog; ac_word=$2
4836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4837$as_echo_n "checking for $ac_word... " >&6; }
4838if ${ac_cv_path_CAT+:} false; then :
4839  $as_echo_n "(cached) " >&6
4840else
4841  case $CAT in
4842  [\\/]* | ?:[\\/]*)
4843  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4844  ;;
4845  *)
4846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4847for as_dir in $PATH
4848do
4849  IFS=$as_save_IFS
4850  test -z "$as_dir" && as_dir=.
4851    for ac_exec_ext in '' $ac_executable_extensions; do
4852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4853    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4855    break 2
4856  fi
4857done
4858  done
4859IFS=$as_save_IFS
4860
4861  ;;
4862esac
4863fi
4864CAT=$ac_cv_path_CAT
4865if test -n "$CAT"; then
4866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4867$as_echo "$CAT" >&6; }
4868else
4869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4870$as_echo "no" >&6; }
4871fi
4872
4873
4874  test -n "$CAT" && break
4875done
4876
4877  else
4878    # The variable is set, but is it from the command line or the environment?
4879
4880    # Try to remove the string !CAT! from our list.
4881    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4882    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4883      # If it failed, the variable was not from the command line. Ignore it,
4884      # but warn the user (except for BASH, which is always set by the calling BASH).
4885      if test "xCAT" != xBASH; then
4886        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4887$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4888      fi
4889      # Try to locate tool using the code snippet
4890      for ac_prog in cat
4891do
4892  # Extract the first word of "$ac_prog", so it can be a program name with args.
4893set dummy $ac_prog; ac_word=$2
4894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4895$as_echo_n "checking for $ac_word... " >&6; }
4896if ${ac_cv_path_CAT+:} false; then :
4897  $as_echo_n "(cached) " >&6
4898else
4899  case $CAT in
4900  [\\/]* | ?:[\\/]*)
4901  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4902  ;;
4903  *)
4904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907  IFS=$as_save_IFS
4908  test -z "$as_dir" && as_dir=.
4909    for ac_exec_ext in '' $ac_executable_extensions; do
4910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4911    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4913    break 2
4914  fi
4915done
4916  done
4917IFS=$as_save_IFS
4918
4919  ;;
4920esac
4921fi
4922CAT=$ac_cv_path_CAT
4923if test -n "$CAT"; then
4924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4925$as_echo "$CAT" >&6; }
4926else
4927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4928$as_echo "no" >&6; }
4929fi
4930
4931
4932  test -n "$CAT" && break
4933done
4934
4935    else
4936      # If it succeeded, then it was overridden by the user. We will use it
4937      # for the tool.
4938
4939      # First remove it from the list of overridden variables, so we can test
4940      # for unknown variables in the end.
4941      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4942
4943      # Check if the provided tool contains a complete path.
4944      tool_specified="$CAT"
4945      tool_basename="${tool_specified##*/}"
4946      if test "x$tool_basename" = "x$tool_specified"; then
4947        # A command without a complete path is provided, search $PATH.
4948        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4949$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4950        # Extract the first word of "$tool_basename", so it can be a program name with args.
4951set dummy $tool_basename; ac_word=$2
4952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4953$as_echo_n "checking for $ac_word... " >&6; }
4954if ${ac_cv_path_CAT+:} false; then :
4955  $as_echo_n "(cached) " >&6
4956else
4957  case $CAT in
4958  [\\/]* | ?:[\\/]*)
4959  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4960  ;;
4961  *)
4962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4963for as_dir in $PATH
4964do
4965  IFS=$as_save_IFS
4966  test -z "$as_dir" && as_dir=.
4967    for ac_exec_ext in '' $ac_executable_extensions; do
4968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4969    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4971    break 2
4972  fi
4973done
4974  done
4975IFS=$as_save_IFS
4976
4977  ;;
4978esac
4979fi
4980CAT=$ac_cv_path_CAT
4981if test -n "$CAT"; then
4982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4983$as_echo "$CAT" >&6; }
4984else
4985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4986$as_echo "no" >&6; }
4987fi
4988
4989
4990        if test "x$CAT" = x; then
4991          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4992        fi
4993      else
4994        # Otherwise we believe it is a complete path. Use it as it is.
4995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4996$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4997        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4998$as_echo_n "checking for CAT... " >&6; }
4999        if test ! -x "$tool_specified"; then
5000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5001$as_echo "not found" >&6; }
5002          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5003        fi
5004        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5005$as_echo "$tool_specified" >&6; }
5006      fi
5007    fi
5008  fi
5009
5010
5011
5012  if test "x$CAT" = x; then
5013    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5014  fi
5015
5016
5017
5018
5019
5020  # Publish this variable in the help.
5021
5022
5023  if test "x$CHMOD" = x; then
5024    # The variable is not set by user, try to locate tool using the code snippet
5025    for ac_prog in chmod
5026do
5027  # Extract the first word of "$ac_prog", so it can be a program name with args.
5028set dummy $ac_prog; ac_word=$2
5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5030$as_echo_n "checking for $ac_word... " >&6; }
5031if ${ac_cv_path_CHMOD+:} false; then :
5032  $as_echo_n "(cached) " >&6
5033else
5034  case $CHMOD in
5035  [\\/]* | ?:[\\/]*)
5036  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5037  ;;
5038  *)
5039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5040for as_dir in $PATH
5041do
5042  IFS=$as_save_IFS
5043  test -z "$as_dir" && as_dir=.
5044    for ac_exec_ext in '' $ac_executable_extensions; do
5045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5046    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5048    break 2
5049  fi
5050done
5051  done
5052IFS=$as_save_IFS
5053
5054  ;;
5055esac
5056fi
5057CHMOD=$ac_cv_path_CHMOD
5058if test -n "$CHMOD"; then
5059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5060$as_echo "$CHMOD" >&6; }
5061else
5062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5063$as_echo "no" >&6; }
5064fi
5065
5066
5067  test -n "$CHMOD" && break
5068done
5069
5070  else
5071    # The variable is set, but is it from the command line or the environment?
5072
5073    # Try to remove the string !CHMOD! from our list.
5074    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5075    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5076      # If it failed, the variable was not from the command line. Ignore it,
5077      # but warn the user (except for BASH, which is always set by the calling BASH).
5078      if test "xCHMOD" != xBASH; then
5079        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5080$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5081      fi
5082      # Try to locate tool using the code snippet
5083      for ac_prog in chmod
5084do
5085  # Extract the first word of "$ac_prog", so it can be a program name with args.
5086set dummy $ac_prog; ac_word=$2
5087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5088$as_echo_n "checking for $ac_word... " >&6; }
5089if ${ac_cv_path_CHMOD+:} false; then :
5090  $as_echo_n "(cached) " >&6
5091else
5092  case $CHMOD in
5093  [\\/]* | ?:[\\/]*)
5094  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5095  ;;
5096  *)
5097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5098for as_dir in $PATH
5099do
5100  IFS=$as_save_IFS
5101  test -z "$as_dir" && as_dir=.
5102    for ac_exec_ext in '' $ac_executable_extensions; do
5103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5104    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5106    break 2
5107  fi
5108done
5109  done
5110IFS=$as_save_IFS
5111
5112  ;;
5113esac
5114fi
5115CHMOD=$ac_cv_path_CHMOD
5116if test -n "$CHMOD"; then
5117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5118$as_echo "$CHMOD" >&6; }
5119else
5120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5121$as_echo "no" >&6; }
5122fi
5123
5124
5125  test -n "$CHMOD" && break
5126done
5127
5128    else
5129      # If it succeeded, then it was overridden by the user. We will use it
5130      # for the tool.
5131
5132      # First remove it from the list of overridden variables, so we can test
5133      # for unknown variables in the end.
5134      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5135
5136      # Check if the provided tool contains a complete path.
5137      tool_specified="$CHMOD"
5138      tool_basename="${tool_specified##*/}"
5139      if test "x$tool_basename" = "x$tool_specified"; then
5140        # A command without a complete path is provided, search $PATH.
5141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5142$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5143        # Extract the first word of "$tool_basename", so it can be a program name with args.
5144set dummy $tool_basename; ac_word=$2
5145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5146$as_echo_n "checking for $ac_word... " >&6; }
5147if ${ac_cv_path_CHMOD+:} false; then :
5148  $as_echo_n "(cached) " >&6
5149else
5150  case $CHMOD in
5151  [\\/]* | ?:[\\/]*)
5152  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5153  ;;
5154  *)
5155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5156for as_dir in $PATH
5157do
5158  IFS=$as_save_IFS
5159  test -z "$as_dir" && as_dir=.
5160    for ac_exec_ext in '' $ac_executable_extensions; do
5161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5162    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5164    break 2
5165  fi
5166done
5167  done
5168IFS=$as_save_IFS
5169
5170  ;;
5171esac
5172fi
5173CHMOD=$ac_cv_path_CHMOD
5174if test -n "$CHMOD"; then
5175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5176$as_echo "$CHMOD" >&6; }
5177else
5178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5179$as_echo "no" >&6; }
5180fi
5181
5182
5183        if test "x$CHMOD" = x; then
5184          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5185        fi
5186      else
5187        # Otherwise we believe it is a complete path. Use it as it is.
5188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5189$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5190        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5191$as_echo_n "checking for CHMOD... " >&6; }
5192        if test ! -x "$tool_specified"; then
5193          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5194$as_echo "not found" >&6; }
5195          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5196        fi
5197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5198$as_echo "$tool_specified" >&6; }
5199      fi
5200    fi
5201  fi
5202
5203
5204
5205  if test "x$CHMOD" = x; then
5206    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5207  fi
5208
5209
5210
5211
5212
5213  # Publish this variable in the help.
5214
5215
5216  if test "x$CMP" = x; then
5217    # The variable is not set by user, try to locate tool using the code snippet
5218    for ac_prog in cmp
5219do
5220  # Extract the first word of "$ac_prog", so it can be a program name with args.
5221set dummy $ac_prog; ac_word=$2
5222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5223$as_echo_n "checking for $ac_word... " >&6; }
5224if ${ac_cv_path_CMP+:} false; then :
5225  $as_echo_n "(cached) " >&6
5226else
5227  case $CMP in
5228  [\\/]* | ?:[\\/]*)
5229  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5230  ;;
5231  *)
5232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5233for as_dir in $PATH
5234do
5235  IFS=$as_save_IFS
5236  test -z "$as_dir" && as_dir=.
5237    for ac_exec_ext in '' $ac_executable_extensions; do
5238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5239    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5241    break 2
5242  fi
5243done
5244  done
5245IFS=$as_save_IFS
5246
5247  ;;
5248esac
5249fi
5250CMP=$ac_cv_path_CMP
5251if test -n "$CMP"; then
5252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5253$as_echo "$CMP" >&6; }
5254else
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5256$as_echo "no" >&6; }
5257fi
5258
5259
5260  test -n "$CMP" && break
5261done
5262
5263  else
5264    # The variable is set, but is it from the command line or the environment?
5265
5266    # Try to remove the string !CMP! from our list.
5267    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5268    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5269      # If it failed, the variable was not from the command line. Ignore it,
5270      # but warn the user (except for BASH, which is always set by the calling BASH).
5271      if test "xCMP" != xBASH; then
5272        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5273$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5274      fi
5275      # Try to locate tool using the code snippet
5276      for ac_prog in cmp
5277do
5278  # Extract the first word of "$ac_prog", so it can be a program name with args.
5279set dummy $ac_prog; ac_word=$2
5280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281$as_echo_n "checking for $ac_word... " >&6; }
5282if ${ac_cv_path_CMP+:} false; then :
5283  $as_echo_n "(cached) " >&6
5284else
5285  case $CMP in
5286  [\\/]* | ?:[\\/]*)
5287  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5288  ;;
5289  *)
5290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5291for as_dir in $PATH
5292do
5293  IFS=$as_save_IFS
5294  test -z "$as_dir" && as_dir=.
5295    for ac_exec_ext in '' $ac_executable_extensions; do
5296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5297    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5299    break 2
5300  fi
5301done
5302  done
5303IFS=$as_save_IFS
5304
5305  ;;
5306esac
5307fi
5308CMP=$ac_cv_path_CMP
5309if test -n "$CMP"; then
5310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5311$as_echo "$CMP" >&6; }
5312else
5313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5314$as_echo "no" >&6; }
5315fi
5316
5317
5318  test -n "$CMP" && break
5319done
5320
5321    else
5322      # If it succeeded, then it was overridden by the user. We will use it
5323      # for the tool.
5324
5325      # First remove it from the list of overridden variables, so we can test
5326      # for unknown variables in the end.
5327      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5328
5329      # Check if the provided tool contains a complete path.
5330      tool_specified="$CMP"
5331      tool_basename="${tool_specified##*/}"
5332      if test "x$tool_basename" = "x$tool_specified"; then
5333        # A command without a complete path is provided, search $PATH.
5334        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5335$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5336        # Extract the first word of "$tool_basename", so it can be a program name with args.
5337set dummy $tool_basename; ac_word=$2
5338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5339$as_echo_n "checking for $ac_word... " >&6; }
5340if ${ac_cv_path_CMP+:} false; then :
5341  $as_echo_n "(cached) " >&6
5342else
5343  case $CMP in
5344  [\\/]* | ?:[\\/]*)
5345  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5346  ;;
5347  *)
5348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5349for as_dir in $PATH
5350do
5351  IFS=$as_save_IFS
5352  test -z "$as_dir" && as_dir=.
5353    for ac_exec_ext in '' $ac_executable_extensions; do
5354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5355    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5357    break 2
5358  fi
5359done
5360  done
5361IFS=$as_save_IFS
5362
5363  ;;
5364esac
5365fi
5366CMP=$ac_cv_path_CMP
5367if test -n "$CMP"; then
5368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5369$as_echo "$CMP" >&6; }
5370else
5371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5372$as_echo "no" >&6; }
5373fi
5374
5375
5376        if test "x$CMP" = x; then
5377          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5378        fi
5379      else
5380        # Otherwise we believe it is a complete path. Use it as it is.
5381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5382$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5383        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5384$as_echo_n "checking for CMP... " >&6; }
5385        if test ! -x "$tool_specified"; then
5386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5387$as_echo "not found" >&6; }
5388          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5389        fi
5390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5391$as_echo "$tool_specified" >&6; }
5392      fi
5393    fi
5394  fi
5395
5396
5397
5398  if test "x$CMP" = x; then
5399    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5400  fi
5401
5402
5403
5404
5405
5406  # Publish this variable in the help.
5407
5408
5409  if test "x$COMM" = x; then
5410    # The variable is not set by user, try to locate tool using the code snippet
5411    for ac_prog in comm
5412do
5413  # Extract the first word of "$ac_prog", so it can be a program name with args.
5414set dummy $ac_prog; ac_word=$2
5415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416$as_echo_n "checking for $ac_word... " >&6; }
5417if ${ac_cv_path_COMM+:} false; then :
5418  $as_echo_n "(cached) " >&6
5419else
5420  case $COMM in
5421  [\\/]* | ?:[\\/]*)
5422  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5423  ;;
5424  *)
5425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426for as_dir in $PATH
5427do
5428  IFS=$as_save_IFS
5429  test -z "$as_dir" && as_dir=.
5430    for ac_exec_ext in '' $ac_executable_extensions; do
5431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5432    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434    break 2
5435  fi
5436done
5437  done
5438IFS=$as_save_IFS
5439
5440  ;;
5441esac
5442fi
5443COMM=$ac_cv_path_COMM
5444if test -n "$COMM"; then
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5446$as_echo "$COMM" >&6; }
5447else
5448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449$as_echo "no" >&6; }
5450fi
5451
5452
5453  test -n "$COMM" && break
5454done
5455
5456  else
5457    # The variable is set, but is it from the command line or the environment?
5458
5459    # Try to remove the string !COMM! from our list.
5460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5462      # If it failed, the variable was not from the command line. Ignore it,
5463      # but warn the user (except for BASH, which is always set by the calling BASH).
5464      if test "xCOMM" != xBASH; then
5465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5466$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5467      fi
5468      # Try to locate tool using the code snippet
5469      for ac_prog in comm
5470do
5471  # Extract the first word of "$ac_prog", so it can be a program name with args.
5472set dummy $ac_prog; ac_word=$2
5473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5474$as_echo_n "checking for $ac_word... " >&6; }
5475if ${ac_cv_path_COMM+:} false; then :
5476  $as_echo_n "(cached) " >&6
5477else
5478  case $COMM in
5479  [\\/]* | ?:[\\/]*)
5480  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5481  ;;
5482  *)
5483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5484for as_dir in $PATH
5485do
5486  IFS=$as_save_IFS
5487  test -z "$as_dir" && as_dir=.
5488    for ac_exec_ext in '' $ac_executable_extensions; do
5489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5490    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5492    break 2
5493  fi
5494done
5495  done
5496IFS=$as_save_IFS
5497
5498  ;;
5499esac
5500fi
5501COMM=$ac_cv_path_COMM
5502if test -n "$COMM"; then
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5504$as_echo "$COMM" >&6; }
5505else
5506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5507$as_echo "no" >&6; }
5508fi
5509
5510
5511  test -n "$COMM" && break
5512done
5513
5514    else
5515      # If it succeeded, then it was overridden by the user. We will use it
5516      # for the tool.
5517
5518      # First remove it from the list of overridden variables, so we can test
5519      # for unknown variables in the end.
5520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5521
5522      # Check if the provided tool contains a complete path.
5523      tool_specified="$COMM"
5524      tool_basename="${tool_specified##*/}"
5525      if test "x$tool_basename" = "x$tool_specified"; then
5526        # A command without a complete path is provided, search $PATH.
5527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5528$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5529        # Extract the first word of "$tool_basename", so it can be a program name with args.
5530set dummy $tool_basename; ac_word=$2
5531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5532$as_echo_n "checking for $ac_word... " >&6; }
5533if ${ac_cv_path_COMM+:} false; then :
5534  $as_echo_n "(cached) " >&6
5535else
5536  case $COMM in
5537  [\\/]* | ?:[\\/]*)
5538  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5539  ;;
5540  *)
5541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5542for as_dir in $PATH
5543do
5544  IFS=$as_save_IFS
5545  test -z "$as_dir" && as_dir=.
5546    for ac_exec_ext in '' $ac_executable_extensions; do
5547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5548    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5550    break 2
5551  fi
5552done
5553  done
5554IFS=$as_save_IFS
5555
5556  ;;
5557esac
5558fi
5559COMM=$ac_cv_path_COMM
5560if test -n "$COMM"; then
5561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5562$as_echo "$COMM" >&6; }
5563else
5564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5565$as_echo "no" >&6; }
5566fi
5567
5568
5569        if test "x$COMM" = x; then
5570          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5571        fi
5572      else
5573        # Otherwise we believe it is a complete path. Use it as it is.
5574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5575$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5577$as_echo_n "checking for COMM... " >&6; }
5578        if test ! -x "$tool_specified"; then
5579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5580$as_echo "not found" >&6; }
5581          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5582        fi
5583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5584$as_echo "$tool_specified" >&6; }
5585      fi
5586    fi
5587  fi
5588
5589
5590
5591  if test "x$COMM" = x; then
5592    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5593  fi
5594
5595
5596
5597
5598
5599  # Publish this variable in the help.
5600
5601
5602  if test "x$CP" = x; then
5603    # The variable is not set by user, try to locate tool using the code snippet
5604    for ac_prog in cp
5605do
5606  # Extract the first word of "$ac_prog", so it can be a program name with args.
5607set dummy $ac_prog; ac_word=$2
5608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5609$as_echo_n "checking for $ac_word... " >&6; }
5610if ${ac_cv_path_CP+:} false; then :
5611  $as_echo_n "(cached) " >&6
5612else
5613  case $CP in
5614  [\\/]* | ?:[\\/]*)
5615  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5616  ;;
5617  *)
5618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5619for as_dir in $PATH
5620do
5621  IFS=$as_save_IFS
5622  test -z "$as_dir" && as_dir=.
5623    for ac_exec_ext in '' $ac_executable_extensions; do
5624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5625    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5627    break 2
5628  fi
5629done
5630  done
5631IFS=$as_save_IFS
5632
5633  ;;
5634esac
5635fi
5636CP=$ac_cv_path_CP
5637if test -n "$CP"; then
5638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5639$as_echo "$CP" >&6; }
5640else
5641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5642$as_echo "no" >&6; }
5643fi
5644
5645
5646  test -n "$CP" && break
5647done
5648
5649  else
5650    # The variable is set, but is it from the command line or the environment?
5651
5652    # Try to remove the string !CP! from our list.
5653    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5654    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5655      # If it failed, the variable was not from the command line. Ignore it,
5656      # but warn the user (except for BASH, which is always set by the calling BASH).
5657      if test "xCP" != xBASH; then
5658        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5659$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5660      fi
5661      # Try to locate tool using the code snippet
5662      for ac_prog in cp
5663do
5664  # Extract the first word of "$ac_prog", so it can be a program name with args.
5665set dummy $ac_prog; ac_word=$2
5666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667$as_echo_n "checking for $ac_word... " >&6; }
5668if ${ac_cv_path_CP+:} false; then :
5669  $as_echo_n "(cached) " >&6
5670else
5671  case $CP in
5672  [\\/]* | ?:[\\/]*)
5673  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5674  ;;
5675  *)
5676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5677for as_dir in $PATH
5678do
5679  IFS=$as_save_IFS
5680  test -z "$as_dir" && as_dir=.
5681    for ac_exec_ext in '' $ac_executable_extensions; do
5682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5683    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5685    break 2
5686  fi
5687done
5688  done
5689IFS=$as_save_IFS
5690
5691  ;;
5692esac
5693fi
5694CP=$ac_cv_path_CP
5695if test -n "$CP"; then
5696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5697$as_echo "$CP" >&6; }
5698else
5699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5700$as_echo "no" >&6; }
5701fi
5702
5703
5704  test -n "$CP" && break
5705done
5706
5707    else
5708      # If it succeeded, then it was overridden by the user. We will use it
5709      # for the tool.
5710
5711      # First remove it from the list of overridden variables, so we can test
5712      # for unknown variables in the end.
5713      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5714
5715      # Check if the provided tool contains a complete path.
5716      tool_specified="$CP"
5717      tool_basename="${tool_specified##*/}"
5718      if test "x$tool_basename" = "x$tool_specified"; then
5719        # A command without a complete path is provided, search $PATH.
5720        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5721$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5722        # Extract the first word of "$tool_basename", so it can be a program name with args.
5723set dummy $tool_basename; ac_word=$2
5724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5725$as_echo_n "checking for $ac_word... " >&6; }
5726if ${ac_cv_path_CP+:} false; then :
5727  $as_echo_n "(cached) " >&6
5728else
5729  case $CP in
5730  [\\/]* | ?:[\\/]*)
5731  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5732  ;;
5733  *)
5734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5735for as_dir in $PATH
5736do
5737  IFS=$as_save_IFS
5738  test -z "$as_dir" && as_dir=.
5739    for ac_exec_ext in '' $ac_executable_extensions; do
5740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5741    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5743    break 2
5744  fi
5745done
5746  done
5747IFS=$as_save_IFS
5748
5749  ;;
5750esac
5751fi
5752CP=$ac_cv_path_CP
5753if test -n "$CP"; then
5754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5755$as_echo "$CP" >&6; }
5756else
5757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5758$as_echo "no" >&6; }
5759fi
5760
5761
5762        if test "x$CP" = x; then
5763          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5764        fi
5765      else
5766        # Otherwise we believe it is a complete path. Use it as it is.
5767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5768$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5769        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5770$as_echo_n "checking for CP... " >&6; }
5771        if test ! -x "$tool_specified"; then
5772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5773$as_echo "not found" >&6; }
5774          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5775        fi
5776        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5777$as_echo "$tool_specified" >&6; }
5778      fi
5779    fi
5780  fi
5781
5782
5783
5784  if test "x$CP" = x; then
5785    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5786  fi
5787
5788
5789
5790
5791
5792  # Publish this variable in the help.
5793
5794
5795  if test "x$CUT" = x; then
5796    # The variable is not set by user, try to locate tool using the code snippet
5797    for ac_prog in cut
5798do
5799  # Extract the first word of "$ac_prog", so it can be a program name with args.
5800set dummy $ac_prog; ac_word=$2
5801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5802$as_echo_n "checking for $ac_word... " >&6; }
5803if ${ac_cv_path_CUT+:} false; then :
5804  $as_echo_n "(cached) " >&6
5805else
5806  case $CUT in
5807  [\\/]* | ?:[\\/]*)
5808  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5809  ;;
5810  *)
5811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5812for as_dir in $PATH
5813do
5814  IFS=$as_save_IFS
5815  test -z "$as_dir" && as_dir=.
5816    for ac_exec_ext in '' $ac_executable_extensions; do
5817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5818    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5820    break 2
5821  fi
5822done
5823  done
5824IFS=$as_save_IFS
5825
5826  ;;
5827esac
5828fi
5829CUT=$ac_cv_path_CUT
5830if test -n "$CUT"; then
5831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5832$as_echo "$CUT" >&6; }
5833else
5834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5835$as_echo "no" >&6; }
5836fi
5837
5838
5839  test -n "$CUT" && break
5840done
5841
5842  else
5843    # The variable is set, but is it from the command line or the environment?
5844
5845    # Try to remove the string !CUT! from our list.
5846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5848      # If it failed, the variable was not from the command line. Ignore it,
5849      # but warn the user (except for BASH, which is always set by the calling BASH).
5850      if test "xCUT" != xBASH; then
5851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5852$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5853      fi
5854      # Try to locate tool using the code snippet
5855      for ac_prog in cut
5856do
5857  # Extract the first word of "$ac_prog", so it can be a program name with args.
5858set dummy $ac_prog; ac_word=$2
5859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5860$as_echo_n "checking for $ac_word... " >&6; }
5861if ${ac_cv_path_CUT+:} false; then :
5862  $as_echo_n "(cached) " >&6
5863else
5864  case $CUT in
5865  [\\/]* | ?:[\\/]*)
5866  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5867  ;;
5868  *)
5869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5870for as_dir in $PATH
5871do
5872  IFS=$as_save_IFS
5873  test -z "$as_dir" && as_dir=.
5874    for ac_exec_ext in '' $ac_executable_extensions; do
5875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5876    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5878    break 2
5879  fi
5880done
5881  done
5882IFS=$as_save_IFS
5883
5884  ;;
5885esac
5886fi
5887CUT=$ac_cv_path_CUT
5888if test -n "$CUT"; then
5889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5890$as_echo "$CUT" >&6; }
5891else
5892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5893$as_echo "no" >&6; }
5894fi
5895
5896
5897  test -n "$CUT" && break
5898done
5899
5900    else
5901      # If it succeeded, then it was overridden by the user. We will use it
5902      # for the tool.
5903
5904      # First remove it from the list of overridden variables, so we can test
5905      # for unknown variables in the end.
5906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5907
5908      # Check if the provided tool contains a complete path.
5909      tool_specified="$CUT"
5910      tool_basename="${tool_specified##*/}"
5911      if test "x$tool_basename" = "x$tool_specified"; then
5912        # A command without a complete path is provided, search $PATH.
5913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5914$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5915        # Extract the first word of "$tool_basename", so it can be a program name with args.
5916set dummy $tool_basename; ac_word=$2
5917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5918$as_echo_n "checking for $ac_word... " >&6; }
5919if ${ac_cv_path_CUT+:} false; then :
5920  $as_echo_n "(cached) " >&6
5921else
5922  case $CUT in
5923  [\\/]* | ?:[\\/]*)
5924  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5925  ;;
5926  *)
5927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5928for as_dir in $PATH
5929do
5930  IFS=$as_save_IFS
5931  test -z "$as_dir" && as_dir=.
5932    for ac_exec_ext in '' $ac_executable_extensions; do
5933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5934    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5936    break 2
5937  fi
5938done
5939  done
5940IFS=$as_save_IFS
5941
5942  ;;
5943esac
5944fi
5945CUT=$ac_cv_path_CUT
5946if test -n "$CUT"; then
5947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5948$as_echo "$CUT" >&6; }
5949else
5950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5951$as_echo "no" >&6; }
5952fi
5953
5954
5955        if test "x$CUT" = x; then
5956          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5957        fi
5958      else
5959        # Otherwise we believe it is a complete path. Use it as it is.
5960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5961$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5963$as_echo_n "checking for CUT... " >&6; }
5964        if test ! -x "$tool_specified"; then
5965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5966$as_echo "not found" >&6; }
5967          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5968        fi
5969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5970$as_echo "$tool_specified" >&6; }
5971      fi
5972    fi
5973  fi
5974
5975
5976
5977  if test "x$CUT" = x; then
5978    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5979  fi
5980
5981
5982
5983
5984
5985  # Publish this variable in the help.
5986
5987
5988  if test "x$DATE" = x; then
5989    # The variable is not set by user, try to locate tool using the code snippet
5990    for ac_prog in date
5991do
5992  # Extract the first word of "$ac_prog", so it can be a program name with args.
5993set dummy $ac_prog; ac_word=$2
5994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5995$as_echo_n "checking for $ac_word... " >&6; }
5996if ${ac_cv_path_DATE+:} false; then :
5997  $as_echo_n "(cached) " >&6
5998else
5999  case $DATE in
6000  [\\/]* | ?:[\\/]*)
6001  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6002  ;;
6003  *)
6004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6005for as_dir in $PATH
6006do
6007  IFS=$as_save_IFS
6008  test -z "$as_dir" && as_dir=.
6009    for ac_exec_ext in '' $ac_executable_extensions; do
6010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6011    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6013    break 2
6014  fi
6015done
6016  done
6017IFS=$as_save_IFS
6018
6019  ;;
6020esac
6021fi
6022DATE=$ac_cv_path_DATE
6023if test -n "$DATE"; then
6024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6025$as_echo "$DATE" >&6; }
6026else
6027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6028$as_echo "no" >&6; }
6029fi
6030
6031
6032  test -n "$DATE" && break
6033done
6034
6035  else
6036    # The variable is set, but is it from the command line or the environment?
6037
6038    # Try to remove the string !DATE! from our list.
6039    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6040    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6041      # If it failed, the variable was not from the command line. Ignore it,
6042      # but warn the user (except for BASH, which is always set by the calling BASH).
6043      if test "xDATE" != xBASH; then
6044        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6045$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6046      fi
6047      # Try to locate tool using the code snippet
6048      for ac_prog in date
6049do
6050  # Extract the first word of "$ac_prog", so it can be a program name with args.
6051set dummy $ac_prog; ac_word=$2
6052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6053$as_echo_n "checking for $ac_word... " >&6; }
6054if ${ac_cv_path_DATE+:} false; then :
6055  $as_echo_n "(cached) " >&6
6056else
6057  case $DATE in
6058  [\\/]* | ?:[\\/]*)
6059  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6060  ;;
6061  *)
6062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6063for as_dir in $PATH
6064do
6065  IFS=$as_save_IFS
6066  test -z "$as_dir" && as_dir=.
6067    for ac_exec_ext in '' $ac_executable_extensions; do
6068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6069    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6071    break 2
6072  fi
6073done
6074  done
6075IFS=$as_save_IFS
6076
6077  ;;
6078esac
6079fi
6080DATE=$ac_cv_path_DATE
6081if test -n "$DATE"; then
6082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6083$as_echo "$DATE" >&6; }
6084else
6085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086$as_echo "no" >&6; }
6087fi
6088
6089
6090  test -n "$DATE" && break
6091done
6092
6093    else
6094      # If it succeeded, then it was overridden by the user. We will use it
6095      # for the tool.
6096
6097      # First remove it from the list of overridden variables, so we can test
6098      # for unknown variables in the end.
6099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6100
6101      # Check if the provided tool contains a complete path.
6102      tool_specified="$DATE"
6103      tool_basename="${tool_specified##*/}"
6104      if test "x$tool_basename" = "x$tool_specified"; then
6105        # A command without a complete path is provided, search $PATH.
6106        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6107$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6108        # Extract the first word of "$tool_basename", so it can be a program name with args.
6109set dummy $tool_basename; ac_word=$2
6110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6111$as_echo_n "checking for $ac_word... " >&6; }
6112if ${ac_cv_path_DATE+:} false; then :
6113  $as_echo_n "(cached) " >&6
6114else
6115  case $DATE in
6116  [\\/]* | ?:[\\/]*)
6117  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6118  ;;
6119  *)
6120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6121for as_dir in $PATH
6122do
6123  IFS=$as_save_IFS
6124  test -z "$as_dir" && as_dir=.
6125    for ac_exec_ext in '' $ac_executable_extensions; do
6126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6127    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6129    break 2
6130  fi
6131done
6132  done
6133IFS=$as_save_IFS
6134
6135  ;;
6136esac
6137fi
6138DATE=$ac_cv_path_DATE
6139if test -n "$DATE"; then
6140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6141$as_echo "$DATE" >&6; }
6142else
6143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6144$as_echo "no" >&6; }
6145fi
6146
6147
6148        if test "x$DATE" = x; then
6149          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6150        fi
6151      else
6152        # Otherwise we believe it is a complete path. Use it as it is.
6153        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6154$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6156$as_echo_n "checking for DATE... " >&6; }
6157        if test ! -x "$tool_specified"; then
6158          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6159$as_echo "not found" >&6; }
6160          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6161        fi
6162        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6163$as_echo "$tool_specified" >&6; }
6164      fi
6165    fi
6166  fi
6167
6168
6169
6170  if test "x$DATE" = x; then
6171    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6172  fi
6173
6174
6175
6176
6177
6178  # Publish this variable in the help.
6179
6180
6181  if test "x$DIFF" = x; then
6182    # The variable is not set by user, try to locate tool using the code snippet
6183    for ac_prog in gdiff diff
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_DIFF+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $DIFF in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215DIFF=$ac_cv_path_DIFF
6216if test -n "$DIFF"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6218$as_echo "$DIFF" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$DIFF" && break
6226done
6227
6228  else
6229    # The variable is set, but is it from the command line or the environment?
6230
6231    # Try to remove the string !DIFF! from our list.
6232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6234      # If it failed, the variable was not from the command line. Ignore it,
6235      # but warn the user (except for BASH, which is always set by the calling BASH).
6236      if test "xDIFF" != xBASH; then
6237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6238$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6239      fi
6240      # Try to locate tool using the code snippet
6241      for ac_prog in gdiff diff
6242do
6243  # Extract the first word of "$ac_prog", so it can be a program name with args.
6244set dummy $ac_prog; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_DIFF+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $DIFF in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273DIFF=$ac_cv_path_DIFF
6274if test -n "$DIFF"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6276$as_echo "$DIFF" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283  test -n "$DIFF" && break
6284done
6285
6286    else
6287      # If it succeeded, then it was overridden by the user. We will use it
6288      # for the tool.
6289
6290      # First remove it from the list of overridden variables, so we can test
6291      # for unknown variables in the end.
6292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6293
6294      # Check if the provided tool contains a complete path.
6295      tool_specified="$DIFF"
6296      tool_basename="${tool_specified##*/}"
6297      if test "x$tool_basename" = "x$tool_specified"; then
6298        # A command without a complete path is provided, search $PATH.
6299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6300$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6301        # Extract the first word of "$tool_basename", so it can be a program name with args.
6302set dummy $tool_basename; ac_word=$2
6303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6304$as_echo_n "checking for $ac_word... " >&6; }
6305if ${ac_cv_path_DIFF+:} false; then :
6306  $as_echo_n "(cached) " >&6
6307else
6308  case $DIFF in
6309  [\\/]* | ?:[\\/]*)
6310  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6311  ;;
6312  *)
6313  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6314for as_dir in $PATH
6315do
6316  IFS=$as_save_IFS
6317  test -z "$as_dir" && as_dir=.
6318    for ac_exec_ext in '' $ac_executable_extensions; do
6319  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6320    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6322    break 2
6323  fi
6324done
6325  done
6326IFS=$as_save_IFS
6327
6328  ;;
6329esac
6330fi
6331DIFF=$ac_cv_path_DIFF
6332if test -n "$DIFF"; then
6333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6334$as_echo "$DIFF" >&6; }
6335else
6336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6337$as_echo "no" >&6; }
6338fi
6339
6340
6341        if test "x$DIFF" = x; then
6342          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6343        fi
6344      else
6345        # Otherwise we believe it is a complete path. Use it as it is.
6346        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6347$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6348        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6349$as_echo_n "checking for DIFF... " >&6; }
6350        if test ! -x "$tool_specified"; then
6351          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6352$as_echo "not found" >&6; }
6353          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6354        fi
6355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6356$as_echo "$tool_specified" >&6; }
6357      fi
6358    fi
6359  fi
6360
6361
6362
6363  if test "x$DIFF" = x; then
6364    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6365  fi
6366
6367
6368
6369
6370
6371  # Publish this variable in the help.
6372
6373
6374  if test "x$DIRNAME" = x; then
6375    # The variable is not set by user, try to locate tool using the code snippet
6376    for ac_prog in dirname
6377do
6378  # Extract the first word of "$ac_prog", so it can be a program name with args.
6379set dummy $ac_prog; ac_word=$2
6380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6381$as_echo_n "checking for $ac_word... " >&6; }
6382if ${ac_cv_path_DIRNAME+:} false; then :
6383  $as_echo_n "(cached) " >&6
6384else
6385  case $DIRNAME in
6386  [\\/]* | ?:[\\/]*)
6387  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6388  ;;
6389  *)
6390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6391for as_dir in $PATH
6392do
6393  IFS=$as_save_IFS
6394  test -z "$as_dir" && as_dir=.
6395    for ac_exec_ext in '' $ac_executable_extensions; do
6396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6397    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6399    break 2
6400  fi
6401done
6402  done
6403IFS=$as_save_IFS
6404
6405  ;;
6406esac
6407fi
6408DIRNAME=$ac_cv_path_DIRNAME
6409if test -n "$DIRNAME"; then
6410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6411$as_echo "$DIRNAME" >&6; }
6412else
6413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6414$as_echo "no" >&6; }
6415fi
6416
6417
6418  test -n "$DIRNAME" && break
6419done
6420
6421  else
6422    # The variable is set, but is it from the command line or the environment?
6423
6424    # Try to remove the string !DIRNAME! from our list.
6425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6427      # If it failed, the variable was not from the command line. Ignore it,
6428      # but warn the user (except for BASH, which is always set by the calling BASH).
6429      if test "xDIRNAME" != xBASH; then
6430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6431$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6432      fi
6433      # Try to locate tool using the code snippet
6434      for ac_prog in dirname
6435do
6436  # Extract the first word of "$ac_prog", so it can be a program name with args.
6437set dummy $ac_prog; ac_word=$2
6438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6439$as_echo_n "checking for $ac_word... " >&6; }
6440if ${ac_cv_path_DIRNAME+:} false; then :
6441  $as_echo_n "(cached) " >&6
6442else
6443  case $DIRNAME in
6444  [\\/]* | ?:[\\/]*)
6445  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6446  ;;
6447  *)
6448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6449for as_dir in $PATH
6450do
6451  IFS=$as_save_IFS
6452  test -z "$as_dir" && as_dir=.
6453    for ac_exec_ext in '' $ac_executable_extensions; do
6454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6455    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6457    break 2
6458  fi
6459done
6460  done
6461IFS=$as_save_IFS
6462
6463  ;;
6464esac
6465fi
6466DIRNAME=$ac_cv_path_DIRNAME
6467if test -n "$DIRNAME"; then
6468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6469$as_echo "$DIRNAME" >&6; }
6470else
6471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6472$as_echo "no" >&6; }
6473fi
6474
6475
6476  test -n "$DIRNAME" && break
6477done
6478
6479    else
6480      # If it succeeded, then it was overridden by the user. We will use it
6481      # for the tool.
6482
6483      # First remove it from the list of overridden variables, so we can test
6484      # for unknown variables in the end.
6485      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6486
6487      # Check if the provided tool contains a complete path.
6488      tool_specified="$DIRNAME"
6489      tool_basename="${tool_specified##*/}"
6490      if test "x$tool_basename" = "x$tool_specified"; then
6491        # A command without a complete path is provided, search $PATH.
6492        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6493$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6494        # Extract the first word of "$tool_basename", so it can be a program name with args.
6495set dummy $tool_basename; ac_word=$2
6496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6497$as_echo_n "checking for $ac_word... " >&6; }
6498if ${ac_cv_path_DIRNAME+:} false; then :
6499  $as_echo_n "(cached) " >&6
6500else
6501  case $DIRNAME in
6502  [\\/]* | ?:[\\/]*)
6503  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6504  ;;
6505  *)
6506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6507for as_dir in $PATH
6508do
6509  IFS=$as_save_IFS
6510  test -z "$as_dir" && as_dir=.
6511    for ac_exec_ext in '' $ac_executable_extensions; do
6512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6513    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6515    break 2
6516  fi
6517done
6518  done
6519IFS=$as_save_IFS
6520
6521  ;;
6522esac
6523fi
6524DIRNAME=$ac_cv_path_DIRNAME
6525if test -n "$DIRNAME"; then
6526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6527$as_echo "$DIRNAME" >&6; }
6528else
6529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6530$as_echo "no" >&6; }
6531fi
6532
6533
6534        if test "x$DIRNAME" = x; then
6535          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6536        fi
6537      else
6538        # Otherwise we believe it is a complete path. Use it as it is.
6539        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6540$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6541        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6542$as_echo_n "checking for DIRNAME... " >&6; }
6543        if test ! -x "$tool_specified"; then
6544          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6545$as_echo "not found" >&6; }
6546          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6547        fi
6548        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6549$as_echo "$tool_specified" >&6; }
6550      fi
6551    fi
6552  fi
6553
6554
6555
6556  if test "x$DIRNAME" = x; then
6557    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6558  fi
6559
6560
6561
6562
6563
6564  # Publish this variable in the help.
6565
6566
6567  if test "x$ECHO" = x; then
6568    # The variable is not set by user, try to locate tool using the code snippet
6569    for ac_prog in echo
6570do
6571  # Extract the first word of "$ac_prog", so it can be a program name with args.
6572set dummy $ac_prog; ac_word=$2
6573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6574$as_echo_n "checking for $ac_word... " >&6; }
6575if ${ac_cv_path_ECHO+:} false; then :
6576  $as_echo_n "(cached) " >&6
6577else
6578  case $ECHO in
6579  [\\/]* | ?:[\\/]*)
6580  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6581  ;;
6582  *)
6583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6584for as_dir in $PATH
6585do
6586  IFS=$as_save_IFS
6587  test -z "$as_dir" && as_dir=.
6588    for ac_exec_ext in '' $ac_executable_extensions; do
6589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6590    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6592    break 2
6593  fi
6594done
6595  done
6596IFS=$as_save_IFS
6597
6598  ;;
6599esac
6600fi
6601ECHO=$ac_cv_path_ECHO
6602if test -n "$ECHO"; then
6603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6604$as_echo "$ECHO" >&6; }
6605else
6606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6607$as_echo "no" >&6; }
6608fi
6609
6610
6611  test -n "$ECHO" && break
6612done
6613
6614  else
6615    # The variable is set, but is it from the command line or the environment?
6616
6617    # Try to remove the string !ECHO! from our list.
6618    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6619    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6620      # If it failed, the variable was not from the command line. Ignore it,
6621      # but warn the user (except for BASH, which is always set by the calling BASH).
6622      if test "xECHO" != xBASH; then
6623        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6624$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6625      fi
6626      # Try to locate tool using the code snippet
6627      for ac_prog in echo
6628do
6629  # Extract the first word of "$ac_prog", so it can be a program name with args.
6630set dummy $ac_prog; ac_word=$2
6631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6632$as_echo_n "checking for $ac_word... " >&6; }
6633if ${ac_cv_path_ECHO+:} false; then :
6634  $as_echo_n "(cached) " >&6
6635else
6636  case $ECHO in
6637  [\\/]* | ?:[\\/]*)
6638  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6639  ;;
6640  *)
6641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6642for as_dir in $PATH
6643do
6644  IFS=$as_save_IFS
6645  test -z "$as_dir" && as_dir=.
6646    for ac_exec_ext in '' $ac_executable_extensions; do
6647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6648    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6650    break 2
6651  fi
6652done
6653  done
6654IFS=$as_save_IFS
6655
6656  ;;
6657esac
6658fi
6659ECHO=$ac_cv_path_ECHO
6660if test -n "$ECHO"; then
6661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6662$as_echo "$ECHO" >&6; }
6663else
6664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6665$as_echo "no" >&6; }
6666fi
6667
6668
6669  test -n "$ECHO" && break
6670done
6671
6672    else
6673      # If it succeeded, then it was overridden by the user. We will use it
6674      # for the tool.
6675
6676      # First remove it from the list of overridden variables, so we can test
6677      # for unknown variables in the end.
6678      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6679
6680      # Check if the provided tool contains a complete path.
6681      tool_specified="$ECHO"
6682      tool_basename="${tool_specified##*/}"
6683      if test "x$tool_basename" = "x$tool_specified"; then
6684        # A command without a complete path is provided, search $PATH.
6685        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6686$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6687        # Extract the first word of "$tool_basename", so it can be a program name with args.
6688set dummy $tool_basename; ac_word=$2
6689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6690$as_echo_n "checking for $ac_word... " >&6; }
6691if ${ac_cv_path_ECHO+:} false; then :
6692  $as_echo_n "(cached) " >&6
6693else
6694  case $ECHO in
6695  [\\/]* | ?:[\\/]*)
6696  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6697  ;;
6698  *)
6699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6700for as_dir in $PATH
6701do
6702  IFS=$as_save_IFS
6703  test -z "$as_dir" && as_dir=.
6704    for ac_exec_ext in '' $ac_executable_extensions; do
6705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6706    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6708    break 2
6709  fi
6710done
6711  done
6712IFS=$as_save_IFS
6713
6714  ;;
6715esac
6716fi
6717ECHO=$ac_cv_path_ECHO
6718if test -n "$ECHO"; then
6719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6720$as_echo "$ECHO" >&6; }
6721else
6722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6723$as_echo "no" >&6; }
6724fi
6725
6726
6727        if test "x$ECHO" = x; then
6728          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6729        fi
6730      else
6731        # Otherwise we believe it is a complete path. Use it as it is.
6732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6733$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6735$as_echo_n "checking for ECHO... " >&6; }
6736        if test ! -x "$tool_specified"; then
6737          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6738$as_echo "not found" >&6; }
6739          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6740        fi
6741        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6742$as_echo "$tool_specified" >&6; }
6743      fi
6744    fi
6745  fi
6746
6747
6748
6749  if test "x$ECHO" = x; then
6750    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6751  fi
6752
6753
6754
6755
6756
6757  # Publish this variable in the help.
6758
6759
6760  if test "x$EXPR" = x; then
6761    # The variable is not set by user, try to locate tool using the code snippet
6762    for ac_prog in expr
6763do
6764  # Extract the first word of "$ac_prog", so it can be a program name with args.
6765set dummy $ac_prog; ac_word=$2
6766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6767$as_echo_n "checking for $ac_word... " >&6; }
6768if ${ac_cv_path_EXPR+:} false; then :
6769  $as_echo_n "(cached) " >&6
6770else
6771  case $EXPR in
6772  [\\/]* | ?:[\\/]*)
6773  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6774  ;;
6775  *)
6776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6777for as_dir in $PATH
6778do
6779  IFS=$as_save_IFS
6780  test -z "$as_dir" && as_dir=.
6781    for ac_exec_ext in '' $ac_executable_extensions; do
6782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6783    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6785    break 2
6786  fi
6787done
6788  done
6789IFS=$as_save_IFS
6790
6791  ;;
6792esac
6793fi
6794EXPR=$ac_cv_path_EXPR
6795if test -n "$EXPR"; then
6796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6797$as_echo "$EXPR" >&6; }
6798else
6799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6800$as_echo "no" >&6; }
6801fi
6802
6803
6804  test -n "$EXPR" && break
6805done
6806
6807  else
6808    # The variable is set, but is it from the command line or the environment?
6809
6810    # Try to remove the string !EXPR! from our list.
6811    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6812    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6813      # If it failed, the variable was not from the command line. Ignore it,
6814      # but warn the user (except for BASH, which is always set by the calling BASH).
6815      if test "xEXPR" != xBASH; then
6816        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6817$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6818      fi
6819      # Try to locate tool using the code snippet
6820      for ac_prog in expr
6821do
6822  # Extract the first word of "$ac_prog", so it can be a program name with args.
6823set dummy $ac_prog; ac_word=$2
6824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6825$as_echo_n "checking for $ac_word... " >&6; }
6826if ${ac_cv_path_EXPR+:} false; then :
6827  $as_echo_n "(cached) " >&6
6828else
6829  case $EXPR in
6830  [\\/]* | ?:[\\/]*)
6831  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6832  ;;
6833  *)
6834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6835for as_dir in $PATH
6836do
6837  IFS=$as_save_IFS
6838  test -z "$as_dir" && as_dir=.
6839    for ac_exec_ext in '' $ac_executable_extensions; do
6840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6841    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6843    break 2
6844  fi
6845done
6846  done
6847IFS=$as_save_IFS
6848
6849  ;;
6850esac
6851fi
6852EXPR=$ac_cv_path_EXPR
6853if test -n "$EXPR"; then
6854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6855$as_echo "$EXPR" >&6; }
6856else
6857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6858$as_echo "no" >&6; }
6859fi
6860
6861
6862  test -n "$EXPR" && break
6863done
6864
6865    else
6866      # If it succeeded, then it was overridden by the user. We will use it
6867      # for the tool.
6868
6869      # First remove it from the list of overridden variables, so we can test
6870      # for unknown variables in the end.
6871      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6872
6873      # Check if the provided tool contains a complete path.
6874      tool_specified="$EXPR"
6875      tool_basename="${tool_specified##*/}"
6876      if test "x$tool_basename" = "x$tool_specified"; then
6877        # A command without a complete path is provided, search $PATH.
6878        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6879$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6880        # Extract the first word of "$tool_basename", so it can be a program name with args.
6881set dummy $tool_basename; ac_word=$2
6882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6883$as_echo_n "checking for $ac_word... " >&6; }
6884if ${ac_cv_path_EXPR+:} false; then :
6885  $as_echo_n "(cached) " >&6
6886else
6887  case $EXPR in
6888  [\\/]* | ?:[\\/]*)
6889  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6890  ;;
6891  *)
6892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6893for as_dir in $PATH
6894do
6895  IFS=$as_save_IFS
6896  test -z "$as_dir" && as_dir=.
6897    for ac_exec_ext in '' $ac_executable_extensions; do
6898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6899    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6901    break 2
6902  fi
6903done
6904  done
6905IFS=$as_save_IFS
6906
6907  ;;
6908esac
6909fi
6910EXPR=$ac_cv_path_EXPR
6911if test -n "$EXPR"; then
6912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6913$as_echo "$EXPR" >&6; }
6914else
6915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6916$as_echo "no" >&6; }
6917fi
6918
6919
6920        if test "x$EXPR" = x; then
6921          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6922        fi
6923      else
6924        # Otherwise we believe it is a complete path. Use it as it is.
6925        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6926$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6927        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6928$as_echo_n "checking for EXPR... " >&6; }
6929        if test ! -x "$tool_specified"; then
6930          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6931$as_echo "not found" >&6; }
6932          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6933        fi
6934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6935$as_echo "$tool_specified" >&6; }
6936      fi
6937    fi
6938  fi
6939
6940
6941
6942  if test "x$EXPR" = x; then
6943    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6944  fi
6945
6946
6947
6948
6949
6950  # Publish this variable in the help.
6951
6952
6953  if test "x$FILE" = x; then
6954    # The variable is not set by user, try to locate tool using the code snippet
6955    for ac_prog in file
6956do
6957  # Extract the first word of "$ac_prog", so it can be a program name with args.
6958set dummy $ac_prog; ac_word=$2
6959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6960$as_echo_n "checking for $ac_word... " >&6; }
6961if ${ac_cv_path_FILE+:} false; then :
6962  $as_echo_n "(cached) " >&6
6963else
6964  case $FILE in
6965  [\\/]* | ?:[\\/]*)
6966  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6967  ;;
6968  *)
6969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6970for as_dir in $PATH
6971do
6972  IFS=$as_save_IFS
6973  test -z "$as_dir" && as_dir=.
6974    for ac_exec_ext in '' $ac_executable_extensions; do
6975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6976    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6978    break 2
6979  fi
6980done
6981  done
6982IFS=$as_save_IFS
6983
6984  ;;
6985esac
6986fi
6987FILE=$ac_cv_path_FILE
6988if test -n "$FILE"; then
6989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6990$as_echo "$FILE" >&6; }
6991else
6992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6993$as_echo "no" >&6; }
6994fi
6995
6996
6997  test -n "$FILE" && break
6998done
6999
7000  else
7001    # The variable is set, but is it from the command line or the environment?
7002
7003    # Try to remove the string !FILE! from our list.
7004    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7005    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7006      # If it failed, the variable was not from the command line. Ignore it,
7007      # but warn the user (except for BASH, which is always set by the calling BASH).
7008      if test "xFILE" != xBASH; then
7009        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7010$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7011      fi
7012      # Try to locate tool using the code snippet
7013      for ac_prog in file
7014do
7015  # Extract the first word of "$ac_prog", so it can be a program name with args.
7016set dummy $ac_prog; ac_word=$2
7017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7018$as_echo_n "checking for $ac_word... " >&6; }
7019if ${ac_cv_path_FILE+:} false; then :
7020  $as_echo_n "(cached) " >&6
7021else
7022  case $FILE in
7023  [\\/]* | ?:[\\/]*)
7024  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7025  ;;
7026  *)
7027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7028for as_dir in $PATH
7029do
7030  IFS=$as_save_IFS
7031  test -z "$as_dir" && as_dir=.
7032    for ac_exec_ext in '' $ac_executable_extensions; do
7033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7034    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7036    break 2
7037  fi
7038done
7039  done
7040IFS=$as_save_IFS
7041
7042  ;;
7043esac
7044fi
7045FILE=$ac_cv_path_FILE
7046if test -n "$FILE"; then
7047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7048$as_echo "$FILE" >&6; }
7049else
7050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7051$as_echo "no" >&6; }
7052fi
7053
7054
7055  test -n "$FILE" && break
7056done
7057
7058    else
7059      # If it succeeded, then it was overridden by the user. We will use it
7060      # for the tool.
7061
7062      # First remove it from the list of overridden variables, so we can test
7063      # for unknown variables in the end.
7064      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7065
7066      # Check if the provided tool contains a complete path.
7067      tool_specified="$FILE"
7068      tool_basename="${tool_specified##*/}"
7069      if test "x$tool_basename" = "x$tool_specified"; then
7070        # A command without a complete path is provided, search $PATH.
7071        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7072$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7073        # Extract the first word of "$tool_basename", so it can be a program name with args.
7074set dummy $tool_basename; ac_word=$2
7075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7076$as_echo_n "checking for $ac_word... " >&6; }
7077if ${ac_cv_path_FILE+:} false; then :
7078  $as_echo_n "(cached) " >&6
7079else
7080  case $FILE in
7081  [\\/]* | ?:[\\/]*)
7082  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7083  ;;
7084  *)
7085  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7086for as_dir in $PATH
7087do
7088  IFS=$as_save_IFS
7089  test -z "$as_dir" && as_dir=.
7090    for ac_exec_ext in '' $ac_executable_extensions; do
7091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7092    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7094    break 2
7095  fi
7096done
7097  done
7098IFS=$as_save_IFS
7099
7100  ;;
7101esac
7102fi
7103FILE=$ac_cv_path_FILE
7104if test -n "$FILE"; then
7105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7106$as_echo "$FILE" >&6; }
7107else
7108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7109$as_echo "no" >&6; }
7110fi
7111
7112
7113        if test "x$FILE" = x; then
7114          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7115        fi
7116      else
7117        # Otherwise we believe it is a complete path. Use it as it is.
7118        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7119$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7120        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7121$as_echo_n "checking for FILE... " >&6; }
7122        if test ! -x "$tool_specified"; then
7123          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7124$as_echo "not found" >&6; }
7125          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7126        fi
7127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7128$as_echo "$tool_specified" >&6; }
7129      fi
7130    fi
7131  fi
7132
7133
7134
7135  if test "x$FILE" = x; then
7136    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7137  fi
7138
7139
7140
7141
7142
7143  # Publish this variable in the help.
7144
7145
7146  if test "x$FIND" = x; then
7147    # The variable is not set by user, try to locate tool using the code snippet
7148    for ac_prog in find
7149do
7150  # Extract the first word of "$ac_prog", so it can be a program name with args.
7151set dummy $ac_prog; ac_word=$2
7152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7153$as_echo_n "checking for $ac_word... " >&6; }
7154if ${ac_cv_path_FIND+:} false; then :
7155  $as_echo_n "(cached) " >&6
7156else
7157  case $FIND in
7158  [\\/]* | ?:[\\/]*)
7159  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7160  ;;
7161  *)
7162  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7163for as_dir in $PATH
7164do
7165  IFS=$as_save_IFS
7166  test -z "$as_dir" && as_dir=.
7167    for ac_exec_ext in '' $ac_executable_extensions; do
7168  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7169    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7170    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7171    break 2
7172  fi
7173done
7174  done
7175IFS=$as_save_IFS
7176
7177  ;;
7178esac
7179fi
7180FIND=$ac_cv_path_FIND
7181if test -n "$FIND"; then
7182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7183$as_echo "$FIND" >&6; }
7184else
7185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7186$as_echo "no" >&6; }
7187fi
7188
7189
7190  test -n "$FIND" && break
7191done
7192
7193  else
7194    # The variable is set, but is it from the command line or the environment?
7195
7196    # Try to remove the string !FIND! from our list.
7197    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7198    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7199      # If it failed, the variable was not from the command line. Ignore it,
7200      # but warn the user (except for BASH, which is always set by the calling BASH).
7201      if test "xFIND" != xBASH; then
7202        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7203$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7204      fi
7205      # Try to locate tool using the code snippet
7206      for ac_prog in find
7207do
7208  # Extract the first word of "$ac_prog", so it can be a program name with args.
7209set dummy $ac_prog; ac_word=$2
7210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211$as_echo_n "checking for $ac_word... " >&6; }
7212if ${ac_cv_path_FIND+:} false; then :
7213  $as_echo_n "(cached) " >&6
7214else
7215  case $FIND in
7216  [\\/]* | ?:[\\/]*)
7217  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7218  ;;
7219  *)
7220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221for as_dir in $PATH
7222do
7223  IFS=$as_save_IFS
7224  test -z "$as_dir" && as_dir=.
7225    for ac_exec_ext in '' $ac_executable_extensions; do
7226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229    break 2
7230  fi
7231done
7232  done
7233IFS=$as_save_IFS
7234
7235  ;;
7236esac
7237fi
7238FIND=$ac_cv_path_FIND
7239if test -n "$FIND"; then
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7241$as_echo "$FIND" >&6; }
7242else
7243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244$as_echo "no" >&6; }
7245fi
7246
7247
7248  test -n "$FIND" && break
7249done
7250
7251    else
7252      # If it succeeded, then it was overridden by the user. We will use it
7253      # for the tool.
7254
7255      # First remove it from the list of overridden variables, so we can test
7256      # for unknown variables in the end.
7257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7258
7259      # Check if the provided tool contains a complete path.
7260      tool_specified="$FIND"
7261      tool_basename="${tool_specified##*/}"
7262      if test "x$tool_basename" = "x$tool_specified"; then
7263        # A command without a complete path is provided, search $PATH.
7264        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7265$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7266        # Extract the first word of "$tool_basename", so it can be a program name with args.
7267set dummy $tool_basename; ac_word=$2
7268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7269$as_echo_n "checking for $ac_word... " >&6; }
7270if ${ac_cv_path_FIND+:} false; then :
7271  $as_echo_n "(cached) " >&6
7272else
7273  case $FIND in
7274  [\\/]* | ?:[\\/]*)
7275  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7276  ;;
7277  *)
7278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7279for as_dir in $PATH
7280do
7281  IFS=$as_save_IFS
7282  test -z "$as_dir" && as_dir=.
7283    for ac_exec_ext in '' $ac_executable_extensions; do
7284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7285    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7287    break 2
7288  fi
7289done
7290  done
7291IFS=$as_save_IFS
7292
7293  ;;
7294esac
7295fi
7296FIND=$ac_cv_path_FIND
7297if test -n "$FIND"; then
7298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7299$as_echo "$FIND" >&6; }
7300else
7301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7302$as_echo "no" >&6; }
7303fi
7304
7305
7306        if test "x$FIND" = x; then
7307          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7308        fi
7309      else
7310        # Otherwise we believe it is a complete path. Use it as it is.
7311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7312$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7313        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7314$as_echo_n "checking for FIND... " >&6; }
7315        if test ! -x "$tool_specified"; then
7316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7317$as_echo "not found" >&6; }
7318          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7319        fi
7320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7321$as_echo "$tool_specified" >&6; }
7322      fi
7323    fi
7324  fi
7325
7326
7327
7328  if test "x$FIND" = x; then
7329    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7330  fi
7331
7332
7333
7334
7335
7336  # Publish this variable in the help.
7337
7338
7339  if test "x$HEAD" = x; then
7340    # The variable is not set by user, try to locate tool using the code snippet
7341    for ac_prog in head
7342do
7343  # Extract the first word of "$ac_prog", so it can be a program name with args.
7344set dummy $ac_prog; ac_word=$2
7345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7346$as_echo_n "checking for $ac_word... " >&6; }
7347if ${ac_cv_path_HEAD+:} false; then :
7348  $as_echo_n "(cached) " >&6
7349else
7350  case $HEAD in
7351  [\\/]* | ?:[\\/]*)
7352  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7353  ;;
7354  *)
7355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7356for as_dir in $PATH
7357do
7358  IFS=$as_save_IFS
7359  test -z "$as_dir" && as_dir=.
7360    for ac_exec_ext in '' $ac_executable_extensions; do
7361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7362    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7364    break 2
7365  fi
7366done
7367  done
7368IFS=$as_save_IFS
7369
7370  ;;
7371esac
7372fi
7373HEAD=$ac_cv_path_HEAD
7374if test -n "$HEAD"; then
7375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7376$as_echo "$HEAD" >&6; }
7377else
7378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7379$as_echo "no" >&6; }
7380fi
7381
7382
7383  test -n "$HEAD" && break
7384done
7385
7386  else
7387    # The variable is set, but is it from the command line or the environment?
7388
7389    # Try to remove the string !HEAD! from our list.
7390    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7391    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7392      # If it failed, the variable was not from the command line. Ignore it,
7393      # but warn the user (except for BASH, which is always set by the calling BASH).
7394      if test "xHEAD" != xBASH; then
7395        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7396$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7397      fi
7398      # Try to locate tool using the code snippet
7399      for ac_prog in head
7400do
7401  # Extract the first word of "$ac_prog", so it can be a program name with args.
7402set dummy $ac_prog; ac_word=$2
7403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7404$as_echo_n "checking for $ac_word... " >&6; }
7405if ${ac_cv_path_HEAD+:} false; then :
7406  $as_echo_n "(cached) " >&6
7407else
7408  case $HEAD in
7409  [\\/]* | ?:[\\/]*)
7410  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7411  ;;
7412  *)
7413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7414for as_dir in $PATH
7415do
7416  IFS=$as_save_IFS
7417  test -z "$as_dir" && as_dir=.
7418    for ac_exec_ext in '' $ac_executable_extensions; do
7419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7420    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7422    break 2
7423  fi
7424done
7425  done
7426IFS=$as_save_IFS
7427
7428  ;;
7429esac
7430fi
7431HEAD=$ac_cv_path_HEAD
7432if test -n "$HEAD"; then
7433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7434$as_echo "$HEAD" >&6; }
7435else
7436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7437$as_echo "no" >&6; }
7438fi
7439
7440
7441  test -n "$HEAD" && break
7442done
7443
7444    else
7445      # If it succeeded, then it was overridden by the user. We will use it
7446      # for the tool.
7447
7448      # First remove it from the list of overridden variables, so we can test
7449      # for unknown variables in the end.
7450      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7451
7452      # Check if the provided tool contains a complete path.
7453      tool_specified="$HEAD"
7454      tool_basename="${tool_specified##*/}"
7455      if test "x$tool_basename" = "x$tool_specified"; then
7456        # A command without a complete path is provided, search $PATH.
7457        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7458$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7459        # Extract the first word of "$tool_basename", so it can be a program name with args.
7460set dummy $tool_basename; ac_word=$2
7461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7462$as_echo_n "checking for $ac_word... " >&6; }
7463if ${ac_cv_path_HEAD+:} false; then :
7464  $as_echo_n "(cached) " >&6
7465else
7466  case $HEAD in
7467  [\\/]* | ?:[\\/]*)
7468  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7469  ;;
7470  *)
7471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7472for as_dir in $PATH
7473do
7474  IFS=$as_save_IFS
7475  test -z "$as_dir" && as_dir=.
7476    for ac_exec_ext in '' $ac_executable_extensions; do
7477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7478    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7480    break 2
7481  fi
7482done
7483  done
7484IFS=$as_save_IFS
7485
7486  ;;
7487esac
7488fi
7489HEAD=$ac_cv_path_HEAD
7490if test -n "$HEAD"; then
7491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7492$as_echo "$HEAD" >&6; }
7493else
7494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7495$as_echo "no" >&6; }
7496fi
7497
7498
7499        if test "x$HEAD" = x; then
7500          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7501        fi
7502      else
7503        # Otherwise we believe it is a complete path. Use it as it is.
7504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7505$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7506        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7507$as_echo_n "checking for HEAD... " >&6; }
7508        if test ! -x "$tool_specified"; then
7509          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7510$as_echo "not found" >&6; }
7511          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7512        fi
7513        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7514$as_echo "$tool_specified" >&6; }
7515      fi
7516    fi
7517  fi
7518
7519
7520
7521  if test "x$HEAD" = x; then
7522    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7523  fi
7524
7525
7526
7527
7528
7529  # Publish this variable in the help.
7530
7531
7532  if test "x$LN" = x; then
7533    # The variable is not set by user, try to locate tool using the code snippet
7534    for ac_prog in ln
7535do
7536  # Extract the first word of "$ac_prog", so it can be a program name with args.
7537set dummy $ac_prog; ac_word=$2
7538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7539$as_echo_n "checking for $ac_word... " >&6; }
7540if ${ac_cv_path_LN+:} false; then :
7541  $as_echo_n "(cached) " >&6
7542else
7543  case $LN in
7544  [\\/]* | ?:[\\/]*)
7545  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7546  ;;
7547  *)
7548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7549for as_dir in $PATH
7550do
7551  IFS=$as_save_IFS
7552  test -z "$as_dir" && as_dir=.
7553    for ac_exec_ext in '' $ac_executable_extensions; do
7554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7555    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7557    break 2
7558  fi
7559done
7560  done
7561IFS=$as_save_IFS
7562
7563  ;;
7564esac
7565fi
7566LN=$ac_cv_path_LN
7567if test -n "$LN"; then
7568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7569$as_echo "$LN" >&6; }
7570else
7571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7572$as_echo "no" >&6; }
7573fi
7574
7575
7576  test -n "$LN" && break
7577done
7578
7579  else
7580    # The variable is set, but is it from the command line or the environment?
7581
7582    # Try to remove the string !LN! from our list.
7583    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7584    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7585      # If it failed, the variable was not from the command line. Ignore it,
7586      # but warn the user (except for BASH, which is always set by the calling BASH).
7587      if test "xLN" != xBASH; then
7588        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7589$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7590      fi
7591      # Try to locate tool using the code snippet
7592      for ac_prog in ln
7593do
7594  # Extract the first word of "$ac_prog", so it can be a program name with args.
7595set dummy $ac_prog; ac_word=$2
7596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7597$as_echo_n "checking for $ac_word... " >&6; }
7598if ${ac_cv_path_LN+:} false; then :
7599  $as_echo_n "(cached) " >&6
7600else
7601  case $LN in
7602  [\\/]* | ?:[\\/]*)
7603  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7604  ;;
7605  *)
7606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7607for as_dir in $PATH
7608do
7609  IFS=$as_save_IFS
7610  test -z "$as_dir" && as_dir=.
7611    for ac_exec_ext in '' $ac_executable_extensions; do
7612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7613    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7615    break 2
7616  fi
7617done
7618  done
7619IFS=$as_save_IFS
7620
7621  ;;
7622esac
7623fi
7624LN=$ac_cv_path_LN
7625if test -n "$LN"; then
7626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7627$as_echo "$LN" >&6; }
7628else
7629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7630$as_echo "no" >&6; }
7631fi
7632
7633
7634  test -n "$LN" && break
7635done
7636
7637    else
7638      # If it succeeded, then it was overridden by the user. We will use it
7639      # for the tool.
7640
7641      # First remove it from the list of overridden variables, so we can test
7642      # for unknown variables in the end.
7643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7644
7645      # Check if the provided tool contains a complete path.
7646      tool_specified="$LN"
7647      tool_basename="${tool_specified##*/}"
7648      if test "x$tool_basename" = "x$tool_specified"; then
7649        # A command without a complete path is provided, search $PATH.
7650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7651$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7652        # Extract the first word of "$tool_basename", so it can be a program name with args.
7653set dummy $tool_basename; ac_word=$2
7654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7655$as_echo_n "checking for $ac_word... " >&6; }
7656if ${ac_cv_path_LN+:} false; then :
7657  $as_echo_n "(cached) " >&6
7658else
7659  case $LN in
7660  [\\/]* | ?:[\\/]*)
7661  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7662  ;;
7663  *)
7664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7665for as_dir in $PATH
7666do
7667  IFS=$as_save_IFS
7668  test -z "$as_dir" && as_dir=.
7669    for ac_exec_ext in '' $ac_executable_extensions; do
7670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7671    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7673    break 2
7674  fi
7675done
7676  done
7677IFS=$as_save_IFS
7678
7679  ;;
7680esac
7681fi
7682LN=$ac_cv_path_LN
7683if test -n "$LN"; then
7684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7685$as_echo "$LN" >&6; }
7686else
7687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7688$as_echo "no" >&6; }
7689fi
7690
7691
7692        if test "x$LN" = x; then
7693          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7694        fi
7695      else
7696        # Otherwise we believe it is a complete path. Use it as it is.
7697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7698$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7700$as_echo_n "checking for LN... " >&6; }
7701        if test ! -x "$tool_specified"; then
7702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7703$as_echo "not found" >&6; }
7704          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7705        fi
7706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7707$as_echo "$tool_specified" >&6; }
7708      fi
7709    fi
7710  fi
7711
7712
7713
7714  if test "x$LN" = x; then
7715    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7716  fi
7717
7718
7719
7720
7721
7722  # Publish this variable in the help.
7723
7724
7725  if test "x$LS" = x; then
7726    # The variable is not set by user, try to locate tool using the code snippet
7727    for ac_prog in ls
7728do
7729  # Extract the first word of "$ac_prog", so it can be a program name with args.
7730set dummy $ac_prog; ac_word=$2
7731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7732$as_echo_n "checking for $ac_word... " >&6; }
7733if ${ac_cv_path_LS+:} false; then :
7734  $as_echo_n "(cached) " >&6
7735else
7736  case $LS in
7737  [\\/]* | ?:[\\/]*)
7738  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7739  ;;
7740  *)
7741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7742for as_dir in $PATH
7743do
7744  IFS=$as_save_IFS
7745  test -z "$as_dir" && as_dir=.
7746    for ac_exec_ext in '' $ac_executable_extensions; do
7747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7748    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7750    break 2
7751  fi
7752done
7753  done
7754IFS=$as_save_IFS
7755
7756  ;;
7757esac
7758fi
7759LS=$ac_cv_path_LS
7760if test -n "$LS"; then
7761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7762$as_echo "$LS" >&6; }
7763else
7764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7765$as_echo "no" >&6; }
7766fi
7767
7768
7769  test -n "$LS" && break
7770done
7771
7772  else
7773    # The variable is set, but is it from the command line or the environment?
7774
7775    # Try to remove the string !LS! from our list.
7776    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7777    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7778      # If it failed, the variable was not from the command line. Ignore it,
7779      # but warn the user (except for BASH, which is always set by the calling BASH).
7780      if test "xLS" != xBASH; then
7781        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7782$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7783      fi
7784      # Try to locate tool using the code snippet
7785      for ac_prog in ls
7786do
7787  # Extract the first word of "$ac_prog", so it can be a program name with args.
7788set dummy $ac_prog; ac_word=$2
7789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7790$as_echo_n "checking for $ac_word... " >&6; }
7791if ${ac_cv_path_LS+:} false; then :
7792  $as_echo_n "(cached) " >&6
7793else
7794  case $LS in
7795  [\\/]* | ?:[\\/]*)
7796  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7797  ;;
7798  *)
7799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7800for as_dir in $PATH
7801do
7802  IFS=$as_save_IFS
7803  test -z "$as_dir" && as_dir=.
7804    for ac_exec_ext in '' $ac_executable_extensions; do
7805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7806    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7808    break 2
7809  fi
7810done
7811  done
7812IFS=$as_save_IFS
7813
7814  ;;
7815esac
7816fi
7817LS=$ac_cv_path_LS
7818if test -n "$LS"; then
7819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7820$as_echo "$LS" >&6; }
7821else
7822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7823$as_echo "no" >&6; }
7824fi
7825
7826
7827  test -n "$LS" && break
7828done
7829
7830    else
7831      # If it succeeded, then it was overridden by the user. We will use it
7832      # for the tool.
7833
7834      # First remove it from the list of overridden variables, so we can test
7835      # for unknown variables in the end.
7836      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7837
7838      # Check if the provided tool contains a complete path.
7839      tool_specified="$LS"
7840      tool_basename="${tool_specified##*/}"
7841      if test "x$tool_basename" = "x$tool_specified"; then
7842        # A command without a complete path is provided, search $PATH.
7843        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7844$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7845        # Extract the first word of "$tool_basename", so it can be a program name with args.
7846set dummy $tool_basename; ac_word=$2
7847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7848$as_echo_n "checking for $ac_word... " >&6; }
7849if ${ac_cv_path_LS+:} false; then :
7850  $as_echo_n "(cached) " >&6
7851else
7852  case $LS in
7853  [\\/]* | ?:[\\/]*)
7854  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7855  ;;
7856  *)
7857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7858for as_dir in $PATH
7859do
7860  IFS=$as_save_IFS
7861  test -z "$as_dir" && as_dir=.
7862    for ac_exec_ext in '' $ac_executable_extensions; do
7863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7864    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7866    break 2
7867  fi
7868done
7869  done
7870IFS=$as_save_IFS
7871
7872  ;;
7873esac
7874fi
7875LS=$ac_cv_path_LS
7876if test -n "$LS"; then
7877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7878$as_echo "$LS" >&6; }
7879else
7880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7881$as_echo "no" >&6; }
7882fi
7883
7884
7885        if test "x$LS" = x; then
7886          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7887        fi
7888      else
7889        # Otherwise we believe it is a complete path. Use it as it is.
7890        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7891$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7893$as_echo_n "checking for LS... " >&6; }
7894        if test ! -x "$tool_specified"; then
7895          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7896$as_echo "not found" >&6; }
7897          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7898        fi
7899        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7900$as_echo "$tool_specified" >&6; }
7901      fi
7902    fi
7903  fi
7904
7905
7906
7907  if test "x$LS" = x; then
7908    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7909  fi
7910
7911
7912
7913
7914
7915  # Publish this variable in the help.
7916
7917
7918  if test "x$MKDIR" = x; then
7919    # The variable is not set by user, try to locate tool using the code snippet
7920    for ac_prog in mkdir
7921do
7922  # Extract the first word of "$ac_prog", so it can be a program name with args.
7923set dummy $ac_prog; ac_word=$2
7924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7925$as_echo_n "checking for $ac_word... " >&6; }
7926if ${ac_cv_path_MKDIR+:} false; then :
7927  $as_echo_n "(cached) " >&6
7928else
7929  case $MKDIR in
7930  [\\/]* | ?:[\\/]*)
7931  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7932  ;;
7933  *)
7934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7935for as_dir in $PATH
7936do
7937  IFS=$as_save_IFS
7938  test -z "$as_dir" && as_dir=.
7939    for ac_exec_ext in '' $ac_executable_extensions; do
7940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7941    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7943    break 2
7944  fi
7945done
7946  done
7947IFS=$as_save_IFS
7948
7949  ;;
7950esac
7951fi
7952MKDIR=$ac_cv_path_MKDIR
7953if test -n "$MKDIR"; then
7954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7955$as_echo "$MKDIR" >&6; }
7956else
7957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7958$as_echo "no" >&6; }
7959fi
7960
7961
7962  test -n "$MKDIR" && break
7963done
7964
7965  else
7966    # The variable is set, but is it from the command line or the environment?
7967
7968    # Try to remove the string !MKDIR! from our list.
7969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7971      # If it failed, the variable was not from the command line. Ignore it,
7972      # but warn the user (except for BASH, which is always set by the calling BASH).
7973      if test "xMKDIR" != xBASH; then
7974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7975$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7976      fi
7977      # Try to locate tool using the code snippet
7978      for ac_prog in mkdir
7979do
7980  # Extract the first word of "$ac_prog", so it can be a program name with args.
7981set dummy $ac_prog; ac_word=$2
7982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7983$as_echo_n "checking for $ac_word... " >&6; }
7984if ${ac_cv_path_MKDIR+:} false; then :
7985  $as_echo_n "(cached) " >&6
7986else
7987  case $MKDIR in
7988  [\\/]* | ?:[\\/]*)
7989  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7990  ;;
7991  *)
7992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7993for as_dir in $PATH
7994do
7995  IFS=$as_save_IFS
7996  test -z "$as_dir" && as_dir=.
7997    for ac_exec_ext in '' $ac_executable_extensions; do
7998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7999    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8001    break 2
8002  fi
8003done
8004  done
8005IFS=$as_save_IFS
8006
8007  ;;
8008esac
8009fi
8010MKDIR=$ac_cv_path_MKDIR
8011if test -n "$MKDIR"; then
8012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8013$as_echo "$MKDIR" >&6; }
8014else
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8016$as_echo "no" >&6; }
8017fi
8018
8019
8020  test -n "$MKDIR" && break
8021done
8022
8023    else
8024      # If it succeeded, then it was overridden by the user. We will use it
8025      # for the tool.
8026
8027      # First remove it from the list of overridden variables, so we can test
8028      # for unknown variables in the end.
8029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8030
8031      # Check if the provided tool contains a complete path.
8032      tool_specified="$MKDIR"
8033      tool_basename="${tool_specified##*/}"
8034      if test "x$tool_basename" = "x$tool_specified"; then
8035        # A command without a complete path is provided, search $PATH.
8036        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8037$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8038        # Extract the first word of "$tool_basename", so it can be a program name with args.
8039set dummy $tool_basename; ac_word=$2
8040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8041$as_echo_n "checking for $ac_word... " >&6; }
8042if ${ac_cv_path_MKDIR+:} false; then :
8043  $as_echo_n "(cached) " >&6
8044else
8045  case $MKDIR in
8046  [\\/]* | ?:[\\/]*)
8047  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8048  ;;
8049  *)
8050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8051for as_dir in $PATH
8052do
8053  IFS=$as_save_IFS
8054  test -z "$as_dir" && as_dir=.
8055    for ac_exec_ext in '' $ac_executable_extensions; do
8056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8057    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8059    break 2
8060  fi
8061done
8062  done
8063IFS=$as_save_IFS
8064
8065  ;;
8066esac
8067fi
8068MKDIR=$ac_cv_path_MKDIR
8069if test -n "$MKDIR"; then
8070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8071$as_echo "$MKDIR" >&6; }
8072else
8073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8074$as_echo "no" >&6; }
8075fi
8076
8077
8078        if test "x$MKDIR" = x; then
8079          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8080        fi
8081      else
8082        # Otherwise we believe it is a complete path. Use it as it is.
8083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8084$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8086$as_echo_n "checking for MKDIR... " >&6; }
8087        if test ! -x "$tool_specified"; then
8088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8089$as_echo "not found" >&6; }
8090          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8091        fi
8092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8093$as_echo "$tool_specified" >&6; }
8094      fi
8095    fi
8096  fi
8097
8098
8099
8100  if test "x$MKDIR" = x; then
8101    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8102  fi
8103
8104
8105
8106
8107
8108  # Publish this variable in the help.
8109
8110
8111  if test "x$MKTEMP" = x; then
8112    # The variable is not set by user, try to locate tool using the code snippet
8113    for ac_prog in mktemp
8114do
8115  # Extract the first word of "$ac_prog", so it can be a program name with args.
8116set dummy $ac_prog; ac_word=$2
8117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8118$as_echo_n "checking for $ac_word... " >&6; }
8119if ${ac_cv_path_MKTEMP+:} false; then :
8120  $as_echo_n "(cached) " >&6
8121else
8122  case $MKTEMP in
8123  [\\/]* | ?:[\\/]*)
8124  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8125  ;;
8126  *)
8127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8128for as_dir in $PATH
8129do
8130  IFS=$as_save_IFS
8131  test -z "$as_dir" && as_dir=.
8132    for ac_exec_ext in '' $ac_executable_extensions; do
8133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8134    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8136    break 2
8137  fi
8138done
8139  done
8140IFS=$as_save_IFS
8141
8142  ;;
8143esac
8144fi
8145MKTEMP=$ac_cv_path_MKTEMP
8146if test -n "$MKTEMP"; then
8147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8148$as_echo "$MKTEMP" >&6; }
8149else
8150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8151$as_echo "no" >&6; }
8152fi
8153
8154
8155  test -n "$MKTEMP" && break
8156done
8157
8158  else
8159    # The variable is set, but is it from the command line or the environment?
8160
8161    # Try to remove the string !MKTEMP! from our list.
8162    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8163    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8164      # If it failed, the variable was not from the command line. Ignore it,
8165      # but warn the user (except for BASH, which is always set by the calling BASH).
8166      if test "xMKTEMP" != xBASH; then
8167        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8168$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8169      fi
8170      # Try to locate tool using the code snippet
8171      for ac_prog in mktemp
8172do
8173  # Extract the first word of "$ac_prog", so it can be a program name with args.
8174set dummy $ac_prog; ac_word=$2
8175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8176$as_echo_n "checking for $ac_word... " >&6; }
8177if ${ac_cv_path_MKTEMP+:} false; then :
8178  $as_echo_n "(cached) " >&6
8179else
8180  case $MKTEMP in
8181  [\\/]* | ?:[\\/]*)
8182  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8183  ;;
8184  *)
8185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8186for as_dir in $PATH
8187do
8188  IFS=$as_save_IFS
8189  test -z "$as_dir" && as_dir=.
8190    for ac_exec_ext in '' $ac_executable_extensions; do
8191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8192    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8194    break 2
8195  fi
8196done
8197  done
8198IFS=$as_save_IFS
8199
8200  ;;
8201esac
8202fi
8203MKTEMP=$ac_cv_path_MKTEMP
8204if test -n "$MKTEMP"; then
8205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8206$as_echo "$MKTEMP" >&6; }
8207else
8208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8209$as_echo "no" >&6; }
8210fi
8211
8212
8213  test -n "$MKTEMP" && break
8214done
8215
8216    else
8217      # If it succeeded, then it was overridden by the user. We will use it
8218      # for the tool.
8219
8220      # First remove it from the list of overridden variables, so we can test
8221      # for unknown variables in the end.
8222      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8223
8224      # Check if the provided tool contains a complete path.
8225      tool_specified="$MKTEMP"
8226      tool_basename="${tool_specified##*/}"
8227      if test "x$tool_basename" = "x$tool_specified"; then
8228        # A command without a complete path is provided, search $PATH.
8229        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8230$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8231        # Extract the first word of "$tool_basename", so it can be a program name with args.
8232set dummy $tool_basename; ac_word=$2
8233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8234$as_echo_n "checking for $ac_word... " >&6; }
8235if ${ac_cv_path_MKTEMP+:} false; then :
8236  $as_echo_n "(cached) " >&6
8237else
8238  case $MKTEMP in
8239  [\\/]* | ?:[\\/]*)
8240  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8241  ;;
8242  *)
8243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8244for as_dir in $PATH
8245do
8246  IFS=$as_save_IFS
8247  test -z "$as_dir" && as_dir=.
8248    for ac_exec_ext in '' $ac_executable_extensions; do
8249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8250    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8252    break 2
8253  fi
8254done
8255  done
8256IFS=$as_save_IFS
8257
8258  ;;
8259esac
8260fi
8261MKTEMP=$ac_cv_path_MKTEMP
8262if test -n "$MKTEMP"; then
8263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8264$as_echo "$MKTEMP" >&6; }
8265else
8266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8267$as_echo "no" >&6; }
8268fi
8269
8270
8271        if test "x$MKTEMP" = x; then
8272          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8273        fi
8274      else
8275        # Otherwise we believe it is a complete path. Use it as it is.
8276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8277$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8279$as_echo_n "checking for MKTEMP... " >&6; }
8280        if test ! -x "$tool_specified"; then
8281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8282$as_echo "not found" >&6; }
8283          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8284        fi
8285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8286$as_echo "$tool_specified" >&6; }
8287      fi
8288    fi
8289  fi
8290
8291
8292
8293  if test "x$MKTEMP" = x; then
8294    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8295  fi
8296
8297
8298
8299
8300
8301  # Publish this variable in the help.
8302
8303
8304  if test "x$MV" = x; then
8305    # The variable is not set by user, try to locate tool using the code snippet
8306    for ac_prog in mv
8307do
8308  # Extract the first word of "$ac_prog", so it can be a program name with args.
8309set dummy $ac_prog; ac_word=$2
8310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8311$as_echo_n "checking for $ac_word... " >&6; }
8312if ${ac_cv_path_MV+:} false; then :
8313  $as_echo_n "(cached) " >&6
8314else
8315  case $MV in
8316  [\\/]* | ?:[\\/]*)
8317  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8318  ;;
8319  *)
8320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8321for as_dir in $PATH
8322do
8323  IFS=$as_save_IFS
8324  test -z "$as_dir" && as_dir=.
8325    for ac_exec_ext in '' $ac_executable_extensions; do
8326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8327    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8329    break 2
8330  fi
8331done
8332  done
8333IFS=$as_save_IFS
8334
8335  ;;
8336esac
8337fi
8338MV=$ac_cv_path_MV
8339if test -n "$MV"; then
8340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8341$as_echo "$MV" >&6; }
8342else
8343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8344$as_echo "no" >&6; }
8345fi
8346
8347
8348  test -n "$MV" && break
8349done
8350
8351  else
8352    # The variable is set, but is it from the command line or the environment?
8353
8354    # Try to remove the string !MV! from our list.
8355    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8356    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8357      # If it failed, the variable was not from the command line. Ignore it,
8358      # but warn the user (except for BASH, which is always set by the calling BASH).
8359      if test "xMV" != xBASH; then
8360        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8361$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8362      fi
8363      # Try to locate tool using the code snippet
8364      for ac_prog in mv
8365do
8366  # Extract the first word of "$ac_prog", so it can be a program name with args.
8367set dummy $ac_prog; ac_word=$2
8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8369$as_echo_n "checking for $ac_word... " >&6; }
8370if ${ac_cv_path_MV+:} false; then :
8371  $as_echo_n "(cached) " >&6
8372else
8373  case $MV in
8374  [\\/]* | ?:[\\/]*)
8375  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8376  ;;
8377  *)
8378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8379for as_dir in $PATH
8380do
8381  IFS=$as_save_IFS
8382  test -z "$as_dir" && as_dir=.
8383    for ac_exec_ext in '' $ac_executable_extensions; do
8384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8385    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8387    break 2
8388  fi
8389done
8390  done
8391IFS=$as_save_IFS
8392
8393  ;;
8394esac
8395fi
8396MV=$ac_cv_path_MV
8397if test -n "$MV"; then
8398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8399$as_echo "$MV" >&6; }
8400else
8401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8402$as_echo "no" >&6; }
8403fi
8404
8405
8406  test -n "$MV" && break
8407done
8408
8409    else
8410      # If it succeeded, then it was overridden by the user. We will use it
8411      # for the tool.
8412
8413      # First remove it from the list of overridden variables, so we can test
8414      # for unknown variables in the end.
8415      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8416
8417      # Check if the provided tool contains a complete path.
8418      tool_specified="$MV"
8419      tool_basename="${tool_specified##*/}"
8420      if test "x$tool_basename" = "x$tool_specified"; then
8421        # A command without a complete path is provided, search $PATH.
8422        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8423$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8424        # Extract the first word of "$tool_basename", so it can be a program name with args.
8425set dummy $tool_basename; ac_word=$2
8426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8427$as_echo_n "checking for $ac_word... " >&6; }
8428if ${ac_cv_path_MV+:} false; then :
8429  $as_echo_n "(cached) " >&6
8430else
8431  case $MV in
8432  [\\/]* | ?:[\\/]*)
8433  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8434  ;;
8435  *)
8436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8437for as_dir in $PATH
8438do
8439  IFS=$as_save_IFS
8440  test -z "$as_dir" && as_dir=.
8441    for ac_exec_ext in '' $ac_executable_extensions; do
8442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8443    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8445    break 2
8446  fi
8447done
8448  done
8449IFS=$as_save_IFS
8450
8451  ;;
8452esac
8453fi
8454MV=$ac_cv_path_MV
8455if test -n "$MV"; then
8456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8457$as_echo "$MV" >&6; }
8458else
8459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8460$as_echo "no" >&6; }
8461fi
8462
8463
8464        if test "x$MV" = x; then
8465          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8466        fi
8467      else
8468        # Otherwise we believe it is a complete path. Use it as it is.
8469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8470$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8471        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8472$as_echo_n "checking for MV... " >&6; }
8473        if test ! -x "$tool_specified"; then
8474          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8475$as_echo "not found" >&6; }
8476          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8477        fi
8478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8479$as_echo "$tool_specified" >&6; }
8480      fi
8481    fi
8482  fi
8483
8484
8485
8486  if test "x$MV" = x; then
8487    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8488  fi
8489
8490
8491
8492
8493
8494  # Publish this variable in the help.
8495
8496
8497  if test "x$NAWK" = x; then
8498    # The variable is not set by user, try to locate tool using the code snippet
8499    for ac_prog in nawk gawk awk
8500do
8501  # Extract the first word of "$ac_prog", so it can be a program name with args.
8502set dummy $ac_prog; ac_word=$2
8503{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8504$as_echo_n "checking for $ac_word... " >&6; }
8505if ${ac_cv_path_NAWK+:} false; then :
8506  $as_echo_n "(cached) " >&6
8507else
8508  case $NAWK in
8509  [\\/]* | ?:[\\/]*)
8510  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8511  ;;
8512  *)
8513  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8514for as_dir in $PATH
8515do
8516  IFS=$as_save_IFS
8517  test -z "$as_dir" && as_dir=.
8518    for ac_exec_ext in '' $ac_executable_extensions; do
8519  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8520    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8521    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8522    break 2
8523  fi
8524done
8525  done
8526IFS=$as_save_IFS
8527
8528  ;;
8529esac
8530fi
8531NAWK=$ac_cv_path_NAWK
8532if test -n "$NAWK"; then
8533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8534$as_echo "$NAWK" >&6; }
8535else
8536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8537$as_echo "no" >&6; }
8538fi
8539
8540
8541  test -n "$NAWK" && break
8542done
8543
8544  else
8545    # The variable is set, but is it from the command line or the environment?
8546
8547    # Try to remove the string !NAWK! from our list.
8548    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8549    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8550      # If it failed, the variable was not from the command line. Ignore it,
8551      # but warn the user (except for BASH, which is always set by the calling BASH).
8552      if test "xNAWK" != xBASH; then
8553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8554$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8555      fi
8556      # Try to locate tool using the code snippet
8557      for ac_prog in nawk gawk awk
8558do
8559  # Extract the first word of "$ac_prog", so it can be a program name with args.
8560set dummy $ac_prog; ac_word=$2
8561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8562$as_echo_n "checking for $ac_word... " >&6; }
8563if ${ac_cv_path_NAWK+:} false; then :
8564  $as_echo_n "(cached) " >&6
8565else
8566  case $NAWK in
8567  [\\/]* | ?:[\\/]*)
8568  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8569  ;;
8570  *)
8571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8572for as_dir in $PATH
8573do
8574  IFS=$as_save_IFS
8575  test -z "$as_dir" && as_dir=.
8576    for ac_exec_ext in '' $ac_executable_extensions; do
8577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8578    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8580    break 2
8581  fi
8582done
8583  done
8584IFS=$as_save_IFS
8585
8586  ;;
8587esac
8588fi
8589NAWK=$ac_cv_path_NAWK
8590if test -n "$NAWK"; then
8591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8592$as_echo "$NAWK" >&6; }
8593else
8594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8595$as_echo "no" >&6; }
8596fi
8597
8598
8599  test -n "$NAWK" && break
8600done
8601
8602    else
8603      # If it succeeded, then it was overridden by the user. We will use it
8604      # for the tool.
8605
8606      # First remove it from the list of overridden variables, so we can test
8607      # for unknown variables in the end.
8608      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8609
8610      # Check if the provided tool contains a complete path.
8611      tool_specified="$NAWK"
8612      tool_basename="${tool_specified##*/}"
8613      if test "x$tool_basename" = "x$tool_specified"; then
8614        # A command without a complete path is provided, search $PATH.
8615        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8616$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8617        # Extract the first word of "$tool_basename", so it can be a program name with args.
8618set dummy $tool_basename; ac_word=$2
8619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8620$as_echo_n "checking for $ac_word... " >&6; }
8621if ${ac_cv_path_NAWK+:} false; then :
8622  $as_echo_n "(cached) " >&6
8623else
8624  case $NAWK in
8625  [\\/]* | ?:[\\/]*)
8626  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8627  ;;
8628  *)
8629  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8630for as_dir in $PATH
8631do
8632  IFS=$as_save_IFS
8633  test -z "$as_dir" && as_dir=.
8634    for ac_exec_ext in '' $ac_executable_extensions; do
8635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8636    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8638    break 2
8639  fi
8640done
8641  done
8642IFS=$as_save_IFS
8643
8644  ;;
8645esac
8646fi
8647NAWK=$ac_cv_path_NAWK
8648if test -n "$NAWK"; then
8649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8650$as_echo "$NAWK" >&6; }
8651else
8652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8653$as_echo "no" >&6; }
8654fi
8655
8656
8657        if test "x$NAWK" = x; then
8658          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8659        fi
8660      else
8661        # Otherwise we believe it is a complete path. Use it as it is.
8662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8663$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8664        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8665$as_echo_n "checking for NAWK... " >&6; }
8666        if test ! -x "$tool_specified"; then
8667          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8668$as_echo "not found" >&6; }
8669          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8670        fi
8671        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8672$as_echo "$tool_specified" >&6; }
8673      fi
8674    fi
8675  fi
8676
8677
8678
8679  if test "x$NAWK" = x; then
8680    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8681  fi
8682
8683
8684
8685
8686
8687  # Publish this variable in the help.
8688
8689
8690  if test "x$PRINTF" = x; then
8691    # The variable is not set by user, try to locate tool using the code snippet
8692    for ac_prog in printf
8693do
8694  # Extract the first word of "$ac_prog", so it can be a program name with args.
8695set dummy $ac_prog; ac_word=$2
8696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8697$as_echo_n "checking for $ac_word... " >&6; }
8698if ${ac_cv_path_PRINTF+:} false; then :
8699  $as_echo_n "(cached) " >&6
8700else
8701  case $PRINTF in
8702  [\\/]* | ?:[\\/]*)
8703  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8704  ;;
8705  *)
8706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8707for as_dir in $PATH
8708do
8709  IFS=$as_save_IFS
8710  test -z "$as_dir" && as_dir=.
8711    for ac_exec_ext in '' $ac_executable_extensions; do
8712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8713    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8715    break 2
8716  fi
8717done
8718  done
8719IFS=$as_save_IFS
8720
8721  ;;
8722esac
8723fi
8724PRINTF=$ac_cv_path_PRINTF
8725if test -n "$PRINTF"; then
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8727$as_echo "$PRINTF" >&6; }
8728else
8729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8730$as_echo "no" >&6; }
8731fi
8732
8733
8734  test -n "$PRINTF" && break
8735done
8736
8737  else
8738    # The variable is set, but is it from the command line or the environment?
8739
8740    # Try to remove the string !PRINTF! from our list.
8741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8743      # If it failed, the variable was not from the command line. Ignore it,
8744      # but warn the user (except for BASH, which is always set by the calling BASH).
8745      if test "xPRINTF" != xBASH; then
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8747$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8748      fi
8749      # Try to locate tool using the code snippet
8750      for ac_prog in printf
8751do
8752  # Extract the first word of "$ac_prog", so it can be a program name with args.
8753set dummy $ac_prog; ac_word=$2
8754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8755$as_echo_n "checking for $ac_word... " >&6; }
8756if ${ac_cv_path_PRINTF+:} false; then :
8757  $as_echo_n "(cached) " >&6
8758else
8759  case $PRINTF in
8760  [\\/]* | ?:[\\/]*)
8761  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8762  ;;
8763  *)
8764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8765for as_dir in $PATH
8766do
8767  IFS=$as_save_IFS
8768  test -z "$as_dir" && as_dir=.
8769    for ac_exec_ext in '' $ac_executable_extensions; do
8770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8771    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8773    break 2
8774  fi
8775done
8776  done
8777IFS=$as_save_IFS
8778
8779  ;;
8780esac
8781fi
8782PRINTF=$ac_cv_path_PRINTF
8783if test -n "$PRINTF"; then
8784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8785$as_echo "$PRINTF" >&6; }
8786else
8787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8788$as_echo "no" >&6; }
8789fi
8790
8791
8792  test -n "$PRINTF" && break
8793done
8794
8795    else
8796      # If it succeeded, then it was overridden by the user. We will use it
8797      # for the tool.
8798
8799      # First remove it from the list of overridden variables, so we can test
8800      # for unknown variables in the end.
8801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8802
8803      # Check if the provided tool contains a complete path.
8804      tool_specified="$PRINTF"
8805      tool_basename="${tool_specified##*/}"
8806      if test "x$tool_basename" = "x$tool_specified"; then
8807        # A command without a complete path is provided, search $PATH.
8808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8809$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8810        # Extract the first word of "$tool_basename", so it can be a program name with args.
8811set dummy $tool_basename; ac_word=$2
8812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8813$as_echo_n "checking for $ac_word... " >&6; }
8814if ${ac_cv_path_PRINTF+:} false; then :
8815  $as_echo_n "(cached) " >&6
8816else
8817  case $PRINTF in
8818  [\\/]* | ?:[\\/]*)
8819  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8820  ;;
8821  *)
8822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8823for as_dir in $PATH
8824do
8825  IFS=$as_save_IFS
8826  test -z "$as_dir" && as_dir=.
8827    for ac_exec_ext in '' $ac_executable_extensions; do
8828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8829    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8831    break 2
8832  fi
8833done
8834  done
8835IFS=$as_save_IFS
8836
8837  ;;
8838esac
8839fi
8840PRINTF=$ac_cv_path_PRINTF
8841if test -n "$PRINTF"; then
8842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8843$as_echo "$PRINTF" >&6; }
8844else
8845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8846$as_echo "no" >&6; }
8847fi
8848
8849
8850        if test "x$PRINTF" = x; then
8851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8852        fi
8853      else
8854        # Otherwise we believe it is a complete path. Use it as it is.
8855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8856$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8858$as_echo_n "checking for PRINTF... " >&6; }
8859        if test ! -x "$tool_specified"; then
8860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8861$as_echo "not found" >&6; }
8862          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8863        fi
8864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8865$as_echo "$tool_specified" >&6; }
8866      fi
8867    fi
8868  fi
8869
8870
8871
8872  if test "x$PRINTF" = x; then
8873    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8874  fi
8875
8876
8877
8878
8879
8880  # Publish this variable in the help.
8881
8882
8883  if test "x$RM" = x; then
8884    # The variable is not set by user, try to locate tool using the code snippet
8885    for ac_prog in rm
8886do
8887  # Extract the first word of "$ac_prog", so it can be a program name with args.
8888set dummy $ac_prog; ac_word=$2
8889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8890$as_echo_n "checking for $ac_word... " >&6; }
8891if ${ac_cv_path_RM+:} false; then :
8892  $as_echo_n "(cached) " >&6
8893else
8894  case $RM in
8895  [\\/]* | ?:[\\/]*)
8896  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8897  ;;
8898  *)
8899  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8900for as_dir in $PATH
8901do
8902  IFS=$as_save_IFS
8903  test -z "$as_dir" && as_dir=.
8904    for ac_exec_ext in '' $ac_executable_extensions; do
8905  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8906    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8907    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8908    break 2
8909  fi
8910done
8911  done
8912IFS=$as_save_IFS
8913
8914  ;;
8915esac
8916fi
8917RM=$ac_cv_path_RM
8918if test -n "$RM"; then
8919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8920$as_echo "$RM" >&6; }
8921else
8922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8923$as_echo "no" >&6; }
8924fi
8925
8926
8927  test -n "$RM" && break
8928done
8929
8930  else
8931    # The variable is set, but is it from the command line or the environment?
8932
8933    # Try to remove the string !RM! from our list.
8934    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8935    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8936      # If it failed, the variable was not from the command line. Ignore it,
8937      # but warn the user (except for BASH, which is always set by the calling BASH).
8938      if test "xRM" != xBASH; then
8939        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8940$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8941      fi
8942      # Try to locate tool using the code snippet
8943      for ac_prog in rm
8944do
8945  # Extract the first word of "$ac_prog", so it can be a program name with args.
8946set dummy $ac_prog; ac_word=$2
8947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8948$as_echo_n "checking for $ac_word... " >&6; }
8949if ${ac_cv_path_RM+:} false; then :
8950  $as_echo_n "(cached) " >&6
8951else
8952  case $RM in
8953  [\\/]* | ?:[\\/]*)
8954  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8955  ;;
8956  *)
8957  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8958for as_dir in $PATH
8959do
8960  IFS=$as_save_IFS
8961  test -z "$as_dir" && as_dir=.
8962    for ac_exec_ext in '' $ac_executable_extensions; do
8963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8964    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8966    break 2
8967  fi
8968done
8969  done
8970IFS=$as_save_IFS
8971
8972  ;;
8973esac
8974fi
8975RM=$ac_cv_path_RM
8976if test -n "$RM"; then
8977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8978$as_echo "$RM" >&6; }
8979else
8980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8981$as_echo "no" >&6; }
8982fi
8983
8984
8985  test -n "$RM" && break
8986done
8987
8988    else
8989      # If it succeeded, then it was overridden by the user. We will use it
8990      # for the tool.
8991
8992      # First remove it from the list of overridden variables, so we can test
8993      # for unknown variables in the end.
8994      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8995
8996      # Check if the provided tool contains a complete path.
8997      tool_specified="$RM"
8998      tool_basename="${tool_specified##*/}"
8999      if test "x$tool_basename" = "x$tool_specified"; then
9000        # A command without a complete path is provided, search $PATH.
9001        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9002$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9003        # Extract the first word of "$tool_basename", so it can be a program name with args.
9004set dummy $tool_basename; ac_word=$2
9005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9006$as_echo_n "checking for $ac_word... " >&6; }
9007if ${ac_cv_path_RM+:} false; then :
9008  $as_echo_n "(cached) " >&6
9009else
9010  case $RM in
9011  [\\/]* | ?:[\\/]*)
9012  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9013  ;;
9014  *)
9015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9016for as_dir in $PATH
9017do
9018  IFS=$as_save_IFS
9019  test -z "$as_dir" && as_dir=.
9020    for ac_exec_ext in '' $ac_executable_extensions; do
9021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9022    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9024    break 2
9025  fi
9026done
9027  done
9028IFS=$as_save_IFS
9029
9030  ;;
9031esac
9032fi
9033RM=$ac_cv_path_RM
9034if test -n "$RM"; then
9035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9036$as_echo "$RM" >&6; }
9037else
9038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
9040fi
9041
9042
9043        if test "x$RM" = x; then
9044          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9045        fi
9046      else
9047        # Otherwise we believe it is a complete path. Use it as it is.
9048        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9049$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9050        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9051$as_echo_n "checking for RM... " >&6; }
9052        if test ! -x "$tool_specified"; then
9053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9054$as_echo "not found" >&6; }
9055          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9056        fi
9057        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9058$as_echo "$tool_specified" >&6; }
9059      fi
9060    fi
9061  fi
9062
9063
9064
9065  if test "x$RM" = x; then
9066    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9067  fi
9068
9069
9070
9071
9072
9073  # Publish this variable in the help.
9074
9075
9076  if test "x$SH" = x; then
9077    # The variable is not set by user, try to locate tool using the code snippet
9078    for ac_prog in sh
9079do
9080  # Extract the first word of "$ac_prog", so it can be a program name with args.
9081set dummy $ac_prog; ac_word=$2
9082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9083$as_echo_n "checking for $ac_word... " >&6; }
9084if ${ac_cv_path_SH+:} false; then :
9085  $as_echo_n "(cached) " >&6
9086else
9087  case $SH in
9088  [\\/]* | ?:[\\/]*)
9089  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9090  ;;
9091  *)
9092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9093for as_dir in $PATH
9094do
9095  IFS=$as_save_IFS
9096  test -z "$as_dir" && as_dir=.
9097    for ac_exec_ext in '' $ac_executable_extensions; do
9098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9099    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9101    break 2
9102  fi
9103done
9104  done
9105IFS=$as_save_IFS
9106
9107  ;;
9108esac
9109fi
9110SH=$ac_cv_path_SH
9111if test -n "$SH"; then
9112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9113$as_echo "$SH" >&6; }
9114else
9115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9116$as_echo "no" >&6; }
9117fi
9118
9119
9120  test -n "$SH" && break
9121done
9122
9123  else
9124    # The variable is set, but is it from the command line or the environment?
9125
9126    # Try to remove the string !SH! from our list.
9127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9129      # If it failed, the variable was not from the command line. Ignore it,
9130      # but warn the user (except for BASH, which is always set by the calling BASH).
9131      if test "xSH" != xBASH; then
9132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9133$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9134      fi
9135      # Try to locate tool using the code snippet
9136      for ac_prog in sh
9137do
9138  # Extract the first word of "$ac_prog", so it can be a program name with args.
9139set dummy $ac_prog; ac_word=$2
9140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9141$as_echo_n "checking for $ac_word... " >&6; }
9142if ${ac_cv_path_SH+:} false; then :
9143  $as_echo_n "(cached) " >&6
9144else
9145  case $SH in
9146  [\\/]* | ?:[\\/]*)
9147  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9148  ;;
9149  *)
9150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9151for as_dir in $PATH
9152do
9153  IFS=$as_save_IFS
9154  test -z "$as_dir" && as_dir=.
9155    for ac_exec_ext in '' $ac_executable_extensions; do
9156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9157    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9159    break 2
9160  fi
9161done
9162  done
9163IFS=$as_save_IFS
9164
9165  ;;
9166esac
9167fi
9168SH=$ac_cv_path_SH
9169if test -n "$SH"; then
9170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9171$as_echo "$SH" >&6; }
9172else
9173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9174$as_echo "no" >&6; }
9175fi
9176
9177
9178  test -n "$SH" && break
9179done
9180
9181    else
9182      # If it succeeded, then it was overridden by the user. We will use it
9183      # for the tool.
9184
9185      # First remove it from the list of overridden variables, so we can test
9186      # for unknown variables in the end.
9187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9188
9189      # Check if the provided tool contains a complete path.
9190      tool_specified="$SH"
9191      tool_basename="${tool_specified##*/}"
9192      if test "x$tool_basename" = "x$tool_specified"; then
9193        # A command without a complete path is provided, search $PATH.
9194        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9195$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9196        # Extract the first word of "$tool_basename", so it can be a program name with args.
9197set dummy $tool_basename; ac_word=$2
9198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9199$as_echo_n "checking for $ac_word... " >&6; }
9200if ${ac_cv_path_SH+:} false; then :
9201  $as_echo_n "(cached) " >&6
9202else
9203  case $SH in
9204  [\\/]* | ?:[\\/]*)
9205  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9206  ;;
9207  *)
9208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9209for as_dir in $PATH
9210do
9211  IFS=$as_save_IFS
9212  test -z "$as_dir" && as_dir=.
9213    for ac_exec_ext in '' $ac_executable_extensions; do
9214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9215    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9217    break 2
9218  fi
9219done
9220  done
9221IFS=$as_save_IFS
9222
9223  ;;
9224esac
9225fi
9226SH=$ac_cv_path_SH
9227if test -n "$SH"; then
9228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9229$as_echo "$SH" >&6; }
9230else
9231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9232$as_echo "no" >&6; }
9233fi
9234
9235
9236        if test "x$SH" = x; then
9237          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9238        fi
9239      else
9240        # Otherwise we believe it is a complete path. Use it as it is.
9241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9242$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9243        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9244$as_echo_n "checking for SH... " >&6; }
9245        if test ! -x "$tool_specified"; then
9246          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9247$as_echo "not found" >&6; }
9248          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9249        fi
9250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9251$as_echo "$tool_specified" >&6; }
9252      fi
9253    fi
9254  fi
9255
9256
9257
9258  if test "x$SH" = x; then
9259    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9260  fi
9261
9262
9263
9264
9265
9266  # Publish this variable in the help.
9267
9268
9269  if test "x$SORT" = x; then
9270    # The variable is not set by user, try to locate tool using the code snippet
9271    for ac_prog in sort
9272do
9273  # Extract the first word of "$ac_prog", so it can be a program name with args.
9274set dummy $ac_prog; ac_word=$2
9275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9276$as_echo_n "checking for $ac_word... " >&6; }
9277if ${ac_cv_path_SORT+:} false; then :
9278  $as_echo_n "(cached) " >&6
9279else
9280  case $SORT in
9281  [\\/]* | ?:[\\/]*)
9282  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9283  ;;
9284  *)
9285  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9286for as_dir in $PATH
9287do
9288  IFS=$as_save_IFS
9289  test -z "$as_dir" && as_dir=.
9290    for ac_exec_ext in '' $ac_executable_extensions; do
9291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9292    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9294    break 2
9295  fi
9296done
9297  done
9298IFS=$as_save_IFS
9299
9300  ;;
9301esac
9302fi
9303SORT=$ac_cv_path_SORT
9304if test -n "$SORT"; then
9305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9306$as_echo "$SORT" >&6; }
9307else
9308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9309$as_echo "no" >&6; }
9310fi
9311
9312
9313  test -n "$SORT" && break
9314done
9315
9316  else
9317    # The variable is set, but is it from the command line or the environment?
9318
9319    # Try to remove the string !SORT! from our list.
9320    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9321    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9322      # If it failed, the variable was not from the command line. Ignore it,
9323      # but warn the user (except for BASH, which is always set by the calling BASH).
9324      if test "xSORT" != xBASH; then
9325        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9326$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9327      fi
9328      # Try to locate tool using the code snippet
9329      for ac_prog in sort
9330do
9331  # Extract the first word of "$ac_prog", so it can be a program name with args.
9332set dummy $ac_prog; ac_word=$2
9333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9334$as_echo_n "checking for $ac_word... " >&6; }
9335if ${ac_cv_path_SORT+:} false; then :
9336  $as_echo_n "(cached) " >&6
9337else
9338  case $SORT in
9339  [\\/]* | ?:[\\/]*)
9340  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9341  ;;
9342  *)
9343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9344for as_dir in $PATH
9345do
9346  IFS=$as_save_IFS
9347  test -z "$as_dir" && as_dir=.
9348    for ac_exec_ext in '' $ac_executable_extensions; do
9349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9350    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9352    break 2
9353  fi
9354done
9355  done
9356IFS=$as_save_IFS
9357
9358  ;;
9359esac
9360fi
9361SORT=$ac_cv_path_SORT
9362if test -n "$SORT"; then
9363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9364$as_echo "$SORT" >&6; }
9365else
9366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9367$as_echo "no" >&6; }
9368fi
9369
9370
9371  test -n "$SORT" && break
9372done
9373
9374    else
9375      # If it succeeded, then it was overridden by the user. We will use it
9376      # for the tool.
9377
9378      # First remove it from the list of overridden variables, so we can test
9379      # for unknown variables in the end.
9380      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9381
9382      # Check if the provided tool contains a complete path.
9383      tool_specified="$SORT"
9384      tool_basename="${tool_specified##*/}"
9385      if test "x$tool_basename" = "x$tool_specified"; then
9386        # A command without a complete path is provided, search $PATH.
9387        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9388$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9389        # Extract the first word of "$tool_basename", so it can be a program name with args.
9390set dummy $tool_basename; ac_word=$2
9391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9392$as_echo_n "checking for $ac_word... " >&6; }
9393if ${ac_cv_path_SORT+:} false; then :
9394  $as_echo_n "(cached) " >&6
9395else
9396  case $SORT in
9397  [\\/]* | ?:[\\/]*)
9398  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9399  ;;
9400  *)
9401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9402for as_dir in $PATH
9403do
9404  IFS=$as_save_IFS
9405  test -z "$as_dir" && as_dir=.
9406    for ac_exec_ext in '' $ac_executable_extensions; do
9407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9408    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9410    break 2
9411  fi
9412done
9413  done
9414IFS=$as_save_IFS
9415
9416  ;;
9417esac
9418fi
9419SORT=$ac_cv_path_SORT
9420if test -n "$SORT"; then
9421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9422$as_echo "$SORT" >&6; }
9423else
9424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9425$as_echo "no" >&6; }
9426fi
9427
9428
9429        if test "x$SORT" = x; then
9430          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9431        fi
9432      else
9433        # Otherwise we believe it is a complete path. Use it as it is.
9434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9435$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9436        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9437$as_echo_n "checking for SORT... " >&6; }
9438        if test ! -x "$tool_specified"; then
9439          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9440$as_echo "not found" >&6; }
9441          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9442        fi
9443        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9444$as_echo "$tool_specified" >&6; }
9445      fi
9446    fi
9447  fi
9448
9449
9450
9451  if test "x$SORT" = x; then
9452    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9453  fi
9454
9455
9456
9457
9458
9459  # Publish this variable in the help.
9460
9461
9462  if test "x$TAIL" = x; then
9463    # The variable is not set by user, try to locate tool using the code snippet
9464    for ac_prog in tail
9465do
9466  # Extract the first word of "$ac_prog", so it can be a program name with args.
9467set dummy $ac_prog; ac_word=$2
9468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9469$as_echo_n "checking for $ac_word... " >&6; }
9470if ${ac_cv_path_TAIL+:} false; then :
9471  $as_echo_n "(cached) " >&6
9472else
9473  case $TAIL in
9474  [\\/]* | ?:[\\/]*)
9475  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9476  ;;
9477  *)
9478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9479for as_dir in $PATH
9480do
9481  IFS=$as_save_IFS
9482  test -z "$as_dir" && as_dir=.
9483    for ac_exec_ext in '' $ac_executable_extensions; do
9484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9485    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9487    break 2
9488  fi
9489done
9490  done
9491IFS=$as_save_IFS
9492
9493  ;;
9494esac
9495fi
9496TAIL=$ac_cv_path_TAIL
9497if test -n "$TAIL"; then
9498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9499$as_echo "$TAIL" >&6; }
9500else
9501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9502$as_echo "no" >&6; }
9503fi
9504
9505
9506  test -n "$TAIL" && break
9507done
9508
9509  else
9510    # The variable is set, but is it from the command line or the environment?
9511
9512    # Try to remove the string !TAIL! from our list.
9513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9515      # If it failed, the variable was not from the command line. Ignore it,
9516      # but warn the user (except for BASH, which is always set by the calling BASH).
9517      if test "xTAIL" != xBASH; then
9518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9519$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9520      fi
9521      # Try to locate tool using the code snippet
9522      for ac_prog in tail
9523do
9524  # Extract the first word of "$ac_prog", so it can be a program name with args.
9525set dummy $ac_prog; ac_word=$2
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9527$as_echo_n "checking for $ac_word... " >&6; }
9528if ${ac_cv_path_TAIL+:} false; then :
9529  $as_echo_n "(cached) " >&6
9530else
9531  case $TAIL in
9532  [\\/]* | ?:[\\/]*)
9533  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9534  ;;
9535  *)
9536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9537for as_dir in $PATH
9538do
9539  IFS=$as_save_IFS
9540  test -z "$as_dir" && as_dir=.
9541    for ac_exec_ext in '' $ac_executable_extensions; do
9542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9543    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9545    break 2
9546  fi
9547done
9548  done
9549IFS=$as_save_IFS
9550
9551  ;;
9552esac
9553fi
9554TAIL=$ac_cv_path_TAIL
9555if test -n "$TAIL"; then
9556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9557$as_echo "$TAIL" >&6; }
9558else
9559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9560$as_echo "no" >&6; }
9561fi
9562
9563
9564  test -n "$TAIL" && break
9565done
9566
9567    else
9568      # If it succeeded, then it was overridden by the user. We will use it
9569      # for the tool.
9570
9571      # First remove it from the list of overridden variables, so we can test
9572      # for unknown variables in the end.
9573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9574
9575      # Check if the provided tool contains a complete path.
9576      tool_specified="$TAIL"
9577      tool_basename="${tool_specified##*/}"
9578      if test "x$tool_basename" = "x$tool_specified"; then
9579        # A command without a complete path is provided, search $PATH.
9580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9581$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9582        # Extract the first word of "$tool_basename", so it can be a program name with args.
9583set dummy $tool_basename; ac_word=$2
9584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9585$as_echo_n "checking for $ac_word... " >&6; }
9586if ${ac_cv_path_TAIL+:} false; then :
9587  $as_echo_n "(cached) " >&6
9588else
9589  case $TAIL in
9590  [\\/]* | ?:[\\/]*)
9591  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9592  ;;
9593  *)
9594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9595for as_dir in $PATH
9596do
9597  IFS=$as_save_IFS
9598  test -z "$as_dir" && as_dir=.
9599    for ac_exec_ext in '' $ac_executable_extensions; do
9600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9601    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9603    break 2
9604  fi
9605done
9606  done
9607IFS=$as_save_IFS
9608
9609  ;;
9610esac
9611fi
9612TAIL=$ac_cv_path_TAIL
9613if test -n "$TAIL"; then
9614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9615$as_echo "$TAIL" >&6; }
9616else
9617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9618$as_echo "no" >&6; }
9619fi
9620
9621
9622        if test "x$TAIL" = x; then
9623          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9624        fi
9625      else
9626        # Otherwise we believe it is a complete path. Use it as it is.
9627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9628$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9630$as_echo_n "checking for TAIL... " >&6; }
9631        if test ! -x "$tool_specified"; then
9632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9633$as_echo "not found" >&6; }
9634          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9635        fi
9636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9637$as_echo "$tool_specified" >&6; }
9638      fi
9639    fi
9640  fi
9641
9642
9643
9644  if test "x$TAIL" = x; then
9645    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9646  fi
9647
9648
9649
9650
9651
9652  # Publish this variable in the help.
9653
9654
9655  if test "x$TAR" = x; then
9656    # The variable is not set by user, try to locate tool using the code snippet
9657    for ac_prog in tar
9658do
9659  # Extract the first word of "$ac_prog", so it can be a program name with args.
9660set dummy $ac_prog; ac_word=$2
9661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9662$as_echo_n "checking for $ac_word... " >&6; }
9663if ${ac_cv_path_TAR+:} false; then :
9664  $as_echo_n "(cached) " >&6
9665else
9666  case $TAR in
9667  [\\/]* | ?:[\\/]*)
9668  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9669  ;;
9670  *)
9671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9672for as_dir in $PATH
9673do
9674  IFS=$as_save_IFS
9675  test -z "$as_dir" && as_dir=.
9676    for ac_exec_ext in '' $ac_executable_extensions; do
9677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9678    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9680    break 2
9681  fi
9682done
9683  done
9684IFS=$as_save_IFS
9685
9686  ;;
9687esac
9688fi
9689TAR=$ac_cv_path_TAR
9690if test -n "$TAR"; then
9691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9692$as_echo "$TAR" >&6; }
9693else
9694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9695$as_echo "no" >&6; }
9696fi
9697
9698
9699  test -n "$TAR" && break
9700done
9701
9702  else
9703    # The variable is set, but is it from the command line or the environment?
9704
9705    # Try to remove the string !TAR! from our list.
9706    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9707    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9708      # If it failed, the variable was not from the command line. Ignore it,
9709      # but warn the user (except for BASH, which is always set by the calling BASH).
9710      if test "xTAR" != xBASH; then
9711        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9712$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9713      fi
9714      # Try to locate tool using the code snippet
9715      for ac_prog in tar
9716do
9717  # Extract the first word of "$ac_prog", so it can be a program name with args.
9718set dummy $ac_prog; ac_word=$2
9719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9720$as_echo_n "checking for $ac_word... " >&6; }
9721if ${ac_cv_path_TAR+:} false; then :
9722  $as_echo_n "(cached) " >&6
9723else
9724  case $TAR in
9725  [\\/]* | ?:[\\/]*)
9726  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9727  ;;
9728  *)
9729  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9730for as_dir in $PATH
9731do
9732  IFS=$as_save_IFS
9733  test -z "$as_dir" && as_dir=.
9734    for ac_exec_ext in '' $ac_executable_extensions; do
9735  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9736    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9737    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9738    break 2
9739  fi
9740done
9741  done
9742IFS=$as_save_IFS
9743
9744  ;;
9745esac
9746fi
9747TAR=$ac_cv_path_TAR
9748if test -n "$TAR"; then
9749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9750$as_echo "$TAR" >&6; }
9751else
9752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9753$as_echo "no" >&6; }
9754fi
9755
9756
9757  test -n "$TAR" && break
9758done
9759
9760    else
9761      # If it succeeded, then it was overridden by the user. We will use it
9762      # for the tool.
9763
9764      # First remove it from the list of overridden variables, so we can test
9765      # for unknown variables in the end.
9766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9767
9768      # Check if the provided tool contains a complete path.
9769      tool_specified="$TAR"
9770      tool_basename="${tool_specified##*/}"
9771      if test "x$tool_basename" = "x$tool_specified"; then
9772        # A command without a complete path is provided, search $PATH.
9773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9774$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9775        # Extract the first word of "$tool_basename", so it can be a program name with args.
9776set dummy $tool_basename; ac_word=$2
9777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9778$as_echo_n "checking for $ac_word... " >&6; }
9779if ${ac_cv_path_TAR+:} false; then :
9780  $as_echo_n "(cached) " >&6
9781else
9782  case $TAR in
9783  [\\/]* | ?:[\\/]*)
9784  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9785  ;;
9786  *)
9787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9788for as_dir in $PATH
9789do
9790  IFS=$as_save_IFS
9791  test -z "$as_dir" && as_dir=.
9792    for ac_exec_ext in '' $ac_executable_extensions; do
9793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9794    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9796    break 2
9797  fi
9798done
9799  done
9800IFS=$as_save_IFS
9801
9802  ;;
9803esac
9804fi
9805TAR=$ac_cv_path_TAR
9806if test -n "$TAR"; then
9807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9808$as_echo "$TAR" >&6; }
9809else
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9811$as_echo "no" >&6; }
9812fi
9813
9814
9815        if test "x$TAR" = x; then
9816          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9817        fi
9818      else
9819        # Otherwise we believe it is a complete path. Use it as it is.
9820        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9821$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9822        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9823$as_echo_n "checking for TAR... " >&6; }
9824        if test ! -x "$tool_specified"; then
9825          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9826$as_echo "not found" >&6; }
9827          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9828        fi
9829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9830$as_echo "$tool_specified" >&6; }
9831      fi
9832    fi
9833  fi
9834
9835
9836
9837  if test "x$TAR" = x; then
9838    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9839  fi
9840
9841
9842
9843
9844
9845  # Publish this variable in the help.
9846
9847
9848  if test "x$TEE" = x; then
9849    # The variable is not set by user, try to locate tool using the code snippet
9850    for ac_prog in tee
9851do
9852  # Extract the first word of "$ac_prog", so it can be a program name with args.
9853set dummy $ac_prog; ac_word=$2
9854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9855$as_echo_n "checking for $ac_word... " >&6; }
9856if ${ac_cv_path_TEE+:} false; then :
9857  $as_echo_n "(cached) " >&6
9858else
9859  case $TEE in
9860  [\\/]* | ?:[\\/]*)
9861  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9862  ;;
9863  *)
9864  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9865for as_dir in $PATH
9866do
9867  IFS=$as_save_IFS
9868  test -z "$as_dir" && as_dir=.
9869    for ac_exec_ext in '' $ac_executable_extensions; do
9870  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9871    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9872    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9873    break 2
9874  fi
9875done
9876  done
9877IFS=$as_save_IFS
9878
9879  ;;
9880esac
9881fi
9882TEE=$ac_cv_path_TEE
9883if test -n "$TEE"; then
9884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9885$as_echo "$TEE" >&6; }
9886else
9887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9888$as_echo "no" >&6; }
9889fi
9890
9891
9892  test -n "$TEE" && break
9893done
9894
9895  else
9896    # The variable is set, but is it from the command line or the environment?
9897
9898    # Try to remove the string !TEE! from our list.
9899    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9900    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9901      # If it failed, the variable was not from the command line. Ignore it,
9902      # but warn the user (except for BASH, which is always set by the calling BASH).
9903      if test "xTEE" != xBASH; then
9904        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9905$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9906      fi
9907      # Try to locate tool using the code snippet
9908      for ac_prog in tee
9909do
9910  # Extract the first word of "$ac_prog", so it can be a program name with args.
9911set dummy $ac_prog; ac_word=$2
9912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9913$as_echo_n "checking for $ac_word... " >&6; }
9914if ${ac_cv_path_TEE+:} false; then :
9915  $as_echo_n "(cached) " >&6
9916else
9917  case $TEE in
9918  [\\/]* | ?:[\\/]*)
9919  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9920  ;;
9921  *)
9922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9923for as_dir in $PATH
9924do
9925  IFS=$as_save_IFS
9926  test -z "$as_dir" && as_dir=.
9927    for ac_exec_ext in '' $ac_executable_extensions; do
9928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9929    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9931    break 2
9932  fi
9933done
9934  done
9935IFS=$as_save_IFS
9936
9937  ;;
9938esac
9939fi
9940TEE=$ac_cv_path_TEE
9941if test -n "$TEE"; then
9942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9943$as_echo "$TEE" >&6; }
9944else
9945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9946$as_echo "no" >&6; }
9947fi
9948
9949
9950  test -n "$TEE" && break
9951done
9952
9953    else
9954      # If it succeeded, then it was overridden by the user. We will use it
9955      # for the tool.
9956
9957      # First remove it from the list of overridden variables, so we can test
9958      # for unknown variables in the end.
9959      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9960
9961      # Check if the provided tool contains a complete path.
9962      tool_specified="$TEE"
9963      tool_basename="${tool_specified##*/}"
9964      if test "x$tool_basename" = "x$tool_specified"; then
9965        # A command without a complete path is provided, search $PATH.
9966        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9967$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9968        # Extract the first word of "$tool_basename", so it can be a program name with args.
9969set dummy $tool_basename; ac_word=$2
9970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9971$as_echo_n "checking for $ac_word... " >&6; }
9972if ${ac_cv_path_TEE+:} false; then :
9973  $as_echo_n "(cached) " >&6
9974else
9975  case $TEE in
9976  [\\/]* | ?:[\\/]*)
9977  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9978  ;;
9979  *)
9980  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9981for as_dir in $PATH
9982do
9983  IFS=$as_save_IFS
9984  test -z "$as_dir" && as_dir=.
9985    for ac_exec_ext in '' $ac_executable_extensions; do
9986  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9987    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9988    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9989    break 2
9990  fi
9991done
9992  done
9993IFS=$as_save_IFS
9994
9995  ;;
9996esac
9997fi
9998TEE=$ac_cv_path_TEE
9999if test -n "$TEE"; then
10000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10001$as_echo "$TEE" >&6; }
10002else
10003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10004$as_echo "no" >&6; }
10005fi
10006
10007
10008        if test "x$TEE" = x; then
10009          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10010        fi
10011      else
10012        # Otherwise we believe it is a complete path. Use it as it is.
10013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10014$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10015        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10016$as_echo_n "checking for TEE... " >&6; }
10017        if test ! -x "$tool_specified"; then
10018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10019$as_echo "not found" >&6; }
10020          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10021        fi
10022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10023$as_echo "$tool_specified" >&6; }
10024      fi
10025    fi
10026  fi
10027
10028
10029
10030  if test "x$TEE" = x; then
10031    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10032  fi
10033
10034
10035
10036
10037
10038  # Publish this variable in the help.
10039
10040
10041  if test "x$TOUCH" = x; then
10042    # The variable is not set by user, try to locate tool using the code snippet
10043    for ac_prog in touch
10044do
10045  # Extract the first word of "$ac_prog", so it can be a program name with args.
10046set dummy $ac_prog; ac_word=$2
10047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10048$as_echo_n "checking for $ac_word... " >&6; }
10049if ${ac_cv_path_TOUCH+:} false; then :
10050  $as_echo_n "(cached) " >&6
10051else
10052  case $TOUCH in
10053  [\\/]* | ?:[\\/]*)
10054  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10055  ;;
10056  *)
10057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10058for as_dir in $PATH
10059do
10060  IFS=$as_save_IFS
10061  test -z "$as_dir" && as_dir=.
10062    for ac_exec_ext in '' $ac_executable_extensions; do
10063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10064    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10066    break 2
10067  fi
10068done
10069  done
10070IFS=$as_save_IFS
10071
10072  ;;
10073esac
10074fi
10075TOUCH=$ac_cv_path_TOUCH
10076if test -n "$TOUCH"; then
10077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10078$as_echo "$TOUCH" >&6; }
10079else
10080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081$as_echo "no" >&6; }
10082fi
10083
10084
10085  test -n "$TOUCH" && break
10086done
10087
10088  else
10089    # The variable is set, but is it from the command line or the environment?
10090
10091    # Try to remove the string !TOUCH! from our list.
10092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10094      # If it failed, the variable was not from the command line. Ignore it,
10095      # but warn the user (except for BASH, which is always set by the calling BASH).
10096      if test "xTOUCH" != xBASH; then
10097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10098$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10099      fi
10100      # Try to locate tool using the code snippet
10101      for ac_prog in touch
10102do
10103  # Extract the first word of "$ac_prog", so it can be a program name with args.
10104set dummy $ac_prog; ac_word=$2
10105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106$as_echo_n "checking for $ac_word... " >&6; }
10107if ${ac_cv_path_TOUCH+:} false; then :
10108  $as_echo_n "(cached) " >&6
10109else
10110  case $TOUCH in
10111  [\\/]* | ?:[\\/]*)
10112  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10113  ;;
10114  *)
10115  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116for as_dir in $PATH
10117do
10118  IFS=$as_save_IFS
10119  test -z "$as_dir" && as_dir=.
10120    for ac_exec_ext in '' $ac_executable_extensions; do
10121  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10123    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124    break 2
10125  fi
10126done
10127  done
10128IFS=$as_save_IFS
10129
10130  ;;
10131esac
10132fi
10133TOUCH=$ac_cv_path_TOUCH
10134if test -n "$TOUCH"; then
10135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10136$as_echo "$TOUCH" >&6; }
10137else
10138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139$as_echo "no" >&6; }
10140fi
10141
10142
10143  test -n "$TOUCH" && break
10144done
10145
10146    else
10147      # If it succeeded, then it was overridden by the user. We will use it
10148      # for the tool.
10149
10150      # First remove it from the list of overridden variables, so we can test
10151      # for unknown variables in the end.
10152      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10153
10154      # Check if the provided tool contains a complete path.
10155      tool_specified="$TOUCH"
10156      tool_basename="${tool_specified##*/}"
10157      if test "x$tool_basename" = "x$tool_specified"; then
10158        # A command without a complete path is provided, search $PATH.
10159        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10160$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10161        # Extract the first word of "$tool_basename", so it can be a program name with args.
10162set dummy $tool_basename; ac_word=$2
10163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10164$as_echo_n "checking for $ac_word... " >&6; }
10165if ${ac_cv_path_TOUCH+:} false; then :
10166  $as_echo_n "(cached) " >&6
10167else
10168  case $TOUCH in
10169  [\\/]* | ?:[\\/]*)
10170  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10171  ;;
10172  *)
10173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10174for as_dir in $PATH
10175do
10176  IFS=$as_save_IFS
10177  test -z "$as_dir" && as_dir=.
10178    for ac_exec_ext in '' $ac_executable_extensions; do
10179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10180    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10182    break 2
10183  fi
10184done
10185  done
10186IFS=$as_save_IFS
10187
10188  ;;
10189esac
10190fi
10191TOUCH=$ac_cv_path_TOUCH
10192if test -n "$TOUCH"; then
10193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10194$as_echo "$TOUCH" >&6; }
10195else
10196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
10198fi
10199
10200
10201        if test "x$TOUCH" = x; then
10202          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10203        fi
10204      else
10205        # Otherwise we believe it is a complete path. Use it as it is.
10206        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10207$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10209$as_echo_n "checking for TOUCH... " >&6; }
10210        if test ! -x "$tool_specified"; then
10211          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10212$as_echo "not found" >&6; }
10213          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10214        fi
10215        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10216$as_echo "$tool_specified" >&6; }
10217      fi
10218    fi
10219  fi
10220
10221
10222
10223  if test "x$TOUCH" = x; then
10224    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10225  fi
10226
10227
10228
10229
10230
10231  # Publish this variable in the help.
10232
10233
10234  if test "x$TR" = x; then
10235    # The variable is not set by user, try to locate tool using the code snippet
10236    for ac_prog in tr
10237do
10238  # Extract the first word of "$ac_prog", so it can be a program name with args.
10239set dummy $ac_prog; ac_word=$2
10240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10241$as_echo_n "checking for $ac_word... " >&6; }
10242if ${ac_cv_path_TR+:} false; then :
10243  $as_echo_n "(cached) " >&6
10244else
10245  case $TR in
10246  [\\/]* | ?:[\\/]*)
10247  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10248  ;;
10249  *)
10250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10251for as_dir in $PATH
10252do
10253  IFS=$as_save_IFS
10254  test -z "$as_dir" && as_dir=.
10255    for ac_exec_ext in '' $ac_executable_extensions; do
10256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10257    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10259    break 2
10260  fi
10261done
10262  done
10263IFS=$as_save_IFS
10264
10265  ;;
10266esac
10267fi
10268TR=$ac_cv_path_TR
10269if test -n "$TR"; then
10270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10271$as_echo "$TR" >&6; }
10272else
10273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10274$as_echo "no" >&6; }
10275fi
10276
10277
10278  test -n "$TR" && break
10279done
10280
10281  else
10282    # The variable is set, but is it from the command line or the environment?
10283
10284    # Try to remove the string !TR! from our list.
10285    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10286    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10287      # If it failed, the variable was not from the command line. Ignore it,
10288      # but warn the user (except for BASH, which is always set by the calling BASH).
10289      if test "xTR" != xBASH; then
10290        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10291$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10292      fi
10293      # Try to locate tool using the code snippet
10294      for ac_prog in tr
10295do
10296  # Extract the first word of "$ac_prog", so it can be a program name with args.
10297set dummy $ac_prog; ac_word=$2
10298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10299$as_echo_n "checking for $ac_word... " >&6; }
10300if ${ac_cv_path_TR+:} false; then :
10301  $as_echo_n "(cached) " >&6
10302else
10303  case $TR in
10304  [\\/]* | ?:[\\/]*)
10305  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10306  ;;
10307  *)
10308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10309for as_dir in $PATH
10310do
10311  IFS=$as_save_IFS
10312  test -z "$as_dir" && as_dir=.
10313    for ac_exec_ext in '' $ac_executable_extensions; do
10314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10315    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10317    break 2
10318  fi
10319done
10320  done
10321IFS=$as_save_IFS
10322
10323  ;;
10324esac
10325fi
10326TR=$ac_cv_path_TR
10327if test -n "$TR"; then
10328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10329$as_echo "$TR" >&6; }
10330else
10331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10332$as_echo "no" >&6; }
10333fi
10334
10335
10336  test -n "$TR" && break
10337done
10338
10339    else
10340      # If it succeeded, then it was overridden by the user. We will use it
10341      # for the tool.
10342
10343      # First remove it from the list of overridden variables, so we can test
10344      # for unknown variables in the end.
10345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10346
10347      # Check if the provided tool contains a complete path.
10348      tool_specified="$TR"
10349      tool_basename="${tool_specified##*/}"
10350      if test "x$tool_basename" = "x$tool_specified"; then
10351        # A command without a complete path is provided, search $PATH.
10352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10353$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10354        # Extract the first word of "$tool_basename", so it can be a program name with args.
10355set dummy $tool_basename; ac_word=$2
10356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10357$as_echo_n "checking for $ac_word... " >&6; }
10358if ${ac_cv_path_TR+:} false; then :
10359  $as_echo_n "(cached) " >&6
10360else
10361  case $TR in
10362  [\\/]* | ?:[\\/]*)
10363  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10364  ;;
10365  *)
10366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10367for as_dir in $PATH
10368do
10369  IFS=$as_save_IFS
10370  test -z "$as_dir" && as_dir=.
10371    for ac_exec_ext in '' $ac_executable_extensions; do
10372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10373    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10375    break 2
10376  fi
10377done
10378  done
10379IFS=$as_save_IFS
10380
10381  ;;
10382esac
10383fi
10384TR=$ac_cv_path_TR
10385if test -n "$TR"; then
10386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10387$as_echo "$TR" >&6; }
10388else
10389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10390$as_echo "no" >&6; }
10391fi
10392
10393
10394        if test "x$TR" = x; then
10395          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10396        fi
10397      else
10398        # Otherwise we believe it is a complete path. Use it as it is.
10399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10400$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10402$as_echo_n "checking for TR... " >&6; }
10403        if test ! -x "$tool_specified"; then
10404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10405$as_echo "not found" >&6; }
10406          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10407        fi
10408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10409$as_echo "$tool_specified" >&6; }
10410      fi
10411    fi
10412  fi
10413
10414
10415
10416  if test "x$TR" = x; then
10417    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10418  fi
10419
10420
10421
10422
10423
10424  # Publish this variable in the help.
10425
10426
10427  if test "x$UNAME" = x; then
10428    # The variable is not set by user, try to locate tool using the code snippet
10429    for ac_prog in uname
10430do
10431  # Extract the first word of "$ac_prog", so it can be a program name with args.
10432set dummy $ac_prog; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_UNAME+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $UNAME in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461UNAME=$ac_cv_path_UNAME
10462if test -n "$UNAME"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10464$as_echo "$UNAME" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471  test -n "$UNAME" && break
10472done
10473
10474  else
10475    # The variable is set, but is it from the command line or the environment?
10476
10477    # Try to remove the string !UNAME! from our list.
10478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10480      # If it failed, the variable was not from the command line. Ignore it,
10481      # but warn the user (except for BASH, which is always set by the calling BASH).
10482      if test "xUNAME" != xBASH; then
10483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10484$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10485      fi
10486      # Try to locate tool using the code snippet
10487      for ac_prog in uname
10488do
10489  # Extract the first word of "$ac_prog", so it can be a program name with args.
10490set dummy $ac_prog; ac_word=$2
10491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10492$as_echo_n "checking for $ac_word... " >&6; }
10493if ${ac_cv_path_UNAME+:} false; then :
10494  $as_echo_n "(cached) " >&6
10495else
10496  case $UNAME in
10497  [\\/]* | ?:[\\/]*)
10498  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10499  ;;
10500  *)
10501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10502for as_dir in $PATH
10503do
10504  IFS=$as_save_IFS
10505  test -z "$as_dir" && as_dir=.
10506    for ac_exec_ext in '' $ac_executable_extensions; do
10507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10508    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10510    break 2
10511  fi
10512done
10513  done
10514IFS=$as_save_IFS
10515
10516  ;;
10517esac
10518fi
10519UNAME=$ac_cv_path_UNAME
10520if test -n "$UNAME"; then
10521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10522$as_echo "$UNAME" >&6; }
10523else
10524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10525$as_echo "no" >&6; }
10526fi
10527
10528
10529  test -n "$UNAME" && break
10530done
10531
10532    else
10533      # If it succeeded, then it was overridden by the user. We will use it
10534      # for the tool.
10535
10536      # First remove it from the list of overridden variables, so we can test
10537      # for unknown variables in the end.
10538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10539
10540      # Check if the provided tool contains a complete path.
10541      tool_specified="$UNAME"
10542      tool_basename="${tool_specified##*/}"
10543      if test "x$tool_basename" = "x$tool_specified"; then
10544        # A command without a complete path is provided, search $PATH.
10545        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10546$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10547        # Extract the first word of "$tool_basename", so it can be a program name with args.
10548set dummy $tool_basename; ac_word=$2
10549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10550$as_echo_n "checking for $ac_word... " >&6; }
10551if ${ac_cv_path_UNAME+:} false; then :
10552  $as_echo_n "(cached) " >&6
10553else
10554  case $UNAME in
10555  [\\/]* | ?:[\\/]*)
10556  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10557  ;;
10558  *)
10559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10560for as_dir in $PATH
10561do
10562  IFS=$as_save_IFS
10563  test -z "$as_dir" && as_dir=.
10564    for ac_exec_ext in '' $ac_executable_extensions; do
10565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10566    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10568    break 2
10569  fi
10570done
10571  done
10572IFS=$as_save_IFS
10573
10574  ;;
10575esac
10576fi
10577UNAME=$ac_cv_path_UNAME
10578if test -n "$UNAME"; then
10579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10580$as_echo "$UNAME" >&6; }
10581else
10582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10583$as_echo "no" >&6; }
10584fi
10585
10586
10587        if test "x$UNAME" = x; then
10588          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10589        fi
10590      else
10591        # Otherwise we believe it is a complete path. Use it as it is.
10592        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10593$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10594        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10595$as_echo_n "checking for UNAME... " >&6; }
10596        if test ! -x "$tool_specified"; then
10597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10598$as_echo "not found" >&6; }
10599          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10600        fi
10601        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10602$as_echo "$tool_specified" >&6; }
10603      fi
10604    fi
10605  fi
10606
10607
10608
10609  if test "x$UNAME" = x; then
10610    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10611  fi
10612
10613
10614
10615
10616
10617  # Publish this variable in the help.
10618
10619
10620  if test "x$UNIQ" = x; then
10621    # The variable is not set by user, try to locate tool using the code snippet
10622    for ac_prog in uniq
10623do
10624  # Extract the first word of "$ac_prog", so it can be a program name with args.
10625set dummy $ac_prog; ac_word=$2
10626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10627$as_echo_n "checking for $ac_word... " >&6; }
10628if ${ac_cv_path_UNIQ+:} false; then :
10629  $as_echo_n "(cached) " >&6
10630else
10631  case $UNIQ in
10632  [\\/]* | ?:[\\/]*)
10633  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10634  ;;
10635  *)
10636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10637for as_dir in $PATH
10638do
10639  IFS=$as_save_IFS
10640  test -z "$as_dir" && as_dir=.
10641    for ac_exec_ext in '' $ac_executable_extensions; do
10642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10643    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10645    break 2
10646  fi
10647done
10648  done
10649IFS=$as_save_IFS
10650
10651  ;;
10652esac
10653fi
10654UNIQ=$ac_cv_path_UNIQ
10655if test -n "$UNIQ"; then
10656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10657$as_echo "$UNIQ" >&6; }
10658else
10659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10660$as_echo "no" >&6; }
10661fi
10662
10663
10664  test -n "$UNIQ" && break
10665done
10666
10667  else
10668    # The variable is set, but is it from the command line or the environment?
10669
10670    # Try to remove the string !UNIQ! from our list.
10671    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10672    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10673      # If it failed, the variable was not from the command line. Ignore it,
10674      # but warn the user (except for BASH, which is always set by the calling BASH).
10675      if test "xUNIQ" != xBASH; then
10676        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10677$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10678      fi
10679      # Try to locate tool using the code snippet
10680      for ac_prog in uniq
10681do
10682  # Extract the first word of "$ac_prog", so it can be a program name with args.
10683set dummy $ac_prog; ac_word=$2
10684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10685$as_echo_n "checking for $ac_word... " >&6; }
10686if ${ac_cv_path_UNIQ+:} false; then :
10687  $as_echo_n "(cached) " >&6
10688else
10689  case $UNIQ in
10690  [\\/]* | ?:[\\/]*)
10691  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10692  ;;
10693  *)
10694  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10695for as_dir in $PATH
10696do
10697  IFS=$as_save_IFS
10698  test -z "$as_dir" && as_dir=.
10699    for ac_exec_ext in '' $ac_executable_extensions; do
10700  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10701    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10702    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10703    break 2
10704  fi
10705done
10706  done
10707IFS=$as_save_IFS
10708
10709  ;;
10710esac
10711fi
10712UNIQ=$ac_cv_path_UNIQ
10713if test -n "$UNIQ"; then
10714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10715$as_echo "$UNIQ" >&6; }
10716else
10717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10718$as_echo "no" >&6; }
10719fi
10720
10721
10722  test -n "$UNIQ" && break
10723done
10724
10725    else
10726      # If it succeeded, then it was overridden by the user. We will use it
10727      # for the tool.
10728
10729      # First remove it from the list of overridden variables, so we can test
10730      # for unknown variables in the end.
10731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10732
10733      # Check if the provided tool contains a complete path.
10734      tool_specified="$UNIQ"
10735      tool_basename="${tool_specified##*/}"
10736      if test "x$tool_basename" = "x$tool_specified"; then
10737        # A command without a complete path is provided, search $PATH.
10738        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10739$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10740        # Extract the first word of "$tool_basename", so it can be a program name with args.
10741set dummy $tool_basename; ac_word=$2
10742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10743$as_echo_n "checking for $ac_word... " >&6; }
10744if ${ac_cv_path_UNIQ+:} false; then :
10745  $as_echo_n "(cached) " >&6
10746else
10747  case $UNIQ in
10748  [\\/]* | ?:[\\/]*)
10749  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10750  ;;
10751  *)
10752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10753for as_dir in $PATH
10754do
10755  IFS=$as_save_IFS
10756  test -z "$as_dir" && as_dir=.
10757    for ac_exec_ext in '' $ac_executable_extensions; do
10758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10759    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10761    break 2
10762  fi
10763done
10764  done
10765IFS=$as_save_IFS
10766
10767  ;;
10768esac
10769fi
10770UNIQ=$ac_cv_path_UNIQ
10771if test -n "$UNIQ"; then
10772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10773$as_echo "$UNIQ" >&6; }
10774else
10775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10776$as_echo "no" >&6; }
10777fi
10778
10779
10780        if test "x$UNIQ" = x; then
10781          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10782        fi
10783      else
10784        # Otherwise we believe it is a complete path. Use it as it is.
10785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10786$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10788$as_echo_n "checking for UNIQ... " >&6; }
10789        if test ! -x "$tool_specified"; then
10790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10791$as_echo "not found" >&6; }
10792          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10793        fi
10794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10795$as_echo "$tool_specified" >&6; }
10796      fi
10797    fi
10798  fi
10799
10800
10801
10802  if test "x$UNIQ" = x; then
10803    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10804  fi
10805
10806
10807
10808
10809
10810  # Publish this variable in the help.
10811
10812
10813  if test "x$WC" = x; then
10814    # The variable is not set by user, try to locate tool using the code snippet
10815    for ac_prog in wc
10816do
10817  # Extract the first word of "$ac_prog", so it can be a program name with args.
10818set dummy $ac_prog; ac_word=$2
10819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10820$as_echo_n "checking for $ac_word... " >&6; }
10821if ${ac_cv_path_WC+:} false; then :
10822  $as_echo_n "(cached) " >&6
10823else
10824  case $WC in
10825  [\\/]* | ?:[\\/]*)
10826  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10827  ;;
10828  *)
10829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10830for as_dir in $PATH
10831do
10832  IFS=$as_save_IFS
10833  test -z "$as_dir" && as_dir=.
10834    for ac_exec_ext in '' $ac_executable_extensions; do
10835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10836    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10838    break 2
10839  fi
10840done
10841  done
10842IFS=$as_save_IFS
10843
10844  ;;
10845esac
10846fi
10847WC=$ac_cv_path_WC
10848if test -n "$WC"; then
10849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10850$as_echo "$WC" >&6; }
10851else
10852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10853$as_echo "no" >&6; }
10854fi
10855
10856
10857  test -n "$WC" && break
10858done
10859
10860  else
10861    # The variable is set, but is it from the command line or the environment?
10862
10863    # Try to remove the string !WC! from our list.
10864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10866      # If it failed, the variable was not from the command line. Ignore it,
10867      # but warn the user (except for BASH, which is always set by the calling BASH).
10868      if test "xWC" != xBASH; then
10869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10870$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10871      fi
10872      # Try to locate tool using the code snippet
10873      for ac_prog in wc
10874do
10875  # Extract the first word of "$ac_prog", so it can be a program name with args.
10876set dummy $ac_prog; ac_word=$2
10877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10878$as_echo_n "checking for $ac_word... " >&6; }
10879if ${ac_cv_path_WC+:} false; then :
10880  $as_echo_n "(cached) " >&6
10881else
10882  case $WC in
10883  [\\/]* | ?:[\\/]*)
10884  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10885  ;;
10886  *)
10887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10888for as_dir in $PATH
10889do
10890  IFS=$as_save_IFS
10891  test -z "$as_dir" && as_dir=.
10892    for ac_exec_ext in '' $ac_executable_extensions; do
10893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10894    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10896    break 2
10897  fi
10898done
10899  done
10900IFS=$as_save_IFS
10901
10902  ;;
10903esac
10904fi
10905WC=$ac_cv_path_WC
10906if test -n "$WC"; then
10907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10908$as_echo "$WC" >&6; }
10909else
10910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10911$as_echo "no" >&6; }
10912fi
10913
10914
10915  test -n "$WC" && break
10916done
10917
10918    else
10919      # If it succeeded, then it was overridden by the user. We will use it
10920      # for the tool.
10921
10922      # First remove it from the list of overridden variables, so we can test
10923      # for unknown variables in the end.
10924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10925
10926      # Check if the provided tool contains a complete path.
10927      tool_specified="$WC"
10928      tool_basename="${tool_specified##*/}"
10929      if test "x$tool_basename" = "x$tool_specified"; then
10930        # A command without a complete path is provided, search $PATH.
10931        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10932$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10933        # Extract the first word of "$tool_basename", so it can be a program name with args.
10934set dummy $tool_basename; ac_word=$2
10935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10936$as_echo_n "checking for $ac_word... " >&6; }
10937if ${ac_cv_path_WC+:} false; then :
10938  $as_echo_n "(cached) " >&6
10939else
10940  case $WC in
10941  [\\/]* | ?:[\\/]*)
10942  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10943  ;;
10944  *)
10945  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10946for as_dir in $PATH
10947do
10948  IFS=$as_save_IFS
10949  test -z "$as_dir" && as_dir=.
10950    for ac_exec_ext in '' $ac_executable_extensions; do
10951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10952    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10954    break 2
10955  fi
10956done
10957  done
10958IFS=$as_save_IFS
10959
10960  ;;
10961esac
10962fi
10963WC=$ac_cv_path_WC
10964if test -n "$WC"; then
10965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10966$as_echo "$WC" >&6; }
10967else
10968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10969$as_echo "no" >&6; }
10970fi
10971
10972
10973        if test "x$WC" = x; then
10974          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10975        fi
10976      else
10977        # Otherwise we believe it is a complete path. Use it as it is.
10978        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10979$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10980        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10981$as_echo_n "checking for WC... " >&6; }
10982        if test ! -x "$tool_specified"; then
10983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10984$as_echo "not found" >&6; }
10985          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10986        fi
10987        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10988$as_echo "$tool_specified" >&6; }
10989      fi
10990    fi
10991  fi
10992
10993
10994
10995  if test "x$WC" = x; then
10996    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10997  fi
10998
10999
11000
11001
11002
11003  # Publish this variable in the help.
11004
11005
11006  if test "x$WHICH" = x; then
11007    # The variable is not set by user, try to locate tool using the code snippet
11008    for ac_prog in which
11009do
11010  # Extract the first word of "$ac_prog", so it can be a program name with args.
11011set dummy $ac_prog; ac_word=$2
11012{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11013$as_echo_n "checking for $ac_word... " >&6; }
11014if ${ac_cv_path_WHICH+:} false; then :
11015  $as_echo_n "(cached) " >&6
11016else
11017  case $WHICH in
11018  [\\/]* | ?:[\\/]*)
11019  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11020  ;;
11021  *)
11022  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11023for as_dir in $PATH
11024do
11025  IFS=$as_save_IFS
11026  test -z "$as_dir" && as_dir=.
11027    for ac_exec_ext in '' $ac_executable_extensions; do
11028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11029    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11031    break 2
11032  fi
11033done
11034  done
11035IFS=$as_save_IFS
11036
11037  ;;
11038esac
11039fi
11040WHICH=$ac_cv_path_WHICH
11041if test -n "$WHICH"; then
11042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11043$as_echo "$WHICH" >&6; }
11044else
11045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11046$as_echo "no" >&6; }
11047fi
11048
11049
11050  test -n "$WHICH" && break
11051done
11052
11053  else
11054    # The variable is set, but is it from the command line or the environment?
11055
11056    # Try to remove the string !WHICH! from our list.
11057    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11058    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11059      # If it failed, the variable was not from the command line. Ignore it,
11060      # but warn the user (except for BASH, which is always set by the calling BASH).
11061      if test "xWHICH" != xBASH; then
11062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11063$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11064      fi
11065      # Try to locate tool using the code snippet
11066      for ac_prog in which
11067do
11068  # Extract the first word of "$ac_prog", so it can be a program name with args.
11069set dummy $ac_prog; ac_word=$2
11070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11071$as_echo_n "checking for $ac_word... " >&6; }
11072if ${ac_cv_path_WHICH+:} false; then :
11073  $as_echo_n "(cached) " >&6
11074else
11075  case $WHICH in
11076  [\\/]* | ?:[\\/]*)
11077  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11078  ;;
11079  *)
11080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11081for as_dir in $PATH
11082do
11083  IFS=$as_save_IFS
11084  test -z "$as_dir" && as_dir=.
11085    for ac_exec_ext in '' $ac_executable_extensions; do
11086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11087    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11089    break 2
11090  fi
11091done
11092  done
11093IFS=$as_save_IFS
11094
11095  ;;
11096esac
11097fi
11098WHICH=$ac_cv_path_WHICH
11099if test -n "$WHICH"; then
11100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11101$as_echo "$WHICH" >&6; }
11102else
11103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11104$as_echo "no" >&6; }
11105fi
11106
11107
11108  test -n "$WHICH" && break
11109done
11110
11111    else
11112      # If it succeeded, then it was overridden by the user. We will use it
11113      # for the tool.
11114
11115      # First remove it from the list of overridden variables, so we can test
11116      # for unknown variables in the end.
11117      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11118
11119      # Check if the provided tool contains a complete path.
11120      tool_specified="$WHICH"
11121      tool_basename="${tool_specified##*/}"
11122      if test "x$tool_basename" = "x$tool_specified"; then
11123        # A command without a complete path is provided, search $PATH.
11124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11125$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11126        # Extract the first word of "$tool_basename", so it can be a program name with args.
11127set dummy $tool_basename; ac_word=$2
11128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11129$as_echo_n "checking for $ac_word... " >&6; }
11130if ${ac_cv_path_WHICH+:} false; then :
11131  $as_echo_n "(cached) " >&6
11132else
11133  case $WHICH in
11134  [\\/]* | ?:[\\/]*)
11135  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11136  ;;
11137  *)
11138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11139for as_dir in $PATH
11140do
11141  IFS=$as_save_IFS
11142  test -z "$as_dir" && as_dir=.
11143    for ac_exec_ext in '' $ac_executable_extensions; do
11144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11145    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11147    break 2
11148  fi
11149done
11150  done
11151IFS=$as_save_IFS
11152
11153  ;;
11154esac
11155fi
11156WHICH=$ac_cv_path_WHICH
11157if test -n "$WHICH"; then
11158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11159$as_echo "$WHICH" >&6; }
11160else
11161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11162$as_echo "no" >&6; }
11163fi
11164
11165
11166        if test "x$WHICH" = x; then
11167          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11168        fi
11169      else
11170        # Otherwise we believe it is a complete path. Use it as it is.
11171        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11172$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11174$as_echo_n "checking for WHICH... " >&6; }
11175        if test ! -x "$tool_specified"; then
11176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11177$as_echo "not found" >&6; }
11178          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11179        fi
11180        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11181$as_echo "$tool_specified" >&6; }
11182      fi
11183    fi
11184  fi
11185
11186
11187
11188  if test "x$WHICH" = x; then
11189    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11190  fi
11191
11192
11193
11194
11195
11196  # Publish this variable in the help.
11197
11198
11199  if test "x$XARGS" = x; then
11200    # The variable is not set by user, try to locate tool using the code snippet
11201    for ac_prog in xargs
11202do
11203  # Extract the first word of "$ac_prog", so it can be a program name with args.
11204set dummy $ac_prog; ac_word=$2
11205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11206$as_echo_n "checking for $ac_word... " >&6; }
11207if ${ac_cv_path_XARGS+:} false; then :
11208  $as_echo_n "(cached) " >&6
11209else
11210  case $XARGS in
11211  [\\/]* | ?:[\\/]*)
11212  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11213  ;;
11214  *)
11215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11216for as_dir in $PATH
11217do
11218  IFS=$as_save_IFS
11219  test -z "$as_dir" && as_dir=.
11220    for ac_exec_ext in '' $ac_executable_extensions; do
11221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11222    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11224    break 2
11225  fi
11226done
11227  done
11228IFS=$as_save_IFS
11229
11230  ;;
11231esac
11232fi
11233XARGS=$ac_cv_path_XARGS
11234if test -n "$XARGS"; then
11235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11236$as_echo "$XARGS" >&6; }
11237else
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11239$as_echo "no" >&6; }
11240fi
11241
11242
11243  test -n "$XARGS" && break
11244done
11245
11246  else
11247    # The variable is set, but is it from the command line or the environment?
11248
11249    # Try to remove the string !XARGS! from our list.
11250    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11251    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11252      # If it failed, the variable was not from the command line. Ignore it,
11253      # but warn the user (except for BASH, which is always set by the calling BASH).
11254      if test "xXARGS" != xBASH; then
11255        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11256$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11257      fi
11258      # Try to locate tool using the code snippet
11259      for ac_prog in xargs
11260do
11261  # Extract the first word of "$ac_prog", so it can be a program name with args.
11262set dummy $ac_prog; ac_word=$2
11263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11264$as_echo_n "checking for $ac_word... " >&6; }
11265if ${ac_cv_path_XARGS+:} false; then :
11266  $as_echo_n "(cached) " >&6
11267else
11268  case $XARGS in
11269  [\\/]* | ?:[\\/]*)
11270  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11271  ;;
11272  *)
11273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11274for as_dir in $PATH
11275do
11276  IFS=$as_save_IFS
11277  test -z "$as_dir" && as_dir=.
11278    for ac_exec_ext in '' $ac_executable_extensions; do
11279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11280    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11282    break 2
11283  fi
11284done
11285  done
11286IFS=$as_save_IFS
11287
11288  ;;
11289esac
11290fi
11291XARGS=$ac_cv_path_XARGS
11292if test -n "$XARGS"; then
11293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11294$as_echo "$XARGS" >&6; }
11295else
11296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11297$as_echo "no" >&6; }
11298fi
11299
11300
11301  test -n "$XARGS" && break
11302done
11303
11304    else
11305      # If it succeeded, then it was overridden by the user. We will use it
11306      # for the tool.
11307
11308      # First remove it from the list of overridden variables, so we can test
11309      # for unknown variables in the end.
11310      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11311
11312      # Check if the provided tool contains a complete path.
11313      tool_specified="$XARGS"
11314      tool_basename="${tool_specified##*/}"
11315      if test "x$tool_basename" = "x$tool_specified"; then
11316        # A command without a complete path is provided, search $PATH.
11317        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11318$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11319        # Extract the first word of "$tool_basename", so it can be a program name with args.
11320set dummy $tool_basename; ac_word=$2
11321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11322$as_echo_n "checking for $ac_word... " >&6; }
11323if ${ac_cv_path_XARGS+:} false; then :
11324  $as_echo_n "(cached) " >&6
11325else
11326  case $XARGS in
11327  [\\/]* | ?:[\\/]*)
11328  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11329  ;;
11330  *)
11331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11332for as_dir in $PATH
11333do
11334  IFS=$as_save_IFS
11335  test -z "$as_dir" && as_dir=.
11336    for ac_exec_ext in '' $ac_executable_extensions; do
11337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11338    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11340    break 2
11341  fi
11342done
11343  done
11344IFS=$as_save_IFS
11345
11346  ;;
11347esac
11348fi
11349XARGS=$ac_cv_path_XARGS
11350if test -n "$XARGS"; then
11351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11352$as_echo "$XARGS" >&6; }
11353else
11354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11355$as_echo "no" >&6; }
11356fi
11357
11358
11359        if test "x$XARGS" = x; then
11360          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11361        fi
11362      else
11363        # Otherwise we believe it is a complete path. Use it as it is.
11364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11365$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11366        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11367$as_echo_n "checking for XARGS... " >&6; }
11368        if test ! -x "$tool_specified"; then
11369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11370$as_echo "not found" >&6; }
11371          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11372        fi
11373        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11374$as_echo "$tool_specified" >&6; }
11375      fi
11376    fi
11377  fi
11378
11379
11380
11381  if test "x$XARGS" = x; then
11382    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11383  fi
11384
11385
11386
11387  # Then required tools that require some special treatment.
11388
11389
11390  # Publish this variable in the help.
11391
11392
11393  if test "x$AWK" = x; then
11394    # The variable is not set by user, try to locate tool using the code snippet
11395    for ac_prog in gawk mawk nawk awk
11396do
11397  # Extract the first word of "$ac_prog", so it can be a program name with args.
11398set dummy $ac_prog; ac_word=$2
11399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11400$as_echo_n "checking for $ac_word... " >&6; }
11401if ${ac_cv_prog_AWK+:} false; then :
11402  $as_echo_n "(cached) " >&6
11403else
11404  if test -n "$AWK"; then
11405  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11406else
11407as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11408for as_dir in $PATH
11409do
11410  IFS=$as_save_IFS
11411  test -z "$as_dir" && as_dir=.
11412    for ac_exec_ext in '' $ac_executable_extensions; do
11413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11414    ac_cv_prog_AWK="$ac_prog"
11415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11416    break 2
11417  fi
11418done
11419  done
11420IFS=$as_save_IFS
11421
11422fi
11423fi
11424AWK=$ac_cv_prog_AWK
11425if test -n "$AWK"; then
11426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11427$as_echo "$AWK" >&6; }
11428else
11429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11430$as_echo "no" >&6; }
11431fi
11432
11433
11434  test -n "$AWK" && break
11435done
11436
11437  else
11438    # The variable is set, but is it from the command line or the environment?
11439
11440    # Try to remove the string !AWK! from our list.
11441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11443      # If it failed, the variable was not from the command line. Ignore it,
11444      # but warn the user (except for BASH, which is always set by the calling BASH).
11445      if test "xAWK" != xBASH; then
11446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11447$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11448      fi
11449      # Try to locate tool using the code snippet
11450      for ac_prog in gawk mawk nawk awk
11451do
11452  # Extract the first word of "$ac_prog", so it can be a program name with args.
11453set dummy $ac_prog; ac_word=$2
11454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11455$as_echo_n "checking for $ac_word... " >&6; }
11456if ${ac_cv_prog_AWK+:} false; then :
11457  $as_echo_n "(cached) " >&6
11458else
11459  if test -n "$AWK"; then
11460  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11461else
11462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11463for as_dir in $PATH
11464do
11465  IFS=$as_save_IFS
11466  test -z "$as_dir" && as_dir=.
11467    for ac_exec_ext in '' $ac_executable_extensions; do
11468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11469    ac_cv_prog_AWK="$ac_prog"
11470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11471    break 2
11472  fi
11473done
11474  done
11475IFS=$as_save_IFS
11476
11477fi
11478fi
11479AWK=$ac_cv_prog_AWK
11480if test -n "$AWK"; then
11481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11482$as_echo "$AWK" >&6; }
11483else
11484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11485$as_echo "no" >&6; }
11486fi
11487
11488
11489  test -n "$AWK" && break
11490done
11491
11492    else
11493      # If it succeeded, then it was overridden by the user. We will use it
11494      # for the tool.
11495
11496      # First remove it from the list of overridden variables, so we can test
11497      # for unknown variables in the end.
11498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11499
11500      # Check if the provided tool contains a complete path.
11501      tool_specified="$AWK"
11502      tool_basename="${tool_specified##*/}"
11503      if test "x$tool_basename" = "x$tool_specified"; then
11504        # A command without a complete path is provided, search $PATH.
11505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11506$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11507        # Extract the first word of "$tool_basename", so it can be a program name with args.
11508set dummy $tool_basename; ac_word=$2
11509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11510$as_echo_n "checking for $ac_word... " >&6; }
11511if ${ac_cv_path_AWK+:} false; then :
11512  $as_echo_n "(cached) " >&6
11513else
11514  case $AWK in
11515  [\\/]* | ?:[\\/]*)
11516  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11517  ;;
11518  *)
11519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11520for as_dir in $PATH
11521do
11522  IFS=$as_save_IFS
11523  test -z "$as_dir" && as_dir=.
11524    for ac_exec_ext in '' $ac_executable_extensions; do
11525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11526    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11528    break 2
11529  fi
11530done
11531  done
11532IFS=$as_save_IFS
11533
11534  ;;
11535esac
11536fi
11537AWK=$ac_cv_path_AWK
11538if test -n "$AWK"; then
11539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11540$as_echo "$AWK" >&6; }
11541else
11542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11543$as_echo "no" >&6; }
11544fi
11545
11546
11547        if test "x$AWK" = x; then
11548          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11549        fi
11550      else
11551        # Otherwise we believe it is a complete path. Use it as it is.
11552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11553$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11555$as_echo_n "checking for AWK... " >&6; }
11556        if test ! -x "$tool_specified"; then
11557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11558$as_echo "not found" >&6; }
11559          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11560        fi
11561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11562$as_echo "$tool_specified" >&6; }
11563      fi
11564    fi
11565  fi
11566
11567
11568  if test "x$AWK" = x; then
11569    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11570  fi
11571
11572
11573
11574
11575  # Publish this variable in the help.
11576
11577
11578  if test "x$GREP" = x; then
11579    # The variable is not set by user, try to locate tool using the code snippet
11580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11581$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11582if ${ac_cv_path_GREP+:} false; then :
11583  $as_echo_n "(cached) " >&6
11584else
11585  if test -z "$GREP"; then
11586  ac_path_GREP_found=false
11587  # Loop through the user's path and test for each of PROGNAME-LIST
11588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11589for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11590do
11591  IFS=$as_save_IFS
11592  test -z "$as_dir" && as_dir=.
11593    for ac_prog in grep ggrep; do
11594    for ac_exec_ext in '' $ac_executable_extensions; do
11595      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11596      as_fn_executable_p "$ac_path_GREP" || continue
11597# Check for GNU ac_path_GREP and select it if it is found.
11598  # Check for GNU $ac_path_GREP
11599case `"$ac_path_GREP" --version 2>&1` in
11600*GNU*)
11601  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11602*)
11603  ac_count=0
11604  $as_echo_n 0123456789 >"conftest.in"
11605  while :
11606  do
11607    cat "conftest.in" "conftest.in" >"conftest.tmp"
11608    mv "conftest.tmp" "conftest.in"
11609    cp "conftest.in" "conftest.nl"
11610    $as_echo 'GREP' >> "conftest.nl"
11611    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11612    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11613    as_fn_arith $ac_count + 1 && ac_count=$as_val
11614    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11615      # Best one so far, save it but keep looking for a better one
11616      ac_cv_path_GREP="$ac_path_GREP"
11617      ac_path_GREP_max=$ac_count
11618    fi
11619    # 10*(2^10) chars as input seems more than enough
11620    test $ac_count -gt 10 && break
11621  done
11622  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11623esac
11624
11625      $ac_path_GREP_found && break 3
11626    done
11627  done
11628  done
11629IFS=$as_save_IFS
11630  if test -z "$ac_cv_path_GREP"; then
11631    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11632  fi
11633else
11634  ac_cv_path_GREP=$GREP
11635fi
11636
11637fi
11638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11639$as_echo "$ac_cv_path_GREP" >&6; }
11640 GREP="$ac_cv_path_GREP"
11641
11642
11643  else
11644    # The variable is set, but is it from the command line or the environment?
11645
11646    # Try to remove the string !GREP! from our list.
11647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11649      # If it failed, the variable was not from the command line. Ignore it,
11650      # but warn the user (except for BASH, which is always set by the calling BASH).
11651      if test "xGREP" != xBASH; then
11652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11653$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11654      fi
11655      # Try to locate tool using the code snippet
11656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11657$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11658if ${ac_cv_path_GREP+:} false; then :
11659  $as_echo_n "(cached) " >&6
11660else
11661  if test -z "$GREP"; then
11662  ac_path_GREP_found=false
11663  # Loop through the user's path and test for each of PROGNAME-LIST
11664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11665for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11666do
11667  IFS=$as_save_IFS
11668  test -z "$as_dir" && as_dir=.
11669    for ac_prog in grep ggrep; do
11670    for ac_exec_ext in '' $ac_executable_extensions; do
11671      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11672      as_fn_executable_p "$ac_path_GREP" || continue
11673# Check for GNU ac_path_GREP and select it if it is found.
11674  # Check for GNU $ac_path_GREP
11675case `"$ac_path_GREP" --version 2>&1` in
11676*GNU*)
11677  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11678*)
11679  ac_count=0
11680  $as_echo_n 0123456789 >"conftest.in"
11681  while :
11682  do
11683    cat "conftest.in" "conftest.in" >"conftest.tmp"
11684    mv "conftest.tmp" "conftest.in"
11685    cp "conftest.in" "conftest.nl"
11686    $as_echo 'GREP' >> "conftest.nl"
11687    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11688    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11689    as_fn_arith $ac_count + 1 && ac_count=$as_val
11690    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11691      # Best one so far, save it but keep looking for a better one
11692      ac_cv_path_GREP="$ac_path_GREP"
11693      ac_path_GREP_max=$ac_count
11694    fi
11695    # 10*(2^10) chars as input seems more than enough
11696    test $ac_count -gt 10 && break
11697  done
11698  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11699esac
11700
11701      $ac_path_GREP_found && break 3
11702    done
11703  done
11704  done
11705IFS=$as_save_IFS
11706  if test -z "$ac_cv_path_GREP"; then
11707    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11708  fi
11709else
11710  ac_cv_path_GREP=$GREP
11711fi
11712
11713fi
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11715$as_echo "$ac_cv_path_GREP" >&6; }
11716 GREP="$ac_cv_path_GREP"
11717
11718
11719    else
11720      # If it succeeded, then it was overridden by the user. We will use it
11721      # for the tool.
11722
11723      # First remove it from the list of overridden variables, so we can test
11724      # for unknown variables in the end.
11725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11726
11727      # Check if the provided tool contains a complete path.
11728      tool_specified="$GREP"
11729      tool_basename="${tool_specified##*/}"
11730      if test "x$tool_basename" = "x$tool_specified"; then
11731        # A command without a complete path is provided, search $PATH.
11732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11733$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11734        # Extract the first word of "$tool_basename", so it can be a program name with args.
11735set dummy $tool_basename; ac_word=$2
11736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11737$as_echo_n "checking for $ac_word... " >&6; }
11738if ${ac_cv_path_GREP+:} false; then :
11739  $as_echo_n "(cached) " >&6
11740else
11741  case $GREP in
11742  [\\/]* | ?:[\\/]*)
11743  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11744  ;;
11745  *)
11746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11747for as_dir in $PATH
11748do
11749  IFS=$as_save_IFS
11750  test -z "$as_dir" && as_dir=.
11751    for ac_exec_ext in '' $ac_executable_extensions; do
11752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11753    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11755    break 2
11756  fi
11757done
11758  done
11759IFS=$as_save_IFS
11760
11761  ;;
11762esac
11763fi
11764GREP=$ac_cv_path_GREP
11765if test -n "$GREP"; then
11766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11767$as_echo "$GREP" >&6; }
11768else
11769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770$as_echo "no" >&6; }
11771fi
11772
11773
11774        if test "x$GREP" = x; then
11775          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11776        fi
11777      else
11778        # Otherwise we believe it is a complete path. Use it as it is.
11779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11780$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11782$as_echo_n "checking for GREP... " >&6; }
11783        if test ! -x "$tool_specified"; then
11784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11785$as_echo "not found" >&6; }
11786          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11787        fi
11788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11789$as_echo "$tool_specified" >&6; }
11790      fi
11791    fi
11792  fi
11793
11794
11795  if test "x$GREP" = x; then
11796    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11797  fi
11798
11799
11800
11801
11802  # Publish this variable in the help.
11803
11804
11805  if test "x$EGREP" = x; then
11806    # The variable is not set by user, try to locate tool using the code snippet
11807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11808$as_echo_n "checking for egrep... " >&6; }
11809if ${ac_cv_path_EGREP+:} false; then :
11810  $as_echo_n "(cached) " >&6
11811else
11812  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11813   then ac_cv_path_EGREP="$GREP -E"
11814   else
11815     if test -z "$EGREP"; then
11816  ac_path_EGREP_found=false
11817  # Loop through the user's path and test for each of PROGNAME-LIST
11818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11819for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11820do
11821  IFS=$as_save_IFS
11822  test -z "$as_dir" && as_dir=.
11823    for ac_prog in egrep; do
11824    for ac_exec_ext in '' $ac_executable_extensions; do
11825      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11826      as_fn_executable_p "$ac_path_EGREP" || continue
11827# Check for GNU ac_path_EGREP and select it if it is found.
11828  # Check for GNU $ac_path_EGREP
11829case `"$ac_path_EGREP" --version 2>&1` in
11830*GNU*)
11831  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11832*)
11833  ac_count=0
11834  $as_echo_n 0123456789 >"conftest.in"
11835  while :
11836  do
11837    cat "conftest.in" "conftest.in" >"conftest.tmp"
11838    mv "conftest.tmp" "conftest.in"
11839    cp "conftest.in" "conftest.nl"
11840    $as_echo 'EGREP' >> "conftest.nl"
11841    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11842    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11843    as_fn_arith $ac_count + 1 && ac_count=$as_val
11844    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11845      # Best one so far, save it but keep looking for a better one
11846      ac_cv_path_EGREP="$ac_path_EGREP"
11847      ac_path_EGREP_max=$ac_count
11848    fi
11849    # 10*(2^10) chars as input seems more than enough
11850    test $ac_count -gt 10 && break
11851  done
11852  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11853esac
11854
11855      $ac_path_EGREP_found && break 3
11856    done
11857  done
11858  done
11859IFS=$as_save_IFS
11860  if test -z "$ac_cv_path_EGREP"; then
11861    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11862  fi
11863else
11864  ac_cv_path_EGREP=$EGREP
11865fi
11866
11867   fi
11868fi
11869{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11870$as_echo "$ac_cv_path_EGREP" >&6; }
11871 EGREP="$ac_cv_path_EGREP"
11872
11873
11874  else
11875    # The variable is set, but is it from the command line or the environment?
11876
11877    # Try to remove the string !EGREP! from our list.
11878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11880      # If it failed, the variable was not from the command line. Ignore it,
11881      # but warn the user (except for BASH, which is always set by the calling BASH).
11882      if test "xEGREP" != xBASH; then
11883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11884$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11885      fi
11886      # Try to locate tool using the code snippet
11887      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11888$as_echo_n "checking for egrep... " >&6; }
11889if ${ac_cv_path_EGREP+:} false; then :
11890  $as_echo_n "(cached) " >&6
11891else
11892  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11893   then ac_cv_path_EGREP="$GREP -E"
11894   else
11895     if test -z "$EGREP"; then
11896  ac_path_EGREP_found=false
11897  # Loop through the user's path and test for each of PROGNAME-LIST
11898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11899for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11900do
11901  IFS=$as_save_IFS
11902  test -z "$as_dir" && as_dir=.
11903    for ac_prog in egrep; do
11904    for ac_exec_ext in '' $ac_executable_extensions; do
11905      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11906      as_fn_executable_p "$ac_path_EGREP" || continue
11907# Check for GNU ac_path_EGREP and select it if it is found.
11908  # Check for GNU $ac_path_EGREP
11909case `"$ac_path_EGREP" --version 2>&1` in
11910*GNU*)
11911  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11912*)
11913  ac_count=0
11914  $as_echo_n 0123456789 >"conftest.in"
11915  while :
11916  do
11917    cat "conftest.in" "conftest.in" >"conftest.tmp"
11918    mv "conftest.tmp" "conftest.in"
11919    cp "conftest.in" "conftest.nl"
11920    $as_echo 'EGREP' >> "conftest.nl"
11921    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11922    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11923    as_fn_arith $ac_count + 1 && ac_count=$as_val
11924    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11925      # Best one so far, save it but keep looking for a better one
11926      ac_cv_path_EGREP="$ac_path_EGREP"
11927      ac_path_EGREP_max=$ac_count
11928    fi
11929    # 10*(2^10) chars as input seems more than enough
11930    test $ac_count -gt 10 && break
11931  done
11932  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11933esac
11934
11935      $ac_path_EGREP_found && break 3
11936    done
11937  done
11938  done
11939IFS=$as_save_IFS
11940  if test -z "$ac_cv_path_EGREP"; then
11941    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11942  fi
11943else
11944  ac_cv_path_EGREP=$EGREP
11945fi
11946
11947   fi
11948fi
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11950$as_echo "$ac_cv_path_EGREP" >&6; }
11951 EGREP="$ac_cv_path_EGREP"
11952
11953
11954    else
11955      # If it succeeded, then it was overridden by the user. We will use it
11956      # for the tool.
11957
11958      # First remove it from the list of overridden variables, so we can test
11959      # for unknown variables in the end.
11960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11961
11962      # Check if the provided tool contains a complete path.
11963      tool_specified="$EGREP"
11964      tool_basename="${tool_specified##*/}"
11965      if test "x$tool_basename" = "x$tool_specified"; then
11966        # A command without a complete path is provided, search $PATH.
11967        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11968$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11969        # Extract the first word of "$tool_basename", so it can be a program name with args.
11970set dummy $tool_basename; ac_word=$2
11971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11972$as_echo_n "checking for $ac_word... " >&6; }
11973if ${ac_cv_path_EGREP+:} false; then :
11974  $as_echo_n "(cached) " >&6
11975else
11976  case $EGREP in
11977  [\\/]* | ?:[\\/]*)
11978  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11979  ;;
11980  *)
11981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11982for as_dir in $PATH
11983do
11984  IFS=$as_save_IFS
11985  test -z "$as_dir" && as_dir=.
11986    for ac_exec_ext in '' $ac_executable_extensions; do
11987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11988    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11990    break 2
11991  fi
11992done
11993  done
11994IFS=$as_save_IFS
11995
11996  ;;
11997esac
11998fi
11999EGREP=$ac_cv_path_EGREP
12000if test -n "$EGREP"; then
12001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12002$as_echo "$EGREP" >&6; }
12003else
12004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12005$as_echo "no" >&6; }
12006fi
12007
12008
12009        if test "x$EGREP" = x; then
12010          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12011        fi
12012      else
12013        # Otherwise we believe it is a complete path. Use it as it is.
12014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12015$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12017$as_echo_n "checking for EGREP... " >&6; }
12018        if test ! -x "$tool_specified"; then
12019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12020$as_echo "not found" >&6; }
12021          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12022        fi
12023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12024$as_echo "$tool_specified" >&6; }
12025      fi
12026    fi
12027  fi
12028
12029
12030  if test "x$EGREP" = x; then
12031    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12032  fi
12033
12034
12035
12036
12037  # Publish this variable in the help.
12038
12039
12040  if test "x$FGREP" = x; then
12041    # The variable is not set by user, try to locate tool using the code snippet
12042    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12043$as_echo_n "checking for fgrep... " >&6; }
12044if ${ac_cv_path_FGREP+:} false; then :
12045  $as_echo_n "(cached) " >&6
12046else
12047  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12048   then ac_cv_path_FGREP="$GREP -F"
12049   else
12050     if test -z "$FGREP"; then
12051  ac_path_FGREP_found=false
12052  # Loop through the user's path and test for each of PROGNAME-LIST
12053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12054for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12055do
12056  IFS=$as_save_IFS
12057  test -z "$as_dir" && as_dir=.
12058    for ac_prog in fgrep; do
12059    for ac_exec_ext in '' $ac_executable_extensions; do
12060      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12061      as_fn_executable_p "$ac_path_FGREP" || continue
12062# Check for GNU ac_path_FGREP and select it if it is found.
12063  # Check for GNU $ac_path_FGREP
12064case `"$ac_path_FGREP" --version 2>&1` in
12065*GNU*)
12066  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12067*)
12068  ac_count=0
12069  $as_echo_n 0123456789 >"conftest.in"
12070  while :
12071  do
12072    cat "conftest.in" "conftest.in" >"conftest.tmp"
12073    mv "conftest.tmp" "conftest.in"
12074    cp "conftest.in" "conftest.nl"
12075    $as_echo 'FGREP' >> "conftest.nl"
12076    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12077    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12078    as_fn_arith $ac_count + 1 && ac_count=$as_val
12079    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12080      # Best one so far, save it but keep looking for a better one
12081      ac_cv_path_FGREP="$ac_path_FGREP"
12082      ac_path_FGREP_max=$ac_count
12083    fi
12084    # 10*(2^10) chars as input seems more than enough
12085    test $ac_count -gt 10 && break
12086  done
12087  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12088esac
12089
12090      $ac_path_FGREP_found && break 3
12091    done
12092  done
12093  done
12094IFS=$as_save_IFS
12095  if test -z "$ac_cv_path_FGREP"; then
12096    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12097  fi
12098else
12099  ac_cv_path_FGREP=$FGREP
12100fi
12101
12102   fi
12103fi
12104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12105$as_echo "$ac_cv_path_FGREP" >&6; }
12106 FGREP="$ac_cv_path_FGREP"
12107
12108
12109  else
12110    # The variable is set, but is it from the command line or the environment?
12111
12112    # Try to remove the string !FGREP! from our list.
12113    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12114    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12115      # If it failed, the variable was not from the command line. Ignore it,
12116      # but warn the user (except for BASH, which is always set by the calling BASH).
12117      if test "xFGREP" != xBASH; then
12118        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12119$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12120      fi
12121      # Try to locate tool using the code snippet
12122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12123$as_echo_n "checking for fgrep... " >&6; }
12124if ${ac_cv_path_FGREP+:} false; then :
12125  $as_echo_n "(cached) " >&6
12126else
12127  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12128   then ac_cv_path_FGREP="$GREP -F"
12129   else
12130     if test -z "$FGREP"; then
12131  ac_path_FGREP_found=false
12132  # Loop through the user's path and test for each of PROGNAME-LIST
12133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12134for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12135do
12136  IFS=$as_save_IFS
12137  test -z "$as_dir" && as_dir=.
12138    for ac_prog in fgrep; do
12139    for ac_exec_ext in '' $ac_executable_extensions; do
12140      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12141      as_fn_executable_p "$ac_path_FGREP" || continue
12142# Check for GNU ac_path_FGREP and select it if it is found.
12143  # Check for GNU $ac_path_FGREP
12144case `"$ac_path_FGREP" --version 2>&1` in
12145*GNU*)
12146  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12147*)
12148  ac_count=0
12149  $as_echo_n 0123456789 >"conftest.in"
12150  while :
12151  do
12152    cat "conftest.in" "conftest.in" >"conftest.tmp"
12153    mv "conftest.tmp" "conftest.in"
12154    cp "conftest.in" "conftest.nl"
12155    $as_echo 'FGREP' >> "conftest.nl"
12156    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12157    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12158    as_fn_arith $ac_count + 1 && ac_count=$as_val
12159    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12160      # Best one so far, save it but keep looking for a better one
12161      ac_cv_path_FGREP="$ac_path_FGREP"
12162      ac_path_FGREP_max=$ac_count
12163    fi
12164    # 10*(2^10) chars as input seems more than enough
12165    test $ac_count -gt 10 && break
12166  done
12167  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12168esac
12169
12170      $ac_path_FGREP_found && break 3
12171    done
12172  done
12173  done
12174IFS=$as_save_IFS
12175  if test -z "$ac_cv_path_FGREP"; then
12176    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12177  fi
12178else
12179  ac_cv_path_FGREP=$FGREP
12180fi
12181
12182   fi
12183fi
12184{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12185$as_echo "$ac_cv_path_FGREP" >&6; }
12186 FGREP="$ac_cv_path_FGREP"
12187
12188
12189    else
12190      # If it succeeded, then it was overridden by the user. We will use it
12191      # for the tool.
12192
12193      # First remove it from the list of overridden variables, so we can test
12194      # for unknown variables in the end.
12195      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12196
12197      # Check if the provided tool contains a complete path.
12198      tool_specified="$FGREP"
12199      tool_basename="${tool_specified##*/}"
12200      if test "x$tool_basename" = "x$tool_specified"; then
12201        # A command without a complete path is provided, search $PATH.
12202        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12203$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12204        # Extract the first word of "$tool_basename", so it can be a program name with args.
12205set dummy $tool_basename; ac_word=$2
12206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12207$as_echo_n "checking for $ac_word... " >&6; }
12208if ${ac_cv_path_FGREP+:} false; then :
12209  $as_echo_n "(cached) " >&6
12210else
12211  case $FGREP in
12212  [\\/]* | ?:[\\/]*)
12213  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12214  ;;
12215  *)
12216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12217for as_dir in $PATH
12218do
12219  IFS=$as_save_IFS
12220  test -z "$as_dir" && as_dir=.
12221    for ac_exec_ext in '' $ac_executable_extensions; do
12222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12223    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12225    break 2
12226  fi
12227done
12228  done
12229IFS=$as_save_IFS
12230
12231  ;;
12232esac
12233fi
12234FGREP=$ac_cv_path_FGREP
12235if test -n "$FGREP"; then
12236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12237$as_echo "$FGREP" >&6; }
12238else
12239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12240$as_echo "no" >&6; }
12241fi
12242
12243
12244        if test "x$FGREP" = x; then
12245          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12246        fi
12247      else
12248        # Otherwise we believe it is a complete path. Use it as it is.
12249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12250$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12251        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12252$as_echo_n "checking for FGREP... " >&6; }
12253        if test ! -x "$tool_specified"; then
12254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12255$as_echo "not found" >&6; }
12256          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12257        fi
12258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12259$as_echo "$tool_specified" >&6; }
12260      fi
12261    fi
12262  fi
12263
12264
12265  if test "x$FGREP" = x; then
12266    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12267  fi
12268
12269
12270
12271
12272  # Publish this variable in the help.
12273
12274
12275  if test "x$SED" = x; then
12276    # The variable is not set by user, try to locate tool using the code snippet
12277    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12278$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12279if ${ac_cv_path_SED+:} false; then :
12280  $as_echo_n "(cached) " >&6
12281else
12282            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12283     for ac_i in 1 2 3 4 5 6 7; do
12284       ac_script="$ac_script$as_nl$ac_script"
12285     done
12286     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12287     { ac_script=; unset ac_script;}
12288     if test -z "$SED"; then
12289  ac_path_SED_found=false
12290  # Loop through the user's path and test for each of PROGNAME-LIST
12291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12292for as_dir in $PATH
12293do
12294  IFS=$as_save_IFS
12295  test -z "$as_dir" && as_dir=.
12296    for ac_prog in sed gsed; do
12297    for ac_exec_ext in '' $ac_executable_extensions; do
12298      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12299      as_fn_executable_p "$ac_path_SED" || continue
12300# Check for GNU ac_path_SED and select it if it is found.
12301  # Check for GNU $ac_path_SED
12302case `"$ac_path_SED" --version 2>&1` in
12303*GNU*)
12304  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12305*)
12306  ac_count=0
12307  $as_echo_n 0123456789 >"conftest.in"
12308  while :
12309  do
12310    cat "conftest.in" "conftest.in" >"conftest.tmp"
12311    mv "conftest.tmp" "conftest.in"
12312    cp "conftest.in" "conftest.nl"
12313    $as_echo '' >> "conftest.nl"
12314    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12315    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12316    as_fn_arith $ac_count + 1 && ac_count=$as_val
12317    if test $ac_count -gt ${ac_path_SED_max-0}; then
12318      # Best one so far, save it but keep looking for a better one
12319      ac_cv_path_SED="$ac_path_SED"
12320      ac_path_SED_max=$ac_count
12321    fi
12322    # 10*(2^10) chars as input seems more than enough
12323    test $ac_count -gt 10 && break
12324  done
12325  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12326esac
12327
12328      $ac_path_SED_found && break 3
12329    done
12330  done
12331  done
12332IFS=$as_save_IFS
12333  if test -z "$ac_cv_path_SED"; then
12334    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12335  fi
12336else
12337  ac_cv_path_SED=$SED
12338fi
12339
12340fi
12341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12342$as_echo "$ac_cv_path_SED" >&6; }
12343 SED="$ac_cv_path_SED"
12344  rm -f conftest.sed
12345
12346  else
12347    # The variable is set, but is it from the command line or the environment?
12348
12349    # Try to remove the string !SED! from our list.
12350    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12351    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12352      # If it failed, the variable was not from the command line. Ignore it,
12353      # but warn the user (except for BASH, which is always set by the calling BASH).
12354      if test "xSED" != xBASH; then
12355        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12356$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12357      fi
12358      # Try to locate tool using the code snippet
12359      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12360$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12361if ${ac_cv_path_SED+:} false; then :
12362  $as_echo_n "(cached) " >&6
12363else
12364            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12365     for ac_i in 1 2 3 4 5 6 7; do
12366       ac_script="$ac_script$as_nl$ac_script"
12367     done
12368     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12369     { ac_script=; unset ac_script;}
12370     if test -z "$SED"; then
12371  ac_path_SED_found=false
12372  # Loop through the user's path and test for each of PROGNAME-LIST
12373  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12374for as_dir in $PATH
12375do
12376  IFS=$as_save_IFS
12377  test -z "$as_dir" && as_dir=.
12378    for ac_prog in sed gsed; do
12379    for ac_exec_ext in '' $ac_executable_extensions; do
12380      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12381      as_fn_executable_p "$ac_path_SED" || continue
12382# Check for GNU ac_path_SED and select it if it is found.
12383  # Check for GNU $ac_path_SED
12384case `"$ac_path_SED" --version 2>&1` in
12385*GNU*)
12386  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12387*)
12388  ac_count=0
12389  $as_echo_n 0123456789 >"conftest.in"
12390  while :
12391  do
12392    cat "conftest.in" "conftest.in" >"conftest.tmp"
12393    mv "conftest.tmp" "conftest.in"
12394    cp "conftest.in" "conftest.nl"
12395    $as_echo '' >> "conftest.nl"
12396    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12397    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12398    as_fn_arith $ac_count + 1 && ac_count=$as_val
12399    if test $ac_count -gt ${ac_path_SED_max-0}; then
12400      # Best one so far, save it but keep looking for a better one
12401      ac_cv_path_SED="$ac_path_SED"
12402      ac_path_SED_max=$ac_count
12403    fi
12404    # 10*(2^10) chars as input seems more than enough
12405    test $ac_count -gt 10 && break
12406  done
12407  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12408esac
12409
12410      $ac_path_SED_found && break 3
12411    done
12412  done
12413  done
12414IFS=$as_save_IFS
12415  if test -z "$ac_cv_path_SED"; then
12416    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12417  fi
12418else
12419  ac_cv_path_SED=$SED
12420fi
12421
12422fi
12423{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12424$as_echo "$ac_cv_path_SED" >&6; }
12425 SED="$ac_cv_path_SED"
12426  rm -f conftest.sed
12427
12428    else
12429      # If it succeeded, then it was overridden by the user. We will use it
12430      # for the tool.
12431
12432      # First remove it from the list of overridden variables, so we can test
12433      # for unknown variables in the end.
12434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12435
12436      # Check if the provided tool contains a complete path.
12437      tool_specified="$SED"
12438      tool_basename="${tool_specified##*/}"
12439      if test "x$tool_basename" = "x$tool_specified"; then
12440        # A command without a complete path is provided, search $PATH.
12441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12442$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12443        # Extract the first word of "$tool_basename", so it can be a program name with args.
12444set dummy $tool_basename; ac_word=$2
12445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12446$as_echo_n "checking for $ac_word... " >&6; }
12447if ${ac_cv_path_SED+:} false; then :
12448  $as_echo_n "(cached) " >&6
12449else
12450  case $SED in
12451  [\\/]* | ?:[\\/]*)
12452  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12453  ;;
12454  *)
12455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12456for as_dir in $PATH
12457do
12458  IFS=$as_save_IFS
12459  test -z "$as_dir" && as_dir=.
12460    for ac_exec_ext in '' $ac_executable_extensions; do
12461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12462    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12464    break 2
12465  fi
12466done
12467  done
12468IFS=$as_save_IFS
12469
12470  ;;
12471esac
12472fi
12473SED=$ac_cv_path_SED
12474if test -n "$SED"; then
12475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12476$as_echo "$SED" >&6; }
12477else
12478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12479$as_echo "no" >&6; }
12480fi
12481
12482
12483        if test "x$SED" = x; then
12484          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12485        fi
12486      else
12487        # Otherwise we believe it is a complete path. Use it as it is.
12488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12489$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12491$as_echo_n "checking for SED... " >&6; }
12492        if test ! -x "$tool_specified"; then
12493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12494$as_echo "not found" >&6; }
12495          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12496        fi
12497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12498$as_echo "$tool_specified" >&6; }
12499      fi
12500    fi
12501  fi
12502
12503
12504  if test "x$SED" = x; then
12505    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12506  fi
12507
12508
12509
12510  # Always force rm.
12511  RM="$RM -f"
12512
12513  # pwd behaves differently on various platforms and some don't support the -L flag.
12514  # Always use the bash builtin pwd to get uniform behavior.
12515  THEPWDCMD=pwd
12516
12517  # These are not required on all platforms
12518
12519
12520  # Publish this variable in the help.
12521
12522
12523  if test "x$CYGPATH" = x; then
12524    # The variable is not set by user, try to locate tool using the code snippet
12525    for ac_prog in cygpath
12526do
12527  # Extract the first word of "$ac_prog", so it can be a program name with args.
12528set dummy $ac_prog; ac_word=$2
12529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12530$as_echo_n "checking for $ac_word... " >&6; }
12531if ${ac_cv_path_CYGPATH+:} false; then :
12532  $as_echo_n "(cached) " >&6
12533else
12534  case $CYGPATH in
12535  [\\/]* | ?:[\\/]*)
12536  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12537  ;;
12538  *)
12539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12540for as_dir in $PATH
12541do
12542  IFS=$as_save_IFS
12543  test -z "$as_dir" && as_dir=.
12544    for ac_exec_ext in '' $ac_executable_extensions; do
12545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12546    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12548    break 2
12549  fi
12550done
12551  done
12552IFS=$as_save_IFS
12553
12554  ;;
12555esac
12556fi
12557CYGPATH=$ac_cv_path_CYGPATH
12558if test -n "$CYGPATH"; then
12559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12560$as_echo "$CYGPATH" >&6; }
12561else
12562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12563$as_echo "no" >&6; }
12564fi
12565
12566
12567  test -n "$CYGPATH" && break
12568done
12569
12570  else
12571    # The variable is set, but is it from the command line or the environment?
12572
12573    # Try to remove the string !CYGPATH! from our list.
12574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12576      # If it failed, the variable was not from the command line. Ignore it,
12577      # but warn the user (except for BASH, which is always set by the calling BASH).
12578      if test "xCYGPATH" != xBASH; then
12579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12580$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12581      fi
12582      # Try to locate tool using the code snippet
12583      for ac_prog in cygpath
12584do
12585  # Extract the first word of "$ac_prog", so it can be a program name with args.
12586set dummy $ac_prog; ac_word=$2
12587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12588$as_echo_n "checking for $ac_word... " >&6; }
12589if ${ac_cv_path_CYGPATH+:} false; then :
12590  $as_echo_n "(cached) " >&6
12591else
12592  case $CYGPATH in
12593  [\\/]* | ?:[\\/]*)
12594  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12595  ;;
12596  *)
12597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12598for as_dir in $PATH
12599do
12600  IFS=$as_save_IFS
12601  test -z "$as_dir" && as_dir=.
12602    for ac_exec_ext in '' $ac_executable_extensions; do
12603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12604    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12606    break 2
12607  fi
12608done
12609  done
12610IFS=$as_save_IFS
12611
12612  ;;
12613esac
12614fi
12615CYGPATH=$ac_cv_path_CYGPATH
12616if test -n "$CYGPATH"; then
12617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12618$as_echo "$CYGPATH" >&6; }
12619else
12620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12621$as_echo "no" >&6; }
12622fi
12623
12624
12625  test -n "$CYGPATH" && break
12626done
12627
12628    else
12629      # If it succeeded, then it was overridden by the user. We will use it
12630      # for the tool.
12631
12632      # First remove it from the list of overridden variables, so we can test
12633      # for unknown variables in the end.
12634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12635
12636      # Check if the provided tool contains a complete path.
12637      tool_specified="$CYGPATH"
12638      tool_basename="${tool_specified##*/}"
12639      if test "x$tool_basename" = "x$tool_specified"; then
12640        # A command without a complete path is provided, search $PATH.
12641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12642$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12643        # Extract the first word of "$tool_basename", so it can be a program name with args.
12644set dummy $tool_basename; ac_word=$2
12645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12646$as_echo_n "checking for $ac_word... " >&6; }
12647if ${ac_cv_path_CYGPATH+:} false; then :
12648  $as_echo_n "(cached) " >&6
12649else
12650  case $CYGPATH in
12651  [\\/]* | ?:[\\/]*)
12652  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12653  ;;
12654  *)
12655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12656for as_dir in $PATH
12657do
12658  IFS=$as_save_IFS
12659  test -z "$as_dir" && as_dir=.
12660    for ac_exec_ext in '' $ac_executable_extensions; do
12661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12662    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12664    break 2
12665  fi
12666done
12667  done
12668IFS=$as_save_IFS
12669
12670  ;;
12671esac
12672fi
12673CYGPATH=$ac_cv_path_CYGPATH
12674if test -n "$CYGPATH"; then
12675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12676$as_echo "$CYGPATH" >&6; }
12677else
12678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12679$as_echo "no" >&6; }
12680fi
12681
12682
12683        if test "x$CYGPATH" = x; then
12684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12685        fi
12686      else
12687        # Otherwise we believe it is a complete path. Use it as it is.
12688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12689$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12691$as_echo_n "checking for CYGPATH... " >&6; }
12692        if test ! -x "$tool_specified"; then
12693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12694$as_echo "not found" >&6; }
12695          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12696        fi
12697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12698$as_echo "$tool_specified" >&6; }
12699      fi
12700    fi
12701  fi
12702
12703
12704
12705
12706  # Publish this variable in the help.
12707
12708
12709  if test "x$READLINK" = x; then
12710    # The variable is not set by user, try to locate tool using the code snippet
12711    for ac_prog in greadlink readlink
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_READLINK+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $READLINK in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743READLINK=$ac_cv_path_READLINK
12744if test -n "$READLINK"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12746$as_echo "$READLINK" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$READLINK" && break
12754done
12755
12756  else
12757    # The variable is set, but is it from the command line or the environment?
12758
12759    # Try to remove the string !READLINK! from our list.
12760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12762      # If it failed, the variable was not from the command line. Ignore it,
12763      # but warn the user (except for BASH, which is always set by the calling BASH).
12764      if test "xREADLINK" != xBASH; then
12765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12766$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12767      fi
12768      # Try to locate tool using the code snippet
12769      for ac_prog in greadlink readlink
12770do
12771  # Extract the first word of "$ac_prog", so it can be a program name with args.
12772set dummy $ac_prog; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_READLINK+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $READLINK in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801READLINK=$ac_cv_path_READLINK
12802if test -n "$READLINK"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12804$as_echo "$READLINK" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811  test -n "$READLINK" && break
12812done
12813
12814    else
12815      # If it succeeded, then it was overridden by the user. We will use it
12816      # for the tool.
12817
12818      # First remove it from the list of overridden variables, so we can test
12819      # for unknown variables in the end.
12820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12821
12822      # Check if the provided tool contains a complete path.
12823      tool_specified="$READLINK"
12824      tool_basename="${tool_specified##*/}"
12825      if test "x$tool_basename" = "x$tool_specified"; then
12826        # A command without a complete path is provided, search $PATH.
12827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12828$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12829        # Extract the first word of "$tool_basename", so it can be a program name with args.
12830set dummy $tool_basename; ac_word=$2
12831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12832$as_echo_n "checking for $ac_word... " >&6; }
12833if ${ac_cv_path_READLINK+:} false; then :
12834  $as_echo_n "(cached) " >&6
12835else
12836  case $READLINK in
12837  [\\/]* | ?:[\\/]*)
12838  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12839  ;;
12840  *)
12841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12842for as_dir in $PATH
12843do
12844  IFS=$as_save_IFS
12845  test -z "$as_dir" && as_dir=.
12846    for ac_exec_ext in '' $ac_executable_extensions; do
12847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12848    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12850    break 2
12851  fi
12852done
12853  done
12854IFS=$as_save_IFS
12855
12856  ;;
12857esac
12858fi
12859READLINK=$ac_cv_path_READLINK
12860if test -n "$READLINK"; then
12861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12862$as_echo "$READLINK" >&6; }
12863else
12864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12865$as_echo "no" >&6; }
12866fi
12867
12868
12869        if test "x$READLINK" = x; then
12870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12871        fi
12872      else
12873        # Otherwise we believe it is a complete path. Use it as it is.
12874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12875$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12877$as_echo_n "checking for READLINK... " >&6; }
12878        if test ! -x "$tool_specified"; then
12879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12880$as_echo "not found" >&6; }
12881          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12882        fi
12883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12884$as_echo "$tool_specified" >&6; }
12885      fi
12886    fi
12887  fi
12888
12889
12890
12891
12892  # Publish this variable in the help.
12893
12894
12895  if test "x$DF" = x; then
12896    # The variable is not set by user, try to locate tool using the code snippet
12897    for ac_prog in df
12898do
12899  # Extract the first word of "$ac_prog", so it can be a program name with args.
12900set dummy $ac_prog; ac_word=$2
12901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12902$as_echo_n "checking for $ac_word... " >&6; }
12903if ${ac_cv_path_DF+:} false; then :
12904  $as_echo_n "(cached) " >&6
12905else
12906  case $DF in
12907  [\\/]* | ?:[\\/]*)
12908  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12909  ;;
12910  *)
12911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12912for as_dir in $PATH
12913do
12914  IFS=$as_save_IFS
12915  test -z "$as_dir" && as_dir=.
12916    for ac_exec_ext in '' $ac_executable_extensions; do
12917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12918    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12920    break 2
12921  fi
12922done
12923  done
12924IFS=$as_save_IFS
12925
12926  ;;
12927esac
12928fi
12929DF=$ac_cv_path_DF
12930if test -n "$DF"; then
12931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12932$as_echo "$DF" >&6; }
12933else
12934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12935$as_echo "no" >&6; }
12936fi
12937
12938
12939  test -n "$DF" && break
12940done
12941
12942  else
12943    # The variable is set, but is it from the command line or the environment?
12944
12945    # Try to remove the string !DF! from our list.
12946    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12947    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12948      # If it failed, the variable was not from the command line. Ignore it,
12949      # but warn the user (except for BASH, which is always set by the calling BASH).
12950      if test "xDF" != xBASH; then
12951        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12952$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12953      fi
12954      # Try to locate tool using the code snippet
12955      for ac_prog in df
12956do
12957  # Extract the first word of "$ac_prog", so it can be a program name with args.
12958set dummy $ac_prog; ac_word=$2
12959{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12960$as_echo_n "checking for $ac_word... " >&6; }
12961if ${ac_cv_path_DF+:} false; then :
12962  $as_echo_n "(cached) " >&6
12963else
12964  case $DF in
12965  [\\/]* | ?:[\\/]*)
12966  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12967  ;;
12968  *)
12969  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12970for as_dir in $PATH
12971do
12972  IFS=$as_save_IFS
12973  test -z "$as_dir" && as_dir=.
12974    for ac_exec_ext in '' $ac_executable_extensions; do
12975  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12976    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12977    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12978    break 2
12979  fi
12980done
12981  done
12982IFS=$as_save_IFS
12983
12984  ;;
12985esac
12986fi
12987DF=$ac_cv_path_DF
12988if test -n "$DF"; then
12989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12990$as_echo "$DF" >&6; }
12991else
12992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12993$as_echo "no" >&6; }
12994fi
12995
12996
12997  test -n "$DF" && break
12998done
12999
13000    else
13001      # If it succeeded, then it was overridden by the user. We will use it
13002      # for the tool.
13003
13004      # First remove it from the list of overridden variables, so we can test
13005      # for unknown variables in the end.
13006      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13007
13008      # Check if the provided tool contains a complete path.
13009      tool_specified="$DF"
13010      tool_basename="${tool_specified##*/}"
13011      if test "x$tool_basename" = "x$tool_specified"; then
13012        # A command without a complete path is provided, search $PATH.
13013        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13014$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13015        # Extract the first word of "$tool_basename", so it can be a program name with args.
13016set dummy $tool_basename; ac_word=$2
13017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13018$as_echo_n "checking for $ac_word... " >&6; }
13019if ${ac_cv_path_DF+:} false; then :
13020  $as_echo_n "(cached) " >&6
13021else
13022  case $DF in
13023  [\\/]* | ?:[\\/]*)
13024  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13025  ;;
13026  *)
13027  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13028for as_dir in $PATH
13029do
13030  IFS=$as_save_IFS
13031  test -z "$as_dir" && as_dir=.
13032    for ac_exec_ext in '' $ac_executable_extensions; do
13033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13034    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13036    break 2
13037  fi
13038done
13039  done
13040IFS=$as_save_IFS
13041
13042  ;;
13043esac
13044fi
13045DF=$ac_cv_path_DF
13046if test -n "$DF"; then
13047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13048$as_echo "$DF" >&6; }
13049else
13050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13051$as_echo "no" >&6; }
13052fi
13053
13054
13055        if test "x$DF" = x; then
13056          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13057        fi
13058      else
13059        # Otherwise we believe it is a complete path. Use it as it is.
13060        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13061$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13062        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13063$as_echo_n "checking for DF... " >&6; }
13064        if test ! -x "$tool_specified"; then
13065          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13066$as_echo "not found" >&6; }
13067          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13068        fi
13069        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13070$as_echo "$tool_specified" >&6; }
13071      fi
13072    fi
13073  fi
13074
13075
13076
13077
13078  # Publish this variable in the help.
13079
13080
13081  if test "x$SETFILE" = x; then
13082    # The variable is not set by user, try to locate tool using the code snippet
13083    for ac_prog in SetFile
13084do
13085  # Extract the first word of "$ac_prog", so it can be a program name with args.
13086set dummy $ac_prog; ac_word=$2
13087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13088$as_echo_n "checking for $ac_word... " >&6; }
13089if ${ac_cv_path_SETFILE+:} false; then :
13090  $as_echo_n "(cached) " >&6
13091else
13092  case $SETFILE in
13093  [\\/]* | ?:[\\/]*)
13094  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13095  ;;
13096  *)
13097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13098for as_dir in $PATH
13099do
13100  IFS=$as_save_IFS
13101  test -z "$as_dir" && as_dir=.
13102    for ac_exec_ext in '' $ac_executable_extensions; do
13103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13104    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13106    break 2
13107  fi
13108done
13109  done
13110IFS=$as_save_IFS
13111
13112  ;;
13113esac
13114fi
13115SETFILE=$ac_cv_path_SETFILE
13116if test -n "$SETFILE"; then
13117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13118$as_echo "$SETFILE" >&6; }
13119else
13120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13121$as_echo "no" >&6; }
13122fi
13123
13124
13125  test -n "$SETFILE" && break
13126done
13127
13128  else
13129    # The variable is set, but is it from the command line or the environment?
13130
13131    # Try to remove the string !SETFILE! from our list.
13132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13134      # If it failed, the variable was not from the command line. Ignore it,
13135      # but warn the user (except for BASH, which is always set by the calling BASH).
13136      if test "xSETFILE" != xBASH; then
13137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13138$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13139      fi
13140      # Try to locate tool using the code snippet
13141      for ac_prog in SetFile
13142do
13143  # Extract the first word of "$ac_prog", so it can be a program name with args.
13144set dummy $ac_prog; ac_word=$2
13145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13146$as_echo_n "checking for $ac_word... " >&6; }
13147if ${ac_cv_path_SETFILE+:} false; then :
13148  $as_echo_n "(cached) " >&6
13149else
13150  case $SETFILE in
13151  [\\/]* | ?:[\\/]*)
13152  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13153  ;;
13154  *)
13155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13156for as_dir in $PATH
13157do
13158  IFS=$as_save_IFS
13159  test -z "$as_dir" && as_dir=.
13160    for ac_exec_ext in '' $ac_executable_extensions; do
13161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13162    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13164    break 2
13165  fi
13166done
13167  done
13168IFS=$as_save_IFS
13169
13170  ;;
13171esac
13172fi
13173SETFILE=$ac_cv_path_SETFILE
13174if test -n "$SETFILE"; then
13175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13176$as_echo "$SETFILE" >&6; }
13177else
13178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13179$as_echo "no" >&6; }
13180fi
13181
13182
13183  test -n "$SETFILE" && break
13184done
13185
13186    else
13187      # If it succeeded, then it was overridden by the user. We will use it
13188      # for the tool.
13189
13190      # First remove it from the list of overridden variables, so we can test
13191      # for unknown variables in the end.
13192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13193
13194      # Check if the provided tool contains a complete path.
13195      tool_specified="$SETFILE"
13196      tool_basename="${tool_specified##*/}"
13197      if test "x$tool_basename" = "x$tool_specified"; then
13198        # A command without a complete path is provided, search $PATH.
13199        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13200$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13201        # Extract the first word of "$tool_basename", so it can be a program name with args.
13202set dummy $tool_basename; ac_word=$2
13203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13204$as_echo_n "checking for $ac_word... " >&6; }
13205if ${ac_cv_path_SETFILE+:} false; then :
13206  $as_echo_n "(cached) " >&6
13207else
13208  case $SETFILE in
13209  [\\/]* | ?:[\\/]*)
13210  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13211  ;;
13212  *)
13213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13214for as_dir in $PATH
13215do
13216  IFS=$as_save_IFS
13217  test -z "$as_dir" && as_dir=.
13218    for ac_exec_ext in '' $ac_executable_extensions; do
13219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13220    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13222    break 2
13223  fi
13224done
13225  done
13226IFS=$as_save_IFS
13227
13228  ;;
13229esac
13230fi
13231SETFILE=$ac_cv_path_SETFILE
13232if test -n "$SETFILE"; then
13233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13234$as_echo "$SETFILE" >&6; }
13235else
13236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13237$as_echo "no" >&6; }
13238fi
13239
13240
13241        if test "x$SETFILE" = x; then
13242          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13243        fi
13244      else
13245        # Otherwise we believe it is a complete path. Use it as it is.
13246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13247$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13249$as_echo_n "checking for SETFILE... " >&6; }
13250        if test ! -x "$tool_specified"; then
13251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13252$as_echo "not found" >&6; }
13253          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13254        fi
13255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13256$as_echo "$tool_specified" >&6; }
13257      fi
13258    fi
13259  fi
13260
13261
13262
13263
13264  # Publish this variable in the help.
13265
13266
13267  if test "x$CPIO" = x; then
13268    # The variable is not set by user, try to locate tool using the code snippet
13269    for ac_prog in cpio bsdcpio
13270do
13271  # Extract the first word of "$ac_prog", so it can be a program name with args.
13272set dummy $ac_prog; ac_word=$2
13273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13274$as_echo_n "checking for $ac_word... " >&6; }
13275if ${ac_cv_path_CPIO+:} false; then :
13276  $as_echo_n "(cached) " >&6
13277else
13278  case $CPIO in
13279  [\\/]* | ?:[\\/]*)
13280  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13281  ;;
13282  *)
13283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13284for as_dir in $PATH
13285do
13286  IFS=$as_save_IFS
13287  test -z "$as_dir" && as_dir=.
13288    for ac_exec_ext in '' $ac_executable_extensions; do
13289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13290    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13292    break 2
13293  fi
13294done
13295  done
13296IFS=$as_save_IFS
13297
13298  ;;
13299esac
13300fi
13301CPIO=$ac_cv_path_CPIO
13302if test -n "$CPIO"; then
13303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13304$as_echo "$CPIO" >&6; }
13305else
13306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13307$as_echo "no" >&6; }
13308fi
13309
13310
13311  test -n "$CPIO" && break
13312done
13313
13314  else
13315    # The variable is set, but is it from the command line or the environment?
13316
13317    # Try to remove the string !CPIO! from our list.
13318    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13319    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13320      # If it failed, the variable was not from the command line. Ignore it,
13321      # but warn the user (except for BASH, which is always set by the calling BASH).
13322      if test "xCPIO" != xBASH; then
13323        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13324$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13325      fi
13326      # Try to locate tool using the code snippet
13327      for ac_prog in cpio bsdcpio
13328do
13329  # Extract the first word of "$ac_prog", so it can be a program name with args.
13330set dummy $ac_prog; ac_word=$2
13331{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13332$as_echo_n "checking for $ac_word... " >&6; }
13333if ${ac_cv_path_CPIO+:} false; then :
13334  $as_echo_n "(cached) " >&6
13335else
13336  case $CPIO in
13337  [\\/]* | ?:[\\/]*)
13338  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13339  ;;
13340  *)
13341  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13342for as_dir in $PATH
13343do
13344  IFS=$as_save_IFS
13345  test -z "$as_dir" && as_dir=.
13346    for ac_exec_ext in '' $ac_executable_extensions; do
13347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13348    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13350    break 2
13351  fi
13352done
13353  done
13354IFS=$as_save_IFS
13355
13356  ;;
13357esac
13358fi
13359CPIO=$ac_cv_path_CPIO
13360if test -n "$CPIO"; then
13361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13362$as_echo "$CPIO" >&6; }
13363else
13364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13365$as_echo "no" >&6; }
13366fi
13367
13368
13369  test -n "$CPIO" && break
13370done
13371
13372    else
13373      # If it succeeded, then it was overridden by the user. We will use it
13374      # for the tool.
13375
13376      # First remove it from the list of overridden variables, so we can test
13377      # for unknown variables in the end.
13378      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13379
13380      # Check if the provided tool contains a complete path.
13381      tool_specified="$CPIO"
13382      tool_basename="${tool_specified##*/}"
13383      if test "x$tool_basename" = "x$tool_specified"; then
13384        # A command without a complete path is provided, search $PATH.
13385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13386$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13387        # Extract the first word of "$tool_basename", so it can be a program name with args.
13388set dummy $tool_basename; ac_word=$2
13389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13390$as_echo_n "checking for $ac_word... " >&6; }
13391if ${ac_cv_path_CPIO+:} false; then :
13392  $as_echo_n "(cached) " >&6
13393else
13394  case $CPIO in
13395  [\\/]* | ?:[\\/]*)
13396  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13397  ;;
13398  *)
13399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13400for as_dir in $PATH
13401do
13402  IFS=$as_save_IFS
13403  test -z "$as_dir" && as_dir=.
13404    for ac_exec_ext in '' $ac_executable_extensions; do
13405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13406    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13408    break 2
13409  fi
13410done
13411  done
13412IFS=$as_save_IFS
13413
13414  ;;
13415esac
13416fi
13417CPIO=$ac_cv_path_CPIO
13418if test -n "$CPIO"; then
13419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13420$as_echo "$CPIO" >&6; }
13421else
13422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13423$as_echo "no" >&6; }
13424fi
13425
13426
13427        if test "x$CPIO" = x; then
13428          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13429        fi
13430      else
13431        # Otherwise we believe it is a complete path. Use it as it is.
13432        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13433$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13434        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13435$as_echo_n "checking for CPIO... " >&6; }
13436        if test ! -x "$tool_specified"; then
13437          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13438$as_echo "not found" >&6; }
13439          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13440        fi
13441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13442$as_echo "$tool_specified" >&6; }
13443      fi
13444    fi
13445  fi
13446
13447
13448
13449
13450# Now we can determine OpenJDK build and target platforms. This is required to
13451# have early on.
13452# Make sure we can run config.sub.
13453$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13454  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13455
13456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13457$as_echo_n "checking build system type... " >&6; }
13458if ${ac_cv_build+:} false; then :
13459  $as_echo_n "(cached) " >&6
13460else
13461  ac_build_alias=$build_alias
13462test "x$ac_build_alias" = x &&
13463  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13464test "x$ac_build_alias" = x &&
13465  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13466ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13467  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13468
13469fi
13470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13471$as_echo "$ac_cv_build" >&6; }
13472case $ac_cv_build in
13473*-*-*) ;;
13474*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13475esac
13476build=$ac_cv_build
13477ac_save_IFS=$IFS; IFS='-'
13478set x $ac_cv_build
13479shift
13480build_cpu=$1
13481build_vendor=$2
13482shift; shift
13483# Remember, the first character of IFS is used to create $*,
13484# except with old shells:
13485build_os=$*
13486IFS=$ac_save_IFS
13487case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13488
13489
13490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13491$as_echo_n "checking host system type... " >&6; }
13492if ${ac_cv_host+:} false; then :
13493  $as_echo_n "(cached) " >&6
13494else
13495  if test "x$host_alias" = x; then
13496  ac_cv_host=$ac_cv_build
13497else
13498  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13499    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13500fi
13501
13502fi
13503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13504$as_echo "$ac_cv_host" >&6; }
13505case $ac_cv_host in
13506*-*-*) ;;
13507*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13508esac
13509host=$ac_cv_host
13510ac_save_IFS=$IFS; IFS='-'
13511set x $ac_cv_host
13512shift
13513host_cpu=$1
13514host_vendor=$2
13515shift; shift
13516# Remember, the first character of IFS is used to create $*,
13517# except with old shells:
13518host_os=$*
13519IFS=$ac_save_IFS
13520case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13521
13522
13523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13524$as_echo_n "checking target system type... " >&6; }
13525if ${ac_cv_target+:} false; then :
13526  $as_echo_n "(cached) " >&6
13527else
13528  if test "x$target_alias" = x; then
13529  ac_cv_target=$ac_cv_host
13530else
13531  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13532    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13533fi
13534
13535fi
13536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13537$as_echo "$ac_cv_target" >&6; }
13538case $ac_cv_target in
13539*-*-*) ;;
13540*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13541esac
13542target=$ac_cv_target
13543ac_save_IFS=$IFS; IFS='-'
13544set x $ac_cv_target
13545shift
13546target_cpu=$1
13547target_vendor=$2
13548shift; shift
13549# Remember, the first character of IFS is used to create $*,
13550# except with old shells:
13551target_os=$*
13552IFS=$ac_save_IFS
13553case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13554
13555
13556# The aliases save the names the user supplied, while $host etc.
13557# will get canonicalized.
13558test -n "$target_alias" &&
13559  test "$program_prefix$program_suffix$program_transform_name" = \
13560    NONENONEs,x,x, &&
13561  program_prefix=${target_alias}-
13562
13563  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13564  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13565  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13566  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13567  # to use the configure naming style.
13568
13569
13570
13571
13572
13573  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13574  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13575  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13576  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13577  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13578  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13579
13580
13581
13582  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13583
13584  case "$build_os" in
13585    *linux*)
13586      VAR_OS=linux
13587      VAR_OS_TYPE=unix
13588      ;;
13589    *solaris*)
13590      VAR_OS=solaris
13591      VAR_OS_TYPE=unix
13592      ;;
13593    *darwin*)
13594      VAR_OS=macosx
13595      VAR_OS_TYPE=unix
13596      ;;
13597    *bsd*)
13598      VAR_OS=bsd
13599      VAR_OS_TYPE=unix
13600      ;;
13601    *cygwin*)
13602      VAR_OS=windows
13603      VAR_OS_ENV=windows.cygwin
13604      ;;
13605    *mingw*)
13606      VAR_OS=windows
13607      VAR_OS_ENV=windows.msys
13608      ;;
13609    *aix*)
13610      VAR_OS=aix
13611      VAR_OS_TYPE=unix
13612      ;;
13613    *)
13614      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13615      ;;
13616  esac
13617
13618
13619  # First argument is the cpu name from the trip/quad
13620  case "$build_cpu" in
13621    x86_64)
13622      VAR_CPU=x86_64
13623      VAR_CPU_ARCH=x86
13624      VAR_CPU_BITS=64
13625      VAR_CPU_ENDIAN=little
13626      ;;
13627    i?86)
13628      VAR_CPU=x86
13629      VAR_CPU_ARCH=x86
13630      VAR_CPU_BITS=32
13631      VAR_CPU_ENDIAN=little
13632      ;;
13633    arm*)
13634      VAR_CPU=arm
13635      VAR_CPU_ARCH=arm
13636      VAR_CPU_BITS=32
13637      VAR_CPU_ENDIAN=little
13638      ;;
13639    powerpc)
13640      VAR_CPU=ppc
13641      VAR_CPU_ARCH=ppc
13642      VAR_CPU_BITS=32
13643      VAR_CPU_ENDIAN=big
13644      ;;
13645    powerpc64)
13646      VAR_CPU=ppc64
13647      VAR_CPU_ARCH=ppc
13648      VAR_CPU_BITS=64
13649      VAR_CPU_ENDIAN=big
13650      ;;
13651    powerpc64le)
13652      VAR_CPU=ppc64
13653      VAR_CPU_ARCH=ppc
13654      VAR_CPU_BITS=64
13655      VAR_CPU_ENDIAN=little
13656      ;;
13657    s390)
13658      VAR_CPU=s390
13659      VAR_CPU_ARCH=s390
13660      VAR_CPU_BITS=32
13661      VAR_CPU_ENDIAN=big
13662      ;;
13663    s390x)
13664      VAR_CPU=s390x
13665      VAR_CPU_ARCH=s390
13666      VAR_CPU_BITS=64
13667      VAR_CPU_ENDIAN=big
13668      ;;
13669    sparc)
13670      VAR_CPU=sparc
13671      VAR_CPU_ARCH=sparc
13672      VAR_CPU_BITS=32
13673      VAR_CPU_ENDIAN=big
13674      ;;
13675    sparcv9|sparc64)
13676      VAR_CPU=sparcv9
13677      VAR_CPU_ARCH=sparc
13678      VAR_CPU_BITS=64
13679      VAR_CPU_ENDIAN=big
13680      ;;
13681    *)
13682      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13683      ;;
13684  esac
13685
13686  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13687  OPENJDK_BUILD_OS="$VAR_OS"
13688  if test "x$VAR_OS_TYPE" != x; then
13689    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13690  else
13691    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13692  fi
13693  if test "x$VAR_OS_ENV" != x; then
13694    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13695  else
13696    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13697  fi
13698  OPENJDK_BUILD_CPU="$VAR_CPU"
13699  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13700  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13701  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13702
13703
13704
13705
13706
13707
13708
13709
13710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13711$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13713$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13714
13715  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13716
13717  case "$host_os" in
13718    *linux*)
13719      VAR_OS=linux
13720      VAR_OS_TYPE=unix
13721      ;;
13722    *solaris*)
13723      VAR_OS=solaris
13724      VAR_OS_TYPE=unix
13725      ;;
13726    *darwin*)
13727      VAR_OS=macosx
13728      VAR_OS_TYPE=unix
13729      ;;
13730    *bsd*)
13731      VAR_OS=bsd
13732      VAR_OS_TYPE=unix
13733      ;;
13734    *cygwin*)
13735      VAR_OS=windows
13736      VAR_OS_ENV=windows.cygwin
13737      ;;
13738    *mingw*)
13739      VAR_OS=windows
13740      VAR_OS_ENV=windows.msys
13741      ;;
13742    *aix*)
13743      VAR_OS=aix
13744      VAR_OS_TYPE=unix
13745      ;;
13746    *)
13747      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13748      ;;
13749  esac
13750
13751
13752  # First argument is the cpu name from the trip/quad
13753  case "$host_cpu" in
13754    x86_64)
13755      VAR_CPU=x86_64
13756      VAR_CPU_ARCH=x86
13757      VAR_CPU_BITS=64
13758      VAR_CPU_ENDIAN=little
13759      ;;
13760    i?86)
13761      VAR_CPU=x86
13762      VAR_CPU_ARCH=x86
13763      VAR_CPU_BITS=32
13764      VAR_CPU_ENDIAN=little
13765      ;;
13766    arm*)
13767      VAR_CPU=arm
13768      VAR_CPU_ARCH=arm
13769      VAR_CPU_BITS=32
13770      VAR_CPU_ENDIAN=little
13771      ;;
13772    powerpc)
13773      VAR_CPU=ppc
13774      VAR_CPU_ARCH=ppc
13775      VAR_CPU_BITS=32
13776      VAR_CPU_ENDIAN=big
13777      ;;
13778    powerpc64)
13779      VAR_CPU=ppc64
13780      VAR_CPU_ARCH=ppc
13781      VAR_CPU_BITS=64
13782      VAR_CPU_ENDIAN=big
13783      ;;
13784    powerpc64le)
13785      VAR_CPU=ppc64
13786      VAR_CPU_ARCH=ppc
13787      VAR_CPU_BITS=64
13788      VAR_CPU_ENDIAN=little
13789      ;;
13790    s390)
13791      VAR_CPU=s390
13792      VAR_CPU_ARCH=s390
13793      VAR_CPU_BITS=32
13794      VAR_CPU_ENDIAN=big
13795      ;;
13796    s390x)
13797      VAR_CPU=s390x
13798      VAR_CPU_ARCH=s390
13799      VAR_CPU_BITS=64
13800      VAR_CPU_ENDIAN=big
13801      ;;
13802    sparc)
13803      VAR_CPU=sparc
13804      VAR_CPU_ARCH=sparc
13805      VAR_CPU_BITS=32
13806      VAR_CPU_ENDIAN=big
13807      ;;
13808    sparcv9|sparc64)
13809      VAR_CPU=sparcv9
13810      VAR_CPU_ARCH=sparc
13811      VAR_CPU_BITS=64
13812      VAR_CPU_ENDIAN=big
13813      ;;
13814    *)
13815      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13816      ;;
13817  esac
13818
13819  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13820  OPENJDK_TARGET_OS="$VAR_OS"
13821  if test "x$VAR_OS_TYPE" != x; then
13822    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13823  else
13824    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13825  fi
13826  if test "x$VAR_OS_ENV" != x; then
13827    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13828  else
13829    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13830  fi
13831  OPENJDK_TARGET_CPU="$VAR_CPU"
13832  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13833  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13834  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13835
13836
13837
13838
13839
13840
13841
13842
13843  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13844$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13846$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13847
13848
13849
13850# Check whether --with-target-bits was given.
13851if test "${with_target_bits+set}" = set; then :
13852  withval=$with_target_bits;
13853fi
13854
13855
13856  # We have three types of compiles:
13857  # native  == normal compilation, target system == build system
13858  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13859  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13860  #
13861  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13862    # We're doing a proper cross-compilation
13863    COMPILE_TYPE="cross"
13864  else
13865    COMPILE_TYPE="native"
13866  fi
13867
13868  if test "x$with_target_bits" != x; then
13869    if test "x$COMPILE_TYPE" = "xcross"; then
13870      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13871    fi
13872
13873    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13874      # A reduced build is requested
13875      COMPILE_TYPE="reduced"
13876      OPENJDK_TARGET_CPU_BITS=32
13877      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13878        OPENJDK_TARGET_CPU=x86
13879      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13880        OPENJDK_TARGET_CPU=sparc
13881      else
13882        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13883      fi
13884    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13885      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
13886    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13887      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13888$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13889    else
13890      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13891    fi
13892  fi
13893
13894
13895  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13896$as_echo_n "checking compilation type... " >&6; }
13897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13898$as_echo "$COMPILE_TYPE" >&6; }
13899
13900
13901  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13902    REQUIRED_OS_NAME=SunOS
13903    REQUIRED_OS_VERSION=5.10
13904  fi
13905  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13906    REQUIRED_OS_NAME=Linux
13907    REQUIRED_OS_VERSION=2.6
13908  fi
13909  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13910    REQUIRED_OS_NAME=Windows
13911    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13912      REQUIRED_OS_VERSION=5.2
13913    else
13914      REQUIRED_OS_VERSION=5.1
13915    fi
13916  fi
13917  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13918    REQUIRED_OS_NAME=Darwin
13919    REQUIRED_OS_VERSION=11.2
13920  fi
13921
13922
13923
13924
13925
13926  # Also store the legacy naming of the cpu.
13927  # Ie i586 and amd64 instead of x86 and x86_64
13928  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13929  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13930    OPENJDK_TARGET_CPU_LEGACY="i586"
13931  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13932    # On all platforms except MacOSX replace x86_64 with amd64.
13933    OPENJDK_TARGET_CPU_LEGACY="amd64"
13934  fi
13935
13936
13937  # And the second legacy naming of the cpu.
13938  # Ie i386 and amd64 instead of x86 and x86_64.
13939  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13940  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13941    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13942  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13943    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13944  fi
13945
13946
13947  # This is the name of the cpu (but using i386 and amd64 instead of
13948  # x86 and x86_64, respectively), preceeded by a /, to be used when
13949  # locating libraries. On macosx, it's empty, though.
13950  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13951  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13952    OPENJDK_TARGET_CPU_LIBDIR=""
13953  fi
13954
13955
13956  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13957  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13958  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13959  OPENJDK_TARGET_CPU_ISADIR=""
13960  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13961    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13962      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13963    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13964      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13965    fi
13966  fi
13967
13968
13969  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13970  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13971  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13972    # On linux only, we replace x86 with i386.
13973    OPENJDK_TARGET_CPU_OSARCH="i386"
13974  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13975    # On all platforms except macosx, we replace x86_64 with amd64.
13976    OPENJDK_TARGET_CPU_OSARCH="amd64"
13977  fi
13978
13979
13980  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13981  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13982    OPENJDK_TARGET_CPU_JLI="i386"
13983  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13984    # On all platforms except macosx, we replace x86_64 with amd64.
13985    OPENJDK_TARGET_CPU_JLI="amd64"
13986  fi
13987  # Now setup the -D flags for building libjli.
13988  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13989  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13990    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13991      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13992    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13993      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13994    fi
13995  fi
13996
13997
13998  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13999      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
14000  else
14001      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
14002  fi
14003
14004
14005  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14006    A_LP64="LP64:="
14007    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14008    # unpack200.exe
14009    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14010      ADD_LP64="-D_LP64=1"
14011    fi
14012  fi
14013  LP64=$A_LP64
14014
14015
14016  if test "x$COMPILE_TYPE" = "xcross"; then
14017    # FIXME: ... or should this include reduced builds..?
14018    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14019  else
14020    DEFINE_CROSS_COMPILE_ARCH=""
14021  fi
14022
14023
14024  # ZERO_ARCHDEF is used to enable architecture-specific code
14025  case "${OPENJDK_TARGET_CPU}" in
14026    ppc)     ZERO_ARCHDEF=PPC32 ;;
14027    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14028    s390*)   ZERO_ARCHDEF=S390  ;;
14029    sparc*)  ZERO_ARCHDEF=SPARC ;;
14030    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14031    x86)     ZERO_ARCHDEF=IA32  ;;
14032    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14033  esac
14034
14035
14036
14037
14038# Continue setting up basic stuff. Most remaining code require fundamental tools.
14039
14040  # Save the current directory this script was started from
14041  CURDIR="$PWD"
14042
14043  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14044    PATH_SEP=";"
14045
14046  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14047  if test $SRC_ROOT_LENGTH -gt 100; then
14048    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14049  fi
14050
14051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14053$as_echo_n "checking cygwin release... " >&6; }
14054    CYGWIN_VERSION=`$UNAME -r`
14055    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14056$as_echo "$CYGWIN_VERSION" >&6; }
14057    WINDOWS_ENV_VENDOR='cygwin'
14058    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14059
14060    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14061    if test "x$CYGWIN_VERSION_OK" = x; then
14062      { $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
14063$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;}
14064      as_fn_error $? "Cannot continue" "$LINENO" 5
14065    fi
14066    if test "x$CYGPATH" = x; then
14067      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14068    fi
14069    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14070$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14071    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14072    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14073    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14074    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14076$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14077    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14078    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14079    if test "x$test_cygdrive_prefix" = x; then
14080      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14081    fi
14082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14084$as_echo_n "checking msys release... " >&6; }
14085    MSYS_VERSION=`$UNAME -r`
14086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14087$as_echo "$MSYS_VERSION" >&6; }
14088
14089    WINDOWS_ENV_VENDOR='msys'
14090    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14091
14092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14093$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14094    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14095    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14096
14097  windows_path="$MSYS_ROOT_PATH"
14098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14099    unix_path=`$CYGPATH -u "$windows_path"`
14100    MSYS_ROOT_PATH="$unix_path"
14101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14103    MSYS_ROOT_PATH="$unix_path"
14104  fi
14105
14106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14107$as_echo "$MSYS_ROOT_PATH" >&6; }
14108    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14109  else
14110    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14111  fi
14112
14113  # Test if windows or unix (cygwin/msys) find is first in path.
14114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14115$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14116  FIND_BINARY_OUTPUT=`find --version 2>&1`
14117  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14119$as_echo "unix style" >&6; }
14120  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14121    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14122$as_echo "Windows" >&6; }
14123    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14124$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14125    { $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
14126$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14127    as_fn_error $? "Cannot continue" "$LINENO" 5
14128  else
14129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14130$as_echo "unknown" >&6; }
14131    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14132$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14133  fi
14134
14135  else
14136    PATH_SEP=":"
14137  fi
14138
14139
14140  # We get the top-level directory from the supporting wrappers.
14141  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14142$as_echo_n "checking for top-level directory... " >&6; }
14143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14144$as_echo "$TOPDIR" >&6; }
14145
14146
14147  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14148
14149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14150
14151  # Input might be given as Windows format, start by converting to
14152  # unix format.
14153  path="$CURDIR"
14154  new_path=`$CYGPATH -u "$path"`
14155
14156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14159  # "foo.exe" is OK but "foo" is an error.
14160  #
14161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14162  # It is also a way to make sure we got the proper file name for the real test later on.
14163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14164  if test "x$test_shortpath" = x; then
14165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14166$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14167    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14168  fi
14169
14170  # Call helper function which possibly converts this using DOS-style short mode.
14171  # If so, the updated path is stored in $new_path.
14172
14173  input_path="$new_path"
14174  # Check if we need to convert this using DOS-style short mode. If the path
14175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14176  # take no chances and rewrite it.
14177  # Note: m4 eats our [], so we need to use [ and ] instead.
14178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14179  if test "x$has_forbidden_chars" != x; then
14180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14184      # Going to short mode and back again did indeed matter. Since short mode is
14185      # case insensitive, let's make it lowercase to improve readability.
14186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14187      # Now convert it back to Unix-stile (cygpath)
14188      input_path=`$CYGPATH -u "$shortmode_path"`
14189      new_path="$input_path"
14190    fi
14191  fi
14192
14193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14194  if test "x$test_cygdrive_prefix" = x; then
14195    # As a simple fix, exclude /usr/bin since it's not a real path.
14196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14198      # a path prefixed by /cygdrive for fixpath to work.
14199      new_path="$CYGWIN_ROOT_PATH$input_path"
14200    fi
14201  fi
14202
14203
14204  if test "x$path" != "x$new_path"; then
14205    CURDIR="$new_path"
14206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14207$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14208  fi
14209
14210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14211
14212  path="$CURDIR"
14213  has_colon=`$ECHO $path | $GREP ^.:`
14214  new_path="$path"
14215  if test "x$has_colon" = x; then
14216    # Not in mixed or Windows style, start by that.
14217    new_path=`cmd //c echo $path`
14218  fi
14219
14220
14221  input_path="$new_path"
14222  # Check if we need to convert this using DOS-style short mode. If the path
14223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14224  # take no chances and rewrite it.
14225  # Note: m4 eats our [], so we need to use [ and ] instead.
14226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14227  if test "x$has_forbidden_chars" != x; then
14228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230  fi
14231
14232
14233  windows_path="$new_path"
14234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14235    unix_path=`$CYGPATH -u "$windows_path"`
14236    new_path="$unix_path"
14237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14239    new_path="$unix_path"
14240  fi
14241
14242  if test "x$path" != "x$new_path"; then
14243    CURDIR="$new_path"
14244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14245$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14246  fi
14247
14248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14250
14251  else
14252    # We're on a unix platform. Hooray! :)
14253    path="$CURDIR"
14254    has_space=`$ECHO "$path" | $GREP " "`
14255    if test "x$has_space" != x; then
14256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14257$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14258      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14259    fi
14260
14261    # Use eval to expand a potential ~
14262    eval path="$path"
14263    if test ! -f "$path" && test ! -d "$path"; then
14264      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14265    fi
14266
14267    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14268  fi
14269
14270
14271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14272
14273  # Input might be given as Windows format, start by converting to
14274  # unix format.
14275  path="$TOPDIR"
14276  new_path=`$CYGPATH -u "$path"`
14277
14278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14281  # "foo.exe" is OK but "foo" is an error.
14282  #
14283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14284  # It is also a way to make sure we got the proper file name for the real test later on.
14285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14286  if test "x$test_shortpath" = x; then
14287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14288$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14289    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14290  fi
14291
14292  # Call helper function which possibly converts this using DOS-style short mode.
14293  # If so, the updated path is stored in $new_path.
14294
14295  input_path="$new_path"
14296  # Check if we need to convert this using DOS-style short mode. If the path
14297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14298  # take no chances and rewrite it.
14299  # Note: m4 eats our [], so we need to use [ and ] instead.
14300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14301  if test "x$has_forbidden_chars" != x; then
14302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14306      # Going to short mode and back again did indeed matter. Since short mode is
14307      # case insensitive, let's make it lowercase to improve readability.
14308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14309      # Now convert it back to Unix-stile (cygpath)
14310      input_path=`$CYGPATH -u "$shortmode_path"`
14311      new_path="$input_path"
14312    fi
14313  fi
14314
14315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14316  if test "x$test_cygdrive_prefix" = x; then
14317    # As a simple fix, exclude /usr/bin since it's not a real path.
14318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14320      # a path prefixed by /cygdrive for fixpath to work.
14321      new_path="$CYGWIN_ROOT_PATH$input_path"
14322    fi
14323  fi
14324
14325
14326  if test "x$path" != "x$new_path"; then
14327    TOPDIR="$new_path"
14328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14329$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14330  fi
14331
14332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14333
14334  path="$TOPDIR"
14335  has_colon=`$ECHO $path | $GREP ^.:`
14336  new_path="$path"
14337  if test "x$has_colon" = x; then
14338    # Not in mixed or Windows style, start by that.
14339    new_path=`cmd //c echo $path`
14340  fi
14341
14342
14343  input_path="$new_path"
14344  # Check if we need to convert this using DOS-style short mode. If the path
14345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14346  # take no chances and rewrite it.
14347  # Note: m4 eats our [], so we need to use [ and ] instead.
14348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14349  if test "x$has_forbidden_chars" != x; then
14350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14352  fi
14353
14354
14355  windows_path="$new_path"
14356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14357    unix_path=`$CYGPATH -u "$windows_path"`
14358    new_path="$unix_path"
14359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14361    new_path="$unix_path"
14362  fi
14363
14364  if test "x$path" != "x$new_path"; then
14365    TOPDIR="$new_path"
14366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14367$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14368  fi
14369
14370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14372
14373  else
14374    # We're on a unix platform. Hooray! :)
14375    path="$TOPDIR"
14376    has_space=`$ECHO "$path" | $GREP " "`
14377    if test "x$has_space" != x; then
14378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14379$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14380      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14381    fi
14382
14383    # Use eval to expand a potential ~
14384    eval path="$path"
14385    if test ! -f "$path" && test ! -d "$path"; then
14386      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14387    fi
14388
14389    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14390  fi
14391
14392  # SRC_ROOT is a traditional alias for TOPDIR.
14393  SRC_ROOT=$TOPDIR
14394
14395  # Locate the directory of this script.
14396  AUTOCONF_DIR=$TOPDIR/common/autoconf
14397
14398
14399  # Setup default logging of stdout and stderr to build.log in the output root.
14400  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14401  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14402  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14403
14404
14405
14406
14407
14408# Check if it's a pure open build or if custom sources are to be used.
14409
14410  # Check whether --enable-openjdk-only was given.
14411if test "${enable_openjdk_only+set}" = set; then :
14412  enableval=$enable_openjdk_only;
14413else
14414  enable_openjdk_only="no"
14415fi
14416
14417
14418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14419$as_echo_n "checking for presence of closed sources... " >&6; }
14420  if test -d "$SRC_ROOT/jdk/src/closed"; then
14421    CLOSED_SOURCE_PRESENT=yes
14422  else
14423    CLOSED_SOURCE_PRESENT=no
14424  fi
14425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14426$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14427
14428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14429$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14430  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14432$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14433
14434  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14435    OPENJDK=true
14436    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14437      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14438$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14439    fi
14440  else
14441    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14442      OPENJDK=true
14443    else
14444      OPENJDK=false
14445    fi
14446  fi
14447
14448  if test "x$OPENJDK" = "xtrue"; then
14449    SET_OPENJDK="OPENJDK=true"
14450  fi
14451
14452
14453
14454  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14455  # the IncludeCustomExtension macro.
14456
14457
14458# Check whether --with-custom-make-dir was given.
14459if test "${with_custom_make_dir+set}" = set; then :
14460  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
14461$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14462fi
14463
14464
14465
14466
14467# These are needed to be able to create a configuration name (and thus the output directory)
14468
14469  ###############################################################################
14470  #
14471  # Check which variant of the JDK that we want to build.
14472  # Currently we have:
14473  #    normal:   standard edition
14474  # but the custom make system may add other variants
14475  #
14476  # Effectively the JDK variant gives a name to a specific set of
14477  # modules to compile into the JDK. In the future, these modules
14478  # might even be Jigsaw modules.
14479  #
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14481$as_echo_n "checking which variant of the JDK to build... " >&6; }
14482
14483# Check whether --with-jdk-variant was given.
14484if test "${with_jdk_variant+set}" = set; then :
14485  withval=$with_jdk_variant;
14486fi
14487
14488
14489  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14490    JDK_VARIANT="normal"
14491  else
14492    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14493  fi
14494
14495
14496
14497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14498$as_echo "$JDK_VARIANT" >&6; }
14499
14500
14501###############################################################################
14502#
14503# Check which interpreter of the JVM we want to build.
14504# Currently we have:
14505#    template: Template interpreter (the default)
14506#    cpp     : C++ interpreter
14507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14508$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14509
14510# Check whether --with-jvm-interpreter was given.
14511if test "${with_jvm_interpreter+set}" = set; then :
14512  withval=$with_jvm_interpreter;
14513fi
14514
14515
14516if test "x$with_jvm_interpreter" = x; then
14517     with_jvm_interpreter="template"
14518fi
14519
14520JVM_INTERPRETER="$with_jvm_interpreter"
14521
14522if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14523   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14524fi
14525
14526
14527
14528{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14529$as_echo "$with_jvm_interpreter" >&6; }
14530
14531
14532
14533  ###############################################################################
14534  #
14535  # Check which variants of the JVM that we want to build.
14536  # Currently we have:
14537  #    server: normal interpreter and a tiered C1/C2 compiler
14538  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14539  #    minimal1: reduced form of client with optional VM services and features stripped out
14540  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14541  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14542  #    zero: no machine code interpreter, no compiler
14543  #    zeroshark: zero interpreter and shark/llvm compiler backend
14544#    core: interpreter only, no compiler (only works on some platforms)
14545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14546$as_echo_n "checking which variants of the JVM to build... " >&6; }
14547
14548# Check whether --with-jvm-variants was given.
14549if test "${with_jvm_variants+set}" = set; then :
14550  withval=$with_jvm_variants;
14551fi
14552
14553
14554  if test "x$with_jvm_variants" = x; then
14555    with_jvm_variants="server"
14556  fi
14557
14558  JVM_VARIANTS=",$with_jvm_variants,"
14559  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,//'`
14560
14561  if test "x$TEST_VARIANTS" != "x,"; then
14562     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14563  fi
14564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14565$as_echo "$with_jvm_variants" >&6; }
14566
14567  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14568  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14569  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14570  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14571  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14572  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14573  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14574
14575  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14576    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14577      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14578    fi
14579  fi
14580  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14581    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14582      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14583    fi
14584  fi
14585  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14586    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14587      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14588    fi
14589  fi
14590
14591  # Replace the commas with AND for use in the build directory name.
14592  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14593  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/'`
14594  if test "x$COUNT_VARIANTS" != "x,1"; then
14595    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14596  else
14597    BUILDING_MULTIPLE_JVM_VARIANTS=no
14598  fi
14599
14600
14601
14602
14603
14604
14605
14606
14607
14608
14609  INCLUDE_SA=true
14610  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14611    INCLUDE_SA=false
14612  fi
14613  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14614    INCLUDE_SA=false
14615  fi
14616  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14617    INCLUDE_SA=false
14618  fi
14619
14620
14621  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14622    MACOSX_UNIVERSAL="true"
14623  fi
14624
14625
14626
14627
14628  ###############################################################################
14629  #
14630  # Set the debug level
14631  #    release: no debug information, all optimizations, no asserts.
14632  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14633  #    fastdebug: debug information (-g), all optimizations, all asserts
14634  #    slowdebug: debug information (-g), no optimizations, all asserts
14635  #
14636  DEBUG_LEVEL="release"
14637  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14638$as_echo_n "checking which debug level to use... " >&6; }
14639  # Check whether --enable-debug was given.
14640if test "${enable_debug+set}" = set; then :
14641  enableval=$enable_debug;
14642        ENABLE_DEBUG="${enableval}"
14643        DEBUG_LEVEL="fastdebug"
14644
14645else
14646  ENABLE_DEBUG="no"
14647fi
14648
14649
14650
14651# Check whether --with-debug-level was given.
14652if test "${with_debug_level+set}" = set; then :
14653  withval=$with_debug_level;
14654        DEBUG_LEVEL="${withval}"
14655        if test "x$ENABLE_DEBUG" = xyes; then
14656          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14657        fi
14658
14659fi
14660
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14662$as_echo "$DEBUG_LEVEL" >&6; }
14663
14664  if test "x$DEBUG_LEVEL" != xrelease && \
14665      test "x$DEBUG_LEVEL" != xoptimized && \
14666      test "x$DEBUG_LEVEL" != xfastdebug && \
14667      test "x$DEBUG_LEVEL" != xslowdebug; then
14668    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14669  fi
14670
14671
14672  ###############################################################################
14673  #
14674  # Setup legacy vars/targets and new vars to deal with different debug levels.
14675  #
14676
14677  case $DEBUG_LEVEL in
14678    release )
14679      VARIANT="OPT"
14680      FASTDEBUG="false"
14681      DEBUG_CLASSFILES="false"
14682      BUILD_VARIANT_RELEASE=""
14683      HOTSPOT_DEBUG_LEVEL="product"
14684      HOTSPOT_EXPORT="product"
14685      ;;
14686    fastdebug )
14687      VARIANT="DBG"
14688      FASTDEBUG="true"
14689      DEBUG_CLASSFILES="true"
14690      BUILD_VARIANT_RELEASE="-fastdebug"
14691      HOTSPOT_DEBUG_LEVEL="fastdebug"
14692      HOTSPOT_EXPORT="fastdebug"
14693      ;;
14694    slowdebug )
14695      VARIANT="DBG"
14696      FASTDEBUG="false"
14697      DEBUG_CLASSFILES="true"
14698      BUILD_VARIANT_RELEASE="-debug"
14699      HOTSPOT_DEBUG_LEVEL="debug"
14700      HOTSPOT_EXPORT="debug"
14701      ;;
14702    optimized )
14703      VARIANT="OPT"
14704      FASTDEBUG="false"
14705      DEBUG_CLASSFILES="false"
14706      BUILD_VARIANT_RELEASE="-optimized"
14707      HOTSPOT_DEBUG_LEVEL="optimized"
14708      HOTSPOT_EXPORT="optimized"
14709      ;;
14710  esac
14711
14712  # The debug level 'optimized' is a little special because it is currently only
14713  # applicable to the HotSpot build where it means to build a completely
14714  # optimized version of the VM without any debugging code (like for the
14715  # 'release' debug level which is called 'product' in the HotSpot build) but
14716  # with the exception that it can contain additional code which is otherwise
14717  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14718  # test new and/or experimental features which are not intended for customer
14719  # shipment. Because these new features need to be tested and benchmarked in
14720  # real world scenarios, we want to build the containing JDK at the 'release'
14721  # debug level.
14722  if test "x$DEBUG_LEVEL" = xoptimized; then
14723    DEBUG_LEVEL="release"
14724  fi
14725
14726  #####
14727  # Generate the legacy makefile targets for hotspot.
14728  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14729  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14730  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14731  # But until then ...
14732  HOTSPOT_TARGET=""
14733
14734  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14735    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14736  fi
14737
14738  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14739    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14740  fi
14741
14742  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14743    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14744  fi
14745
14746  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14747    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14748  fi
14749
14750  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14751    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14752  fi
14753
14754  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14755    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14756  fi
14757
14758  if test "x$JVM_VARIANT_CORE" = xtrue; then
14759    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14760  fi
14761
14762  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14763
14764  # On Macosx universal binaries are produced, but they only contain
14765  # 64 bit intel. This invalidates control of which jvms are built
14766  # from configure, but only server is valid anyway. Fix this
14767  # when hotspot makefiles are rewritten.
14768  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14769    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14770  fi
14771
14772  #####
14773
14774
14775
14776
14777
14778
14779
14780
14781# With basic setup done, call the custom early hook.
14782
14783
14784# Check if we have devkits, extra paths or sysroot set.
14785
14786
14787# Check whether --with-devkit was given.
14788if test "${with_devkit+set}" = set; then :
14789  withval=$with_devkit;
14790
14791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14792
14793  # Input might be given as Windows format, start by converting to
14794  # unix format.
14795  path="$with_devkit"
14796  new_path=`$CYGPATH -u "$path"`
14797
14798  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14799  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14800  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14801  # "foo.exe" is OK but "foo" is an error.
14802  #
14803  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14804  # It is also a way to make sure we got the proper file name for the real test later on.
14805  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14806  if test "x$test_shortpath" = x; then
14807    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14808$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14809    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14810  fi
14811
14812  # Call helper function which possibly converts this using DOS-style short mode.
14813  # If so, the updated path is stored in $new_path.
14814
14815  input_path="$new_path"
14816  # Check if we need to convert this using DOS-style short mode. If the path
14817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14818  # take no chances and rewrite it.
14819  # Note: m4 eats our [], so we need to use [ and ] instead.
14820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14821  if test "x$has_forbidden_chars" != x; then
14822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14823    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14824    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14825    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14826      # Going to short mode and back again did indeed matter. Since short mode is
14827      # case insensitive, let's make it lowercase to improve readability.
14828      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14829      # Now convert it back to Unix-stile (cygpath)
14830      input_path=`$CYGPATH -u "$shortmode_path"`
14831      new_path="$input_path"
14832    fi
14833  fi
14834
14835  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14836  if test "x$test_cygdrive_prefix" = x; then
14837    # As a simple fix, exclude /usr/bin since it's not a real path.
14838    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14839      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14840      # a path prefixed by /cygdrive for fixpath to work.
14841      new_path="$CYGWIN_ROOT_PATH$input_path"
14842    fi
14843  fi
14844
14845
14846  if test "x$path" != "x$new_path"; then
14847    with_devkit="$new_path"
14848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14849$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14850  fi
14851
14852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14853
14854  path="$with_devkit"
14855  has_colon=`$ECHO $path | $GREP ^.:`
14856  new_path="$path"
14857  if test "x$has_colon" = x; then
14858    # Not in mixed or Windows style, start by that.
14859    new_path=`cmd //c echo $path`
14860  fi
14861
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14872  fi
14873
14874
14875  windows_path="$new_path"
14876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14877    unix_path=`$CYGPATH -u "$windows_path"`
14878    new_path="$unix_path"
14879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14881    new_path="$unix_path"
14882  fi
14883
14884  if test "x$path" != "x$new_path"; then
14885    with_devkit="$new_path"
14886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14887$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14888  fi
14889
14890  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14891  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14892
14893  else
14894    # We're on a unix platform. Hooray! :)
14895    path="$with_devkit"
14896    has_space=`$ECHO "$path" | $GREP " "`
14897    if test "x$has_space" != x; then
14898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14899$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14900      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14901    fi
14902
14903    # Use eval to expand a potential ~
14904    eval path="$path"
14905    if test ! -f "$path" && test ! -d "$path"; then
14906      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14907    fi
14908
14909    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14910  fi
14911
14912        DEVKIT_ROOT="$with_devkit"
14913        # Check for a meta data info file in the root of the devkit
14914        if test -f "$DEVKIT_ROOT/devkit.info"; then
14915          # This potentially sets the following:
14916          # DEVKIT_NAME: A descriptive name of the devkit
14917          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14918          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14919          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14920          . $DEVKIT_ROOT/devkit.info
14921        fi
14922
14923        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14924$as_echo_n "checking for devkit... " >&6; }
14925        if test "x$DEVKIT_NAME" != x; then
14926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14927$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14928        else
14929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14930$as_echo "$DEVKIT_ROOT" >&6; }
14931        fi
14932
14933        if test "x$DEVKIT_EXTRA_PATH" != x; then
14934
14935  if test "x$DEVKIT_EXTRA_PATH" != x; then
14936    if test "x$EXTRA_PATH" = x; then
14937      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14938    else
14939      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14940    fi
14941  fi
14942
14943        fi
14944
14945        # Fallback default of just /bin if DEVKIT_PATH is not defined
14946        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14947          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14948        fi
14949
14950  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14951    if test "x$TOOLCHAIN_PATH" = x; then
14952      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14953    else
14954      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14955    fi
14956  fi
14957
14958
14959        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14960        # places for backwards compatiblity.
14961        if test "x$DEVKIT_SYSROOT" != x; then
14962          SYSROOT="$DEVKIT_SYSROOT"
14963        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14964          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14965        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14966          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14967        fi
14968
14969
14970fi
14971
14972
14973  # You can force the sysroot if the sysroot encoded into the compiler tools
14974  # is not correct.
14975
14976# Check whether --with-sys-root was given.
14977if test "${with_sys_root+set}" = set; then :
14978  withval=$with_sys_root; SYSROOT=$with_sys_root
14979
14980fi
14981
14982
14983
14984# Check whether --with-sysroot was given.
14985if test "${with_sysroot+set}" = set; then :
14986  withval=$with_sysroot; SYSROOT=$with_sysroot
14987
14988fi
14989
14990
14991
14992# Check whether --with-tools-dir was given.
14993if test "${with_tools_dir+set}" = set; then :
14994  withval=$with_tools_dir;
14995  if test "x$with_tools_dir" != x; then
14996    if test "x$TOOLCHAIN_PATH" = x; then
14997      TOOLCHAIN_PATH="$with_tools_dir"
14998    else
14999      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15000    fi
15001  fi
15002
15003
15004fi
15005
15006
15007
15008# Check whether --with-toolchain-path was given.
15009if test "${with_toolchain_path+set}" = set; then :
15010  withval=$with_toolchain_path;
15011  if test "x$with_toolchain_path" != x; then
15012    if test "x$TOOLCHAIN_PATH" = x; then
15013      TOOLCHAIN_PATH="$with_toolchain_path"
15014    else
15015      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15016    fi
15017  fi
15018
15019
15020fi
15021
15022
15023
15024# Check whether --with-extra-path was given.
15025if test "${with_extra_path+set}" = set; then :
15026  withval=$with_extra_path;
15027  if test "x$with_extra_path" != x; then
15028    if test "x$EXTRA_PATH" = x; then
15029      EXTRA_PATH="$with_extra_path"
15030    else
15031      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15032    fi
15033  fi
15034
15035
15036fi
15037
15038
15039  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15040    # detect if Xcode is installed by running xcodebuild -version
15041    # if no Xcode installed, xcodebuild exits with 1
15042    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15043    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15044      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15045      # fall back on the stub binary in /usr/bin/xcodebuild
15046      # Extract the first word of "xcodebuild", so it can be a program name with args.
15047set dummy xcodebuild; ac_word=$2
15048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15049$as_echo_n "checking for $ac_word... " >&6; }
15050if ${ac_cv_path_XCODEBUILD+:} false; then :
15051  $as_echo_n "(cached) " >&6
15052else
15053  case $XCODEBUILD in
15054  [\\/]* | ?:[\\/]*)
15055  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15056  ;;
15057  *)
15058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15059for as_dir in $TOOLCHAIN_PATH
15060do
15061  IFS=$as_save_IFS
15062  test -z "$as_dir" && as_dir=.
15063    for ac_exec_ext in '' $ac_executable_extensions; do
15064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15065    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15067    break 2
15068  fi
15069done
15070  done
15071IFS=$as_save_IFS
15072
15073  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15074  ;;
15075esac
15076fi
15077XCODEBUILD=$ac_cv_path_XCODEBUILD
15078if test -n "$XCODEBUILD"; then
15079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15080$as_echo "$XCODEBUILD" >&6; }
15081else
15082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15083$as_echo "no" >&6; }
15084fi
15085
15086
15087    else
15088      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15089      # when only the command line tools are installed there are no SDKs, so headers
15090      # are copied into the system frameworks
15091      XCODEBUILD=
15092
15093    fi
15094
15095    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15096$as_echo_n "checking for sdk name... " >&6; }
15097
15098# Check whether --with-sdk-name was given.
15099if test "${with_sdk_name+set}" = set; then :
15100  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15101
15102fi
15103
15104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15105$as_echo "$SDKNAME" >&6; }
15106
15107    # if toolchain path is specified then don't rely on system headers, they may not compile
15108    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15109    test -z "$TOOLCHAIN_PATH" && \
15110      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15111
15112    if test -z "$SYSROOT"; then
15113      if test -n "$XCODEBUILD"; then
15114        # if we don't have system headers, use default SDK name (last resort)
15115        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15116          SDKNAME=${SDKNAME:-macosx}
15117        fi
15118
15119        if test -n "$SDKNAME"; then
15120          # Call xcodebuild to determine SYSROOT
15121          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15122        fi
15123      else
15124        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15125          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15126        fi
15127      fi
15128    else
15129      # warn user if --with-sdk-name was also set
15130      if test -n "$with_sdk_name"; then
15131        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15132$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15133      fi
15134    fi
15135
15136    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15137      # If no system framework headers, then SYSROOT must be set, or we won't build
15138      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15139    fi
15140
15141    # Perform a basic sanity test
15142    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15143      if test -z "$SYSROOT"; then
15144        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15145      else
15146        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15147      fi
15148    fi
15149
15150    # set SDKROOT too, Xcode tools will pick it up
15151    SDKROOT=$SYSROOT
15152
15153  fi
15154
15155  # Prepend the extra path to the global path
15156
15157  if test "x$EXTRA_PATH" != x; then
15158    if test "x$PATH" = x; then
15159      PATH="$EXTRA_PATH"
15160    else
15161      PATH="$EXTRA_PATH:$PATH"
15162    fi
15163  fi
15164
15165
15166  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15167    # Add extra search paths on solaris for utilities like ar and as etc...
15168    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15169  fi
15170
15171  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15172$as_echo_n "checking for sysroot... " >&6; }
15173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15174$as_echo "$SYSROOT" >&6; }
15175  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15176$as_echo_n "checking for toolchain path... " >&6; }
15177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15178$as_echo "$TOOLCHAIN_PATH" >&6; }
15179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15180$as_echo_n "checking for extra path... " >&6; }
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15182$as_echo "$EXTRA_PATH" >&6; }
15183
15184
15185# To properly create a configuration name, we need to have the OpenJDK target
15186# and options (variants and debug level) parsed.
15187
15188
15189
15190# Check whether --with-conf-name was given.
15191if test "${with_conf_name+set}" = set; then :
15192  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15193fi
15194
15195
15196  # Test from where we are running configure, in or outside of src root.
15197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15198$as_echo_n "checking where to store configuration... " >&6; }
15199  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15200      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15201      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15202    # We are running configure from the src root.
15203    # Create a default ./build/target-variant-debuglevel output root.
15204    if test "x${CONF_NAME}" = x; then
15205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15206$as_echo "in default location" >&6; }
15207      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15208    else
15209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15210$as_echo "in build directory with custom name" >&6; }
15211    fi
15212    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15213    $MKDIR -p "$OUTPUT_ROOT"
15214    if test ! -d "$OUTPUT_ROOT"; then
15215      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15216    fi
15217  else
15218    # We are running configure from outside of the src dir.
15219    # Then use the current directory as output dir!
15220    # If configuration is situated in normal build directory, just use the build
15221    # directory name as configuration name, otherwise use the complete path.
15222    if test "x${CONF_NAME}" = x; then
15223      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15224    fi
15225    OUTPUT_ROOT="$CURDIR"
15226    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15227$as_echo "in current directory" >&6; }
15228
15229    # WARNING: This might be a bad thing to do. You need to be sure you want to
15230    # have a configuration in this directory. Do some sanity checks!
15231
15232    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15233      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15234      # other files
15235      files_present=`$LS $OUTPUT_ROOT`
15236      # Configure has already touched config.log and confdefs.h in the current dir when this check
15237      # is performed.
15238      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15239      | $TR -d '\n'`
15240      if test "x$filtered_files" != x; then
15241        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15242$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15243        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15244$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15245        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15246$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15247        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15248$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15250$as_echo "$as_me: seriously mess up just about everything." >&6;}
15251        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15252$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15253        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15254$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15255        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15256      fi
15257    fi
15258  fi
15259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15260$as_echo_n "checking what configuration name to use... " >&6; }
15261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15262$as_echo "$CONF_NAME" >&6; }
15263
15264
15265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15266
15267  # Input might be given as Windows format, start by converting to
15268  # unix format.
15269  path="$OUTPUT_ROOT"
15270  new_path=`$CYGPATH -u "$path"`
15271
15272  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15273  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15274  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15275  # "foo.exe" is OK but "foo" is an error.
15276  #
15277  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15278  # It is also a way to make sure we got the proper file name for the real test later on.
15279  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15280  if test "x$test_shortpath" = x; then
15281    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15282$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15283    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15284  fi
15285
15286  # Call helper function which possibly converts this using DOS-style short mode.
15287  # If so, the updated path is stored in $new_path.
15288
15289  input_path="$new_path"
15290  # Check if we need to convert this using DOS-style short mode. If the path
15291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15292  # take no chances and rewrite it.
15293  # Note: m4 eats our [], so we need to use [ and ] instead.
15294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15295  if test "x$has_forbidden_chars" != x; then
15296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15300      # Going to short mode and back again did indeed matter. Since short mode is
15301      # case insensitive, let's make it lowercase to improve readability.
15302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15303      # Now convert it back to Unix-stile (cygpath)
15304      input_path=`$CYGPATH -u "$shortmode_path"`
15305      new_path="$input_path"
15306    fi
15307  fi
15308
15309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15310  if test "x$test_cygdrive_prefix" = x; then
15311    # As a simple fix, exclude /usr/bin since it's not a real path.
15312    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15314      # a path prefixed by /cygdrive for fixpath to work.
15315      new_path="$CYGWIN_ROOT_PATH$input_path"
15316    fi
15317  fi
15318
15319
15320  if test "x$path" != "x$new_path"; then
15321    OUTPUT_ROOT="$new_path"
15322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15323$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15324  fi
15325
15326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15327
15328  path="$OUTPUT_ROOT"
15329  has_colon=`$ECHO $path | $GREP ^.:`
15330  new_path="$path"
15331  if test "x$has_colon" = x; then
15332    # Not in mixed or Windows style, start by that.
15333    new_path=`cmd //c echo $path`
15334  fi
15335
15336
15337  input_path="$new_path"
15338  # Check if we need to convert this using DOS-style short mode. If the path
15339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15340  # take no chances and rewrite it.
15341  # Note: m4 eats our [], so we need to use [ and ] instead.
15342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15343  if test "x$has_forbidden_chars" != x; then
15344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15345    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15346  fi
15347
15348
15349  windows_path="$new_path"
15350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15351    unix_path=`$CYGPATH -u "$windows_path"`
15352    new_path="$unix_path"
15353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15355    new_path="$unix_path"
15356  fi
15357
15358  if test "x$path" != "x$new_path"; then
15359    OUTPUT_ROOT="$new_path"
15360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15361$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15362  fi
15363
15364  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15365  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15366
15367  else
15368    # We're on a unix platform. Hooray! :)
15369    path="$OUTPUT_ROOT"
15370    has_space=`$ECHO "$path" | $GREP " "`
15371    if test "x$has_space" != x; then
15372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15373$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15374      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15375    fi
15376
15377    # Use eval to expand a potential ~
15378    eval path="$path"
15379    if test ! -f "$path" && test ! -d "$path"; then
15380      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15381    fi
15382
15383    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15384  fi
15385
15386
15387  SPEC=$OUTPUT_ROOT/spec.gmk
15388
15389  CONF_NAME=$CONF_NAME
15390
15391  OUTPUT_ROOT=$OUTPUT_ROOT
15392
15393
15394  # The spec.gmk file contains all variables for the make system.
15395  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15396
15397  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15398  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15399
15400  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15401  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15402
15403  # The compare.sh is used to compare the build output to other builds.
15404  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15405
15406  # The generated Makefile knows where the spec.gmk is and where the source is.
15407  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15408  # which will look for generated configurations
15409  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15410
15411
15412
15413# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15414
15415  for ac_prog in apt-get yum port pkgutil pkgadd
15416do
15417  # Extract the first word of "$ac_prog", so it can be a program name with args.
15418set dummy $ac_prog; ac_word=$2
15419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15420$as_echo_n "checking for $ac_word... " >&6; }
15421if ${ac_cv_prog_PKGHANDLER+:} false; then :
15422  $as_echo_n "(cached) " >&6
15423else
15424  if test -n "$PKGHANDLER"; then
15425  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15426else
15427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15428for as_dir in $PATH
15429do
15430  IFS=$as_save_IFS
15431  test -z "$as_dir" && as_dir=.
15432    for ac_exec_ext in '' $ac_executable_extensions; do
15433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15434    ac_cv_prog_PKGHANDLER="$ac_prog"
15435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15436    break 2
15437  fi
15438done
15439  done
15440IFS=$as_save_IFS
15441
15442fi
15443fi
15444PKGHANDLER=$ac_cv_prog_PKGHANDLER
15445if test -n "$PKGHANDLER"; then
15446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15447$as_echo "$PKGHANDLER" >&6; }
15448else
15449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15450$as_echo "no" >&6; }
15451fi
15452
15453
15454  test -n "$PKGHANDLER" && break
15455done
15456
15457
15458
15459# Setup tools that requires more complex handling, or that is not needed by the configure script.
15460
15461
15462  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15463  if test "x$MAKE" != x; then
15464    # User has supplied a make, test it.
15465    if test ! -f "$MAKE"; then
15466      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15467    fi
15468
15469  MAKE_CANDIDATE=""$MAKE""
15470  DESCRIPTION="user supplied MAKE=$MAKE"
15471  if test "x$MAKE_CANDIDATE" != x; then
15472    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15473$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15474    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15475    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15476    if test "x$IS_GNU_MAKE" = x; then
15477      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15478$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15479    else
15480      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15481      if test "x$IS_MODERN_MAKE" = x; then
15482        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15483$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15484      else
15485        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15486          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15487            MAKE_EXPECTED_ENV='cygwin'
15488          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15489            MAKE_EXPECTED_ENV='msys'
15490          else
15491            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15492          fi
15493          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15494          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15495        else
15496          # Not relevant for non-Windows
15497          IS_MAKE_CORRECT_ENV=true
15498        fi
15499        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15500          { $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
15501$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;}
15502        else
15503          FOUND_MAKE=$MAKE_CANDIDATE
15504
15505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15506
15507  # First separate the path from the arguments. This will split at the first
15508  # space.
15509  complete="$FOUND_MAKE"
15510  path="${complete%% *}"
15511  tmp="$complete EOL"
15512  arguments="${tmp#* }"
15513
15514  # Input might be given as Windows format, start by converting to
15515  # unix format.
15516  new_path=`$CYGPATH -u "$path"`
15517
15518  # Now try to locate executable using which
15519  new_path=`$WHICH "$new_path" 2> /dev/null`
15520  # bat and cmd files are not always considered executable in cygwin causing which
15521  # to not find them
15522  if test "x$new_path" = x \
15523      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15524      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15525    new_path=`$CYGPATH -u "$path"`
15526  fi
15527  if test "x$new_path" = x; then
15528    # Oops. Which didn't find the executable.
15529    # The splitting of arguments from the executable at a space might have been incorrect,
15530    # since paths with space are more likely in Windows. Give it another try with the whole
15531    # argument.
15532    path="$complete"
15533    arguments="EOL"
15534    new_path=`$CYGPATH -u "$path"`
15535    new_path=`$WHICH "$new_path" 2> /dev/null`
15536    # bat and cmd files are not always considered executable in cygwin causing which
15537    # to not find them
15538    if test "x$new_path" = x \
15539        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15540        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15541      new_path=`$CYGPATH -u "$path"`
15542    fi
15543    if test "x$new_path" = x; then
15544      # It's still not found. Now this is an unrecoverable error.
15545      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15546$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15547      has_space=`$ECHO "$complete" | $GREP " "`
15548      if test "x$has_space" != x; then
15549        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15550$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15551      fi
15552      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15553    fi
15554  fi
15555
15556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15559  # "foo.exe" is OK but "foo" is an error.
15560  #
15561  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15562  # It is also a way to make sure we got the proper file name for the real test later on.
15563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15564  if test "x$test_shortpath" = x; then
15565    # Short path failed, file does not exist as specified.
15566    # Try adding .exe or .cmd
15567    if test -f "${new_path}.exe"; then
15568      input_to_shortpath="${new_path}.exe"
15569    elif test -f "${new_path}.cmd"; then
15570      input_to_shortpath="${new_path}.cmd"
15571    else
15572      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15573$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15574      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15575$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15576      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15577    fi
15578  else
15579    input_to_shortpath="$new_path"
15580  fi
15581
15582  # Call helper function which possibly converts this using DOS-style short mode.
15583  # If so, the updated path is stored in $new_path.
15584  new_path="$input_to_shortpath"
15585
15586  input_path="$input_to_shortpath"
15587  # Check if we need to convert this using DOS-style short mode. If the path
15588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15589  # take no chances and rewrite it.
15590  # Note: m4 eats our [], so we need to use [ and ] instead.
15591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15592  if test "x$has_forbidden_chars" != x; then
15593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15597      # Going to short mode and back again did indeed matter. Since short mode is
15598      # case insensitive, let's make it lowercase to improve readability.
15599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15600      # Now convert it back to Unix-stile (cygpath)
15601      input_path=`$CYGPATH -u "$shortmode_path"`
15602      new_path="$input_path"
15603    fi
15604  fi
15605
15606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15607  if test "x$test_cygdrive_prefix" = x; then
15608    # As a simple fix, exclude /usr/bin since it's not a real path.
15609    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15611      # a path prefixed by /cygdrive for fixpath to work.
15612      new_path="$CYGWIN_ROOT_PATH$input_path"
15613    fi
15614  fi
15615
15616  # remove trailing .exe if any
15617  new_path="${new_path/%.exe/}"
15618
15619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15620
15621  # First separate the path from the arguments. This will split at the first
15622  # space.
15623  complete="$FOUND_MAKE"
15624  path="${complete%% *}"
15625  tmp="$complete EOL"
15626  arguments="${tmp#* }"
15627
15628  # Input might be given as Windows format, start by converting to
15629  # unix format.
15630  new_path="$path"
15631
15632  windows_path="$new_path"
15633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15634    unix_path=`$CYGPATH -u "$windows_path"`
15635    new_path="$unix_path"
15636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15638    new_path="$unix_path"
15639  fi
15640
15641
15642  # Now try to locate executable using which
15643  new_path=`$WHICH "$new_path" 2> /dev/null`
15644
15645  if test "x$new_path" = x; then
15646    # Oops. Which didn't find the executable.
15647    # The splitting of arguments from the executable at a space might have been incorrect,
15648    # since paths with space are more likely in Windows. Give it another try with the whole
15649    # argument.
15650    path="$complete"
15651    arguments="EOL"
15652    new_path="$path"
15653
15654  windows_path="$new_path"
15655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15656    unix_path=`$CYGPATH -u "$windows_path"`
15657    new_path="$unix_path"
15658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15660    new_path="$unix_path"
15661  fi
15662
15663
15664    new_path=`$WHICH "$new_path" 2> /dev/null`
15665    # bat and cmd files are not always considered executable in MSYS causing which
15666    # to not find them
15667    if test "x$new_path" = x \
15668        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15669        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15670      new_path="$path"
15671
15672  windows_path="$new_path"
15673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15674    unix_path=`$CYGPATH -u "$windows_path"`
15675    new_path="$unix_path"
15676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15678    new_path="$unix_path"
15679  fi
15680
15681    fi
15682
15683    if test "x$new_path" = x; then
15684      # It's still not found. Now this is an unrecoverable error.
15685      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15686$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15687      has_space=`$ECHO "$complete" | $GREP " "`
15688      if test "x$has_space" != x; then
15689        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15690$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15691      fi
15692      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15693    fi
15694  fi
15695
15696  # Now new_path has a complete unix path to the binary
15697  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15698    # Keep paths in /bin as-is, but remove trailing .exe if any
15699    new_path="${new_path/%.exe/}"
15700    # Do not save /bin paths to all_fixpath_prefixes!
15701  else
15702    # Not in mixed or Windows style, start by that.
15703    new_path=`cmd //c echo $new_path`
15704
15705  input_path="$new_path"
15706  # Check if we need to convert this using DOS-style short mode. If the path
15707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15708  # take no chances and rewrite it.
15709  # Note: m4 eats our [], so we need to use [ and ] instead.
15710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15711  if test "x$has_forbidden_chars" != x; then
15712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15714  fi
15715
15716    # Output is in $new_path
15717
15718  windows_path="$new_path"
15719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15720    unix_path=`$CYGPATH -u "$windows_path"`
15721    new_path="$unix_path"
15722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15724    new_path="$unix_path"
15725  fi
15726
15727    # remove trailing .exe if any
15728    new_path="${new_path/%.exe/}"
15729
15730    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15731    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15732  fi
15733
15734  else
15735    # We're on a unix platform. Hooray! :)
15736    # First separate the path from the arguments. This will split at the first
15737    # space.
15738    complete="$FOUND_MAKE"
15739    path="${complete%% *}"
15740    tmp="$complete EOL"
15741    arguments="${tmp#* }"
15742
15743    # Cannot rely on the command "which" here since it doesn't always work.
15744    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15745    if test -z "$is_absolute_path"; then
15746      # Path to executable is not absolute. Find it.
15747      IFS_save="$IFS"
15748      IFS=:
15749      for p in $PATH; do
15750        if test -f "$p/$path" && test -x "$p/$path"; then
15751          new_path="$p/$path"
15752          break
15753        fi
15754      done
15755      IFS="$IFS_save"
15756    else
15757      # This is an absolute path, we can use it without further modifications.
15758      new_path="$path"
15759    fi
15760
15761    if test "x$new_path" = x; then
15762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15763$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15764      has_space=`$ECHO "$complete" | $GREP " "`
15765      if test "x$has_space" != x; then
15766        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15767$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15768      fi
15769      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15770    fi
15771  fi
15772
15773  # Now join together the path and the arguments once again
15774  if test "x$arguments" != xEOL; then
15775    new_complete="$new_path ${arguments% *}"
15776  else
15777    new_complete="$new_path"
15778  fi
15779
15780  if test "x$complete" != "x$new_complete"; then
15781    FOUND_MAKE="$new_complete"
15782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15783$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15784  fi
15785
15786        fi
15787      fi
15788    fi
15789  fi
15790
15791    if test "x$FOUND_MAKE" = x; then
15792      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15793    fi
15794  else
15795    # Try our hardest to locate a correct version of GNU make
15796    for ac_prog in gmake
15797do
15798  # Extract the first word of "$ac_prog", so it can be a program name with args.
15799set dummy $ac_prog; ac_word=$2
15800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15801$as_echo_n "checking for $ac_word... " >&6; }
15802if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15803  $as_echo_n "(cached) " >&6
15804else
15805  case $CHECK_GMAKE in
15806  [\\/]* | ?:[\\/]*)
15807  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15808  ;;
15809  *)
15810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15811for as_dir in $PATH
15812do
15813  IFS=$as_save_IFS
15814  test -z "$as_dir" && as_dir=.
15815    for ac_exec_ext in '' $ac_executable_extensions; do
15816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15817    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15819    break 2
15820  fi
15821done
15822  done
15823IFS=$as_save_IFS
15824
15825  ;;
15826esac
15827fi
15828CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15829if test -n "$CHECK_GMAKE"; then
15830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15831$as_echo "$CHECK_GMAKE" >&6; }
15832else
15833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15834$as_echo "no" >&6; }
15835fi
15836
15837
15838  test -n "$CHECK_GMAKE" && break
15839done
15840
15841
15842  MAKE_CANDIDATE=""$CHECK_GMAKE""
15843  DESCRIPTION="gmake in PATH"
15844  if test "x$MAKE_CANDIDATE" != x; then
15845    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15846$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15847    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15848    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15849    if test "x$IS_GNU_MAKE" = x; then
15850      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15851$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15852    else
15853      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15854      if test "x$IS_MODERN_MAKE" = x; then
15855        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15856$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15857      else
15858        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15859          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15860            MAKE_EXPECTED_ENV='cygwin'
15861          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15862            MAKE_EXPECTED_ENV='msys'
15863          else
15864            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15865          fi
15866          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15867          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15868        else
15869          # Not relevant for non-Windows
15870          IS_MAKE_CORRECT_ENV=true
15871        fi
15872        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15873          { $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
15874$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;}
15875        else
15876          FOUND_MAKE=$MAKE_CANDIDATE
15877
15878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15879
15880  # First separate the path from the arguments. This will split at the first
15881  # space.
15882  complete="$FOUND_MAKE"
15883  path="${complete%% *}"
15884  tmp="$complete EOL"
15885  arguments="${tmp#* }"
15886
15887  # Input might be given as Windows format, start by converting to
15888  # unix format.
15889  new_path=`$CYGPATH -u "$path"`
15890
15891  # Now try to locate executable using which
15892  new_path=`$WHICH "$new_path" 2> /dev/null`
15893  # bat and cmd files are not always considered executable in cygwin causing which
15894  # to not find them
15895  if test "x$new_path" = x \
15896      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15897      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15898    new_path=`$CYGPATH -u "$path"`
15899  fi
15900  if test "x$new_path" = x; then
15901    # Oops. Which didn't find the executable.
15902    # The splitting of arguments from the executable at a space might have been incorrect,
15903    # since paths with space are more likely in Windows. Give it another try with the whole
15904    # argument.
15905    path="$complete"
15906    arguments="EOL"
15907    new_path=`$CYGPATH -u "$path"`
15908    new_path=`$WHICH "$new_path" 2> /dev/null`
15909    # bat and cmd files are not always considered executable in cygwin causing which
15910    # to not find them
15911    if test "x$new_path" = x \
15912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15914      new_path=`$CYGPATH -u "$path"`
15915    fi
15916    if test "x$new_path" = x; then
15917      # It's still not found. Now this is an unrecoverable error.
15918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15919$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15920      has_space=`$ECHO "$complete" | $GREP " "`
15921      if test "x$has_space" != x; then
15922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15924      fi
15925      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15926    fi
15927  fi
15928
15929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15932  # "foo.exe" is OK but "foo" is an error.
15933  #
15934  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15935  # It is also a way to make sure we got the proper file name for the real test later on.
15936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15937  if test "x$test_shortpath" = x; then
15938    # Short path failed, file does not exist as specified.
15939    # Try adding .exe or .cmd
15940    if test -f "${new_path}.exe"; then
15941      input_to_shortpath="${new_path}.exe"
15942    elif test -f "${new_path}.cmd"; then
15943      input_to_shortpath="${new_path}.cmd"
15944    else
15945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15946$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15947      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15948$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15949      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15950    fi
15951  else
15952    input_to_shortpath="$new_path"
15953  fi
15954
15955  # Call helper function which possibly converts this using DOS-style short mode.
15956  # If so, the updated path is stored in $new_path.
15957  new_path="$input_to_shortpath"
15958
15959  input_path="$input_to_shortpath"
15960  # Check if we need to convert this using DOS-style short mode. If the path
15961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15962  # take no chances and rewrite it.
15963  # Note: m4 eats our [], so we need to use [ and ] instead.
15964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15965  if test "x$has_forbidden_chars" != x; then
15966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15970      # Going to short mode and back again did indeed matter. Since short mode is
15971      # case insensitive, let's make it lowercase to improve readability.
15972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15973      # Now convert it back to Unix-stile (cygpath)
15974      input_path=`$CYGPATH -u "$shortmode_path"`
15975      new_path="$input_path"
15976    fi
15977  fi
15978
15979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15980  if test "x$test_cygdrive_prefix" = x; then
15981    # As a simple fix, exclude /usr/bin since it's not a real path.
15982    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15984      # a path prefixed by /cygdrive for fixpath to work.
15985      new_path="$CYGWIN_ROOT_PATH$input_path"
15986    fi
15987  fi
15988
15989  # remove trailing .exe if any
15990  new_path="${new_path/%.exe/}"
15991
15992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15993
15994  # First separate the path from the arguments. This will split at the first
15995  # space.
15996  complete="$FOUND_MAKE"
15997  path="${complete%% *}"
15998  tmp="$complete EOL"
15999  arguments="${tmp#* }"
16000
16001  # Input might be given as Windows format, start by converting to
16002  # unix format.
16003  new_path="$path"
16004
16005  windows_path="$new_path"
16006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16007    unix_path=`$CYGPATH -u "$windows_path"`
16008    new_path="$unix_path"
16009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16011    new_path="$unix_path"
16012  fi
16013
16014
16015  # Now try to locate executable using which
16016  new_path=`$WHICH "$new_path" 2> /dev/null`
16017
16018  if test "x$new_path" = x; then
16019    # Oops. Which didn't find the executable.
16020    # The splitting of arguments from the executable at a space might have been incorrect,
16021    # since paths with space are more likely in Windows. Give it another try with the whole
16022    # argument.
16023    path="$complete"
16024    arguments="EOL"
16025    new_path="$path"
16026
16027  windows_path="$new_path"
16028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16029    unix_path=`$CYGPATH -u "$windows_path"`
16030    new_path="$unix_path"
16031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16033    new_path="$unix_path"
16034  fi
16035
16036
16037    new_path=`$WHICH "$new_path" 2> /dev/null`
16038    # bat and cmd files are not always considered executable in MSYS causing which
16039    # to not find them
16040    if test "x$new_path" = x \
16041        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16042        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16043      new_path="$path"
16044
16045  windows_path="$new_path"
16046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16047    unix_path=`$CYGPATH -u "$windows_path"`
16048    new_path="$unix_path"
16049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16051    new_path="$unix_path"
16052  fi
16053
16054    fi
16055
16056    if test "x$new_path" = x; then
16057      # It's still not found. Now this is an unrecoverable error.
16058      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16060      has_space=`$ECHO "$complete" | $GREP " "`
16061      if test "x$has_space" != x; then
16062        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16063$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16064      fi
16065      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16066    fi
16067  fi
16068
16069  # Now new_path has a complete unix path to the binary
16070  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16071    # Keep paths in /bin as-is, but remove trailing .exe if any
16072    new_path="${new_path/%.exe/}"
16073    # Do not save /bin paths to all_fixpath_prefixes!
16074  else
16075    # Not in mixed or Windows style, start by that.
16076    new_path=`cmd //c echo $new_path`
16077
16078  input_path="$new_path"
16079  # Check if we need to convert this using DOS-style short mode. If the path
16080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16081  # take no chances and rewrite it.
16082  # Note: m4 eats our [], so we need to use [ and ] instead.
16083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16084  if test "x$has_forbidden_chars" != x; then
16085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16086    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16087  fi
16088
16089    # Output is in $new_path
16090
16091  windows_path="$new_path"
16092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16093    unix_path=`$CYGPATH -u "$windows_path"`
16094    new_path="$unix_path"
16095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16097    new_path="$unix_path"
16098  fi
16099
16100    # remove trailing .exe if any
16101    new_path="${new_path/%.exe/}"
16102
16103    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16104    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16105  fi
16106
16107  else
16108    # We're on a unix platform. Hooray! :)
16109    # First separate the path from the arguments. This will split at the first
16110    # space.
16111    complete="$FOUND_MAKE"
16112    path="${complete%% *}"
16113    tmp="$complete EOL"
16114    arguments="${tmp#* }"
16115
16116    # Cannot rely on the command "which" here since it doesn't always work.
16117    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16118    if test -z "$is_absolute_path"; then
16119      # Path to executable is not absolute. Find it.
16120      IFS_save="$IFS"
16121      IFS=:
16122      for p in $PATH; do
16123        if test -f "$p/$path" && test -x "$p/$path"; then
16124          new_path="$p/$path"
16125          break
16126        fi
16127      done
16128      IFS="$IFS_save"
16129    else
16130      # This is an absolute path, we can use it without further modifications.
16131      new_path="$path"
16132    fi
16133
16134    if test "x$new_path" = x; then
16135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16136$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16137      has_space=`$ECHO "$complete" | $GREP " "`
16138      if test "x$has_space" != x; then
16139        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16140$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16141      fi
16142      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16143    fi
16144  fi
16145
16146  # Now join together the path and the arguments once again
16147  if test "x$arguments" != xEOL; then
16148    new_complete="$new_path ${arguments% *}"
16149  else
16150    new_complete="$new_path"
16151  fi
16152
16153  if test "x$complete" != "x$new_complete"; then
16154    FOUND_MAKE="$new_complete"
16155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16156$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16157  fi
16158
16159        fi
16160      fi
16161    fi
16162  fi
16163
16164
16165    if test "x$FOUND_MAKE" = x; then
16166      for ac_prog in make
16167do
16168  # Extract the first word of "$ac_prog", so it can be a program name with args.
16169set dummy $ac_prog; ac_word=$2
16170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16171$as_echo_n "checking for $ac_word... " >&6; }
16172if ${ac_cv_path_CHECK_MAKE+:} false; then :
16173  $as_echo_n "(cached) " >&6
16174else
16175  case $CHECK_MAKE in
16176  [\\/]* | ?:[\\/]*)
16177  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16178  ;;
16179  *)
16180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16181for as_dir in $PATH
16182do
16183  IFS=$as_save_IFS
16184  test -z "$as_dir" && as_dir=.
16185    for ac_exec_ext in '' $ac_executable_extensions; do
16186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16187    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16189    break 2
16190  fi
16191done
16192  done
16193IFS=$as_save_IFS
16194
16195  ;;
16196esac
16197fi
16198CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16199if test -n "$CHECK_MAKE"; then
16200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16201$as_echo "$CHECK_MAKE" >&6; }
16202else
16203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16204$as_echo "no" >&6; }
16205fi
16206
16207
16208  test -n "$CHECK_MAKE" && break
16209done
16210
16211
16212  MAKE_CANDIDATE=""$CHECK_MAKE""
16213  DESCRIPTION="make in PATH"
16214  if test "x$MAKE_CANDIDATE" != x; then
16215    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16216$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16217    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16218    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16219    if test "x$IS_GNU_MAKE" = x; then
16220      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16221$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16222    else
16223      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16224      if test "x$IS_MODERN_MAKE" = x; then
16225        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16226$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16227      else
16228        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16229          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16230            MAKE_EXPECTED_ENV='cygwin'
16231          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16232            MAKE_EXPECTED_ENV='msys'
16233          else
16234            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16235          fi
16236          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16237          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16238        else
16239          # Not relevant for non-Windows
16240          IS_MAKE_CORRECT_ENV=true
16241        fi
16242        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16243          { $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
16244$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;}
16245        else
16246          FOUND_MAKE=$MAKE_CANDIDATE
16247
16248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16249
16250  # First separate the path from the arguments. This will split at the first
16251  # space.
16252  complete="$FOUND_MAKE"
16253  path="${complete%% *}"
16254  tmp="$complete EOL"
16255  arguments="${tmp#* }"
16256
16257  # Input might be given as Windows format, start by converting to
16258  # unix format.
16259  new_path=`$CYGPATH -u "$path"`
16260
16261  # Now try to locate executable using which
16262  new_path=`$WHICH "$new_path" 2> /dev/null`
16263  # bat and cmd files are not always considered executable in cygwin causing which
16264  # to not find them
16265  if test "x$new_path" = x \
16266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16268    new_path=`$CYGPATH -u "$path"`
16269  fi
16270  if test "x$new_path" = x; then
16271    # Oops. Which didn't find the executable.
16272    # The splitting of arguments from the executable at a space might have been incorrect,
16273    # since paths with space are more likely in Windows. Give it another try with the whole
16274    # argument.
16275    path="$complete"
16276    arguments="EOL"
16277    new_path=`$CYGPATH -u "$path"`
16278    new_path=`$WHICH "$new_path" 2> /dev/null`
16279    # bat and cmd files are not always considered executable in cygwin causing which
16280    # to not find them
16281    if test "x$new_path" = x \
16282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16284      new_path=`$CYGPATH -u "$path"`
16285    fi
16286    if test "x$new_path" = x; then
16287      # It's still not found. Now this is an unrecoverable error.
16288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16289$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16290      has_space=`$ECHO "$complete" | $GREP " "`
16291      if test "x$has_space" != x; then
16292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16294      fi
16295      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16296    fi
16297  fi
16298
16299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16302  # "foo.exe" is OK but "foo" is an error.
16303  #
16304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16305  # It is also a way to make sure we got the proper file name for the real test later on.
16306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16307  if test "x$test_shortpath" = x; then
16308    # Short path failed, file does not exist as specified.
16309    # Try adding .exe or .cmd
16310    if test -f "${new_path}.exe"; then
16311      input_to_shortpath="${new_path}.exe"
16312    elif test -f "${new_path}.cmd"; then
16313      input_to_shortpath="${new_path}.cmd"
16314    else
16315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16319      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16320    fi
16321  else
16322    input_to_shortpath="$new_path"
16323  fi
16324
16325  # Call helper function which possibly converts this using DOS-style short mode.
16326  # If so, the updated path is stored in $new_path.
16327  new_path="$input_to_shortpath"
16328
16329  input_path="$input_to_shortpath"
16330  # Check if we need to convert this using DOS-style short mode. If the path
16331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16332  # take no chances and rewrite it.
16333  # Note: m4 eats our [], so we need to use [ and ] instead.
16334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16335  if test "x$has_forbidden_chars" != x; then
16336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16340      # Going to short mode and back again did indeed matter. Since short mode is
16341      # case insensitive, let's make it lowercase to improve readability.
16342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16343      # Now convert it back to Unix-stile (cygpath)
16344      input_path=`$CYGPATH -u "$shortmode_path"`
16345      new_path="$input_path"
16346    fi
16347  fi
16348
16349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16350  if test "x$test_cygdrive_prefix" = x; then
16351    # As a simple fix, exclude /usr/bin since it's not a real path.
16352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16354      # a path prefixed by /cygdrive for fixpath to work.
16355      new_path="$CYGWIN_ROOT_PATH$input_path"
16356    fi
16357  fi
16358
16359  # remove trailing .exe if any
16360  new_path="${new_path/%.exe/}"
16361
16362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16363
16364  # First separate the path from the arguments. This will split at the first
16365  # space.
16366  complete="$FOUND_MAKE"
16367  path="${complete%% *}"
16368  tmp="$complete EOL"
16369  arguments="${tmp#* }"
16370
16371  # Input might be given as Windows format, start by converting to
16372  # unix format.
16373  new_path="$path"
16374
16375  windows_path="$new_path"
16376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16377    unix_path=`$CYGPATH -u "$windows_path"`
16378    new_path="$unix_path"
16379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16381    new_path="$unix_path"
16382  fi
16383
16384
16385  # Now try to locate executable using which
16386  new_path=`$WHICH "$new_path" 2> /dev/null`
16387
16388  if test "x$new_path" = x; then
16389    # Oops. Which didn't find the executable.
16390    # The splitting of arguments from the executable at a space might have been incorrect,
16391    # since paths with space are more likely in Windows. Give it another try with the whole
16392    # argument.
16393    path="$complete"
16394    arguments="EOL"
16395    new_path="$path"
16396
16397  windows_path="$new_path"
16398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16399    unix_path=`$CYGPATH -u "$windows_path"`
16400    new_path="$unix_path"
16401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16403    new_path="$unix_path"
16404  fi
16405
16406
16407    new_path=`$WHICH "$new_path" 2> /dev/null`
16408    # bat and cmd files are not always considered executable in MSYS causing which
16409    # to not find them
16410    if test "x$new_path" = x \
16411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16413      new_path="$path"
16414
16415  windows_path="$new_path"
16416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16417    unix_path=`$CYGPATH -u "$windows_path"`
16418    new_path="$unix_path"
16419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16421    new_path="$unix_path"
16422  fi
16423
16424    fi
16425
16426    if test "x$new_path" = x; then
16427      # It's still not found. Now this is an unrecoverable error.
16428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16429$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16430      has_space=`$ECHO "$complete" | $GREP " "`
16431      if test "x$has_space" != x; then
16432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16434      fi
16435      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16436    fi
16437  fi
16438
16439  # Now new_path has a complete unix path to the binary
16440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16441    # Keep paths in /bin as-is, but remove trailing .exe if any
16442    new_path="${new_path/%.exe/}"
16443    # Do not save /bin paths to all_fixpath_prefixes!
16444  else
16445    # Not in mixed or Windows style, start by that.
16446    new_path=`cmd //c echo $new_path`
16447
16448  input_path="$new_path"
16449  # Check if we need to convert this using DOS-style short mode. If the path
16450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16451  # take no chances and rewrite it.
16452  # Note: m4 eats our [], so we need to use [ and ] instead.
16453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16454  if test "x$has_forbidden_chars" != x; then
16455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16457  fi
16458
16459    # Output is in $new_path
16460
16461  windows_path="$new_path"
16462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16463    unix_path=`$CYGPATH -u "$windows_path"`
16464    new_path="$unix_path"
16465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16467    new_path="$unix_path"
16468  fi
16469
16470    # remove trailing .exe if any
16471    new_path="${new_path/%.exe/}"
16472
16473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16475  fi
16476
16477  else
16478    # We're on a unix platform. Hooray! :)
16479    # First separate the path from the arguments. This will split at the first
16480    # space.
16481    complete="$FOUND_MAKE"
16482    path="${complete%% *}"
16483    tmp="$complete EOL"
16484    arguments="${tmp#* }"
16485
16486    # Cannot rely on the command "which" here since it doesn't always work.
16487    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16488    if test -z "$is_absolute_path"; then
16489      # Path to executable is not absolute. Find it.
16490      IFS_save="$IFS"
16491      IFS=:
16492      for p in $PATH; do
16493        if test -f "$p/$path" && test -x "$p/$path"; then
16494          new_path="$p/$path"
16495          break
16496        fi
16497      done
16498      IFS="$IFS_save"
16499    else
16500      # This is an absolute path, we can use it without further modifications.
16501      new_path="$path"
16502    fi
16503
16504    if test "x$new_path" = x; then
16505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16506$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16507      has_space=`$ECHO "$complete" | $GREP " "`
16508      if test "x$has_space" != x; then
16509        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16511      fi
16512      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16513    fi
16514  fi
16515
16516  # Now join together the path and the arguments once again
16517  if test "x$arguments" != xEOL; then
16518    new_complete="$new_path ${arguments% *}"
16519  else
16520    new_complete="$new_path"
16521  fi
16522
16523  if test "x$complete" != "x$new_complete"; then
16524    FOUND_MAKE="$new_complete"
16525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16526$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16527  fi
16528
16529        fi
16530      fi
16531    fi
16532  fi
16533
16534    fi
16535
16536    if test "x$FOUND_MAKE" = x; then
16537      if test "x$TOOLCHAIN_PATH" != x; then
16538        # We have a toolchain path, check that as well before giving up.
16539        OLD_PATH=$PATH
16540        PATH=$TOOLCHAIN_PATH:$PATH
16541        for ac_prog in gmake
16542do
16543  # Extract the first word of "$ac_prog", so it can be a program name with args.
16544set dummy $ac_prog; ac_word=$2
16545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16546$as_echo_n "checking for $ac_word... " >&6; }
16547if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16548  $as_echo_n "(cached) " >&6
16549else
16550  case $CHECK_TOOLSDIR_GMAKE in
16551  [\\/]* | ?:[\\/]*)
16552  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16553  ;;
16554  *)
16555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16556for as_dir in $PATH
16557do
16558  IFS=$as_save_IFS
16559  test -z "$as_dir" && as_dir=.
16560    for ac_exec_ext in '' $ac_executable_extensions; do
16561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16562    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16564    break 2
16565  fi
16566done
16567  done
16568IFS=$as_save_IFS
16569
16570  ;;
16571esac
16572fi
16573CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16574if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16576$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16577else
16578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16579$as_echo "no" >&6; }
16580fi
16581
16582
16583  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16584done
16585
16586
16587  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16588  DESCRIPTION="gmake in tools-dir"
16589  if test "x$MAKE_CANDIDATE" != x; then
16590    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16591$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16592    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16593    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16594    if test "x$IS_GNU_MAKE" = x; then
16595      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16596$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16597    else
16598      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16599      if test "x$IS_MODERN_MAKE" = x; then
16600        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16601$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16602      else
16603        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16604          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16605            MAKE_EXPECTED_ENV='cygwin'
16606          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16607            MAKE_EXPECTED_ENV='msys'
16608          else
16609            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16610          fi
16611          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16612          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16613        else
16614          # Not relevant for non-Windows
16615          IS_MAKE_CORRECT_ENV=true
16616        fi
16617        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16618          { $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
16619$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;}
16620        else
16621          FOUND_MAKE=$MAKE_CANDIDATE
16622
16623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16624
16625  # First separate the path from the arguments. This will split at the first
16626  # space.
16627  complete="$FOUND_MAKE"
16628  path="${complete%% *}"
16629  tmp="$complete EOL"
16630  arguments="${tmp#* }"
16631
16632  # Input might be given as Windows format, start by converting to
16633  # unix format.
16634  new_path=`$CYGPATH -u "$path"`
16635
16636  # Now try to locate executable using which
16637  new_path=`$WHICH "$new_path" 2> /dev/null`
16638  # bat and cmd files are not always considered executable in cygwin causing which
16639  # to not find them
16640  if test "x$new_path" = x \
16641      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16642      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16643    new_path=`$CYGPATH -u "$path"`
16644  fi
16645  if test "x$new_path" = x; then
16646    # Oops. Which didn't find the executable.
16647    # The splitting of arguments from the executable at a space might have been incorrect,
16648    # since paths with space are more likely in Windows. Give it another try with the whole
16649    # argument.
16650    path="$complete"
16651    arguments="EOL"
16652    new_path=`$CYGPATH -u "$path"`
16653    new_path=`$WHICH "$new_path" 2> /dev/null`
16654    # bat and cmd files are not always considered executable in cygwin causing which
16655    # to not find them
16656    if test "x$new_path" = x \
16657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16659      new_path=`$CYGPATH -u "$path"`
16660    fi
16661    if test "x$new_path" = x; then
16662      # It's still not found. Now this is an unrecoverable error.
16663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16664$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16665      has_space=`$ECHO "$complete" | $GREP " "`
16666      if test "x$has_space" != x; then
16667        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16668$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16669      fi
16670      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16671    fi
16672  fi
16673
16674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16677  # "foo.exe" is OK but "foo" is an error.
16678  #
16679  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16680  # It is also a way to make sure we got the proper file name for the real test later on.
16681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16682  if test "x$test_shortpath" = x; then
16683    # Short path failed, file does not exist as specified.
16684    # Try adding .exe or .cmd
16685    if test -f "${new_path}.exe"; then
16686      input_to_shortpath="${new_path}.exe"
16687    elif test -f "${new_path}.cmd"; then
16688      input_to_shortpath="${new_path}.cmd"
16689    else
16690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16691$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16692      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16693$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16694      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16695    fi
16696  else
16697    input_to_shortpath="$new_path"
16698  fi
16699
16700  # Call helper function which possibly converts this using DOS-style short mode.
16701  # If so, the updated path is stored in $new_path.
16702  new_path="$input_to_shortpath"
16703
16704  input_path="$input_to_shortpath"
16705  # Check if we need to convert this using DOS-style short mode. If the path
16706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16707  # take no chances and rewrite it.
16708  # Note: m4 eats our [], so we need to use [ and ] instead.
16709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16710  if test "x$has_forbidden_chars" != x; then
16711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16715      # Going to short mode and back again did indeed matter. Since short mode is
16716      # case insensitive, let's make it lowercase to improve readability.
16717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16718      # Now convert it back to Unix-stile (cygpath)
16719      input_path=`$CYGPATH -u "$shortmode_path"`
16720      new_path="$input_path"
16721    fi
16722  fi
16723
16724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16725  if test "x$test_cygdrive_prefix" = x; then
16726    # As a simple fix, exclude /usr/bin since it's not a real path.
16727    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16729      # a path prefixed by /cygdrive for fixpath to work.
16730      new_path="$CYGWIN_ROOT_PATH$input_path"
16731    fi
16732  fi
16733
16734  # remove trailing .exe if any
16735  new_path="${new_path/%.exe/}"
16736
16737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16738
16739  # First separate the path from the arguments. This will split at the first
16740  # space.
16741  complete="$FOUND_MAKE"
16742  path="${complete%% *}"
16743  tmp="$complete EOL"
16744  arguments="${tmp#* }"
16745
16746  # Input might be given as Windows format, start by converting to
16747  # unix format.
16748  new_path="$path"
16749
16750  windows_path="$new_path"
16751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16752    unix_path=`$CYGPATH -u "$windows_path"`
16753    new_path="$unix_path"
16754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16756    new_path="$unix_path"
16757  fi
16758
16759
16760  # Now try to locate executable using which
16761  new_path=`$WHICH "$new_path" 2> /dev/null`
16762
16763  if test "x$new_path" = x; then
16764    # Oops. Which didn't find the executable.
16765    # The splitting of arguments from the executable at a space might have been incorrect,
16766    # since paths with space are more likely in Windows. Give it another try with the whole
16767    # argument.
16768    path="$complete"
16769    arguments="EOL"
16770    new_path="$path"
16771
16772  windows_path="$new_path"
16773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16774    unix_path=`$CYGPATH -u "$windows_path"`
16775    new_path="$unix_path"
16776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16778    new_path="$unix_path"
16779  fi
16780
16781
16782    new_path=`$WHICH "$new_path" 2> /dev/null`
16783    # bat and cmd files are not always considered executable in MSYS causing which
16784    # to not find them
16785    if test "x$new_path" = x \
16786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16788      new_path="$path"
16789
16790  windows_path="$new_path"
16791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16792    unix_path=`$CYGPATH -u "$windows_path"`
16793    new_path="$unix_path"
16794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16796    new_path="$unix_path"
16797  fi
16798
16799    fi
16800
16801    if test "x$new_path" = x; then
16802      # It's still not found. Now this is an unrecoverable error.
16803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16804$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16805      has_space=`$ECHO "$complete" | $GREP " "`
16806      if test "x$has_space" != x; then
16807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16809      fi
16810      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16811    fi
16812  fi
16813
16814  # Now new_path has a complete unix path to the binary
16815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16816    # Keep paths in /bin as-is, but remove trailing .exe if any
16817    new_path="${new_path/%.exe/}"
16818    # Do not save /bin paths to all_fixpath_prefixes!
16819  else
16820    # Not in mixed or Windows style, start by that.
16821    new_path=`cmd //c echo $new_path`
16822
16823  input_path="$new_path"
16824  # Check if we need to convert this using DOS-style short mode. If the path
16825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16826  # take no chances and rewrite it.
16827  # Note: m4 eats our [], so we need to use [ and ] instead.
16828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16829  if test "x$has_forbidden_chars" != x; then
16830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16832  fi
16833
16834    # Output is in $new_path
16835
16836  windows_path="$new_path"
16837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16838    unix_path=`$CYGPATH -u "$windows_path"`
16839    new_path="$unix_path"
16840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16842    new_path="$unix_path"
16843  fi
16844
16845    # remove trailing .exe if any
16846    new_path="${new_path/%.exe/}"
16847
16848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16850  fi
16851
16852  else
16853    # We're on a unix platform. Hooray! :)
16854    # First separate the path from the arguments. This will split at the first
16855    # space.
16856    complete="$FOUND_MAKE"
16857    path="${complete%% *}"
16858    tmp="$complete EOL"
16859    arguments="${tmp#* }"
16860
16861    # Cannot rely on the command "which" here since it doesn't always work.
16862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16863    if test -z "$is_absolute_path"; then
16864      # Path to executable is not absolute. Find it.
16865      IFS_save="$IFS"
16866      IFS=:
16867      for p in $PATH; do
16868        if test -f "$p/$path" && test -x "$p/$path"; then
16869          new_path="$p/$path"
16870          break
16871        fi
16872      done
16873      IFS="$IFS_save"
16874    else
16875      # This is an absolute path, we can use it without further modifications.
16876      new_path="$path"
16877    fi
16878
16879    if test "x$new_path" = x; then
16880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16881$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16882      has_space=`$ECHO "$complete" | $GREP " "`
16883      if test "x$has_space" != x; then
16884        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16886      fi
16887      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16888    fi
16889  fi
16890
16891  # Now join together the path and the arguments once again
16892  if test "x$arguments" != xEOL; then
16893    new_complete="$new_path ${arguments% *}"
16894  else
16895    new_complete="$new_path"
16896  fi
16897
16898  if test "x$complete" != "x$new_complete"; then
16899    FOUND_MAKE="$new_complete"
16900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16901$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16902  fi
16903
16904        fi
16905      fi
16906    fi
16907  fi
16908
16909        if test "x$FOUND_MAKE" = x; then
16910          for ac_prog in make
16911do
16912  # Extract the first word of "$ac_prog", so it can be a program name with args.
16913set dummy $ac_prog; ac_word=$2
16914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16915$as_echo_n "checking for $ac_word... " >&6; }
16916if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16917  $as_echo_n "(cached) " >&6
16918else
16919  case $CHECK_TOOLSDIR_MAKE in
16920  [\\/]* | ?:[\\/]*)
16921  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16922  ;;
16923  *)
16924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16925for as_dir in $PATH
16926do
16927  IFS=$as_save_IFS
16928  test -z "$as_dir" && as_dir=.
16929    for ac_exec_ext in '' $ac_executable_extensions; do
16930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16931    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16933    break 2
16934  fi
16935done
16936  done
16937IFS=$as_save_IFS
16938
16939  ;;
16940esac
16941fi
16942CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16943if test -n "$CHECK_TOOLSDIR_MAKE"; then
16944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16945$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16946else
16947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16948$as_echo "no" >&6; }
16949fi
16950
16951
16952  test -n "$CHECK_TOOLSDIR_MAKE" && break
16953done
16954
16955
16956  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16957  DESCRIPTION="make in tools-dir"
16958  if test "x$MAKE_CANDIDATE" != x; then
16959    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16960$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16961    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16962    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16963    if test "x$IS_GNU_MAKE" = x; then
16964      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16965$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16966    else
16967      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16968      if test "x$IS_MODERN_MAKE" = x; then
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16970$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16971      else
16972        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16973          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16974            MAKE_EXPECTED_ENV='cygwin'
16975          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16976            MAKE_EXPECTED_ENV='msys'
16977          else
16978            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16979          fi
16980          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16981          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16982        else
16983          # Not relevant for non-Windows
16984          IS_MAKE_CORRECT_ENV=true
16985        fi
16986        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16987          { $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
16988$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;}
16989        else
16990          FOUND_MAKE=$MAKE_CANDIDATE
16991
16992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16993
16994  # First separate the path from the arguments. This will split at the first
16995  # space.
16996  complete="$FOUND_MAKE"
16997  path="${complete%% *}"
16998  tmp="$complete EOL"
16999  arguments="${tmp#* }"
17000
17001  # Input might be given as Windows format, start by converting to
17002  # unix format.
17003  new_path=`$CYGPATH -u "$path"`
17004
17005  # Now try to locate executable using which
17006  new_path=`$WHICH "$new_path" 2> /dev/null`
17007  # bat and cmd files are not always considered executable in cygwin causing which
17008  # to not find them
17009  if test "x$new_path" = x \
17010      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17011      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17012    new_path=`$CYGPATH -u "$path"`
17013  fi
17014  if test "x$new_path" = x; then
17015    # Oops. Which didn't find the executable.
17016    # The splitting of arguments from the executable at a space might have been incorrect,
17017    # since paths with space are more likely in Windows. Give it another try with the whole
17018    # argument.
17019    path="$complete"
17020    arguments="EOL"
17021    new_path=`$CYGPATH -u "$path"`
17022    new_path=`$WHICH "$new_path" 2> /dev/null`
17023    # bat and cmd files are not always considered executable in cygwin causing which
17024    # to not find them
17025    if test "x$new_path" = x \
17026        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17027        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17028      new_path=`$CYGPATH -u "$path"`
17029    fi
17030    if test "x$new_path" = x; then
17031      # It's still not found. Now this is an unrecoverable error.
17032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17033$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17034      has_space=`$ECHO "$complete" | $GREP " "`
17035      if test "x$has_space" != x; then
17036        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17037$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17038      fi
17039      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17040    fi
17041  fi
17042
17043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17046  # "foo.exe" is OK but "foo" is an error.
17047  #
17048  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17049  # It is also a way to make sure we got the proper file name for the real test later on.
17050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17051  if test "x$test_shortpath" = x; then
17052    # Short path failed, file does not exist as specified.
17053    # Try adding .exe or .cmd
17054    if test -f "${new_path}.exe"; then
17055      input_to_shortpath="${new_path}.exe"
17056    elif test -f "${new_path}.cmd"; then
17057      input_to_shortpath="${new_path}.cmd"
17058    else
17059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17061      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17062$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17063      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17064    fi
17065  else
17066    input_to_shortpath="$new_path"
17067  fi
17068
17069  # Call helper function which possibly converts this using DOS-style short mode.
17070  # If so, the updated path is stored in $new_path.
17071  new_path="$input_to_shortpath"
17072
17073  input_path="$input_to_shortpath"
17074  # Check if we need to convert this using DOS-style short mode. If the path
17075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17076  # take no chances and rewrite it.
17077  # Note: m4 eats our [], so we need to use [ and ] instead.
17078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17079  if test "x$has_forbidden_chars" != x; then
17080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17081    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17082    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17083    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17084      # Going to short mode and back again did indeed matter. Since short mode is
17085      # case insensitive, let's make it lowercase to improve readability.
17086      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17087      # Now convert it back to Unix-stile (cygpath)
17088      input_path=`$CYGPATH -u "$shortmode_path"`
17089      new_path="$input_path"
17090    fi
17091  fi
17092
17093  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17094  if test "x$test_cygdrive_prefix" = x; then
17095    # As a simple fix, exclude /usr/bin since it's not a real path.
17096    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17097      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17098      # a path prefixed by /cygdrive for fixpath to work.
17099      new_path="$CYGWIN_ROOT_PATH$input_path"
17100    fi
17101  fi
17102
17103  # remove trailing .exe if any
17104  new_path="${new_path/%.exe/}"
17105
17106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17107
17108  # First separate the path from the arguments. This will split at the first
17109  # space.
17110  complete="$FOUND_MAKE"
17111  path="${complete%% *}"
17112  tmp="$complete EOL"
17113  arguments="${tmp#* }"
17114
17115  # Input might be given as Windows format, start by converting to
17116  # unix format.
17117  new_path="$path"
17118
17119  windows_path="$new_path"
17120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17121    unix_path=`$CYGPATH -u "$windows_path"`
17122    new_path="$unix_path"
17123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17125    new_path="$unix_path"
17126  fi
17127
17128
17129  # Now try to locate executable using which
17130  new_path=`$WHICH "$new_path" 2> /dev/null`
17131
17132  if test "x$new_path" = x; then
17133    # Oops. Which didn't find the executable.
17134    # The splitting of arguments from the executable at a space might have been incorrect,
17135    # since paths with space are more likely in Windows. Give it another try with the whole
17136    # argument.
17137    path="$complete"
17138    arguments="EOL"
17139    new_path="$path"
17140
17141  windows_path="$new_path"
17142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17143    unix_path=`$CYGPATH -u "$windows_path"`
17144    new_path="$unix_path"
17145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17147    new_path="$unix_path"
17148  fi
17149
17150
17151    new_path=`$WHICH "$new_path" 2> /dev/null`
17152    # bat and cmd files are not always considered executable in MSYS causing which
17153    # to not find them
17154    if test "x$new_path" = x \
17155        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17156        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17157      new_path="$path"
17158
17159  windows_path="$new_path"
17160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17161    unix_path=`$CYGPATH -u "$windows_path"`
17162    new_path="$unix_path"
17163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17165    new_path="$unix_path"
17166  fi
17167
17168    fi
17169
17170    if test "x$new_path" = x; then
17171      # It's still not found. Now this is an unrecoverable error.
17172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17173$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17174      has_space=`$ECHO "$complete" | $GREP " "`
17175      if test "x$has_space" != x; then
17176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17178      fi
17179      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17180    fi
17181  fi
17182
17183  # Now new_path has a complete unix path to the binary
17184  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17185    # Keep paths in /bin as-is, but remove trailing .exe if any
17186    new_path="${new_path/%.exe/}"
17187    # Do not save /bin paths to all_fixpath_prefixes!
17188  else
17189    # Not in mixed or Windows style, start by that.
17190    new_path=`cmd //c echo $new_path`
17191
17192  input_path="$new_path"
17193  # Check if we need to convert this using DOS-style short mode. If the path
17194  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17195  # take no chances and rewrite it.
17196  # Note: m4 eats our [], so we need to use [ and ] instead.
17197  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17198  if test "x$has_forbidden_chars" != x; then
17199    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17200    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17201  fi
17202
17203    # Output is in $new_path
17204
17205  windows_path="$new_path"
17206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17207    unix_path=`$CYGPATH -u "$windows_path"`
17208    new_path="$unix_path"
17209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17211    new_path="$unix_path"
17212  fi
17213
17214    # remove trailing .exe if any
17215    new_path="${new_path/%.exe/}"
17216
17217    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17218    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17219  fi
17220
17221  else
17222    # We're on a unix platform. Hooray! :)
17223    # First separate the path from the arguments. This will split at the first
17224    # space.
17225    complete="$FOUND_MAKE"
17226    path="${complete%% *}"
17227    tmp="$complete EOL"
17228    arguments="${tmp#* }"
17229
17230    # Cannot rely on the command "which" here since it doesn't always work.
17231    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17232    if test -z "$is_absolute_path"; then
17233      # Path to executable is not absolute. Find it.
17234      IFS_save="$IFS"
17235      IFS=:
17236      for p in $PATH; do
17237        if test -f "$p/$path" && test -x "$p/$path"; then
17238          new_path="$p/$path"
17239          break
17240        fi
17241      done
17242      IFS="$IFS_save"
17243    else
17244      # This is an absolute path, we can use it without further modifications.
17245      new_path="$path"
17246    fi
17247
17248    if test "x$new_path" = x; then
17249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17250$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17251      has_space=`$ECHO "$complete" | $GREP " "`
17252      if test "x$has_space" != x; then
17253        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17254$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17255      fi
17256      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17257    fi
17258  fi
17259
17260  # Now join together the path and the arguments once again
17261  if test "x$arguments" != xEOL; then
17262    new_complete="$new_path ${arguments% *}"
17263  else
17264    new_complete="$new_path"
17265  fi
17266
17267  if test "x$complete" != "x$new_complete"; then
17268    FOUND_MAKE="$new_complete"
17269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17270$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17271  fi
17272
17273        fi
17274      fi
17275    fi
17276  fi
17277
17278        fi
17279        PATH=$OLD_PATH
17280      fi
17281    fi
17282
17283    if test "x$FOUND_MAKE" = x; then
17284      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17285    fi
17286  fi
17287
17288  MAKE=$FOUND_MAKE
17289
17290  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17291$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17292
17293
17294  # Check if make supports the output sync option and if so, setup using it.
17295  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17296$as_echo_n "checking if make --output-sync is supported... " >&6; }
17297  if $MAKE --version -O > /dev/null 2>&1; then
17298    OUTPUT_SYNC_SUPPORTED=true
17299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17300$as_echo "yes" >&6; }
17301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17302$as_echo_n "checking for output-sync value... " >&6; }
17303
17304# Check whether --with-output-sync was given.
17305if test "${with_output_sync+set}" = set; then :
17306  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17307fi
17308
17309    if test "x$OUTPUT_SYNC" = "x"; then
17310      OUTPUT_SYNC=none
17311    fi
17312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17313$as_echo "$OUTPUT_SYNC" >&6; }
17314    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17315      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17316    fi
17317  else
17318    OUTPUT_SYNC_SUPPORTED=false
17319    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17320$as_echo "no" >&6; }
17321  fi
17322
17323
17324
17325
17326
17327
17328  # Test if find supports -delete
17329  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17330$as_echo_n "checking if find supports -delete... " >&6; }
17331  FIND_DELETE="-delete"
17332
17333  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17334
17335  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17336
17337  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17338  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17339    # No, it does not.
17340    rm $DELETEDIR/TestIfFindSupportsDelete
17341    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17342      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17343      FIND_DELETE="-print | xargs rm"
17344    else
17345      FIND_DELETE="-exec rm \{\} \+"
17346    fi
17347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348$as_echo "no" >&6; }
17349  else
17350    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17351$as_echo "yes" >&6; }
17352  fi
17353  rmdir $DELETEDIR
17354
17355
17356
17357  # These tools might not be installed by default,
17358  # need hint on how to install them.
17359
17360
17361
17362  # Publish this variable in the help.
17363
17364
17365  if test "x$UNZIP" = x; then
17366    # The variable is not set by user, try to locate tool using the code snippet
17367    for ac_prog in unzip
17368do
17369  # Extract the first word of "$ac_prog", so it can be a program name with args.
17370set dummy $ac_prog; ac_word=$2
17371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17372$as_echo_n "checking for $ac_word... " >&6; }
17373if ${ac_cv_path_UNZIP+:} false; then :
17374  $as_echo_n "(cached) " >&6
17375else
17376  case $UNZIP in
17377  [\\/]* | ?:[\\/]*)
17378  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17379  ;;
17380  *)
17381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17382for as_dir in $PATH
17383do
17384  IFS=$as_save_IFS
17385  test -z "$as_dir" && as_dir=.
17386    for ac_exec_ext in '' $ac_executable_extensions; do
17387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17388    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17390    break 2
17391  fi
17392done
17393  done
17394IFS=$as_save_IFS
17395
17396  ;;
17397esac
17398fi
17399UNZIP=$ac_cv_path_UNZIP
17400if test -n "$UNZIP"; then
17401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17402$as_echo "$UNZIP" >&6; }
17403else
17404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17405$as_echo "no" >&6; }
17406fi
17407
17408
17409  test -n "$UNZIP" && break
17410done
17411
17412  else
17413    # The variable is set, but is it from the command line or the environment?
17414
17415    # Try to remove the string !UNZIP! from our list.
17416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17418      # If it failed, the variable was not from the command line. Ignore it,
17419      # but warn the user (except for BASH, which is always set by the calling BASH).
17420      if test "xUNZIP" != xBASH; then
17421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17422$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17423      fi
17424      # Try to locate tool using the code snippet
17425      for ac_prog in unzip
17426do
17427  # Extract the first word of "$ac_prog", so it can be a program name with args.
17428set dummy $ac_prog; ac_word=$2
17429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17430$as_echo_n "checking for $ac_word... " >&6; }
17431if ${ac_cv_path_UNZIP+:} false; then :
17432  $as_echo_n "(cached) " >&6
17433else
17434  case $UNZIP in
17435  [\\/]* | ?:[\\/]*)
17436  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17437  ;;
17438  *)
17439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17440for as_dir in $PATH
17441do
17442  IFS=$as_save_IFS
17443  test -z "$as_dir" && as_dir=.
17444    for ac_exec_ext in '' $ac_executable_extensions; do
17445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17446    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17448    break 2
17449  fi
17450done
17451  done
17452IFS=$as_save_IFS
17453
17454  ;;
17455esac
17456fi
17457UNZIP=$ac_cv_path_UNZIP
17458if test -n "$UNZIP"; then
17459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17460$as_echo "$UNZIP" >&6; }
17461else
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17463$as_echo "no" >&6; }
17464fi
17465
17466
17467  test -n "$UNZIP" && break
17468done
17469
17470    else
17471      # If it succeeded, then it was overridden by the user. We will use it
17472      # for the tool.
17473
17474      # First remove it from the list of overridden variables, so we can test
17475      # for unknown variables in the end.
17476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17477
17478      # Check if the provided tool contains a complete path.
17479      tool_specified="$UNZIP"
17480      tool_basename="${tool_specified##*/}"
17481      if test "x$tool_basename" = "x$tool_specified"; then
17482        # A command without a complete path is provided, search $PATH.
17483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17484$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17485        # Extract the first word of "$tool_basename", so it can be a program name with args.
17486set dummy $tool_basename; ac_word=$2
17487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17488$as_echo_n "checking for $ac_word... " >&6; }
17489if ${ac_cv_path_UNZIP+:} false; then :
17490  $as_echo_n "(cached) " >&6
17491else
17492  case $UNZIP in
17493  [\\/]* | ?:[\\/]*)
17494  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17495  ;;
17496  *)
17497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17498for as_dir in $PATH
17499do
17500  IFS=$as_save_IFS
17501  test -z "$as_dir" && as_dir=.
17502    for ac_exec_ext in '' $ac_executable_extensions; do
17503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17504    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17506    break 2
17507  fi
17508done
17509  done
17510IFS=$as_save_IFS
17511
17512  ;;
17513esac
17514fi
17515UNZIP=$ac_cv_path_UNZIP
17516if test -n "$UNZIP"; then
17517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17518$as_echo "$UNZIP" >&6; }
17519else
17520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17521$as_echo "no" >&6; }
17522fi
17523
17524
17525        if test "x$UNZIP" = x; then
17526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17527        fi
17528      else
17529        # Otherwise we believe it is a complete path. Use it as it is.
17530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17531$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17533$as_echo_n "checking for UNZIP... " >&6; }
17534        if test ! -x "$tool_specified"; then
17535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17536$as_echo "not found" >&6; }
17537          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17538        fi
17539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17540$as_echo "$tool_specified" >&6; }
17541      fi
17542    fi
17543  fi
17544
17545
17546
17547  if test "x$UNZIP" = x; then
17548    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17549  fi
17550
17551
17552
17553
17554
17555  # Publish this variable in the help.
17556
17557
17558  if test "x$ZIP" = x; then
17559    # The variable is not set by user, try to locate tool using the code snippet
17560    for ac_prog in zip
17561do
17562  # Extract the first word of "$ac_prog", so it can be a program name with args.
17563set dummy $ac_prog; ac_word=$2
17564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17565$as_echo_n "checking for $ac_word... " >&6; }
17566if ${ac_cv_path_ZIP+:} false; then :
17567  $as_echo_n "(cached) " >&6
17568else
17569  case $ZIP in
17570  [\\/]* | ?:[\\/]*)
17571  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17572  ;;
17573  *)
17574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17575for as_dir in $PATH
17576do
17577  IFS=$as_save_IFS
17578  test -z "$as_dir" && as_dir=.
17579    for ac_exec_ext in '' $ac_executable_extensions; do
17580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17581    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17583    break 2
17584  fi
17585done
17586  done
17587IFS=$as_save_IFS
17588
17589  ;;
17590esac
17591fi
17592ZIP=$ac_cv_path_ZIP
17593if test -n "$ZIP"; then
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17595$as_echo "$ZIP" >&6; }
17596else
17597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17598$as_echo "no" >&6; }
17599fi
17600
17601
17602  test -n "$ZIP" && break
17603done
17604
17605  else
17606    # The variable is set, but is it from the command line or the environment?
17607
17608    # Try to remove the string !ZIP! from our list.
17609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17611      # If it failed, the variable was not from the command line. Ignore it,
17612      # but warn the user (except for BASH, which is always set by the calling BASH).
17613      if test "xZIP" != xBASH; then
17614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17615$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17616      fi
17617      # Try to locate tool using the code snippet
17618      for ac_prog in zip
17619do
17620  # Extract the first word of "$ac_prog", so it can be a program name with args.
17621set dummy $ac_prog; ac_word=$2
17622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17623$as_echo_n "checking for $ac_word... " >&6; }
17624if ${ac_cv_path_ZIP+:} false; then :
17625  $as_echo_n "(cached) " >&6
17626else
17627  case $ZIP in
17628  [\\/]* | ?:[\\/]*)
17629  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17630  ;;
17631  *)
17632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17633for as_dir in $PATH
17634do
17635  IFS=$as_save_IFS
17636  test -z "$as_dir" && as_dir=.
17637    for ac_exec_ext in '' $ac_executable_extensions; do
17638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17639    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17641    break 2
17642  fi
17643done
17644  done
17645IFS=$as_save_IFS
17646
17647  ;;
17648esac
17649fi
17650ZIP=$ac_cv_path_ZIP
17651if test -n "$ZIP"; then
17652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17653$as_echo "$ZIP" >&6; }
17654else
17655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17656$as_echo "no" >&6; }
17657fi
17658
17659
17660  test -n "$ZIP" && break
17661done
17662
17663    else
17664      # If it succeeded, then it was overridden by the user. We will use it
17665      # for the tool.
17666
17667      # First remove it from the list of overridden variables, so we can test
17668      # for unknown variables in the end.
17669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17670
17671      # Check if the provided tool contains a complete path.
17672      tool_specified="$ZIP"
17673      tool_basename="${tool_specified##*/}"
17674      if test "x$tool_basename" = "x$tool_specified"; then
17675        # A command without a complete path is provided, search $PATH.
17676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17677$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17678        # Extract the first word of "$tool_basename", so it can be a program name with args.
17679set dummy $tool_basename; ac_word=$2
17680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17681$as_echo_n "checking for $ac_word... " >&6; }
17682if ${ac_cv_path_ZIP+:} false; then :
17683  $as_echo_n "(cached) " >&6
17684else
17685  case $ZIP in
17686  [\\/]* | ?:[\\/]*)
17687  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17688  ;;
17689  *)
17690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17691for as_dir in $PATH
17692do
17693  IFS=$as_save_IFS
17694  test -z "$as_dir" && as_dir=.
17695    for ac_exec_ext in '' $ac_executable_extensions; do
17696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17697    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17699    break 2
17700  fi
17701done
17702  done
17703IFS=$as_save_IFS
17704
17705  ;;
17706esac
17707fi
17708ZIP=$ac_cv_path_ZIP
17709if test -n "$ZIP"; then
17710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17711$as_echo "$ZIP" >&6; }
17712else
17713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17714$as_echo "no" >&6; }
17715fi
17716
17717
17718        if test "x$ZIP" = x; then
17719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17720        fi
17721      else
17722        # Otherwise we believe it is a complete path. Use it as it is.
17723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17724$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17726$as_echo_n "checking for ZIP... " >&6; }
17727        if test ! -x "$tool_specified"; then
17728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17729$as_echo "not found" >&6; }
17730          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17731        fi
17732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17733$as_echo "$tool_specified" >&6; }
17734      fi
17735    fi
17736  fi
17737
17738
17739
17740  if test "x$ZIP" = x; then
17741    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17742  fi
17743
17744
17745
17746  # Non-required basic tools
17747
17748
17749
17750  # Publish this variable in the help.
17751
17752
17753  if test "x$LDD" = x; then
17754    # The variable is not set by user, try to locate tool using the code snippet
17755    for ac_prog in ldd
17756do
17757  # Extract the first word of "$ac_prog", so it can be a program name with args.
17758set dummy $ac_prog; ac_word=$2
17759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17760$as_echo_n "checking for $ac_word... " >&6; }
17761if ${ac_cv_path_LDD+:} false; then :
17762  $as_echo_n "(cached) " >&6
17763else
17764  case $LDD in
17765  [\\/]* | ?:[\\/]*)
17766  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17767  ;;
17768  *)
17769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17770for as_dir in $PATH
17771do
17772  IFS=$as_save_IFS
17773  test -z "$as_dir" && as_dir=.
17774    for ac_exec_ext in '' $ac_executable_extensions; do
17775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17776    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17778    break 2
17779  fi
17780done
17781  done
17782IFS=$as_save_IFS
17783
17784  ;;
17785esac
17786fi
17787LDD=$ac_cv_path_LDD
17788if test -n "$LDD"; then
17789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17790$as_echo "$LDD" >&6; }
17791else
17792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17793$as_echo "no" >&6; }
17794fi
17795
17796
17797  test -n "$LDD" && break
17798done
17799
17800  else
17801    # The variable is set, but is it from the command line or the environment?
17802
17803    # Try to remove the string !LDD! from our list.
17804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17806      # If it failed, the variable was not from the command line. Ignore it,
17807      # but warn the user (except for BASH, which is always set by the calling BASH).
17808      if test "xLDD" != xBASH; then
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17810$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17811      fi
17812      # Try to locate tool using the code snippet
17813      for ac_prog in ldd
17814do
17815  # Extract the first word of "$ac_prog", so it can be a program name with args.
17816set dummy $ac_prog; ac_word=$2
17817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17818$as_echo_n "checking for $ac_word... " >&6; }
17819if ${ac_cv_path_LDD+:} false; then :
17820  $as_echo_n "(cached) " >&6
17821else
17822  case $LDD in
17823  [\\/]* | ?:[\\/]*)
17824  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17825  ;;
17826  *)
17827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17828for as_dir in $PATH
17829do
17830  IFS=$as_save_IFS
17831  test -z "$as_dir" && as_dir=.
17832    for ac_exec_ext in '' $ac_executable_extensions; do
17833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17834    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17836    break 2
17837  fi
17838done
17839  done
17840IFS=$as_save_IFS
17841
17842  ;;
17843esac
17844fi
17845LDD=$ac_cv_path_LDD
17846if test -n "$LDD"; then
17847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17848$as_echo "$LDD" >&6; }
17849else
17850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17851$as_echo "no" >&6; }
17852fi
17853
17854
17855  test -n "$LDD" && break
17856done
17857
17858    else
17859      # If it succeeded, then it was overridden by the user. We will use it
17860      # for the tool.
17861
17862      # First remove it from the list of overridden variables, so we can test
17863      # for unknown variables in the end.
17864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17865
17866      # Check if the provided tool contains a complete path.
17867      tool_specified="$LDD"
17868      tool_basename="${tool_specified##*/}"
17869      if test "x$tool_basename" = "x$tool_specified"; then
17870        # A command without a complete path is provided, search $PATH.
17871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17872$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17873        # Extract the first word of "$tool_basename", so it can be a program name with args.
17874set dummy $tool_basename; ac_word=$2
17875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17876$as_echo_n "checking for $ac_word... " >&6; }
17877if ${ac_cv_path_LDD+:} false; then :
17878  $as_echo_n "(cached) " >&6
17879else
17880  case $LDD in
17881  [\\/]* | ?:[\\/]*)
17882  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17883  ;;
17884  *)
17885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17886for as_dir in $PATH
17887do
17888  IFS=$as_save_IFS
17889  test -z "$as_dir" && as_dir=.
17890    for ac_exec_ext in '' $ac_executable_extensions; do
17891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17892    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17894    break 2
17895  fi
17896done
17897  done
17898IFS=$as_save_IFS
17899
17900  ;;
17901esac
17902fi
17903LDD=$ac_cv_path_LDD
17904if test -n "$LDD"; then
17905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17906$as_echo "$LDD" >&6; }
17907else
17908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17909$as_echo "no" >&6; }
17910fi
17911
17912
17913        if test "x$LDD" = x; then
17914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17915        fi
17916      else
17917        # Otherwise we believe it is a complete path. Use it as it is.
17918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17919$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17921$as_echo_n "checking for LDD... " >&6; }
17922        if test ! -x "$tool_specified"; then
17923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17924$as_echo "not found" >&6; }
17925          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17926        fi
17927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17928$as_echo "$tool_specified" >&6; }
17929      fi
17930    fi
17931  fi
17932
17933
17934  if test "x$LDD" = "x"; then
17935    # List shared lib dependencies is used for
17936    # debug output and checking for forbidden dependencies.
17937    # We can build without it.
17938    LDD="true"
17939  fi
17940
17941
17942  # Publish this variable in the help.
17943
17944
17945  if test "x$OTOOL" = x; then
17946    # The variable is not set by user, try to locate tool using the code snippet
17947    for ac_prog in otool
17948do
17949  # Extract the first word of "$ac_prog", so it can be a program name with args.
17950set dummy $ac_prog; ac_word=$2
17951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17952$as_echo_n "checking for $ac_word... " >&6; }
17953if ${ac_cv_path_OTOOL+:} false; then :
17954  $as_echo_n "(cached) " >&6
17955else
17956  case $OTOOL in
17957  [\\/]* | ?:[\\/]*)
17958  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17959  ;;
17960  *)
17961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17962for as_dir in $PATH
17963do
17964  IFS=$as_save_IFS
17965  test -z "$as_dir" && as_dir=.
17966    for ac_exec_ext in '' $ac_executable_extensions; do
17967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17968    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17970    break 2
17971  fi
17972done
17973  done
17974IFS=$as_save_IFS
17975
17976  ;;
17977esac
17978fi
17979OTOOL=$ac_cv_path_OTOOL
17980if test -n "$OTOOL"; then
17981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17982$as_echo "$OTOOL" >&6; }
17983else
17984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17985$as_echo "no" >&6; }
17986fi
17987
17988
17989  test -n "$OTOOL" && break
17990done
17991
17992  else
17993    # The variable is set, but is it from the command line or the environment?
17994
17995    # Try to remove the string !OTOOL! from our list.
17996    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17997    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17998      # If it failed, the variable was not from the command line. Ignore it,
17999      # but warn the user (except for BASH, which is always set by the calling BASH).
18000      if test "xOTOOL" != xBASH; then
18001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18002$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18003      fi
18004      # Try to locate tool using the code snippet
18005      for ac_prog in otool
18006do
18007  # Extract the first word of "$ac_prog", so it can be a program name with args.
18008set dummy $ac_prog; ac_word=$2
18009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18010$as_echo_n "checking for $ac_word... " >&6; }
18011if ${ac_cv_path_OTOOL+:} false; then :
18012  $as_echo_n "(cached) " >&6
18013else
18014  case $OTOOL in
18015  [\\/]* | ?:[\\/]*)
18016  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18017  ;;
18018  *)
18019  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18020for as_dir in $PATH
18021do
18022  IFS=$as_save_IFS
18023  test -z "$as_dir" && as_dir=.
18024    for ac_exec_ext in '' $ac_executable_extensions; do
18025  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18026    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18027    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18028    break 2
18029  fi
18030done
18031  done
18032IFS=$as_save_IFS
18033
18034  ;;
18035esac
18036fi
18037OTOOL=$ac_cv_path_OTOOL
18038if test -n "$OTOOL"; then
18039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18040$as_echo "$OTOOL" >&6; }
18041else
18042  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18043$as_echo "no" >&6; }
18044fi
18045
18046
18047  test -n "$OTOOL" && break
18048done
18049
18050    else
18051      # If it succeeded, then it was overridden by the user. We will use it
18052      # for the tool.
18053
18054      # First remove it from the list of overridden variables, so we can test
18055      # for unknown variables in the end.
18056      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18057
18058      # Check if the provided tool contains a complete path.
18059      tool_specified="$OTOOL"
18060      tool_basename="${tool_specified##*/}"
18061      if test "x$tool_basename" = "x$tool_specified"; then
18062        # A command without a complete path is provided, search $PATH.
18063        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18064$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18065        # Extract the first word of "$tool_basename", so it can be a program name with args.
18066set dummy $tool_basename; ac_word=$2
18067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18068$as_echo_n "checking for $ac_word... " >&6; }
18069if ${ac_cv_path_OTOOL+:} false; then :
18070  $as_echo_n "(cached) " >&6
18071else
18072  case $OTOOL in
18073  [\\/]* | ?:[\\/]*)
18074  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18075  ;;
18076  *)
18077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18078for as_dir in $PATH
18079do
18080  IFS=$as_save_IFS
18081  test -z "$as_dir" && as_dir=.
18082    for ac_exec_ext in '' $ac_executable_extensions; do
18083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18084    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18086    break 2
18087  fi
18088done
18089  done
18090IFS=$as_save_IFS
18091
18092  ;;
18093esac
18094fi
18095OTOOL=$ac_cv_path_OTOOL
18096if test -n "$OTOOL"; then
18097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18098$as_echo "$OTOOL" >&6; }
18099else
18100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18101$as_echo "no" >&6; }
18102fi
18103
18104
18105        if test "x$OTOOL" = x; then
18106          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18107        fi
18108      else
18109        # Otherwise we believe it is a complete path. Use it as it is.
18110        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18111$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18113$as_echo_n "checking for OTOOL... " >&6; }
18114        if test ! -x "$tool_specified"; then
18115          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18116$as_echo "not found" >&6; }
18117          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18118        fi
18119        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18120$as_echo "$tool_specified" >&6; }
18121      fi
18122    fi
18123  fi
18124
18125
18126  if test "x$OTOOL" = "x"; then
18127    OTOOL="true"
18128  fi
18129
18130
18131  # Publish this variable in the help.
18132
18133
18134  if test "x$READELF" = x; then
18135    # The variable is not set by user, try to locate tool using the code snippet
18136    for ac_prog in greadelf readelf
18137do
18138  # Extract the first word of "$ac_prog", so it can be a program name with args.
18139set dummy $ac_prog; ac_word=$2
18140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18141$as_echo_n "checking for $ac_word... " >&6; }
18142if ${ac_cv_path_READELF+:} false; then :
18143  $as_echo_n "(cached) " >&6
18144else
18145  case $READELF in
18146  [\\/]* | ?:[\\/]*)
18147  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18148  ;;
18149  *)
18150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18151for as_dir in $PATH
18152do
18153  IFS=$as_save_IFS
18154  test -z "$as_dir" && as_dir=.
18155    for ac_exec_ext in '' $ac_executable_extensions; do
18156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18157    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18159    break 2
18160  fi
18161done
18162  done
18163IFS=$as_save_IFS
18164
18165  ;;
18166esac
18167fi
18168READELF=$ac_cv_path_READELF
18169if test -n "$READELF"; then
18170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18171$as_echo "$READELF" >&6; }
18172else
18173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18174$as_echo "no" >&6; }
18175fi
18176
18177
18178  test -n "$READELF" && break
18179done
18180
18181  else
18182    # The variable is set, but is it from the command line or the environment?
18183
18184    # Try to remove the string !READELF! from our list.
18185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18187      # If it failed, the variable was not from the command line. Ignore it,
18188      # but warn the user (except for BASH, which is always set by the calling BASH).
18189      if test "xREADELF" != xBASH; then
18190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18191$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18192      fi
18193      # Try to locate tool using the code snippet
18194      for ac_prog in greadelf readelf
18195do
18196  # Extract the first word of "$ac_prog", so it can be a program name with args.
18197set dummy $ac_prog; ac_word=$2
18198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18199$as_echo_n "checking for $ac_word... " >&6; }
18200if ${ac_cv_path_READELF+:} false; then :
18201  $as_echo_n "(cached) " >&6
18202else
18203  case $READELF in
18204  [\\/]* | ?:[\\/]*)
18205  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18206  ;;
18207  *)
18208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18209for as_dir in $PATH
18210do
18211  IFS=$as_save_IFS
18212  test -z "$as_dir" && as_dir=.
18213    for ac_exec_ext in '' $ac_executable_extensions; do
18214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18215    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18217    break 2
18218  fi
18219done
18220  done
18221IFS=$as_save_IFS
18222
18223  ;;
18224esac
18225fi
18226READELF=$ac_cv_path_READELF
18227if test -n "$READELF"; then
18228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18229$as_echo "$READELF" >&6; }
18230else
18231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18232$as_echo "no" >&6; }
18233fi
18234
18235
18236  test -n "$READELF" && break
18237done
18238
18239    else
18240      # If it succeeded, then it was overridden by the user. We will use it
18241      # for the tool.
18242
18243      # First remove it from the list of overridden variables, so we can test
18244      # for unknown variables in the end.
18245      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18246
18247      # Check if the provided tool contains a complete path.
18248      tool_specified="$READELF"
18249      tool_basename="${tool_specified##*/}"
18250      if test "x$tool_basename" = "x$tool_specified"; then
18251        # A command without a complete path is provided, search $PATH.
18252        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18253$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18254        # Extract the first word of "$tool_basename", so it can be a program name with args.
18255set dummy $tool_basename; ac_word=$2
18256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18257$as_echo_n "checking for $ac_word... " >&6; }
18258if ${ac_cv_path_READELF+:} false; then :
18259  $as_echo_n "(cached) " >&6
18260else
18261  case $READELF in
18262  [\\/]* | ?:[\\/]*)
18263  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18264  ;;
18265  *)
18266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18267for as_dir in $PATH
18268do
18269  IFS=$as_save_IFS
18270  test -z "$as_dir" && as_dir=.
18271    for ac_exec_ext in '' $ac_executable_extensions; do
18272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18273    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18275    break 2
18276  fi
18277done
18278  done
18279IFS=$as_save_IFS
18280
18281  ;;
18282esac
18283fi
18284READELF=$ac_cv_path_READELF
18285if test -n "$READELF"; then
18286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18287$as_echo "$READELF" >&6; }
18288else
18289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18290$as_echo "no" >&6; }
18291fi
18292
18293
18294        if test "x$READELF" = x; then
18295          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18296        fi
18297      else
18298        # Otherwise we believe it is a complete path. Use it as it is.
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18300$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18301        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18302$as_echo_n "checking for READELF... " >&6; }
18303        if test ! -x "$tool_specified"; then
18304          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18305$as_echo "not found" >&6; }
18306          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18307        fi
18308        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18309$as_echo "$tool_specified" >&6; }
18310      fi
18311    fi
18312  fi
18313
18314
18315
18316
18317  # Publish this variable in the help.
18318
18319
18320  if test "x$HG" = x; then
18321    # The variable is not set by user, try to locate tool using the code snippet
18322    for ac_prog in hg
18323do
18324  # Extract the first word of "$ac_prog", so it can be a program name with args.
18325set dummy $ac_prog; ac_word=$2
18326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18327$as_echo_n "checking for $ac_word... " >&6; }
18328if ${ac_cv_path_HG+:} false; then :
18329  $as_echo_n "(cached) " >&6
18330else
18331  case $HG in
18332  [\\/]* | ?:[\\/]*)
18333  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18334  ;;
18335  *)
18336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18337for as_dir in $PATH
18338do
18339  IFS=$as_save_IFS
18340  test -z "$as_dir" && as_dir=.
18341    for ac_exec_ext in '' $ac_executable_extensions; do
18342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18343    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18345    break 2
18346  fi
18347done
18348  done
18349IFS=$as_save_IFS
18350
18351  ;;
18352esac
18353fi
18354HG=$ac_cv_path_HG
18355if test -n "$HG"; then
18356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18357$as_echo "$HG" >&6; }
18358else
18359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360$as_echo "no" >&6; }
18361fi
18362
18363
18364  test -n "$HG" && break
18365done
18366
18367  else
18368    # The variable is set, but is it from the command line or the environment?
18369
18370    # Try to remove the string !HG! from our list.
18371    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18372    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18373      # If it failed, the variable was not from the command line. Ignore it,
18374      # but warn the user (except for BASH, which is always set by the calling BASH).
18375      if test "xHG" != xBASH; then
18376        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18377$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18378      fi
18379      # Try to locate tool using the code snippet
18380      for ac_prog in hg
18381do
18382  # Extract the first word of "$ac_prog", so it can be a program name with args.
18383set dummy $ac_prog; ac_word=$2
18384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18385$as_echo_n "checking for $ac_word... " >&6; }
18386if ${ac_cv_path_HG+:} false; then :
18387  $as_echo_n "(cached) " >&6
18388else
18389  case $HG in
18390  [\\/]* | ?:[\\/]*)
18391  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18392  ;;
18393  *)
18394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18395for as_dir in $PATH
18396do
18397  IFS=$as_save_IFS
18398  test -z "$as_dir" && as_dir=.
18399    for ac_exec_ext in '' $ac_executable_extensions; do
18400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18401    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18403    break 2
18404  fi
18405done
18406  done
18407IFS=$as_save_IFS
18408
18409  ;;
18410esac
18411fi
18412HG=$ac_cv_path_HG
18413if test -n "$HG"; then
18414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18415$as_echo "$HG" >&6; }
18416else
18417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18418$as_echo "no" >&6; }
18419fi
18420
18421
18422  test -n "$HG" && break
18423done
18424
18425    else
18426      # If it succeeded, then it was overridden by the user. We will use it
18427      # for the tool.
18428
18429      # First remove it from the list of overridden variables, so we can test
18430      # for unknown variables in the end.
18431      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18432
18433      # Check if the provided tool contains a complete path.
18434      tool_specified="$HG"
18435      tool_basename="${tool_specified##*/}"
18436      if test "x$tool_basename" = "x$tool_specified"; then
18437        # A command without a complete path is provided, search $PATH.
18438        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18439$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18440        # Extract the first word of "$tool_basename", so it can be a program name with args.
18441set dummy $tool_basename; ac_word=$2
18442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18443$as_echo_n "checking for $ac_word... " >&6; }
18444if ${ac_cv_path_HG+:} false; then :
18445  $as_echo_n "(cached) " >&6
18446else
18447  case $HG in
18448  [\\/]* | ?:[\\/]*)
18449  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18450  ;;
18451  *)
18452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18453for as_dir in $PATH
18454do
18455  IFS=$as_save_IFS
18456  test -z "$as_dir" && as_dir=.
18457    for ac_exec_ext in '' $ac_executable_extensions; do
18458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18459    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18461    break 2
18462  fi
18463done
18464  done
18465IFS=$as_save_IFS
18466
18467  ;;
18468esac
18469fi
18470HG=$ac_cv_path_HG
18471if test -n "$HG"; then
18472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18473$as_echo "$HG" >&6; }
18474else
18475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18476$as_echo "no" >&6; }
18477fi
18478
18479
18480        if test "x$HG" = x; then
18481          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18482        fi
18483      else
18484        # Otherwise we believe it is a complete path. Use it as it is.
18485        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18486$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18487        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18488$as_echo_n "checking for HG... " >&6; }
18489        if test ! -x "$tool_specified"; then
18490          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18491$as_echo "not found" >&6; }
18492          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18493        fi
18494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18495$as_echo "$tool_specified" >&6; }
18496      fi
18497    fi
18498  fi
18499
18500
18501
18502
18503  # Publish this variable in the help.
18504
18505
18506  if test "x$STAT" = x; then
18507    # The variable is not set by user, try to locate tool using the code snippet
18508    for ac_prog in stat
18509do
18510  # Extract the first word of "$ac_prog", so it can be a program name with args.
18511set dummy $ac_prog; ac_word=$2
18512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18513$as_echo_n "checking for $ac_word... " >&6; }
18514if ${ac_cv_path_STAT+:} false; then :
18515  $as_echo_n "(cached) " >&6
18516else
18517  case $STAT in
18518  [\\/]* | ?:[\\/]*)
18519  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18520  ;;
18521  *)
18522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18523for as_dir in $PATH
18524do
18525  IFS=$as_save_IFS
18526  test -z "$as_dir" && as_dir=.
18527    for ac_exec_ext in '' $ac_executable_extensions; do
18528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18529    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18531    break 2
18532  fi
18533done
18534  done
18535IFS=$as_save_IFS
18536
18537  ;;
18538esac
18539fi
18540STAT=$ac_cv_path_STAT
18541if test -n "$STAT"; then
18542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18543$as_echo "$STAT" >&6; }
18544else
18545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18546$as_echo "no" >&6; }
18547fi
18548
18549
18550  test -n "$STAT" && break
18551done
18552
18553  else
18554    # The variable is set, but is it from the command line or the environment?
18555
18556    # Try to remove the string !STAT! from our list.
18557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18559      # If it failed, the variable was not from the command line. Ignore it,
18560      # but warn the user (except for BASH, which is always set by the calling BASH).
18561      if test "xSTAT" != xBASH; then
18562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18563$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18564      fi
18565      # Try to locate tool using the code snippet
18566      for ac_prog in stat
18567do
18568  # Extract the first word of "$ac_prog", so it can be a program name with args.
18569set dummy $ac_prog; ac_word=$2
18570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18571$as_echo_n "checking for $ac_word... " >&6; }
18572if ${ac_cv_path_STAT+:} false; then :
18573  $as_echo_n "(cached) " >&6
18574else
18575  case $STAT in
18576  [\\/]* | ?:[\\/]*)
18577  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18578  ;;
18579  *)
18580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18581for as_dir in $PATH
18582do
18583  IFS=$as_save_IFS
18584  test -z "$as_dir" && as_dir=.
18585    for ac_exec_ext in '' $ac_executable_extensions; do
18586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18587    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18589    break 2
18590  fi
18591done
18592  done
18593IFS=$as_save_IFS
18594
18595  ;;
18596esac
18597fi
18598STAT=$ac_cv_path_STAT
18599if test -n "$STAT"; then
18600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18601$as_echo "$STAT" >&6; }
18602else
18603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18604$as_echo "no" >&6; }
18605fi
18606
18607
18608  test -n "$STAT" && break
18609done
18610
18611    else
18612      # If it succeeded, then it was overridden by the user. We will use it
18613      # for the tool.
18614
18615      # First remove it from the list of overridden variables, so we can test
18616      # for unknown variables in the end.
18617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18618
18619      # Check if the provided tool contains a complete path.
18620      tool_specified="$STAT"
18621      tool_basename="${tool_specified##*/}"
18622      if test "x$tool_basename" = "x$tool_specified"; then
18623        # A command without a complete path is provided, search $PATH.
18624        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18625$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18626        # Extract the first word of "$tool_basename", so it can be a program name with args.
18627set dummy $tool_basename; ac_word=$2
18628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18629$as_echo_n "checking for $ac_word... " >&6; }
18630if ${ac_cv_path_STAT+:} false; then :
18631  $as_echo_n "(cached) " >&6
18632else
18633  case $STAT in
18634  [\\/]* | ?:[\\/]*)
18635  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18636  ;;
18637  *)
18638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18639for as_dir in $PATH
18640do
18641  IFS=$as_save_IFS
18642  test -z "$as_dir" && as_dir=.
18643    for ac_exec_ext in '' $ac_executable_extensions; do
18644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18645    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18647    break 2
18648  fi
18649done
18650  done
18651IFS=$as_save_IFS
18652
18653  ;;
18654esac
18655fi
18656STAT=$ac_cv_path_STAT
18657if test -n "$STAT"; then
18658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18659$as_echo "$STAT" >&6; }
18660else
18661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18662$as_echo "no" >&6; }
18663fi
18664
18665
18666        if test "x$STAT" = x; then
18667          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18668        fi
18669      else
18670        # Otherwise we believe it is a complete path. Use it as it is.
18671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18672$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18674$as_echo_n "checking for STAT... " >&6; }
18675        if test ! -x "$tool_specified"; then
18676          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18677$as_echo "not found" >&6; }
18678          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18679        fi
18680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18681$as_echo "$tool_specified" >&6; }
18682      fi
18683    fi
18684  fi
18685
18686
18687
18688
18689  # Publish this variable in the help.
18690
18691
18692  if test "x$TIME" = x; then
18693    # The variable is not set by user, try to locate tool using the code snippet
18694    for ac_prog in time
18695do
18696  # Extract the first word of "$ac_prog", so it can be a program name with args.
18697set dummy $ac_prog; ac_word=$2
18698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18699$as_echo_n "checking for $ac_word... " >&6; }
18700if ${ac_cv_path_TIME+:} false; then :
18701  $as_echo_n "(cached) " >&6
18702else
18703  case $TIME in
18704  [\\/]* | ?:[\\/]*)
18705  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18706  ;;
18707  *)
18708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18709for as_dir in $PATH
18710do
18711  IFS=$as_save_IFS
18712  test -z "$as_dir" && as_dir=.
18713    for ac_exec_ext in '' $ac_executable_extensions; do
18714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18715    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18717    break 2
18718  fi
18719done
18720  done
18721IFS=$as_save_IFS
18722
18723  ;;
18724esac
18725fi
18726TIME=$ac_cv_path_TIME
18727if test -n "$TIME"; then
18728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18729$as_echo "$TIME" >&6; }
18730else
18731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18732$as_echo "no" >&6; }
18733fi
18734
18735
18736  test -n "$TIME" && break
18737done
18738
18739  else
18740    # The variable is set, but is it from the command line or the environment?
18741
18742    # Try to remove the string !TIME! from our list.
18743    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18744    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18745      # If it failed, the variable was not from the command line. Ignore it,
18746      # but warn the user (except for BASH, which is always set by the calling BASH).
18747      if test "xTIME" != xBASH; then
18748        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18749$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18750      fi
18751      # Try to locate tool using the code snippet
18752      for ac_prog in time
18753do
18754  # Extract the first word of "$ac_prog", so it can be a program name with args.
18755set dummy $ac_prog; ac_word=$2
18756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18757$as_echo_n "checking for $ac_word... " >&6; }
18758if ${ac_cv_path_TIME+:} false; then :
18759  $as_echo_n "(cached) " >&6
18760else
18761  case $TIME in
18762  [\\/]* | ?:[\\/]*)
18763  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18764  ;;
18765  *)
18766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18767for as_dir in $PATH
18768do
18769  IFS=$as_save_IFS
18770  test -z "$as_dir" && as_dir=.
18771    for ac_exec_ext in '' $ac_executable_extensions; do
18772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18773    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18775    break 2
18776  fi
18777done
18778  done
18779IFS=$as_save_IFS
18780
18781  ;;
18782esac
18783fi
18784TIME=$ac_cv_path_TIME
18785if test -n "$TIME"; then
18786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18787$as_echo "$TIME" >&6; }
18788else
18789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18790$as_echo "no" >&6; }
18791fi
18792
18793
18794  test -n "$TIME" && break
18795done
18796
18797    else
18798      # If it succeeded, then it was overridden by the user. We will use it
18799      # for the tool.
18800
18801      # First remove it from the list of overridden variables, so we can test
18802      # for unknown variables in the end.
18803      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18804
18805      # Check if the provided tool contains a complete path.
18806      tool_specified="$TIME"
18807      tool_basename="${tool_specified##*/}"
18808      if test "x$tool_basename" = "x$tool_specified"; then
18809        # A command without a complete path is provided, search $PATH.
18810        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18811$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18812        # Extract the first word of "$tool_basename", so it can be a program name with args.
18813set dummy $tool_basename; ac_word=$2
18814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18815$as_echo_n "checking for $ac_word... " >&6; }
18816if ${ac_cv_path_TIME+:} false; then :
18817  $as_echo_n "(cached) " >&6
18818else
18819  case $TIME in
18820  [\\/]* | ?:[\\/]*)
18821  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18822  ;;
18823  *)
18824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18825for as_dir in $PATH
18826do
18827  IFS=$as_save_IFS
18828  test -z "$as_dir" && as_dir=.
18829    for ac_exec_ext in '' $ac_executable_extensions; do
18830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18831    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18833    break 2
18834  fi
18835done
18836  done
18837IFS=$as_save_IFS
18838
18839  ;;
18840esac
18841fi
18842TIME=$ac_cv_path_TIME
18843if test -n "$TIME"; then
18844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18845$as_echo "$TIME" >&6; }
18846else
18847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18848$as_echo "no" >&6; }
18849fi
18850
18851
18852        if test "x$TIME" = x; then
18853          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18854        fi
18855      else
18856        # Otherwise we believe it is a complete path. Use it as it is.
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18858$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18859        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18860$as_echo_n "checking for TIME... " >&6; }
18861        if test ! -x "$tool_specified"; then
18862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18863$as_echo "not found" >&6; }
18864          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18865        fi
18866        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18867$as_echo "$tool_specified" >&6; }
18868      fi
18869    fi
18870  fi
18871
18872
18873  # Check if it's GNU time
18874  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18875  if test "x$IS_GNU_TIME" != x; then
18876    IS_GNU_TIME=yes
18877  else
18878    IS_GNU_TIME=no
18879  fi
18880
18881
18882  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18883
18884
18885
18886  # Publish this variable in the help.
18887
18888
18889  if test "x$DSYMUTIL" = x; then
18890    # The variable is not set by user, try to locate tool using the code snippet
18891    for ac_prog in dsymutil
18892do
18893  # Extract the first word of "$ac_prog", so it can be a program name with args.
18894set dummy $ac_prog; ac_word=$2
18895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18896$as_echo_n "checking for $ac_word... " >&6; }
18897if ${ac_cv_path_DSYMUTIL+:} false; then :
18898  $as_echo_n "(cached) " >&6
18899else
18900  case $DSYMUTIL in
18901  [\\/]* | ?:[\\/]*)
18902  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18903  ;;
18904  *)
18905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18906for as_dir in $PATH
18907do
18908  IFS=$as_save_IFS
18909  test -z "$as_dir" && as_dir=.
18910    for ac_exec_ext in '' $ac_executable_extensions; do
18911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18912    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18914    break 2
18915  fi
18916done
18917  done
18918IFS=$as_save_IFS
18919
18920  ;;
18921esac
18922fi
18923DSYMUTIL=$ac_cv_path_DSYMUTIL
18924if test -n "$DSYMUTIL"; then
18925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18926$as_echo "$DSYMUTIL" >&6; }
18927else
18928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18929$as_echo "no" >&6; }
18930fi
18931
18932
18933  test -n "$DSYMUTIL" && break
18934done
18935
18936  else
18937    # The variable is set, but is it from the command line or the environment?
18938
18939    # Try to remove the string !DSYMUTIL! from our list.
18940    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18941    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18942      # If it failed, the variable was not from the command line. Ignore it,
18943      # but warn the user (except for BASH, which is always set by the calling BASH).
18944      if test "xDSYMUTIL" != xBASH; then
18945        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18946$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18947      fi
18948      # Try to locate tool using the code snippet
18949      for ac_prog in dsymutil
18950do
18951  # Extract the first word of "$ac_prog", so it can be a program name with args.
18952set dummy $ac_prog; ac_word=$2
18953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18954$as_echo_n "checking for $ac_word... " >&6; }
18955if ${ac_cv_path_DSYMUTIL+:} false; then :
18956  $as_echo_n "(cached) " >&6
18957else
18958  case $DSYMUTIL in
18959  [\\/]* | ?:[\\/]*)
18960  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18961  ;;
18962  *)
18963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18964for as_dir in $PATH
18965do
18966  IFS=$as_save_IFS
18967  test -z "$as_dir" && as_dir=.
18968    for ac_exec_ext in '' $ac_executable_extensions; do
18969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18970    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18972    break 2
18973  fi
18974done
18975  done
18976IFS=$as_save_IFS
18977
18978  ;;
18979esac
18980fi
18981DSYMUTIL=$ac_cv_path_DSYMUTIL
18982if test -n "$DSYMUTIL"; then
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18984$as_echo "$DSYMUTIL" >&6; }
18985else
18986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18987$as_echo "no" >&6; }
18988fi
18989
18990
18991  test -n "$DSYMUTIL" && break
18992done
18993
18994    else
18995      # If it succeeded, then it was overridden by the user. We will use it
18996      # for the tool.
18997
18998      # First remove it from the list of overridden variables, so we can test
18999      # for unknown variables in the end.
19000      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19001
19002      # Check if the provided tool contains a complete path.
19003      tool_specified="$DSYMUTIL"
19004      tool_basename="${tool_specified##*/}"
19005      if test "x$tool_basename" = "x$tool_specified"; then
19006        # A command without a complete path is provided, search $PATH.
19007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19008$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19009        # Extract the first word of "$tool_basename", so it can be a program name with args.
19010set dummy $tool_basename; ac_word=$2
19011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19012$as_echo_n "checking for $ac_word... " >&6; }
19013if ${ac_cv_path_DSYMUTIL+:} false; then :
19014  $as_echo_n "(cached) " >&6
19015else
19016  case $DSYMUTIL in
19017  [\\/]* | ?:[\\/]*)
19018  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19019  ;;
19020  *)
19021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19022for as_dir in $PATH
19023do
19024  IFS=$as_save_IFS
19025  test -z "$as_dir" && as_dir=.
19026    for ac_exec_ext in '' $ac_executable_extensions; do
19027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19028    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19030    break 2
19031  fi
19032done
19033  done
19034IFS=$as_save_IFS
19035
19036  ;;
19037esac
19038fi
19039DSYMUTIL=$ac_cv_path_DSYMUTIL
19040if test -n "$DSYMUTIL"; then
19041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19042$as_echo "$DSYMUTIL" >&6; }
19043else
19044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19045$as_echo "no" >&6; }
19046fi
19047
19048
19049        if test "x$DSYMUTIL" = x; then
19050          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19051        fi
19052      else
19053        # Otherwise we believe it is a complete path. Use it as it is.
19054        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19055$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19056        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19057$as_echo_n "checking for DSYMUTIL... " >&6; }
19058        if test ! -x "$tool_specified"; then
19059          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19060$as_echo "not found" >&6; }
19061          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19062        fi
19063        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19064$as_echo "$tool_specified" >&6; }
19065      fi
19066    fi
19067  fi
19068
19069
19070
19071  if test "x$DSYMUTIL" = x; then
19072    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19073  fi
19074
19075
19076
19077
19078
19079  # Publish this variable in the help.
19080
19081
19082  if test "x$XATTR" = x; then
19083    # The variable is not set by user, try to locate tool using the code snippet
19084    for ac_prog in xattr
19085do
19086  # Extract the first word of "$ac_prog", so it can be a program name with args.
19087set dummy $ac_prog; ac_word=$2
19088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19089$as_echo_n "checking for $ac_word... " >&6; }
19090if ${ac_cv_path_XATTR+:} false; then :
19091  $as_echo_n "(cached) " >&6
19092else
19093  case $XATTR in
19094  [\\/]* | ?:[\\/]*)
19095  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19096  ;;
19097  *)
19098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19099for as_dir in $PATH
19100do
19101  IFS=$as_save_IFS
19102  test -z "$as_dir" && as_dir=.
19103    for ac_exec_ext in '' $ac_executable_extensions; do
19104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19105    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19107    break 2
19108  fi
19109done
19110  done
19111IFS=$as_save_IFS
19112
19113  ;;
19114esac
19115fi
19116XATTR=$ac_cv_path_XATTR
19117if test -n "$XATTR"; then
19118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19119$as_echo "$XATTR" >&6; }
19120else
19121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19122$as_echo "no" >&6; }
19123fi
19124
19125
19126  test -n "$XATTR" && break
19127done
19128
19129  else
19130    # The variable is set, but is it from the command line or the environment?
19131
19132    # Try to remove the string !XATTR! from our list.
19133    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19134    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19135      # If it failed, the variable was not from the command line. Ignore it,
19136      # but warn the user (except for BASH, which is always set by the calling BASH).
19137      if test "xXATTR" != xBASH; then
19138        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19139$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19140      fi
19141      # Try to locate tool using the code snippet
19142      for ac_prog in xattr
19143do
19144  # Extract the first word of "$ac_prog", so it can be a program name with args.
19145set dummy $ac_prog; ac_word=$2
19146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19147$as_echo_n "checking for $ac_word... " >&6; }
19148if ${ac_cv_path_XATTR+:} false; then :
19149  $as_echo_n "(cached) " >&6
19150else
19151  case $XATTR in
19152  [\\/]* | ?:[\\/]*)
19153  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19154  ;;
19155  *)
19156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19157for as_dir in $PATH
19158do
19159  IFS=$as_save_IFS
19160  test -z "$as_dir" && as_dir=.
19161    for ac_exec_ext in '' $ac_executable_extensions; do
19162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19163    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19165    break 2
19166  fi
19167done
19168  done
19169IFS=$as_save_IFS
19170
19171  ;;
19172esac
19173fi
19174XATTR=$ac_cv_path_XATTR
19175if test -n "$XATTR"; then
19176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19177$as_echo "$XATTR" >&6; }
19178else
19179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19180$as_echo "no" >&6; }
19181fi
19182
19183
19184  test -n "$XATTR" && break
19185done
19186
19187    else
19188      # If it succeeded, then it was overridden by the user. We will use it
19189      # for the tool.
19190
19191      # First remove it from the list of overridden variables, so we can test
19192      # for unknown variables in the end.
19193      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19194
19195      # Check if the provided tool contains a complete path.
19196      tool_specified="$XATTR"
19197      tool_basename="${tool_specified##*/}"
19198      if test "x$tool_basename" = "x$tool_specified"; then
19199        # A command without a complete path is provided, search $PATH.
19200        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19201$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19202        # Extract the first word of "$tool_basename", so it can be a program name with args.
19203set dummy $tool_basename; ac_word=$2
19204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19205$as_echo_n "checking for $ac_word... " >&6; }
19206if ${ac_cv_path_XATTR+:} false; then :
19207  $as_echo_n "(cached) " >&6
19208else
19209  case $XATTR in
19210  [\\/]* | ?:[\\/]*)
19211  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19212  ;;
19213  *)
19214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19215for as_dir in $PATH
19216do
19217  IFS=$as_save_IFS
19218  test -z "$as_dir" && as_dir=.
19219    for ac_exec_ext in '' $ac_executable_extensions; do
19220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19221    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19223    break 2
19224  fi
19225done
19226  done
19227IFS=$as_save_IFS
19228
19229  ;;
19230esac
19231fi
19232XATTR=$ac_cv_path_XATTR
19233if test -n "$XATTR"; then
19234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19235$as_echo "$XATTR" >&6; }
19236else
19237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19238$as_echo "no" >&6; }
19239fi
19240
19241
19242        if test "x$XATTR" = x; then
19243          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19244        fi
19245      else
19246        # Otherwise we believe it is a complete path. Use it as it is.
19247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19248$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19250$as_echo_n "checking for XATTR... " >&6; }
19251        if test ! -x "$tool_specified"; then
19252          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19253$as_echo "not found" >&6; }
19254          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19255        fi
19256        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19257$as_echo "$tool_specified" >&6; }
19258      fi
19259    fi
19260  fi
19261
19262
19263
19264  if test "x$XATTR" = x; then
19265    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19266  fi
19267
19268
19269
19270
19271  # Publish this variable in the help.
19272
19273
19274  if test "x$CODESIGN" = x; then
19275    # The variable is not set by user, try to locate tool using the code snippet
19276    for ac_prog in codesign
19277do
19278  # Extract the first word of "$ac_prog", so it can be a program name with args.
19279set dummy $ac_prog; ac_word=$2
19280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19281$as_echo_n "checking for $ac_word... " >&6; }
19282if ${ac_cv_path_CODESIGN+:} false; then :
19283  $as_echo_n "(cached) " >&6
19284else
19285  case $CODESIGN in
19286  [\\/]* | ?:[\\/]*)
19287  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19288  ;;
19289  *)
19290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19291for as_dir in $PATH
19292do
19293  IFS=$as_save_IFS
19294  test -z "$as_dir" && as_dir=.
19295    for ac_exec_ext in '' $ac_executable_extensions; do
19296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19297    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19299    break 2
19300  fi
19301done
19302  done
19303IFS=$as_save_IFS
19304
19305  ;;
19306esac
19307fi
19308CODESIGN=$ac_cv_path_CODESIGN
19309if test -n "$CODESIGN"; then
19310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19311$as_echo "$CODESIGN" >&6; }
19312else
19313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19314$as_echo "no" >&6; }
19315fi
19316
19317
19318  test -n "$CODESIGN" && break
19319done
19320
19321  else
19322    # The variable is set, but is it from the command line or the environment?
19323
19324    # Try to remove the string !CODESIGN! from our list.
19325    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19326    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19327      # If it failed, the variable was not from the command line. Ignore it,
19328      # but warn the user (except for BASH, which is always set by the calling BASH).
19329      if test "xCODESIGN" != xBASH; then
19330        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19331$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19332      fi
19333      # Try to locate tool using the code snippet
19334      for ac_prog in codesign
19335do
19336  # Extract the first word of "$ac_prog", so it can be a program name with args.
19337set dummy $ac_prog; ac_word=$2
19338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19339$as_echo_n "checking for $ac_word... " >&6; }
19340if ${ac_cv_path_CODESIGN+:} false; then :
19341  $as_echo_n "(cached) " >&6
19342else
19343  case $CODESIGN in
19344  [\\/]* | ?:[\\/]*)
19345  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19346  ;;
19347  *)
19348  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19349for as_dir in $PATH
19350do
19351  IFS=$as_save_IFS
19352  test -z "$as_dir" && as_dir=.
19353    for ac_exec_ext in '' $ac_executable_extensions; do
19354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19355    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19357    break 2
19358  fi
19359done
19360  done
19361IFS=$as_save_IFS
19362
19363  ;;
19364esac
19365fi
19366CODESIGN=$ac_cv_path_CODESIGN
19367if test -n "$CODESIGN"; then
19368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19369$as_echo "$CODESIGN" >&6; }
19370else
19371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19372$as_echo "no" >&6; }
19373fi
19374
19375
19376  test -n "$CODESIGN" && break
19377done
19378
19379    else
19380      # If it succeeded, then it was overridden by the user. We will use it
19381      # for the tool.
19382
19383      # First remove it from the list of overridden variables, so we can test
19384      # for unknown variables in the end.
19385      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19386
19387      # Check if the provided tool contains a complete path.
19388      tool_specified="$CODESIGN"
19389      tool_basename="${tool_specified##*/}"
19390      if test "x$tool_basename" = "x$tool_specified"; then
19391        # A command without a complete path is provided, search $PATH.
19392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19393$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19394        # Extract the first word of "$tool_basename", so it can be a program name with args.
19395set dummy $tool_basename; ac_word=$2
19396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19397$as_echo_n "checking for $ac_word... " >&6; }
19398if ${ac_cv_path_CODESIGN+:} false; then :
19399  $as_echo_n "(cached) " >&6
19400else
19401  case $CODESIGN in
19402  [\\/]* | ?:[\\/]*)
19403  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19404  ;;
19405  *)
19406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19407for as_dir in $PATH
19408do
19409  IFS=$as_save_IFS
19410  test -z "$as_dir" && as_dir=.
19411    for ac_exec_ext in '' $ac_executable_extensions; do
19412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19413    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19415    break 2
19416  fi
19417done
19418  done
19419IFS=$as_save_IFS
19420
19421  ;;
19422esac
19423fi
19424CODESIGN=$ac_cv_path_CODESIGN
19425if test -n "$CODESIGN"; then
19426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19427$as_echo "$CODESIGN" >&6; }
19428else
19429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19430$as_echo "no" >&6; }
19431fi
19432
19433
19434        if test "x$CODESIGN" = x; then
19435          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19436        fi
19437      else
19438        # Otherwise we believe it is a complete path. Use it as it is.
19439        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19440$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19441        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19442$as_echo_n "checking for CODESIGN... " >&6; }
19443        if test ! -x "$tool_specified"; then
19444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19445$as_echo "not found" >&6; }
19446          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19447        fi
19448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19449$as_echo "$tool_specified" >&6; }
19450      fi
19451    fi
19452  fi
19453
19454
19455    if test "x$CODESIGN" != "x"; then
19456      # Verify that the openjdk_codesign certificate is present
19457      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19458$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19459      rm -f codesign-testfile
19460      touch codesign-testfile
19461      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19462      rm -f codesign-testfile
19463      if test "x$CODESIGN" = x; then
19464        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19465$as_echo "no" >&6; }
19466      else
19467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19468$as_echo "yes" >&6; }
19469      fi
19470    fi
19471  fi
19472
19473
19474# Check if pkg-config is available.
19475
19476
19477if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19478	if test -n "$ac_tool_prefix"; then
19479  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19480set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19482$as_echo_n "checking for $ac_word... " >&6; }
19483if ${ac_cv_path_PKG_CONFIG+:} false; then :
19484  $as_echo_n "(cached) " >&6
19485else
19486  case $PKG_CONFIG in
19487  [\\/]* | ?:[\\/]*)
19488  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19489  ;;
19490  *)
19491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19492for as_dir in $PATH
19493do
19494  IFS=$as_save_IFS
19495  test -z "$as_dir" && as_dir=.
19496    for ac_exec_ext in '' $ac_executable_extensions; do
19497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19498    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19500    break 2
19501  fi
19502done
19503  done
19504IFS=$as_save_IFS
19505
19506  ;;
19507esac
19508fi
19509PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19510if test -n "$PKG_CONFIG"; then
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19512$as_echo "$PKG_CONFIG" >&6; }
19513else
19514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19515$as_echo "no" >&6; }
19516fi
19517
19518
19519fi
19520if test -z "$ac_cv_path_PKG_CONFIG"; then
19521  ac_pt_PKG_CONFIG=$PKG_CONFIG
19522  # Extract the first word of "pkg-config", so it can be a program name with args.
19523set dummy pkg-config; ac_word=$2
19524{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19525$as_echo_n "checking for $ac_word... " >&6; }
19526if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19527  $as_echo_n "(cached) " >&6
19528else
19529  case $ac_pt_PKG_CONFIG in
19530  [\\/]* | ?:[\\/]*)
19531  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19532  ;;
19533  *)
19534  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19535for as_dir in $PATH
19536do
19537  IFS=$as_save_IFS
19538  test -z "$as_dir" && as_dir=.
19539    for ac_exec_ext in '' $ac_executable_extensions; do
19540  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19541    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19542    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19543    break 2
19544  fi
19545done
19546  done
19547IFS=$as_save_IFS
19548
19549  ;;
19550esac
19551fi
19552ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19553if test -n "$ac_pt_PKG_CONFIG"; then
19554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19555$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19556else
19557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19558$as_echo "no" >&6; }
19559fi
19560
19561  if test "x$ac_pt_PKG_CONFIG" = x; then
19562    PKG_CONFIG=""
19563  else
19564    case $cross_compiling:$ac_tool_warned in
19565yes:)
19566{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19567$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19568ac_tool_warned=yes ;;
19569esac
19570    PKG_CONFIG=$ac_pt_PKG_CONFIG
19571  fi
19572else
19573  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19574fi
19575
19576fi
19577if test -n "$PKG_CONFIG"; then
19578	_pkg_min_version=0.9.0
19579	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19580$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19581	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19582		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19583$as_echo "yes" >&6; }
19584	else
19585		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19586$as_echo "no" >&6; }
19587		PKG_CONFIG=""
19588	fi
19589
19590fi
19591
19592# After basic tools have been setup, we can check build os specific details.
19593
19594  ###############################################################################
19595
19596  # Note that this is the build platform OS version!
19597
19598  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19599  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19600  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19601  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19602
19603
19604
19605
19606
19607# Setup builddeps, for automatic downloading of tools we need.
19608# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19609# boot-jdk setup, but we need to have basic tools setup first.
19610
19611
19612# Check whether --with-builddeps-conf was given.
19613if test "${with_builddeps_conf+set}" = set; then :
19614  withval=$with_builddeps_conf;
19615fi
19616
19617
19618
19619# Check whether --with-builddeps-server was given.
19620if test "${with_builddeps_server+set}" = set; then :
19621  withval=$with_builddeps_server;
19622fi
19623
19624
19625
19626# Check whether --with-builddeps-dir was given.
19627if test "${with_builddeps_dir+set}" = set; then :
19628  withval=$with_builddeps_dir;
19629else
19630  with_builddeps_dir=/localhome/builddeps
19631fi
19632
19633
19634
19635# Check whether --with-builddeps-group was given.
19636if test "${with_builddeps_group+set}" = set; then :
19637  withval=$with_builddeps_group;
19638fi
19639
19640
19641
19642
19643  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19644    if test "x$with_builddeps_conf" != x; then
19645      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19646$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19647      builddepsfile=$with_builddeps_conf
19648      if test -s $builddepsfile; then
19649        . $builddepsfile
19650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19651$as_echo "loaded!" >&6; }
19652      else
19653        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19654      fi
19655    else
19656      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19657$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19658      builddepsfile=`mktemp`
19659      touch $builddepsfile
19660      # Put all found confs into a single file.
19661      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19662      # Source the file to acquire the variables
19663      if test -s $builddepsfile; then
19664        . $builddepsfile
19665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19666$as_echo "found at least one!" >&6; }
19667      else
19668        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19669      fi
19670    fi
19671    # Create build and target names that use _ instead of "-" and ".".
19672    # This is necessary to use them in variable names.
19673    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19674    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19675    # Extract rewrite information for build and target
19676    eval rewritten_build=\${REWRITE_${build_var}}
19677    if test "x$rewritten_build" = x; then
19678      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19679      echo Build stays the same $rewritten_build
19680    else
19681      echo Rewriting build for builddeps into $rewritten_build
19682    fi
19683    eval rewritten_target=\${REWRITE_${target_var}}
19684    if test "x$rewritten_target" = x; then
19685      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19686      echo Target stays the same $rewritten_target
19687    else
19688      echo Rewriting target for builddeps into $rewritten_target
19689    fi
19690    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19691    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19692  fi
19693  for ac_prog in 7z unzip
19694do
19695  # Extract the first word of "$ac_prog", so it can be a program name with args.
19696set dummy $ac_prog; ac_word=$2
19697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19698$as_echo_n "checking for $ac_word... " >&6; }
19699if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19700  $as_echo_n "(cached) " >&6
19701else
19702  if test -n "$BDEPS_UNZIP"; then
19703  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19704else
19705as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19706for as_dir in $PATH
19707do
19708  IFS=$as_save_IFS
19709  test -z "$as_dir" && as_dir=.
19710    for ac_exec_ext in '' $ac_executable_extensions; do
19711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19712    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19714    break 2
19715  fi
19716done
19717  done
19718IFS=$as_save_IFS
19719
19720fi
19721fi
19722BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19723if test -n "$BDEPS_UNZIP"; then
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19725$as_echo "$BDEPS_UNZIP" >&6; }
19726else
19727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19728$as_echo "no" >&6; }
19729fi
19730
19731
19732  test -n "$BDEPS_UNZIP" && break
19733done
19734
19735  if test "x$BDEPS_UNZIP" = x7z; then
19736    BDEPS_UNZIP="7z x"
19737  fi
19738
19739  for ac_prog in wget lftp ftp
19740do
19741  # Extract the first word of "$ac_prog", so it can be a program name with args.
19742set dummy $ac_prog; ac_word=$2
19743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19744$as_echo_n "checking for $ac_word... " >&6; }
19745if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19746  $as_echo_n "(cached) " >&6
19747else
19748  if test -n "$BDEPS_FTP"; then
19749  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19750else
19751as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19752for as_dir in $PATH
19753do
19754  IFS=$as_save_IFS
19755  test -z "$as_dir" && as_dir=.
19756    for ac_exec_ext in '' $ac_executable_extensions; do
19757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19758    ac_cv_prog_BDEPS_FTP="$ac_prog"
19759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19760    break 2
19761  fi
19762done
19763  done
19764IFS=$as_save_IFS
19765
19766fi
19767fi
19768BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19769if test -n "$BDEPS_FTP"; then
19770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19771$as_echo "$BDEPS_FTP" >&6; }
19772else
19773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19774$as_echo "no" >&6; }
19775fi
19776
19777
19778  test -n "$BDEPS_FTP" && break
19779done
19780
19781
19782
19783###############################################################################
19784#
19785# Determine OpenJDK variants, options and version numbers.
19786#
19787###############################################################################
19788
19789# We need build & target for this.
19790
19791
19792  ###############################################################################
19793  #
19794  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19795  # We always build headless support.
19796  #
19797  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19798$as_echo_n "checking headful support... " >&6; }
19799  # Check whether --enable-headful was given.
19800if test "${enable_headful+set}" = set; then :
19801  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19802else
19803  SUPPORT_HEADFUL=yes
19804fi
19805
19806
19807  SUPPORT_HEADLESS=yes
19808  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19809
19810  if test "x$SUPPORT_HEADFUL" = xyes; then
19811    # We are building both headful and headless.
19812    headful_msg="include support for both headful and headless"
19813  fi
19814
19815  if test "x$SUPPORT_HEADFUL" = xno; then
19816    # Thus we are building headless only.
19817    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19818    headful_msg="headless only"
19819  fi
19820
19821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19822$as_echo "$headful_msg" >&6; }
19823
19824
19825
19826
19827
19828  # Control wether Hotspot runs Queens test after build.
19829  # Check whether --enable-hotspot-test-in-build was given.
19830if test "${enable_hotspot_test_in_build+set}" = set; then :
19831  enableval=$enable_hotspot_test_in_build;
19832else
19833  enable_hotspot_test_in_build=no
19834fi
19835
19836  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19837    TEST_IN_BUILD=true
19838  else
19839    TEST_IN_BUILD=false
19840  fi
19841
19842
19843  ###############################################################################
19844  #
19845  # Choose cacerts source file
19846  #
19847
19848# Check whether --with-cacerts-file was given.
19849if test "${with_cacerts_file+set}" = set; then :
19850  withval=$with_cacerts_file;
19851fi
19852
19853  if test "x$with_cacerts_file" != x; then
19854    CACERTS_FILE=$with_cacerts_file
19855  fi
19856
19857
19858  ###############################################################################
19859  #
19860  # Enable or disable unlimited crypto
19861  #
19862  # Check whether --enable-unlimited-crypto was given.
19863if test "${enable_unlimited_crypto+set}" = set; then :
19864  enableval=$enable_unlimited_crypto;
19865else
19866  enable_unlimited_crypto=no
19867fi
19868
19869  if test "x$enable_unlimited_crypto" = "xyes"; then
19870    UNLIMITED_CRYPTO=true
19871  else
19872    UNLIMITED_CRYPTO=false
19873  fi
19874
19875
19876  ###############################################################################
19877  #
19878  # Enable or disable the elliptic curve crypto implementation
19879  #
19880
19881
19882  ###############################################################################
19883  #
19884  # --enable-rmiconnector-iiop
19885  #
19886  # Check whether --enable-rmiconnector-iiop was given.
19887if test "${enable_rmiconnector_iiop+set}" = set; then :
19888  enableval=$enable_rmiconnector_iiop;
19889fi
19890
19891  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19892    RMICONNECTOR_IIOP=true
19893  else
19894    RMICONNECTOR_IIOP=false
19895  fi
19896
19897
19898  ###############################################################################
19899  #
19900  # Compress jars
19901  #
19902  COMPRESS_JARS=false
19903
19904
19905
19906
19907  # Source the version numbers
19908  . $AUTOCONF_DIR/version-numbers
19909
19910  # Get the settings from parameters
19911
19912# Check whether --with-milestone was given.
19913if test "${with_milestone+set}" = set; then :
19914  withval=$with_milestone;
19915fi
19916
19917  if test "x$with_milestone" = xyes; then
19918    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19919  elif test "x$with_milestone" != x; then
19920    MILESTONE="$with_milestone"
19921  fi
19922  if test "x$MILESTONE" = x; then
19923    MILESTONE=internal
19924  fi
19925
19926
19927# Check whether --with-update-version was given.
19928if test "${with_update_version+set}" = set; then :
19929  withval=$with_update_version;
19930fi
19931
19932  if test "x$with_update_version" = xyes; then
19933    as_fn_error $? "Update version must have a value" "$LINENO" 5
19934  elif test "x$with_update_version" != x; then
19935    JDK_UPDATE_VERSION="$with_update_version"
19936    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19937    # to a bug in expr (which reduces it to just X). To work around this, we
19938    # always add a 0 to one digit update versions.
19939    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19940      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19941    fi
19942  fi
19943
19944
19945# Check whether --with-user-release-suffix was given.
19946if test "${with_user_release_suffix+set}" = set; then :
19947  withval=$with_user_release_suffix;
19948fi
19949
19950  if test "x$with_user_release_suffix" = xyes; then
19951    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19952  elif test "x$with_user_release_suffix" != x; then
19953    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19954  fi
19955
19956
19957# Check whether --with-build-number was given.
19958if test "${with_build_number+set}" = set; then :
19959  withval=$with_build_number;
19960fi
19961
19962  if test "x$with_build_number" = xyes; then
19963    as_fn_error $? "Build number must have a value" "$LINENO" 5
19964  elif test "x$with_build_number" != x; then
19965    JDK_BUILD_NUMBER="$with_build_number"
19966  fi
19967  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19968  if test "x$JDK_BUILD_NUMBER" = x; then
19969    JDK_BUILD_NUMBER=b00
19970    if test "x$USER_RELEASE_SUFFIX" = x; then
19971      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19972      # Avoid [:alnum:] since it depends on the locale.
19973      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19974      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19975    fi
19976  fi
19977
19978  # Now set the JDK version, milestone, build number etc.
19979
19980
19981
19982
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995# Check whether --with-copyright-year was given.
19996if test "${with_copyright_year+set}" = set; then :
19997  withval=$with_copyright_year;
19998fi
19999
20000  if test "x$with_copyright_year" = xyes; then
20001    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20002  elif test "x$with_copyright_year" != x; then
20003    COPYRIGHT_YEAR="$with_copyright_year"
20004  else
20005    COPYRIGHT_YEAR=`date +'%Y'`
20006  fi
20007
20008
20009  if test "x$JDK_UPDATE_VERSION" != x; then
20010    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20011  else
20012    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20013  fi
20014
20015
20016  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20017
20018
20019
20020###############################################################################
20021#
20022# Setup BootJDK, used to bootstrap the build.
20023#
20024###############################################################################
20025
20026
20027  BOOT_JDK_FOUND=no
20028
20029# Check whether --with-boot-jdk was given.
20030if test "${with_boot_jdk+set}" = set; then :
20031  withval=$with_boot_jdk;
20032fi
20033
20034
20035  # We look for the Boot JDK through various means, going from more certain to
20036  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20037  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20038  # must check if this is indeed valid; otherwise we'll continue looking.
20039
20040  # Test: Is bootjdk explicitely set by command line arguments?
20041
20042  if test "x$BOOT_JDK_FOUND" = xno; then
20043    # Now execute the test
20044
20045  if test "x$with_boot_jdk" != x; then
20046    BOOT_JDK=$with_boot_jdk
20047    BOOT_JDK_FOUND=maybe
20048    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20049$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20050  fi
20051
20052
20053    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20054    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20055      # Do we have a bin/java?
20056      if test ! -x "$BOOT_JDK/bin/java"; then
20057        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20059        BOOT_JDK_FOUND=no
20060      else
20061        # Do we have a bin/javac?
20062        if test ! -x "$BOOT_JDK/bin/javac"; then
20063          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20065          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20066$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20067          BOOT_JDK_FOUND=no
20068        else
20069          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20070          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20071
20072          # Extra M4 quote needed to protect [] in grep expression.
20073          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20074          if test "x$FOUND_CORRECT_VERSION" = x; then
20075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20077            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20078$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20079            BOOT_JDK_FOUND=no
20080          else
20081            # We're done! :-)
20082            BOOT_JDK_FOUND=yes
20083
20084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20085
20086  # Input might be given as Windows format, start by converting to
20087  # unix format.
20088  path="$BOOT_JDK"
20089  new_path=`$CYGPATH -u "$path"`
20090
20091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20094  # "foo.exe" is OK but "foo" is an error.
20095  #
20096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20097  # It is also a way to make sure we got the proper file name for the real test later on.
20098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20099  if test "x$test_shortpath" = x; then
20100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20102    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20103  fi
20104
20105  # Call helper function which possibly converts this using DOS-style short mode.
20106  # If so, the updated path is stored in $new_path.
20107
20108  input_path="$new_path"
20109  # Check if we need to convert this using DOS-style short mode. If the path
20110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20111  # take no chances and rewrite it.
20112  # Note: m4 eats our [], so we need to use [ and ] instead.
20113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20114  if test "x$has_forbidden_chars" != x; then
20115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20119      # Going to short mode and back again did indeed matter. Since short mode is
20120      # case insensitive, let's make it lowercase to improve readability.
20121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20122      # Now convert it back to Unix-stile (cygpath)
20123      input_path=`$CYGPATH -u "$shortmode_path"`
20124      new_path="$input_path"
20125    fi
20126  fi
20127
20128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20129  if test "x$test_cygdrive_prefix" = x; then
20130    # As a simple fix, exclude /usr/bin since it's not a real path.
20131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20133      # a path prefixed by /cygdrive for fixpath to work.
20134      new_path="$CYGWIN_ROOT_PATH$input_path"
20135    fi
20136  fi
20137
20138
20139  if test "x$path" != "x$new_path"; then
20140    BOOT_JDK="$new_path"
20141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20142$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20143  fi
20144
20145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20146
20147  path="$BOOT_JDK"
20148  has_colon=`$ECHO $path | $GREP ^.:`
20149  new_path="$path"
20150  if test "x$has_colon" = x; then
20151    # Not in mixed or Windows style, start by that.
20152    new_path=`cmd //c echo $path`
20153  fi
20154
20155
20156  input_path="$new_path"
20157  # Check if we need to convert this using DOS-style short mode. If the path
20158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20159  # take no chances and rewrite it.
20160  # Note: m4 eats our [], so we need to use [ and ] instead.
20161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20162  if test "x$has_forbidden_chars" != x; then
20163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20165  fi
20166
20167
20168  windows_path="$new_path"
20169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20170    unix_path=`$CYGPATH -u "$windows_path"`
20171    new_path="$unix_path"
20172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20174    new_path="$unix_path"
20175  fi
20176
20177  if test "x$path" != "x$new_path"; then
20178    BOOT_JDK="$new_path"
20179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20180$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20181  fi
20182
20183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20185
20186  else
20187    # We're on a unix platform. Hooray! :)
20188    path="$BOOT_JDK"
20189    has_space=`$ECHO "$path" | $GREP " "`
20190    if test "x$has_space" != x; then
20191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20192$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20194    fi
20195
20196    # Use eval to expand a potential ~
20197    eval path="$path"
20198    if test ! -f "$path" && test ! -d "$path"; then
20199      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20200    fi
20201
20202    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20203  fi
20204
20205            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20206$as_echo_n "checking for Boot JDK... " >&6; }
20207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20208$as_echo "$BOOT_JDK" >&6; }
20209            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20210$as_echo_n "checking Boot JDK version... " >&6; }
20211            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20213$as_echo "$BOOT_JDK_VERSION" >&6; }
20214          fi # end check jdk version
20215        fi # end check javac
20216      fi # end check java
20217    fi # end check boot jdk found
20218  fi
20219
20220  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20221    # Having specified an argument which is incorrect will produce an instant failure;
20222    # we should not go on looking
20223    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20224  fi
20225
20226  # Test: Is bootjdk available from builddeps?
20227
20228  if test "x$BOOT_JDK_FOUND" = xno; then
20229    # Now execute the test
20230
20231
20232
20233  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20234    # Source the builddeps file again, to make sure it uses the latest variables!
20235    . $builddepsfile
20236    # Look for a target and build machine specific resource!
20237    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20238    if test "x$resource" = x; then
20239      # Ok, lets instead look for a target specific resource
20240      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20241    fi
20242    if test "x$resource" = x; then
20243      # Ok, lets instead look for a build specific resource
20244      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20245    fi
20246    if test "x$resource" = x; then
20247      # Ok, lets instead look for a generic resource
20248      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20249      resource=${builddep_bootjdk}
20250    fi
20251    if test "x$resource" != x; then
20252      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20253$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20254      # If the resource in the builddeps.conf file is an existing directory,
20255      # for example /java/linux/cups
20256      if test -d ${resource}; then
20257        depdir=${resource}
20258      else
20259
20260  # bootjdk is for example mymodule
20261  # $resource is for example libs/general/libmymod_1_2_3.zip
20262  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20263  # $with_builddeps_dir is for example /localhome/builddeps
20264  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20265  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20266  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20267  filename=`basename $resource`
20268  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20269  filebase=${filename%%.*}
20270  extension=${filename#*.}
20271  installdir=$with_builddeps_dir/$filebase
20272  if test ! -f $installdir/$filename.unpacked; then
20273    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20274$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20275    if test ! -d $installdir; then
20276      mkdir -p $installdir
20277    fi
20278    if test ! -d $installdir; then
20279      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20280    fi
20281    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20282    touch $tmpfile
20283    if test ! -f $tmpfile; then
20284      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20285    fi
20286
20287  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20288  # $tmpfile is the local file name for the downloaded file.
20289  VALID_TOOL=no
20290  if test "x$BDEPS_FTP" = xwget; then
20291    VALID_TOOL=yes
20292    wget -O $tmpfile $with_builddeps_server/$resource
20293  fi
20294  if test "x$BDEPS_FTP" = xlftp; then
20295    VALID_TOOL=yes
20296    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20297  fi
20298  if test "x$BDEPS_FTP" = xftp; then
20299    VALID_TOOL=yes
20300    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20301    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20302    FTPUSERPWD=${FTPSERVER%%@*}
20303    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20304      FTPUSER=${userpwd%%:*}
20305      FTPPWD=${userpwd#*@}
20306      FTPSERVER=${FTPSERVER#*@}
20307    else
20308      FTPUSER=ftp
20309      FTPPWD=ftp
20310    fi
20311    # the "pass" command does not work on some
20312    # ftp clients (read ftp.exe) but if it works,
20313    # passive mode is better!
20314    ( \
20315        echo "user $FTPUSER $FTPPWD"        ; \
20316        echo "pass"                         ; \
20317        echo "bin"                          ; \
20318        echo "get $FTPPATH $tmpfile"              ; \
20319    ) | ftp -in $FTPSERVER
20320  fi
20321  if test "x$VALID_TOOL" != xyes; then
20322    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20323  fi
20324
20325    mv $tmpfile $installdir/$filename
20326    if test ! -s $installdir/$filename; then
20327      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20328    fi
20329    case "$extension" in
20330      zip)  echo "Unzipping $installdir/$filename..."
20331        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20332        ;;
20333      tar.gz) echo "Untaring $installdir/$filename..."
20334        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20335        ;;
20336      tgz) echo "Untaring $installdir/$filename..."
20337        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20338        ;;
20339      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20340        ;;
20341    esac
20342  fi
20343  if test -f $installdir/$filename.unpacked; then
20344    depdir=$installdir
20345  fi
20346
20347      fi
20348      # Source the builddeps file again, because in the previous command, the depdir
20349      # was updated to point at the current build dependency install directory.
20350      . $builddepsfile
20351      # Now extract variables from the builddeps.conf files.
20352      theroot=${builddep_bootjdk_ROOT}
20353      thecflags=${builddep_bootjdk_CFLAGS}
20354      thelibs=${builddep_bootjdk_LIBS}
20355      if test "x$depdir" = x; then
20356        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20357      fi
20358      BOOT_JDK=$depdir
20359      if test "x$theroot" != x; then
20360        BOOT_JDK="$theroot"
20361      fi
20362      if test "x$thecflags" != x; then
20363        BOOT_JDK_CFLAGS="$thecflags"
20364      fi
20365      if test "x$thelibs" != x; then
20366        BOOT_JDK_LIBS="$thelibs"
20367      fi
20368      BOOT_JDK_FOUND=maybe
20369      else BOOT_JDK_FOUND=no
20370
20371    fi
20372    else BOOT_JDK_FOUND=no
20373
20374  fi
20375
20376
20377
20378    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20379    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20380      # Do we have a bin/java?
20381      if test ! -x "$BOOT_JDK/bin/java"; then
20382        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20384        BOOT_JDK_FOUND=no
20385      else
20386        # Do we have a bin/javac?
20387        if test ! -x "$BOOT_JDK/bin/javac"; then
20388          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20390          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20391$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20392          BOOT_JDK_FOUND=no
20393        else
20394          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20395          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20396
20397          # Extra M4 quote needed to protect [] in grep expression.
20398          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20399          if test "x$FOUND_CORRECT_VERSION" = x; then
20400            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20401$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20402            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20403$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20404            BOOT_JDK_FOUND=no
20405          else
20406            # We're done! :-)
20407            BOOT_JDK_FOUND=yes
20408
20409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20410
20411  # Input might be given as Windows format, start by converting to
20412  # unix format.
20413  path="$BOOT_JDK"
20414  new_path=`$CYGPATH -u "$path"`
20415
20416  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20417  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20418  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20419  # "foo.exe" is OK but "foo" is an error.
20420  #
20421  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20422  # It is also a way to make sure we got the proper file name for the real test later on.
20423  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20424  if test "x$test_shortpath" = x; then
20425    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20426$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20427    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20428  fi
20429
20430  # Call helper function which possibly converts this using DOS-style short mode.
20431  # If so, the updated path is stored in $new_path.
20432
20433  input_path="$new_path"
20434  # Check if we need to convert this using DOS-style short mode. If the path
20435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20436  # take no chances and rewrite it.
20437  # Note: m4 eats our [], so we need to use [ and ] instead.
20438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20439  if test "x$has_forbidden_chars" != x; then
20440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20441    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20442    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20443    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20444      # Going to short mode and back again did indeed matter. Since short mode is
20445      # case insensitive, let's make it lowercase to improve readability.
20446      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20447      # Now convert it back to Unix-stile (cygpath)
20448      input_path=`$CYGPATH -u "$shortmode_path"`
20449      new_path="$input_path"
20450    fi
20451  fi
20452
20453  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20454  if test "x$test_cygdrive_prefix" = x; then
20455    # As a simple fix, exclude /usr/bin since it's not a real path.
20456    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20457      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20458      # a path prefixed by /cygdrive for fixpath to work.
20459      new_path="$CYGWIN_ROOT_PATH$input_path"
20460    fi
20461  fi
20462
20463
20464  if test "x$path" != "x$new_path"; then
20465    BOOT_JDK="$new_path"
20466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20467$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20468  fi
20469
20470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20471
20472  path="$BOOT_JDK"
20473  has_colon=`$ECHO $path | $GREP ^.:`
20474  new_path="$path"
20475  if test "x$has_colon" = x; then
20476    # Not in mixed or Windows style, start by that.
20477    new_path=`cmd //c echo $path`
20478  fi
20479
20480
20481  input_path="$new_path"
20482  # Check if we need to convert this using DOS-style short mode. If the path
20483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20484  # take no chances and rewrite it.
20485  # Note: m4 eats our [], so we need to use [ and ] instead.
20486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20487  if test "x$has_forbidden_chars" != x; then
20488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20489    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20490  fi
20491
20492
20493  windows_path="$new_path"
20494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20495    unix_path=`$CYGPATH -u "$windows_path"`
20496    new_path="$unix_path"
20497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20499    new_path="$unix_path"
20500  fi
20501
20502  if test "x$path" != "x$new_path"; then
20503    BOOT_JDK="$new_path"
20504    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20505$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20506  fi
20507
20508  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20509  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20510
20511  else
20512    # We're on a unix platform. Hooray! :)
20513    path="$BOOT_JDK"
20514    has_space=`$ECHO "$path" | $GREP " "`
20515    if test "x$has_space" != x; then
20516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20517$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20518      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20519    fi
20520
20521    # Use eval to expand a potential ~
20522    eval path="$path"
20523    if test ! -f "$path" && test ! -d "$path"; then
20524      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20525    fi
20526
20527    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20528  fi
20529
20530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20531$as_echo_n "checking for Boot JDK... " >&6; }
20532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20533$as_echo "$BOOT_JDK" >&6; }
20534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20535$as_echo_n "checking Boot JDK version... " >&6; }
20536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20538$as_echo "$BOOT_JDK_VERSION" >&6; }
20539          fi # end check jdk version
20540        fi # end check javac
20541      fi # end check java
20542    fi # end check boot jdk found
20543  fi
20544
20545
20546  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20547
20548  if test "x$BOOT_JDK_FOUND" = xno; then
20549    # Now execute the test
20550
20551  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20552    # First check at user selected default
20553
20554  if test "x$BOOT_JDK_FOUND" = xno; then
20555    # Now execute the test
20556
20557  if test -x /usr/libexec/java_home; then
20558    BOOT_JDK=`/usr/libexec/java_home `
20559    BOOT_JDK_FOUND=maybe
20560    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20561$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20562  fi
20563
20564
20565    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20566    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20567      # Do we have a bin/java?
20568      if test ! -x "$BOOT_JDK/bin/java"; then
20569        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20570$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20571        BOOT_JDK_FOUND=no
20572      else
20573        # Do we have a bin/javac?
20574        if test ! -x "$BOOT_JDK/bin/javac"; then
20575          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20576$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20577          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20578$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20579          BOOT_JDK_FOUND=no
20580        else
20581          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20582          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20583
20584          # Extra M4 quote needed to protect [] in grep expression.
20585          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20586          if test "x$FOUND_CORRECT_VERSION" = x; then
20587            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20589            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20590$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20591            BOOT_JDK_FOUND=no
20592          else
20593            # We're done! :-)
20594            BOOT_JDK_FOUND=yes
20595
20596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20597
20598  # Input might be given as Windows format, start by converting to
20599  # unix format.
20600  path="$BOOT_JDK"
20601  new_path=`$CYGPATH -u "$path"`
20602
20603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20606  # "foo.exe" is OK but "foo" is an error.
20607  #
20608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20609  # It is also a way to make sure we got the proper file name for the real test later on.
20610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20611  if test "x$test_shortpath" = x; then
20612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20613$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20614    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20615  fi
20616
20617  # Call helper function which possibly converts this using DOS-style short mode.
20618  # If so, the updated path is stored in $new_path.
20619
20620  input_path="$new_path"
20621  # Check if we need to convert this using DOS-style short mode. If the path
20622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20623  # take no chances and rewrite it.
20624  # Note: m4 eats our [], so we need to use [ and ] instead.
20625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20626  if test "x$has_forbidden_chars" != x; then
20627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20631      # Going to short mode and back again did indeed matter. Since short mode is
20632      # case insensitive, let's make it lowercase to improve readability.
20633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20634      # Now convert it back to Unix-stile (cygpath)
20635      input_path=`$CYGPATH -u "$shortmode_path"`
20636      new_path="$input_path"
20637    fi
20638  fi
20639
20640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20641  if test "x$test_cygdrive_prefix" = x; then
20642    # As a simple fix, exclude /usr/bin since it's not a real path.
20643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20645      # a path prefixed by /cygdrive for fixpath to work.
20646      new_path="$CYGWIN_ROOT_PATH$input_path"
20647    fi
20648  fi
20649
20650
20651  if test "x$path" != "x$new_path"; then
20652    BOOT_JDK="$new_path"
20653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20655  fi
20656
20657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20658
20659  path="$BOOT_JDK"
20660  has_colon=`$ECHO $path | $GREP ^.:`
20661  new_path="$path"
20662  if test "x$has_colon" = x; then
20663    # Not in mixed or Windows style, start by that.
20664    new_path=`cmd //c echo $path`
20665  fi
20666
20667
20668  input_path="$new_path"
20669  # Check if we need to convert this using DOS-style short mode. If the path
20670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20671  # take no chances and rewrite it.
20672  # Note: m4 eats our [], so we need to use [ and ] instead.
20673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20674  if test "x$has_forbidden_chars" != x; then
20675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20677  fi
20678
20679
20680  windows_path="$new_path"
20681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20682    unix_path=`$CYGPATH -u "$windows_path"`
20683    new_path="$unix_path"
20684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20686    new_path="$unix_path"
20687  fi
20688
20689  if test "x$path" != "x$new_path"; then
20690    BOOT_JDK="$new_path"
20691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20692$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20693  fi
20694
20695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20697
20698  else
20699    # We're on a unix platform. Hooray! :)
20700    path="$BOOT_JDK"
20701    has_space=`$ECHO "$path" | $GREP " "`
20702    if test "x$has_space" != x; then
20703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20705      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20706    fi
20707
20708    # Use eval to expand a potential ~
20709    eval path="$path"
20710    if test ! -f "$path" && test ! -d "$path"; then
20711      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20712    fi
20713
20714    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20715  fi
20716
20717            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20718$as_echo_n "checking for Boot JDK... " >&6; }
20719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20720$as_echo "$BOOT_JDK" >&6; }
20721            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20722$as_echo_n "checking Boot JDK version... " >&6; }
20723            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20725$as_echo "$BOOT_JDK_VERSION" >&6; }
20726          fi # end check jdk version
20727        fi # end check javac
20728      fi # end check java
20729    fi # end check boot jdk found
20730  fi
20731
20732    # If that did not work out (e.g. too old), try explicit versions instead
20733
20734  if test "x$BOOT_JDK_FOUND" = xno; then
20735    # Now execute the test
20736
20737  if test -x /usr/libexec/java_home; then
20738    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20739    BOOT_JDK_FOUND=maybe
20740    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20741$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20742  fi
20743
20744
20745    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20746    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20747      # Do we have a bin/java?
20748      if test ! -x "$BOOT_JDK/bin/java"; then
20749        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20751        BOOT_JDK_FOUND=no
20752      else
20753        # Do we have a bin/javac?
20754        if test ! -x "$BOOT_JDK/bin/javac"; then
20755          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20757          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20758$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20759          BOOT_JDK_FOUND=no
20760        else
20761          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20762          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20763
20764          # Extra M4 quote needed to protect [] in grep expression.
20765          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20766          if test "x$FOUND_CORRECT_VERSION" = x; then
20767            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20769            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20770$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20771            BOOT_JDK_FOUND=no
20772          else
20773            # We're done! :-)
20774            BOOT_JDK_FOUND=yes
20775
20776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20777
20778  # Input might be given as Windows format, start by converting to
20779  # unix format.
20780  path="$BOOT_JDK"
20781  new_path=`$CYGPATH -u "$path"`
20782
20783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20786  # "foo.exe" is OK but "foo" is an error.
20787  #
20788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20789  # It is also a way to make sure we got the proper file name for the real test later on.
20790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20791  if test "x$test_shortpath" = x; then
20792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20795  fi
20796
20797  # Call helper function which possibly converts this using DOS-style short mode.
20798  # If so, the updated path is stored in $new_path.
20799
20800  input_path="$new_path"
20801  # Check if we need to convert this using DOS-style short mode. If the path
20802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20803  # take no chances and rewrite it.
20804  # Note: m4 eats our [], so we need to use [ and ] instead.
20805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20806  if test "x$has_forbidden_chars" != x; then
20807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20811      # Going to short mode and back again did indeed matter. Since short mode is
20812      # case insensitive, let's make it lowercase to improve readability.
20813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20814      # Now convert it back to Unix-stile (cygpath)
20815      input_path=`$CYGPATH -u "$shortmode_path"`
20816      new_path="$input_path"
20817    fi
20818  fi
20819
20820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20821  if test "x$test_cygdrive_prefix" = x; then
20822    # As a simple fix, exclude /usr/bin since it's not a real path.
20823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20825      # a path prefixed by /cygdrive for fixpath to work.
20826      new_path="$CYGWIN_ROOT_PATH$input_path"
20827    fi
20828  fi
20829
20830
20831  if test "x$path" != "x$new_path"; then
20832    BOOT_JDK="$new_path"
20833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20835  fi
20836
20837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20838
20839  path="$BOOT_JDK"
20840  has_colon=`$ECHO $path | $GREP ^.:`
20841  new_path="$path"
20842  if test "x$has_colon" = x; then
20843    # Not in mixed or Windows style, start by that.
20844    new_path=`cmd //c echo $path`
20845  fi
20846
20847
20848  input_path="$new_path"
20849  # Check if we need to convert this using DOS-style short mode. If the path
20850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20851  # take no chances and rewrite it.
20852  # Note: m4 eats our [], so we need to use [ and ] instead.
20853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20854  if test "x$has_forbidden_chars" != x; then
20855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20857  fi
20858
20859
20860  windows_path="$new_path"
20861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20862    unix_path=`$CYGPATH -u "$windows_path"`
20863    new_path="$unix_path"
20864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20866    new_path="$unix_path"
20867  fi
20868
20869  if test "x$path" != "x$new_path"; then
20870    BOOT_JDK="$new_path"
20871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20873  fi
20874
20875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20877
20878  else
20879    # We're on a unix platform. Hooray! :)
20880    path="$BOOT_JDK"
20881    has_space=`$ECHO "$path" | $GREP " "`
20882    if test "x$has_space" != x; then
20883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20885      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20886    fi
20887
20888    # Use eval to expand a potential ~
20889    eval path="$path"
20890    if test ! -f "$path" && test ! -d "$path"; then
20891      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20892    fi
20893
20894    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20895  fi
20896
20897            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20898$as_echo_n "checking for Boot JDK... " >&6; }
20899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20900$as_echo "$BOOT_JDK" >&6; }
20901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20902$as_echo_n "checking Boot JDK version... " >&6; }
20903            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20904            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20905$as_echo "$BOOT_JDK_VERSION" >&6; }
20906          fi # end check jdk version
20907        fi # end check javac
20908      fi # end check java
20909    fi # end check boot jdk found
20910  fi
20911
20912
20913  if test "x$BOOT_JDK_FOUND" = xno; then
20914    # Now execute the test
20915
20916  if test -x /usr/libexec/java_home; then
20917    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20918    BOOT_JDK_FOUND=maybe
20919    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20920$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20921  fi
20922
20923
20924    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20925    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20926      # Do we have a bin/java?
20927      if test ! -x "$BOOT_JDK/bin/java"; then
20928        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20929$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20930        BOOT_JDK_FOUND=no
20931      else
20932        # Do we have a bin/javac?
20933        if test ! -x "$BOOT_JDK/bin/javac"; then
20934          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20935$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20936          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20937$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20938          BOOT_JDK_FOUND=no
20939        else
20940          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20941          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20942
20943          # Extra M4 quote needed to protect [] in grep expression.
20944          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20945          if test "x$FOUND_CORRECT_VERSION" = x; then
20946            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20948            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20949$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20950            BOOT_JDK_FOUND=no
20951          else
20952            # We're done! :-)
20953            BOOT_JDK_FOUND=yes
20954
20955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20956
20957  # Input might be given as Windows format, start by converting to
20958  # unix format.
20959  path="$BOOT_JDK"
20960  new_path=`$CYGPATH -u "$path"`
20961
20962  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20963  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20964  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20965  # "foo.exe" is OK but "foo" is an error.
20966  #
20967  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20968  # It is also a way to make sure we got the proper file name for the real test later on.
20969  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20970  if test "x$test_shortpath" = x; then
20971    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20972$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20973    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20974  fi
20975
20976  # Call helper function which possibly converts this using DOS-style short mode.
20977  # If so, the updated path is stored in $new_path.
20978
20979  input_path="$new_path"
20980  # Check if we need to convert this using DOS-style short mode. If the path
20981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20982  # take no chances and rewrite it.
20983  # Note: m4 eats our [], so we need to use [ and ] instead.
20984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20985  if test "x$has_forbidden_chars" != x; then
20986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20987    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20988    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20989    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20990      # Going to short mode and back again did indeed matter. Since short mode is
20991      # case insensitive, let's make it lowercase to improve readability.
20992      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20993      # Now convert it back to Unix-stile (cygpath)
20994      input_path=`$CYGPATH -u "$shortmode_path"`
20995      new_path="$input_path"
20996    fi
20997  fi
20998
20999  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21000  if test "x$test_cygdrive_prefix" = x; then
21001    # As a simple fix, exclude /usr/bin since it's not a real path.
21002    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21003      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21004      # a path prefixed by /cygdrive for fixpath to work.
21005      new_path="$CYGWIN_ROOT_PATH$input_path"
21006    fi
21007  fi
21008
21009
21010  if test "x$path" != "x$new_path"; then
21011    BOOT_JDK="$new_path"
21012    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21013$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21014  fi
21015
21016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21017
21018  path="$BOOT_JDK"
21019  has_colon=`$ECHO $path | $GREP ^.:`
21020  new_path="$path"
21021  if test "x$has_colon" = x; then
21022    # Not in mixed or Windows style, start by that.
21023    new_path=`cmd //c echo $path`
21024  fi
21025
21026
21027  input_path="$new_path"
21028  # Check if we need to convert this using DOS-style short mode. If the path
21029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21030  # take no chances and rewrite it.
21031  # Note: m4 eats our [], so we need to use [ and ] instead.
21032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21033  if test "x$has_forbidden_chars" != x; then
21034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21035    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21036  fi
21037
21038
21039  windows_path="$new_path"
21040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21041    unix_path=`$CYGPATH -u "$windows_path"`
21042    new_path="$unix_path"
21043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21045    new_path="$unix_path"
21046  fi
21047
21048  if test "x$path" != "x$new_path"; then
21049    BOOT_JDK="$new_path"
21050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21052  fi
21053
21054  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21055  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21056
21057  else
21058    # We're on a unix platform. Hooray! :)
21059    path="$BOOT_JDK"
21060    has_space=`$ECHO "$path" | $GREP " "`
21061    if test "x$has_space" != x; then
21062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21063$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21064      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21065    fi
21066
21067    # Use eval to expand a potential ~
21068    eval path="$path"
21069    if test ! -f "$path" && test ! -d "$path"; then
21070      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21071    fi
21072
21073    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21074  fi
21075
21076            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21077$as_echo_n "checking for Boot JDK... " >&6; }
21078            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21079$as_echo "$BOOT_JDK" >&6; }
21080            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21081$as_echo_n "checking Boot JDK version... " >&6; }
21082            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21083            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21084$as_echo "$BOOT_JDK_VERSION" >&6; }
21085          fi # end check jdk version
21086        fi # end check javac
21087      fi # end check java
21088    fi # end check boot jdk found
21089  fi
21090
21091
21092  if test "x$BOOT_JDK_FOUND" = xno; then
21093    # Now execute the test
21094
21095  if test -x /usr/libexec/java_home; then
21096    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21097    BOOT_JDK_FOUND=maybe
21098    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21099$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21100  fi
21101
21102
21103    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21104    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21105      # Do we have a bin/java?
21106      if test ! -x "$BOOT_JDK/bin/java"; then
21107        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21109        BOOT_JDK_FOUND=no
21110      else
21111        # Do we have a bin/javac?
21112        if test ! -x "$BOOT_JDK/bin/javac"; then
21113          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21114$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21115          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21116$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21117          BOOT_JDK_FOUND=no
21118        else
21119          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21120          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21121
21122          # Extra M4 quote needed to protect [] in grep expression.
21123          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21124          if test "x$FOUND_CORRECT_VERSION" = x; then
21125            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21127            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21128$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21129            BOOT_JDK_FOUND=no
21130          else
21131            # We're done! :-)
21132            BOOT_JDK_FOUND=yes
21133
21134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21135
21136  # Input might be given as Windows format, start by converting to
21137  # unix format.
21138  path="$BOOT_JDK"
21139  new_path=`$CYGPATH -u "$path"`
21140
21141  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21142  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21143  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21144  # "foo.exe" is OK but "foo" is an error.
21145  #
21146  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21147  # It is also a way to make sure we got the proper file name for the real test later on.
21148  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21149  if test "x$test_shortpath" = x; then
21150    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21152    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21153  fi
21154
21155  # Call helper function which possibly converts this using DOS-style short mode.
21156  # If so, the updated path is stored in $new_path.
21157
21158  input_path="$new_path"
21159  # Check if we need to convert this using DOS-style short mode. If the path
21160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21161  # take no chances and rewrite it.
21162  # Note: m4 eats our [], so we need to use [ and ] instead.
21163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21164  if test "x$has_forbidden_chars" != x; then
21165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21166    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21167    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21168    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21169      # Going to short mode and back again did indeed matter. Since short mode is
21170      # case insensitive, let's make it lowercase to improve readability.
21171      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21172      # Now convert it back to Unix-stile (cygpath)
21173      input_path=`$CYGPATH -u "$shortmode_path"`
21174      new_path="$input_path"
21175    fi
21176  fi
21177
21178  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21179  if test "x$test_cygdrive_prefix" = x; then
21180    # As a simple fix, exclude /usr/bin since it's not a real path.
21181    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21182      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21183      # a path prefixed by /cygdrive for fixpath to work.
21184      new_path="$CYGWIN_ROOT_PATH$input_path"
21185    fi
21186  fi
21187
21188
21189  if test "x$path" != "x$new_path"; then
21190    BOOT_JDK="$new_path"
21191    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21192$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21193  fi
21194
21195  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21196
21197  path="$BOOT_JDK"
21198  has_colon=`$ECHO $path | $GREP ^.:`
21199  new_path="$path"
21200  if test "x$has_colon" = x; then
21201    # Not in mixed or Windows style, start by that.
21202    new_path=`cmd //c echo $path`
21203  fi
21204
21205
21206  input_path="$new_path"
21207  # Check if we need to convert this using DOS-style short mode. If the path
21208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21209  # take no chances and rewrite it.
21210  # Note: m4 eats our [], so we need to use [ and ] instead.
21211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21212  if test "x$has_forbidden_chars" != x; then
21213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21214    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21215  fi
21216
21217
21218  windows_path="$new_path"
21219  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21220    unix_path=`$CYGPATH -u "$windows_path"`
21221    new_path="$unix_path"
21222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21223    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21224    new_path="$unix_path"
21225  fi
21226
21227  if test "x$path" != "x$new_path"; then
21228    BOOT_JDK="$new_path"
21229    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21230$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21231  fi
21232
21233  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21234  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21235
21236  else
21237    # We're on a unix platform. Hooray! :)
21238    path="$BOOT_JDK"
21239    has_space=`$ECHO "$path" | $GREP " "`
21240    if test "x$has_space" != x; then
21241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21242$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21243      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21244    fi
21245
21246    # Use eval to expand a potential ~
21247    eval path="$path"
21248    if test ! -f "$path" && test ! -d "$path"; then
21249      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21250    fi
21251
21252    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21253  fi
21254
21255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21256$as_echo_n "checking for Boot JDK... " >&6; }
21257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21258$as_echo "$BOOT_JDK" >&6; }
21259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21260$as_echo_n "checking Boot JDK version... " >&6; }
21261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21263$as_echo "$BOOT_JDK_VERSION" >&6; }
21264          fi # end check jdk version
21265        fi # end check javac
21266      fi # end check java
21267    fi # end check boot jdk found
21268  fi
21269
21270  fi
21271
21272
21273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21275      # Do we have a bin/java?
21276      if test ! -x "$BOOT_JDK/bin/java"; then
21277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21279        BOOT_JDK_FOUND=no
21280      else
21281        # Do we have a bin/javac?
21282        if test ! -x "$BOOT_JDK/bin/javac"; then
21283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21287          BOOT_JDK_FOUND=no
21288        else
21289          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21290          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21291
21292          # Extra M4 quote needed to protect [] in grep expression.
21293          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21294          if test "x$FOUND_CORRECT_VERSION" = x; then
21295            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21297            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21298$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21299            BOOT_JDK_FOUND=no
21300          else
21301            # We're done! :-)
21302            BOOT_JDK_FOUND=yes
21303
21304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21305
21306  # Input might be given as Windows format, start by converting to
21307  # unix format.
21308  path="$BOOT_JDK"
21309  new_path=`$CYGPATH -u "$path"`
21310
21311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21314  # "foo.exe" is OK but "foo" is an error.
21315  #
21316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21317  # It is also a way to make sure we got the proper file name for the real test later on.
21318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21319  if test "x$test_shortpath" = x; then
21320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21322    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21323  fi
21324
21325  # Call helper function which possibly converts this using DOS-style short mode.
21326  # If so, the updated path is stored in $new_path.
21327
21328  input_path="$new_path"
21329  # Check if we need to convert this using DOS-style short mode. If the path
21330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21331  # take no chances and rewrite it.
21332  # Note: m4 eats our [], so we need to use [ and ] instead.
21333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21334  if test "x$has_forbidden_chars" != x; then
21335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21339      # Going to short mode and back again did indeed matter. Since short mode is
21340      # case insensitive, let's make it lowercase to improve readability.
21341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21342      # Now convert it back to Unix-stile (cygpath)
21343      input_path=`$CYGPATH -u "$shortmode_path"`
21344      new_path="$input_path"
21345    fi
21346  fi
21347
21348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21349  if test "x$test_cygdrive_prefix" = x; then
21350    # As a simple fix, exclude /usr/bin since it's not a real path.
21351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21353      # a path prefixed by /cygdrive for fixpath to work.
21354      new_path="$CYGWIN_ROOT_PATH$input_path"
21355    fi
21356  fi
21357
21358
21359  if test "x$path" != "x$new_path"; then
21360    BOOT_JDK="$new_path"
21361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21363  fi
21364
21365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21366
21367  path="$BOOT_JDK"
21368  has_colon=`$ECHO $path | $GREP ^.:`
21369  new_path="$path"
21370  if test "x$has_colon" = x; then
21371    # Not in mixed or Windows style, start by that.
21372    new_path=`cmd //c echo $path`
21373  fi
21374
21375
21376  input_path="$new_path"
21377  # Check if we need to convert this using DOS-style short mode. If the path
21378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21379  # take no chances and rewrite it.
21380  # Note: m4 eats our [], so we need to use [ and ] instead.
21381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21382  if test "x$has_forbidden_chars" != x; then
21383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21385  fi
21386
21387
21388  windows_path="$new_path"
21389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21390    unix_path=`$CYGPATH -u "$windows_path"`
21391    new_path="$unix_path"
21392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21394    new_path="$unix_path"
21395  fi
21396
21397  if test "x$path" != "x$new_path"; then
21398    BOOT_JDK="$new_path"
21399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21401  fi
21402
21403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21405
21406  else
21407    # We're on a unix platform. Hooray! :)
21408    path="$BOOT_JDK"
21409    has_space=`$ECHO "$path" | $GREP " "`
21410    if test "x$has_space" != x; then
21411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21413      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21414    fi
21415
21416    # Use eval to expand a potential ~
21417    eval path="$path"
21418    if test ! -f "$path" && test ! -d "$path"; then
21419      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21420    fi
21421
21422    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21423  fi
21424
21425            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21426$as_echo_n "checking for Boot JDK... " >&6; }
21427            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21428$as_echo "$BOOT_JDK" >&6; }
21429            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21430$as_echo_n "checking Boot JDK version... " >&6; }
21431            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21432            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21433$as_echo "$BOOT_JDK_VERSION" >&6; }
21434          fi # end check jdk version
21435        fi # end check javac
21436      fi # end check java
21437    fi # end check boot jdk found
21438  fi
21439
21440
21441  # Test: Is $JAVA_HOME set?
21442
21443  if test "x$BOOT_JDK_FOUND" = xno; then
21444    # Now execute the test
21445
21446  if test "x$JAVA_HOME" != x; then
21447    JAVA_HOME_PROCESSED="$JAVA_HOME"
21448
21449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21450
21451  # Input might be given as Windows format, start by converting to
21452  # unix format.
21453  path="$JAVA_HOME_PROCESSED"
21454  new_path=`$CYGPATH -u "$path"`
21455
21456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21459  # "foo.exe" is OK but "foo" is an error.
21460  #
21461  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21462  # It is also a way to make sure we got the proper file name for the real test later on.
21463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21464  if test "x$test_shortpath" = x; then
21465    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21466$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21467    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21468  fi
21469
21470  # Call helper function which possibly converts this using DOS-style short mode.
21471  # If so, the updated path is stored in $new_path.
21472
21473  input_path="$new_path"
21474  # Check if we need to convert this using DOS-style short mode. If the path
21475  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21476  # take no chances and rewrite it.
21477  # Note: m4 eats our [], so we need to use [ and ] instead.
21478  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21479  if test "x$has_forbidden_chars" != x; then
21480    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21481    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21482    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21483    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21484      # Going to short mode and back again did indeed matter. Since short mode is
21485      # case insensitive, let's make it lowercase to improve readability.
21486      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21487      # Now convert it back to Unix-stile (cygpath)
21488      input_path=`$CYGPATH -u "$shortmode_path"`
21489      new_path="$input_path"
21490    fi
21491  fi
21492
21493  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21494  if test "x$test_cygdrive_prefix" = x; then
21495    # As a simple fix, exclude /usr/bin since it's not a real path.
21496    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21497      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21498      # a path prefixed by /cygdrive for fixpath to work.
21499      new_path="$CYGWIN_ROOT_PATH$input_path"
21500    fi
21501  fi
21502
21503
21504  if test "x$path" != "x$new_path"; then
21505    JAVA_HOME_PROCESSED="$new_path"
21506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21507$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21508  fi
21509
21510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21511
21512  path="$JAVA_HOME_PROCESSED"
21513  has_colon=`$ECHO $path | $GREP ^.:`
21514  new_path="$path"
21515  if test "x$has_colon" = x; then
21516    # Not in mixed or Windows style, start by that.
21517    new_path=`cmd //c echo $path`
21518  fi
21519
21520
21521  input_path="$new_path"
21522  # Check if we need to convert this using DOS-style short mode. If the path
21523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21524  # take no chances and rewrite it.
21525  # Note: m4 eats our [], so we need to use [ and ] instead.
21526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21527  if test "x$has_forbidden_chars" != x; then
21528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21530  fi
21531
21532
21533  windows_path="$new_path"
21534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21535    unix_path=`$CYGPATH -u "$windows_path"`
21536    new_path="$unix_path"
21537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21539    new_path="$unix_path"
21540  fi
21541
21542  if test "x$path" != "x$new_path"; then
21543    JAVA_HOME_PROCESSED="$new_path"
21544    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21545$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21546  fi
21547
21548  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21549  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21550
21551  else
21552    # We're on a unix platform. Hooray! :)
21553    path="$JAVA_HOME_PROCESSED"
21554    has_space=`$ECHO "$path" | $GREP " "`
21555    if test "x$has_space" != x; then
21556      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21557$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21558      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21559    fi
21560
21561    # Use eval to expand a potential ~
21562    eval path="$path"
21563    if test ! -f "$path" && test ! -d "$path"; then
21564      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21565    fi
21566
21567    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21568  fi
21569
21570    if test ! -d "$JAVA_HOME_PROCESSED"; then
21571      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21572$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21573    else
21574      # Aha, the user has set a JAVA_HOME
21575      # let us use that as the Boot JDK.
21576      BOOT_JDK="$JAVA_HOME_PROCESSED"
21577      BOOT_JDK_FOUND=maybe
21578      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21579$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21580    fi
21581  fi
21582
21583
21584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21586      # Do we have a bin/java?
21587      if test ! -x "$BOOT_JDK/bin/java"; then
21588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21590        BOOT_JDK_FOUND=no
21591      else
21592        # Do we have a bin/javac?
21593        if test ! -x "$BOOT_JDK/bin/javac"; then
21594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21598          BOOT_JDK_FOUND=no
21599        else
21600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21602
21603          # Extra M4 quote needed to protect [] in grep expression.
21604          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21605          if test "x$FOUND_CORRECT_VERSION" = x; then
21606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21610            BOOT_JDK_FOUND=no
21611          else
21612            # We're done! :-)
21613            BOOT_JDK_FOUND=yes
21614
21615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21616
21617  # Input might be given as Windows format, start by converting to
21618  # unix format.
21619  path="$BOOT_JDK"
21620  new_path=`$CYGPATH -u "$path"`
21621
21622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21625  # "foo.exe" is OK but "foo" is an error.
21626  #
21627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21628  # It is also a way to make sure we got the proper file name for the real test later on.
21629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21630  if test "x$test_shortpath" = x; then
21631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21633    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21634  fi
21635
21636  # Call helper function which possibly converts this using DOS-style short mode.
21637  # If so, the updated path is stored in $new_path.
21638
21639  input_path="$new_path"
21640  # Check if we need to convert this using DOS-style short mode. If the path
21641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21642  # take no chances and rewrite it.
21643  # Note: m4 eats our [], so we need to use [ and ] instead.
21644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21645  if test "x$has_forbidden_chars" != x; then
21646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21650      # Going to short mode and back again did indeed matter. Since short mode is
21651      # case insensitive, let's make it lowercase to improve readability.
21652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21653      # Now convert it back to Unix-stile (cygpath)
21654      input_path=`$CYGPATH -u "$shortmode_path"`
21655      new_path="$input_path"
21656    fi
21657  fi
21658
21659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21660  if test "x$test_cygdrive_prefix" = x; then
21661    # As a simple fix, exclude /usr/bin since it's not a real path.
21662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21664      # a path prefixed by /cygdrive for fixpath to work.
21665      new_path="$CYGWIN_ROOT_PATH$input_path"
21666    fi
21667  fi
21668
21669
21670  if test "x$path" != "x$new_path"; then
21671    BOOT_JDK="$new_path"
21672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21674  fi
21675
21676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21677
21678  path="$BOOT_JDK"
21679  has_colon=`$ECHO $path | $GREP ^.:`
21680  new_path="$path"
21681  if test "x$has_colon" = x; then
21682    # Not in mixed or Windows style, start by that.
21683    new_path=`cmd //c echo $path`
21684  fi
21685
21686
21687  input_path="$new_path"
21688  # Check if we need to convert this using DOS-style short mode. If the path
21689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21690  # take no chances and rewrite it.
21691  # Note: m4 eats our [], so we need to use [ and ] instead.
21692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21693  if test "x$has_forbidden_chars" != x; then
21694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21696  fi
21697
21698
21699  windows_path="$new_path"
21700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21701    unix_path=`$CYGPATH -u "$windows_path"`
21702    new_path="$unix_path"
21703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21705    new_path="$unix_path"
21706  fi
21707
21708  if test "x$path" != "x$new_path"; then
21709    BOOT_JDK="$new_path"
21710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21712  fi
21713
21714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21716
21717  else
21718    # We're on a unix platform. Hooray! :)
21719    path="$BOOT_JDK"
21720    has_space=`$ECHO "$path" | $GREP " "`
21721    if test "x$has_space" != x; then
21722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21724      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21725    fi
21726
21727    # Use eval to expand a potential ~
21728    eval path="$path"
21729    if test ! -f "$path" && test ! -d "$path"; then
21730      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21731    fi
21732
21733    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21734  fi
21735
21736            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21737$as_echo_n "checking for Boot JDK... " >&6; }
21738            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21739$as_echo "$BOOT_JDK" >&6; }
21740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21741$as_echo_n "checking Boot JDK version... " >&6; }
21742            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21743            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21744$as_echo "$BOOT_JDK_VERSION" >&6; }
21745          fi # end check jdk version
21746        fi # end check javac
21747      fi # end check java
21748    fi # end check boot jdk found
21749  fi
21750
21751
21752  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21753
21754  if test "x$BOOT_JDK_FOUND" = xno; then
21755    # Now execute the test
21756
21757  # Extract the first word of "javac", so it can be a program name with args.
21758set dummy javac; ac_word=$2
21759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21760$as_echo_n "checking for $ac_word... " >&6; }
21761if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21762  $as_echo_n "(cached) " >&6
21763else
21764  case $JAVAC_CHECK in
21765  [\\/]* | ?:[\\/]*)
21766  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21767  ;;
21768  *)
21769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21770for as_dir in $PATH
21771do
21772  IFS=$as_save_IFS
21773  test -z "$as_dir" && as_dir=.
21774    for ac_exec_ext in '' $ac_executable_extensions; do
21775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21776    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21778    break 2
21779  fi
21780done
21781  done
21782IFS=$as_save_IFS
21783
21784  ;;
21785esac
21786fi
21787JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21788if test -n "$JAVAC_CHECK"; then
21789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21790$as_echo "$JAVAC_CHECK" >&6; }
21791else
21792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21793$as_echo "no" >&6; }
21794fi
21795
21796
21797  # Extract the first word of "java", so it can be a program name with args.
21798set dummy java; ac_word=$2
21799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21800$as_echo_n "checking for $ac_word... " >&6; }
21801if ${ac_cv_path_JAVA_CHECK+:} false; then :
21802  $as_echo_n "(cached) " >&6
21803else
21804  case $JAVA_CHECK in
21805  [\\/]* | ?:[\\/]*)
21806  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21807  ;;
21808  *)
21809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21810for as_dir in $PATH
21811do
21812  IFS=$as_save_IFS
21813  test -z "$as_dir" && as_dir=.
21814    for ac_exec_ext in '' $ac_executable_extensions; do
21815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21816    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21818    break 2
21819  fi
21820done
21821  done
21822IFS=$as_save_IFS
21823
21824  ;;
21825esac
21826fi
21827JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21828if test -n "$JAVA_CHECK"; then
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21830$as_echo "$JAVA_CHECK" >&6; }
21831else
21832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21833$as_echo "no" >&6; }
21834fi
21835
21836
21837  BINARY="$JAVAC_CHECK"
21838  if test "x$JAVAC_CHECK" = x; then
21839    BINARY="$JAVA_CHECK"
21840  fi
21841  if test "x$BINARY" != x; then
21842    # So there is a java(c) binary, it might be part of a JDK.
21843    # Lets find the JDK/JRE directory by following symbolic links.
21844    # Linux/GNU systems often have links from /usr/bin/java to
21845    # /etc/alternatives/java to the real JDK binary.
21846
21847  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21848    # Follow a chain of symbolic links. Use readlink
21849    # where it exists, else fall back to horribly
21850    # complicated shell code.
21851    if test "x$READLINK_TESTED" != yes; then
21852      # On MacOSX there is a readlink tool with a different
21853      # purpose than the GNU readlink tool. Check the found readlink.
21854      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21855      if test "x$ISGNU" = x; then
21856        # A readlink that we do not know how to use.
21857        # Are there other non-GNU readlinks out there?
21858        READLINK_TESTED=yes
21859        READLINK=
21860      fi
21861    fi
21862
21863    if test "x$READLINK" != x; then
21864      BINARY=`$READLINK -f $BINARY`
21865    else
21866      # Save the current directory for restoring afterwards
21867      STARTDIR=$PWD
21868      COUNTER=0
21869      sym_link_dir=`$DIRNAME $BINARY`
21870      sym_link_file=`$BASENAME $BINARY`
21871      cd $sym_link_dir
21872      # Use -P flag to resolve symlinks in directories.
21873      cd `$THEPWDCMD -P`
21874      sym_link_dir=`$THEPWDCMD -P`
21875      # Resolve file symlinks
21876      while test $COUNTER -lt 20; do
21877        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21878        if test "x$ISLINK" == x; then
21879          # This is not a symbolic link! We are done!
21880          break
21881        fi
21882        # Again resolve directory symlinks since the target of the just found
21883        # link could be in a different directory
21884        cd `$DIRNAME $ISLINK`
21885        sym_link_dir=`$THEPWDCMD -P`
21886        sym_link_file=`$BASENAME $ISLINK`
21887        let COUNTER=COUNTER+1
21888      done
21889      cd $STARTDIR
21890      BINARY=$sym_link_dir/$sym_link_file
21891    fi
21892  fi
21893
21894    BOOT_JDK=`dirname "$BINARY"`
21895    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21896    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21897      # Looks like we found ourselves an JDK
21898      BOOT_JDK_FOUND=maybe
21899      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21900$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21901    fi
21902  fi
21903
21904
21905    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21906    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21907      # Do we have a bin/java?
21908      if test ! -x "$BOOT_JDK/bin/java"; then
21909        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21911        BOOT_JDK_FOUND=no
21912      else
21913        # Do we have a bin/javac?
21914        if test ! -x "$BOOT_JDK/bin/javac"; then
21915          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21917          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21918$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21919          BOOT_JDK_FOUND=no
21920        else
21921          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21922          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21923
21924          # Extra M4 quote needed to protect [] in grep expression.
21925          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21926          if test "x$FOUND_CORRECT_VERSION" = x; then
21927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21929            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21930$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21931            BOOT_JDK_FOUND=no
21932          else
21933            # We're done! :-)
21934            BOOT_JDK_FOUND=yes
21935
21936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21937
21938  # Input might be given as Windows format, start by converting to
21939  # unix format.
21940  path="$BOOT_JDK"
21941  new_path=`$CYGPATH -u "$path"`
21942
21943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21946  # "foo.exe" is OK but "foo" is an error.
21947  #
21948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21949  # It is also a way to make sure we got the proper file name for the real test later on.
21950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21951  if test "x$test_shortpath" = x; then
21952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21955  fi
21956
21957  # Call helper function which possibly converts this using DOS-style short mode.
21958  # If so, the updated path is stored in $new_path.
21959
21960  input_path="$new_path"
21961  # Check if we need to convert this using DOS-style short mode. If the path
21962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21963  # take no chances and rewrite it.
21964  # Note: m4 eats our [], so we need to use [ and ] instead.
21965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21966  if test "x$has_forbidden_chars" != x; then
21967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21971      # Going to short mode and back again did indeed matter. Since short mode is
21972      # case insensitive, let's make it lowercase to improve readability.
21973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21974      # Now convert it back to Unix-stile (cygpath)
21975      input_path=`$CYGPATH -u "$shortmode_path"`
21976      new_path="$input_path"
21977    fi
21978  fi
21979
21980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21981  if test "x$test_cygdrive_prefix" = x; then
21982    # As a simple fix, exclude /usr/bin since it's not a real path.
21983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21985      # a path prefixed by /cygdrive for fixpath to work.
21986      new_path="$CYGWIN_ROOT_PATH$input_path"
21987    fi
21988  fi
21989
21990
21991  if test "x$path" != "x$new_path"; then
21992    BOOT_JDK="$new_path"
21993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21995  fi
21996
21997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21998
21999  path="$BOOT_JDK"
22000  has_colon=`$ECHO $path | $GREP ^.:`
22001  new_path="$path"
22002  if test "x$has_colon" = x; then
22003    # Not in mixed or Windows style, start by that.
22004    new_path=`cmd //c echo $path`
22005  fi
22006
22007
22008  input_path="$new_path"
22009  # Check if we need to convert this using DOS-style short mode. If the path
22010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22011  # take no chances and rewrite it.
22012  # Note: m4 eats our [], so we need to use [ and ] instead.
22013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22014  if test "x$has_forbidden_chars" != x; then
22015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22017  fi
22018
22019
22020  windows_path="$new_path"
22021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22022    unix_path=`$CYGPATH -u "$windows_path"`
22023    new_path="$unix_path"
22024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22026    new_path="$unix_path"
22027  fi
22028
22029  if test "x$path" != "x$new_path"; then
22030    BOOT_JDK="$new_path"
22031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22033  fi
22034
22035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22037
22038  else
22039    # We're on a unix platform. Hooray! :)
22040    path="$BOOT_JDK"
22041    has_space=`$ECHO "$path" | $GREP " "`
22042    if test "x$has_space" != x; then
22043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22045      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22046    fi
22047
22048    # Use eval to expand a potential ~
22049    eval path="$path"
22050    if test ! -f "$path" && test ! -d "$path"; then
22051      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22052    fi
22053
22054    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22055  fi
22056
22057            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22058$as_echo_n "checking for Boot JDK... " >&6; }
22059            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22060$as_echo "$BOOT_JDK" >&6; }
22061            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22062$as_echo_n "checking Boot JDK version... " >&6; }
22063            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22064            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22065$as_echo "$BOOT_JDK_VERSION" >&6; }
22066          fi # end check jdk version
22067        fi # end check javac
22068      fi # end check java
22069    fi # end check boot jdk found
22070  fi
22071
22072
22073  # Test: Is there a JDK installed in default, well-known locations?
22074
22075  if test "x$BOOT_JDK_FOUND" = xno; then
22076    # Now execute the test
22077
22078  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22079
22080  if test "x$BOOT_JDK_FOUND" = xno; then
22081    # Now execute the test
22082
22083  if test "x$ProgramW6432" != x; then
22084    VIRTUAL_DIR="$ProgramW6432/Java"
22085
22086  windows_path="$VIRTUAL_DIR"
22087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22088    unix_path=`$CYGPATH -u "$windows_path"`
22089    VIRTUAL_DIR="$unix_path"
22090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22092    VIRTUAL_DIR="$unix_path"
22093  fi
22094
22095
22096  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22097  BOOT_JDK_SUFFIX=""
22098  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22099  if test "x$ALL_JDKS_FOUND" != x; then
22100    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22101
22102  if test "x$BOOT_JDK_FOUND" = xno; then
22103    # Now execute the test
22104
22105        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22106        if test -d "$BOOT_JDK"; then
22107          BOOT_JDK_FOUND=maybe
22108          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22109$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22110        fi
22111
22112
22113    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22114    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22115      # Do we have a bin/java?
22116      if test ! -x "$BOOT_JDK/bin/java"; then
22117        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22118$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22119        BOOT_JDK_FOUND=no
22120      else
22121        # Do we have a bin/javac?
22122        if test ! -x "$BOOT_JDK/bin/javac"; then
22123          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22124$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22125          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22126$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22127          BOOT_JDK_FOUND=no
22128        else
22129          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22130          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22131
22132          # Extra M4 quote needed to protect [] in grep expression.
22133          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22134          if test "x$FOUND_CORRECT_VERSION" = x; then
22135            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22136$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22137            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22138$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22139            BOOT_JDK_FOUND=no
22140          else
22141            # We're done! :-)
22142            BOOT_JDK_FOUND=yes
22143
22144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22145
22146  # Input might be given as Windows format, start by converting to
22147  # unix format.
22148  path="$BOOT_JDK"
22149  new_path=`$CYGPATH -u "$path"`
22150
22151  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22152  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22153  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22154  # "foo.exe" is OK but "foo" is an error.
22155  #
22156  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22157  # It is also a way to make sure we got the proper file name for the real test later on.
22158  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22159  if test "x$test_shortpath" = x; then
22160    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22162    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22163  fi
22164
22165  # Call helper function which possibly converts this using DOS-style short mode.
22166  # If so, the updated path is stored in $new_path.
22167
22168  input_path="$new_path"
22169  # Check if we need to convert this using DOS-style short mode. If the path
22170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22171  # take no chances and rewrite it.
22172  # Note: m4 eats our [], so we need to use [ and ] instead.
22173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22174  if test "x$has_forbidden_chars" != x; then
22175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22176    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22177    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22178    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22179      # Going to short mode and back again did indeed matter. Since short mode is
22180      # case insensitive, let's make it lowercase to improve readability.
22181      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22182      # Now convert it back to Unix-stile (cygpath)
22183      input_path=`$CYGPATH -u "$shortmode_path"`
22184      new_path="$input_path"
22185    fi
22186  fi
22187
22188  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22189  if test "x$test_cygdrive_prefix" = x; then
22190    # As a simple fix, exclude /usr/bin since it's not a real path.
22191    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22192      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22193      # a path prefixed by /cygdrive for fixpath to work.
22194      new_path="$CYGWIN_ROOT_PATH$input_path"
22195    fi
22196  fi
22197
22198
22199  if test "x$path" != "x$new_path"; then
22200    BOOT_JDK="$new_path"
22201    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22202$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22203  fi
22204
22205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22206
22207  path="$BOOT_JDK"
22208  has_colon=`$ECHO $path | $GREP ^.:`
22209  new_path="$path"
22210  if test "x$has_colon" = x; then
22211    # Not in mixed or Windows style, start by that.
22212    new_path=`cmd //c echo $path`
22213  fi
22214
22215
22216  input_path="$new_path"
22217  # Check if we need to convert this using DOS-style short mode. If the path
22218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22219  # take no chances and rewrite it.
22220  # Note: m4 eats our [], so we need to use [ and ] instead.
22221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22222  if test "x$has_forbidden_chars" != x; then
22223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22225  fi
22226
22227
22228  windows_path="$new_path"
22229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22230    unix_path=`$CYGPATH -u "$windows_path"`
22231    new_path="$unix_path"
22232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22234    new_path="$unix_path"
22235  fi
22236
22237  if test "x$path" != "x$new_path"; then
22238    BOOT_JDK="$new_path"
22239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22240$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22241  fi
22242
22243  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22244  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22245
22246  else
22247    # We're on a unix platform. Hooray! :)
22248    path="$BOOT_JDK"
22249    has_space=`$ECHO "$path" | $GREP " "`
22250    if test "x$has_space" != x; then
22251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22252$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22253      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22254    fi
22255
22256    # Use eval to expand a potential ~
22257    eval path="$path"
22258    if test ! -f "$path" && test ! -d "$path"; then
22259      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22260    fi
22261
22262    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22263  fi
22264
22265            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22266$as_echo_n "checking for Boot JDK... " >&6; }
22267            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22268$as_echo "$BOOT_JDK" >&6; }
22269            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22270$as_echo_n "checking Boot JDK version... " >&6; }
22271            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22273$as_echo "$BOOT_JDK_VERSION" >&6; }
22274          fi # end check jdk version
22275        fi # end check javac
22276      fi # end check java
22277    fi # end check boot jdk found
22278  fi
22279
22280    done
22281  fi
22282
22283  fi
22284
22285
22286    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22287    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22288      # Do we have a bin/java?
22289      if test ! -x "$BOOT_JDK/bin/java"; then
22290        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22291$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22292        BOOT_JDK_FOUND=no
22293      else
22294        # Do we have a bin/javac?
22295        if test ! -x "$BOOT_JDK/bin/javac"; then
22296          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22298          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22299$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22300          BOOT_JDK_FOUND=no
22301        else
22302          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22303          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22304
22305          # Extra M4 quote needed to protect [] in grep expression.
22306          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22307          if test "x$FOUND_CORRECT_VERSION" = x; then
22308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22310            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22311$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22312            BOOT_JDK_FOUND=no
22313          else
22314            # We're done! :-)
22315            BOOT_JDK_FOUND=yes
22316
22317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22318
22319  # Input might be given as Windows format, start by converting to
22320  # unix format.
22321  path="$BOOT_JDK"
22322  new_path=`$CYGPATH -u "$path"`
22323
22324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22327  # "foo.exe" is OK but "foo" is an error.
22328  #
22329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22330  # It is also a way to make sure we got the proper file name for the real test later on.
22331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22332  if test "x$test_shortpath" = x; then
22333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22334$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22335    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22336  fi
22337
22338  # Call helper function which possibly converts this using DOS-style short mode.
22339  # If so, the updated path is stored in $new_path.
22340
22341  input_path="$new_path"
22342  # Check if we need to convert this using DOS-style short mode. If the path
22343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22344  # take no chances and rewrite it.
22345  # Note: m4 eats our [], so we need to use [ and ] instead.
22346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22347  if test "x$has_forbidden_chars" != x; then
22348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22352      # Going to short mode and back again did indeed matter. Since short mode is
22353      # case insensitive, let's make it lowercase to improve readability.
22354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22355      # Now convert it back to Unix-stile (cygpath)
22356      input_path=`$CYGPATH -u "$shortmode_path"`
22357      new_path="$input_path"
22358    fi
22359  fi
22360
22361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22362  if test "x$test_cygdrive_prefix" = x; then
22363    # As a simple fix, exclude /usr/bin since it's not a real path.
22364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22366      # a path prefixed by /cygdrive for fixpath to work.
22367      new_path="$CYGWIN_ROOT_PATH$input_path"
22368    fi
22369  fi
22370
22371
22372  if test "x$path" != "x$new_path"; then
22373    BOOT_JDK="$new_path"
22374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22375$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22376  fi
22377
22378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22379
22380  path="$BOOT_JDK"
22381  has_colon=`$ECHO $path | $GREP ^.:`
22382  new_path="$path"
22383  if test "x$has_colon" = x; then
22384    # Not in mixed or Windows style, start by that.
22385    new_path=`cmd //c echo $path`
22386  fi
22387
22388
22389  input_path="$new_path"
22390  # Check if we need to convert this using DOS-style short mode. If the path
22391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22392  # take no chances and rewrite it.
22393  # Note: m4 eats our [], so we need to use [ and ] instead.
22394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22395  if test "x$has_forbidden_chars" != x; then
22396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22398  fi
22399
22400
22401  windows_path="$new_path"
22402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22403    unix_path=`$CYGPATH -u "$windows_path"`
22404    new_path="$unix_path"
22405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22407    new_path="$unix_path"
22408  fi
22409
22410  if test "x$path" != "x$new_path"; then
22411    BOOT_JDK="$new_path"
22412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22413$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22414  fi
22415
22416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22418
22419  else
22420    # We're on a unix platform. Hooray! :)
22421    path="$BOOT_JDK"
22422    has_space=`$ECHO "$path" | $GREP " "`
22423    if test "x$has_space" != x; then
22424      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22425$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22426      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22427    fi
22428
22429    # Use eval to expand a potential ~
22430    eval path="$path"
22431    if test ! -f "$path" && test ! -d "$path"; then
22432      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22433    fi
22434
22435    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22436  fi
22437
22438            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22439$as_echo_n "checking for Boot JDK... " >&6; }
22440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22441$as_echo "$BOOT_JDK" >&6; }
22442            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22443$as_echo_n "checking Boot JDK version... " >&6; }
22444            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22445            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22446$as_echo "$BOOT_JDK_VERSION" >&6; }
22447          fi # end check jdk version
22448        fi # end check javac
22449      fi # end check java
22450    fi # end check boot jdk found
22451  fi
22452
22453
22454  if test "x$BOOT_JDK_FOUND" = xno; then
22455    # Now execute the test
22456
22457  if test "x$PROGRAMW6432" != x; then
22458    VIRTUAL_DIR="$PROGRAMW6432/Java"
22459
22460  windows_path="$VIRTUAL_DIR"
22461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22462    unix_path=`$CYGPATH -u "$windows_path"`
22463    VIRTUAL_DIR="$unix_path"
22464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22466    VIRTUAL_DIR="$unix_path"
22467  fi
22468
22469
22470  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22471  BOOT_JDK_SUFFIX=""
22472  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22473  if test "x$ALL_JDKS_FOUND" != x; then
22474    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22475
22476  if test "x$BOOT_JDK_FOUND" = xno; then
22477    # Now execute the test
22478
22479        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22480        if test -d "$BOOT_JDK"; then
22481          BOOT_JDK_FOUND=maybe
22482          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22483$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22484        fi
22485
22486
22487    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22488    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22489      # Do we have a bin/java?
22490      if test ! -x "$BOOT_JDK/bin/java"; then
22491        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22493        BOOT_JDK_FOUND=no
22494      else
22495        # Do we have a bin/javac?
22496        if test ! -x "$BOOT_JDK/bin/javac"; then
22497          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22498$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22499          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22500$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22501          BOOT_JDK_FOUND=no
22502        else
22503          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22504          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22505
22506          # Extra M4 quote needed to protect [] in grep expression.
22507          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22508          if test "x$FOUND_CORRECT_VERSION" = x; then
22509            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22510$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22511            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22512$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22513            BOOT_JDK_FOUND=no
22514          else
22515            # We're done! :-)
22516            BOOT_JDK_FOUND=yes
22517
22518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22519
22520  # Input might be given as Windows format, start by converting to
22521  # unix format.
22522  path="$BOOT_JDK"
22523  new_path=`$CYGPATH -u "$path"`
22524
22525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22528  # "foo.exe" is OK but "foo" is an error.
22529  #
22530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22531  # It is also a way to make sure we got the proper file name for the real test later on.
22532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22533  if test "x$test_shortpath" = x; then
22534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22535$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22536    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22537  fi
22538
22539  # Call helper function which possibly converts this using DOS-style short mode.
22540  # If so, the updated path is stored in $new_path.
22541
22542  input_path="$new_path"
22543  # Check if we need to convert this using DOS-style short mode. If the path
22544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22545  # take no chances and rewrite it.
22546  # Note: m4 eats our [], so we need to use [ and ] instead.
22547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22548  if test "x$has_forbidden_chars" != x; then
22549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22553      # Going to short mode and back again did indeed matter. Since short mode is
22554      # case insensitive, let's make it lowercase to improve readability.
22555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22556      # Now convert it back to Unix-stile (cygpath)
22557      input_path=`$CYGPATH -u "$shortmode_path"`
22558      new_path="$input_path"
22559    fi
22560  fi
22561
22562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22563  if test "x$test_cygdrive_prefix" = x; then
22564    # As a simple fix, exclude /usr/bin since it's not a real path.
22565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22567      # a path prefixed by /cygdrive for fixpath to work.
22568      new_path="$CYGWIN_ROOT_PATH$input_path"
22569    fi
22570  fi
22571
22572
22573  if test "x$path" != "x$new_path"; then
22574    BOOT_JDK="$new_path"
22575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22576$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22577  fi
22578
22579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22580
22581  path="$BOOT_JDK"
22582  has_colon=`$ECHO $path | $GREP ^.:`
22583  new_path="$path"
22584  if test "x$has_colon" = x; then
22585    # Not in mixed or Windows style, start by that.
22586    new_path=`cmd //c echo $path`
22587  fi
22588
22589
22590  input_path="$new_path"
22591  # Check if we need to convert this using DOS-style short mode. If the path
22592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22593  # take no chances and rewrite it.
22594  # Note: m4 eats our [], so we need to use [ and ] instead.
22595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22596  if test "x$has_forbidden_chars" != x; then
22597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22599  fi
22600
22601
22602  windows_path="$new_path"
22603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22604    unix_path=`$CYGPATH -u "$windows_path"`
22605    new_path="$unix_path"
22606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22608    new_path="$unix_path"
22609  fi
22610
22611  if test "x$path" != "x$new_path"; then
22612    BOOT_JDK="$new_path"
22613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22615  fi
22616
22617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22619
22620  else
22621    # We're on a unix platform. Hooray! :)
22622    path="$BOOT_JDK"
22623    has_space=`$ECHO "$path" | $GREP " "`
22624    if test "x$has_space" != x; then
22625      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22627      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22628    fi
22629
22630    # Use eval to expand a potential ~
22631    eval path="$path"
22632    if test ! -f "$path" && test ! -d "$path"; then
22633      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22634    fi
22635
22636    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22637  fi
22638
22639            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22640$as_echo_n "checking for Boot JDK... " >&6; }
22641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22642$as_echo "$BOOT_JDK" >&6; }
22643            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22644$as_echo_n "checking Boot JDK version... " >&6; }
22645            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22647$as_echo "$BOOT_JDK_VERSION" >&6; }
22648          fi # end check jdk version
22649        fi # end check javac
22650      fi # end check java
22651    fi # end check boot jdk found
22652  fi
22653
22654    done
22655  fi
22656
22657  fi
22658
22659
22660    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22661    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22662      # Do we have a bin/java?
22663      if test ! -x "$BOOT_JDK/bin/java"; then
22664        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22665$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22666        BOOT_JDK_FOUND=no
22667      else
22668        # Do we have a bin/javac?
22669        if test ! -x "$BOOT_JDK/bin/javac"; then
22670          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22671$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22672          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22673$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22674          BOOT_JDK_FOUND=no
22675        else
22676          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22677          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22678
22679          # Extra M4 quote needed to protect [] in grep expression.
22680          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22681          if test "x$FOUND_CORRECT_VERSION" = x; then
22682            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22684            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22685$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22686            BOOT_JDK_FOUND=no
22687          else
22688            # We're done! :-)
22689            BOOT_JDK_FOUND=yes
22690
22691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22692
22693  # Input might be given as Windows format, start by converting to
22694  # unix format.
22695  path="$BOOT_JDK"
22696  new_path=`$CYGPATH -u "$path"`
22697
22698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22701  # "foo.exe" is OK but "foo" is an error.
22702  #
22703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22704  # It is also a way to make sure we got the proper file name for the real test later on.
22705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22706  if test "x$test_shortpath" = x; then
22707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22708$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22709    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22710  fi
22711
22712  # Call helper function which possibly converts this using DOS-style short mode.
22713  # If so, the updated path is stored in $new_path.
22714
22715  input_path="$new_path"
22716  # Check if we need to convert this using DOS-style short mode. If the path
22717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22718  # take no chances and rewrite it.
22719  # Note: m4 eats our [], so we need to use [ and ] instead.
22720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22721  if test "x$has_forbidden_chars" != x; then
22722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22726      # Going to short mode and back again did indeed matter. Since short mode is
22727      # case insensitive, let's make it lowercase to improve readability.
22728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22729      # Now convert it back to Unix-stile (cygpath)
22730      input_path=`$CYGPATH -u "$shortmode_path"`
22731      new_path="$input_path"
22732    fi
22733  fi
22734
22735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22736  if test "x$test_cygdrive_prefix" = x; then
22737    # As a simple fix, exclude /usr/bin since it's not a real path.
22738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22740      # a path prefixed by /cygdrive for fixpath to work.
22741      new_path="$CYGWIN_ROOT_PATH$input_path"
22742    fi
22743  fi
22744
22745
22746  if test "x$path" != "x$new_path"; then
22747    BOOT_JDK="$new_path"
22748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22749$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22750  fi
22751
22752  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22753
22754  path="$BOOT_JDK"
22755  has_colon=`$ECHO $path | $GREP ^.:`
22756  new_path="$path"
22757  if test "x$has_colon" = x; then
22758    # Not in mixed or Windows style, start by that.
22759    new_path=`cmd //c echo $path`
22760  fi
22761
22762
22763  input_path="$new_path"
22764  # Check if we need to convert this using DOS-style short mode. If the path
22765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22766  # take no chances and rewrite it.
22767  # Note: m4 eats our [], so we need to use [ and ] instead.
22768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22769  if test "x$has_forbidden_chars" != x; then
22770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22772  fi
22773
22774
22775  windows_path="$new_path"
22776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22777    unix_path=`$CYGPATH -u "$windows_path"`
22778    new_path="$unix_path"
22779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22781    new_path="$unix_path"
22782  fi
22783
22784  if test "x$path" != "x$new_path"; then
22785    BOOT_JDK="$new_path"
22786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22787$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22788  fi
22789
22790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22792
22793  else
22794    # We're on a unix platform. Hooray! :)
22795    path="$BOOT_JDK"
22796    has_space=`$ECHO "$path" | $GREP " "`
22797    if test "x$has_space" != x; then
22798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22799$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22800      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22801    fi
22802
22803    # Use eval to expand a potential ~
22804    eval path="$path"
22805    if test ! -f "$path" && test ! -d "$path"; then
22806      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22807    fi
22808
22809    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22810  fi
22811
22812            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22813$as_echo_n "checking for Boot JDK... " >&6; }
22814            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22815$as_echo "$BOOT_JDK" >&6; }
22816            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22817$as_echo_n "checking Boot JDK version... " >&6; }
22818            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22820$as_echo "$BOOT_JDK_VERSION" >&6; }
22821          fi # end check jdk version
22822        fi # end check javac
22823      fi # end check java
22824    fi # end check boot jdk found
22825  fi
22826
22827
22828  if test "x$BOOT_JDK_FOUND" = xno; then
22829    # Now execute the test
22830
22831  if test "x$PROGRAMFILES" != x; then
22832    VIRTUAL_DIR="$PROGRAMFILES/Java"
22833
22834  windows_path="$VIRTUAL_DIR"
22835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22836    unix_path=`$CYGPATH -u "$windows_path"`
22837    VIRTUAL_DIR="$unix_path"
22838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22840    VIRTUAL_DIR="$unix_path"
22841  fi
22842
22843
22844  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22845  BOOT_JDK_SUFFIX=""
22846  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22847  if test "x$ALL_JDKS_FOUND" != x; then
22848    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22849
22850  if test "x$BOOT_JDK_FOUND" = xno; then
22851    # Now execute the test
22852
22853        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22854        if test -d "$BOOT_JDK"; then
22855          BOOT_JDK_FOUND=maybe
22856          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22857$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22858        fi
22859
22860
22861    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22862    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22863      # Do we have a bin/java?
22864      if test ! -x "$BOOT_JDK/bin/java"; then
22865        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22867        BOOT_JDK_FOUND=no
22868      else
22869        # Do we have a bin/javac?
22870        if test ! -x "$BOOT_JDK/bin/javac"; then
22871          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22872$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22873          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22874$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22875          BOOT_JDK_FOUND=no
22876        else
22877          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22878          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22879
22880          # Extra M4 quote needed to protect [] in grep expression.
22881          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22882          if test "x$FOUND_CORRECT_VERSION" = x; then
22883            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22885            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22886$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22887            BOOT_JDK_FOUND=no
22888          else
22889            # We're done! :-)
22890            BOOT_JDK_FOUND=yes
22891
22892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22893
22894  # Input might be given as Windows format, start by converting to
22895  # unix format.
22896  path="$BOOT_JDK"
22897  new_path=`$CYGPATH -u "$path"`
22898
22899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22902  # "foo.exe" is OK but "foo" is an error.
22903  #
22904  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22905  # It is also a way to make sure we got the proper file name for the real test later on.
22906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22907  if test "x$test_shortpath" = x; then
22908    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22909$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22910    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22911  fi
22912
22913  # Call helper function which possibly converts this using DOS-style short mode.
22914  # If so, the updated path is stored in $new_path.
22915
22916  input_path="$new_path"
22917  # Check if we need to convert this using DOS-style short mode. If the path
22918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22919  # take no chances and rewrite it.
22920  # Note: m4 eats our [], so we need to use [ and ] instead.
22921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22922  if test "x$has_forbidden_chars" != x; then
22923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22927      # Going to short mode and back again did indeed matter. Since short mode is
22928      # case insensitive, let's make it lowercase to improve readability.
22929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22930      # Now convert it back to Unix-stile (cygpath)
22931      input_path=`$CYGPATH -u "$shortmode_path"`
22932      new_path="$input_path"
22933    fi
22934  fi
22935
22936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22937  if test "x$test_cygdrive_prefix" = x; then
22938    # As a simple fix, exclude /usr/bin since it's not a real path.
22939    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22941      # a path prefixed by /cygdrive for fixpath to work.
22942      new_path="$CYGWIN_ROOT_PATH$input_path"
22943    fi
22944  fi
22945
22946
22947  if test "x$path" != "x$new_path"; then
22948    BOOT_JDK="$new_path"
22949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22950$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22951  fi
22952
22953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22954
22955  path="$BOOT_JDK"
22956  has_colon=`$ECHO $path | $GREP ^.:`
22957  new_path="$path"
22958  if test "x$has_colon" = x; then
22959    # Not in mixed or Windows style, start by that.
22960    new_path=`cmd //c echo $path`
22961  fi
22962
22963
22964  input_path="$new_path"
22965  # Check if we need to convert this using DOS-style short mode. If the path
22966  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22967  # take no chances and rewrite it.
22968  # Note: m4 eats our [], so we need to use [ and ] instead.
22969  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22970  if test "x$has_forbidden_chars" != x; then
22971    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22972    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22973  fi
22974
22975
22976  windows_path="$new_path"
22977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22978    unix_path=`$CYGPATH -u "$windows_path"`
22979    new_path="$unix_path"
22980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22982    new_path="$unix_path"
22983  fi
22984
22985  if test "x$path" != "x$new_path"; then
22986    BOOT_JDK="$new_path"
22987    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22988$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22989  fi
22990
22991  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22992  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22993
22994  else
22995    # We're on a unix platform. Hooray! :)
22996    path="$BOOT_JDK"
22997    has_space=`$ECHO "$path" | $GREP " "`
22998    if test "x$has_space" != x; then
22999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23000$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23001      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23002    fi
23003
23004    # Use eval to expand a potential ~
23005    eval path="$path"
23006    if test ! -f "$path" && test ! -d "$path"; then
23007      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23008    fi
23009
23010    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23011  fi
23012
23013            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23014$as_echo_n "checking for Boot JDK... " >&6; }
23015            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23016$as_echo "$BOOT_JDK" >&6; }
23017            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23018$as_echo_n "checking Boot JDK version... " >&6; }
23019            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23020            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23021$as_echo "$BOOT_JDK_VERSION" >&6; }
23022          fi # end check jdk version
23023        fi # end check javac
23024      fi # end check java
23025    fi # end check boot jdk found
23026  fi
23027
23028    done
23029  fi
23030
23031  fi
23032
23033
23034    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23035    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23036      # Do we have a bin/java?
23037      if test ! -x "$BOOT_JDK/bin/java"; then
23038        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23040        BOOT_JDK_FOUND=no
23041      else
23042        # Do we have a bin/javac?
23043        if test ! -x "$BOOT_JDK/bin/javac"; then
23044          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23046          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23047$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23048          BOOT_JDK_FOUND=no
23049        else
23050          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23051          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23052
23053          # Extra M4 quote needed to protect [] in grep expression.
23054          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23055          if test "x$FOUND_CORRECT_VERSION" = x; then
23056            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23057$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23058            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23059$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23060            BOOT_JDK_FOUND=no
23061          else
23062            # We're done! :-)
23063            BOOT_JDK_FOUND=yes
23064
23065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23066
23067  # Input might be given as Windows format, start by converting to
23068  # unix format.
23069  path="$BOOT_JDK"
23070  new_path=`$CYGPATH -u "$path"`
23071
23072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23075  # "foo.exe" is OK but "foo" is an error.
23076  #
23077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23078  # It is also a way to make sure we got the proper file name for the real test later on.
23079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23080  if test "x$test_shortpath" = x; then
23081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23082$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23083    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23084  fi
23085
23086  # Call helper function which possibly converts this using DOS-style short mode.
23087  # If so, the updated path is stored in $new_path.
23088
23089  input_path="$new_path"
23090  # Check if we need to convert this using DOS-style short mode. If the path
23091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23092  # take no chances and rewrite it.
23093  # Note: m4 eats our [], so we need to use [ and ] instead.
23094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23095  if test "x$has_forbidden_chars" != x; then
23096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23100      # Going to short mode and back again did indeed matter. Since short mode is
23101      # case insensitive, let's make it lowercase to improve readability.
23102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23103      # Now convert it back to Unix-stile (cygpath)
23104      input_path=`$CYGPATH -u "$shortmode_path"`
23105      new_path="$input_path"
23106    fi
23107  fi
23108
23109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23110  if test "x$test_cygdrive_prefix" = x; then
23111    # As a simple fix, exclude /usr/bin since it's not a real path.
23112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23114      # a path prefixed by /cygdrive for fixpath to work.
23115      new_path="$CYGWIN_ROOT_PATH$input_path"
23116    fi
23117  fi
23118
23119
23120  if test "x$path" != "x$new_path"; then
23121    BOOT_JDK="$new_path"
23122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23124  fi
23125
23126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23127
23128  path="$BOOT_JDK"
23129  has_colon=`$ECHO $path | $GREP ^.:`
23130  new_path="$path"
23131  if test "x$has_colon" = x; then
23132    # Not in mixed or Windows style, start by that.
23133    new_path=`cmd //c echo $path`
23134  fi
23135
23136
23137  input_path="$new_path"
23138  # Check if we need to convert this using DOS-style short mode. If the path
23139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23140  # take no chances and rewrite it.
23141  # Note: m4 eats our [], so we need to use [ and ] instead.
23142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23143  if test "x$has_forbidden_chars" != x; then
23144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23146  fi
23147
23148
23149  windows_path="$new_path"
23150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23151    unix_path=`$CYGPATH -u "$windows_path"`
23152    new_path="$unix_path"
23153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23155    new_path="$unix_path"
23156  fi
23157
23158  if test "x$path" != "x$new_path"; then
23159    BOOT_JDK="$new_path"
23160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23161$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23162  fi
23163
23164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23166
23167  else
23168    # We're on a unix platform. Hooray! :)
23169    path="$BOOT_JDK"
23170    has_space=`$ECHO "$path" | $GREP " "`
23171    if test "x$has_space" != x; then
23172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23173$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23174      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23175    fi
23176
23177    # Use eval to expand a potential ~
23178    eval path="$path"
23179    if test ! -f "$path" && test ! -d "$path"; then
23180      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23181    fi
23182
23183    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23184  fi
23185
23186            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23187$as_echo_n "checking for Boot JDK... " >&6; }
23188            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23189$as_echo "$BOOT_JDK" >&6; }
23190            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23191$as_echo_n "checking Boot JDK version... " >&6; }
23192            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23193            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23194$as_echo "$BOOT_JDK_VERSION" >&6; }
23195          fi # end check jdk version
23196        fi # end check javac
23197      fi # end check java
23198    fi # end check boot jdk found
23199  fi
23200
23201
23202  if test "x$BOOT_JDK_FOUND" = xno; then
23203    # Now execute the test
23204
23205  if test "x$ProgramFiles" != x; then
23206    VIRTUAL_DIR="$ProgramFiles/Java"
23207
23208  windows_path="$VIRTUAL_DIR"
23209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23210    unix_path=`$CYGPATH -u "$windows_path"`
23211    VIRTUAL_DIR="$unix_path"
23212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23214    VIRTUAL_DIR="$unix_path"
23215  fi
23216
23217
23218  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23219  BOOT_JDK_SUFFIX=""
23220  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23221  if test "x$ALL_JDKS_FOUND" != x; then
23222    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23223
23224  if test "x$BOOT_JDK_FOUND" = xno; then
23225    # Now execute the test
23226
23227        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23228        if test -d "$BOOT_JDK"; then
23229          BOOT_JDK_FOUND=maybe
23230          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23231$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23232        fi
23233
23234
23235    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23236    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23237      # Do we have a bin/java?
23238      if test ! -x "$BOOT_JDK/bin/java"; then
23239        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23241        BOOT_JDK_FOUND=no
23242      else
23243        # Do we have a bin/javac?
23244        if test ! -x "$BOOT_JDK/bin/javac"; then
23245          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23247          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23248$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23249          BOOT_JDK_FOUND=no
23250        else
23251          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23252          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23253
23254          # Extra M4 quote needed to protect [] in grep expression.
23255          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23256          if test "x$FOUND_CORRECT_VERSION" = x; then
23257            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23259            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23260$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23261            BOOT_JDK_FOUND=no
23262          else
23263            # We're done! :-)
23264            BOOT_JDK_FOUND=yes
23265
23266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23267
23268  # Input might be given as Windows format, start by converting to
23269  # unix format.
23270  path="$BOOT_JDK"
23271  new_path=`$CYGPATH -u "$path"`
23272
23273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23276  # "foo.exe" is OK but "foo" is an error.
23277  #
23278  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23279  # It is also a way to make sure we got the proper file name for the real test later on.
23280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23281  if test "x$test_shortpath" = x; then
23282    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23284    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23285  fi
23286
23287  # Call helper function which possibly converts this using DOS-style short mode.
23288  # If so, the updated path is stored in $new_path.
23289
23290  input_path="$new_path"
23291  # Check if we need to convert this using DOS-style short mode. If the path
23292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23293  # take no chances and rewrite it.
23294  # Note: m4 eats our [], so we need to use [ and ] instead.
23295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23296  if test "x$has_forbidden_chars" != x; then
23297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23301      # Going to short mode and back again did indeed matter. Since short mode is
23302      # case insensitive, let's make it lowercase to improve readability.
23303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23304      # Now convert it back to Unix-stile (cygpath)
23305      input_path=`$CYGPATH -u "$shortmode_path"`
23306      new_path="$input_path"
23307    fi
23308  fi
23309
23310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23311  if test "x$test_cygdrive_prefix" = x; then
23312    # As a simple fix, exclude /usr/bin since it's not a real path.
23313    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23315      # a path prefixed by /cygdrive for fixpath to work.
23316      new_path="$CYGWIN_ROOT_PATH$input_path"
23317    fi
23318  fi
23319
23320
23321  if test "x$path" != "x$new_path"; then
23322    BOOT_JDK="$new_path"
23323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23325  fi
23326
23327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23328
23329  path="$BOOT_JDK"
23330  has_colon=`$ECHO $path | $GREP ^.:`
23331  new_path="$path"
23332  if test "x$has_colon" = x; then
23333    # Not in mixed or Windows style, start by that.
23334    new_path=`cmd //c echo $path`
23335  fi
23336
23337
23338  input_path="$new_path"
23339  # Check if we need to convert this using DOS-style short mode. If the path
23340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23341  # take no chances and rewrite it.
23342  # Note: m4 eats our [], so we need to use [ and ] instead.
23343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23344  if test "x$has_forbidden_chars" != x; then
23345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23347  fi
23348
23349
23350  windows_path="$new_path"
23351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23352    unix_path=`$CYGPATH -u "$windows_path"`
23353    new_path="$unix_path"
23354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23356    new_path="$unix_path"
23357  fi
23358
23359  if test "x$path" != "x$new_path"; then
23360    BOOT_JDK="$new_path"
23361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23363  fi
23364
23365  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23366  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23367
23368  else
23369    # We're on a unix platform. Hooray! :)
23370    path="$BOOT_JDK"
23371    has_space=`$ECHO "$path" | $GREP " "`
23372    if test "x$has_space" != x; then
23373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23375      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23376    fi
23377
23378    # Use eval to expand a potential ~
23379    eval path="$path"
23380    if test ! -f "$path" && test ! -d "$path"; then
23381      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23382    fi
23383
23384    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23385  fi
23386
23387            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23388$as_echo_n "checking for Boot JDK... " >&6; }
23389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23390$as_echo "$BOOT_JDK" >&6; }
23391            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23392$as_echo_n "checking Boot JDK version... " >&6; }
23393            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23394            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23395$as_echo "$BOOT_JDK_VERSION" >&6; }
23396          fi # end check jdk version
23397        fi # end check javac
23398      fi # end check java
23399    fi # end check boot jdk found
23400  fi
23401
23402    done
23403  fi
23404
23405  fi
23406
23407
23408    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23409    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23410      # Do we have a bin/java?
23411      if test ! -x "$BOOT_JDK/bin/java"; then
23412        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23414        BOOT_JDK_FOUND=no
23415      else
23416        # Do we have a bin/javac?
23417        if test ! -x "$BOOT_JDK/bin/javac"; then
23418          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23419$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23420          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23421$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23422          BOOT_JDK_FOUND=no
23423        else
23424          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23425          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23426
23427          # Extra M4 quote needed to protect [] in grep expression.
23428          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23429          if test "x$FOUND_CORRECT_VERSION" = x; then
23430            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23432            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23433$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23434            BOOT_JDK_FOUND=no
23435          else
23436            # We're done! :-)
23437            BOOT_JDK_FOUND=yes
23438
23439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23440
23441  # Input might be given as Windows format, start by converting to
23442  # unix format.
23443  path="$BOOT_JDK"
23444  new_path=`$CYGPATH -u "$path"`
23445
23446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23449  # "foo.exe" is OK but "foo" is an error.
23450  #
23451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23452  # It is also a way to make sure we got the proper file name for the real test later on.
23453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23454  if test "x$test_shortpath" = x; then
23455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23457    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23458  fi
23459
23460  # Call helper function which possibly converts this using DOS-style short mode.
23461  # If so, the updated path is stored in $new_path.
23462
23463  input_path="$new_path"
23464  # Check if we need to convert this using DOS-style short mode. If the path
23465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23466  # take no chances and rewrite it.
23467  # Note: m4 eats our [], so we need to use [ and ] instead.
23468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23469  if test "x$has_forbidden_chars" != x; then
23470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23474      # Going to short mode and back again did indeed matter. Since short mode is
23475      # case insensitive, let's make it lowercase to improve readability.
23476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23477      # Now convert it back to Unix-stile (cygpath)
23478      input_path=`$CYGPATH -u "$shortmode_path"`
23479      new_path="$input_path"
23480    fi
23481  fi
23482
23483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23484  if test "x$test_cygdrive_prefix" = x; then
23485    # As a simple fix, exclude /usr/bin since it's not a real path.
23486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23488      # a path prefixed by /cygdrive for fixpath to work.
23489      new_path="$CYGWIN_ROOT_PATH$input_path"
23490    fi
23491  fi
23492
23493
23494  if test "x$path" != "x$new_path"; then
23495    BOOT_JDK="$new_path"
23496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23498  fi
23499
23500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23501
23502  path="$BOOT_JDK"
23503  has_colon=`$ECHO $path | $GREP ^.:`
23504  new_path="$path"
23505  if test "x$has_colon" = x; then
23506    # Not in mixed or Windows style, start by that.
23507    new_path=`cmd //c echo $path`
23508  fi
23509
23510
23511  input_path="$new_path"
23512  # Check if we need to convert this using DOS-style short mode. If the path
23513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23514  # take no chances and rewrite it.
23515  # Note: m4 eats our [], so we need to use [ and ] instead.
23516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23517  if test "x$has_forbidden_chars" != x; then
23518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23520  fi
23521
23522
23523  windows_path="$new_path"
23524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23525    unix_path=`$CYGPATH -u "$windows_path"`
23526    new_path="$unix_path"
23527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23529    new_path="$unix_path"
23530  fi
23531
23532  if test "x$path" != "x$new_path"; then
23533    BOOT_JDK="$new_path"
23534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23536  fi
23537
23538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23540
23541  else
23542    # We're on a unix platform. Hooray! :)
23543    path="$BOOT_JDK"
23544    has_space=`$ECHO "$path" | $GREP " "`
23545    if test "x$has_space" != x; then
23546      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23548      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23549    fi
23550
23551    # Use eval to expand a potential ~
23552    eval path="$path"
23553    if test ! -f "$path" && test ! -d "$path"; then
23554      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23555    fi
23556
23557    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23558  fi
23559
23560            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23561$as_echo_n "checking for Boot JDK... " >&6; }
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23563$as_echo "$BOOT_JDK" >&6; }
23564            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23565$as_echo_n "checking Boot JDK version... " >&6; }
23566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23567            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23568$as_echo "$BOOT_JDK_VERSION" >&6; }
23569          fi # end check jdk version
23570        fi # end check javac
23571      fi # end check java
23572    fi # end check boot jdk found
23573  fi
23574
23575
23576  if test "x$BOOT_JDK_FOUND" = xno; then
23577    # Now execute the test
23578
23579  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23580  BOOT_JDK_SUFFIX=""
23581  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23582  if test "x$ALL_JDKS_FOUND" != x; then
23583    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23584
23585  if test "x$BOOT_JDK_FOUND" = xno; then
23586    # Now execute the test
23587
23588        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23589        if test -d "$BOOT_JDK"; then
23590          BOOT_JDK_FOUND=maybe
23591          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23592$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23593        fi
23594
23595
23596    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23597    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23598      # Do we have a bin/java?
23599      if test ! -x "$BOOT_JDK/bin/java"; then
23600        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23602        BOOT_JDK_FOUND=no
23603      else
23604        # Do we have a bin/javac?
23605        if test ! -x "$BOOT_JDK/bin/javac"; then
23606          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23608          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23609$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23610          BOOT_JDK_FOUND=no
23611        else
23612          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23613          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23614
23615          # Extra M4 quote needed to protect [] in grep expression.
23616          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23617          if test "x$FOUND_CORRECT_VERSION" = x; then
23618            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23620            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23621$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23622            BOOT_JDK_FOUND=no
23623          else
23624            # We're done! :-)
23625            BOOT_JDK_FOUND=yes
23626
23627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23628
23629  # Input might be given as Windows format, start by converting to
23630  # unix format.
23631  path="$BOOT_JDK"
23632  new_path=`$CYGPATH -u "$path"`
23633
23634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23637  # "foo.exe" is OK but "foo" is an error.
23638  #
23639  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23640  # It is also a way to make sure we got the proper file name for the real test later on.
23641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23642  if test "x$test_shortpath" = x; then
23643    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23644$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23645    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23646  fi
23647
23648  # Call helper function which possibly converts this using DOS-style short mode.
23649  # If so, the updated path is stored in $new_path.
23650
23651  input_path="$new_path"
23652  # Check if we need to convert this using DOS-style short mode. If the path
23653  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23654  # take no chances and rewrite it.
23655  # Note: m4 eats our [], so we need to use [ and ] instead.
23656  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23657  if test "x$has_forbidden_chars" != x; then
23658    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23659    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23660    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23661    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23662      # Going to short mode and back again did indeed matter. Since short mode is
23663      # case insensitive, let's make it lowercase to improve readability.
23664      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23665      # Now convert it back to Unix-stile (cygpath)
23666      input_path=`$CYGPATH -u "$shortmode_path"`
23667      new_path="$input_path"
23668    fi
23669  fi
23670
23671  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23672  if test "x$test_cygdrive_prefix" = x; then
23673    # As a simple fix, exclude /usr/bin since it's not a real path.
23674    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23675      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23676      # a path prefixed by /cygdrive for fixpath to work.
23677      new_path="$CYGWIN_ROOT_PATH$input_path"
23678    fi
23679  fi
23680
23681
23682  if test "x$path" != "x$new_path"; then
23683    BOOT_JDK="$new_path"
23684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23685$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23686  fi
23687
23688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23689
23690  path="$BOOT_JDK"
23691  has_colon=`$ECHO $path | $GREP ^.:`
23692  new_path="$path"
23693  if test "x$has_colon" = x; then
23694    # Not in mixed or Windows style, start by that.
23695    new_path=`cmd //c echo $path`
23696  fi
23697
23698
23699  input_path="$new_path"
23700  # Check if we need to convert this using DOS-style short mode. If the path
23701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23702  # take no chances and rewrite it.
23703  # Note: m4 eats our [], so we need to use [ and ] instead.
23704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23705  if test "x$has_forbidden_chars" != x; then
23706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23707    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23708  fi
23709
23710
23711  windows_path="$new_path"
23712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23713    unix_path=`$CYGPATH -u "$windows_path"`
23714    new_path="$unix_path"
23715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23717    new_path="$unix_path"
23718  fi
23719
23720  if test "x$path" != "x$new_path"; then
23721    BOOT_JDK="$new_path"
23722    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23723$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23724  fi
23725
23726  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23727  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23728
23729  else
23730    # We're on a unix platform. Hooray! :)
23731    path="$BOOT_JDK"
23732    has_space=`$ECHO "$path" | $GREP " "`
23733    if test "x$has_space" != x; then
23734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23736      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23737    fi
23738
23739    # Use eval to expand a potential ~
23740    eval path="$path"
23741    if test ! -f "$path" && test ! -d "$path"; then
23742      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23743    fi
23744
23745    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23746  fi
23747
23748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23749$as_echo_n "checking for Boot JDK... " >&6; }
23750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23751$as_echo "$BOOT_JDK" >&6; }
23752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23753$as_echo_n "checking Boot JDK version... " >&6; }
23754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23756$as_echo "$BOOT_JDK_VERSION" >&6; }
23757          fi # end check jdk version
23758        fi # end check javac
23759      fi # end check java
23760    fi # end check boot jdk found
23761  fi
23762
23763    done
23764  fi
23765
23766
23767    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23768    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23769      # Do we have a bin/java?
23770      if test ! -x "$BOOT_JDK/bin/java"; then
23771        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23773        BOOT_JDK_FOUND=no
23774      else
23775        # Do we have a bin/javac?
23776        if test ! -x "$BOOT_JDK/bin/javac"; then
23777          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23779          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23780$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23781          BOOT_JDK_FOUND=no
23782        else
23783          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23784          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23785
23786          # Extra M4 quote needed to protect [] in grep expression.
23787          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23788          if test "x$FOUND_CORRECT_VERSION" = x; then
23789            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23790$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23791            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23792$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23793            BOOT_JDK_FOUND=no
23794          else
23795            # We're done! :-)
23796            BOOT_JDK_FOUND=yes
23797
23798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23799
23800  # Input might be given as Windows format, start by converting to
23801  # unix format.
23802  path="$BOOT_JDK"
23803  new_path=`$CYGPATH -u "$path"`
23804
23805  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23806  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23807  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23808  # "foo.exe" is OK but "foo" is an error.
23809  #
23810  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23811  # It is also a way to make sure we got the proper file name for the real test later on.
23812  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23813  if test "x$test_shortpath" = x; then
23814    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23815$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23816    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23817  fi
23818
23819  # Call helper function which possibly converts this using DOS-style short mode.
23820  # If so, the updated path is stored in $new_path.
23821
23822  input_path="$new_path"
23823  # Check if we need to convert this using DOS-style short mode. If the path
23824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23825  # take no chances and rewrite it.
23826  # Note: m4 eats our [], so we need to use [ and ] instead.
23827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23828  if test "x$has_forbidden_chars" != x; then
23829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23830    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23831    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23832    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23833      # Going to short mode and back again did indeed matter. Since short mode is
23834      # case insensitive, let's make it lowercase to improve readability.
23835      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23836      # Now convert it back to Unix-stile (cygpath)
23837      input_path=`$CYGPATH -u "$shortmode_path"`
23838      new_path="$input_path"
23839    fi
23840  fi
23841
23842  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23843  if test "x$test_cygdrive_prefix" = x; then
23844    # As a simple fix, exclude /usr/bin since it's not a real path.
23845    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23846      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23847      # a path prefixed by /cygdrive for fixpath to work.
23848      new_path="$CYGWIN_ROOT_PATH$input_path"
23849    fi
23850  fi
23851
23852
23853  if test "x$path" != "x$new_path"; then
23854    BOOT_JDK="$new_path"
23855    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23856$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23857  fi
23858
23859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23860
23861  path="$BOOT_JDK"
23862  has_colon=`$ECHO $path | $GREP ^.:`
23863  new_path="$path"
23864  if test "x$has_colon" = x; then
23865    # Not in mixed or Windows style, start by that.
23866    new_path=`cmd //c echo $path`
23867  fi
23868
23869
23870  input_path="$new_path"
23871  # Check if we need to convert this using DOS-style short mode. If the path
23872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23873  # take no chances and rewrite it.
23874  # Note: m4 eats our [], so we need to use [ and ] instead.
23875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23876  if test "x$has_forbidden_chars" != x; then
23877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23878    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23879  fi
23880
23881
23882  windows_path="$new_path"
23883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23884    unix_path=`$CYGPATH -u "$windows_path"`
23885    new_path="$unix_path"
23886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23888    new_path="$unix_path"
23889  fi
23890
23891  if test "x$path" != "x$new_path"; then
23892    BOOT_JDK="$new_path"
23893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23894$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23895  fi
23896
23897  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23898  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23899
23900  else
23901    # We're on a unix platform. Hooray! :)
23902    path="$BOOT_JDK"
23903    has_space=`$ECHO "$path" | $GREP " "`
23904    if test "x$has_space" != x; then
23905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23906$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23907      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23908    fi
23909
23910    # Use eval to expand a potential ~
23911    eval path="$path"
23912    if test ! -f "$path" && test ! -d "$path"; then
23913      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23914    fi
23915
23916    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23917  fi
23918
23919            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23920$as_echo_n "checking for Boot JDK... " >&6; }
23921            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23922$as_echo "$BOOT_JDK" >&6; }
23923            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23924$as_echo_n "checking Boot JDK version... " >&6; }
23925            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23926            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23927$as_echo "$BOOT_JDK_VERSION" >&6; }
23928          fi # end check jdk version
23929        fi # end check javac
23930      fi # end check java
23931    fi # end check boot jdk found
23932  fi
23933
23934  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23935
23936  if test "x$BOOT_JDK_FOUND" = xno; then
23937    # Now execute the test
23938
23939  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23940  BOOT_JDK_SUFFIX="/Contents/Home"
23941  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23942  if test "x$ALL_JDKS_FOUND" != x; then
23943    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23944
23945  if test "x$BOOT_JDK_FOUND" = xno; then
23946    # Now execute the test
23947
23948        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23949        if test -d "$BOOT_JDK"; then
23950          BOOT_JDK_FOUND=maybe
23951          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23952$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23953        fi
23954
23955
23956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23958      # Do we have a bin/java?
23959      if test ! -x "$BOOT_JDK/bin/java"; then
23960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23962        BOOT_JDK_FOUND=no
23963      else
23964        # Do we have a bin/javac?
23965        if test ! -x "$BOOT_JDK/bin/javac"; then
23966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23970          BOOT_JDK_FOUND=no
23971        else
23972          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23973          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23974
23975          # Extra M4 quote needed to protect [] in grep expression.
23976          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23977          if test "x$FOUND_CORRECT_VERSION" = x; then
23978            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23980            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23981$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23982            BOOT_JDK_FOUND=no
23983          else
23984            # We're done! :-)
23985            BOOT_JDK_FOUND=yes
23986
23987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23988
23989  # Input might be given as Windows format, start by converting to
23990  # unix format.
23991  path="$BOOT_JDK"
23992  new_path=`$CYGPATH -u "$path"`
23993
23994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23997  # "foo.exe" is OK but "foo" is an error.
23998  #
23999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24000  # It is also a way to make sure we got the proper file name for the real test later on.
24001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24002  if test "x$test_shortpath" = x; then
24003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24004$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24005    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24006  fi
24007
24008  # Call helper function which possibly converts this using DOS-style short mode.
24009  # If so, the updated path is stored in $new_path.
24010
24011  input_path="$new_path"
24012  # Check if we need to convert this using DOS-style short mode. If the path
24013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24014  # take no chances and rewrite it.
24015  # Note: m4 eats our [], so we need to use [ and ] instead.
24016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24017  if test "x$has_forbidden_chars" != x; then
24018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24022      # Going to short mode and back again did indeed matter. Since short mode is
24023      # case insensitive, let's make it lowercase to improve readability.
24024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24025      # Now convert it back to Unix-stile (cygpath)
24026      input_path=`$CYGPATH -u "$shortmode_path"`
24027      new_path="$input_path"
24028    fi
24029  fi
24030
24031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24032  if test "x$test_cygdrive_prefix" = x; then
24033    # As a simple fix, exclude /usr/bin since it's not a real path.
24034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24036      # a path prefixed by /cygdrive for fixpath to work.
24037      new_path="$CYGWIN_ROOT_PATH$input_path"
24038    fi
24039  fi
24040
24041
24042  if test "x$path" != "x$new_path"; then
24043    BOOT_JDK="$new_path"
24044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24045$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24046  fi
24047
24048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24049
24050  path="$BOOT_JDK"
24051  has_colon=`$ECHO $path | $GREP ^.:`
24052  new_path="$path"
24053  if test "x$has_colon" = x; then
24054    # Not in mixed or Windows style, start by that.
24055    new_path=`cmd //c echo $path`
24056  fi
24057
24058
24059  input_path="$new_path"
24060  # Check if we need to convert this using DOS-style short mode. If the path
24061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24062  # take no chances and rewrite it.
24063  # Note: m4 eats our [], so we need to use [ and ] instead.
24064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24065  if test "x$has_forbidden_chars" != x; then
24066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24068  fi
24069
24070
24071  windows_path="$new_path"
24072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24073    unix_path=`$CYGPATH -u "$windows_path"`
24074    new_path="$unix_path"
24075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24077    new_path="$unix_path"
24078  fi
24079
24080  if test "x$path" != "x$new_path"; then
24081    BOOT_JDK="$new_path"
24082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24083$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24084  fi
24085
24086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24088
24089  else
24090    # We're on a unix platform. Hooray! :)
24091    path="$BOOT_JDK"
24092    has_space=`$ECHO "$path" | $GREP " "`
24093    if test "x$has_space" != x; then
24094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24095$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24096      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24097    fi
24098
24099    # Use eval to expand a potential ~
24100    eval path="$path"
24101    if test ! -f "$path" && test ! -d "$path"; then
24102      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24103    fi
24104
24105    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24106  fi
24107
24108            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24109$as_echo_n "checking for Boot JDK... " >&6; }
24110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24111$as_echo "$BOOT_JDK" >&6; }
24112            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24113$as_echo_n "checking Boot JDK version... " >&6; }
24114            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24115            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24116$as_echo "$BOOT_JDK_VERSION" >&6; }
24117          fi # end check jdk version
24118        fi # end check javac
24119      fi # end check java
24120    fi # end check boot jdk found
24121  fi
24122
24123    done
24124  fi
24125
24126
24127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24129      # Do we have a bin/java?
24130      if test ! -x "$BOOT_JDK/bin/java"; then
24131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24133        BOOT_JDK_FOUND=no
24134      else
24135        # Do we have a bin/javac?
24136        if test ! -x "$BOOT_JDK/bin/javac"; then
24137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24141          BOOT_JDK_FOUND=no
24142        else
24143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24145
24146          # Extra M4 quote needed to protect [] in grep expression.
24147          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24148          if test "x$FOUND_CORRECT_VERSION" = x; then
24149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24153            BOOT_JDK_FOUND=no
24154          else
24155            # We're done! :-)
24156            BOOT_JDK_FOUND=yes
24157
24158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24159
24160  # Input might be given as Windows format, start by converting to
24161  # unix format.
24162  path="$BOOT_JDK"
24163  new_path=`$CYGPATH -u "$path"`
24164
24165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24168  # "foo.exe" is OK but "foo" is an error.
24169  #
24170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24171  # It is also a way to make sure we got the proper file name for the real test later on.
24172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24173  if test "x$test_shortpath" = x; then
24174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24176    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24177  fi
24178
24179  # Call helper function which possibly converts this using DOS-style short mode.
24180  # If so, the updated path is stored in $new_path.
24181
24182  input_path="$new_path"
24183  # Check if we need to convert this using DOS-style short mode. If the path
24184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24185  # take no chances and rewrite it.
24186  # Note: m4 eats our [], so we need to use [ and ] instead.
24187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24188  if test "x$has_forbidden_chars" != x; then
24189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24193      # Going to short mode and back again did indeed matter. Since short mode is
24194      # case insensitive, let's make it lowercase to improve readability.
24195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24196      # Now convert it back to Unix-stile (cygpath)
24197      input_path=`$CYGPATH -u "$shortmode_path"`
24198      new_path="$input_path"
24199    fi
24200  fi
24201
24202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24203  if test "x$test_cygdrive_prefix" = x; then
24204    # As a simple fix, exclude /usr/bin since it's not a real path.
24205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24207      # a path prefixed by /cygdrive for fixpath to work.
24208      new_path="$CYGWIN_ROOT_PATH$input_path"
24209    fi
24210  fi
24211
24212
24213  if test "x$path" != "x$new_path"; then
24214    BOOT_JDK="$new_path"
24215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24216$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24217  fi
24218
24219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24220
24221  path="$BOOT_JDK"
24222  has_colon=`$ECHO $path | $GREP ^.:`
24223  new_path="$path"
24224  if test "x$has_colon" = x; then
24225    # Not in mixed or Windows style, start by that.
24226    new_path=`cmd //c echo $path`
24227  fi
24228
24229
24230  input_path="$new_path"
24231  # Check if we need to convert this using DOS-style short mode. If the path
24232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24233  # take no chances and rewrite it.
24234  # Note: m4 eats our [], so we need to use [ and ] instead.
24235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24236  if test "x$has_forbidden_chars" != x; then
24237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24239  fi
24240
24241
24242  windows_path="$new_path"
24243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24244    unix_path=`$CYGPATH -u "$windows_path"`
24245    new_path="$unix_path"
24246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24248    new_path="$unix_path"
24249  fi
24250
24251  if test "x$path" != "x$new_path"; then
24252    BOOT_JDK="$new_path"
24253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24254$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24255  fi
24256
24257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24259
24260  else
24261    # We're on a unix platform. Hooray! :)
24262    path="$BOOT_JDK"
24263    has_space=`$ECHO "$path" | $GREP " "`
24264    if test "x$has_space" != x; then
24265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24266$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24267      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24268    fi
24269
24270    # Use eval to expand a potential ~
24271    eval path="$path"
24272    if test ! -f "$path" && test ! -d "$path"; then
24273      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24274    fi
24275
24276    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24277  fi
24278
24279            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24280$as_echo_n "checking for Boot JDK... " >&6; }
24281            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24282$as_echo "$BOOT_JDK" >&6; }
24283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24284$as_echo_n "checking Boot JDK version... " >&6; }
24285            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24286            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24287$as_echo "$BOOT_JDK_VERSION" >&6; }
24288          fi # end check jdk version
24289        fi # end check javac
24290      fi # end check java
24291    fi # end check boot jdk found
24292  fi
24293
24294
24295  if test "x$BOOT_JDK_FOUND" = xno; then
24296    # Now execute the test
24297
24298  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24299  BOOT_JDK_SUFFIX="/Contents/Home"
24300  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24301  if test "x$ALL_JDKS_FOUND" != x; then
24302    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24303
24304  if test "x$BOOT_JDK_FOUND" = xno; then
24305    # Now execute the test
24306
24307        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24308        if test -d "$BOOT_JDK"; then
24309          BOOT_JDK_FOUND=maybe
24310          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24311$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24312        fi
24313
24314
24315    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24316    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24317      # Do we have a bin/java?
24318      if test ! -x "$BOOT_JDK/bin/java"; then
24319        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24320$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24321        BOOT_JDK_FOUND=no
24322      else
24323        # Do we have a bin/javac?
24324        if test ! -x "$BOOT_JDK/bin/javac"; then
24325          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24326$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24327          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24328$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24329          BOOT_JDK_FOUND=no
24330        else
24331          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24332          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24333
24334          # Extra M4 quote needed to protect [] in grep expression.
24335          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24336          if test "x$FOUND_CORRECT_VERSION" = x; then
24337            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24339            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24340$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24341            BOOT_JDK_FOUND=no
24342          else
24343            # We're done! :-)
24344            BOOT_JDK_FOUND=yes
24345
24346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24347
24348  # Input might be given as Windows format, start by converting to
24349  # unix format.
24350  path="$BOOT_JDK"
24351  new_path=`$CYGPATH -u "$path"`
24352
24353  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24354  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24355  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24356  # "foo.exe" is OK but "foo" is an error.
24357  #
24358  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24359  # It is also a way to make sure we got the proper file name for the real test later on.
24360  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24361  if test "x$test_shortpath" = x; then
24362    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24363$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24364    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24365  fi
24366
24367  # Call helper function which possibly converts this using DOS-style short mode.
24368  # If so, the updated path is stored in $new_path.
24369
24370  input_path="$new_path"
24371  # Check if we need to convert this using DOS-style short mode. If the path
24372  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24373  # take no chances and rewrite it.
24374  # Note: m4 eats our [], so we need to use [ and ] instead.
24375  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24376  if test "x$has_forbidden_chars" != x; then
24377    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24378    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24379    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24380    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24381      # Going to short mode and back again did indeed matter. Since short mode is
24382      # case insensitive, let's make it lowercase to improve readability.
24383      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24384      # Now convert it back to Unix-stile (cygpath)
24385      input_path=`$CYGPATH -u "$shortmode_path"`
24386      new_path="$input_path"
24387    fi
24388  fi
24389
24390  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24391  if test "x$test_cygdrive_prefix" = x; then
24392    # As a simple fix, exclude /usr/bin since it's not a real path.
24393    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24394      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24395      # a path prefixed by /cygdrive for fixpath to work.
24396      new_path="$CYGWIN_ROOT_PATH$input_path"
24397    fi
24398  fi
24399
24400
24401  if test "x$path" != "x$new_path"; then
24402    BOOT_JDK="$new_path"
24403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24405  fi
24406
24407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24408
24409  path="$BOOT_JDK"
24410  has_colon=`$ECHO $path | $GREP ^.:`
24411  new_path="$path"
24412  if test "x$has_colon" = x; then
24413    # Not in mixed or Windows style, start by that.
24414    new_path=`cmd //c echo $path`
24415  fi
24416
24417
24418  input_path="$new_path"
24419  # Check if we need to convert this using DOS-style short mode. If the path
24420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24421  # take no chances and rewrite it.
24422  # Note: m4 eats our [], so we need to use [ and ] instead.
24423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24424  if test "x$has_forbidden_chars" != x; then
24425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24426    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24427  fi
24428
24429
24430  windows_path="$new_path"
24431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24432    unix_path=`$CYGPATH -u "$windows_path"`
24433    new_path="$unix_path"
24434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24436    new_path="$unix_path"
24437  fi
24438
24439  if test "x$path" != "x$new_path"; then
24440    BOOT_JDK="$new_path"
24441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24443  fi
24444
24445  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24446  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24447
24448  else
24449    # We're on a unix platform. Hooray! :)
24450    path="$BOOT_JDK"
24451    has_space=`$ECHO "$path" | $GREP " "`
24452    if test "x$has_space" != x; then
24453      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24454$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24455      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24456    fi
24457
24458    # Use eval to expand a potential ~
24459    eval path="$path"
24460    if test ! -f "$path" && test ! -d "$path"; then
24461      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24462    fi
24463
24464    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24465  fi
24466
24467            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24468$as_echo_n "checking for Boot JDK... " >&6; }
24469            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24470$as_echo "$BOOT_JDK" >&6; }
24471            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24472$as_echo_n "checking Boot JDK version... " >&6; }
24473            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24474            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24475$as_echo "$BOOT_JDK_VERSION" >&6; }
24476          fi # end check jdk version
24477        fi # end check javac
24478      fi # end check java
24479    fi # end check boot jdk found
24480  fi
24481
24482    done
24483  fi
24484
24485
24486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24488      # Do we have a bin/java?
24489      if test ! -x "$BOOT_JDK/bin/java"; then
24490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24492        BOOT_JDK_FOUND=no
24493      else
24494        # Do we have a bin/javac?
24495        if test ! -x "$BOOT_JDK/bin/javac"; then
24496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24500          BOOT_JDK_FOUND=no
24501        else
24502          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24503          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24504
24505          # Extra M4 quote needed to protect [] in grep expression.
24506          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24507          if test "x$FOUND_CORRECT_VERSION" = x; then
24508            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24509$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24510            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24511$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24512            BOOT_JDK_FOUND=no
24513          else
24514            # We're done! :-)
24515            BOOT_JDK_FOUND=yes
24516
24517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24518
24519  # Input might be given as Windows format, start by converting to
24520  # unix format.
24521  path="$BOOT_JDK"
24522  new_path=`$CYGPATH -u "$path"`
24523
24524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24527  # "foo.exe" is OK but "foo" is an error.
24528  #
24529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24530  # It is also a way to make sure we got the proper file name for the real test later on.
24531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24532  if test "x$test_shortpath" = x; then
24533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24535    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24536  fi
24537
24538  # Call helper function which possibly converts this using DOS-style short mode.
24539  # If so, the updated path is stored in $new_path.
24540
24541  input_path="$new_path"
24542  # Check if we need to convert this using DOS-style short mode. If the path
24543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24544  # take no chances and rewrite it.
24545  # Note: m4 eats our [], so we need to use [ and ] instead.
24546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24547  if test "x$has_forbidden_chars" != x; then
24548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24552      # Going to short mode and back again did indeed matter. Since short mode is
24553      # case insensitive, let's make it lowercase to improve readability.
24554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24555      # Now convert it back to Unix-stile (cygpath)
24556      input_path=`$CYGPATH -u "$shortmode_path"`
24557      new_path="$input_path"
24558    fi
24559  fi
24560
24561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24562  if test "x$test_cygdrive_prefix" = x; then
24563    # As a simple fix, exclude /usr/bin since it's not a real path.
24564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24566      # a path prefixed by /cygdrive for fixpath to work.
24567      new_path="$CYGWIN_ROOT_PATH$input_path"
24568    fi
24569  fi
24570
24571
24572  if test "x$path" != "x$new_path"; then
24573    BOOT_JDK="$new_path"
24574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24575$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24576  fi
24577
24578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24579
24580  path="$BOOT_JDK"
24581  has_colon=`$ECHO $path | $GREP ^.:`
24582  new_path="$path"
24583  if test "x$has_colon" = x; then
24584    # Not in mixed or Windows style, start by that.
24585    new_path=`cmd //c echo $path`
24586  fi
24587
24588
24589  input_path="$new_path"
24590  # Check if we need to convert this using DOS-style short mode. If the path
24591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24592  # take no chances and rewrite it.
24593  # Note: m4 eats our [], so we need to use [ and ] instead.
24594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24595  if test "x$has_forbidden_chars" != x; then
24596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24598  fi
24599
24600
24601  windows_path="$new_path"
24602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24603    unix_path=`$CYGPATH -u "$windows_path"`
24604    new_path="$unix_path"
24605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24607    new_path="$unix_path"
24608  fi
24609
24610  if test "x$path" != "x$new_path"; then
24611    BOOT_JDK="$new_path"
24612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24614  fi
24615
24616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24618
24619  else
24620    # We're on a unix platform. Hooray! :)
24621    path="$BOOT_JDK"
24622    has_space=`$ECHO "$path" | $GREP " "`
24623    if test "x$has_space" != x; then
24624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24625$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24626      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24627    fi
24628
24629    # Use eval to expand a potential ~
24630    eval path="$path"
24631    if test ! -f "$path" && test ! -d "$path"; then
24632      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24633    fi
24634
24635    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24636  fi
24637
24638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24639$as_echo_n "checking for Boot JDK... " >&6; }
24640            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24641$as_echo "$BOOT_JDK" >&6; }
24642            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24643$as_echo_n "checking Boot JDK version... " >&6; }
24644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24646$as_echo "$BOOT_JDK_VERSION" >&6; }
24647          fi # end check jdk version
24648        fi # end check javac
24649      fi # end check java
24650    fi # end check boot jdk found
24651  fi
24652
24653  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24654
24655  if test "x$BOOT_JDK_FOUND" = xno; then
24656    # Now execute the test
24657
24658  BOOT_JDK_PREFIX="/usr/lib/jvm"
24659  BOOT_JDK_SUFFIX=""
24660  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24661  if test "x$ALL_JDKS_FOUND" != x; then
24662    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24663
24664  if test "x$BOOT_JDK_FOUND" = xno; then
24665    # Now execute the test
24666
24667        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24668        if test -d "$BOOT_JDK"; then
24669          BOOT_JDK_FOUND=maybe
24670          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24671$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24672        fi
24673
24674
24675    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24676    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24677      # Do we have a bin/java?
24678      if test ! -x "$BOOT_JDK/bin/java"; then
24679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24681        BOOT_JDK_FOUND=no
24682      else
24683        # Do we have a bin/javac?
24684        if test ! -x "$BOOT_JDK/bin/javac"; then
24685          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24686$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24687          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24688$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24689          BOOT_JDK_FOUND=no
24690        else
24691          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24692          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24693
24694          # Extra M4 quote needed to protect [] in grep expression.
24695          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24696          if test "x$FOUND_CORRECT_VERSION" = x; then
24697            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24698$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24699            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24700$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24701            BOOT_JDK_FOUND=no
24702          else
24703            # We're done! :-)
24704            BOOT_JDK_FOUND=yes
24705
24706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24707
24708  # Input might be given as Windows format, start by converting to
24709  # unix format.
24710  path="$BOOT_JDK"
24711  new_path=`$CYGPATH -u "$path"`
24712
24713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24716  # "foo.exe" is OK but "foo" is an error.
24717  #
24718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24719  # It is also a way to make sure we got the proper file name for the real test later on.
24720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24721  if test "x$test_shortpath" = x; then
24722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24724    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24725  fi
24726
24727  # Call helper function which possibly converts this using DOS-style short mode.
24728  # If so, the updated path is stored in $new_path.
24729
24730  input_path="$new_path"
24731  # Check if we need to convert this using DOS-style short mode. If the path
24732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24733  # take no chances and rewrite it.
24734  # Note: m4 eats our [], so we need to use [ and ] instead.
24735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24736  if test "x$has_forbidden_chars" != x; then
24737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24741      # Going to short mode and back again did indeed matter. Since short mode is
24742      # case insensitive, let's make it lowercase to improve readability.
24743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24744      # Now convert it back to Unix-stile (cygpath)
24745      input_path=`$CYGPATH -u "$shortmode_path"`
24746      new_path="$input_path"
24747    fi
24748  fi
24749
24750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24751  if test "x$test_cygdrive_prefix" = x; then
24752    # As a simple fix, exclude /usr/bin since it's not a real path.
24753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24755      # a path prefixed by /cygdrive for fixpath to work.
24756      new_path="$CYGWIN_ROOT_PATH$input_path"
24757    fi
24758  fi
24759
24760
24761  if test "x$path" != "x$new_path"; then
24762    BOOT_JDK="$new_path"
24763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24765  fi
24766
24767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24768
24769  path="$BOOT_JDK"
24770  has_colon=`$ECHO $path | $GREP ^.:`
24771  new_path="$path"
24772  if test "x$has_colon" = x; then
24773    # Not in mixed or Windows style, start by that.
24774    new_path=`cmd //c echo $path`
24775  fi
24776
24777
24778  input_path="$new_path"
24779  # Check if we need to convert this using DOS-style short mode. If the path
24780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24781  # take no chances and rewrite it.
24782  # Note: m4 eats our [], so we need to use [ and ] instead.
24783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24784  if test "x$has_forbidden_chars" != x; then
24785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24787  fi
24788
24789
24790  windows_path="$new_path"
24791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24792    unix_path=`$CYGPATH -u "$windows_path"`
24793    new_path="$unix_path"
24794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24796    new_path="$unix_path"
24797  fi
24798
24799  if test "x$path" != "x$new_path"; then
24800    BOOT_JDK="$new_path"
24801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24802$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24803  fi
24804
24805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24807
24808  else
24809    # We're on a unix platform. Hooray! :)
24810    path="$BOOT_JDK"
24811    has_space=`$ECHO "$path" | $GREP " "`
24812    if test "x$has_space" != x; then
24813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24814$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24815      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24816    fi
24817
24818    # Use eval to expand a potential ~
24819    eval path="$path"
24820    if test ! -f "$path" && test ! -d "$path"; then
24821      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24822    fi
24823
24824    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24825  fi
24826
24827            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24828$as_echo_n "checking for Boot JDK... " >&6; }
24829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24830$as_echo "$BOOT_JDK" >&6; }
24831            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24832$as_echo_n "checking Boot JDK version... " >&6; }
24833            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24835$as_echo "$BOOT_JDK_VERSION" >&6; }
24836          fi # end check jdk version
24837        fi # end check javac
24838      fi # end check java
24839    fi # end check boot jdk found
24840  fi
24841
24842    done
24843  fi
24844
24845
24846    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24847    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24848      # Do we have a bin/java?
24849      if test ! -x "$BOOT_JDK/bin/java"; then
24850        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24852        BOOT_JDK_FOUND=no
24853      else
24854        # Do we have a bin/javac?
24855        if test ! -x "$BOOT_JDK/bin/javac"; then
24856          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24858          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24859$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24860          BOOT_JDK_FOUND=no
24861        else
24862          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24863          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24864
24865          # Extra M4 quote needed to protect [] in grep expression.
24866          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24867          if test "x$FOUND_CORRECT_VERSION" = x; then
24868            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24870            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24871$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24872            BOOT_JDK_FOUND=no
24873          else
24874            # We're done! :-)
24875            BOOT_JDK_FOUND=yes
24876
24877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878
24879  # Input might be given as Windows format, start by converting to
24880  # unix format.
24881  path="$BOOT_JDK"
24882  new_path=`$CYGPATH -u "$path"`
24883
24884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24887  # "foo.exe" is OK but "foo" is an error.
24888  #
24889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24890  # It is also a way to make sure we got the proper file name for the real test later on.
24891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24892  if test "x$test_shortpath" = x; then
24893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24896  fi
24897
24898  # Call helper function which possibly converts this using DOS-style short mode.
24899  # If so, the updated path is stored in $new_path.
24900
24901  input_path="$new_path"
24902  # Check if we need to convert this using DOS-style short mode. If the path
24903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24904  # take no chances and rewrite it.
24905  # Note: m4 eats our [], so we need to use [ and ] instead.
24906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24907  if test "x$has_forbidden_chars" != x; then
24908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24912      # Going to short mode and back again did indeed matter. Since short mode is
24913      # case insensitive, let's make it lowercase to improve readability.
24914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24915      # Now convert it back to Unix-stile (cygpath)
24916      input_path=`$CYGPATH -u "$shortmode_path"`
24917      new_path="$input_path"
24918    fi
24919  fi
24920
24921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24922  if test "x$test_cygdrive_prefix" = x; then
24923    # As a simple fix, exclude /usr/bin since it's not a real path.
24924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24926      # a path prefixed by /cygdrive for fixpath to work.
24927      new_path="$CYGWIN_ROOT_PATH$input_path"
24928    fi
24929  fi
24930
24931
24932  if test "x$path" != "x$new_path"; then
24933    BOOT_JDK="$new_path"
24934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24936  fi
24937
24938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24939
24940  path="$BOOT_JDK"
24941  has_colon=`$ECHO $path | $GREP ^.:`
24942  new_path="$path"
24943  if test "x$has_colon" = x; then
24944    # Not in mixed or Windows style, start by that.
24945    new_path=`cmd //c echo $path`
24946  fi
24947
24948
24949  input_path="$new_path"
24950  # Check if we need to convert this using DOS-style short mode. If the path
24951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24952  # take no chances and rewrite it.
24953  # Note: m4 eats our [], so we need to use [ and ] instead.
24954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24955  if test "x$has_forbidden_chars" != x; then
24956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24958  fi
24959
24960
24961  windows_path="$new_path"
24962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24963    unix_path=`$CYGPATH -u "$windows_path"`
24964    new_path="$unix_path"
24965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24967    new_path="$unix_path"
24968  fi
24969
24970  if test "x$path" != "x$new_path"; then
24971    BOOT_JDK="$new_path"
24972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974  fi
24975
24976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24978
24979  else
24980    # We're on a unix platform. Hooray! :)
24981    path="$BOOT_JDK"
24982    has_space=`$ECHO "$path" | $GREP " "`
24983    if test "x$has_space" != x; then
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24986      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24987    fi
24988
24989    # Use eval to expand a potential ~
24990    eval path="$path"
24991    if test ! -f "$path" && test ! -d "$path"; then
24992      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24993    fi
24994
24995    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24996  fi
24997
24998            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24999$as_echo_n "checking for Boot JDK... " >&6; }
25000            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25001$as_echo "$BOOT_JDK" >&6; }
25002            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25003$as_echo_n "checking Boot JDK version... " >&6; }
25004            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25005            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25006$as_echo "$BOOT_JDK_VERSION" >&6; }
25007          fi # end check jdk version
25008        fi # end check javac
25009      fi # end check java
25010    fi # end check boot jdk found
25011  fi
25012
25013  fi
25014
25015
25016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25018      # Do we have a bin/java?
25019      if test ! -x "$BOOT_JDK/bin/java"; then
25020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25022        BOOT_JDK_FOUND=no
25023      else
25024        # Do we have a bin/javac?
25025        if test ! -x "$BOOT_JDK/bin/javac"; then
25026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25030          BOOT_JDK_FOUND=no
25031        else
25032          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25033          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25034
25035          # Extra M4 quote needed to protect [] in grep expression.
25036          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25037          if test "x$FOUND_CORRECT_VERSION" = x; then
25038            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25039$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25040            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25041$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25042            BOOT_JDK_FOUND=no
25043          else
25044            # We're done! :-)
25045            BOOT_JDK_FOUND=yes
25046
25047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25048
25049  # Input might be given as Windows format, start by converting to
25050  # unix format.
25051  path="$BOOT_JDK"
25052  new_path=`$CYGPATH -u "$path"`
25053
25054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25057  # "foo.exe" is OK but "foo" is an error.
25058  #
25059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25060  # It is also a way to make sure we got the proper file name for the real test later on.
25061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25062  if test "x$test_shortpath" = x; then
25063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25066  fi
25067
25068  # Call helper function which possibly converts this using DOS-style short mode.
25069  # If so, the updated path is stored in $new_path.
25070
25071  input_path="$new_path"
25072  # Check if we need to convert this using DOS-style short mode. If the path
25073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25074  # take no chances and rewrite it.
25075  # Note: m4 eats our [], so we need to use [ and ] instead.
25076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25077  if test "x$has_forbidden_chars" != x; then
25078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25082      # Going to short mode and back again did indeed matter. Since short mode is
25083      # case insensitive, let's make it lowercase to improve readability.
25084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25085      # Now convert it back to Unix-stile (cygpath)
25086      input_path=`$CYGPATH -u "$shortmode_path"`
25087      new_path="$input_path"
25088    fi
25089  fi
25090
25091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25092  if test "x$test_cygdrive_prefix" = x; then
25093    # As a simple fix, exclude /usr/bin since it's not a real path.
25094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25096      # a path prefixed by /cygdrive for fixpath to work.
25097      new_path="$CYGWIN_ROOT_PATH$input_path"
25098    fi
25099  fi
25100
25101
25102  if test "x$path" != "x$new_path"; then
25103    BOOT_JDK="$new_path"
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25106  fi
25107
25108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25109
25110  path="$BOOT_JDK"
25111  has_colon=`$ECHO $path | $GREP ^.:`
25112  new_path="$path"
25113  if test "x$has_colon" = x; then
25114    # Not in mixed or Windows style, start by that.
25115    new_path=`cmd //c echo $path`
25116  fi
25117
25118
25119  input_path="$new_path"
25120  # Check if we need to convert this using DOS-style short mode. If the path
25121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25122  # take no chances and rewrite it.
25123  # Note: m4 eats our [], so we need to use [ and ] instead.
25124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25125  if test "x$has_forbidden_chars" != x; then
25126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25128  fi
25129
25130
25131  windows_path="$new_path"
25132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25133    unix_path=`$CYGPATH -u "$windows_path"`
25134    new_path="$unix_path"
25135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25137    new_path="$unix_path"
25138  fi
25139
25140  if test "x$path" != "x$new_path"; then
25141    BOOT_JDK="$new_path"
25142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25144  fi
25145
25146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25148
25149  else
25150    # We're on a unix platform. Hooray! :)
25151    path="$BOOT_JDK"
25152    has_space=`$ECHO "$path" | $GREP " "`
25153    if test "x$has_space" != x; then
25154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25156      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25157    fi
25158
25159    # Use eval to expand a potential ~
25160    eval path="$path"
25161    if test ! -f "$path" && test ! -d "$path"; then
25162      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25163    fi
25164
25165    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25166  fi
25167
25168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25169$as_echo_n "checking for Boot JDK... " >&6; }
25170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25171$as_echo "$BOOT_JDK" >&6; }
25172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25173$as_echo_n "checking Boot JDK version... " >&6; }
25174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25176$as_echo "$BOOT_JDK_VERSION" >&6; }
25177          fi # end check jdk version
25178        fi # end check javac
25179      fi # end check java
25180    fi # end check boot jdk found
25181  fi
25182
25183
25184  # If we haven't found anything yet, we've truly lost. Give up.
25185  if test "x$BOOT_JDK_FOUND" = xno; then
25186
25187  # Print a helpful message on how to acquire the necessary build dependency.
25188  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25189  MISSING_DEPENDENCY=openjdk
25190
25191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25192    cygwin_help $MISSING_DEPENDENCY
25193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25194    msys_help $MISSING_DEPENDENCY
25195  else
25196    PKGHANDLER_COMMAND=
25197
25198    case $PKGHANDLER in
25199      apt-get)
25200        apt_help     $MISSING_DEPENDENCY ;;
25201      yum)
25202        yum_help     $MISSING_DEPENDENCY ;;
25203      port)
25204        port_help    $MISSING_DEPENDENCY ;;
25205      pkgutil)
25206        pkgutil_help $MISSING_DEPENDENCY ;;
25207      pkgadd)
25208        pkgadd_help  $MISSING_DEPENDENCY ;;
25209    esac
25210
25211    if test "x$PKGHANDLER_COMMAND" != x; then
25212      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25213    fi
25214  fi
25215
25216    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25217$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25218    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25219$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25220    as_fn_error $? "Cannot continue" "$LINENO" 5
25221  fi
25222
25223
25224
25225  # Setup tools from the Boot JDK.
25226
25227  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25228
25229  # Publish this variable in the help.
25230
25231
25232  if test "x$JAVA" = x; then
25233    # The variable is not set by user, try to locate tool using the code snippet
25234
25235      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25236$as_echo_n "checking for java in Boot JDK... " >&6; }
25237      JAVA=$BOOT_JDK/bin/java
25238      if test ! -x $JAVA; then
25239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25240$as_echo "not found" >&6; }
25241        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25242$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25243        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25244      fi
25245      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25246$as_echo "ok" >&6; }
25247
25248
25249  else
25250    # The variable is set, but is it from the command line or the environment?
25251
25252    # Try to remove the string !JAVA! from our list.
25253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25255      # If it failed, the variable was not from the command line. Ignore it,
25256      # but warn the user (except for BASH, which is always set by the calling BASH).
25257      if test "xJAVA" != xBASH; then
25258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25259$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25260      fi
25261      # Try to locate tool using the code snippet
25262
25263      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25264$as_echo_n "checking for java in Boot JDK... " >&6; }
25265      JAVA=$BOOT_JDK/bin/java
25266      if test ! -x $JAVA; then
25267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25268$as_echo "not found" >&6; }
25269        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25270$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25271        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25272      fi
25273      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25274$as_echo "ok" >&6; }
25275
25276
25277    else
25278      # If it succeeded, then it was overridden by the user. We will use it
25279      # for the tool.
25280
25281      # First remove it from the list of overridden variables, so we can test
25282      # for unknown variables in the end.
25283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25284
25285      # Check if the provided tool contains a complete path.
25286      tool_specified="$JAVA"
25287      tool_basename="${tool_specified##*/}"
25288      if test "x$tool_basename" = "x$tool_specified"; then
25289        # A command without a complete path is provided, search $PATH.
25290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25291$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25292        # Extract the first word of "$tool_basename", so it can be a program name with args.
25293set dummy $tool_basename; ac_word=$2
25294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25295$as_echo_n "checking for $ac_word... " >&6; }
25296if ${ac_cv_path_JAVA+:} false; then :
25297  $as_echo_n "(cached) " >&6
25298else
25299  case $JAVA in
25300  [\\/]* | ?:[\\/]*)
25301  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25302  ;;
25303  *)
25304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25305for as_dir in $PATH
25306do
25307  IFS=$as_save_IFS
25308  test -z "$as_dir" && as_dir=.
25309    for ac_exec_ext in '' $ac_executable_extensions; do
25310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25311    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25313    break 2
25314  fi
25315done
25316  done
25317IFS=$as_save_IFS
25318
25319  ;;
25320esac
25321fi
25322JAVA=$ac_cv_path_JAVA
25323if test -n "$JAVA"; then
25324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25325$as_echo "$JAVA" >&6; }
25326else
25327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25328$as_echo "no" >&6; }
25329fi
25330
25331
25332        if test "x$JAVA" = x; then
25333          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25334        fi
25335      else
25336        # Otherwise we believe it is a complete path. Use it as it is.
25337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25338$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25340$as_echo_n "checking for JAVA... " >&6; }
25341        if test ! -x "$tool_specified"; then
25342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25343$as_echo "not found" >&6; }
25344          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25345        fi
25346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25347$as_echo "$tool_specified" >&6; }
25348      fi
25349    fi
25350  fi
25351
25352
25353
25354  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25355
25356  # Publish this variable in the help.
25357
25358
25359  if test "x$JAVAC" = x; then
25360    # The variable is not set by user, try to locate tool using the code snippet
25361
25362      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25363$as_echo_n "checking for javac in Boot JDK... " >&6; }
25364      JAVAC=$BOOT_JDK/bin/javac
25365      if test ! -x $JAVAC; then
25366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25367$as_echo "not found" >&6; }
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25369$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25370        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25371      fi
25372      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25373$as_echo "ok" >&6; }
25374
25375
25376  else
25377    # The variable is set, but is it from the command line or the environment?
25378
25379    # Try to remove the string !JAVAC! from our list.
25380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25382      # If it failed, the variable was not from the command line. Ignore it,
25383      # but warn the user (except for BASH, which is always set by the calling BASH).
25384      if test "xJAVAC" != xBASH; then
25385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25386$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25387      fi
25388      # Try to locate tool using the code snippet
25389
25390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25391$as_echo_n "checking for javac in Boot JDK... " >&6; }
25392      JAVAC=$BOOT_JDK/bin/javac
25393      if test ! -x $JAVAC; then
25394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25395$as_echo "not found" >&6; }
25396        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25397$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25398        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25399      fi
25400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25401$as_echo "ok" >&6; }
25402
25403
25404    else
25405      # If it succeeded, then it was overridden by the user. We will use it
25406      # for the tool.
25407
25408      # First remove it from the list of overridden variables, so we can test
25409      # for unknown variables in the end.
25410      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25411
25412      # Check if the provided tool contains a complete path.
25413      tool_specified="$JAVAC"
25414      tool_basename="${tool_specified##*/}"
25415      if test "x$tool_basename" = "x$tool_specified"; then
25416        # A command without a complete path is provided, search $PATH.
25417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25418$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25419        # Extract the first word of "$tool_basename", so it can be a program name with args.
25420set dummy $tool_basename; ac_word=$2
25421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25422$as_echo_n "checking for $ac_word... " >&6; }
25423if ${ac_cv_path_JAVAC+:} false; then :
25424  $as_echo_n "(cached) " >&6
25425else
25426  case $JAVAC in
25427  [\\/]* | ?:[\\/]*)
25428  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25429  ;;
25430  *)
25431  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25432for as_dir in $PATH
25433do
25434  IFS=$as_save_IFS
25435  test -z "$as_dir" && as_dir=.
25436    for ac_exec_ext in '' $ac_executable_extensions; do
25437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25438    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25440    break 2
25441  fi
25442done
25443  done
25444IFS=$as_save_IFS
25445
25446  ;;
25447esac
25448fi
25449JAVAC=$ac_cv_path_JAVAC
25450if test -n "$JAVAC"; then
25451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25452$as_echo "$JAVAC" >&6; }
25453else
25454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25455$as_echo "no" >&6; }
25456fi
25457
25458
25459        if test "x$JAVAC" = x; then
25460          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25461        fi
25462      else
25463        # Otherwise we believe it is a complete path. Use it as it is.
25464        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25465$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25466        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25467$as_echo_n "checking for JAVAC... " >&6; }
25468        if test ! -x "$tool_specified"; then
25469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25470$as_echo "not found" >&6; }
25471          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25472        fi
25473        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25474$as_echo "$tool_specified" >&6; }
25475      fi
25476    fi
25477  fi
25478
25479
25480
25481  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25482
25483  # Publish this variable in the help.
25484
25485
25486  if test "x$JAVAH" = x; then
25487    # The variable is not set by user, try to locate tool using the code snippet
25488
25489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25490$as_echo_n "checking for javah in Boot JDK... " >&6; }
25491      JAVAH=$BOOT_JDK/bin/javah
25492      if test ! -x $JAVAH; then
25493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25494$as_echo "not found" >&6; }
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25496$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25497        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25498      fi
25499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25500$as_echo "ok" >&6; }
25501
25502
25503  else
25504    # The variable is set, but is it from the command line or the environment?
25505
25506    # Try to remove the string !JAVAH! from our list.
25507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25509      # If it failed, the variable was not from the command line. Ignore it,
25510      # but warn the user (except for BASH, which is always set by the calling BASH).
25511      if test "xJAVAH" != xBASH; then
25512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25513$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25514      fi
25515      # Try to locate tool using the code snippet
25516
25517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25518$as_echo_n "checking for javah in Boot JDK... " >&6; }
25519      JAVAH=$BOOT_JDK/bin/javah
25520      if test ! -x $JAVAH; then
25521        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25522$as_echo "not found" >&6; }
25523        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25524$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25525        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25526      fi
25527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25528$as_echo "ok" >&6; }
25529
25530
25531    else
25532      # If it succeeded, then it was overridden by the user. We will use it
25533      # for the tool.
25534
25535      # First remove it from the list of overridden variables, so we can test
25536      # for unknown variables in the end.
25537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25538
25539      # Check if the provided tool contains a complete path.
25540      tool_specified="$JAVAH"
25541      tool_basename="${tool_specified##*/}"
25542      if test "x$tool_basename" = "x$tool_specified"; then
25543        # A command without a complete path is provided, search $PATH.
25544        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25545$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25546        # Extract the first word of "$tool_basename", so it can be a program name with args.
25547set dummy $tool_basename; ac_word=$2
25548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25549$as_echo_n "checking for $ac_word... " >&6; }
25550if ${ac_cv_path_JAVAH+:} false; then :
25551  $as_echo_n "(cached) " >&6
25552else
25553  case $JAVAH in
25554  [\\/]* | ?:[\\/]*)
25555  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25556  ;;
25557  *)
25558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25559for as_dir in $PATH
25560do
25561  IFS=$as_save_IFS
25562  test -z "$as_dir" && as_dir=.
25563    for ac_exec_ext in '' $ac_executable_extensions; do
25564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25565    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25567    break 2
25568  fi
25569done
25570  done
25571IFS=$as_save_IFS
25572
25573  ;;
25574esac
25575fi
25576JAVAH=$ac_cv_path_JAVAH
25577if test -n "$JAVAH"; then
25578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25579$as_echo "$JAVAH" >&6; }
25580else
25581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25582$as_echo "no" >&6; }
25583fi
25584
25585
25586        if test "x$JAVAH" = x; then
25587          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25588        fi
25589      else
25590        # Otherwise we believe it is a complete path. Use it as it is.
25591        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25592$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25593        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25594$as_echo_n "checking for JAVAH... " >&6; }
25595        if test ! -x "$tool_specified"; then
25596          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25597$as_echo "not found" >&6; }
25598          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25599        fi
25600        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25601$as_echo "$tool_specified" >&6; }
25602      fi
25603    fi
25604  fi
25605
25606
25607
25608  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25609
25610  # Publish this variable in the help.
25611
25612
25613  if test "x$JAR" = x; then
25614    # The variable is not set by user, try to locate tool using the code snippet
25615
25616      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25617$as_echo_n "checking for jar in Boot JDK... " >&6; }
25618      JAR=$BOOT_JDK/bin/jar
25619      if test ! -x $JAR; then
25620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25621$as_echo "not found" >&6; }
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25623$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25624        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25625      fi
25626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25627$as_echo "ok" >&6; }
25628
25629
25630  else
25631    # The variable is set, but is it from the command line or the environment?
25632
25633    # Try to remove the string !JAR! from our list.
25634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25636      # If it failed, the variable was not from the command line. Ignore it,
25637      # but warn the user (except for BASH, which is always set by the calling BASH).
25638      if test "xJAR" != xBASH; then
25639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25640$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25641      fi
25642      # Try to locate tool using the code snippet
25643
25644      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25645$as_echo_n "checking for jar in Boot JDK... " >&6; }
25646      JAR=$BOOT_JDK/bin/jar
25647      if test ! -x $JAR; then
25648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25649$as_echo "not found" >&6; }
25650        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25651$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25652        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25653      fi
25654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25655$as_echo "ok" >&6; }
25656
25657
25658    else
25659      # If it succeeded, then it was overridden by the user. We will use it
25660      # for the tool.
25661
25662      # First remove it from the list of overridden variables, so we can test
25663      # for unknown variables in the end.
25664      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25665
25666      # Check if the provided tool contains a complete path.
25667      tool_specified="$JAR"
25668      tool_basename="${tool_specified##*/}"
25669      if test "x$tool_basename" = "x$tool_specified"; then
25670        # A command without a complete path is provided, search $PATH.
25671        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25672$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25673        # Extract the first word of "$tool_basename", so it can be a program name with args.
25674set dummy $tool_basename; ac_word=$2
25675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25676$as_echo_n "checking for $ac_word... " >&6; }
25677if ${ac_cv_path_JAR+:} false; then :
25678  $as_echo_n "(cached) " >&6
25679else
25680  case $JAR in
25681  [\\/]* | ?:[\\/]*)
25682  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25683  ;;
25684  *)
25685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25686for as_dir in $PATH
25687do
25688  IFS=$as_save_IFS
25689  test -z "$as_dir" && as_dir=.
25690    for ac_exec_ext in '' $ac_executable_extensions; do
25691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25692    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25694    break 2
25695  fi
25696done
25697  done
25698IFS=$as_save_IFS
25699
25700  ;;
25701esac
25702fi
25703JAR=$ac_cv_path_JAR
25704if test -n "$JAR"; then
25705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25706$as_echo "$JAR" >&6; }
25707else
25708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25709$as_echo "no" >&6; }
25710fi
25711
25712
25713        if test "x$JAR" = x; then
25714          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25715        fi
25716      else
25717        # Otherwise we believe it is a complete path. Use it as it is.
25718        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25719$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25720        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25721$as_echo_n "checking for JAR... " >&6; }
25722        if test ! -x "$tool_specified"; then
25723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25724$as_echo "not found" >&6; }
25725          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25726        fi
25727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25728$as_echo "$tool_specified" >&6; }
25729      fi
25730    fi
25731  fi
25732
25733
25734
25735  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25736
25737  # Publish this variable in the help.
25738
25739
25740  if test "x$NATIVE2ASCII" = x; then
25741    # The variable is not set by user, try to locate tool using the code snippet
25742
25743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25744$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25745      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25746      if test ! -x $NATIVE2ASCII; then
25747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25748$as_echo "not found" >&6; }
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25750$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25751        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25752      fi
25753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25754$as_echo "ok" >&6; }
25755
25756
25757  else
25758    # The variable is set, but is it from the command line or the environment?
25759
25760    # Try to remove the string !NATIVE2ASCII! from our list.
25761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25763      # If it failed, the variable was not from the command line. Ignore it,
25764      # but warn the user (except for BASH, which is always set by the calling BASH).
25765      if test "xNATIVE2ASCII" != xBASH; then
25766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25767$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25768      fi
25769      # Try to locate tool using the code snippet
25770
25771      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25772$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25773      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25774      if test ! -x $NATIVE2ASCII; then
25775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25776$as_echo "not found" >&6; }
25777        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25778$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25779        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25780      fi
25781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25782$as_echo "ok" >&6; }
25783
25784
25785    else
25786      # If it succeeded, then it was overridden by the user. We will use it
25787      # for the tool.
25788
25789      # First remove it from the list of overridden variables, so we can test
25790      # for unknown variables in the end.
25791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25792
25793      # Check if the provided tool contains a complete path.
25794      tool_specified="$NATIVE2ASCII"
25795      tool_basename="${tool_specified##*/}"
25796      if test "x$tool_basename" = "x$tool_specified"; then
25797        # A command without a complete path is provided, search $PATH.
25798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25799$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25800        # Extract the first word of "$tool_basename", so it can be a program name with args.
25801set dummy $tool_basename; ac_word=$2
25802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25803$as_echo_n "checking for $ac_word... " >&6; }
25804if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25805  $as_echo_n "(cached) " >&6
25806else
25807  case $NATIVE2ASCII in
25808  [\\/]* | ?:[\\/]*)
25809  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25810  ;;
25811  *)
25812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25813for as_dir in $PATH
25814do
25815  IFS=$as_save_IFS
25816  test -z "$as_dir" && as_dir=.
25817    for ac_exec_ext in '' $ac_executable_extensions; do
25818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25819    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25821    break 2
25822  fi
25823done
25824  done
25825IFS=$as_save_IFS
25826
25827  ;;
25828esac
25829fi
25830NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25831if test -n "$NATIVE2ASCII"; then
25832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25833$as_echo "$NATIVE2ASCII" >&6; }
25834else
25835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25836$as_echo "no" >&6; }
25837fi
25838
25839
25840        if test "x$NATIVE2ASCII" = x; then
25841          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25842        fi
25843      else
25844        # Otherwise we believe it is a complete path. Use it as it is.
25845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25846$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25848$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25849        if test ! -x "$tool_specified"; then
25850          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25851$as_echo "not found" >&6; }
25852          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25853        fi
25854        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25855$as_echo "$tool_specified" >&6; }
25856      fi
25857    fi
25858  fi
25859
25860
25861
25862  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25863
25864  # Publish this variable in the help.
25865
25866
25867  if test "x$JARSIGNER" = x; then
25868    # The variable is not set by user, try to locate tool using the code snippet
25869
25870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25871$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25872      JARSIGNER=$BOOT_JDK/bin/jarsigner
25873      if test ! -x $JARSIGNER; then
25874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25875$as_echo "not found" >&6; }
25876        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25877$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25878        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25879      fi
25880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25881$as_echo "ok" >&6; }
25882
25883
25884  else
25885    # The variable is set, but is it from the command line or the environment?
25886
25887    # Try to remove the string !JARSIGNER! from our list.
25888    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25889    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25890      # If it failed, the variable was not from the command line. Ignore it,
25891      # but warn the user (except for BASH, which is always set by the calling BASH).
25892      if test "xJARSIGNER" != xBASH; then
25893        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25894$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25895      fi
25896      # Try to locate tool using the code snippet
25897
25898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25899$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25900      JARSIGNER=$BOOT_JDK/bin/jarsigner
25901      if test ! -x $JARSIGNER; then
25902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25903$as_echo "not found" >&6; }
25904        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25905$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25906        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25907      fi
25908      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25909$as_echo "ok" >&6; }
25910
25911
25912    else
25913      # If it succeeded, then it was overridden by the user. We will use it
25914      # for the tool.
25915
25916      # First remove it from the list of overridden variables, so we can test
25917      # for unknown variables in the end.
25918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25919
25920      # Check if the provided tool contains a complete path.
25921      tool_specified="$JARSIGNER"
25922      tool_basename="${tool_specified##*/}"
25923      if test "x$tool_basename" = "x$tool_specified"; then
25924        # A command without a complete path is provided, search $PATH.
25925        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25926$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25927        # Extract the first word of "$tool_basename", so it can be a program name with args.
25928set dummy $tool_basename; ac_word=$2
25929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25930$as_echo_n "checking for $ac_word... " >&6; }
25931if ${ac_cv_path_JARSIGNER+:} false; then :
25932  $as_echo_n "(cached) " >&6
25933else
25934  case $JARSIGNER in
25935  [\\/]* | ?:[\\/]*)
25936  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25937  ;;
25938  *)
25939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25940for as_dir in $PATH
25941do
25942  IFS=$as_save_IFS
25943  test -z "$as_dir" && as_dir=.
25944    for ac_exec_ext in '' $ac_executable_extensions; do
25945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25946    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25948    break 2
25949  fi
25950done
25951  done
25952IFS=$as_save_IFS
25953
25954  ;;
25955esac
25956fi
25957JARSIGNER=$ac_cv_path_JARSIGNER
25958if test -n "$JARSIGNER"; then
25959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25960$as_echo "$JARSIGNER" >&6; }
25961else
25962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25963$as_echo "no" >&6; }
25964fi
25965
25966
25967        if test "x$JARSIGNER" = x; then
25968          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25969        fi
25970      else
25971        # Otherwise we believe it is a complete path. Use it as it is.
25972        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25973$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25975$as_echo_n "checking for JARSIGNER... " >&6; }
25976        if test ! -x "$tool_specified"; then
25977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25978$as_echo "not found" >&6; }
25979          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25980        fi
25981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25982$as_echo "$tool_specified" >&6; }
25983      fi
25984    fi
25985  fi
25986
25987
25988
25989  # Finally, set some other options...
25990
25991  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
25992  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
25993
25994
25995
25996
25997###############################################################################
25998#
25999# Configure the sources to use. We can add or override individual directories.
26000#
26001###############################################################################
26002
26003
26004  # Where are the sources. Any of these can be overridden
26005  # using --with-override-corba and the likes.
26006  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26007  CORBA_TOPDIR="$SRC_ROOT/corba"
26008  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26009  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26010  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26011  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26012  JDK_TOPDIR="$SRC_ROOT/jdk"
26013
26014
26015
26016
26017
26018
26019
26020
26021
26022
26023  ###############################################################################
26024  #
26025  # Pickup additional source for a component from outside of the source root
26026  # or override source for a component.
26027  #
26028
26029# Check whether --with-add-source-root was given.
26030if test "${with_add_source_root+set}" = set; then :
26031  withval=$with_add_source_root;
26032fi
26033
26034
26035
26036# Check whether --with-override-source-root was given.
26037if test "${with_override_source_root+set}" = set; then :
26038  withval=$with_override_source_root;
26039fi
26040
26041
26042
26043# Check whether --with-adds-and-overrides was given.
26044if test "${with_adds_and_overrides+set}" = set; then :
26045  withval=$with_adds_and_overrides;
26046fi
26047
26048
26049  if test "x$with_adds_and_overrides" != x; then
26050    with_add_source_root="$with_adds_and_overrides/adds"
26051    with_override_source_root="$with_adds_and_overrides/overrides"
26052  fi
26053
26054  if test "x$with_add_source_root" != x; then
26055    if ! test -d $with_add_source_root; then
26056      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26057    fi
26058    CURDIR="$PWD"
26059    cd "$with_add_source_root"
26060    ADD_SRC_ROOT="`pwd`"
26061    cd "$CURDIR"
26062    # Verify that the addon source root does not have any root makefiles.
26063    # If it does, then it is usually an error, prevent this.
26064    if test -f $with_add_source_root/langtools/make/Makefile; then
26065      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
26066    fi
26067    if test -f $with_add_source_root/corba/make/Makefile; then
26068      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
26069    fi
26070    if test -f $with_add_source_root/jaxp/make/Makefile; then
26071      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
26072    fi
26073    if test -f $with_add_source_root/jaxws/make/Makefile; then
26074      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
26075    fi
26076    if test -f $with_add_source_root/hotspot/make/Makefile; then
26077      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
26078    fi
26079    if test -f $with_add_source_root/nashorn/make/Makefile; then
26080      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
26081    fi
26082    if test -f $with_add_source_root/jdk/make/Makefile; then
26083      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
26084    fi
26085  fi
26086
26087
26088  if test "x$with_override_source_root" != x; then
26089    if ! test -d $with_override_source_root; then
26090      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26091    fi
26092    CURDIR="$PWD"
26093    cd "$with_override_source_root"
26094    OVERRIDE_SRC_ROOT="`pwd`"
26095    cd "$CURDIR"
26096    if test -f $with_override_source_root/langtools/make/Makefile; then
26097      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
26098    fi
26099    if test -f $with_override_source_root/corba/make/Makefile; then
26100      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
26101    fi
26102    if test -f $with_override_source_root/jaxp/make/Makefile; then
26103      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
26104    fi
26105    if test -f $with_override_source_root/jaxws/make/Makefile; then
26106      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
26107    fi
26108    if test -f $with_override_source_root/hotspot/make/Makefile; then
26109      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
26110    fi
26111    if test -f $with_override_source_root/nashorn/make/Makefile; then
26112      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
26113    fi
26114    if test -f $with_override_source_root/jdk/make/Makefile; then
26115      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
26116    fi
26117  fi
26118
26119
26120  ###############################################################################
26121  #
26122  # Override a repo completely, this is used for example when you have 3 small
26123  # development sandboxes of the langtools sources and want to avoid having 3 full
26124  # OpenJDK sources checked out on disk.
26125  #
26126  # Assuming that the 3 langtools sandboxes are located here:
26127  # /home/fredrik/sandbox1/langtools
26128  # /home/fredrik/sandbox2/langtools
26129  # /home/fredrik/sandbox3/langtools
26130  #
26131  # From the source root you create build subdirs manually:
26132  #     mkdir -p build1 build2 build3
26133  # in each build directory run:
26134  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26135  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26136  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26137  #
26138
26139
26140# Check whether --with-override-langtools was given.
26141if test "${with_override_langtools+set}" = set; then :
26142  withval=$with_override_langtools;
26143fi
26144
26145
26146
26147# Check whether --with-override-corba was given.
26148if test "${with_override_corba+set}" = set; then :
26149  withval=$with_override_corba;
26150fi
26151
26152
26153
26154# Check whether --with-override-jaxp was given.
26155if test "${with_override_jaxp+set}" = set; then :
26156  withval=$with_override_jaxp;
26157fi
26158
26159
26160
26161# Check whether --with-override-jaxws was given.
26162if test "${with_override_jaxws+set}" = set; then :
26163  withval=$with_override_jaxws;
26164fi
26165
26166
26167
26168# Check whether --with-override-hotspot was given.
26169if test "${with_override_hotspot+set}" = set; then :
26170  withval=$with_override_hotspot;
26171fi
26172
26173
26174
26175# Check whether --with-override-nashorn was given.
26176if test "${with_override_nashorn+set}" = set; then :
26177  withval=$with_override_nashorn;
26178fi
26179
26180
26181
26182# Check whether --with-override-jdk was given.
26183if test "${with_override_jdk+set}" = set; then :
26184  withval=$with_override_jdk;
26185fi
26186
26187
26188  if test "x$with_override_langtools" != x; then
26189    CURDIR="$PWD"
26190    cd "$with_override_langtools"
26191    LANGTOOLS_TOPDIR="`pwd`"
26192    cd "$CURDIR"
26193    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26194      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26195    fi
26196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26197$as_echo_n "checking if langtools should be overridden... " >&6; }
26198    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26199$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26200  fi
26201  if test "x$with_override_corba" != x; then
26202    CURDIR="$PWD"
26203    cd "$with_override_corba"
26204    CORBA_TOPDIR="`pwd`"
26205    cd "$CURDIR"
26206    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26207      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26208    fi
26209    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26210$as_echo_n "checking if corba should be overridden... " >&6; }
26211    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26212$as_echo "yes with $CORBA_TOPDIR" >&6; }
26213  fi
26214  if test "x$with_override_jaxp" != x; then
26215    CURDIR="$PWD"
26216    cd "$with_override_jaxp"
26217    JAXP_TOPDIR="`pwd`"
26218    cd "$CURDIR"
26219    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26220      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26221    fi
26222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26223$as_echo_n "checking if jaxp should be overridden... " >&6; }
26224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26225$as_echo "yes with $JAXP_TOPDIR" >&6; }
26226  fi
26227  if test "x$with_override_jaxws" != x; then
26228    CURDIR="$PWD"
26229    cd "$with_override_jaxws"
26230    JAXWS_TOPDIR="`pwd`"
26231    cd "$CURDIR"
26232    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26233      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26234    fi
26235    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26236$as_echo_n "checking if jaxws should be overridden... " >&6; }
26237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26238$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26239  fi
26240  if test "x$with_override_hotspot" != x; then
26241    CURDIR="$PWD"
26242    cd "$with_override_hotspot"
26243    HOTSPOT_TOPDIR="`pwd`"
26244    cd "$CURDIR"
26245    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26246      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26247    fi
26248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26249$as_echo_n "checking if hotspot should be overridden... " >&6; }
26250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26251$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26252  fi
26253  if test "x$with_override_nashorn" != x; then
26254    CURDIR="$PWD"
26255    cd "$with_override_nashorn"
26256    NASHORN_TOPDIR="`pwd`"
26257    cd "$CURDIR"
26258    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26259      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26260    fi
26261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26262$as_echo_n "checking if nashorn should be overridden... " >&6; }
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26264$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26265  fi
26266  if test "x$with_override_jdk" != x; then
26267    CURDIR="$PWD"
26268    cd "$with_override_jdk"
26269    JDK_TOPDIR="`pwd`"
26270    cd "$CURDIR"
26271    if ! test -f $JDK_TOPDIR/make/Makefile; then
26272      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26273    fi
26274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26275$as_echo_n "checking if JDK should be overridden... " >&6; }
26276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26277$as_echo "yes with $JDK_TOPDIR" >&6; }
26278  fi
26279
26280
26281  BUILD_OUTPUT="$OUTPUT_ROOT"
26282
26283
26284  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26285  BUILD_HOTSPOT=true
26286
26287
26288
26289# Check whether --with-import-hotspot was given.
26290if test "${with_import_hotspot+set}" = set; then :
26291  withval=$with_import_hotspot;
26292fi
26293
26294  if test "x$with_import_hotspot" != x; then
26295    CURDIR="$PWD"
26296    cd "$with_import_hotspot"
26297    HOTSPOT_DIST="`pwd`"
26298    cd "$CURDIR"
26299    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26300      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26301    fi
26302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26303$as_echo_n "checking if hotspot should be imported... " >&6; }
26304    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26305$as_echo "yes from $HOTSPOT_DIST" >&6; }
26306    BUILD_HOTSPOT=false
26307  fi
26308
26309  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26310
26311
26312###############################################################################
26313#
26314# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26315# native code.
26316#
26317###############################################################################
26318
26319# First determine the toolchain type (compiler family)
26320
26321
26322# Check whether --with-toolchain-type was given.
26323if test "${with_toolchain_type+set}" = set; then :
26324  withval=$with_toolchain_type;
26325fi
26326
26327
26328  # Use indirect variable referencing
26329  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26330  VALID_TOOLCHAINS=${!toolchain_var_name}
26331
26332  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26333    if test -n "$XCODEBUILD"; then
26334      # On Mac OS X, default toolchain to clang after Xcode 5
26335      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26336      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26337      if test $? -ne 0; then
26338        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26339      fi
26340      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26341          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26342          $CUT -f 1 -d .`
26343      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26344$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26345      if test $XCODE_MAJOR_VERSION -ge 5; then
26346          DEFAULT_TOOLCHAIN="clang"
26347      else
26348          DEFAULT_TOOLCHAIN="gcc"
26349      fi
26350    else
26351      # If Xcode is not installed, but the command line tools are
26352      # then we can't run xcodebuild. On these systems we should
26353      # default to clang
26354      DEFAULT_TOOLCHAIN="clang"
26355    fi
26356  else
26357    # First toolchain type in the list is the default
26358    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26359  fi
26360
26361  if test "x$with_toolchain_type" = xlist; then
26362    # List all toolchains
26363    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26364$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26365    for toolchain in $VALID_TOOLCHAINS; do
26366      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26367      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26368      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26369    done
26370
26371    exit 0
26372  elif test "x$with_toolchain_type" != x; then
26373    # User override; check that it is valid
26374    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26375      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26376$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26377      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26378$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26379      as_fn_error $? "Cannot continue." "$LINENO" 5
26380    fi
26381    TOOLCHAIN_TYPE=$with_toolchain_type
26382  else
26383    # No flag given, use default
26384    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26385  fi
26386
26387
26388  TOOLCHAIN_CC_BINARY_clang="clang"
26389  TOOLCHAIN_CC_BINARY_gcc="gcc"
26390  TOOLCHAIN_CC_BINARY_microsoft="cl"
26391  TOOLCHAIN_CC_BINARY_solstudio="cc"
26392  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26393
26394  TOOLCHAIN_CXX_BINARY_clang="clang++"
26395  TOOLCHAIN_CXX_BINARY_gcc="g++"
26396  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26397  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26398  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26399
26400  # Use indirect variable referencing
26401  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26402  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26403  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26404  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26405  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26406  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26407
26408
26409  # Define filename patterns
26410  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26411    LIBRARY_PREFIX=
26412    SHARED_LIBRARY_SUFFIX='.dll'
26413    STATIC_LIBRARY_SUFFIX='.lib'
26414    SHARED_LIBRARY='$1.dll'
26415    STATIC_LIBRARY='$1.lib'
26416    OBJ_SUFFIX='.obj'
26417    EXE_SUFFIX='.exe'
26418  else
26419    LIBRARY_PREFIX=lib
26420    SHARED_LIBRARY_SUFFIX='.so'
26421    STATIC_LIBRARY_SUFFIX='.a'
26422    SHARED_LIBRARY='lib$1.so'
26423    STATIC_LIBRARY='lib$1.a'
26424    OBJ_SUFFIX='.o'
26425    EXE_SUFFIX=''
26426    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26427      SHARED_LIBRARY='lib$1.dylib'
26428      SHARED_LIBRARY_SUFFIX='.dylib'
26429    fi
26430  fi
26431
26432
26433
26434
26435
26436
26437
26438
26439
26440
26441  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26442    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26443$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26444  else
26445    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26446$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26447  fi
26448
26449
26450# Then detect the actual binaries needed
26451
26452  # FIXME: Is this needed?
26453  ac_ext=cpp
26454ac_cpp='$CXXCPP $CPPFLAGS'
26455ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26456ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26457ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26458
26459
26460  # Store the CFLAGS etc passed to the configure script.
26461  ORG_CFLAGS="$CFLAGS"
26462  ORG_CXXFLAGS="$CXXFLAGS"
26463  ORG_OBJCFLAGS="$OBJCFLAGS"
26464
26465  # On Windows, we need to detect the visual studio installation first.
26466  # This will change the PATH, but we need to keep that new PATH even
26467  # after toolchain detection is done, since the compiler (on x86) uses
26468  # it for DLL resolution in runtime.
26469  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26470
26471  # Store path to cygwin link.exe to help excluding it when searching for
26472  # VS linker. This must be done before changing the PATH when looking for VS.
26473  # Extract the first word of "link", so it can be a program name with args.
26474set dummy link; ac_word=$2
26475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26476$as_echo_n "checking for $ac_word... " >&6; }
26477if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26478  $as_echo_n "(cached) " >&6
26479else
26480  case $CYGWIN_LINK in
26481  [\\/]* | ?:[\\/]*)
26482  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26483  ;;
26484  *)
26485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26486for as_dir in $PATH
26487do
26488  IFS=$as_save_IFS
26489  test -z "$as_dir" && as_dir=.
26490    for ac_exec_ext in '' $ac_executable_extensions; do
26491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26492    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26494    break 2
26495  fi
26496done
26497  done
26498IFS=$as_save_IFS
26499
26500  ;;
26501esac
26502fi
26503CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26504if test -n "$CYGWIN_LINK"; then
26505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26506$as_echo "$CYGWIN_LINK" >&6; }
26507else
26508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26509$as_echo "no" >&6; }
26510fi
26511
26512
26513  if test "x$CYGWIN_LINK" != x; then
26514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26515$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26516    "$CYGWIN_LINK" --version > /dev/null
26517    if test $? -eq 0 ; then
26518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26519$as_echo "yes" >&6; }
26520    else
26521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26522$as_echo "no" >&6; }
26523      # This might be the VS linker. Don't exclude it later on.
26524      CYGWIN_LINK=""
26525    fi
26526  fi
26527
26528  # First-hand choice is to locate and run the vsvars bat file.
26529
26530
26531# Check whether --with-toolchain-version was given.
26532if test "${with_toolchain_version+set}" = set; then :
26533  withval=$with_toolchain_version;
26534fi
26535
26536
26537  if test "x$with_toolchain_version" = xlist; then
26538    # List all toolchains
26539    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26540$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26541    for version in $VALID_VS_VERSIONS; do
26542      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26543      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26544    done
26545
26546    exit 0
26547  elif test "x$with_toolchain_version" != x; then
26548    # User override; check that it is valid
26549    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26550      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26551$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26552      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26553$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26554      as_fn_error $? "Cannot continue." "$LINENO" 5
26555    fi
26556    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26557  else
26558    # No flag given, use default
26559    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26560  fi
26561
26562  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26563
26564  VS_VERSION="$VS_VERSION"
26565  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26566  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26567  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26568  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26569
26570  # When using --with-tools-dir, assume it points to the correct and default
26571  # version of Visual Studio or that --with-toolchain-version was also set.
26572  if test "x$with_tools_dir" != x; then
26573
26574  if test "x$VS_ENV_CMD" = x; then
26575    VS_VERSION="${VS_VERSION}"
26576    VS_BASE="$with_tools_dir/../.."
26577    METHOD="--with-tools-dir"
26578
26579    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26580      VCVARSFILE="vc/bin/vcvars32.bat"
26581    else
26582      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26583    fi
26584
26585
26586  windows_path="$VS_BASE"
26587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26588    unix_path=`$CYGPATH -u "$windows_path"`
26589    VS_BASE="$unix_path"
26590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26592    VS_BASE="$unix_path"
26593  fi
26594
26595    if test -d "$VS_BASE"; then
26596      if test -f "$VS_BASE/$VCVARSFILE"; then
26597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26598$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26599        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26600        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26601        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26602        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26603      else
26604        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26605$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26606        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26607$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26608      fi
26609    fi
26610  fi
26611
26612
26613  if test "x$VS_ENV_CMD" = x; then
26614    VS_VERSION="${VS_VERSION}"
26615    VS_BASE="$with_tools_dir/../../.."
26616    METHOD="--with-tools-dir"
26617
26618    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26619      VCVARSFILE="vc/bin/vcvars32.bat"
26620    else
26621      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26622    fi
26623
26624
26625  windows_path="$VS_BASE"
26626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26627    unix_path=`$CYGPATH -u "$windows_path"`
26628    VS_BASE="$unix_path"
26629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26631    VS_BASE="$unix_path"
26632  fi
26633
26634    if test -d "$VS_BASE"; then
26635      if test -f "$VS_BASE/$VCVARSFILE"; then
26636        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26637$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26638        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26639        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26640        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26641        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26642      else
26643        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26644$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26645        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26646$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26647      fi
26648    fi
26649  fi
26650
26651    if test "x$VS_ENV_CMD" = x; then
26652      # Having specified an argument which is incorrect will produce an instant failure;
26653      # we should not go on looking
26654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26655$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26656      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26657$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26658      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26659$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26660      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26661    fi
26662  fi
26663
26664  VS_ENV_CMD=""
26665  VS_ENV_ARGS=""
26666
26667  if test "x$VS_COMNTOOLS" != x; then
26668
26669  if test "x$VS_ENV_CMD" = x; then
26670    VS_VERSION="${VS_VERSION}"
26671    VS_BASE="$VS_COMNTOOLS/../.."
26672    METHOD="$VS_COMNTOOLS_VAR variable"
26673
26674    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26675      VCVARSFILE="vc/bin/vcvars32.bat"
26676    else
26677      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26678    fi
26679
26680
26681  windows_path="$VS_BASE"
26682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26683    unix_path=`$CYGPATH -u "$windows_path"`
26684    VS_BASE="$unix_path"
26685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26687    VS_BASE="$unix_path"
26688  fi
26689
26690    if test -d "$VS_BASE"; then
26691      if test -f "$VS_BASE/$VCVARSFILE"; then
26692        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26693$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26694        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26695        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26696        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26697        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26698      else
26699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26700$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26701        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26702$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26703      fi
26704    fi
26705  fi
26706
26707  fi
26708  if test "x$PROGRAMFILES" != x; then
26709
26710  if test "x$VS_ENV_CMD" = x; then
26711    VS_VERSION="${VS_VERSION}"
26712    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26713    METHOD="well-known name"
26714
26715    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26716      VCVARSFILE="vc/bin/vcvars32.bat"
26717    else
26718      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26719    fi
26720
26721
26722  windows_path="$VS_BASE"
26723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26724    unix_path=`$CYGPATH -u "$windows_path"`
26725    VS_BASE="$unix_path"
26726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26728    VS_BASE="$unix_path"
26729  fi
26730
26731    if test -d "$VS_BASE"; then
26732      if test -f "$VS_BASE/$VCVARSFILE"; then
26733        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26734$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26735        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26736        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26737        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26738        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26739      else
26740        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26741$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26742        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26743$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26744      fi
26745    fi
26746  fi
26747
26748  fi
26749  # Work around the insanely named ProgramFiles(x86) env variable
26750  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26751  if test "x$PROGRAMFILES_X86" != x; then
26752
26753  if test "x$VS_ENV_CMD" = x; then
26754    VS_VERSION="${VS_VERSION}"
26755    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26756    METHOD="well-known name"
26757
26758    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26759      VCVARSFILE="vc/bin/vcvars32.bat"
26760    else
26761      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26762    fi
26763
26764
26765  windows_path="$VS_BASE"
26766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26767    unix_path=`$CYGPATH -u "$windows_path"`
26768    VS_BASE="$unix_path"
26769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26771    VS_BASE="$unix_path"
26772  fi
26773
26774    if test -d "$VS_BASE"; then
26775      if test -f "$VS_BASE/$VCVARSFILE"; then
26776        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26777$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26778        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26779        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26780        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26781        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26782      else
26783        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26784$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26785        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26786$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26787      fi
26788    fi
26789  fi
26790
26791  fi
26792
26793  if test "x$VS_ENV_CMD" = x; then
26794    VS_VERSION="${VS_VERSION}"
26795    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26796    METHOD="well-known name"
26797
26798    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26799      VCVARSFILE="vc/bin/vcvars32.bat"
26800    else
26801      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26802    fi
26803
26804
26805  windows_path="$VS_BASE"
26806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26807    unix_path=`$CYGPATH -u "$windows_path"`
26808    VS_BASE="$unix_path"
26809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26811    VS_BASE="$unix_path"
26812  fi
26813
26814    if test -d "$VS_BASE"; then
26815      if test -f "$VS_BASE/$VCVARSFILE"; then
26816        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26817$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26818        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26819        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26820        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26821        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26822      else
26823        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26824$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26825        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26826$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26827      fi
26828    fi
26829  fi
26830
26831
26832  if test "x$VS_ENV_CMD" = x; then
26833    VS_VERSION="${VS_VERSION}"
26834    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
26835    METHOD="well-known name"
26836
26837    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26838      VCVARSFILE="vc/bin/vcvars32.bat"
26839    else
26840      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26841    fi
26842
26843
26844  windows_path="$VS_BASE"
26845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26846    unix_path=`$CYGPATH -u "$windows_path"`
26847    VS_BASE="$unix_path"
26848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26850    VS_BASE="$unix_path"
26851  fi
26852
26853    if test -d "$VS_BASE"; then
26854      if test -f "$VS_BASE/$VCVARSFILE"; then
26855        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26856$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26857        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26858        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26859        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26860        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26861      else
26862        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26863$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26864        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26865$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26866      fi
26867    fi
26868  fi
26869
26870
26871  if test "x$SDK_INSTALL_DIR" != x; then
26872    if test "x$ProgramW6432" != x; then
26873
26874  if test "x$VS_ENV_CMD" = x; then
26875    VS_VERSION="${VS_VERSION}"
26876    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
26877    METHOD="well-known name"
26878
26879  windows_path="$WIN_SDK_BASE"
26880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26881    unix_path=`$CYGPATH -u "$windows_path"`
26882    WIN_SDK_BASE="$unix_path"
26883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26885    WIN_SDK_BASE="$unix_path"
26886  fi
26887
26888    if test -d "$WIN_SDK_BASE"; then
26889      # There have been cases of partial or broken SDK installations. A missing
26890      # lib dir is not going to work.
26891      if test ! -d "$WIN_SDK_BASE/lib"; then
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26893$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26894        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26895$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26896      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26897        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26898$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26899        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26900        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26901          VS_ENV_ARGS="/x86"
26902        else
26903          VS_ENV_ARGS="/x64"
26904        fi
26905        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26906        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26907        # TODO: improve detection for other versions of SDK
26908        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26909      else
26910        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26911$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26912        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26913$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26914      fi
26915    fi
26916  fi
26917
26918    fi
26919    if test "x$PROGRAMW6432" != x; then
26920
26921  if test "x$VS_ENV_CMD" = x; then
26922    VS_VERSION="${VS_VERSION}"
26923    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
26924    METHOD="well-known name"
26925
26926  windows_path="$WIN_SDK_BASE"
26927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26928    unix_path=`$CYGPATH -u "$windows_path"`
26929    WIN_SDK_BASE="$unix_path"
26930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26932    WIN_SDK_BASE="$unix_path"
26933  fi
26934
26935    if test -d "$WIN_SDK_BASE"; then
26936      # There have been cases of partial or broken SDK installations. A missing
26937      # lib dir is not going to work.
26938      if test ! -d "$WIN_SDK_BASE/lib"; then
26939        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26940$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26942$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26943      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26945$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26946        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26947        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26948          VS_ENV_ARGS="/x86"
26949        else
26950          VS_ENV_ARGS="/x64"
26951        fi
26952        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26953        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
26954        # TODO: improve detection for other versions of SDK
26955        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
26956      else
26957        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26958$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26959        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26960$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26961      fi
26962    fi
26963  fi
26964
26965    fi
26966    if test "x$PROGRAMFILES" != x; then
26967
26968  if test "x$VS_ENV_CMD" = x; then
26969    VS_VERSION="${VS_VERSION}"
26970    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
26971    METHOD="well-known name"
26972
26973  windows_path="$WIN_SDK_BASE"
26974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26975    unix_path=`$CYGPATH -u "$windows_path"`
26976    WIN_SDK_BASE="$unix_path"
26977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26979    WIN_SDK_BASE="$unix_path"
26980  fi
26981
26982    if test -d "$WIN_SDK_BASE"; then
26983      # There have been cases of partial or broken SDK installations. A missing
26984      # lib dir is not going to work.
26985      if test ! -d "$WIN_SDK_BASE/lib"; then
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26987$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26988        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26989$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26990      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
26991        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26992$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26993        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
26994        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26995          VS_ENV_ARGS="/x86"
26996        else
26997          VS_ENV_ARGS="/x64"
26998        fi
26999        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27000        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27001        # TODO: improve detection for other versions of SDK
27002        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27003      else
27004        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27005$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27006        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27007$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27008      fi
27009    fi
27010  fi
27011
27012    fi
27013
27014  if test "x$VS_ENV_CMD" = x; then
27015    VS_VERSION="${VS_VERSION}"
27016    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27017    METHOD="well-known name"
27018
27019  windows_path="$WIN_SDK_BASE"
27020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27021    unix_path=`$CYGPATH -u "$windows_path"`
27022    WIN_SDK_BASE="$unix_path"
27023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27025    WIN_SDK_BASE="$unix_path"
27026  fi
27027
27028    if test -d "$WIN_SDK_BASE"; then
27029      # There have been cases of partial or broken SDK installations. A missing
27030      # lib dir is not going to work.
27031      if test ! -d "$WIN_SDK_BASE/lib"; then
27032        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27033$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27034        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27035$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27036      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27037        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27038$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27039        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27040        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27041          VS_ENV_ARGS="/x86"
27042        else
27043          VS_ENV_ARGS="/x64"
27044        fi
27045        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27046        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27047        # TODO: improve detection for other versions of SDK
27048        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27049      else
27050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27052        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27053$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27054      fi
27055    fi
27056  fi
27057
27058
27059  if test "x$VS_ENV_CMD" = x; then
27060    VS_VERSION="${VS_VERSION}"
27061    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27062    METHOD="well-known name"
27063
27064  windows_path="$WIN_SDK_BASE"
27065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27066    unix_path=`$CYGPATH -u "$windows_path"`
27067    WIN_SDK_BASE="$unix_path"
27068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27070    WIN_SDK_BASE="$unix_path"
27071  fi
27072
27073    if test -d "$WIN_SDK_BASE"; then
27074      # There have been cases of partial or broken SDK installations. A missing
27075      # lib dir is not going to work.
27076      if test ! -d "$WIN_SDK_BASE/lib"; then
27077        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27078$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27079        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27080$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27081      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27082        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27083$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27084        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27085        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27086          VS_ENV_ARGS="/x86"
27087        else
27088          VS_ENV_ARGS="/x64"
27089        fi
27090        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27091        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27092        # TODO: improve detection for other versions of SDK
27093        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27094      else
27095        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27096$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27097        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27098$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27099      fi
27100    fi
27101  fi
27102
27103  fi
27104
27105    if test "x$VS_ENV_CMD" != x; then
27106      TOOLCHAIN_VERSION=$VS_VERSION
27107      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27108      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27109      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27110      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27111      # The rest of the variables are already evaled while probing
27112      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27113$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27114      break
27115    fi
27116  done
27117
27118
27119  if test "x$VS_ENV_CMD" != x; then
27120    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27121
27122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27123
27124  # First separate the path from the arguments. This will split at the first
27125  # space.
27126  complete="$VS_ENV_CMD"
27127  path="${complete%% *}"
27128  tmp="$complete EOL"
27129  arguments="${tmp#* }"
27130
27131  # Input might be given as Windows format, start by converting to
27132  # unix format.
27133  new_path=`$CYGPATH -u "$path"`
27134
27135  # Now try to locate executable using which
27136  new_path=`$WHICH "$new_path" 2> /dev/null`
27137  # bat and cmd files are not always considered executable in cygwin causing which
27138  # to not find them
27139  if test "x$new_path" = x \
27140      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27141      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27142    new_path=`$CYGPATH -u "$path"`
27143  fi
27144  if test "x$new_path" = x; then
27145    # Oops. Which didn't find the executable.
27146    # The splitting of arguments from the executable at a space might have been incorrect,
27147    # since paths with space are more likely in Windows. Give it another try with the whole
27148    # argument.
27149    path="$complete"
27150    arguments="EOL"
27151    new_path=`$CYGPATH -u "$path"`
27152    new_path=`$WHICH "$new_path" 2> /dev/null`
27153    # bat and cmd files are not always considered executable in cygwin causing which
27154    # to not find them
27155    if test "x$new_path" = x \
27156        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27157        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27158      new_path=`$CYGPATH -u "$path"`
27159    fi
27160    if test "x$new_path" = x; then
27161      # It's still not found. Now this is an unrecoverable error.
27162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27163$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27164      has_space=`$ECHO "$complete" | $GREP " "`
27165      if test "x$has_space" != x; then
27166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27168      fi
27169      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27170    fi
27171  fi
27172
27173  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27174  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27175  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27176  # "foo.exe" is OK but "foo" is an error.
27177  #
27178  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27179  # It is also a way to make sure we got the proper file name for the real test later on.
27180  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27181  if test "x$test_shortpath" = x; then
27182    # Short path failed, file does not exist as specified.
27183    # Try adding .exe or .cmd
27184    if test -f "${new_path}.exe"; then
27185      input_to_shortpath="${new_path}.exe"
27186    elif test -f "${new_path}.cmd"; then
27187      input_to_shortpath="${new_path}.cmd"
27188    else
27189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27190$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27191      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27192$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27193      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27194    fi
27195  else
27196    input_to_shortpath="$new_path"
27197  fi
27198
27199  # Call helper function which possibly converts this using DOS-style short mode.
27200  # If so, the updated path is stored in $new_path.
27201  new_path="$input_to_shortpath"
27202
27203  input_path="$input_to_shortpath"
27204  # Check if we need to convert this using DOS-style short mode. If the path
27205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27206  # take no chances and rewrite it.
27207  # Note: m4 eats our [], so we need to use [ and ] instead.
27208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27209  if test "x$has_forbidden_chars" != x; then
27210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27214      # Going to short mode and back again did indeed matter. Since short mode is
27215      # case insensitive, let's make it lowercase to improve readability.
27216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27217      # Now convert it back to Unix-stile (cygpath)
27218      input_path=`$CYGPATH -u "$shortmode_path"`
27219      new_path="$input_path"
27220    fi
27221  fi
27222
27223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27224  if test "x$test_cygdrive_prefix" = x; then
27225    # As a simple fix, exclude /usr/bin since it's not a real path.
27226    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27228      # a path prefixed by /cygdrive for fixpath to work.
27229      new_path="$CYGWIN_ROOT_PATH$input_path"
27230    fi
27231  fi
27232
27233  # remove trailing .exe if any
27234  new_path="${new_path/%.exe/}"
27235
27236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27237
27238  # First separate the path from the arguments. This will split at the first
27239  # space.
27240  complete="$VS_ENV_CMD"
27241  path="${complete%% *}"
27242  tmp="$complete EOL"
27243  arguments="${tmp#* }"
27244
27245  # Input might be given as Windows format, start by converting to
27246  # unix format.
27247  new_path="$path"
27248
27249  windows_path="$new_path"
27250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27251    unix_path=`$CYGPATH -u "$windows_path"`
27252    new_path="$unix_path"
27253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27255    new_path="$unix_path"
27256  fi
27257
27258
27259  # Now try to locate executable using which
27260  new_path=`$WHICH "$new_path" 2> /dev/null`
27261
27262  if test "x$new_path" = x; then
27263    # Oops. Which didn't find the executable.
27264    # The splitting of arguments from the executable at a space might have been incorrect,
27265    # since paths with space are more likely in Windows. Give it another try with the whole
27266    # argument.
27267    path="$complete"
27268    arguments="EOL"
27269    new_path="$path"
27270
27271  windows_path="$new_path"
27272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27273    unix_path=`$CYGPATH -u "$windows_path"`
27274    new_path="$unix_path"
27275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27277    new_path="$unix_path"
27278  fi
27279
27280
27281    new_path=`$WHICH "$new_path" 2> /dev/null`
27282    # bat and cmd files are not always considered executable in MSYS causing which
27283    # to not find them
27284    if test "x$new_path" = x \
27285        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27286        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27287      new_path="$path"
27288
27289  windows_path="$new_path"
27290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27291    unix_path=`$CYGPATH -u "$windows_path"`
27292    new_path="$unix_path"
27293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27294    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27295    new_path="$unix_path"
27296  fi
27297
27298    fi
27299
27300    if test "x$new_path" = x; then
27301      # It's still not found. Now this is an unrecoverable error.
27302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27303$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27304      has_space=`$ECHO "$complete" | $GREP " "`
27305      if test "x$has_space" != x; then
27306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27308      fi
27309      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27310    fi
27311  fi
27312
27313  # Now new_path has a complete unix path to the binary
27314  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27315    # Keep paths in /bin as-is, but remove trailing .exe if any
27316    new_path="${new_path/%.exe/}"
27317    # Do not save /bin paths to all_fixpath_prefixes!
27318  else
27319    # Not in mixed or Windows style, start by that.
27320    new_path=`cmd //c echo $new_path`
27321
27322  input_path="$new_path"
27323  # Check if we need to convert this using DOS-style short mode. If the path
27324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27325  # take no chances and rewrite it.
27326  # Note: m4 eats our [], so we need to use [ and ] instead.
27327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27328  if test "x$has_forbidden_chars" != x; then
27329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27330    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27331  fi
27332
27333    # Output is in $new_path
27334
27335  windows_path="$new_path"
27336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27337    unix_path=`$CYGPATH -u "$windows_path"`
27338    new_path="$unix_path"
27339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27341    new_path="$unix_path"
27342  fi
27343
27344    # remove trailing .exe if any
27345    new_path="${new_path/%.exe/}"
27346
27347    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27348    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27349  fi
27350
27351  else
27352    # We're on a unix platform. Hooray! :)
27353    # First separate the path from the arguments. This will split at the first
27354    # space.
27355    complete="$VS_ENV_CMD"
27356    path="${complete%% *}"
27357    tmp="$complete EOL"
27358    arguments="${tmp#* }"
27359
27360    # Cannot rely on the command "which" here since it doesn't always work.
27361    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27362    if test -z "$is_absolute_path"; then
27363      # Path to executable is not absolute. Find it.
27364      IFS_save="$IFS"
27365      IFS=:
27366      for p in $PATH; do
27367        if test -f "$p/$path" && test -x "$p/$path"; then
27368          new_path="$p/$path"
27369          break
27370        fi
27371      done
27372      IFS="$IFS_save"
27373    else
27374      # This is an absolute path, we can use it without further modifications.
27375      new_path="$path"
27376    fi
27377
27378    if test "x$new_path" = x; then
27379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27380$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27381      has_space=`$ECHO "$complete" | $GREP " "`
27382      if test "x$has_space" != x; then
27383        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27384$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27385      fi
27386      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27387    fi
27388  fi
27389
27390  # Now join together the path and the arguments once again
27391  if test "x$arguments" != xEOL; then
27392    new_complete="$new_path ${arguments% *}"
27393  else
27394    new_complete="$new_path"
27395  fi
27396
27397  if test "x$complete" != "x$new_complete"; then
27398    VS_ENV_CMD="$new_complete"
27399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27400$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27401  fi
27402
27403
27404    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27405    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27406$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27407
27408    # We need to create a couple of temporary files.
27409    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27410    $MKDIR -p $VS_ENV_TMP_DIR
27411
27412    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27413    # Instead create a shell script which will set the relevant variables when run.
27414    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27415
27416  unix_path="$WINPATH_VS_ENV_CMD"
27417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27418    windows_path=`$CYGPATH -m "$unix_path"`
27419    WINPATH_VS_ENV_CMD="$windows_path"
27420  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27421    windows_path=`cmd //c echo $unix_path`
27422    WINPATH_VS_ENV_CMD="$windows_path"
27423  fi
27424
27425    WINPATH_BASH="$BASH"
27426
27427  unix_path="$WINPATH_BASH"
27428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27429    windows_path=`$CYGPATH -m "$unix_path"`
27430    WINPATH_BASH="$windows_path"
27431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27432    windows_path=`cmd //c echo $unix_path`
27433    WINPATH_BASH="$windows_path"
27434  fi
27435
27436
27437    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27438    # script (executable by bash) that will setup the important variables.
27439    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27440    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27441    # This will end up something like:
27442    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27443    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27444    # These will end up something like:
27445    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27446    # The trailing space for everyone except PATH is no typo, but is needed due
27447    # to trailing \ in the Windows paths. These will be stripped later.
27448    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27449    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27450    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27451    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27452    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27453    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27454
27455    # Now execute the newly created bat file.
27456    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27457    # Change directory so we don't need to mess with Windows paths in redirects.
27458    cd $VS_ENV_TMP_DIR
27459    cmd /c extract-vs-env.bat | $CAT
27460    cd $CURDIR
27461
27462    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27463      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27464$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27465      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27466$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27467      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27468$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27469      as_fn_error $? "Cannot continue" "$LINENO" 5
27470    fi
27471
27472    # Now set all paths and other env variables. This will allow the rest of
27473    # the configure script to find and run the compiler in the proper way.
27474    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27475$as_echo "$as_me: Setting extracted environment variables" >&6;}
27476    . $VS_ENV_TMP_DIR/set-vs-env.sh
27477    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27478    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27479  else
27480    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27481    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27482$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27483  fi
27484
27485  # At this point, we should have correct variables in the environment, or we can't continue.
27486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27487$as_echo_n "checking for Visual Studio variables... " >&6; }
27488
27489  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27490    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27492$as_echo "present but broken" >&6; }
27493      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27494    else
27495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27496$as_echo "ok" >&6; }
27497      # Remove any trailing "\" and " " from the variables.
27498      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27499      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27500      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27501      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27502      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27503      # Remove any paths containing # (typically F#) as that messes up make. This
27504      # is needed if visual studio was installed with F# support.
27505      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27506
27507
27508
27509
27510    fi
27511  else
27512    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27513$as_echo "not found" >&6; }
27514
27515    if test "x$VS_ENV_CMD" = x; then
27516      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27517$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27518      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27519$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27520    else
27521      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27522$as_echo "$as_me: Running the extraction script failed." >&6;}
27523    fi
27524    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27525$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27526    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27527$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27528    as_fn_error $? "Cannot continue" "$LINENO" 5
27529  fi
27530
27531    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27532    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27533    PATH="$VS_PATH"
27534    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27535    export INCLUDE="$VS_INCLUDE"
27536    export LIB="$VS_LIB"
27537  fi
27538
27539  # autoconf magic only relies on PATH, so update it if tools dir is specified
27540  OLD_PATH="$PATH"
27541
27542  # For solaris we really need solaris tools, and not the GNU equivalent.
27543  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27544  # so add that to path before starting to probe.
27545  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27546  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27547    PATH="/usr/ccs/bin:$PATH"
27548  fi
27549
27550  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27551  # override all other locations.
27552  if test "x$TOOLCHAIN_PATH" != x; then
27553    PATH=$TOOLCHAIN_PATH:$PATH
27554  fi
27555
27556
27557  #
27558  # Setup the compilers (CC and CXX)
27559  #
27560
27561  COMPILER_NAME=C
27562  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27563
27564  if test "x$CC" != x; then
27565    # User has supplied compiler name already, always let that override.
27566    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27567$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27568    if test "x`basename $CC`" = "x$CC"; then
27569      # A command without a complete path is provided, search $PATH.
27570
27571      for ac_prog in $CC
27572do
27573  # Extract the first word of "$ac_prog", so it can be a program name with args.
27574set dummy $ac_prog; ac_word=$2
27575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27576$as_echo_n "checking for $ac_word... " >&6; }
27577if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27578  $as_echo_n "(cached) " >&6
27579else
27580  case $POTENTIAL_CC in
27581  [\\/]* | ?:[\\/]*)
27582  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27583  ;;
27584  *)
27585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27586for as_dir in $PATH
27587do
27588  IFS=$as_save_IFS
27589  test -z "$as_dir" && as_dir=.
27590    for ac_exec_ext in '' $ac_executable_extensions; do
27591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27592    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27594    break 2
27595  fi
27596done
27597  done
27598IFS=$as_save_IFS
27599
27600  ;;
27601esac
27602fi
27603POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27604if test -n "$POTENTIAL_CC"; then
27605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27606$as_echo "$POTENTIAL_CC" >&6; }
27607else
27608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27609$as_echo "no" >&6; }
27610fi
27611
27612
27613  test -n "$POTENTIAL_CC" && break
27614done
27615
27616      if test "x$POTENTIAL_CC" != x; then
27617        CC=$POTENTIAL_CC
27618      else
27619        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27620      fi
27621    else
27622      # Otherwise it might already be a complete path
27623      if test ! -x "$CC"; then
27624        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27625      fi
27626    fi
27627  else
27628    # No user supplied value. Locate compiler ourselves.
27629
27630    # If we are cross compiling, assume cross compilation tools follows the
27631    # cross compilation standard where they are prefixed with the autoconf
27632    # standard name for the target. For example the binary
27633    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27634    # If we are not cross compiling, then the default compiler name will be
27635    # used.
27636
27637    CC=
27638    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27639    # before checking the rest of the PATH.
27640    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27641    # step, this should not be necessary.
27642    if test -n "$TOOLCHAIN_PATH"; then
27643      PATH_save="$PATH"
27644      PATH="$TOOLCHAIN_PATH"
27645      for ac_prog in $SEARCH_LIST
27646do
27647  # Extract the first word of "$ac_prog", so it can be a program name with args.
27648set dummy $ac_prog; ac_word=$2
27649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27650$as_echo_n "checking for $ac_word... " >&6; }
27651if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27652  $as_echo_n "(cached) " >&6
27653else
27654  case $TOOLCHAIN_PATH_CC in
27655  [\\/]* | ?:[\\/]*)
27656  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27657  ;;
27658  *)
27659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27660for as_dir in $PATH
27661do
27662  IFS=$as_save_IFS
27663  test -z "$as_dir" && as_dir=.
27664    for ac_exec_ext in '' $ac_executable_extensions; do
27665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27666    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27668    break 2
27669  fi
27670done
27671  done
27672IFS=$as_save_IFS
27673
27674  ;;
27675esac
27676fi
27677TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27678if test -n "$TOOLCHAIN_PATH_CC"; then
27679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27680$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27681else
27682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27683$as_echo "no" >&6; }
27684fi
27685
27686
27687  test -n "$TOOLCHAIN_PATH_CC" && break
27688done
27689
27690      CC=$TOOLCHAIN_PATH_CC
27691      PATH="$PATH_save"
27692    fi
27693
27694    # AC_PATH_PROGS can't be run multiple times with the same variable,
27695    # so create a new name for this run.
27696    if test "x$CC" = x; then
27697      for ac_prog in $SEARCH_LIST
27698do
27699  # Extract the first word of "$ac_prog", so it can be a program name with args.
27700set dummy $ac_prog; ac_word=$2
27701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27702$as_echo_n "checking for $ac_word... " >&6; }
27703if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27704  $as_echo_n "(cached) " >&6
27705else
27706  case $POTENTIAL_CC in
27707  [\\/]* | ?:[\\/]*)
27708  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27709  ;;
27710  *)
27711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27712for as_dir in $PATH
27713do
27714  IFS=$as_save_IFS
27715  test -z "$as_dir" && as_dir=.
27716    for ac_exec_ext in '' $ac_executable_extensions; do
27717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27718    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27720    break 2
27721  fi
27722done
27723  done
27724IFS=$as_save_IFS
27725
27726  ;;
27727esac
27728fi
27729POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27730if test -n "$POTENTIAL_CC"; then
27731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27732$as_echo "$POTENTIAL_CC" >&6; }
27733else
27734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27735$as_echo "no" >&6; }
27736fi
27737
27738
27739  test -n "$POTENTIAL_CC" && break
27740done
27741
27742      CC=$POTENTIAL_CC
27743    fi
27744
27745    if test "x$CC" = x; then
27746
27747  # Print a helpful message on how to acquire the necessary build dependency.
27748  # devkit is the help tag: freetype, cups, pulse, alsa etc
27749  MISSING_DEPENDENCY=devkit
27750
27751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27752    cygwin_help $MISSING_DEPENDENCY
27753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27754    msys_help $MISSING_DEPENDENCY
27755  else
27756    PKGHANDLER_COMMAND=
27757
27758    case $PKGHANDLER in
27759      apt-get)
27760        apt_help     $MISSING_DEPENDENCY ;;
27761      yum)
27762        yum_help     $MISSING_DEPENDENCY ;;
27763      port)
27764        port_help    $MISSING_DEPENDENCY ;;
27765      pkgutil)
27766        pkgutil_help $MISSING_DEPENDENCY ;;
27767      pkgadd)
27768        pkgadd_help  $MISSING_DEPENDENCY ;;
27769    esac
27770
27771    if test "x$PKGHANDLER_COMMAND" != x; then
27772      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27773    fi
27774  fi
27775
27776      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27777    fi
27778  fi
27779
27780  # Now we have a compiler binary in CC. Make sure it's okay.
27781
27782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27783
27784  # First separate the path from the arguments. This will split at the first
27785  # space.
27786  complete="$CC"
27787  path="${complete%% *}"
27788  tmp="$complete EOL"
27789  arguments="${tmp#* }"
27790
27791  # Input might be given as Windows format, start by converting to
27792  # unix format.
27793  new_path=`$CYGPATH -u "$path"`
27794
27795  # Now try to locate executable using which
27796  new_path=`$WHICH "$new_path" 2> /dev/null`
27797  # bat and cmd files are not always considered executable in cygwin causing which
27798  # to not find them
27799  if test "x$new_path" = x \
27800      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27801      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27802    new_path=`$CYGPATH -u "$path"`
27803  fi
27804  if test "x$new_path" = x; then
27805    # Oops. Which didn't find the executable.
27806    # The splitting of arguments from the executable at a space might have been incorrect,
27807    # since paths with space are more likely in Windows. Give it another try with the whole
27808    # argument.
27809    path="$complete"
27810    arguments="EOL"
27811    new_path=`$CYGPATH -u "$path"`
27812    new_path=`$WHICH "$new_path" 2> /dev/null`
27813    # bat and cmd files are not always considered executable in cygwin causing which
27814    # to not find them
27815    if test "x$new_path" = x \
27816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27818      new_path=`$CYGPATH -u "$path"`
27819    fi
27820    if test "x$new_path" = x; then
27821      # It's still not found. Now this is an unrecoverable error.
27822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27823$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27824      has_space=`$ECHO "$complete" | $GREP " "`
27825      if test "x$has_space" != x; then
27826        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27827$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27828      fi
27829      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27830    fi
27831  fi
27832
27833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27836  # "foo.exe" is OK but "foo" is an error.
27837  #
27838  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27839  # It is also a way to make sure we got the proper file name for the real test later on.
27840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27841  if test "x$test_shortpath" = x; then
27842    # Short path failed, file does not exist as specified.
27843    # Try adding .exe or .cmd
27844    if test -f "${new_path}.exe"; then
27845      input_to_shortpath="${new_path}.exe"
27846    elif test -f "${new_path}.cmd"; then
27847      input_to_shortpath="${new_path}.cmd"
27848    else
27849      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27850$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27851      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27852$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27853      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27854    fi
27855  else
27856    input_to_shortpath="$new_path"
27857  fi
27858
27859  # Call helper function which possibly converts this using DOS-style short mode.
27860  # If so, the updated path is stored in $new_path.
27861  new_path="$input_to_shortpath"
27862
27863  input_path="$input_to_shortpath"
27864  # Check if we need to convert this using DOS-style short mode. If the path
27865  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27866  # take no chances and rewrite it.
27867  # Note: m4 eats our [], so we need to use [ and ] instead.
27868  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27869  if test "x$has_forbidden_chars" != x; then
27870    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27871    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27872    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27873    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27874      # Going to short mode and back again did indeed matter. Since short mode is
27875      # case insensitive, let's make it lowercase to improve readability.
27876      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27877      # Now convert it back to Unix-stile (cygpath)
27878      input_path=`$CYGPATH -u "$shortmode_path"`
27879      new_path="$input_path"
27880    fi
27881  fi
27882
27883  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27884  if test "x$test_cygdrive_prefix" = x; then
27885    # As a simple fix, exclude /usr/bin since it's not a real path.
27886    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27887      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27888      # a path prefixed by /cygdrive for fixpath to work.
27889      new_path="$CYGWIN_ROOT_PATH$input_path"
27890    fi
27891  fi
27892
27893  # remove trailing .exe if any
27894  new_path="${new_path/%.exe/}"
27895
27896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27897
27898  # First separate the path from the arguments. This will split at the first
27899  # space.
27900  complete="$CC"
27901  path="${complete%% *}"
27902  tmp="$complete EOL"
27903  arguments="${tmp#* }"
27904
27905  # Input might be given as Windows format, start by converting to
27906  # unix format.
27907  new_path="$path"
27908
27909  windows_path="$new_path"
27910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27911    unix_path=`$CYGPATH -u "$windows_path"`
27912    new_path="$unix_path"
27913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27915    new_path="$unix_path"
27916  fi
27917
27918
27919  # Now try to locate executable using which
27920  new_path=`$WHICH "$new_path" 2> /dev/null`
27921
27922  if test "x$new_path" = x; then
27923    # Oops. Which didn't find the executable.
27924    # The splitting of arguments from the executable at a space might have been incorrect,
27925    # since paths with space are more likely in Windows. Give it another try with the whole
27926    # argument.
27927    path="$complete"
27928    arguments="EOL"
27929    new_path="$path"
27930
27931  windows_path="$new_path"
27932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27933    unix_path=`$CYGPATH -u "$windows_path"`
27934    new_path="$unix_path"
27935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27937    new_path="$unix_path"
27938  fi
27939
27940
27941    new_path=`$WHICH "$new_path" 2> /dev/null`
27942    # bat and cmd files are not always considered executable in MSYS causing which
27943    # to not find them
27944    if test "x$new_path" = x \
27945        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27946        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27947      new_path="$path"
27948
27949  windows_path="$new_path"
27950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27951    unix_path=`$CYGPATH -u "$windows_path"`
27952    new_path="$unix_path"
27953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27955    new_path="$unix_path"
27956  fi
27957
27958    fi
27959
27960    if test "x$new_path" = x; then
27961      # It's still not found. Now this is an unrecoverable error.
27962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27963$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27964      has_space=`$ECHO "$complete" | $GREP " "`
27965      if test "x$has_space" != x; then
27966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27968      fi
27969      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27970    fi
27971  fi
27972
27973  # Now new_path has a complete unix path to the binary
27974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27975    # Keep paths in /bin as-is, but remove trailing .exe if any
27976    new_path="${new_path/%.exe/}"
27977    # Do not save /bin paths to all_fixpath_prefixes!
27978  else
27979    # Not in mixed or Windows style, start by that.
27980    new_path=`cmd //c echo $new_path`
27981
27982  input_path="$new_path"
27983  # Check if we need to convert this using DOS-style short mode. If the path
27984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27985  # take no chances and rewrite it.
27986  # Note: m4 eats our [], so we need to use [ and ] instead.
27987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27988  if test "x$has_forbidden_chars" != x; then
27989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27991  fi
27992
27993    # Output is in $new_path
27994
27995  windows_path="$new_path"
27996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27997    unix_path=`$CYGPATH -u "$windows_path"`
27998    new_path="$unix_path"
27999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28001    new_path="$unix_path"
28002  fi
28003
28004    # remove trailing .exe if any
28005    new_path="${new_path/%.exe/}"
28006
28007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28009  fi
28010
28011  else
28012    # We're on a unix platform. Hooray! :)
28013    # First separate the path from the arguments. This will split at the first
28014    # space.
28015    complete="$CC"
28016    path="${complete%% *}"
28017    tmp="$complete EOL"
28018    arguments="${tmp#* }"
28019
28020    # Cannot rely on the command "which" here since it doesn't always work.
28021    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28022    if test -z "$is_absolute_path"; then
28023      # Path to executable is not absolute. Find it.
28024      IFS_save="$IFS"
28025      IFS=:
28026      for p in $PATH; do
28027        if test -f "$p/$path" && test -x "$p/$path"; then
28028          new_path="$p/$path"
28029          break
28030        fi
28031      done
28032      IFS="$IFS_save"
28033    else
28034      # This is an absolute path, we can use it without further modifications.
28035      new_path="$path"
28036    fi
28037
28038    if test "x$new_path" = x; then
28039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28040$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28041      has_space=`$ECHO "$complete" | $GREP " "`
28042      if test "x$has_space" != x; then
28043        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28045      fi
28046      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28047    fi
28048  fi
28049
28050  # Now join together the path and the arguments once again
28051  if test "x$arguments" != xEOL; then
28052    new_complete="$new_path ${arguments% *}"
28053  else
28054    new_complete="$new_path"
28055  fi
28056
28057  if test "x$complete" != "x$new_complete"; then
28058    CC="$new_complete"
28059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28060$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28061  fi
28062
28063  TEST_COMPILER="$CC"
28064  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28065  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28066  if test "x$OPENJDK_BUILD_OS" != xaix; then
28067    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28069$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28070
28071  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28072    # Follow a chain of symbolic links. Use readlink
28073    # where it exists, else fall back to horribly
28074    # complicated shell code.
28075    if test "x$READLINK_TESTED" != yes; then
28076      # On MacOSX there is a readlink tool with a different
28077      # purpose than the GNU readlink tool. Check the found readlink.
28078      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28079      if test "x$ISGNU" = x; then
28080        # A readlink that we do not know how to use.
28081        # Are there other non-GNU readlinks out there?
28082        READLINK_TESTED=yes
28083        READLINK=
28084      fi
28085    fi
28086
28087    if test "x$READLINK" != x; then
28088      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28089    else
28090      # Save the current directory for restoring afterwards
28091      STARTDIR=$PWD
28092      COUNTER=0
28093      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28094      sym_link_file=`$BASENAME $TEST_COMPILER`
28095      cd $sym_link_dir
28096      # Use -P flag to resolve symlinks in directories.
28097      cd `$THEPWDCMD -P`
28098      sym_link_dir=`$THEPWDCMD -P`
28099      # Resolve file symlinks
28100      while test $COUNTER -lt 20; do
28101        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28102        if test "x$ISLINK" == x; then
28103          # This is not a symbolic link! We are done!
28104          break
28105        fi
28106        # Again resolve directory symlinks since the target of the just found
28107        # link could be in a different directory
28108        cd `$DIRNAME $ISLINK`
28109        sym_link_dir=`$THEPWDCMD -P`
28110        sym_link_file=`$BASENAME $ISLINK`
28111        let COUNTER=COUNTER+1
28112      done
28113      cd $STARTDIR
28114      TEST_COMPILER=$sym_link_dir/$sym_link_file
28115    fi
28116  fi
28117
28118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28119$as_echo "$TEST_COMPILER" >&6; }
28120  fi
28121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28122$as_echo_n "checking if CC is disguised ccache... " >&6; }
28123
28124  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28125  if test "x$COMPILER_BASENAME" = "xccache"; then
28126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28127$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28128    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28129    # We want to control ccache invocation ourselves, so ignore this cc and try
28130    # searching again.
28131
28132    # Remove the path to the fake ccache cc from the PATH
28133    RETRY_COMPILER_SAVED_PATH="$PATH"
28134    COMPILER_DIRNAME=`$DIRNAME $CC`
28135    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28136
28137    # Try again looking for our compiler
28138    if test -n "$ac_tool_prefix"; then
28139  for ac_prog in $TOOLCHAIN_CC_BINARY
28140  do
28141    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28142set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28144$as_echo_n "checking for $ac_word... " >&6; }
28145if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28146  $as_echo_n "(cached) " >&6
28147else
28148  if test -n "$PROPER_COMPILER_CC"; then
28149  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28150else
28151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28152for as_dir in $PATH
28153do
28154  IFS=$as_save_IFS
28155  test -z "$as_dir" && as_dir=.
28156    for ac_exec_ext in '' $ac_executable_extensions; do
28157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28158    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28160    break 2
28161  fi
28162done
28163  done
28164IFS=$as_save_IFS
28165
28166fi
28167fi
28168PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28169if test -n "$PROPER_COMPILER_CC"; then
28170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28171$as_echo "$PROPER_COMPILER_CC" >&6; }
28172else
28173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28174$as_echo "no" >&6; }
28175fi
28176
28177
28178    test -n "$PROPER_COMPILER_CC" && break
28179  done
28180fi
28181if test -z "$PROPER_COMPILER_CC"; then
28182  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28183  for ac_prog in $TOOLCHAIN_CC_BINARY
28184do
28185  # Extract the first word of "$ac_prog", so it can be a program name with args.
28186set dummy $ac_prog; ac_word=$2
28187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28188$as_echo_n "checking for $ac_word... " >&6; }
28189if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28190  $as_echo_n "(cached) " >&6
28191else
28192  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28193  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28194else
28195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28196for as_dir in $PATH
28197do
28198  IFS=$as_save_IFS
28199  test -z "$as_dir" && as_dir=.
28200    for ac_exec_ext in '' $ac_executable_extensions; do
28201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28202    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28204    break 2
28205  fi
28206done
28207  done
28208IFS=$as_save_IFS
28209
28210fi
28211fi
28212ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28213if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28215$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28216else
28217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28218$as_echo "no" >&6; }
28219fi
28220
28221
28222  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28223done
28224
28225  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28226    PROPER_COMPILER_CC=""
28227  else
28228    case $cross_compiling:$ac_tool_warned in
28229yes:)
28230{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28231$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28232ac_tool_warned=yes ;;
28233esac
28234    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28235  fi
28236fi
28237
28238
28239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28240
28241  # First separate the path from the arguments. This will split at the first
28242  # space.
28243  complete="$PROPER_COMPILER_CC"
28244  path="${complete%% *}"
28245  tmp="$complete EOL"
28246  arguments="${tmp#* }"
28247
28248  # Input might be given as Windows format, start by converting to
28249  # unix format.
28250  new_path=`$CYGPATH -u "$path"`
28251
28252  # Now try to locate executable using which
28253  new_path=`$WHICH "$new_path" 2> /dev/null`
28254  # bat and cmd files are not always considered executable in cygwin causing which
28255  # to not find them
28256  if test "x$new_path" = x \
28257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28259    new_path=`$CYGPATH -u "$path"`
28260  fi
28261  if test "x$new_path" = x; then
28262    # Oops. Which didn't find the executable.
28263    # The splitting of arguments from the executable at a space might have been incorrect,
28264    # since paths with space are more likely in Windows. Give it another try with the whole
28265    # argument.
28266    path="$complete"
28267    arguments="EOL"
28268    new_path=`$CYGPATH -u "$path"`
28269    new_path=`$WHICH "$new_path" 2> /dev/null`
28270    # bat and cmd files are not always considered executable in cygwin causing which
28271    # to not find them
28272    if test "x$new_path" = x \
28273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28275      new_path=`$CYGPATH -u "$path"`
28276    fi
28277    if test "x$new_path" = x; then
28278      # It's still not found. Now this is an unrecoverable error.
28279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28280$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28281      has_space=`$ECHO "$complete" | $GREP " "`
28282      if test "x$has_space" != x; then
28283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28285      fi
28286      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28287    fi
28288  fi
28289
28290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28293  # "foo.exe" is OK but "foo" is an error.
28294  #
28295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28296  # It is also a way to make sure we got the proper file name for the real test later on.
28297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28298  if test "x$test_shortpath" = x; then
28299    # Short path failed, file does not exist as specified.
28300    # Try adding .exe or .cmd
28301    if test -f "${new_path}.exe"; then
28302      input_to_shortpath="${new_path}.exe"
28303    elif test -f "${new_path}.cmd"; then
28304      input_to_shortpath="${new_path}.cmd"
28305    else
28306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28307$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28310      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28311    fi
28312  else
28313    input_to_shortpath="$new_path"
28314  fi
28315
28316  # Call helper function which possibly converts this using DOS-style short mode.
28317  # If so, the updated path is stored in $new_path.
28318  new_path="$input_to_shortpath"
28319
28320  input_path="$input_to_shortpath"
28321  # Check if we need to convert this using DOS-style short mode. If the path
28322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28323  # take no chances and rewrite it.
28324  # Note: m4 eats our [], so we need to use [ and ] instead.
28325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28326  if test "x$has_forbidden_chars" != x; then
28327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28331      # Going to short mode and back again did indeed matter. Since short mode is
28332      # case insensitive, let's make it lowercase to improve readability.
28333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28334      # Now convert it back to Unix-stile (cygpath)
28335      input_path=`$CYGPATH -u "$shortmode_path"`
28336      new_path="$input_path"
28337    fi
28338  fi
28339
28340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28341  if test "x$test_cygdrive_prefix" = x; then
28342    # As a simple fix, exclude /usr/bin since it's not a real path.
28343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28345      # a path prefixed by /cygdrive for fixpath to work.
28346      new_path="$CYGWIN_ROOT_PATH$input_path"
28347    fi
28348  fi
28349
28350  # remove trailing .exe if any
28351  new_path="${new_path/%.exe/}"
28352
28353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28354
28355  # First separate the path from the arguments. This will split at the first
28356  # space.
28357  complete="$PROPER_COMPILER_CC"
28358  path="${complete%% *}"
28359  tmp="$complete EOL"
28360  arguments="${tmp#* }"
28361
28362  # Input might be given as Windows format, start by converting to
28363  # unix format.
28364  new_path="$path"
28365
28366  windows_path="$new_path"
28367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28368    unix_path=`$CYGPATH -u "$windows_path"`
28369    new_path="$unix_path"
28370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28372    new_path="$unix_path"
28373  fi
28374
28375
28376  # Now try to locate executable using which
28377  new_path=`$WHICH "$new_path" 2> /dev/null`
28378
28379  if test "x$new_path" = x; then
28380    # Oops. Which didn't find the executable.
28381    # The splitting of arguments from the executable at a space might have been incorrect,
28382    # since paths with space are more likely in Windows. Give it another try with the whole
28383    # argument.
28384    path="$complete"
28385    arguments="EOL"
28386    new_path="$path"
28387
28388  windows_path="$new_path"
28389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28390    unix_path=`$CYGPATH -u "$windows_path"`
28391    new_path="$unix_path"
28392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28394    new_path="$unix_path"
28395  fi
28396
28397
28398    new_path=`$WHICH "$new_path" 2> /dev/null`
28399    # bat and cmd files are not always considered executable in MSYS causing which
28400    # to not find them
28401    if test "x$new_path" = x \
28402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28404      new_path="$path"
28405
28406  windows_path="$new_path"
28407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28408    unix_path=`$CYGPATH -u "$windows_path"`
28409    new_path="$unix_path"
28410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28412    new_path="$unix_path"
28413  fi
28414
28415    fi
28416
28417    if test "x$new_path" = x; then
28418      # It's still not found. Now this is an unrecoverable error.
28419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28420$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28421      has_space=`$ECHO "$complete" | $GREP " "`
28422      if test "x$has_space" != x; then
28423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28425      fi
28426      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28427    fi
28428  fi
28429
28430  # Now new_path has a complete unix path to the binary
28431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28432    # Keep paths in /bin as-is, but remove trailing .exe if any
28433    new_path="${new_path/%.exe/}"
28434    # Do not save /bin paths to all_fixpath_prefixes!
28435  else
28436    # Not in mixed or Windows style, start by that.
28437    new_path=`cmd //c echo $new_path`
28438
28439  input_path="$new_path"
28440  # Check if we need to convert this using DOS-style short mode. If the path
28441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28442  # take no chances and rewrite it.
28443  # Note: m4 eats our [], so we need to use [ and ] instead.
28444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28445  if test "x$has_forbidden_chars" != x; then
28446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28448  fi
28449
28450    # Output is in $new_path
28451
28452  windows_path="$new_path"
28453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28454    unix_path=`$CYGPATH -u "$windows_path"`
28455    new_path="$unix_path"
28456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28458    new_path="$unix_path"
28459  fi
28460
28461    # remove trailing .exe if any
28462    new_path="${new_path/%.exe/}"
28463
28464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28466  fi
28467
28468  else
28469    # We're on a unix platform. Hooray! :)
28470    # First separate the path from the arguments. This will split at the first
28471    # space.
28472    complete="$PROPER_COMPILER_CC"
28473    path="${complete%% *}"
28474    tmp="$complete EOL"
28475    arguments="${tmp#* }"
28476
28477    # Cannot rely on the command "which" here since it doesn't always work.
28478    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28479    if test -z "$is_absolute_path"; then
28480      # Path to executable is not absolute. Find it.
28481      IFS_save="$IFS"
28482      IFS=:
28483      for p in $PATH; do
28484        if test -f "$p/$path" && test -x "$p/$path"; then
28485          new_path="$p/$path"
28486          break
28487        fi
28488      done
28489      IFS="$IFS_save"
28490    else
28491      # This is an absolute path, we can use it without further modifications.
28492      new_path="$path"
28493    fi
28494
28495    if test "x$new_path" = x; then
28496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28497$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28498      has_space=`$ECHO "$complete" | $GREP " "`
28499      if test "x$has_space" != x; then
28500        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28502      fi
28503      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28504    fi
28505  fi
28506
28507  # Now join together the path and the arguments once again
28508  if test "x$arguments" != xEOL; then
28509    new_complete="$new_path ${arguments% *}"
28510  else
28511    new_complete="$new_path"
28512  fi
28513
28514  if test "x$complete" != "x$new_complete"; then
28515    PROPER_COMPILER_CC="$new_complete"
28516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28517$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28518  fi
28519
28520    PATH="$RETRY_COMPILER_SAVED_PATH"
28521
28522    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28523$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28524
28525  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28526    # Follow a chain of symbolic links. Use readlink
28527    # where it exists, else fall back to horribly
28528    # complicated shell code.
28529    if test "x$READLINK_TESTED" != yes; then
28530      # On MacOSX there is a readlink tool with a different
28531      # purpose than the GNU readlink tool. Check the found readlink.
28532      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28533      if test "x$ISGNU" = x; then
28534        # A readlink that we do not know how to use.
28535        # Are there other non-GNU readlinks out there?
28536        READLINK_TESTED=yes
28537        READLINK=
28538      fi
28539    fi
28540
28541    if test "x$READLINK" != x; then
28542      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28543    else
28544      # Save the current directory for restoring afterwards
28545      STARTDIR=$PWD
28546      COUNTER=0
28547      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28548      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28549      cd $sym_link_dir
28550      # Use -P flag to resolve symlinks in directories.
28551      cd `$THEPWDCMD -P`
28552      sym_link_dir=`$THEPWDCMD -P`
28553      # Resolve file symlinks
28554      while test $COUNTER -lt 20; do
28555        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28556        if test "x$ISLINK" == x; then
28557          # This is not a symbolic link! We are done!
28558          break
28559        fi
28560        # Again resolve directory symlinks since the target of the just found
28561        # link could be in a different directory
28562        cd `$DIRNAME $ISLINK`
28563        sym_link_dir=`$THEPWDCMD -P`
28564        sym_link_file=`$BASENAME $ISLINK`
28565        let COUNTER=COUNTER+1
28566      done
28567      cd $STARTDIR
28568      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28569    fi
28570  fi
28571
28572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28573$as_echo "$PROPER_COMPILER_CC" >&6; }
28574    CC="$PROPER_COMPILER_CC"
28575  else
28576    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28577$as_echo "no, keeping CC" >&6; }
28578  fi
28579
28580
28581  COMPILER=$CC
28582  COMPILER_NAME=$COMPILER_NAME
28583
28584  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28585    # cc -V output typically looks like
28586    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28587    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28588    # Check that this is likely to be the Solaris Studio cc.
28589    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28590    if test $? -ne 0; then
28591      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28592      { $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
28593$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28594      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28595$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28596      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28597$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28598      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28599    fi
28600    # Remove usage instructions (if present), and
28601    # collapse compiler output into a single line
28602    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28603        $SED -e 's/ *[Uu]sage:.*//'`
28604    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28605        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28606  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28607    # xlc -qversion output typically looks like
28608    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28609    #     Version: 11.01.0000.0015
28610    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28611    # Check that this is likely to be the IBM XL C compiler.
28612    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28613    if test $? -ne 0; then
28614      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28615      { $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
28616$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28617      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28618$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28619      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28620$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28621      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28622    fi
28623    # Collapse compiler output into a single line
28624    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28625    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28626        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28627  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28628    # There is no specific version flag, but all output starts with a version string.
28629    # First line typically looks something like:
28630    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28631    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28632    # Check that this is likely to be Microsoft CL.EXE.
28633    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28634    if test $? -ne 0; then
28635      { $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
28636$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28637      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28638$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28639      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28640    fi
28641    # Collapse compiler output into a single line
28642    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28643    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28644        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28645  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28646    # gcc --version output typically looks like
28647    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28648    #     Copyright (C) 2013 Free Software Foundation, Inc.
28649    #     This is free software; see the source for copying conditions.  There is NO
28650    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28651    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28652    # Check that this is likely to be GCC.
28653    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28654    if test $? -ne 0; then
28655      { $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
28656$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28657      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28658$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28659      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28660    fi
28661    # Remove Copyright and legalese from version string, and
28662    # collapse into a single line
28663    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28664        $SED -e 's/ *Copyright .*//'`
28665    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28666        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28667  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28668    # clang --version output typically looks like
28669    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28670    #    clang version 3.3 (tags/RELEASE_33/final)
28671    # or
28672    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28673    #    Target: x86_64-pc-linux-gnu
28674    #    Thread model: posix
28675    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28676    # Check that this is likely to be clang
28677    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28678    if test $? -ne 0; then
28679      { $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
28680$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28681      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28682$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28683      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28684    fi
28685    # Collapse compiler output into a single line
28686    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28687    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28688        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28689  else
28690      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28691  fi
28692  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28693  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28694  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28695  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28696
28697  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28698$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28699
28700
28701  # Now that we have resolved CC ourself, let autoconf have its go at it
28702  ac_ext=c
28703ac_cpp='$CPP $CPPFLAGS'
28704ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28705ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28706ac_compiler_gnu=$ac_cv_c_compiler_gnu
28707if test -n "$ac_tool_prefix"; then
28708  for ac_prog in $CC
28709  do
28710    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28711set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28713$as_echo_n "checking for $ac_word... " >&6; }
28714if ${ac_cv_prog_CC+:} false; then :
28715  $as_echo_n "(cached) " >&6
28716else
28717  if test -n "$CC"; then
28718  ac_cv_prog_CC="$CC" # Let the user override the test.
28719else
28720as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28721for as_dir in $PATH
28722do
28723  IFS=$as_save_IFS
28724  test -z "$as_dir" && as_dir=.
28725    for ac_exec_ext in '' $ac_executable_extensions; do
28726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28727    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28729    break 2
28730  fi
28731done
28732  done
28733IFS=$as_save_IFS
28734
28735fi
28736fi
28737CC=$ac_cv_prog_CC
28738if test -n "$CC"; then
28739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28740$as_echo "$CC" >&6; }
28741else
28742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28743$as_echo "no" >&6; }
28744fi
28745
28746
28747    test -n "$CC" && break
28748  done
28749fi
28750if test -z "$CC"; then
28751  ac_ct_CC=$CC
28752  for ac_prog in $CC
28753do
28754  # Extract the first word of "$ac_prog", so it can be a program name with args.
28755set dummy $ac_prog; ac_word=$2
28756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28757$as_echo_n "checking for $ac_word... " >&6; }
28758if ${ac_cv_prog_ac_ct_CC+:} false; then :
28759  $as_echo_n "(cached) " >&6
28760else
28761  if test -n "$ac_ct_CC"; then
28762  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28763else
28764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28765for as_dir in $PATH
28766do
28767  IFS=$as_save_IFS
28768  test -z "$as_dir" && as_dir=.
28769    for ac_exec_ext in '' $ac_executable_extensions; do
28770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28771    ac_cv_prog_ac_ct_CC="$ac_prog"
28772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28773    break 2
28774  fi
28775done
28776  done
28777IFS=$as_save_IFS
28778
28779fi
28780fi
28781ac_ct_CC=$ac_cv_prog_ac_ct_CC
28782if test -n "$ac_ct_CC"; then
28783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28784$as_echo "$ac_ct_CC" >&6; }
28785else
28786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28787$as_echo "no" >&6; }
28788fi
28789
28790
28791  test -n "$ac_ct_CC" && break
28792done
28793
28794  if test "x$ac_ct_CC" = x; then
28795    CC=""
28796  else
28797    case $cross_compiling:$ac_tool_warned in
28798yes:)
28799{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28800$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28801ac_tool_warned=yes ;;
28802esac
28803    CC=$ac_ct_CC
28804  fi
28805fi
28806
28807
28808test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28809$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28810as_fn_error $? "no acceptable C compiler found in \$PATH
28811See \`config.log' for more details" "$LINENO" 5; }
28812
28813# Provide some information about the compiler.
28814$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28815set X $ac_compile
28816ac_compiler=$2
28817for ac_option in --version -v -V -qversion; do
28818  { { ac_try="$ac_compiler $ac_option >&5"
28819case "(($ac_try" in
28820  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28821  *) ac_try_echo=$ac_try;;
28822esac
28823eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28824$as_echo "$ac_try_echo"; } >&5
28825  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28826  ac_status=$?
28827  if test -s conftest.err; then
28828    sed '10a\
28829... rest of stderr output deleted ...
28830         10q' conftest.err >conftest.er1
28831    cat conftest.er1 >&5
28832  fi
28833  rm -f conftest.er1 conftest.err
28834  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28835  test $ac_status = 0; }
28836done
28837
28838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28839/* end confdefs.h.  */
28840
28841int
28842main ()
28843{
28844
28845  ;
28846  return 0;
28847}
28848_ACEOF
28849ac_clean_files_save=$ac_clean_files
28850ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28851# Try to create an executable without -o first, disregard a.out.
28852# It will help us diagnose broken compilers, and finding out an intuition
28853# of exeext.
28854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28855$as_echo_n "checking whether the C compiler works... " >&6; }
28856ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28857
28858# The possible output files:
28859ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28860
28861ac_rmfiles=
28862for ac_file in $ac_files
28863do
28864  case $ac_file in
28865    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28866    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28867  esac
28868done
28869rm -f $ac_rmfiles
28870
28871if { { ac_try="$ac_link_default"
28872case "(($ac_try" in
28873  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28874  *) ac_try_echo=$ac_try;;
28875esac
28876eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28877$as_echo "$ac_try_echo"; } >&5
28878  (eval "$ac_link_default") 2>&5
28879  ac_status=$?
28880  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28881  test $ac_status = 0; }; then :
28882  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28883# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28884# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28885# so that the user can short-circuit this test for compilers unknown to
28886# Autoconf.
28887for ac_file in $ac_files ''
28888do
28889  test -f "$ac_file" || continue
28890  case $ac_file in
28891    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28892	;;
28893    [ab].out )
28894	# We found the default executable, but exeext='' is most
28895	# certainly right.
28896	break;;
28897    *.* )
28898	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28899	then :; else
28900	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28901	fi
28902	# We set ac_cv_exeext here because the later test for it is not
28903	# safe: cross compilers may not add the suffix if given an `-o'
28904	# argument, so we may need to know it at that point already.
28905	# Even if this section looks crufty: it has the advantage of
28906	# actually working.
28907	break;;
28908    * )
28909	break;;
28910  esac
28911done
28912test "$ac_cv_exeext" = no && ac_cv_exeext=
28913
28914else
28915  ac_file=''
28916fi
28917if test -z "$ac_file"; then :
28918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28919$as_echo "no" >&6; }
28920$as_echo "$as_me: failed program was:" >&5
28921sed 's/^/| /' conftest.$ac_ext >&5
28922
28923{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28924$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28925as_fn_error 77 "C compiler cannot create executables
28926See \`config.log' for more details" "$LINENO" 5; }
28927else
28928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28929$as_echo "yes" >&6; }
28930fi
28931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28932$as_echo_n "checking for C compiler default output file name... " >&6; }
28933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28934$as_echo "$ac_file" >&6; }
28935ac_exeext=$ac_cv_exeext
28936
28937rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28938ac_clean_files=$ac_clean_files_save
28939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28940$as_echo_n "checking for suffix of executables... " >&6; }
28941if { { ac_try="$ac_link"
28942case "(($ac_try" in
28943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28944  *) ac_try_echo=$ac_try;;
28945esac
28946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28947$as_echo "$ac_try_echo"; } >&5
28948  (eval "$ac_link") 2>&5
28949  ac_status=$?
28950  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28951  test $ac_status = 0; }; then :
28952  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28953# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28954# work properly (i.e., refer to `conftest.exe'), while it won't with
28955# `rm'.
28956for ac_file in conftest.exe conftest conftest.*; do
28957  test -f "$ac_file" || continue
28958  case $ac_file in
28959    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28960    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28961	  break;;
28962    * ) break;;
28963  esac
28964done
28965else
28966  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28967$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28968as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28969See \`config.log' for more details" "$LINENO" 5; }
28970fi
28971rm -f conftest conftest$ac_cv_exeext
28972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28973$as_echo "$ac_cv_exeext" >&6; }
28974
28975rm -f conftest.$ac_ext
28976EXEEXT=$ac_cv_exeext
28977ac_exeext=$EXEEXT
28978cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28979/* end confdefs.h.  */
28980#include <stdio.h>
28981int
28982main ()
28983{
28984FILE *f = fopen ("conftest.out", "w");
28985 return ferror (f) || fclose (f) != 0;
28986
28987  ;
28988  return 0;
28989}
28990_ACEOF
28991ac_clean_files="$ac_clean_files conftest.out"
28992# Check that the compiler produces executables we can run.  If not, either
28993# the compiler is broken, or we cross compile.
28994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28995$as_echo_n "checking whether we are cross compiling... " >&6; }
28996if test "$cross_compiling" != yes; then
28997  { { ac_try="$ac_link"
28998case "(($ac_try" in
28999  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29000  *) ac_try_echo=$ac_try;;
29001esac
29002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29003$as_echo "$ac_try_echo"; } >&5
29004  (eval "$ac_link") 2>&5
29005  ac_status=$?
29006  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29007  test $ac_status = 0; }
29008  if { ac_try='./conftest$ac_cv_exeext'
29009  { { case "(($ac_try" in
29010  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29011  *) ac_try_echo=$ac_try;;
29012esac
29013eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29014$as_echo "$ac_try_echo"; } >&5
29015  (eval "$ac_try") 2>&5
29016  ac_status=$?
29017  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29018  test $ac_status = 0; }; }; then
29019    cross_compiling=no
29020  else
29021    if test "$cross_compiling" = maybe; then
29022	cross_compiling=yes
29023    else
29024	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29025$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29026as_fn_error $? "cannot run C compiled programs.
29027If you meant to cross compile, use \`--host'.
29028See \`config.log' for more details" "$LINENO" 5; }
29029    fi
29030  fi
29031fi
29032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29033$as_echo "$cross_compiling" >&6; }
29034
29035rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29036ac_clean_files=$ac_clean_files_save
29037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29038$as_echo_n "checking for suffix of object files... " >&6; }
29039if ${ac_cv_objext+:} false; then :
29040  $as_echo_n "(cached) " >&6
29041else
29042  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29043/* end confdefs.h.  */
29044
29045int
29046main ()
29047{
29048
29049  ;
29050  return 0;
29051}
29052_ACEOF
29053rm -f conftest.o conftest.obj
29054if { { ac_try="$ac_compile"
29055case "(($ac_try" in
29056  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29057  *) ac_try_echo=$ac_try;;
29058esac
29059eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29060$as_echo "$ac_try_echo"; } >&5
29061  (eval "$ac_compile") 2>&5
29062  ac_status=$?
29063  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29064  test $ac_status = 0; }; then :
29065  for ac_file in conftest.o conftest.obj conftest.*; do
29066  test -f "$ac_file" || continue;
29067  case $ac_file in
29068    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29069    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29070       break;;
29071  esac
29072done
29073else
29074  $as_echo "$as_me: failed program was:" >&5
29075sed 's/^/| /' conftest.$ac_ext >&5
29076
29077{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29078$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29079as_fn_error $? "cannot compute suffix of object files: cannot compile
29080See \`config.log' for more details" "$LINENO" 5; }
29081fi
29082rm -f conftest.$ac_cv_objext conftest.$ac_ext
29083fi
29084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29085$as_echo "$ac_cv_objext" >&6; }
29086OBJEXT=$ac_cv_objext
29087ac_objext=$OBJEXT
29088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29089$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29090if ${ac_cv_c_compiler_gnu+:} false; then :
29091  $as_echo_n "(cached) " >&6
29092else
29093  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29094/* end confdefs.h.  */
29095
29096int
29097main ()
29098{
29099#ifndef __GNUC__
29100       choke me
29101#endif
29102
29103  ;
29104  return 0;
29105}
29106_ACEOF
29107if ac_fn_c_try_compile "$LINENO"; then :
29108  ac_compiler_gnu=yes
29109else
29110  ac_compiler_gnu=no
29111fi
29112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29113ac_cv_c_compiler_gnu=$ac_compiler_gnu
29114
29115fi
29116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29117$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29118if test $ac_compiler_gnu = yes; then
29119  GCC=yes
29120else
29121  GCC=
29122fi
29123ac_test_CFLAGS=${CFLAGS+set}
29124ac_save_CFLAGS=$CFLAGS
29125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29126$as_echo_n "checking whether $CC accepts -g... " >&6; }
29127if ${ac_cv_prog_cc_g+:} false; then :
29128  $as_echo_n "(cached) " >&6
29129else
29130  ac_save_c_werror_flag=$ac_c_werror_flag
29131   ac_c_werror_flag=yes
29132   ac_cv_prog_cc_g=no
29133   CFLAGS="-g"
29134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29135/* end confdefs.h.  */
29136
29137int
29138main ()
29139{
29140
29141  ;
29142  return 0;
29143}
29144_ACEOF
29145if ac_fn_c_try_compile "$LINENO"; then :
29146  ac_cv_prog_cc_g=yes
29147else
29148  CFLAGS=""
29149      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29150/* end confdefs.h.  */
29151
29152int
29153main ()
29154{
29155
29156  ;
29157  return 0;
29158}
29159_ACEOF
29160if ac_fn_c_try_compile "$LINENO"; then :
29161
29162else
29163  ac_c_werror_flag=$ac_save_c_werror_flag
29164	 CFLAGS="-g"
29165	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29166/* end confdefs.h.  */
29167
29168int
29169main ()
29170{
29171
29172  ;
29173  return 0;
29174}
29175_ACEOF
29176if ac_fn_c_try_compile "$LINENO"; then :
29177  ac_cv_prog_cc_g=yes
29178fi
29179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29180fi
29181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29182fi
29183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29184   ac_c_werror_flag=$ac_save_c_werror_flag
29185fi
29186{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29187$as_echo "$ac_cv_prog_cc_g" >&6; }
29188if test "$ac_test_CFLAGS" = set; then
29189  CFLAGS=$ac_save_CFLAGS
29190elif test $ac_cv_prog_cc_g = yes; then
29191  if test "$GCC" = yes; then
29192    CFLAGS="-g -O2"
29193  else
29194    CFLAGS="-g"
29195  fi
29196else
29197  if test "$GCC" = yes; then
29198    CFLAGS="-O2"
29199  else
29200    CFLAGS=
29201  fi
29202fi
29203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29204$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29205if ${ac_cv_prog_cc_c89+:} false; then :
29206  $as_echo_n "(cached) " >&6
29207else
29208  ac_cv_prog_cc_c89=no
29209ac_save_CC=$CC
29210cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29211/* end confdefs.h.  */
29212#include <stdarg.h>
29213#include <stdio.h>
29214struct stat;
29215/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29216struct buf { int x; };
29217FILE * (*rcsopen) (struct buf *, struct stat *, int);
29218static char *e (p, i)
29219     char **p;
29220     int i;
29221{
29222  return p[i];
29223}
29224static char *f (char * (*g) (char **, int), char **p, ...)
29225{
29226  char *s;
29227  va_list v;
29228  va_start (v,p);
29229  s = g (p, va_arg (v,int));
29230  va_end (v);
29231  return s;
29232}
29233
29234/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29235   function prototypes and stuff, but not '\xHH' hex character constants.
29236   These don't provoke an error unfortunately, instead are silently treated
29237   as 'x'.  The following induces an error, until -std is added to get
29238   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29239   array size at least.  It's necessary to write '\x00'==0 to get something
29240   that's true only with -std.  */
29241int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29242
29243/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29244   inside strings and character constants.  */
29245#define FOO(x) 'x'
29246int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29247
29248int test (int i, double x);
29249struct s1 {int (*f) (int a);};
29250struct s2 {int (*f) (double a);};
29251int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29252int argc;
29253char **argv;
29254int
29255main ()
29256{
29257return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29258  ;
29259  return 0;
29260}
29261_ACEOF
29262for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29263	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29264do
29265  CC="$ac_save_CC $ac_arg"
29266  if ac_fn_c_try_compile "$LINENO"; then :
29267  ac_cv_prog_cc_c89=$ac_arg
29268fi
29269rm -f core conftest.err conftest.$ac_objext
29270  test "x$ac_cv_prog_cc_c89" != "xno" && break
29271done
29272rm -f conftest.$ac_ext
29273CC=$ac_save_CC
29274
29275fi
29276# AC_CACHE_VAL
29277case "x$ac_cv_prog_cc_c89" in
29278  x)
29279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29280$as_echo "none needed" >&6; } ;;
29281  xno)
29282    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29283$as_echo "unsupported" >&6; } ;;
29284  *)
29285    CC="$CC $ac_cv_prog_cc_c89"
29286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29287$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29288esac
29289if test "x$ac_cv_prog_cc_c89" != xno; then :
29290
29291fi
29292
29293ac_ext=cpp
29294ac_cpp='$CXXCPP $CPPFLAGS'
29295ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29296ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29297ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29298
29299
29300
29301  COMPILER_NAME=C++
29302  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29303
29304  if test "x$CXX" != x; then
29305    # User has supplied compiler name already, always let that override.
29306    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29307$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29308    if test "x`basename $CXX`" = "x$CXX"; then
29309      # A command without a complete path is provided, search $PATH.
29310
29311      for ac_prog in $CXX
29312do
29313  # Extract the first word of "$ac_prog", so it can be a program name with args.
29314set dummy $ac_prog; ac_word=$2
29315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29316$as_echo_n "checking for $ac_word... " >&6; }
29317if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29318  $as_echo_n "(cached) " >&6
29319else
29320  case $POTENTIAL_CXX in
29321  [\\/]* | ?:[\\/]*)
29322  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29323  ;;
29324  *)
29325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29326for as_dir in $PATH
29327do
29328  IFS=$as_save_IFS
29329  test -z "$as_dir" && as_dir=.
29330    for ac_exec_ext in '' $ac_executable_extensions; do
29331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29332    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29334    break 2
29335  fi
29336done
29337  done
29338IFS=$as_save_IFS
29339
29340  ;;
29341esac
29342fi
29343POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29344if test -n "$POTENTIAL_CXX"; then
29345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29346$as_echo "$POTENTIAL_CXX" >&6; }
29347else
29348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29349$as_echo "no" >&6; }
29350fi
29351
29352
29353  test -n "$POTENTIAL_CXX" && break
29354done
29355
29356      if test "x$POTENTIAL_CXX" != x; then
29357        CXX=$POTENTIAL_CXX
29358      else
29359        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29360      fi
29361    else
29362      # Otherwise it might already be a complete path
29363      if test ! -x "$CXX"; then
29364        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29365      fi
29366    fi
29367  else
29368    # No user supplied value. Locate compiler ourselves.
29369
29370    # If we are cross compiling, assume cross compilation tools follows the
29371    # cross compilation standard where they are prefixed with the autoconf
29372    # standard name for the target. For example the binary
29373    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29374    # If we are not cross compiling, then the default compiler name will be
29375    # used.
29376
29377    CXX=
29378    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29379    # before checking the rest of the PATH.
29380    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29381    # step, this should not be necessary.
29382    if test -n "$TOOLCHAIN_PATH"; then
29383      PATH_save="$PATH"
29384      PATH="$TOOLCHAIN_PATH"
29385      for ac_prog in $SEARCH_LIST
29386do
29387  # Extract the first word of "$ac_prog", so it can be a program name with args.
29388set dummy $ac_prog; ac_word=$2
29389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29390$as_echo_n "checking for $ac_word... " >&6; }
29391if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29392  $as_echo_n "(cached) " >&6
29393else
29394  case $TOOLCHAIN_PATH_CXX in
29395  [\\/]* | ?:[\\/]*)
29396  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29397  ;;
29398  *)
29399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29400for as_dir in $PATH
29401do
29402  IFS=$as_save_IFS
29403  test -z "$as_dir" && as_dir=.
29404    for ac_exec_ext in '' $ac_executable_extensions; do
29405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29406    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29408    break 2
29409  fi
29410done
29411  done
29412IFS=$as_save_IFS
29413
29414  ;;
29415esac
29416fi
29417TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29418if test -n "$TOOLCHAIN_PATH_CXX"; then
29419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29420$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29421else
29422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29423$as_echo "no" >&6; }
29424fi
29425
29426
29427  test -n "$TOOLCHAIN_PATH_CXX" && break
29428done
29429
29430      CXX=$TOOLCHAIN_PATH_CXX
29431      PATH="$PATH_save"
29432    fi
29433
29434    # AC_PATH_PROGS can't be run multiple times with the same variable,
29435    # so create a new name for this run.
29436    if test "x$CXX" = x; then
29437      for ac_prog in $SEARCH_LIST
29438do
29439  # Extract the first word of "$ac_prog", so it can be a program name with args.
29440set dummy $ac_prog; ac_word=$2
29441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29442$as_echo_n "checking for $ac_word... " >&6; }
29443if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29444  $as_echo_n "(cached) " >&6
29445else
29446  case $POTENTIAL_CXX in
29447  [\\/]* | ?:[\\/]*)
29448  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29449  ;;
29450  *)
29451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29452for as_dir in $PATH
29453do
29454  IFS=$as_save_IFS
29455  test -z "$as_dir" && as_dir=.
29456    for ac_exec_ext in '' $ac_executable_extensions; do
29457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29458    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29460    break 2
29461  fi
29462done
29463  done
29464IFS=$as_save_IFS
29465
29466  ;;
29467esac
29468fi
29469POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29470if test -n "$POTENTIAL_CXX"; then
29471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29472$as_echo "$POTENTIAL_CXX" >&6; }
29473else
29474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29475$as_echo "no" >&6; }
29476fi
29477
29478
29479  test -n "$POTENTIAL_CXX" && break
29480done
29481
29482      CXX=$POTENTIAL_CXX
29483    fi
29484
29485    if test "x$CXX" = x; then
29486
29487  # Print a helpful message on how to acquire the necessary build dependency.
29488  # devkit is the help tag: freetype, cups, pulse, alsa etc
29489  MISSING_DEPENDENCY=devkit
29490
29491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29492    cygwin_help $MISSING_DEPENDENCY
29493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29494    msys_help $MISSING_DEPENDENCY
29495  else
29496    PKGHANDLER_COMMAND=
29497
29498    case $PKGHANDLER in
29499      apt-get)
29500        apt_help     $MISSING_DEPENDENCY ;;
29501      yum)
29502        yum_help     $MISSING_DEPENDENCY ;;
29503      port)
29504        port_help    $MISSING_DEPENDENCY ;;
29505      pkgutil)
29506        pkgutil_help $MISSING_DEPENDENCY ;;
29507      pkgadd)
29508        pkgadd_help  $MISSING_DEPENDENCY ;;
29509    esac
29510
29511    if test "x$PKGHANDLER_COMMAND" != x; then
29512      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29513    fi
29514  fi
29515
29516      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29517    fi
29518  fi
29519
29520  # Now we have a compiler binary in CXX. Make sure it's okay.
29521
29522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29523
29524  # First separate the path from the arguments. This will split at the first
29525  # space.
29526  complete="$CXX"
29527  path="${complete%% *}"
29528  tmp="$complete EOL"
29529  arguments="${tmp#* }"
29530
29531  # Input might be given as Windows format, start by converting to
29532  # unix format.
29533  new_path=`$CYGPATH -u "$path"`
29534
29535  # Now try to locate executable using which
29536  new_path=`$WHICH "$new_path" 2> /dev/null`
29537  # bat and cmd files are not always considered executable in cygwin causing which
29538  # to not find them
29539  if test "x$new_path" = x \
29540      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29541      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29542    new_path=`$CYGPATH -u "$path"`
29543  fi
29544  if test "x$new_path" = x; then
29545    # Oops. Which didn't find the executable.
29546    # The splitting of arguments from the executable at a space might have been incorrect,
29547    # since paths with space are more likely in Windows. Give it another try with the whole
29548    # argument.
29549    path="$complete"
29550    arguments="EOL"
29551    new_path=`$CYGPATH -u "$path"`
29552    new_path=`$WHICH "$new_path" 2> /dev/null`
29553    # bat and cmd files are not always considered executable in cygwin causing which
29554    # to not find them
29555    if test "x$new_path" = x \
29556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29558      new_path=`$CYGPATH -u "$path"`
29559    fi
29560    if test "x$new_path" = x; then
29561      # It's still not found. Now this is an unrecoverable error.
29562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29563$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29564      has_space=`$ECHO "$complete" | $GREP " "`
29565      if test "x$has_space" != x; then
29566        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29567$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29568      fi
29569      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29570    fi
29571  fi
29572
29573  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29574  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29575  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29576  # "foo.exe" is OK but "foo" is an error.
29577  #
29578  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29579  # It is also a way to make sure we got the proper file name for the real test later on.
29580  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29581  if test "x$test_shortpath" = x; then
29582    # Short path failed, file does not exist as specified.
29583    # Try adding .exe or .cmd
29584    if test -f "${new_path}.exe"; then
29585      input_to_shortpath="${new_path}.exe"
29586    elif test -f "${new_path}.cmd"; then
29587      input_to_shortpath="${new_path}.cmd"
29588    else
29589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29590$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29591      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29592$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29593      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29594    fi
29595  else
29596    input_to_shortpath="$new_path"
29597  fi
29598
29599  # Call helper function which possibly converts this using DOS-style short mode.
29600  # If so, the updated path is stored in $new_path.
29601  new_path="$input_to_shortpath"
29602
29603  input_path="$input_to_shortpath"
29604  # Check if we need to convert this using DOS-style short mode. If the path
29605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29606  # take no chances and rewrite it.
29607  # Note: m4 eats our [], so we need to use [ and ] instead.
29608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29609  if test "x$has_forbidden_chars" != x; then
29610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29611    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29612    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29613    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29614      # Going to short mode and back again did indeed matter. Since short mode is
29615      # case insensitive, let's make it lowercase to improve readability.
29616      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29617      # Now convert it back to Unix-stile (cygpath)
29618      input_path=`$CYGPATH -u "$shortmode_path"`
29619      new_path="$input_path"
29620    fi
29621  fi
29622
29623  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29624  if test "x$test_cygdrive_prefix" = x; then
29625    # As a simple fix, exclude /usr/bin since it's not a real path.
29626    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29627      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29628      # a path prefixed by /cygdrive for fixpath to work.
29629      new_path="$CYGWIN_ROOT_PATH$input_path"
29630    fi
29631  fi
29632
29633  # remove trailing .exe if any
29634  new_path="${new_path/%.exe/}"
29635
29636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29637
29638  # First separate the path from the arguments. This will split at the first
29639  # space.
29640  complete="$CXX"
29641  path="${complete%% *}"
29642  tmp="$complete EOL"
29643  arguments="${tmp#* }"
29644
29645  # Input might be given as Windows format, start by converting to
29646  # unix format.
29647  new_path="$path"
29648
29649  windows_path="$new_path"
29650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29651    unix_path=`$CYGPATH -u "$windows_path"`
29652    new_path="$unix_path"
29653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29655    new_path="$unix_path"
29656  fi
29657
29658
29659  # Now try to locate executable using which
29660  new_path=`$WHICH "$new_path" 2> /dev/null`
29661
29662  if test "x$new_path" = x; then
29663    # Oops. Which didn't find the executable.
29664    # The splitting of arguments from the executable at a space might have been incorrect,
29665    # since paths with space are more likely in Windows. Give it another try with the whole
29666    # argument.
29667    path="$complete"
29668    arguments="EOL"
29669    new_path="$path"
29670
29671  windows_path="$new_path"
29672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29673    unix_path=`$CYGPATH -u "$windows_path"`
29674    new_path="$unix_path"
29675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29677    new_path="$unix_path"
29678  fi
29679
29680
29681    new_path=`$WHICH "$new_path" 2> /dev/null`
29682    # bat and cmd files are not always considered executable in MSYS causing which
29683    # to not find them
29684    if test "x$new_path" = x \
29685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29687      new_path="$path"
29688
29689  windows_path="$new_path"
29690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29691    unix_path=`$CYGPATH -u "$windows_path"`
29692    new_path="$unix_path"
29693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29695    new_path="$unix_path"
29696  fi
29697
29698    fi
29699
29700    if test "x$new_path" = x; then
29701      # It's still not found. Now this is an unrecoverable error.
29702      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29703$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29704      has_space=`$ECHO "$complete" | $GREP " "`
29705      if test "x$has_space" != x; then
29706        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29707$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29708      fi
29709      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29710    fi
29711  fi
29712
29713  # Now new_path has a complete unix path to the binary
29714  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29715    # Keep paths in /bin as-is, but remove trailing .exe if any
29716    new_path="${new_path/%.exe/}"
29717    # Do not save /bin paths to all_fixpath_prefixes!
29718  else
29719    # Not in mixed or Windows style, start by that.
29720    new_path=`cmd //c echo $new_path`
29721
29722  input_path="$new_path"
29723  # Check if we need to convert this using DOS-style short mode. If the path
29724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29725  # take no chances and rewrite it.
29726  # Note: m4 eats our [], so we need to use [ and ] instead.
29727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29728  if test "x$has_forbidden_chars" != x; then
29729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29731  fi
29732
29733    # Output is in $new_path
29734
29735  windows_path="$new_path"
29736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29737    unix_path=`$CYGPATH -u "$windows_path"`
29738    new_path="$unix_path"
29739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29741    new_path="$unix_path"
29742  fi
29743
29744    # remove trailing .exe if any
29745    new_path="${new_path/%.exe/}"
29746
29747    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29748    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29749  fi
29750
29751  else
29752    # We're on a unix platform. Hooray! :)
29753    # First separate the path from the arguments. This will split at the first
29754    # space.
29755    complete="$CXX"
29756    path="${complete%% *}"
29757    tmp="$complete EOL"
29758    arguments="${tmp#* }"
29759
29760    # Cannot rely on the command "which" here since it doesn't always work.
29761    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29762    if test -z "$is_absolute_path"; then
29763      # Path to executable is not absolute. Find it.
29764      IFS_save="$IFS"
29765      IFS=:
29766      for p in $PATH; do
29767        if test -f "$p/$path" && test -x "$p/$path"; then
29768          new_path="$p/$path"
29769          break
29770        fi
29771      done
29772      IFS="$IFS_save"
29773    else
29774      # This is an absolute path, we can use it without further modifications.
29775      new_path="$path"
29776    fi
29777
29778    if test "x$new_path" = x; then
29779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29780$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29781      has_space=`$ECHO "$complete" | $GREP " "`
29782      if test "x$has_space" != x; then
29783        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29784$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29785      fi
29786      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29787    fi
29788  fi
29789
29790  # Now join together the path and the arguments once again
29791  if test "x$arguments" != xEOL; then
29792    new_complete="$new_path ${arguments% *}"
29793  else
29794    new_complete="$new_path"
29795  fi
29796
29797  if test "x$complete" != "x$new_complete"; then
29798    CXX="$new_complete"
29799    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29800$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29801  fi
29802
29803  TEST_COMPILER="$CXX"
29804  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29805  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29806  if test "x$OPENJDK_BUILD_OS" != xaix; then
29807    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29809$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29810
29811  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29812    # Follow a chain of symbolic links. Use readlink
29813    # where it exists, else fall back to horribly
29814    # complicated shell code.
29815    if test "x$READLINK_TESTED" != yes; then
29816      # On MacOSX there is a readlink tool with a different
29817      # purpose than the GNU readlink tool. Check the found readlink.
29818      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29819      if test "x$ISGNU" = x; then
29820        # A readlink that we do not know how to use.
29821        # Are there other non-GNU readlinks out there?
29822        READLINK_TESTED=yes
29823        READLINK=
29824      fi
29825    fi
29826
29827    if test "x$READLINK" != x; then
29828      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29829    else
29830      # Save the current directory for restoring afterwards
29831      STARTDIR=$PWD
29832      COUNTER=0
29833      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29834      sym_link_file=`$BASENAME $TEST_COMPILER`
29835      cd $sym_link_dir
29836      # Use -P flag to resolve symlinks in directories.
29837      cd `$THEPWDCMD -P`
29838      sym_link_dir=`$THEPWDCMD -P`
29839      # Resolve file symlinks
29840      while test $COUNTER -lt 20; do
29841        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29842        if test "x$ISLINK" == x; then
29843          # This is not a symbolic link! We are done!
29844          break
29845        fi
29846        # Again resolve directory symlinks since the target of the just found
29847        # link could be in a different directory
29848        cd `$DIRNAME $ISLINK`
29849        sym_link_dir=`$THEPWDCMD -P`
29850        sym_link_file=`$BASENAME $ISLINK`
29851        let COUNTER=COUNTER+1
29852      done
29853      cd $STARTDIR
29854      TEST_COMPILER=$sym_link_dir/$sym_link_file
29855    fi
29856  fi
29857
29858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29859$as_echo "$TEST_COMPILER" >&6; }
29860  fi
29861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29862$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29863
29864  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29865  if test "x$COMPILER_BASENAME" = "xccache"; then
29866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29867$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29868    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29869    # We want to control ccache invocation ourselves, so ignore this cc and try
29870    # searching again.
29871
29872    # Remove the path to the fake ccache cc from the PATH
29873    RETRY_COMPILER_SAVED_PATH="$PATH"
29874    COMPILER_DIRNAME=`$DIRNAME $CXX`
29875    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29876
29877    # Try again looking for our compiler
29878    if test -n "$ac_tool_prefix"; then
29879  for ac_prog in $TOOLCHAIN_CXX_BINARY
29880  do
29881    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29882set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29884$as_echo_n "checking for $ac_word... " >&6; }
29885if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29886  $as_echo_n "(cached) " >&6
29887else
29888  if test -n "$PROPER_COMPILER_CXX"; then
29889  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29890else
29891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29892for as_dir in $PATH
29893do
29894  IFS=$as_save_IFS
29895  test -z "$as_dir" && as_dir=.
29896    for ac_exec_ext in '' $ac_executable_extensions; do
29897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29898    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29900    break 2
29901  fi
29902done
29903  done
29904IFS=$as_save_IFS
29905
29906fi
29907fi
29908PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29909if test -n "$PROPER_COMPILER_CXX"; then
29910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29911$as_echo "$PROPER_COMPILER_CXX" >&6; }
29912else
29913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29914$as_echo "no" >&6; }
29915fi
29916
29917
29918    test -n "$PROPER_COMPILER_CXX" && break
29919  done
29920fi
29921if test -z "$PROPER_COMPILER_CXX"; then
29922  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29923  for ac_prog in $TOOLCHAIN_CXX_BINARY
29924do
29925  # Extract the first word of "$ac_prog", so it can be a program name with args.
29926set dummy $ac_prog; ac_word=$2
29927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29928$as_echo_n "checking for $ac_word... " >&6; }
29929if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29930  $as_echo_n "(cached) " >&6
29931else
29932  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29933  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29934else
29935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29936for as_dir in $PATH
29937do
29938  IFS=$as_save_IFS
29939  test -z "$as_dir" && as_dir=.
29940    for ac_exec_ext in '' $ac_executable_extensions; do
29941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29942    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29944    break 2
29945  fi
29946done
29947  done
29948IFS=$as_save_IFS
29949
29950fi
29951fi
29952ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29953if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29955$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29956else
29957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29958$as_echo "no" >&6; }
29959fi
29960
29961
29962  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29963done
29964
29965  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29966    PROPER_COMPILER_CXX=""
29967  else
29968    case $cross_compiling:$ac_tool_warned in
29969yes:)
29970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29972ac_tool_warned=yes ;;
29973esac
29974    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29975  fi
29976fi
29977
29978
29979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29980
29981  # First separate the path from the arguments. This will split at the first
29982  # space.
29983  complete="$PROPER_COMPILER_CXX"
29984  path="${complete%% *}"
29985  tmp="$complete EOL"
29986  arguments="${tmp#* }"
29987
29988  # Input might be given as Windows format, start by converting to
29989  # unix format.
29990  new_path=`$CYGPATH -u "$path"`
29991
29992  # Now try to locate executable using which
29993  new_path=`$WHICH "$new_path" 2> /dev/null`
29994  # bat and cmd files are not always considered executable in cygwin causing which
29995  # to not find them
29996  if test "x$new_path" = x \
29997      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29998      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29999    new_path=`$CYGPATH -u "$path"`
30000  fi
30001  if test "x$new_path" = x; then
30002    # Oops. Which didn't find the executable.
30003    # The splitting of arguments from the executable at a space might have been incorrect,
30004    # since paths with space are more likely in Windows. Give it another try with the whole
30005    # argument.
30006    path="$complete"
30007    arguments="EOL"
30008    new_path=`$CYGPATH -u "$path"`
30009    new_path=`$WHICH "$new_path" 2> /dev/null`
30010    # bat and cmd files are not always considered executable in cygwin causing which
30011    # to not find them
30012    if test "x$new_path" = x \
30013        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30014        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30015      new_path=`$CYGPATH -u "$path"`
30016    fi
30017    if test "x$new_path" = x; then
30018      # It's still not found. Now this is an unrecoverable error.
30019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30020$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30021      has_space=`$ECHO "$complete" | $GREP " "`
30022      if test "x$has_space" != x; then
30023        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30024$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30025      fi
30026      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30027    fi
30028  fi
30029
30030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30033  # "foo.exe" is OK but "foo" is an error.
30034  #
30035  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30036  # It is also a way to make sure we got the proper file name for the real test later on.
30037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30038  if test "x$test_shortpath" = x; then
30039    # Short path failed, file does not exist as specified.
30040    # Try adding .exe or .cmd
30041    if test -f "${new_path}.exe"; then
30042      input_to_shortpath="${new_path}.exe"
30043    elif test -f "${new_path}.cmd"; then
30044      input_to_shortpath="${new_path}.cmd"
30045    else
30046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30047$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30048      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30049$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30050      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30051    fi
30052  else
30053    input_to_shortpath="$new_path"
30054  fi
30055
30056  # Call helper function which possibly converts this using DOS-style short mode.
30057  # If so, the updated path is stored in $new_path.
30058  new_path="$input_to_shortpath"
30059
30060  input_path="$input_to_shortpath"
30061  # Check if we need to convert this using DOS-style short mode. If the path
30062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30063  # take no chances and rewrite it.
30064  # Note: m4 eats our [], so we need to use [ and ] instead.
30065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30066  if test "x$has_forbidden_chars" != x; then
30067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30071      # Going to short mode and back again did indeed matter. Since short mode is
30072      # case insensitive, let's make it lowercase to improve readability.
30073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30074      # Now convert it back to Unix-stile (cygpath)
30075      input_path=`$CYGPATH -u "$shortmode_path"`
30076      new_path="$input_path"
30077    fi
30078  fi
30079
30080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30081  if test "x$test_cygdrive_prefix" = x; then
30082    # As a simple fix, exclude /usr/bin since it's not a real path.
30083    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30085      # a path prefixed by /cygdrive for fixpath to work.
30086      new_path="$CYGWIN_ROOT_PATH$input_path"
30087    fi
30088  fi
30089
30090  # remove trailing .exe if any
30091  new_path="${new_path/%.exe/}"
30092
30093  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30094
30095  # First separate the path from the arguments. This will split at the first
30096  # space.
30097  complete="$PROPER_COMPILER_CXX"
30098  path="${complete%% *}"
30099  tmp="$complete EOL"
30100  arguments="${tmp#* }"
30101
30102  # Input might be given as Windows format, start by converting to
30103  # unix format.
30104  new_path="$path"
30105
30106  windows_path="$new_path"
30107  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30108    unix_path=`$CYGPATH -u "$windows_path"`
30109    new_path="$unix_path"
30110  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30111    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30112    new_path="$unix_path"
30113  fi
30114
30115
30116  # Now try to locate executable using which
30117  new_path=`$WHICH "$new_path" 2> /dev/null`
30118
30119  if test "x$new_path" = x; then
30120    # Oops. Which didn't find the executable.
30121    # The splitting of arguments from the executable at a space might have been incorrect,
30122    # since paths with space are more likely in Windows. Give it another try with the whole
30123    # argument.
30124    path="$complete"
30125    arguments="EOL"
30126    new_path="$path"
30127
30128  windows_path="$new_path"
30129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30130    unix_path=`$CYGPATH -u "$windows_path"`
30131    new_path="$unix_path"
30132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30134    new_path="$unix_path"
30135  fi
30136
30137
30138    new_path=`$WHICH "$new_path" 2> /dev/null`
30139    # bat and cmd files are not always considered executable in MSYS causing which
30140    # to not find them
30141    if test "x$new_path" = x \
30142        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30143        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30144      new_path="$path"
30145
30146  windows_path="$new_path"
30147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30148    unix_path=`$CYGPATH -u "$windows_path"`
30149    new_path="$unix_path"
30150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30152    new_path="$unix_path"
30153  fi
30154
30155    fi
30156
30157    if test "x$new_path" = x; then
30158      # It's still not found. Now this is an unrecoverable error.
30159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30160$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30161      has_space=`$ECHO "$complete" | $GREP " "`
30162      if test "x$has_space" != x; then
30163        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30164$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30165      fi
30166      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30167    fi
30168  fi
30169
30170  # Now new_path has a complete unix path to the binary
30171  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30172    # Keep paths in /bin as-is, but remove trailing .exe if any
30173    new_path="${new_path/%.exe/}"
30174    # Do not save /bin paths to all_fixpath_prefixes!
30175  else
30176    # Not in mixed or Windows style, start by that.
30177    new_path=`cmd //c echo $new_path`
30178
30179  input_path="$new_path"
30180  # Check if we need to convert this using DOS-style short mode. If the path
30181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30182  # take no chances and rewrite it.
30183  # Note: m4 eats our [], so we need to use [ and ] instead.
30184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30185  if test "x$has_forbidden_chars" != x; then
30186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30187    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30188  fi
30189
30190    # Output is in $new_path
30191
30192  windows_path="$new_path"
30193  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30194    unix_path=`$CYGPATH -u "$windows_path"`
30195    new_path="$unix_path"
30196  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30197    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30198    new_path="$unix_path"
30199  fi
30200
30201    # remove trailing .exe if any
30202    new_path="${new_path/%.exe/}"
30203
30204    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30205    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30206  fi
30207
30208  else
30209    # We're on a unix platform. Hooray! :)
30210    # First separate the path from the arguments. This will split at the first
30211    # space.
30212    complete="$PROPER_COMPILER_CXX"
30213    path="${complete%% *}"
30214    tmp="$complete EOL"
30215    arguments="${tmp#* }"
30216
30217    # Cannot rely on the command "which" here since it doesn't always work.
30218    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30219    if test -z "$is_absolute_path"; then
30220      # Path to executable is not absolute. Find it.
30221      IFS_save="$IFS"
30222      IFS=:
30223      for p in $PATH; do
30224        if test -f "$p/$path" && test -x "$p/$path"; then
30225          new_path="$p/$path"
30226          break
30227        fi
30228      done
30229      IFS="$IFS_save"
30230    else
30231      # This is an absolute path, we can use it without further modifications.
30232      new_path="$path"
30233    fi
30234
30235    if test "x$new_path" = x; then
30236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30237$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30238      has_space=`$ECHO "$complete" | $GREP " "`
30239      if test "x$has_space" != x; then
30240        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30241$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30242      fi
30243      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30244    fi
30245  fi
30246
30247  # Now join together the path and the arguments once again
30248  if test "x$arguments" != xEOL; then
30249    new_complete="$new_path ${arguments% *}"
30250  else
30251    new_complete="$new_path"
30252  fi
30253
30254  if test "x$complete" != "x$new_complete"; then
30255    PROPER_COMPILER_CXX="$new_complete"
30256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30257$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30258  fi
30259
30260    PATH="$RETRY_COMPILER_SAVED_PATH"
30261
30262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30263$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30264
30265  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30266    # Follow a chain of symbolic links. Use readlink
30267    # where it exists, else fall back to horribly
30268    # complicated shell code.
30269    if test "x$READLINK_TESTED" != yes; then
30270      # On MacOSX there is a readlink tool with a different
30271      # purpose than the GNU readlink tool. Check the found readlink.
30272      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30273      if test "x$ISGNU" = x; then
30274        # A readlink that we do not know how to use.
30275        # Are there other non-GNU readlinks out there?
30276        READLINK_TESTED=yes
30277        READLINK=
30278      fi
30279    fi
30280
30281    if test "x$READLINK" != x; then
30282      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30283    else
30284      # Save the current directory for restoring afterwards
30285      STARTDIR=$PWD
30286      COUNTER=0
30287      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30288      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30289      cd $sym_link_dir
30290      # Use -P flag to resolve symlinks in directories.
30291      cd `$THEPWDCMD -P`
30292      sym_link_dir=`$THEPWDCMD -P`
30293      # Resolve file symlinks
30294      while test $COUNTER -lt 20; do
30295        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30296        if test "x$ISLINK" == x; then
30297          # This is not a symbolic link! We are done!
30298          break
30299        fi
30300        # Again resolve directory symlinks since the target of the just found
30301        # link could be in a different directory
30302        cd `$DIRNAME $ISLINK`
30303        sym_link_dir=`$THEPWDCMD -P`
30304        sym_link_file=`$BASENAME $ISLINK`
30305        let COUNTER=COUNTER+1
30306      done
30307      cd $STARTDIR
30308      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30309    fi
30310  fi
30311
30312    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30313$as_echo "$PROPER_COMPILER_CXX" >&6; }
30314    CXX="$PROPER_COMPILER_CXX"
30315  else
30316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30317$as_echo "no, keeping CXX" >&6; }
30318  fi
30319
30320
30321  COMPILER=$CXX
30322  COMPILER_NAME=$COMPILER_NAME
30323
30324  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30325    # cc -V output typically looks like
30326    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30327    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30328    # Check that this is likely to be the Solaris Studio cc.
30329    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30330    if test $? -ne 0; then
30331      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30332      { $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
30333$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30334      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30335$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30336      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30337$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30338      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30339    fi
30340    # Remove usage instructions (if present), and
30341    # collapse compiler output into a single line
30342    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30343        $SED -e 's/ *[Uu]sage:.*//'`
30344    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30345        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30346  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30347    # xlc -qversion output typically looks like
30348    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30349    #     Version: 11.01.0000.0015
30350    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30351    # Check that this is likely to be the IBM XL C compiler.
30352    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30353    if test $? -ne 0; then
30354      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30355      { $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
30356$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30357      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30358$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30359      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30360$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30361      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30362    fi
30363    # Collapse compiler output into a single line
30364    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30365    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30366        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30367  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30368    # There is no specific version flag, but all output starts with a version string.
30369    # First line typically looks something like:
30370    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30371    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30372    # Check that this is likely to be Microsoft CL.EXE.
30373    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30374    if test $? -ne 0; then
30375      { $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
30376$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30377      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30378$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30379      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30380    fi
30381    # Collapse compiler output into a single line
30382    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30383    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30384        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30385  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30386    # gcc --version output typically looks like
30387    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30388    #     Copyright (C) 2013 Free Software Foundation, Inc.
30389    #     This is free software; see the source for copying conditions.  There is NO
30390    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30391    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30392    # Check that this is likely to be GCC.
30393    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30394    if test $? -ne 0; then
30395      { $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
30396$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30397      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30398$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30399      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30400    fi
30401    # Remove Copyright and legalese from version string, and
30402    # collapse into a single line
30403    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30404        $SED -e 's/ *Copyright .*//'`
30405    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30406        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30407  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30408    # clang --version output typically looks like
30409    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30410    #    clang version 3.3 (tags/RELEASE_33/final)
30411    # or
30412    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30413    #    Target: x86_64-pc-linux-gnu
30414    #    Thread model: posix
30415    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30416    # Check that this is likely to be clang
30417    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30418    if test $? -ne 0; then
30419      { $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
30420$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30421      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30422$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30423      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30424    fi
30425    # Collapse compiler output into a single line
30426    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30427    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30428        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30429  else
30430      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30431  fi
30432  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30433  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30434  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30435  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30436
30437  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30438$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30439
30440
30441  # Now that we have resolved CXX ourself, let autoconf have its go at it
30442  ac_ext=cpp
30443ac_cpp='$CXXCPP $CPPFLAGS'
30444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30447if test -z "$CXX"; then
30448  if test -n "$CCC"; then
30449    CXX=$CCC
30450  else
30451    if test -n "$ac_tool_prefix"; then
30452  for ac_prog in $CXX
30453  do
30454    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30455set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30457$as_echo_n "checking for $ac_word... " >&6; }
30458if ${ac_cv_prog_CXX+:} false; then :
30459  $as_echo_n "(cached) " >&6
30460else
30461  if test -n "$CXX"; then
30462  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30463else
30464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30465for as_dir in $PATH
30466do
30467  IFS=$as_save_IFS
30468  test -z "$as_dir" && as_dir=.
30469    for ac_exec_ext in '' $ac_executable_extensions; do
30470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30471    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30473    break 2
30474  fi
30475done
30476  done
30477IFS=$as_save_IFS
30478
30479fi
30480fi
30481CXX=$ac_cv_prog_CXX
30482if test -n "$CXX"; then
30483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30484$as_echo "$CXX" >&6; }
30485else
30486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30487$as_echo "no" >&6; }
30488fi
30489
30490
30491    test -n "$CXX" && break
30492  done
30493fi
30494if test -z "$CXX"; then
30495  ac_ct_CXX=$CXX
30496  for ac_prog in $CXX
30497do
30498  # Extract the first word of "$ac_prog", so it can be a program name with args.
30499set dummy $ac_prog; ac_word=$2
30500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30501$as_echo_n "checking for $ac_word... " >&6; }
30502if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30503  $as_echo_n "(cached) " >&6
30504else
30505  if test -n "$ac_ct_CXX"; then
30506  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30507else
30508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30509for as_dir in $PATH
30510do
30511  IFS=$as_save_IFS
30512  test -z "$as_dir" && as_dir=.
30513    for ac_exec_ext in '' $ac_executable_extensions; do
30514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30515    ac_cv_prog_ac_ct_CXX="$ac_prog"
30516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30517    break 2
30518  fi
30519done
30520  done
30521IFS=$as_save_IFS
30522
30523fi
30524fi
30525ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30526if test -n "$ac_ct_CXX"; then
30527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30528$as_echo "$ac_ct_CXX" >&6; }
30529else
30530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30531$as_echo "no" >&6; }
30532fi
30533
30534
30535  test -n "$ac_ct_CXX" && break
30536done
30537
30538  if test "x$ac_ct_CXX" = x; then
30539    CXX="g++"
30540  else
30541    case $cross_compiling:$ac_tool_warned in
30542yes:)
30543{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30544$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30545ac_tool_warned=yes ;;
30546esac
30547    CXX=$ac_ct_CXX
30548  fi
30549fi
30550
30551  fi
30552fi
30553# Provide some information about the compiler.
30554$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30555set X $ac_compile
30556ac_compiler=$2
30557for ac_option in --version -v -V -qversion; do
30558  { { ac_try="$ac_compiler $ac_option >&5"
30559case "(($ac_try" in
30560  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30561  *) ac_try_echo=$ac_try;;
30562esac
30563eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30564$as_echo "$ac_try_echo"; } >&5
30565  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30566  ac_status=$?
30567  if test -s conftest.err; then
30568    sed '10a\
30569... rest of stderr output deleted ...
30570         10q' conftest.err >conftest.er1
30571    cat conftest.er1 >&5
30572  fi
30573  rm -f conftest.er1 conftest.err
30574  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30575  test $ac_status = 0; }
30576done
30577
30578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30579$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30580if ${ac_cv_cxx_compiler_gnu+:} false; then :
30581  $as_echo_n "(cached) " >&6
30582else
30583  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30584/* end confdefs.h.  */
30585
30586int
30587main ()
30588{
30589#ifndef __GNUC__
30590       choke me
30591#endif
30592
30593  ;
30594  return 0;
30595}
30596_ACEOF
30597if ac_fn_cxx_try_compile "$LINENO"; then :
30598  ac_compiler_gnu=yes
30599else
30600  ac_compiler_gnu=no
30601fi
30602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30603ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30604
30605fi
30606{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30607$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30608if test $ac_compiler_gnu = yes; then
30609  GXX=yes
30610else
30611  GXX=
30612fi
30613ac_test_CXXFLAGS=${CXXFLAGS+set}
30614ac_save_CXXFLAGS=$CXXFLAGS
30615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30616$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30617if ${ac_cv_prog_cxx_g+:} false; then :
30618  $as_echo_n "(cached) " >&6
30619else
30620  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30621   ac_cxx_werror_flag=yes
30622   ac_cv_prog_cxx_g=no
30623   CXXFLAGS="-g"
30624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30625/* end confdefs.h.  */
30626
30627int
30628main ()
30629{
30630
30631  ;
30632  return 0;
30633}
30634_ACEOF
30635if ac_fn_cxx_try_compile "$LINENO"; then :
30636  ac_cv_prog_cxx_g=yes
30637else
30638  CXXFLAGS=""
30639      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30640/* end confdefs.h.  */
30641
30642int
30643main ()
30644{
30645
30646  ;
30647  return 0;
30648}
30649_ACEOF
30650if ac_fn_cxx_try_compile "$LINENO"; then :
30651
30652else
30653  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30654	 CXXFLAGS="-g"
30655	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30656/* end confdefs.h.  */
30657
30658int
30659main ()
30660{
30661
30662  ;
30663  return 0;
30664}
30665_ACEOF
30666if ac_fn_cxx_try_compile "$LINENO"; then :
30667  ac_cv_prog_cxx_g=yes
30668fi
30669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30670fi
30671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30672fi
30673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30674   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30675fi
30676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30677$as_echo "$ac_cv_prog_cxx_g" >&6; }
30678if test "$ac_test_CXXFLAGS" = set; then
30679  CXXFLAGS=$ac_save_CXXFLAGS
30680elif test $ac_cv_prog_cxx_g = yes; then
30681  if test "$GXX" = yes; then
30682    CXXFLAGS="-g -O2"
30683  else
30684    CXXFLAGS="-g"
30685  fi
30686else
30687  if test "$GXX" = yes; then
30688    CXXFLAGS="-O2"
30689  else
30690    CXXFLAGS=
30691  fi
30692fi
30693ac_ext=cpp
30694ac_cpp='$CXXCPP $CPPFLAGS'
30695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30698
30699
30700  #
30701  # Setup the preprocessor (CPP and CXXCPP)
30702  #
30703  ac_ext=c
30704ac_cpp='$CPP $CPPFLAGS'
30705ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30706ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30707ac_compiler_gnu=$ac_cv_c_compiler_gnu
30708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30709$as_echo_n "checking how to run the C preprocessor... " >&6; }
30710# On Suns, sometimes $CPP names a directory.
30711if test -n "$CPP" && test -d "$CPP"; then
30712  CPP=
30713fi
30714if test -z "$CPP"; then
30715  if ${ac_cv_prog_CPP+:} false; then :
30716  $as_echo_n "(cached) " >&6
30717else
30718      # Double quotes because CPP needs to be expanded
30719    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30720    do
30721      ac_preproc_ok=false
30722for ac_c_preproc_warn_flag in '' yes
30723do
30724  # Use a header file that comes with gcc, so configuring glibc
30725  # with a fresh cross-compiler works.
30726  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30727  # <limits.h> exists even on freestanding compilers.
30728  # On the NeXT, cc -E runs the code through the compiler's parser,
30729  # not just through cpp. "Syntax error" is here to catch this case.
30730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30731/* end confdefs.h.  */
30732#ifdef __STDC__
30733# include <limits.h>
30734#else
30735# include <assert.h>
30736#endif
30737		     Syntax error
30738_ACEOF
30739if ac_fn_c_try_cpp "$LINENO"; then :
30740
30741else
30742  # Broken: fails on valid input.
30743continue
30744fi
30745rm -f conftest.err conftest.i conftest.$ac_ext
30746
30747  # OK, works on sane cases.  Now check whether nonexistent headers
30748  # can be detected and how.
30749  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30750/* end confdefs.h.  */
30751#include <ac_nonexistent.h>
30752_ACEOF
30753if ac_fn_c_try_cpp "$LINENO"; then :
30754  # Broken: success on invalid input.
30755continue
30756else
30757  # Passes both tests.
30758ac_preproc_ok=:
30759break
30760fi
30761rm -f conftest.err conftest.i conftest.$ac_ext
30762
30763done
30764# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30765rm -f conftest.i conftest.err conftest.$ac_ext
30766if $ac_preproc_ok; then :
30767  break
30768fi
30769
30770    done
30771    ac_cv_prog_CPP=$CPP
30772
30773fi
30774  CPP=$ac_cv_prog_CPP
30775else
30776  ac_cv_prog_CPP=$CPP
30777fi
30778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30779$as_echo "$CPP" >&6; }
30780ac_preproc_ok=false
30781for ac_c_preproc_warn_flag in '' yes
30782do
30783  # Use a header file that comes with gcc, so configuring glibc
30784  # with a fresh cross-compiler works.
30785  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30786  # <limits.h> exists even on freestanding compilers.
30787  # On the NeXT, cc -E runs the code through the compiler's parser,
30788  # not just through cpp. "Syntax error" is here to catch this case.
30789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30790/* end confdefs.h.  */
30791#ifdef __STDC__
30792# include <limits.h>
30793#else
30794# include <assert.h>
30795#endif
30796		     Syntax error
30797_ACEOF
30798if ac_fn_c_try_cpp "$LINENO"; then :
30799
30800else
30801  # Broken: fails on valid input.
30802continue
30803fi
30804rm -f conftest.err conftest.i conftest.$ac_ext
30805
30806  # OK, works on sane cases.  Now check whether nonexistent headers
30807  # can be detected and how.
30808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30809/* end confdefs.h.  */
30810#include <ac_nonexistent.h>
30811_ACEOF
30812if ac_fn_c_try_cpp "$LINENO"; then :
30813  # Broken: success on invalid input.
30814continue
30815else
30816  # Passes both tests.
30817ac_preproc_ok=:
30818break
30819fi
30820rm -f conftest.err conftest.i conftest.$ac_ext
30821
30822done
30823# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30824rm -f conftest.i conftest.err conftest.$ac_ext
30825if $ac_preproc_ok; then :
30826
30827else
30828  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30829$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30830as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30831See \`config.log' for more details" "$LINENO" 5; }
30832fi
30833
30834ac_ext=cpp
30835ac_cpp='$CXXCPP $CPPFLAGS'
30836ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30837ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30838ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30839
30840
30841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30842
30843  # First separate the path from the arguments. This will split at the first
30844  # space.
30845  complete="$CPP"
30846  path="${complete%% *}"
30847  tmp="$complete EOL"
30848  arguments="${tmp#* }"
30849
30850  # Input might be given as Windows format, start by converting to
30851  # unix format.
30852  new_path=`$CYGPATH -u "$path"`
30853
30854  # Now try to locate executable using which
30855  new_path=`$WHICH "$new_path" 2> /dev/null`
30856  # bat and cmd files are not always considered executable in cygwin causing which
30857  # to not find them
30858  if test "x$new_path" = x \
30859      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30860      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30861    new_path=`$CYGPATH -u "$path"`
30862  fi
30863  if test "x$new_path" = x; then
30864    # Oops. Which didn't find the executable.
30865    # The splitting of arguments from the executable at a space might have been incorrect,
30866    # since paths with space are more likely in Windows. Give it another try with the whole
30867    # argument.
30868    path="$complete"
30869    arguments="EOL"
30870    new_path=`$CYGPATH -u "$path"`
30871    new_path=`$WHICH "$new_path" 2> /dev/null`
30872    # bat and cmd files are not always considered executable in cygwin causing which
30873    # to not find them
30874    if test "x$new_path" = x \
30875        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30876        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30877      new_path=`$CYGPATH -u "$path"`
30878    fi
30879    if test "x$new_path" = x; then
30880      # It's still not found. Now this is an unrecoverable error.
30881      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30882$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30883      has_space=`$ECHO "$complete" | $GREP " "`
30884      if test "x$has_space" != x; then
30885        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30886$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30887      fi
30888      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30889    fi
30890  fi
30891
30892  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30893  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30894  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30895  # "foo.exe" is OK but "foo" is an error.
30896  #
30897  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30898  # It is also a way to make sure we got the proper file name for the real test later on.
30899  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30900  if test "x$test_shortpath" = x; then
30901    # Short path failed, file does not exist as specified.
30902    # Try adding .exe or .cmd
30903    if test -f "${new_path}.exe"; then
30904      input_to_shortpath="${new_path}.exe"
30905    elif test -f "${new_path}.cmd"; then
30906      input_to_shortpath="${new_path}.cmd"
30907    else
30908      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30909$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30910      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30911$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30912      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30913    fi
30914  else
30915    input_to_shortpath="$new_path"
30916  fi
30917
30918  # Call helper function which possibly converts this using DOS-style short mode.
30919  # If so, the updated path is stored in $new_path.
30920  new_path="$input_to_shortpath"
30921
30922  input_path="$input_to_shortpath"
30923  # Check if we need to convert this using DOS-style short mode. If the path
30924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30925  # take no chances and rewrite it.
30926  # Note: m4 eats our [], so we need to use [ and ] instead.
30927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30928  if test "x$has_forbidden_chars" != x; then
30929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30930    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30931    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30932    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30933      # Going to short mode and back again did indeed matter. Since short mode is
30934      # case insensitive, let's make it lowercase to improve readability.
30935      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30936      # Now convert it back to Unix-stile (cygpath)
30937      input_path=`$CYGPATH -u "$shortmode_path"`
30938      new_path="$input_path"
30939    fi
30940  fi
30941
30942  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30943  if test "x$test_cygdrive_prefix" = x; then
30944    # As a simple fix, exclude /usr/bin since it's not a real path.
30945    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30946      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30947      # a path prefixed by /cygdrive for fixpath to work.
30948      new_path="$CYGWIN_ROOT_PATH$input_path"
30949    fi
30950  fi
30951
30952  # remove trailing .exe if any
30953  new_path="${new_path/%.exe/}"
30954
30955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30956
30957  # First separate the path from the arguments. This will split at the first
30958  # space.
30959  complete="$CPP"
30960  path="${complete%% *}"
30961  tmp="$complete EOL"
30962  arguments="${tmp#* }"
30963
30964  # Input might be given as Windows format, start by converting to
30965  # unix format.
30966  new_path="$path"
30967
30968  windows_path="$new_path"
30969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30970    unix_path=`$CYGPATH -u "$windows_path"`
30971    new_path="$unix_path"
30972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30974    new_path="$unix_path"
30975  fi
30976
30977
30978  # Now try to locate executable using which
30979  new_path=`$WHICH "$new_path" 2> /dev/null`
30980
30981  if test "x$new_path" = x; then
30982    # Oops. Which didn't find the executable.
30983    # The splitting of arguments from the executable at a space might have been incorrect,
30984    # since paths with space are more likely in Windows. Give it another try with the whole
30985    # argument.
30986    path="$complete"
30987    arguments="EOL"
30988    new_path="$path"
30989
30990  windows_path="$new_path"
30991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30992    unix_path=`$CYGPATH -u "$windows_path"`
30993    new_path="$unix_path"
30994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30996    new_path="$unix_path"
30997  fi
30998
30999
31000    new_path=`$WHICH "$new_path" 2> /dev/null`
31001    # bat and cmd files are not always considered executable in MSYS causing which
31002    # to not find them
31003    if test "x$new_path" = x \
31004        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31005        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31006      new_path="$path"
31007
31008  windows_path="$new_path"
31009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31010    unix_path=`$CYGPATH -u "$windows_path"`
31011    new_path="$unix_path"
31012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31014    new_path="$unix_path"
31015  fi
31016
31017    fi
31018
31019    if test "x$new_path" = x; then
31020      # It's still not found. Now this is an unrecoverable error.
31021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31022$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31023      has_space=`$ECHO "$complete" | $GREP " "`
31024      if test "x$has_space" != x; then
31025        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31026$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31027      fi
31028      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31029    fi
31030  fi
31031
31032  # Now new_path has a complete unix path to the binary
31033  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31034    # Keep paths in /bin as-is, but remove trailing .exe if any
31035    new_path="${new_path/%.exe/}"
31036    # Do not save /bin paths to all_fixpath_prefixes!
31037  else
31038    # Not in mixed or Windows style, start by that.
31039    new_path=`cmd //c echo $new_path`
31040
31041  input_path="$new_path"
31042  # Check if we need to convert this using DOS-style short mode. If the path
31043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31044  # take no chances and rewrite it.
31045  # Note: m4 eats our [], so we need to use [ and ] instead.
31046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31047  if test "x$has_forbidden_chars" != x; then
31048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31050  fi
31051
31052    # Output is in $new_path
31053
31054  windows_path="$new_path"
31055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31056    unix_path=`$CYGPATH -u "$windows_path"`
31057    new_path="$unix_path"
31058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31060    new_path="$unix_path"
31061  fi
31062
31063    # remove trailing .exe if any
31064    new_path="${new_path/%.exe/}"
31065
31066    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31067    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31068  fi
31069
31070  else
31071    # We're on a unix platform. Hooray! :)
31072    # First separate the path from the arguments. This will split at the first
31073    # space.
31074    complete="$CPP"
31075    path="${complete%% *}"
31076    tmp="$complete EOL"
31077    arguments="${tmp#* }"
31078
31079    # Cannot rely on the command "which" here since it doesn't always work.
31080    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31081    if test -z "$is_absolute_path"; then
31082      # Path to executable is not absolute. Find it.
31083      IFS_save="$IFS"
31084      IFS=:
31085      for p in $PATH; do
31086        if test -f "$p/$path" && test -x "$p/$path"; then
31087          new_path="$p/$path"
31088          break
31089        fi
31090      done
31091      IFS="$IFS_save"
31092    else
31093      # This is an absolute path, we can use it without further modifications.
31094      new_path="$path"
31095    fi
31096
31097    if test "x$new_path" = x; then
31098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31099$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31100      has_space=`$ECHO "$complete" | $GREP " "`
31101      if test "x$has_space" != x; then
31102        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31103$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31104      fi
31105      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31106    fi
31107  fi
31108
31109  # Now join together the path and the arguments once again
31110  if test "x$arguments" != xEOL; then
31111    new_complete="$new_path ${arguments% *}"
31112  else
31113    new_complete="$new_path"
31114  fi
31115
31116  if test "x$complete" != "x$new_complete"; then
31117    CPP="$new_complete"
31118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31119$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31120  fi
31121
31122  ac_ext=cpp
31123ac_cpp='$CXXCPP $CPPFLAGS'
31124ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31125ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31126ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31128$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31129if test -z "$CXXCPP"; then
31130  if ${ac_cv_prog_CXXCPP+:} false; then :
31131  $as_echo_n "(cached) " >&6
31132else
31133      # Double quotes because CXXCPP needs to be expanded
31134    for CXXCPP in "$CXX -E" "/lib/cpp"
31135    do
31136      ac_preproc_ok=false
31137for ac_cxx_preproc_warn_flag in '' yes
31138do
31139  # Use a header file that comes with gcc, so configuring glibc
31140  # with a fresh cross-compiler works.
31141  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31142  # <limits.h> exists even on freestanding compilers.
31143  # On the NeXT, cc -E runs the code through the compiler's parser,
31144  # not just through cpp. "Syntax error" is here to catch this case.
31145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31146/* end confdefs.h.  */
31147#ifdef __STDC__
31148# include <limits.h>
31149#else
31150# include <assert.h>
31151#endif
31152		     Syntax error
31153_ACEOF
31154if ac_fn_cxx_try_cpp "$LINENO"; then :
31155
31156else
31157  # Broken: fails on valid input.
31158continue
31159fi
31160rm -f conftest.err conftest.i conftest.$ac_ext
31161
31162  # OK, works on sane cases.  Now check whether nonexistent headers
31163  # can be detected and how.
31164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31165/* end confdefs.h.  */
31166#include <ac_nonexistent.h>
31167_ACEOF
31168if ac_fn_cxx_try_cpp "$LINENO"; then :
31169  # Broken: success on invalid input.
31170continue
31171else
31172  # Passes both tests.
31173ac_preproc_ok=:
31174break
31175fi
31176rm -f conftest.err conftest.i conftest.$ac_ext
31177
31178done
31179# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31180rm -f conftest.i conftest.err conftest.$ac_ext
31181if $ac_preproc_ok; then :
31182  break
31183fi
31184
31185    done
31186    ac_cv_prog_CXXCPP=$CXXCPP
31187
31188fi
31189  CXXCPP=$ac_cv_prog_CXXCPP
31190else
31191  ac_cv_prog_CXXCPP=$CXXCPP
31192fi
31193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31194$as_echo "$CXXCPP" >&6; }
31195ac_preproc_ok=false
31196for ac_cxx_preproc_warn_flag in '' yes
31197do
31198  # Use a header file that comes with gcc, so configuring glibc
31199  # with a fresh cross-compiler works.
31200  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31201  # <limits.h> exists even on freestanding compilers.
31202  # On the NeXT, cc -E runs the code through the compiler's parser,
31203  # not just through cpp. "Syntax error" is here to catch this case.
31204  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31205/* end confdefs.h.  */
31206#ifdef __STDC__
31207# include <limits.h>
31208#else
31209# include <assert.h>
31210#endif
31211		     Syntax error
31212_ACEOF
31213if ac_fn_cxx_try_cpp "$LINENO"; then :
31214
31215else
31216  # Broken: fails on valid input.
31217continue
31218fi
31219rm -f conftest.err conftest.i conftest.$ac_ext
31220
31221  # OK, works on sane cases.  Now check whether nonexistent headers
31222  # can be detected and how.
31223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31224/* end confdefs.h.  */
31225#include <ac_nonexistent.h>
31226_ACEOF
31227if ac_fn_cxx_try_cpp "$LINENO"; then :
31228  # Broken: success on invalid input.
31229continue
31230else
31231  # Passes both tests.
31232ac_preproc_ok=:
31233break
31234fi
31235rm -f conftest.err conftest.i conftest.$ac_ext
31236
31237done
31238# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31239rm -f conftest.i conftest.err conftest.$ac_ext
31240if $ac_preproc_ok; then :
31241
31242else
31243  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31244$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31245as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31246See \`config.log' for more details" "$LINENO" 5; }
31247fi
31248
31249ac_ext=cpp
31250ac_cpp='$CXXCPP $CPPFLAGS'
31251ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31252ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31253ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31254
31255
31256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31257
31258  # First separate the path from the arguments. This will split at the first
31259  # space.
31260  complete="$CXXCPP"
31261  path="${complete%% *}"
31262  tmp="$complete EOL"
31263  arguments="${tmp#* }"
31264
31265  # Input might be given as Windows format, start by converting to
31266  # unix format.
31267  new_path=`$CYGPATH -u "$path"`
31268
31269  # Now try to locate executable using which
31270  new_path=`$WHICH "$new_path" 2> /dev/null`
31271  # bat and cmd files are not always considered executable in cygwin causing which
31272  # to not find them
31273  if test "x$new_path" = x \
31274      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31275      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31276    new_path=`$CYGPATH -u "$path"`
31277  fi
31278  if test "x$new_path" = x; then
31279    # Oops. Which didn't find the executable.
31280    # The splitting of arguments from the executable at a space might have been incorrect,
31281    # since paths with space are more likely in Windows. Give it another try with the whole
31282    # argument.
31283    path="$complete"
31284    arguments="EOL"
31285    new_path=`$CYGPATH -u "$path"`
31286    new_path=`$WHICH "$new_path" 2> /dev/null`
31287    # bat and cmd files are not always considered executable in cygwin causing which
31288    # to not find them
31289    if test "x$new_path" = x \
31290        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31291        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31292      new_path=`$CYGPATH -u "$path"`
31293    fi
31294    if test "x$new_path" = x; then
31295      # It's still not found. Now this is an unrecoverable error.
31296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31297$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31298      has_space=`$ECHO "$complete" | $GREP " "`
31299      if test "x$has_space" != x; then
31300        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31301$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31302      fi
31303      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31304    fi
31305  fi
31306
31307  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31308  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31309  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31310  # "foo.exe" is OK but "foo" is an error.
31311  #
31312  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31313  # It is also a way to make sure we got the proper file name for the real test later on.
31314  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31315  if test "x$test_shortpath" = x; then
31316    # Short path failed, file does not exist as specified.
31317    # Try adding .exe or .cmd
31318    if test -f "${new_path}.exe"; then
31319      input_to_shortpath="${new_path}.exe"
31320    elif test -f "${new_path}.cmd"; then
31321      input_to_shortpath="${new_path}.cmd"
31322    else
31323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31324$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31325      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31326$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31327      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31328    fi
31329  else
31330    input_to_shortpath="$new_path"
31331  fi
31332
31333  # Call helper function which possibly converts this using DOS-style short mode.
31334  # If so, the updated path is stored in $new_path.
31335  new_path="$input_to_shortpath"
31336
31337  input_path="$input_to_shortpath"
31338  # Check if we need to convert this using DOS-style short mode. If the path
31339  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31340  # take no chances and rewrite it.
31341  # Note: m4 eats our [], so we need to use [ and ] instead.
31342  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31343  if test "x$has_forbidden_chars" != x; then
31344    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31345    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31346    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31347    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31348      # Going to short mode and back again did indeed matter. Since short mode is
31349      # case insensitive, let's make it lowercase to improve readability.
31350      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31351      # Now convert it back to Unix-stile (cygpath)
31352      input_path=`$CYGPATH -u "$shortmode_path"`
31353      new_path="$input_path"
31354    fi
31355  fi
31356
31357  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31358  if test "x$test_cygdrive_prefix" = x; then
31359    # As a simple fix, exclude /usr/bin since it's not a real path.
31360    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31361      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31362      # a path prefixed by /cygdrive for fixpath to work.
31363      new_path="$CYGWIN_ROOT_PATH$input_path"
31364    fi
31365  fi
31366
31367  # remove trailing .exe if any
31368  new_path="${new_path/%.exe/}"
31369
31370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31371
31372  # First separate the path from the arguments. This will split at the first
31373  # space.
31374  complete="$CXXCPP"
31375  path="${complete%% *}"
31376  tmp="$complete EOL"
31377  arguments="${tmp#* }"
31378
31379  # Input might be given as Windows format, start by converting to
31380  # unix format.
31381  new_path="$path"
31382
31383  windows_path="$new_path"
31384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31385    unix_path=`$CYGPATH -u "$windows_path"`
31386    new_path="$unix_path"
31387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31389    new_path="$unix_path"
31390  fi
31391
31392
31393  # Now try to locate executable using which
31394  new_path=`$WHICH "$new_path" 2> /dev/null`
31395
31396  if test "x$new_path" = x; then
31397    # Oops. Which didn't find the executable.
31398    # The splitting of arguments from the executable at a space might have been incorrect,
31399    # since paths with space are more likely in Windows. Give it another try with the whole
31400    # argument.
31401    path="$complete"
31402    arguments="EOL"
31403    new_path="$path"
31404
31405  windows_path="$new_path"
31406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31407    unix_path=`$CYGPATH -u "$windows_path"`
31408    new_path="$unix_path"
31409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31411    new_path="$unix_path"
31412  fi
31413
31414
31415    new_path=`$WHICH "$new_path" 2> /dev/null`
31416    # bat and cmd files are not always considered executable in MSYS causing which
31417    # to not find them
31418    if test "x$new_path" = x \
31419        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31420        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31421      new_path="$path"
31422
31423  windows_path="$new_path"
31424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31425    unix_path=`$CYGPATH -u "$windows_path"`
31426    new_path="$unix_path"
31427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31429    new_path="$unix_path"
31430  fi
31431
31432    fi
31433
31434    if test "x$new_path" = x; then
31435      # It's still not found. Now this is an unrecoverable error.
31436      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31437$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31438      has_space=`$ECHO "$complete" | $GREP " "`
31439      if test "x$has_space" != x; then
31440        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31441$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31442      fi
31443      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31444    fi
31445  fi
31446
31447  # Now new_path has a complete unix path to the binary
31448  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31449    # Keep paths in /bin as-is, but remove trailing .exe if any
31450    new_path="${new_path/%.exe/}"
31451    # Do not save /bin paths to all_fixpath_prefixes!
31452  else
31453    # Not in mixed or Windows style, start by that.
31454    new_path=`cmd //c echo $new_path`
31455
31456  input_path="$new_path"
31457  # Check if we need to convert this using DOS-style short mode. If the path
31458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31459  # take no chances and rewrite it.
31460  # Note: m4 eats our [], so we need to use [ and ] instead.
31461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31462  if test "x$has_forbidden_chars" != x; then
31463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31465  fi
31466
31467    # Output is in $new_path
31468
31469  windows_path="$new_path"
31470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31471    unix_path=`$CYGPATH -u "$windows_path"`
31472    new_path="$unix_path"
31473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31475    new_path="$unix_path"
31476  fi
31477
31478    # remove trailing .exe if any
31479    new_path="${new_path/%.exe/}"
31480
31481    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31482    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31483  fi
31484
31485  else
31486    # We're on a unix platform. Hooray! :)
31487    # First separate the path from the arguments. This will split at the first
31488    # space.
31489    complete="$CXXCPP"
31490    path="${complete%% *}"
31491    tmp="$complete EOL"
31492    arguments="${tmp#* }"
31493
31494    # Cannot rely on the command "which" here since it doesn't always work.
31495    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31496    if test -z "$is_absolute_path"; then
31497      # Path to executable is not absolute. Find it.
31498      IFS_save="$IFS"
31499      IFS=:
31500      for p in $PATH; do
31501        if test -f "$p/$path" && test -x "$p/$path"; then
31502          new_path="$p/$path"
31503          break
31504        fi
31505      done
31506      IFS="$IFS_save"
31507    else
31508      # This is an absolute path, we can use it without further modifications.
31509      new_path="$path"
31510    fi
31511
31512    if test "x$new_path" = x; then
31513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31514$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31515      has_space=`$ECHO "$complete" | $GREP " "`
31516      if test "x$has_space" != x; then
31517        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31518$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31519      fi
31520      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31521    fi
31522  fi
31523
31524  # Now join together the path and the arguments once again
31525  if test "x$arguments" != xEOL; then
31526    new_complete="$new_path ${arguments% *}"
31527  else
31528    new_complete="$new_path"
31529  fi
31530
31531  if test "x$complete" != "x$new_complete"; then
31532    CXXCPP="$new_complete"
31533    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31534$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31535  fi
31536
31537
31538  #
31539  # Setup the linker (LD)
31540  #
31541  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31542    # In the Microsoft toolchain we have a separate LD command "link".
31543    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31544    # a cygwin program for something completely different.
31545    # Extract the first word of "link", so it can be a program name with args.
31546set dummy link; ac_word=$2
31547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31548$as_echo_n "checking for $ac_word... " >&6; }
31549if ${ac_cv_prog_LD+:} false; then :
31550  $as_echo_n "(cached) " >&6
31551else
31552  if test -n "$LD"; then
31553  ac_cv_prog_LD="$LD" # Let the user override the test.
31554else
31555  ac_prog_rejected=no
31556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31557for as_dir in $PATH
31558do
31559  IFS=$as_save_IFS
31560  test -z "$as_dir" && as_dir=.
31561    for ac_exec_ext in '' $ac_executable_extensions; do
31562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31563    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31564       ac_prog_rejected=yes
31565       continue
31566     fi
31567    ac_cv_prog_LD="link"
31568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31569    break 2
31570  fi
31571done
31572  done
31573IFS=$as_save_IFS
31574
31575if test $ac_prog_rejected = yes; then
31576  # We found a bogon in the path, so make sure we never use it.
31577  set dummy $ac_cv_prog_LD
31578  shift
31579  if test $# != 0; then
31580    # We chose a different compiler from the bogus one.
31581    # However, it has the same basename, so the bogon will be chosen
31582    # first if we set LD to just the basename; use the full file name.
31583    shift
31584    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31585  fi
31586fi
31587fi
31588fi
31589LD=$ac_cv_prog_LD
31590if test -n "$LD"; then
31591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31592$as_echo "$LD" >&6; }
31593else
31594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31595$as_echo "no" >&6; }
31596fi
31597
31598
31599
31600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31601
31602  # First separate the path from the arguments. This will split at the first
31603  # space.
31604  complete="$LD"
31605  path="${complete%% *}"
31606  tmp="$complete EOL"
31607  arguments="${tmp#* }"
31608
31609  # Input might be given as Windows format, start by converting to
31610  # unix format.
31611  new_path=`$CYGPATH -u "$path"`
31612
31613  # Now try to locate executable using which
31614  new_path=`$WHICH "$new_path" 2> /dev/null`
31615  # bat and cmd files are not always considered executable in cygwin causing which
31616  # to not find them
31617  if test "x$new_path" = x \
31618      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31619      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31620    new_path=`$CYGPATH -u "$path"`
31621  fi
31622  if test "x$new_path" = x; then
31623    # Oops. Which didn't find the executable.
31624    # The splitting of arguments from the executable at a space might have been incorrect,
31625    # since paths with space are more likely in Windows. Give it another try with the whole
31626    # argument.
31627    path="$complete"
31628    arguments="EOL"
31629    new_path=`$CYGPATH -u "$path"`
31630    new_path=`$WHICH "$new_path" 2> /dev/null`
31631    # bat and cmd files are not always considered executable in cygwin causing which
31632    # to not find them
31633    if test "x$new_path" = x \
31634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31636      new_path=`$CYGPATH -u "$path"`
31637    fi
31638    if test "x$new_path" = x; then
31639      # It's still not found. Now this is an unrecoverable error.
31640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31641$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31642      has_space=`$ECHO "$complete" | $GREP " "`
31643      if test "x$has_space" != x; then
31644        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31645$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31646      fi
31647      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31648    fi
31649  fi
31650
31651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31654  # "foo.exe" is OK but "foo" is an error.
31655  #
31656  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31657  # It is also a way to make sure we got the proper file name for the real test later on.
31658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31659  if test "x$test_shortpath" = x; then
31660    # Short path failed, file does not exist as specified.
31661    # Try adding .exe or .cmd
31662    if test -f "${new_path}.exe"; then
31663      input_to_shortpath="${new_path}.exe"
31664    elif test -f "${new_path}.cmd"; then
31665      input_to_shortpath="${new_path}.cmd"
31666    else
31667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31668$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31669      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31670$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31671      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31672    fi
31673  else
31674    input_to_shortpath="$new_path"
31675  fi
31676
31677  # Call helper function which possibly converts this using DOS-style short mode.
31678  # If so, the updated path is stored in $new_path.
31679  new_path="$input_to_shortpath"
31680
31681  input_path="$input_to_shortpath"
31682  # Check if we need to convert this using DOS-style short mode. If the path
31683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31684  # take no chances and rewrite it.
31685  # Note: m4 eats our [], so we need to use [ and ] instead.
31686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31687  if test "x$has_forbidden_chars" != x; then
31688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31692      # Going to short mode and back again did indeed matter. Since short mode is
31693      # case insensitive, let's make it lowercase to improve readability.
31694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31695      # Now convert it back to Unix-stile (cygpath)
31696      input_path=`$CYGPATH -u "$shortmode_path"`
31697      new_path="$input_path"
31698    fi
31699  fi
31700
31701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31702  if test "x$test_cygdrive_prefix" = x; then
31703    # As a simple fix, exclude /usr/bin since it's not a real path.
31704    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31706      # a path prefixed by /cygdrive for fixpath to work.
31707      new_path="$CYGWIN_ROOT_PATH$input_path"
31708    fi
31709  fi
31710
31711  # remove trailing .exe if any
31712  new_path="${new_path/%.exe/}"
31713
31714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31715
31716  # First separate the path from the arguments. This will split at the first
31717  # space.
31718  complete="$LD"
31719  path="${complete%% *}"
31720  tmp="$complete EOL"
31721  arguments="${tmp#* }"
31722
31723  # Input might be given as Windows format, start by converting to
31724  # unix format.
31725  new_path="$path"
31726
31727  windows_path="$new_path"
31728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31729    unix_path=`$CYGPATH -u "$windows_path"`
31730    new_path="$unix_path"
31731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31733    new_path="$unix_path"
31734  fi
31735
31736
31737  # Now try to locate executable using which
31738  new_path=`$WHICH "$new_path" 2> /dev/null`
31739
31740  if test "x$new_path" = x; then
31741    # Oops. Which didn't find the executable.
31742    # The splitting of arguments from the executable at a space might have been incorrect,
31743    # since paths with space are more likely in Windows. Give it another try with the whole
31744    # argument.
31745    path="$complete"
31746    arguments="EOL"
31747    new_path="$path"
31748
31749  windows_path="$new_path"
31750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31751    unix_path=`$CYGPATH -u "$windows_path"`
31752    new_path="$unix_path"
31753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31755    new_path="$unix_path"
31756  fi
31757
31758
31759    new_path=`$WHICH "$new_path" 2> /dev/null`
31760    # bat and cmd files are not always considered executable in MSYS causing which
31761    # to not find them
31762    if test "x$new_path" = x \
31763        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31764        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31765      new_path="$path"
31766
31767  windows_path="$new_path"
31768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31769    unix_path=`$CYGPATH -u "$windows_path"`
31770    new_path="$unix_path"
31771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31773    new_path="$unix_path"
31774  fi
31775
31776    fi
31777
31778    if test "x$new_path" = x; then
31779      # It's still not found. Now this is an unrecoverable error.
31780      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31781$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31782      has_space=`$ECHO "$complete" | $GREP " "`
31783      if test "x$has_space" != x; then
31784        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31785$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31786      fi
31787      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31788    fi
31789  fi
31790
31791  # Now new_path has a complete unix path to the binary
31792  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31793    # Keep paths in /bin as-is, but remove trailing .exe if any
31794    new_path="${new_path/%.exe/}"
31795    # Do not save /bin paths to all_fixpath_prefixes!
31796  else
31797    # Not in mixed or Windows style, start by that.
31798    new_path=`cmd //c echo $new_path`
31799
31800  input_path="$new_path"
31801  # Check if we need to convert this using DOS-style short mode. If the path
31802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31803  # take no chances and rewrite it.
31804  # Note: m4 eats our [], so we need to use [ and ] instead.
31805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31806  if test "x$has_forbidden_chars" != x; then
31807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31809  fi
31810
31811    # Output is in $new_path
31812
31813  windows_path="$new_path"
31814  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31815    unix_path=`$CYGPATH -u "$windows_path"`
31816    new_path="$unix_path"
31817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31818    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31819    new_path="$unix_path"
31820  fi
31821
31822    # remove trailing .exe if any
31823    new_path="${new_path/%.exe/}"
31824
31825    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31826    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31827  fi
31828
31829  else
31830    # We're on a unix platform. Hooray! :)
31831    # First separate the path from the arguments. This will split at the first
31832    # space.
31833    complete="$LD"
31834    path="${complete%% *}"
31835    tmp="$complete EOL"
31836    arguments="${tmp#* }"
31837
31838    # Cannot rely on the command "which" here since it doesn't always work.
31839    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31840    if test -z "$is_absolute_path"; then
31841      # Path to executable is not absolute. Find it.
31842      IFS_save="$IFS"
31843      IFS=:
31844      for p in $PATH; do
31845        if test -f "$p/$path" && test -x "$p/$path"; then
31846          new_path="$p/$path"
31847          break
31848        fi
31849      done
31850      IFS="$IFS_save"
31851    else
31852      # This is an absolute path, we can use it without further modifications.
31853      new_path="$path"
31854    fi
31855
31856    if test "x$new_path" = x; then
31857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31858$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31859      has_space=`$ECHO "$complete" | $GREP " "`
31860      if test "x$has_space" != x; then
31861        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31862$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31863      fi
31864      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31865    fi
31866  fi
31867
31868  # Now join together the path and the arguments once again
31869  if test "x$arguments" != xEOL; then
31870    new_complete="$new_path ${arguments% *}"
31871  else
31872    new_complete="$new_path"
31873  fi
31874
31875  if test "x$complete" != "x$new_complete"; then
31876    LD="$new_complete"
31877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31878$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31879  fi
31880
31881    # Verify that we indeed succeeded with this trick.
31882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31883$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31884    "$LD" --version > /dev/null
31885    if test $? -eq 0 ; then
31886      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31887$as_echo "no" >&6; }
31888      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31889    else
31890      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31891$as_echo "yes" >&6; }
31892    fi
31893    LDCXX="$LD"
31894  else
31895    # All other toolchains use the compiler to link.
31896    LD="$CC"
31897    LDCXX="$CXX"
31898  fi
31899
31900  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31901
31902
31903  #
31904  # Setup the assembler (AS)
31905  #
31906  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31907    # FIXME: should this really be solaris, or solstudio?
31908
31909
31910  # Publish this variable in the help.
31911
31912
31913  if test "x$AS" = x; then
31914    # The variable is not set by user, try to locate tool using the code snippet
31915    for ac_prog in as
31916do
31917  # Extract the first word of "$ac_prog", so it can be a program name with args.
31918set dummy $ac_prog; ac_word=$2
31919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31920$as_echo_n "checking for $ac_word... " >&6; }
31921if ${ac_cv_path_AS+:} false; then :
31922  $as_echo_n "(cached) " >&6
31923else
31924  case $AS in
31925  [\\/]* | ?:[\\/]*)
31926  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31927  ;;
31928  *)
31929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31930for as_dir in $PATH
31931do
31932  IFS=$as_save_IFS
31933  test -z "$as_dir" && as_dir=.
31934    for ac_exec_ext in '' $ac_executable_extensions; do
31935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31936    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31938    break 2
31939  fi
31940done
31941  done
31942IFS=$as_save_IFS
31943
31944  ;;
31945esac
31946fi
31947AS=$ac_cv_path_AS
31948if test -n "$AS"; then
31949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31950$as_echo "$AS" >&6; }
31951else
31952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31953$as_echo "no" >&6; }
31954fi
31955
31956
31957  test -n "$AS" && break
31958done
31959
31960  else
31961    # The variable is set, but is it from the command line or the environment?
31962
31963    # Try to remove the string !AS! from our list.
31964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31966      # If it failed, the variable was not from the command line. Ignore it,
31967      # but warn the user (except for BASH, which is always set by the calling BASH).
31968      if test "xAS" != xBASH; then
31969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31970$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31971      fi
31972      # Try to locate tool using the code snippet
31973      for ac_prog in as
31974do
31975  # Extract the first word of "$ac_prog", so it can be a program name with args.
31976set dummy $ac_prog; ac_word=$2
31977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31978$as_echo_n "checking for $ac_word... " >&6; }
31979if ${ac_cv_path_AS+:} false; then :
31980  $as_echo_n "(cached) " >&6
31981else
31982  case $AS in
31983  [\\/]* | ?:[\\/]*)
31984  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31985  ;;
31986  *)
31987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31988for as_dir in $PATH
31989do
31990  IFS=$as_save_IFS
31991  test -z "$as_dir" && as_dir=.
31992    for ac_exec_ext in '' $ac_executable_extensions; do
31993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31994    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31996    break 2
31997  fi
31998done
31999  done
32000IFS=$as_save_IFS
32001
32002  ;;
32003esac
32004fi
32005AS=$ac_cv_path_AS
32006if test -n "$AS"; then
32007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32008$as_echo "$AS" >&6; }
32009else
32010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32011$as_echo "no" >&6; }
32012fi
32013
32014
32015  test -n "$AS" && break
32016done
32017
32018    else
32019      # If it succeeded, then it was overridden by the user. We will use it
32020      # for the tool.
32021
32022      # First remove it from the list of overridden variables, so we can test
32023      # for unknown variables in the end.
32024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32025
32026      # Check if the provided tool contains a complete path.
32027      tool_specified="$AS"
32028      tool_basename="${tool_specified##*/}"
32029      if test "x$tool_basename" = "x$tool_specified"; then
32030        # A command without a complete path is provided, search $PATH.
32031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32032$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32033        # Extract the first word of "$tool_basename", so it can be a program name with args.
32034set dummy $tool_basename; ac_word=$2
32035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32036$as_echo_n "checking for $ac_word... " >&6; }
32037if ${ac_cv_path_AS+:} false; then :
32038  $as_echo_n "(cached) " >&6
32039else
32040  case $AS in
32041  [\\/]* | ?:[\\/]*)
32042  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32043  ;;
32044  *)
32045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32046for as_dir in $PATH
32047do
32048  IFS=$as_save_IFS
32049  test -z "$as_dir" && as_dir=.
32050    for ac_exec_ext in '' $ac_executable_extensions; do
32051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32052    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32054    break 2
32055  fi
32056done
32057  done
32058IFS=$as_save_IFS
32059
32060  ;;
32061esac
32062fi
32063AS=$ac_cv_path_AS
32064if test -n "$AS"; then
32065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32066$as_echo "$AS" >&6; }
32067else
32068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32069$as_echo "no" >&6; }
32070fi
32071
32072
32073        if test "x$AS" = x; then
32074          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32075        fi
32076      else
32077        # Otherwise we believe it is a complete path. Use it as it is.
32078        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32079$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32080        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32081$as_echo_n "checking for AS... " >&6; }
32082        if test ! -x "$tool_specified"; then
32083          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32084$as_echo "not found" >&6; }
32085          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32086        fi
32087        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32088$as_echo "$tool_specified" >&6; }
32089      fi
32090    fi
32091  fi
32092
32093
32094
32095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32096
32097  # First separate the path from the arguments. This will split at the first
32098  # space.
32099  complete="$AS"
32100  path="${complete%% *}"
32101  tmp="$complete EOL"
32102  arguments="${tmp#* }"
32103
32104  # Input might be given as Windows format, start by converting to
32105  # unix format.
32106  new_path=`$CYGPATH -u "$path"`
32107
32108  # Now try to locate executable using which
32109  new_path=`$WHICH "$new_path" 2> /dev/null`
32110  # bat and cmd files are not always considered executable in cygwin causing which
32111  # to not find them
32112  if test "x$new_path" = x \
32113      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32114      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32115    new_path=`$CYGPATH -u "$path"`
32116  fi
32117  if test "x$new_path" = x; then
32118    # Oops. Which didn't find the executable.
32119    # The splitting of arguments from the executable at a space might have been incorrect,
32120    # since paths with space are more likely in Windows. Give it another try with the whole
32121    # argument.
32122    path="$complete"
32123    arguments="EOL"
32124    new_path=`$CYGPATH -u "$path"`
32125    new_path=`$WHICH "$new_path" 2> /dev/null`
32126    # bat and cmd files are not always considered executable in cygwin causing which
32127    # to not find them
32128    if test "x$new_path" = x \
32129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32131      new_path=`$CYGPATH -u "$path"`
32132    fi
32133    if test "x$new_path" = x; then
32134      # It's still not found. Now this is an unrecoverable error.
32135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32136$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32137      has_space=`$ECHO "$complete" | $GREP " "`
32138      if test "x$has_space" != x; then
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32141      fi
32142      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32143    fi
32144  fi
32145
32146  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32147  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32148  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32149  # "foo.exe" is OK but "foo" is an error.
32150  #
32151  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32152  # It is also a way to make sure we got the proper file name for the real test later on.
32153  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32154  if test "x$test_shortpath" = x; then
32155    # Short path failed, file does not exist as specified.
32156    # Try adding .exe or .cmd
32157    if test -f "${new_path}.exe"; then
32158      input_to_shortpath="${new_path}.exe"
32159    elif test -f "${new_path}.cmd"; then
32160      input_to_shortpath="${new_path}.cmd"
32161    else
32162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32163$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32164      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32165$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32166      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32167    fi
32168  else
32169    input_to_shortpath="$new_path"
32170  fi
32171
32172  # Call helper function which possibly converts this using DOS-style short mode.
32173  # If so, the updated path is stored in $new_path.
32174  new_path="$input_to_shortpath"
32175
32176  input_path="$input_to_shortpath"
32177  # Check if we need to convert this using DOS-style short mode. If the path
32178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32179  # take no chances and rewrite it.
32180  # Note: m4 eats our [], so we need to use [ and ] instead.
32181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32182  if test "x$has_forbidden_chars" != x; then
32183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32184    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32185    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32186    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32187      # Going to short mode and back again did indeed matter. Since short mode is
32188      # case insensitive, let's make it lowercase to improve readability.
32189      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32190      # Now convert it back to Unix-stile (cygpath)
32191      input_path=`$CYGPATH -u "$shortmode_path"`
32192      new_path="$input_path"
32193    fi
32194  fi
32195
32196  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32197  if test "x$test_cygdrive_prefix" = x; then
32198    # As a simple fix, exclude /usr/bin since it's not a real path.
32199    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32200      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32201      # a path prefixed by /cygdrive for fixpath to work.
32202      new_path="$CYGWIN_ROOT_PATH$input_path"
32203    fi
32204  fi
32205
32206  # remove trailing .exe if any
32207  new_path="${new_path/%.exe/}"
32208
32209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32210
32211  # First separate the path from the arguments. This will split at the first
32212  # space.
32213  complete="$AS"
32214  path="${complete%% *}"
32215  tmp="$complete EOL"
32216  arguments="${tmp#* }"
32217
32218  # Input might be given as Windows format, start by converting to
32219  # unix format.
32220  new_path="$path"
32221
32222  windows_path="$new_path"
32223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32224    unix_path=`$CYGPATH -u "$windows_path"`
32225    new_path="$unix_path"
32226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32228    new_path="$unix_path"
32229  fi
32230
32231
32232  # Now try to locate executable using which
32233  new_path=`$WHICH "$new_path" 2> /dev/null`
32234
32235  if test "x$new_path" = x; then
32236    # Oops. Which didn't find the executable.
32237    # The splitting of arguments from the executable at a space might have been incorrect,
32238    # since paths with space are more likely in Windows. Give it another try with the whole
32239    # argument.
32240    path="$complete"
32241    arguments="EOL"
32242    new_path="$path"
32243
32244  windows_path="$new_path"
32245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32246    unix_path=`$CYGPATH -u "$windows_path"`
32247    new_path="$unix_path"
32248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32250    new_path="$unix_path"
32251  fi
32252
32253
32254    new_path=`$WHICH "$new_path" 2> /dev/null`
32255    # bat and cmd files are not always considered executable in MSYS causing which
32256    # to not find them
32257    if test "x$new_path" = x \
32258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32260      new_path="$path"
32261
32262  windows_path="$new_path"
32263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32264    unix_path=`$CYGPATH -u "$windows_path"`
32265    new_path="$unix_path"
32266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32268    new_path="$unix_path"
32269  fi
32270
32271    fi
32272
32273    if test "x$new_path" = x; then
32274      # It's still not found. Now this is an unrecoverable error.
32275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32276$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32277      has_space=`$ECHO "$complete" | $GREP " "`
32278      if test "x$has_space" != x; then
32279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32281      fi
32282      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32283    fi
32284  fi
32285
32286  # Now new_path has a complete unix path to the binary
32287  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32288    # Keep paths in /bin as-is, but remove trailing .exe if any
32289    new_path="${new_path/%.exe/}"
32290    # Do not save /bin paths to all_fixpath_prefixes!
32291  else
32292    # Not in mixed or Windows style, start by that.
32293    new_path=`cmd //c echo $new_path`
32294
32295  input_path="$new_path"
32296  # Check if we need to convert this using DOS-style short mode. If the path
32297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32298  # take no chances and rewrite it.
32299  # Note: m4 eats our [], so we need to use [ and ] instead.
32300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32301  if test "x$has_forbidden_chars" != x; then
32302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32303    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32304  fi
32305
32306    # Output is in $new_path
32307
32308  windows_path="$new_path"
32309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32310    unix_path=`$CYGPATH -u "$windows_path"`
32311    new_path="$unix_path"
32312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32314    new_path="$unix_path"
32315  fi
32316
32317    # remove trailing .exe if any
32318    new_path="${new_path/%.exe/}"
32319
32320    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32321    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32322  fi
32323
32324  else
32325    # We're on a unix platform. Hooray! :)
32326    # First separate the path from the arguments. This will split at the first
32327    # space.
32328    complete="$AS"
32329    path="${complete%% *}"
32330    tmp="$complete EOL"
32331    arguments="${tmp#* }"
32332
32333    # Cannot rely on the command "which" here since it doesn't always work.
32334    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32335    if test -z "$is_absolute_path"; then
32336      # Path to executable is not absolute. Find it.
32337      IFS_save="$IFS"
32338      IFS=:
32339      for p in $PATH; do
32340        if test -f "$p/$path" && test -x "$p/$path"; then
32341          new_path="$p/$path"
32342          break
32343        fi
32344      done
32345      IFS="$IFS_save"
32346    else
32347      # This is an absolute path, we can use it without further modifications.
32348      new_path="$path"
32349    fi
32350
32351    if test "x$new_path" = x; then
32352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32353$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32354      has_space=`$ECHO "$complete" | $GREP " "`
32355      if test "x$has_space" != x; then
32356        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32357$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32358      fi
32359      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32360    fi
32361  fi
32362
32363  # Now join together the path and the arguments once again
32364  if test "x$arguments" != xEOL; then
32365    new_complete="$new_path ${arguments% *}"
32366  else
32367    new_complete="$new_path"
32368  fi
32369
32370  if test "x$complete" != "x$new_complete"; then
32371    AS="$new_complete"
32372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32373$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32374  fi
32375
32376  else
32377    # FIXME: is this correct for microsoft?
32378    AS="$CC -c"
32379  fi
32380
32381
32382  #
32383  # Setup the archiver (AR)
32384  #
32385  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32386    # The corresponding ar tool is lib.exe (used to create static libraries)
32387    # Extract the first word of "lib", so it can be a program name with args.
32388set dummy lib; ac_word=$2
32389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32390$as_echo_n "checking for $ac_word... " >&6; }
32391if ${ac_cv_prog_AR+:} false; then :
32392  $as_echo_n "(cached) " >&6
32393else
32394  if test -n "$AR"; then
32395  ac_cv_prog_AR="$AR" # Let the user override the test.
32396else
32397as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32398for as_dir in $PATH
32399do
32400  IFS=$as_save_IFS
32401  test -z "$as_dir" && as_dir=.
32402    for ac_exec_ext in '' $ac_executable_extensions; do
32403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32404    ac_cv_prog_AR="lib"
32405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32406    break 2
32407  fi
32408done
32409  done
32410IFS=$as_save_IFS
32411
32412fi
32413fi
32414AR=$ac_cv_prog_AR
32415if test -n "$AR"; then
32416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32417$as_echo "$AR" >&6; }
32418else
32419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32420$as_echo "no" >&6; }
32421fi
32422
32423
32424  else
32425
32426
32427  # Publish this variable in the help.
32428
32429
32430  if test "x$AR" = x; then
32431    # The variable is not set by user, try to locate tool using the code snippet
32432    if test -n "$ac_tool_prefix"; then
32433  for ac_prog in ar
32434  do
32435    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32436set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32438$as_echo_n "checking for $ac_word... " >&6; }
32439if ${ac_cv_prog_AR+:} false; then :
32440  $as_echo_n "(cached) " >&6
32441else
32442  if test -n "$AR"; then
32443  ac_cv_prog_AR="$AR" # Let the user override the test.
32444else
32445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32446for as_dir in $PATH
32447do
32448  IFS=$as_save_IFS
32449  test -z "$as_dir" && as_dir=.
32450    for ac_exec_ext in '' $ac_executable_extensions; do
32451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32452    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32454    break 2
32455  fi
32456done
32457  done
32458IFS=$as_save_IFS
32459
32460fi
32461fi
32462AR=$ac_cv_prog_AR
32463if test -n "$AR"; then
32464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32465$as_echo "$AR" >&6; }
32466else
32467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32468$as_echo "no" >&6; }
32469fi
32470
32471
32472    test -n "$AR" && break
32473  done
32474fi
32475if test -z "$AR"; then
32476  ac_ct_AR=$AR
32477  for ac_prog in ar
32478do
32479  # Extract the first word of "$ac_prog", so it can be a program name with args.
32480set dummy $ac_prog; ac_word=$2
32481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32482$as_echo_n "checking for $ac_word... " >&6; }
32483if ${ac_cv_prog_ac_ct_AR+:} false; then :
32484  $as_echo_n "(cached) " >&6
32485else
32486  if test -n "$ac_ct_AR"; then
32487  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32488else
32489as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32490for as_dir in $PATH
32491do
32492  IFS=$as_save_IFS
32493  test -z "$as_dir" && as_dir=.
32494    for ac_exec_ext in '' $ac_executable_extensions; do
32495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32496    ac_cv_prog_ac_ct_AR="$ac_prog"
32497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32498    break 2
32499  fi
32500done
32501  done
32502IFS=$as_save_IFS
32503
32504fi
32505fi
32506ac_ct_AR=$ac_cv_prog_ac_ct_AR
32507if test -n "$ac_ct_AR"; then
32508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32509$as_echo "$ac_ct_AR" >&6; }
32510else
32511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32512$as_echo "no" >&6; }
32513fi
32514
32515
32516  test -n "$ac_ct_AR" && break
32517done
32518
32519  if test "x$ac_ct_AR" = x; then
32520    AR=""
32521  else
32522    case $cross_compiling:$ac_tool_warned in
32523yes:)
32524{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32525$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32526ac_tool_warned=yes ;;
32527esac
32528    AR=$ac_ct_AR
32529  fi
32530fi
32531
32532  else
32533    # The variable is set, but is it from the command line or the environment?
32534
32535    # Try to remove the string !AR! from our list.
32536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32538      # If it failed, the variable was not from the command line. Ignore it,
32539      # but warn the user (except for BASH, which is always set by the calling BASH).
32540      if test "xAR" != xBASH; then
32541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32542$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32543      fi
32544      # Try to locate tool using the code snippet
32545      if test -n "$ac_tool_prefix"; then
32546  for ac_prog in ar
32547  do
32548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32551$as_echo_n "checking for $ac_word... " >&6; }
32552if ${ac_cv_prog_AR+:} false; then :
32553  $as_echo_n "(cached) " >&6
32554else
32555  if test -n "$AR"; then
32556  ac_cv_prog_AR="$AR" # Let the user override the test.
32557else
32558as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32559for as_dir in $PATH
32560do
32561  IFS=$as_save_IFS
32562  test -z "$as_dir" && as_dir=.
32563    for ac_exec_ext in '' $ac_executable_extensions; do
32564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32565    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32567    break 2
32568  fi
32569done
32570  done
32571IFS=$as_save_IFS
32572
32573fi
32574fi
32575AR=$ac_cv_prog_AR
32576if test -n "$AR"; then
32577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32578$as_echo "$AR" >&6; }
32579else
32580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32581$as_echo "no" >&6; }
32582fi
32583
32584
32585    test -n "$AR" && break
32586  done
32587fi
32588if test -z "$AR"; then
32589  ac_ct_AR=$AR
32590  for ac_prog in ar
32591do
32592  # Extract the first word of "$ac_prog", so it can be a program name with args.
32593set dummy $ac_prog; ac_word=$2
32594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32595$as_echo_n "checking for $ac_word... " >&6; }
32596if ${ac_cv_prog_ac_ct_AR+:} false; then :
32597  $as_echo_n "(cached) " >&6
32598else
32599  if test -n "$ac_ct_AR"; then
32600  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32601else
32602as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32603for as_dir in $PATH
32604do
32605  IFS=$as_save_IFS
32606  test -z "$as_dir" && as_dir=.
32607    for ac_exec_ext in '' $ac_executable_extensions; do
32608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32609    ac_cv_prog_ac_ct_AR="$ac_prog"
32610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32611    break 2
32612  fi
32613done
32614  done
32615IFS=$as_save_IFS
32616
32617fi
32618fi
32619ac_ct_AR=$ac_cv_prog_ac_ct_AR
32620if test -n "$ac_ct_AR"; then
32621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32622$as_echo "$ac_ct_AR" >&6; }
32623else
32624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32625$as_echo "no" >&6; }
32626fi
32627
32628
32629  test -n "$ac_ct_AR" && break
32630done
32631
32632  if test "x$ac_ct_AR" = x; then
32633    AR=""
32634  else
32635    case $cross_compiling:$ac_tool_warned in
32636yes:)
32637{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32638$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32639ac_tool_warned=yes ;;
32640esac
32641    AR=$ac_ct_AR
32642  fi
32643fi
32644
32645    else
32646      # If it succeeded, then it was overridden by the user. We will use it
32647      # for the tool.
32648
32649      # First remove it from the list of overridden variables, so we can test
32650      # for unknown variables in the end.
32651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32652
32653      # Check if the provided tool contains a complete path.
32654      tool_specified="$AR"
32655      tool_basename="${tool_specified##*/}"
32656      if test "x$tool_basename" = "x$tool_specified"; then
32657        # A command without a complete path is provided, search $PATH.
32658        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32659$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32660        # Extract the first word of "$tool_basename", so it can be a program name with args.
32661set dummy $tool_basename; ac_word=$2
32662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32663$as_echo_n "checking for $ac_word... " >&6; }
32664if ${ac_cv_path_AR+:} false; then :
32665  $as_echo_n "(cached) " >&6
32666else
32667  case $AR in
32668  [\\/]* | ?:[\\/]*)
32669  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32670  ;;
32671  *)
32672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32673for as_dir in $PATH
32674do
32675  IFS=$as_save_IFS
32676  test -z "$as_dir" && as_dir=.
32677    for ac_exec_ext in '' $ac_executable_extensions; do
32678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32679    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32681    break 2
32682  fi
32683done
32684  done
32685IFS=$as_save_IFS
32686
32687  ;;
32688esac
32689fi
32690AR=$ac_cv_path_AR
32691if test -n "$AR"; then
32692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32693$as_echo "$AR" >&6; }
32694else
32695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32696$as_echo "no" >&6; }
32697fi
32698
32699
32700        if test "x$AR" = x; then
32701          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32702        fi
32703      else
32704        # Otherwise we believe it is a complete path. Use it as it is.
32705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32706$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32708$as_echo_n "checking for AR... " >&6; }
32709        if test ! -x "$tool_specified"; then
32710          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32711$as_echo "not found" >&6; }
32712          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32713        fi
32714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32715$as_echo "$tool_specified" >&6; }
32716      fi
32717    fi
32718  fi
32719
32720
32721  fi
32722
32723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32724
32725  # First separate the path from the arguments. This will split at the first
32726  # space.
32727  complete="$AR"
32728  path="${complete%% *}"
32729  tmp="$complete EOL"
32730  arguments="${tmp#* }"
32731
32732  # Input might be given as Windows format, start by converting to
32733  # unix format.
32734  new_path=`$CYGPATH -u "$path"`
32735
32736  # Now try to locate executable using which
32737  new_path=`$WHICH "$new_path" 2> /dev/null`
32738  # bat and cmd files are not always considered executable in cygwin causing which
32739  # to not find them
32740  if test "x$new_path" = x \
32741      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32742      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32743    new_path=`$CYGPATH -u "$path"`
32744  fi
32745  if test "x$new_path" = x; then
32746    # Oops. Which didn't find the executable.
32747    # The splitting of arguments from the executable at a space might have been incorrect,
32748    # since paths with space are more likely in Windows. Give it another try with the whole
32749    # argument.
32750    path="$complete"
32751    arguments="EOL"
32752    new_path=`$CYGPATH -u "$path"`
32753    new_path=`$WHICH "$new_path" 2> /dev/null`
32754    # bat and cmd files are not always considered executable in cygwin causing which
32755    # to not find them
32756    if test "x$new_path" = x \
32757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32759      new_path=`$CYGPATH -u "$path"`
32760    fi
32761    if test "x$new_path" = x; then
32762      # It's still not found. Now this is an unrecoverable error.
32763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32764$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32765      has_space=`$ECHO "$complete" | $GREP " "`
32766      if test "x$has_space" != x; then
32767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32769      fi
32770      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32771    fi
32772  fi
32773
32774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32777  # "foo.exe" is OK but "foo" is an error.
32778  #
32779  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32780  # It is also a way to make sure we got the proper file name for the real test later on.
32781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32782  if test "x$test_shortpath" = x; then
32783    # Short path failed, file does not exist as specified.
32784    # Try adding .exe or .cmd
32785    if test -f "${new_path}.exe"; then
32786      input_to_shortpath="${new_path}.exe"
32787    elif test -f "${new_path}.cmd"; then
32788      input_to_shortpath="${new_path}.cmd"
32789    else
32790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32791$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32792      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32793$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32794      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32795    fi
32796  else
32797    input_to_shortpath="$new_path"
32798  fi
32799
32800  # Call helper function which possibly converts this using DOS-style short mode.
32801  # If so, the updated path is stored in $new_path.
32802  new_path="$input_to_shortpath"
32803
32804  input_path="$input_to_shortpath"
32805  # Check if we need to convert this using DOS-style short mode. If the path
32806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32807  # take no chances and rewrite it.
32808  # Note: m4 eats our [], so we need to use [ and ] instead.
32809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32810  if test "x$has_forbidden_chars" != x; then
32811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32815      # Going to short mode and back again did indeed matter. Since short mode is
32816      # case insensitive, let's make it lowercase to improve readability.
32817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32818      # Now convert it back to Unix-stile (cygpath)
32819      input_path=`$CYGPATH -u "$shortmode_path"`
32820      new_path="$input_path"
32821    fi
32822  fi
32823
32824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32825  if test "x$test_cygdrive_prefix" = x; then
32826    # As a simple fix, exclude /usr/bin since it's not a real path.
32827    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32829      # a path prefixed by /cygdrive for fixpath to work.
32830      new_path="$CYGWIN_ROOT_PATH$input_path"
32831    fi
32832  fi
32833
32834  # remove trailing .exe if any
32835  new_path="${new_path/%.exe/}"
32836
32837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32838
32839  # First separate the path from the arguments. This will split at the first
32840  # space.
32841  complete="$AR"
32842  path="${complete%% *}"
32843  tmp="$complete EOL"
32844  arguments="${tmp#* }"
32845
32846  # Input might be given as Windows format, start by converting to
32847  # unix format.
32848  new_path="$path"
32849
32850  windows_path="$new_path"
32851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32852    unix_path=`$CYGPATH -u "$windows_path"`
32853    new_path="$unix_path"
32854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32856    new_path="$unix_path"
32857  fi
32858
32859
32860  # Now try to locate executable using which
32861  new_path=`$WHICH "$new_path" 2> /dev/null`
32862
32863  if test "x$new_path" = x; then
32864    # Oops. Which didn't find the executable.
32865    # The splitting of arguments from the executable at a space might have been incorrect,
32866    # since paths with space are more likely in Windows. Give it another try with the whole
32867    # argument.
32868    path="$complete"
32869    arguments="EOL"
32870    new_path="$path"
32871
32872  windows_path="$new_path"
32873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32874    unix_path=`$CYGPATH -u "$windows_path"`
32875    new_path="$unix_path"
32876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32878    new_path="$unix_path"
32879  fi
32880
32881
32882    new_path=`$WHICH "$new_path" 2> /dev/null`
32883    # bat and cmd files are not always considered executable in MSYS causing which
32884    # to not find them
32885    if test "x$new_path" = x \
32886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32888      new_path="$path"
32889
32890  windows_path="$new_path"
32891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32892    unix_path=`$CYGPATH -u "$windows_path"`
32893    new_path="$unix_path"
32894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32896    new_path="$unix_path"
32897  fi
32898
32899    fi
32900
32901    if test "x$new_path" = x; then
32902      # It's still not found. Now this is an unrecoverable error.
32903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32904$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32905      has_space=`$ECHO "$complete" | $GREP " "`
32906      if test "x$has_space" != x; then
32907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32909      fi
32910      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32911    fi
32912  fi
32913
32914  # Now new_path has a complete unix path to the binary
32915  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32916    # Keep paths in /bin as-is, but remove trailing .exe if any
32917    new_path="${new_path/%.exe/}"
32918    # Do not save /bin paths to all_fixpath_prefixes!
32919  else
32920    # Not in mixed or Windows style, start by that.
32921    new_path=`cmd //c echo $new_path`
32922
32923  input_path="$new_path"
32924  # Check if we need to convert this using DOS-style short mode. If the path
32925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32926  # take no chances and rewrite it.
32927  # Note: m4 eats our [], so we need to use [ and ] instead.
32928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32929  if test "x$has_forbidden_chars" != x; then
32930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32932  fi
32933
32934    # Output is in $new_path
32935
32936  windows_path="$new_path"
32937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32938    unix_path=`$CYGPATH -u "$windows_path"`
32939    new_path="$unix_path"
32940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32942    new_path="$unix_path"
32943  fi
32944
32945    # remove trailing .exe if any
32946    new_path="${new_path/%.exe/}"
32947
32948    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32949    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32950  fi
32951
32952  else
32953    # We're on a unix platform. Hooray! :)
32954    # First separate the path from the arguments. This will split at the first
32955    # space.
32956    complete="$AR"
32957    path="${complete%% *}"
32958    tmp="$complete EOL"
32959    arguments="${tmp#* }"
32960
32961    # Cannot rely on the command "which" here since it doesn't always work.
32962    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32963    if test -z "$is_absolute_path"; then
32964      # Path to executable is not absolute. Find it.
32965      IFS_save="$IFS"
32966      IFS=:
32967      for p in $PATH; do
32968        if test -f "$p/$path" && test -x "$p/$path"; then
32969          new_path="$p/$path"
32970          break
32971        fi
32972      done
32973      IFS="$IFS_save"
32974    else
32975      # This is an absolute path, we can use it without further modifications.
32976      new_path="$path"
32977    fi
32978
32979    if test "x$new_path" = x; then
32980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32981$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32982      has_space=`$ECHO "$complete" | $GREP " "`
32983      if test "x$has_space" != x; then
32984        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32986      fi
32987      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32988    fi
32989  fi
32990
32991  # Now join together the path and the arguments once again
32992  if test "x$arguments" != xEOL; then
32993    new_complete="$new_path ${arguments% *}"
32994  else
32995    new_complete="$new_path"
32996  fi
32997
32998  if test "x$complete" != "x$new_complete"; then
32999    AR="$new_complete"
33000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33001$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33002  fi
33003
33004
33005
33006  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33007    ac_ext=m
33008ac_cpp='$OBJCPP $CPPFLAGS'
33009ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33010ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33011ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33012if test -n "$ac_tool_prefix"; then
33013  for ac_prog in gcc objcc objc cc CC
33014  do
33015    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33016set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33018$as_echo_n "checking for $ac_word... " >&6; }
33019if ${ac_cv_prog_OBJC+:} false; then :
33020  $as_echo_n "(cached) " >&6
33021else
33022  if test -n "$OBJC"; then
33023  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33024else
33025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33026for as_dir in $PATH
33027do
33028  IFS=$as_save_IFS
33029  test -z "$as_dir" && as_dir=.
33030    for ac_exec_ext in '' $ac_executable_extensions; do
33031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33032    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33034    break 2
33035  fi
33036done
33037  done
33038IFS=$as_save_IFS
33039
33040fi
33041fi
33042OBJC=$ac_cv_prog_OBJC
33043if test -n "$OBJC"; then
33044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33045$as_echo "$OBJC" >&6; }
33046else
33047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33048$as_echo "no" >&6; }
33049fi
33050
33051
33052    test -n "$OBJC" && break
33053  done
33054fi
33055if test -z "$OBJC"; then
33056  ac_ct_OBJC=$OBJC
33057  for ac_prog in gcc objcc objc cc CC
33058do
33059  # Extract the first word of "$ac_prog", so it can be a program name with args.
33060set dummy $ac_prog; ac_word=$2
33061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33062$as_echo_n "checking for $ac_word... " >&6; }
33063if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33064  $as_echo_n "(cached) " >&6
33065else
33066  if test -n "$ac_ct_OBJC"; then
33067  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33068else
33069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33070for as_dir in $PATH
33071do
33072  IFS=$as_save_IFS
33073  test -z "$as_dir" && as_dir=.
33074    for ac_exec_ext in '' $ac_executable_extensions; do
33075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33076    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33078    break 2
33079  fi
33080done
33081  done
33082IFS=$as_save_IFS
33083
33084fi
33085fi
33086ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33087if test -n "$ac_ct_OBJC"; then
33088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33089$as_echo "$ac_ct_OBJC" >&6; }
33090else
33091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33092$as_echo "no" >&6; }
33093fi
33094
33095
33096  test -n "$ac_ct_OBJC" && break
33097done
33098
33099  if test "x$ac_ct_OBJC" = x; then
33100    OBJC="gcc"
33101  else
33102    case $cross_compiling:$ac_tool_warned in
33103yes:)
33104{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33105$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33106ac_tool_warned=yes ;;
33107esac
33108    OBJC=$ac_ct_OBJC
33109  fi
33110fi
33111
33112# Provide some information about the compiler.
33113$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33114set X $ac_compile
33115ac_compiler=$2
33116for ac_option in --version -v -V -qversion; do
33117  { { ac_try="$ac_compiler $ac_option >&5"
33118case "(($ac_try" in
33119  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33120  *) ac_try_echo=$ac_try;;
33121esac
33122eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33123$as_echo "$ac_try_echo"; } >&5
33124  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33125  ac_status=$?
33126  if test -s conftest.err; then
33127    sed '10a\
33128... rest of stderr output deleted ...
33129         10q' conftest.err >conftest.er1
33130    cat conftest.er1 >&5
33131  fi
33132  rm -f conftest.er1 conftest.err
33133  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33134  test $ac_status = 0; }
33135done
33136
33137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33138$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33139if ${ac_cv_objc_compiler_gnu+:} false; then :
33140  $as_echo_n "(cached) " >&6
33141else
33142  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33143/* end confdefs.h.  */
33144
33145int
33146main ()
33147{
33148#ifndef __GNUC__
33149       choke me
33150#endif
33151
33152  ;
33153  return 0;
33154}
33155_ACEOF
33156if ac_fn_objc_try_compile "$LINENO"; then :
33157  ac_compiler_gnu=yes
33158else
33159  ac_compiler_gnu=no
33160fi
33161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33162ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33163
33164fi
33165{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33166$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33167if test $ac_compiler_gnu = yes; then
33168  GOBJC=yes
33169else
33170  GOBJC=
33171fi
33172ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33173ac_save_OBJCFLAGS=$OBJCFLAGS
33174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33175$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33176if ${ac_cv_prog_objc_g+:} false; then :
33177  $as_echo_n "(cached) " >&6
33178else
33179  ac_save_objc_werror_flag=$ac_objc_werror_flag
33180   ac_objc_werror_flag=yes
33181   ac_cv_prog_objc_g=no
33182   OBJCFLAGS="-g"
33183   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33184/* end confdefs.h.  */
33185
33186int
33187main ()
33188{
33189
33190  ;
33191  return 0;
33192}
33193_ACEOF
33194if ac_fn_objc_try_compile "$LINENO"; then :
33195  ac_cv_prog_objc_g=yes
33196else
33197  OBJCFLAGS=""
33198      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33199/* end confdefs.h.  */
33200
33201int
33202main ()
33203{
33204
33205  ;
33206  return 0;
33207}
33208_ACEOF
33209if ac_fn_objc_try_compile "$LINENO"; then :
33210
33211else
33212  ac_objc_werror_flag=$ac_save_objc_werror_flag
33213	 OBJCFLAGS="-g"
33214	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33215/* end confdefs.h.  */
33216
33217int
33218main ()
33219{
33220
33221  ;
33222  return 0;
33223}
33224_ACEOF
33225if ac_fn_objc_try_compile "$LINENO"; then :
33226  ac_cv_prog_objc_g=yes
33227fi
33228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33229fi
33230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33231fi
33232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33233   ac_objc_werror_flag=$ac_save_objc_werror_flag
33234fi
33235{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33236$as_echo "$ac_cv_prog_objc_g" >&6; }
33237if test "$ac_test_OBJCFLAGS" = set; then
33238  OBJCFLAGS=$ac_save_OBJCFLAGS
33239elif test $ac_cv_prog_objc_g = yes; then
33240  if test "$GOBJC" = yes; then
33241    OBJCFLAGS="-g -O2"
33242  else
33243    OBJCFLAGS="-g"
33244  fi
33245else
33246  if test "$GOBJC" = yes; then
33247    OBJCFLAGS="-O2"
33248  else
33249    OBJCFLAGS=
33250  fi
33251fi
33252ac_ext=cpp
33253ac_cpp='$CXXCPP $CPPFLAGS'
33254ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33255ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33256ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33257
33258
33259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33260
33261  # First separate the path from the arguments. This will split at the first
33262  # space.
33263  complete="$OBJC"
33264  path="${complete%% *}"
33265  tmp="$complete EOL"
33266  arguments="${tmp#* }"
33267
33268  # Input might be given as Windows format, start by converting to
33269  # unix format.
33270  new_path=`$CYGPATH -u "$path"`
33271
33272  # Now try to locate executable using which
33273  new_path=`$WHICH "$new_path" 2> /dev/null`
33274  # bat and cmd files are not always considered executable in cygwin causing which
33275  # to not find them
33276  if test "x$new_path" = x \
33277      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33278      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33279    new_path=`$CYGPATH -u "$path"`
33280  fi
33281  if test "x$new_path" = x; then
33282    # Oops. Which didn't find the executable.
33283    # The splitting of arguments from the executable at a space might have been incorrect,
33284    # since paths with space are more likely in Windows. Give it another try with the whole
33285    # argument.
33286    path="$complete"
33287    arguments="EOL"
33288    new_path=`$CYGPATH -u "$path"`
33289    new_path=`$WHICH "$new_path" 2> /dev/null`
33290    # bat and cmd files are not always considered executable in cygwin causing which
33291    # to not find them
33292    if test "x$new_path" = x \
33293        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33294        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33295      new_path=`$CYGPATH -u "$path"`
33296    fi
33297    if test "x$new_path" = x; then
33298      # It's still not found. Now this is an unrecoverable error.
33299      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33300$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33301      has_space=`$ECHO "$complete" | $GREP " "`
33302      if test "x$has_space" != x; then
33303        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33304$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33305      fi
33306      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33307    fi
33308  fi
33309
33310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33313  # "foo.exe" is OK but "foo" is an error.
33314  #
33315  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33316  # It is also a way to make sure we got the proper file name for the real test later on.
33317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33318  if test "x$test_shortpath" = x; then
33319    # Short path failed, file does not exist as specified.
33320    # Try adding .exe or .cmd
33321    if test -f "${new_path}.exe"; then
33322      input_to_shortpath="${new_path}.exe"
33323    elif test -f "${new_path}.cmd"; then
33324      input_to_shortpath="${new_path}.cmd"
33325    else
33326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33327$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33328      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33329$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33330      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33331    fi
33332  else
33333    input_to_shortpath="$new_path"
33334  fi
33335
33336  # Call helper function which possibly converts this using DOS-style short mode.
33337  # If so, the updated path is stored in $new_path.
33338  new_path="$input_to_shortpath"
33339
33340  input_path="$input_to_shortpath"
33341  # Check if we need to convert this using DOS-style short mode. If the path
33342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33343  # take no chances and rewrite it.
33344  # Note: m4 eats our [], so we need to use [ and ] instead.
33345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33346  if test "x$has_forbidden_chars" != x; then
33347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33348    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33349    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33350    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33351      # Going to short mode and back again did indeed matter. Since short mode is
33352      # case insensitive, let's make it lowercase to improve readability.
33353      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33354      # Now convert it back to Unix-stile (cygpath)
33355      input_path=`$CYGPATH -u "$shortmode_path"`
33356      new_path="$input_path"
33357    fi
33358  fi
33359
33360  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33361  if test "x$test_cygdrive_prefix" = x; then
33362    # As a simple fix, exclude /usr/bin since it's not a real path.
33363    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33364      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33365      # a path prefixed by /cygdrive for fixpath to work.
33366      new_path="$CYGWIN_ROOT_PATH$input_path"
33367    fi
33368  fi
33369
33370  # remove trailing .exe if any
33371  new_path="${new_path/%.exe/}"
33372
33373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33374
33375  # First separate the path from the arguments. This will split at the first
33376  # space.
33377  complete="$OBJC"
33378  path="${complete%% *}"
33379  tmp="$complete EOL"
33380  arguments="${tmp#* }"
33381
33382  # Input might be given as Windows format, start by converting to
33383  # unix format.
33384  new_path="$path"
33385
33386  windows_path="$new_path"
33387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33388    unix_path=`$CYGPATH -u "$windows_path"`
33389    new_path="$unix_path"
33390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33392    new_path="$unix_path"
33393  fi
33394
33395
33396  # Now try to locate executable using which
33397  new_path=`$WHICH "$new_path" 2> /dev/null`
33398
33399  if test "x$new_path" = x; then
33400    # Oops. Which didn't find the executable.
33401    # The splitting of arguments from the executable at a space might have been incorrect,
33402    # since paths with space are more likely in Windows. Give it another try with the whole
33403    # argument.
33404    path="$complete"
33405    arguments="EOL"
33406    new_path="$path"
33407
33408  windows_path="$new_path"
33409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33410    unix_path=`$CYGPATH -u "$windows_path"`
33411    new_path="$unix_path"
33412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33414    new_path="$unix_path"
33415  fi
33416
33417
33418    new_path=`$WHICH "$new_path" 2> /dev/null`
33419    # bat and cmd files are not always considered executable in MSYS causing which
33420    # to not find them
33421    if test "x$new_path" = x \
33422        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33423        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33424      new_path="$path"
33425
33426  windows_path="$new_path"
33427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33428    unix_path=`$CYGPATH -u "$windows_path"`
33429    new_path="$unix_path"
33430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33432    new_path="$unix_path"
33433  fi
33434
33435    fi
33436
33437    if test "x$new_path" = x; then
33438      # It's still not found. Now this is an unrecoverable error.
33439      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33440$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33441      has_space=`$ECHO "$complete" | $GREP " "`
33442      if test "x$has_space" != x; then
33443        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33444$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33445      fi
33446      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33447    fi
33448  fi
33449
33450  # Now new_path has a complete unix path to the binary
33451  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33452    # Keep paths in /bin as-is, but remove trailing .exe if any
33453    new_path="${new_path/%.exe/}"
33454    # Do not save /bin paths to all_fixpath_prefixes!
33455  else
33456    # Not in mixed or Windows style, start by that.
33457    new_path=`cmd //c echo $new_path`
33458
33459  input_path="$new_path"
33460  # Check if we need to convert this using DOS-style short mode. If the path
33461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33462  # take no chances and rewrite it.
33463  # Note: m4 eats our [], so we need to use [ and ] instead.
33464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33465  if test "x$has_forbidden_chars" != x; then
33466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33468  fi
33469
33470    # Output is in $new_path
33471
33472  windows_path="$new_path"
33473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33474    unix_path=`$CYGPATH -u "$windows_path"`
33475    new_path="$unix_path"
33476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33478    new_path="$unix_path"
33479  fi
33480
33481    # remove trailing .exe if any
33482    new_path="${new_path/%.exe/}"
33483
33484    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33485    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33486  fi
33487
33488  else
33489    # We're on a unix platform. Hooray! :)
33490    # First separate the path from the arguments. This will split at the first
33491    # space.
33492    complete="$OBJC"
33493    path="${complete%% *}"
33494    tmp="$complete EOL"
33495    arguments="${tmp#* }"
33496
33497    # Cannot rely on the command "which" here since it doesn't always work.
33498    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33499    if test -z "$is_absolute_path"; then
33500      # Path to executable is not absolute. Find it.
33501      IFS_save="$IFS"
33502      IFS=:
33503      for p in $PATH; do
33504        if test -f "$p/$path" && test -x "$p/$path"; then
33505          new_path="$p/$path"
33506          break
33507        fi
33508      done
33509      IFS="$IFS_save"
33510    else
33511      # This is an absolute path, we can use it without further modifications.
33512      new_path="$path"
33513    fi
33514
33515    if test "x$new_path" = x; then
33516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33517$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33518      has_space=`$ECHO "$complete" | $GREP " "`
33519      if test "x$has_space" != x; then
33520        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33521$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33522      fi
33523      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33524    fi
33525  fi
33526
33527  # Now join together the path and the arguments once again
33528  if test "x$arguments" != xEOL; then
33529    new_complete="$new_path ${arguments% *}"
33530  else
33531    new_complete="$new_path"
33532  fi
33533
33534  if test "x$complete" != "x$new_complete"; then
33535    OBJC="$new_complete"
33536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33537$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33538  fi
33539
33540
33541
33542  # Publish this variable in the help.
33543
33544
33545  if test "x$LIPO" = x; then
33546    # The variable is not set by user, try to locate tool using the code snippet
33547    for ac_prog in lipo
33548do
33549  # Extract the first word of "$ac_prog", so it can be a program name with args.
33550set dummy $ac_prog; ac_word=$2
33551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33552$as_echo_n "checking for $ac_word... " >&6; }
33553if ${ac_cv_path_LIPO+:} false; then :
33554  $as_echo_n "(cached) " >&6
33555else
33556  case $LIPO in
33557  [\\/]* | ?:[\\/]*)
33558  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33559  ;;
33560  *)
33561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33562for as_dir in $PATH
33563do
33564  IFS=$as_save_IFS
33565  test -z "$as_dir" && as_dir=.
33566    for ac_exec_ext in '' $ac_executable_extensions; do
33567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33568    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33570    break 2
33571  fi
33572done
33573  done
33574IFS=$as_save_IFS
33575
33576  ;;
33577esac
33578fi
33579LIPO=$ac_cv_path_LIPO
33580if test -n "$LIPO"; then
33581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33582$as_echo "$LIPO" >&6; }
33583else
33584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33585$as_echo "no" >&6; }
33586fi
33587
33588
33589  test -n "$LIPO" && break
33590done
33591
33592  else
33593    # The variable is set, but is it from the command line or the environment?
33594
33595    # Try to remove the string !LIPO! from our list.
33596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33598      # If it failed, the variable was not from the command line. Ignore it,
33599      # but warn the user (except for BASH, which is always set by the calling BASH).
33600      if test "xLIPO" != xBASH; then
33601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33602$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33603      fi
33604      # 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      # If it succeeded, then it was overridden by the user. We will use it
33652      # for the tool.
33653
33654      # First remove it from the list of overridden variables, so we can test
33655      # for unknown variables in the end.
33656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33657
33658      # Check if the provided tool contains a complete path.
33659      tool_specified="$LIPO"
33660      tool_basename="${tool_specified##*/}"
33661      if test "x$tool_basename" = "x$tool_specified"; then
33662        # A command without a complete path is provided, search $PATH.
33663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33664$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33665        # Extract the first word of "$tool_basename", so it can be a program name with args.
33666set dummy $tool_basename; 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        if test "x$LIPO" = x; then
33706          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33707        fi
33708      else
33709        # Otherwise we believe it is a complete path. Use it as it is.
33710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33711$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33713$as_echo_n "checking for LIPO... " >&6; }
33714        if test ! -x "$tool_specified"; then
33715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33716$as_echo "not found" >&6; }
33717          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33718        fi
33719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33720$as_echo "$tool_specified" >&6; }
33721      fi
33722    fi
33723  fi
33724
33725
33726
33727  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33728
33729  # First separate the path from the arguments. This will split at the first
33730  # space.
33731  complete="$LIPO"
33732  path="${complete%% *}"
33733  tmp="$complete EOL"
33734  arguments="${tmp#* }"
33735
33736  # Input might be given as Windows format, start by converting to
33737  # unix format.
33738  new_path=`$CYGPATH -u "$path"`
33739
33740  # Now try to locate executable using which
33741  new_path=`$WHICH "$new_path" 2> /dev/null`
33742  # bat and cmd files are not always considered executable in cygwin causing which
33743  # to not find them
33744  if test "x$new_path" = x \
33745      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33746      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33747    new_path=`$CYGPATH -u "$path"`
33748  fi
33749  if test "x$new_path" = x; then
33750    # Oops. Which didn't find the executable.
33751    # The splitting of arguments from the executable at a space might have been incorrect,
33752    # since paths with space are more likely in Windows. Give it another try with the whole
33753    # argument.
33754    path="$complete"
33755    arguments="EOL"
33756    new_path=`$CYGPATH -u "$path"`
33757    new_path=`$WHICH "$new_path" 2> /dev/null`
33758    # bat and cmd files are not always considered executable in cygwin causing which
33759    # to not find them
33760    if test "x$new_path" = x \
33761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33763      new_path=`$CYGPATH -u "$path"`
33764    fi
33765    if test "x$new_path" = x; then
33766      # It's still not found. Now this is an unrecoverable error.
33767      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33768$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33769      has_space=`$ECHO "$complete" | $GREP " "`
33770      if test "x$has_space" != x; then
33771        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33772$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33773      fi
33774      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33775    fi
33776  fi
33777
33778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33781  # "foo.exe" is OK but "foo" is an error.
33782  #
33783  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33784  # It is also a way to make sure we got the proper file name for the real test later on.
33785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33786  if test "x$test_shortpath" = x; then
33787    # Short path failed, file does not exist as specified.
33788    # Try adding .exe or .cmd
33789    if test -f "${new_path}.exe"; then
33790      input_to_shortpath="${new_path}.exe"
33791    elif test -f "${new_path}.cmd"; then
33792      input_to_shortpath="${new_path}.cmd"
33793    else
33794      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33795$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33796      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33797$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33798      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33799    fi
33800  else
33801    input_to_shortpath="$new_path"
33802  fi
33803
33804  # Call helper function which possibly converts this using DOS-style short mode.
33805  # If so, the updated path is stored in $new_path.
33806  new_path="$input_to_shortpath"
33807
33808  input_path="$input_to_shortpath"
33809  # Check if we need to convert this using DOS-style short mode. If the path
33810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33811  # take no chances and rewrite it.
33812  # Note: m4 eats our [], so we need to use [ and ] instead.
33813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33814  if test "x$has_forbidden_chars" != x; then
33815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33819      # Going to short mode and back again did indeed matter. Since short mode is
33820      # case insensitive, let's make it lowercase to improve readability.
33821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33822      # Now convert it back to Unix-stile (cygpath)
33823      input_path=`$CYGPATH -u "$shortmode_path"`
33824      new_path="$input_path"
33825    fi
33826  fi
33827
33828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33829  if test "x$test_cygdrive_prefix" = x; then
33830    # As a simple fix, exclude /usr/bin since it's not a real path.
33831    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33833      # a path prefixed by /cygdrive for fixpath to work.
33834      new_path="$CYGWIN_ROOT_PATH$input_path"
33835    fi
33836  fi
33837
33838  # remove trailing .exe if any
33839  new_path="${new_path/%.exe/}"
33840
33841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33842
33843  # First separate the path from the arguments. This will split at the first
33844  # space.
33845  complete="$LIPO"
33846  path="${complete%% *}"
33847  tmp="$complete EOL"
33848  arguments="${tmp#* }"
33849
33850  # Input might be given as Windows format, start by converting to
33851  # unix format.
33852  new_path="$path"
33853
33854  windows_path="$new_path"
33855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33856    unix_path=`$CYGPATH -u "$windows_path"`
33857    new_path="$unix_path"
33858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33860    new_path="$unix_path"
33861  fi
33862
33863
33864  # Now try to locate executable using which
33865  new_path=`$WHICH "$new_path" 2> /dev/null`
33866
33867  if test "x$new_path" = x; then
33868    # Oops. Which didn't find the executable.
33869    # The splitting of arguments from the executable at a space might have been incorrect,
33870    # since paths with space are more likely in Windows. Give it another try with the whole
33871    # argument.
33872    path="$complete"
33873    arguments="EOL"
33874    new_path="$path"
33875
33876  windows_path="$new_path"
33877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33878    unix_path=`$CYGPATH -u "$windows_path"`
33879    new_path="$unix_path"
33880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33882    new_path="$unix_path"
33883  fi
33884
33885
33886    new_path=`$WHICH "$new_path" 2> /dev/null`
33887    # bat and cmd files are not always considered executable in MSYS causing which
33888    # to not find them
33889    if test "x$new_path" = x \
33890        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33891        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33892      new_path="$path"
33893
33894  windows_path="$new_path"
33895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33896    unix_path=`$CYGPATH -u "$windows_path"`
33897    new_path="$unix_path"
33898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33900    new_path="$unix_path"
33901  fi
33902
33903    fi
33904
33905    if test "x$new_path" = x; then
33906      # It's still not found. Now this is an unrecoverable error.
33907      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33908$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33909      has_space=`$ECHO "$complete" | $GREP " "`
33910      if test "x$has_space" != x; then
33911        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33912$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33913      fi
33914      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33915    fi
33916  fi
33917
33918  # Now new_path has a complete unix path to the binary
33919  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33920    # Keep paths in /bin as-is, but remove trailing .exe if any
33921    new_path="${new_path/%.exe/}"
33922    # Do not save /bin paths to all_fixpath_prefixes!
33923  else
33924    # Not in mixed or Windows style, start by that.
33925    new_path=`cmd //c echo $new_path`
33926
33927  input_path="$new_path"
33928  # Check if we need to convert this using DOS-style short mode. If the path
33929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33930  # take no chances and rewrite it.
33931  # Note: m4 eats our [], so we need to use [ and ] instead.
33932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33933  if test "x$has_forbidden_chars" != x; then
33934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33936  fi
33937
33938    # Output is in $new_path
33939
33940  windows_path="$new_path"
33941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33942    unix_path=`$CYGPATH -u "$windows_path"`
33943    new_path="$unix_path"
33944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33946    new_path="$unix_path"
33947  fi
33948
33949    # remove trailing .exe if any
33950    new_path="${new_path/%.exe/}"
33951
33952    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33953    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33954  fi
33955
33956  else
33957    # We're on a unix platform. Hooray! :)
33958    # First separate the path from the arguments. This will split at the first
33959    # space.
33960    complete="$LIPO"
33961    path="${complete%% *}"
33962    tmp="$complete EOL"
33963    arguments="${tmp#* }"
33964
33965    # Cannot rely on the command "which" here since it doesn't always work.
33966    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33967    if test -z "$is_absolute_path"; then
33968      # Path to executable is not absolute. Find it.
33969      IFS_save="$IFS"
33970      IFS=:
33971      for p in $PATH; do
33972        if test -f "$p/$path" && test -x "$p/$path"; then
33973          new_path="$p/$path"
33974          break
33975        fi
33976      done
33977      IFS="$IFS_save"
33978    else
33979      # This is an absolute path, we can use it without further modifications.
33980      new_path="$path"
33981    fi
33982
33983    if test "x$new_path" = x; then
33984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33985$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33986      has_space=`$ECHO "$complete" | $GREP " "`
33987      if test "x$has_space" != x; then
33988        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33989$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33990      fi
33991      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33992    fi
33993  fi
33994
33995  # Now join together the path and the arguments once again
33996  if test "x$arguments" != xEOL; then
33997    new_complete="$new_path ${arguments% *}"
33998  else
33999    new_complete="$new_path"
34000  fi
34001
34002  if test "x$complete" != "x$new_complete"; then
34003    LIPO="$new_complete"
34004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34005$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34006  fi
34007
34008  else
34009    OBJC=
34010  fi
34011
34012  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34013    # Extract the first word of "mt", so it can be a program name with args.
34014set dummy mt; ac_word=$2
34015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34016$as_echo_n "checking for $ac_word... " >&6; }
34017if ${ac_cv_prog_MT+:} false; then :
34018  $as_echo_n "(cached) " >&6
34019else
34020  if test -n "$MT"; then
34021  ac_cv_prog_MT="$MT" # Let the user override the test.
34022else
34023  ac_prog_rejected=no
34024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34025for as_dir in $PATH
34026do
34027  IFS=$as_save_IFS
34028  test -z "$as_dir" && as_dir=.
34029    for ac_exec_ext in '' $ac_executable_extensions; do
34030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34031    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34032       ac_prog_rejected=yes
34033       continue
34034     fi
34035    ac_cv_prog_MT="mt"
34036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34037    break 2
34038  fi
34039done
34040  done
34041IFS=$as_save_IFS
34042
34043if test $ac_prog_rejected = yes; then
34044  # We found a bogon in the path, so make sure we never use it.
34045  set dummy $ac_cv_prog_MT
34046  shift
34047  if test $# != 0; then
34048    # We chose a different compiler from the bogus one.
34049    # However, it has the same basename, so the bogon will be chosen
34050    # first if we set MT to just the basename; use the full file name.
34051    shift
34052    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34053  fi
34054fi
34055fi
34056fi
34057MT=$ac_cv_prog_MT
34058if test -n "$MT"; then
34059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34060$as_echo "$MT" >&6; }
34061else
34062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34063$as_echo "no" >&6; }
34064fi
34065
34066
34067
34068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34069
34070  # First separate the path from the arguments. This will split at the first
34071  # space.
34072  complete="$MT"
34073  path="${complete%% *}"
34074  tmp="$complete EOL"
34075  arguments="${tmp#* }"
34076
34077  # Input might be given as Windows format, start by converting to
34078  # unix format.
34079  new_path=`$CYGPATH -u "$path"`
34080
34081  # Now try to locate executable using which
34082  new_path=`$WHICH "$new_path" 2> /dev/null`
34083  # bat and cmd files are not always considered executable in cygwin causing which
34084  # to not find them
34085  if test "x$new_path" = x \
34086      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34087      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34088    new_path=`$CYGPATH -u "$path"`
34089  fi
34090  if test "x$new_path" = x; then
34091    # Oops. Which didn't find the executable.
34092    # The splitting of arguments from the executable at a space might have been incorrect,
34093    # since paths with space are more likely in Windows. Give it another try with the whole
34094    # argument.
34095    path="$complete"
34096    arguments="EOL"
34097    new_path=`$CYGPATH -u "$path"`
34098    new_path=`$WHICH "$new_path" 2> /dev/null`
34099    # bat and cmd files are not always considered executable in cygwin causing which
34100    # to not find them
34101    if test "x$new_path" = x \
34102        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34103        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34104      new_path=`$CYGPATH -u "$path"`
34105    fi
34106    if test "x$new_path" = x; then
34107      # It's still not found. Now this is an unrecoverable error.
34108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34109$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34110      has_space=`$ECHO "$complete" | $GREP " "`
34111      if test "x$has_space" != x; then
34112        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34113$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34114      fi
34115      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34116    fi
34117  fi
34118
34119  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34120  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34121  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34122  # "foo.exe" is OK but "foo" is an error.
34123  #
34124  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34125  # It is also a way to make sure we got the proper file name for the real test later on.
34126  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34127  if test "x$test_shortpath" = x; then
34128    # Short path failed, file does not exist as specified.
34129    # Try adding .exe or .cmd
34130    if test -f "${new_path}.exe"; then
34131      input_to_shortpath="${new_path}.exe"
34132    elif test -f "${new_path}.cmd"; then
34133      input_to_shortpath="${new_path}.cmd"
34134    else
34135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34136$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34137      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34138$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34139      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34140    fi
34141  else
34142    input_to_shortpath="$new_path"
34143  fi
34144
34145  # Call helper function which possibly converts this using DOS-style short mode.
34146  # If so, the updated path is stored in $new_path.
34147  new_path="$input_to_shortpath"
34148
34149  input_path="$input_to_shortpath"
34150  # Check if we need to convert this using DOS-style short mode. If the path
34151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34152  # take no chances and rewrite it.
34153  # Note: m4 eats our [], so we need to use [ and ] instead.
34154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34155  if test "x$has_forbidden_chars" != x; then
34156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34157    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34158    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34159    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34160      # Going to short mode and back again did indeed matter. Since short mode is
34161      # case insensitive, let's make it lowercase to improve readability.
34162      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34163      # Now convert it back to Unix-stile (cygpath)
34164      input_path=`$CYGPATH -u "$shortmode_path"`
34165      new_path="$input_path"
34166    fi
34167  fi
34168
34169  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34170  if test "x$test_cygdrive_prefix" = x; then
34171    # As a simple fix, exclude /usr/bin since it's not a real path.
34172    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34173      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34174      # a path prefixed by /cygdrive for fixpath to work.
34175      new_path="$CYGWIN_ROOT_PATH$input_path"
34176    fi
34177  fi
34178
34179  # remove trailing .exe if any
34180  new_path="${new_path/%.exe/}"
34181
34182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34183
34184  # First separate the path from the arguments. This will split at the first
34185  # space.
34186  complete="$MT"
34187  path="${complete%% *}"
34188  tmp="$complete EOL"
34189  arguments="${tmp#* }"
34190
34191  # Input might be given as Windows format, start by converting to
34192  # unix format.
34193  new_path="$path"
34194
34195  windows_path="$new_path"
34196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34197    unix_path=`$CYGPATH -u "$windows_path"`
34198    new_path="$unix_path"
34199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34201    new_path="$unix_path"
34202  fi
34203
34204
34205  # Now try to locate executable using which
34206  new_path=`$WHICH "$new_path" 2> /dev/null`
34207
34208  if test "x$new_path" = x; then
34209    # Oops. Which didn't find the executable.
34210    # The splitting of arguments from the executable at a space might have been incorrect,
34211    # since paths with space are more likely in Windows. Give it another try with the whole
34212    # argument.
34213    path="$complete"
34214    arguments="EOL"
34215    new_path="$path"
34216
34217  windows_path="$new_path"
34218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34219    unix_path=`$CYGPATH -u "$windows_path"`
34220    new_path="$unix_path"
34221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34223    new_path="$unix_path"
34224  fi
34225
34226
34227    new_path=`$WHICH "$new_path" 2> /dev/null`
34228    # bat and cmd files are not always considered executable in MSYS causing which
34229    # to not find them
34230    if test "x$new_path" = x \
34231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34233      new_path="$path"
34234
34235  windows_path="$new_path"
34236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34237    unix_path=`$CYGPATH -u "$windows_path"`
34238    new_path="$unix_path"
34239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34241    new_path="$unix_path"
34242  fi
34243
34244    fi
34245
34246    if test "x$new_path" = x; then
34247      # It's still not found. Now this is an unrecoverable error.
34248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34249$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34250      has_space=`$ECHO "$complete" | $GREP " "`
34251      if test "x$has_space" != x; then
34252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34254      fi
34255      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34256    fi
34257  fi
34258
34259  # Now new_path has a complete unix path to the binary
34260  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34261    # Keep paths in /bin as-is, but remove trailing .exe if any
34262    new_path="${new_path/%.exe/}"
34263    # Do not save /bin paths to all_fixpath_prefixes!
34264  else
34265    # Not in mixed or Windows style, start by that.
34266    new_path=`cmd //c echo $new_path`
34267
34268  input_path="$new_path"
34269  # Check if we need to convert this using DOS-style short mode. If the path
34270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34271  # take no chances and rewrite it.
34272  # Note: m4 eats our [], so we need to use [ and ] instead.
34273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34274  if test "x$has_forbidden_chars" != x; then
34275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34277  fi
34278
34279    # Output is in $new_path
34280
34281  windows_path="$new_path"
34282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34283    unix_path=`$CYGPATH -u "$windows_path"`
34284    new_path="$unix_path"
34285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34287    new_path="$unix_path"
34288  fi
34289
34290    # remove trailing .exe if any
34291    new_path="${new_path/%.exe/}"
34292
34293    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34294    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34295  fi
34296
34297  else
34298    # We're on a unix platform. Hooray! :)
34299    # First separate the path from the arguments. This will split at the first
34300    # space.
34301    complete="$MT"
34302    path="${complete%% *}"
34303    tmp="$complete EOL"
34304    arguments="${tmp#* }"
34305
34306    # Cannot rely on the command "which" here since it doesn't always work.
34307    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34308    if test -z "$is_absolute_path"; then
34309      # Path to executable is not absolute. Find it.
34310      IFS_save="$IFS"
34311      IFS=:
34312      for p in $PATH; do
34313        if test -f "$p/$path" && test -x "$p/$path"; then
34314          new_path="$p/$path"
34315          break
34316        fi
34317      done
34318      IFS="$IFS_save"
34319    else
34320      # This is an absolute path, we can use it without further modifications.
34321      new_path="$path"
34322    fi
34323
34324    if test "x$new_path" = x; then
34325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34326$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34327      has_space=`$ECHO "$complete" | $GREP " "`
34328      if test "x$has_space" != x; then
34329        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34330$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34331      fi
34332      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34333    fi
34334  fi
34335
34336  # Now join together the path and the arguments once again
34337  if test "x$arguments" != xEOL; then
34338    new_complete="$new_path ${arguments% *}"
34339  else
34340    new_complete="$new_path"
34341  fi
34342
34343  if test "x$complete" != "x$new_complete"; then
34344    MT="$new_complete"
34345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34346$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34347  fi
34348
34349    # Setup the resource compiler (RC)
34350    # Extract the first word of "rc", so it can be a program name with args.
34351set dummy rc; ac_word=$2
34352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34353$as_echo_n "checking for $ac_word... " >&6; }
34354if ${ac_cv_prog_RC+:} false; then :
34355  $as_echo_n "(cached) " >&6
34356else
34357  if test -n "$RC"; then
34358  ac_cv_prog_RC="$RC" # Let the user override the test.
34359else
34360  ac_prog_rejected=no
34361as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34362for as_dir in $PATH
34363do
34364  IFS=$as_save_IFS
34365  test -z "$as_dir" && as_dir=.
34366    for ac_exec_ext in '' $ac_executable_extensions; do
34367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34368    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34369       ac_prog_rejected=yes
34370       continue
34371     fi
34372    ac_cv_prog_RC="rc"
34373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34374    break 2
34375  fi
34376done
34377  done
34378IFS=$as_save_IFS
34379
34380if test $ac_prog_rejected = yes; then
34381  # We found a bogon in the path, so make sure we never use it.
34382  set dummy $ac_cv_prog_RC
34383  shift
34384  if test $# != 0; then
34385    # We chose a different compiler from the bogus one.
34386    # However, it has the same basename, so the bogon will be chosen
34387    # first if we set RC to just the basename; use the full file name.
34388    shift
34389    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34390  fi
34391fi
34392fi
34393fi
34394RC=$ac_cv_prog_RC
34395if test -n "$RC"; then
34396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34397$as_echo "$RC" >&6; }
34398else
34399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34400$as_echo "no" >&6; }
34401fi
34402
34403
34404
34405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34406
34407  # First separate the path from the arguments. This will split at the first
34408  # space.
34409  complete="$RC"
34410  path="${complete%% *}"
34411  tmp="$complete EOL"
34412  arguments="${tmp#* }"
34413
34414  # Input might be given as Windows format, start by converting to
34415  # unix format.
34416  new_path=`$CYGPATH -u "$path"`
34417
34418  # Now try to locate executable using which
34419  new_path=`$WHICH "$new_path" 2> /dev/null`
34420  # bat and cmd files are not always considered executable in cygwin causing which
34421  # to not find them
34422  if test "x$new_path" = x \
34423      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34424      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34425    new_path=`$CYGPATH -u "$path"`
34426  fi
34427  if test "x$new_path" = x; then
34428    # Oops. Which didn't find the executable.
34429    # The splitting of arguments from the executable at a space might have been incorrect,
34430    # since paths with space are more likely in Windows. Give it another try with the whole
34431    # argument.
34432    path="$complete"
34433    arguments="EOL"
34434    new_path=`$CYGPATH -u "$path"`
34435    new_path=`$WHICH "$new_path" 2> /dev/null`
34436    # bat and cmd files are not always considered executable in cygwin causing which
34437    # to not find them
34438    if test "x$new_path" = x \
34439        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34440        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34441      new_path=`$CYGPATH -u "$path"`
34442    fi
34443    if test "x$new_path" = x; then
34444      # It's still not found. Now this is an unrecoverable error.
34445      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34446$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34447      has_space=`$ECHO "$complete" | $GREP " "`
34448      if test "x$has_space" != x; then
34449        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34450$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34451      fi
34452      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34453    fi
34454  fi
34455
34456  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34457  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34458  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34459  # "foo.exe" is OK but "foo" is an error.
34460  #
34461  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34462  # It is also a way to make sure we got the proper file name for the real test later on.
34463  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34464  if test "x$test_shortpath" = x; then
34465    # Short path failed, file does not exist as specified.
34466    # Try adding .exe or .cmd
34467    if test -f "${new_path}.exe"; then
34468      input_to_shortpath="${new_path}.exe"
34469    elif test -f "${new_path}.cmd"; then
34470      input_to_shortpath="${new_path}.cmd"
34471    else
34472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34473$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34474      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34475$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34476      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34477    fi
34478  else
34479    input_to_shortpath="$new_path"
34480  fi
34481
34482  # Call helper function which possibly converts this using DOS-style short mode.
34483  # If so, the updated path is stored in $new_path.
34484  new_path="$input_to_shortpath"
34485
34486  input_path="$input_to_shortpath"
34487  # Check if we need to convert this using DOS-style short mode. If the path
34488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34489  # take no chances and rewrite it.
34490  # Note: m4 eats our [], so we need to use [ and ] instead.
34491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34492  if test "x$has_forbidden_chars" != x; then
34493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34494    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34495    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34496    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34497      # Going to short mode and back again did indeed matter. Since short mode is
34498      # case insensitive, let's make it lowercase to improve readability.
34499      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34500      # Now convert it back to Unix-stile (cygpath)
34501      input_path=`$CYGPATH -u "$shortmode_path"`
34502      new_path="$input_path"
34503    fi
34504  fi
34505
34506  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34507  if test "x$test_cygdrive_prefix" = x; then
34508    # As a simple fix, exclude /usr/bin since it's not a real path.
34509    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34510      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34511      # a path prefixed by /cygdrive for fixpath to work.
34512      new_path="$CYGWIN_ROOT_PATH$input_path"
34513    fi
34514  fi
34515
34516  # remove trailing .exe if any
34517  new_path="${new_path/%.exe/}"
34518
34519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34520
34521  # First separate the path from the arguments. This will split at the first
34522  # space.
34523  complete="$RC"
34524  path="${complete%% *}"
34525  tmp="$complete EOL"
34526  arguments="${tmp#* }"
34527
34528  # Input might be given as Windows format, start by converting to
34529  # unix format.
34530  new_path="$path"
34531
34532  windows_path="$new_path"
34533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34534    unix_path=`$CYGPATH -u "$windows_path"`
34535    new_path="$unix_path"
34536  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34537    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34538    new_path="$unix_path"
34539  fi
34540
34541
34542  # Now try to locate executable using which
34543  new_path=`$WHICH "$new_path" 2> /dev/null`
34544
34545  if test "x$new_path" = x; then
34546    # Oops. Which didn't find the executable.
34547    # The splitting of arguments from the executable at a space might have been incorrect,
34548    # since paths with space are more likely in Windows. Give it another try with the whole
34549    # argument.
34550    path="$complete"
34551    arguments="EOL"
34552    new_path="$path"
34553
34554  windows_path="$new_path"
34555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34556    unix_path=`$CYGPATH -u "$windows_path"`
34557    new_path="$unix_path"
34558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34560    new_path="$unix_path"
34561  fi
34562
34563
34564    new_path=`$WHICH "$new_path" 2> /dev/null`
34565    # bat and cmd files are not always considered executable in MSYS causing which
34566    # to not find them
34567    if test "x$new_path" = x \
34568        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34569        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34570      new_path="$path"
34571
34572  windows_path="$new_path"
34573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34574    unix_path=`$CYGPATH -u "$windows_path"`
34575    new_path="$unix_path"
34576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34578    new_path="$unix_path"
34579  fi
34580
34581    fi
34582
34583    if test "x$new_path" = x; then
34584      # It's still not found. Now this is an unrecoverable error.
34585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34586$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34587      has_space=`$ECHO "$complete" | $GREP " "`
34588      if test "x$has_space" != x; then
34589        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34590$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34591      fi
34592      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34593    fi
34594  fi
34595
34596  # Now new_path has a complete unix path to the binary
34597  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34598    # Keep paths in /bin as-is, but remove trailing .exe if any
34599    new_path="${new_path/%.exe/}"
34600    # Do not save /bin paths to all_fixpath_prefixes!
34601  else
34602    # Not in mixed or Windows style, start by that.
34603    new_path=`cmd //c echo $new_path`
34604
34605  input_path="$new_path"
34606  # Check if we need to convert this using DOS-style short mode. If the path
34607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34608  # take no chances and rewrite it.
34609  # Note: m4 eats our [], so we need to use [ and ] instead.
34610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34611  if test "x$has_forbidden_chars" != x; then
34612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34614  fi
34615
34616    # Output is in $new_path
34617
34618  windows_path="$new_path"
34619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34620    unix_path=`$CYGPATH -u "$windows_path"`
34621    new_path="$unix_path"
34622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34624    new_path="$unix_path"
34625  fi
34626
34627    # remove trailing .exe if any
34628    new_path="${new_path/%.exe/}"
34629
34630    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34631    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34632  fi
34633
34634  else
34635    # We're on a unix platform. Hooray! :)
34636    # First separate the path from the arguments. This will split at the first
34637    # space.
34638    complete="$RC"
34639    path="${complete%% *}"
34640    tmp="$complete EOL"
34641    arguments="${tmp#* }"
34642
34643    # Cannot rely on the command "which" here since it doesn't always work.
34644    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34645    if test -z "$is_absolute_path"; then
34646      # Path to executable is not absolute. Find it.
34647      IFS_save="$IFS"
34648      IFS=:
34649      for p in $PATH; do
34650        if test -f "$p/$path" && test -x "$p/$path"; then
34651          new_path="$p/$path"
34652          break
34653        fi
34654      done
34655      IFS="$IFS_save"
34656    else
34657      # This is an absolute path, we can use it without further modifications.
34658      new_path="$path"
34659    fi
34660
34661    if test "x$new_path" = x; then
34662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34663$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34664      has_space=`$ECHO "$complete" | $GREP " "`
34665      if test "x$has_space" != x; then
34666        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34667$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34668      fi
34669      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34670    fi
34671  fi
34672
34673  # Now join together the path and the arguments once again
34674  if test "x$arguments" != xEOL; then
34675    new_complete="$new_path ${arguments% *}"
34676  else
34677    new_complete="$new_path"
34678  fi
34679
34680  if test "x$complete" != "x$new_complete"; then
34681    RC="$new_complete"
34682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34683$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34684  fi
34685
34686    # Extract the first word of "dumpbin", so it can be a program name with args.
34687set dummy dumpbin; ac_word=$2
34688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34689$as_echo_n "checking for $ac_word... " >&6; }
34690if ${ac_cv_prog_DUMPBIN+:} false; then :
34691  $as_echo_n "(cached) " >&6
34692else
34693  if test -n "$DUMPBIN"; then
34694  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34695else
34696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34697for as_dir in $PATH
34698do
34699  IFS=$as_save_IFS
34700  test -z "$as_dir" && as_dir=.
34701    for ac_exec_ext in '' $ac_executable_extensions; do
34702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34703    ac_cv_prog_DUMPBIN="dumpbin"
34704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34705    break 2
34706  fi
34707done
34708  done
34709IFS=$as_save_IFS
34710
34711fi
34712fi
34713DUMPBIN=$ac_cv_prog_DUMPBIN
34714if test -n "$DUMPBIN"; then
34715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34716$as_echo "$DUMPBIN" >&6; }
34717else
34718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34719$as_echo "no" >&6; }
34720fi
34721
34722
34723
34724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34725
34726  # First separate the path from the arguments. This will split at the first
34727  # space.
34728  complete="$DUMPBIN"
34729  path="${complete%% *}"
34730  tmp="$complete EOL"
34731  arguments="${tmp#* }"
34732
34733  # Input might be given as Windows format, start by converting to
34734  # unix format.
34735  new_path=`$CYGPATH -u "$path"`
34736
34737  # Now try to locate executable using which
34738  new_path=`$WHICH "$new_path" 2> /dev/null`
34739  # bat and cmd files are not always considered executable in cygwin causing which
34740  # to not find them
34741  if test "x$new_path" = x \
34742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34744    new_path=`$CYGPATH -u "$path"`
34745  fi
34746  if test "x$new_path" = x; then
34747    # Oops. Which didn't find the executable.
34748    # The splitting of arguments from the executable at a space might have been incorrect,
34749    # since paths with space are more likely in Windows. Give it another try with the whole
34750    # argument.
34751    path="$complete"
34752    arguments="EOL"
34753    new_path=`$CYGPATH -u "$path"`
34754    new_path=`$WHICH "$new_path" 2> /dev/null`
34755    # bat and cmd files are not always considered executable in cygwin causing which
34756    # to not find them
34757    if test "x$new_path" = x \
34758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34760      new_path=`$CYGPATH -u "$path"`
34761    fi
34762    if test "x$new_path" = x; then
34763      # It's still not found. Now this is an unrecoverable error.
34764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34765$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34766      has_space=`$ECHO "$complete" | $GREP " "`
34767      if test "x$has_space" != x; then
34768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34770      fi
34771      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34772    fi
34773  fi
34774
34775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34778  # "foo.exe" is OK but "foo" is an error.
34779  #
34780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34781  # It is also a way to make sure we got the proper file name for the real test later on.
34782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34783  if test "x$test_shortpath" = x; then
34784    # Short path failed, file does not exist as specified.
34785    # Try adding .exe or .cmd
34786    if test -f "${new_path}.exe"; then
34787      input_to_shortpath="${new_path}.exe"
34788    elif test -f "${new_path}.cmd"; then
34789      input_to_shortpath="${new_path}.cmd"
34790    else
34791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34792$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34795      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34796    fi
34797  else
34798    input_to_shortpath="$new_path"
34799  fi
34800
34801  # Call helper function which possibly converts this using DOS-style short mode.
34802  # If so, the updated path is stored in $new_path.
34803  new_path="$input_to_shortpath"
34804
34805  input_path="$input_to_shortpath"
34806  # Check if we need to convert this using DOS-style short mode. If the path
34807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34808  # take no chances and rewrite it.
34809  # Note: m4 eats our [], so we need to use [ and ] instead.
34810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34811  if test "x$has_forbidden_chars" != x; then
34812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34816      # Going to short mode and back again did indeed matter. Since short mode is
34817      # case insensitive, let's make it lowercase to improve readability.
34818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34819      # Now convert it back to Unix-stile (cygpath)
34820      input_path=`$CYGPATH -u "$shortmode_path"`
34821      new_path="$input_path"
34822    fi
34823  fi
34824
34825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34826  if test "x$test_cygdrive_prefix" = x; then
34827    # As a simple fix, exclude /usr/bin since it's not a real path.
34828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34830      # a path prefixed by /cygdrive for fixpath to work.
34831      new_path="$CYGWIN_ROOT_PATH$input_path"
34832    fi
34833  fi
34834
34835  # remove trailing .exe if any
34836  new_path="${new_path/%.exe/}"
34837
34838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34839
34840  # First separate the path from the arguments. This will split at the first
34841  # space.
34842  complete="$DUMPBIN"
34843  path="${complete%% *}"
34844  tmp="$complete EOL"
34845  arguments="${tmp#* }"
34846
34847  # Input might be given as Windows format, start by converting to
34848  # unix format.
34849  new_path="$path"
34850
34851  windows_path="$new_path"
34852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34853    unix_path=`$CYGPATH -u "$windows_path"`
34854    new_path="$unix_path"
34855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34857    new_path="$unix_path"
34858  fi
34859
34860
34861  # Now try to locate executable using which
34862  new_path=`$WHICH "$new_path" 2> /dev/null`
34863
34864  if test "x$new_path" = x; then
34865    # Oops. Which didn't find the executable.
34866    # The splitting of arguments from the executable at a space might have been incorrect,
34867    # since paths with space are more likely in Windows. Give it another try with the whole
34868    # argument.
34869    path="$complete"
34870    arguments="EOL"
34871    new_path="$path"
34872
34873  windows_path="$new_path"
34874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34875    unix_path=`$CYGPATH -u "$windows_path"`
34876    new_path="$unix_path"
34877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34879    new_path="$unix_path"
34880  fi
34881
34882
34883    new_path=`$WHICH "$new_path" 2> /dev/null`
34884    # bat and cmd files are not always considered executable in MSYS causing which
34885    # to not find them
34886    if test "x$new_path" = x \
34887        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34888        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34889      new_path="$path"
34890
34891  windows_path="$new_path"
34892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34893    unix_path=`$CYGPATH -u "$windows_path"`
34894    new_path="$unix_path"
34895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34897    new_path="$unix_path"
34898  fi
34899
34900    fi
34901
34902    if test "x$new_path" = x; then
34903      # It's still not found. Now this is an unrecoverable error.
34904      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34905$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34906      has_space=`$ECHO "$complete" | $GREP " "`
34907      if test "x$has_space" != x; then
34908        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34909$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34910      fi
34911      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34912    fi
34913  fi
34914
34915  # Now new_path has a complete unix path to the binary
34916  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34917    # Keep paths in /bin as-is, but remove trailing .exe if any
34918    new_path="${new_path/%.exe/}"
34919    # Do not save /bin paths to all_fixpath_prefixes!
34920  else
34921    # Not in mixed or Windows style, start by that.
34922    new_path=`cmd //c echo $new_path`
34923
34924  input_path="$new_path"
34925  # Check if we need to convert this using DOS-style short mode. If the path
34926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34927  # take no chances and rewrite it.
34928  # Note: m4 eats our [], so we need to use [ and ] instead.
34929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34930  if test "x$has_forbidden_chars" != x; then
34931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34933  fi
34934
34935    # Output is in $new_path
34936
34937  windows_path="$new_path"
34938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34939    unix_path=`$CYGPATH -u "$windows_path"`
34940    new_path="$unix_path"
34941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34943    new_path="$unix_path"
34944  fi
34945
34946    # remove trailing .exe if any
34947    new_path="${new_path/%.exe/}"
34948
34949    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34950    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34951  fi
34952
34953  else
34954    # We're on a unix platform. Hooray! :)
34955    # First separate the path from the arguments. This will split at the first
34956    # space.
34957    complete="$DUMPBIN"
34958    path="${complete%% *}"
34959    tmp="$complete EOL"
34960    arguments="${tmp#* }"
34961
34962    # Cannot rely on the command "which" here since it doesn't always work.
34963    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34964    if test -z "$is_absolute_path"; then
34965      # Path to executable is not absolute. Find it.
34966      IFS_save="$IFS"
34967      IFS=:
34968      for p in $PATH; do
34969        if test -f "$p/$path" && test -x "$p/$path"; then
34970          new_path="$p/$path"
34971          break
34972        fi
34973      done
34974      IFS="$IFS_save"
34975    else
34976      # This is an absolute path, we can use it without further modifications.
34977      new_path="$path"
34978    fi
34979
34980    if test "x$new_path" = x; then
34981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34982$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34983      has_space=`$ECHO "$complete" | $GREP " "`
34984      if test "x$has_space" != x; then
34985        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34986$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34987      fi
34988      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34989    fi
34990  fi
34991
34992  # Now join together the path and the arguments once again
34993  if test "x$arguments" != xEOL; then
34994    new_complete="$new_path ${arguments% *}"
34995  else
34996    new_complete="$new_path"
34997  fi
34998
34999  if test "x$complete" != "x$new_complete"; then
35000    DUMPBIN="$new_complete"
35001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35002$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35003  fi
35004
35005    # We need to check for 'msbuild.exe' because at the place where we expect to
35006    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35007    # won't find the 'msbuild.exe' executable in that case (and the
35008    # 'ac_executable_extensions' is unusable due to performance reasons).
35009    # Notice that we intentionally don't fix up the path to MSBUILD because we
35010    # will call it in a DOS shell during freetype detection on Windows (see
35011    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35012    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35013set dummy msbuild.exe; ac_word=$2
35014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35015$as_echo_n "checking for $ac_word... " >&6; }
35016if ${ac_cv_prog_MSBUILD+:} false; then :
35017  $as_echo_n "(cached) " >&6
35018else
35019  if test -n "$MSBUILD"; then
35020  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35021else
35022as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35023for as_dir in $PATH
35024do
35025  IFS=$as_save_IFS
35026  test -z "$as_dir" && as_dir=.
35027    for ac_exec_ext in '' $ac_executable_extensions; do
35028  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35029    ac_cv_prog_MSBUILD="msbuild.exe"
35030    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35031    break 2
35032  fi
35033done
35034  done
35035IFS=$as_save_IFS
35036
35037fi
35038fi
35039MSBUILD=$ac_cv_prog_MSBUILD
35040if test -n "$MSBUILD"; then
35041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35042$as_echo "$MSBUILD" >&6; }
35043else
35044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35045$as_echo "no" >&6; }
35046fi
35047
35048
35049  fi
35050
35051  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35052
35053
35054  # Publish this variable in the help.
35055
35056
35057  if test "x$STRIP" = x; then
35058    # The variable is not set by user, try to locate tool using the code snippet
35059    for ac_prog in strip
35060do
35061  # Extract the first word of "$ac_prog", so it can be a program name with args.
35062set dummy $ac_prog; ac_word=$2
35063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35064$as_echo_n "checking for $ac_word... " >&6; }
35065if ${ac_cv_path_STRIP+:} false; then :
35066  $as_echo_n "(cached) " >&6
35067else
35068  case $STRIP in
35069  [\\/]* | ?:[\\/]*)
35070  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35071  ;;
35072  *)
35073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35074for as_dir in $PATH
35075do
35076  IFS=$as_save_IFS
35077  test -z "$as_dir" && as_dir=.
35078    for ac_exec_ext in '' $ac_executable_extensions; do
35079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35080    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35082    break 2
35083  fi
35084done
35085  done
35086IFS=$as_save_IFS
35087
35088  ;;
35089esac
35090fi
35091STRIP=$ac_cv_path_STRIP
35092if test -n "$STRIP"; then
35093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35094$as_echo "$STRIP" >&6; }
35095else
35096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35097$as_echo "no" >&6; }
35098fi
35099
35100
35101  test -n "$STRIP" && break
35102done
35103
35104  else
35105    # The variable is set, but is it from the command line or the environment?
35106
35107    # Try to remove the string !STRIP! from our list.
35108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35110      # If it failed, the variable was not from the command line. Ignore it,
35111      # but warn the user (except for BASH, which is always set by the calling BASH).
35112      if test "xSTRIP" != xBASH; then
35113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35114$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35115      fi
35116      # Try to locate tool using the code snippet
35117      for ac_prog in strip
35118do
35119  # Extract the first word of "$ac_prog", so it can be a program name with args.
35120set dummy $ac_prog; ac_word=$2
35121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35122$as_echo_n "checking for $ac_word... " >&6; }
35123if ${ac_cv_path_STRIP+:} false; then :
35124  $as_echo_n "(cached) " >&6
35125else
35126  case $STRIP in
35127  [\\/]* | ?:[\\/]*)
35128  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35129  ;;
35130  *)
35131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35132for as_dir in $PATH
35133do
35134  IFS=$as_save_IFS
35135  test -z "$as_dir" && as_dir=.
35136    for ac_exec_ext in '' $ac_executable_extensions; do
35137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35138    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35140    break 2
35141  fi
35142done
35143  done
35144IFS=$as_save_IFS
35145
35146  ;;
35147esac
35148fi
35149STRIP=$ac_cv_path_STRIP
35150if test -n "$STRIP"; then
35151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35152$as_echo "$STRIP" >&6; }
35153else
35154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35155$as_echo "no" >&6; }
35156fi
35157
35158
35159  test -n "$STRIP" && break
35160done
35161
35162    else
35163      # If it succeeded, then it was overridden by the user. We will use it
35164      # for the tool.
35165
35166      # First remove it from the list of overridden variables, so we can test
35167      # for unknown variables in the end.
35168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35169
35170      # Check if the provided tool contains a complete path.
35171      tool_specified="$STRIP"
35172      tool_basename="${tool_specified##*/}"
35173      if test "x$tool_basename" = "x$tool_specified"; then
35174        # A command without a complete path is provided, search $PATH.
35175        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35176$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35177        # Extract the first word of "$tool_basename", so it can be a program name with args.
35178set dummy $tool_basename; ac_word=$2
35179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35180$as_echo_n "checking for $ac_word... " >&6; }
35181if ${ac_cv_path_STRIP+:} false; then :
35182  $as_echo_n "(cached) " >&6
35183else
35184  case $STRIP in
35185  [\\/]* | ?:[\\/]*)
35186  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35187  ;;
35188  *)
35189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35190for as_dir in $PATH
35191do
35192  IFS=$as_save_IFS
35193  test -z "$as_dir" && as_dir=.
35194    for ac_exec_ext in '' $ac_executable_extensions; do
35195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35196    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35198    break 2
35199  fi
35200done
35201  done
35202IFS=$as_save_IFS
35203
35204  ;;
35205esac
35206fi
35207STRIP=$ac_cv_path_STRIP
35208if test -n "$STRIP"; then
35209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35210$as_echo "$STRIP" >&6; }
35211else
35212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35213$as_echo "no" >&6; }
35214fi
35215
35216
35217        if test "x$STRIP" = x; then
35218          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35219        fi
35220      else
35221        # Otherwise we believe it is a complete path. Use it as it is.
35222        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35223$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35224        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35225$as_echo_n "checking for STRIP... " >&6; }
35226        if test ! -x "$tool_specified"; then
35227          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35228$as_echo "not found" >&6; }
35229          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35230        fi
35231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35232$as_echo "$tool_specified" >&6; }
35233      fi
35234    fi
35235  fi
35236
35237
35238
35239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35240
35241  # First separate the path from the arguments. This will split at the first
35242  # space.
35243  complete="$STRIP"
35244  path="${complete%% *}"
35245  tmp="$complete EOL"
35246  arguments="${tmp#* }"
35247
35248  # Input might be given as Windows format, start by converting to
35249  # unix format.
35250  new_path=`$CYGPATH -u "$path"`
35251
35252  # Now try to locate executable using which
35253  new_path=`$WHICH "$new_path" 2> /dev/null`
35254  # bat and cmd files are not always considered executable in cygwin causing which
35255  # to not find them
35256  if test "x$new_path" = x \
35257      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35258      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35259    new_path=`$CYGPATH -u "$path"`
35260  fi
35261  if test "x$new_path" = x; then
35262    # Oops. Which didn't find the executable.
35263    # The splitting of arguments from the executable at a space might have been incorrect,
35264    # since paths with space are more likely in Windows. Give it another try with the whole
35265    # argument.
35266    path="$complete"
35267    arguments="EOL"
35268    new_path=`$CYGPATH -u "$path"`
35269    new_path=`$WHICH "$new_path" 2> /dev/null`
35270    # bat and cmd files are not always considered executable in cygwin causing which
35271    # to not find them
35272    if test "x$new_path" = x \
35273        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35274        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35275      new_path=`$CYGPATH -u "$path"`
35276    fi
35277    if test "x$new_path" = x; then
35278      # It's still not found. Now this is an unrecoverable error.
35279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35280$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35281      has_space=`$ECHO "$complete" | $GREP " "`
35282      if test "x$has_space" != x; then
35283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35285      fi
35286      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35287    fi
35288  fi
35289
35290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35293  # "foo.exe" is OK but "foo" is an error.
35294  #
35295  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35296  # It is also a way to make sure we got the proper file name for the real test later on.
35297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35298  if test "x$test_shortpath" = x; then
35299    # Short path failed, file does not exist as specified.
35300    # Try adding .exe or .cmd
35301    if test -f "${new_path}.exe"; then
35302      input_to_shortpath="${new_path}.exe"
35303    elif test -f "${new_path}.cmd"; then
35304      input_to_shortpath="${new_path}.cmd"
35305    else
35306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35307$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35308      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35309$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35310      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35311    fi
35312  else
35313    input_to_shortpath="$new_path"
35314  fi
35315
35316  # Call helper function which possibly converts this using DOS-style short mode.
35317  # If so, the updated path is stored in $new_path.
35318  new_path="$input_to_shortpath"
35319
35320  input_path="$input_to_shortpath"
35321  # Check if we need to convert this using DOS-style short mode. If the path
35322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35323  # take no chances and rewrite it.
35324  # Note: m4 eats our [], so we need to use [ and ] instead.
35325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35326  if test "x$has_forbidden_chars" != x; then
35327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35328    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35329    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35330    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35331      # Going to short mode and back again did indeed matter. Since short mode is
35332      # case insensitive, let's make it lowercase to improve readability.
35333      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35334      # Now convert it back to Unix-stile (cygpath)
35335      input_path=`$CYGPATH -u "$shortmode_path"`
35336      new_path="$input_path"
35337    fi
35338  fi
35339
35340  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35341  if test "x$test_cygdrive_prefix" = x; then
35342    # As a simple fix, exclude /usr/bin since it's not a real path.
35343    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35344      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35345      # a path prefixed by /cygdrive for fixpath to work.
35346      new_path="$CYGWIN_ROOT_PATH$input_path"
35347    fi
35348  fi
35349
35350  # remove trailing .exe if any
35351  new_path="${new_path/%.exe/}"
35352
35353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35354
35355  # First separate the path from the arguments. This will split at the first
35356  # space.
35357  complete="$STRIP"
35358  path="${complete%% *}"
35359  tmp="$complete EOL"
35360  arguments="${tmp#* }"
35361
35362  # Input might be given as Windows format, start by converting to
35363  # unix format.
35364  new_path="$path"
35365
35366  windows_path="$new_path"
35367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35368    unix_path=`$CYGPATH -u "$windows_path"`
35369    new_path="$unix_path"
35370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35372    new_path="$unix_path"
35373  fi
35374
35375
35376  # Now try to locate executable using which
35377  new_path=`$WHICH "$new_path" 2> /dev/null`
35378
35379  if test "x$new_path" = x; then
35380    # Oops. Which didn't find the executable.
35381    # The splitting of arguments from the executable at a space might have been incorrect,
35382    # since paths with space are more likely in Windows. Give it another try with the whole
35383    # argument.
35384    path="$complete"
35385    arguments="EOL"
35386    new_path="$path"
35387
35388  windows_path="$new_path"
35389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35390    unix_path=`$CYGPATH -u "$windows_path"`
35391    new_path="$unix_path"
35392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35394    new_path="$unix_path"
35395  fi
35396
35397
35398    new_path=`$WHICH "$new_path" 2> /dev/null`
35399    # bat and cmd files are not always considered executable in MSYS causing which
35400    # to not find them
35401    if test "x$new_path" = x \
35402        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35403        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35404      new_path="$path"
35405
35406  windows_path="$new_path"
35407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35408    unix_path=`$CYGPATH -u "$windows_path"`
35409    new_path="$unix_path"
35410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35412    new_path="$unix_path"
35413  fi
35414
35415    fi
35416
35417    if test "x$new_path" = x; then
35418      # It's still not found. Now this is an unrecoverable error.
35419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35420$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35421      has_space=`$ECHO "$complete" | $GREP " "`
35422      if test "x$has_space" != x; then
35423        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35424$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35425      fi
35426      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35427    fi
35428  fi
35429
35430  # Now new_path has a complete unix path to the binary
35431  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35432    # Keep paths in /bin as-is, but remove trailing .exe if any
35433    new_path="${new_path/%.exe/}"
35434    # Do not save /bin paths to all_fixpath_prefixes!
35435  else
35436    # Not in mixed or Windows style, start by that.
35437    new_path=`cmd //c echo $new_path`
35438
35439  input_path="$new_path"
35440  # Check if we need to convert this using DOS-style short mode. If the path
35441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35442  # take no chances and rewrite it.
35443  # Note: m4 eats our [], so we need to use [ and ] instead.
35444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35445  if test "x$has_forbidden_chars" != x; then
35446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35448  fi
35449
35450    # Output is in $new_path
35451
35452  windows_path="$new_path"
35453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35454    unix_path=`$CYGPATH -u "$windows_path"`
35455    new_path="$unix_path"
35456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35457    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35458    new_path="$unix_path"
35459  fi
35460
35461    # remove trailing .exe if any
35462    new_path="${new_path/%.exe/}"
35463
35464    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35465    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35466  fi
35467
35468  else
35469    # We're on a unix platform. Hooray! :)
35470    # First separate the path from the arguments. This will split at the first
35471    # space.
35472    complete="$STRIP"
35473    path="${complete%% *}"
35474    tmp="$complete EOL"
35475    arguments="${tmp#* }"
35476
35477    # Cannot rely on the command "which" here since it doesn't always work.
35478    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35479    if test -z "$is_absolute_path"; then
35480      # Path to executable is not absolute. Find it.
35481      IFS_save="$IFS"
35482      IFS=:
35483      for p in $PATH; do
35484        if test -f "$p/$path" && test -x "$p/$path"; then
35485          new_path="$p/$path"
35486          break
35487        fi
35488      done
35489      IFS="$IFS_save"
35490    else
35491      # This is an absolute path, we can use it without further modifications.
35492      new_path="$path"
35493    fi
35494
35495    if test "x$new_path" = x; then
35496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35497$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35498      has_space=`$ECHO "$complete" | $GREP " "`
35499      if test "x$has_space" != x; then
35500        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35501$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35502      fi
35503      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35504    fi
35505  fi
35506
35507  # Now join together the path and the arguments once again
35508  if test "x$arguments" != xEOL; then
35509    new_complete="$new_path ${arguments% *}"
35510  else
35511    new_complete="$new_path"
35512  fi
35513
35514  if test "x$complete" != "x$new_complete"; then
35515    STRIP="$new_complete"
35516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35517$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35518  fi
35519
35520
35521
35522  # Publish this variable in the help.
35523
35524
35525  if test "x$NM" = x; then
35526    # The variable is not set by user, try to locate tool using the code snippet
35527    for ac_prog in nm
35528do
35529  # Extract the first word of "$ac_prog", so it can be a program name with args.
35530set dummy $ac_prog; ac_word=$2
35531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35532$as_echo_n "checking for $ac_word... " >&6; }
35533if ${ac_cv_path_NM+:} false; then :
35534  $as_echo_n "(cached) " >&6
35535else
35536  case $NM in
35537  [\\/]* | ?:[\\/]*)
35538  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35539  ;;
35540  *)
35541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35542for as_dir in $PATH
35543do
35544  IFS=$as_save_IFS
35545  test -z "$as_dir" && as_dir=.
35546    for ac_exec_ext in '' $ac_executable_extensions; do
35547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35548    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35550    break 2
35551  fi
35552done
35553  done
35554IFS=$as_save_IFS
35555
35556  ;;
35557esac
35558fi
35559NM=$ac_cv_path_NM
35560if test -n "$NM"; then
35561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35562$as_echo "$NM" >&6; }
35563else
35564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35565$as_echo "no" >&6; }
35566fi
35567
35568
35569  test -n "$NM" && break
35570done
35571
35572  else
35573    # The variable is set, but is it from the command line or the environment?
35574
35575    # Try to remove the string !NM! from our list.
35576    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35577    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35578      # If it failed, the variable was not from the command line. Ignore it,
35579      # but warn the user (except for BASH, which is always set by the calling BASH).
35580      if test "xNM" != xBASH; then
35581        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35582$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35583      fi
35584      # Try to locate tool using the code snippet
35585      for ac_prog in nm
35586do
35587  # Extract the first word of "$ac_prog", so it can be a program name with args.
35588set dummy $ac_prog; ac_word=$2
35589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35590$as_echo_n "checking for $ac_word... " >&6; }
35591if ${ac_cv_path_NM+:} false; then :
35592  $as_echo_n "(cached) " >&6
35593else
35594  case $NM in
35595  [\\/]* | ?:[\\/]*)
35596  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35597  ;;
35598  *)
35599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35600for as_dir in $PATH
35601do
35602  IFS=$as_save_IFS
35603  test -z "$as_dir" && as_dir=.
35604    for ac_exec_ext in '' $ac_executable_extensions; do
35605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35606    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35608    break 2
35609  fi
35610done
35611  done
35612IFS=$as_save_IFS
35613
35614  ;;
35615esac
35616fi
35617NM=$ac_cv_path_NM
35618if test -n "$NM"; then
35619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35620$as_echo "$NM" >&6; }
35621else
35622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35623$as_echo "no" >&6; }
35624fi
35625
35626
35627  test -n "$NM" && break
35628done
35629
35630    else
35631      # If it succeeded, then it was overridden by the user. We will use it
35632      # for the tool.
35633
35634      # First remove it from the list of overridden variables, so we can test
35635      # for unknown variables in the end.
35636      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35637
35638      # Check if the provided tool contains a complete path.
35639      tool_specified="$NM"
35640      tool_basename="${tool_specified##*/}"
35641      if test "x$tool_basename" = "x$tool_specified"; then
35642        # A command without a complete path is provided, search $PATH.
35643        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35644$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35645        # Extract the first word of "$tool_basename", so it can be a program name with args.
35646set dummy $tool_basename; ac_word=$2
35647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35648$as_echo_n "checking for $ac_word... " >&6; }
35649if ${ac_cv_path_NM+:} false; then :
35650  $as_echo_n "(cached) " >&6
35651else
35652  case $NM in
35653  [\\/]* | ?:[\\/]*)
35654  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35655  ;;
35656  *)
35657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35658for as_dir in $PATH
35659do
35660  IFS=$as_save_IFS
35661  test -z "$as_dir" && as_dir=.
35662    for ac_exec_ext in '' $ac_executable_extensions; do
35663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35664    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35666    break 2
35667  fi
35668done
35669  done
35670IFS=$as_save_IFS
35671
35672  ;;
35673esac
35674fi
35675NM=$ac_cv_path_NM
35676if test -n "$NM"; then
35677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35678$as_echo "$NM" >&6; }
35679else
35680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35681$as_echo "no" >&6; }
35682fi
35683
35684
35685        if test "x$NM" = x; then
35686          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35687        fi
35688      else
35689        # Otherwise we believe it is a complete path. Use it as it is.
35690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35691$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35693$as_echo_n "checking for NM... " >&6; }
35694        if test ! -x "$tool_specified"; then
35695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35696$as_echo "not found" >&6; }
35697          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35698        fi
35699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35700$as_echo "$tool_specified" >&6; }
35701      fi
35702    fi
35703  fi
35704
35705
35706
35707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35708
35709  # First separate the path from the arguments. This will split at the first
35710  # space.
35711  complete="$NM"
35712  path="${complete%% *}"
35713  tmp="$complete EOL"
35714  arguments="${tmp#* }"
35715
35716  # Input might be given as Windows format, start by converting to
35717  # unix format.
35718  new_path=`$CYGPATH -u "$path"`
35719
35720  # Now try to locate executable using which
35721  new_path=`$WHICH "$new_path" 2> /dev/null`
35722  # bat and cmd files are not always considered executable in cygwin causing which
35723  # to not find them
35724  if test "x$new_path" = x \
35725      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35726      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35727    new_path=`$CYGPATH -u "$path"`
35728  fi
35729  if test "x$new_path" = x; then
35730    # Oops. Which didn't find the executable.
35731    # The splitting of arguments from the executable at a space might have been incorrect,
35732    # since paths with space are more likely in Windows. Give it another try with the whole
35733    # argument.
35734    path="$complete"
35735    arguments="EOL"
35736    new_path=`$CYGPATH -u "$path"`
35737    new_path=`$WHICH "$new_path" 2> /dev/null`
35738    # bat and cmd files are not always considered executable in cygwin causing which
35739    # to not find them
35740    if test "x$new_path" = x \
35741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35743      new_path=`$CYGPATH -u "$path"`
35744    fi
35745    if test "x$new_path" = x; then
35746      # It's still not found. Now this is an unrecoverable error.
35747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35748$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35749      has_space=`$ECHO "$complete" | $GREP " "`
35750      if test "x$has_space" != x; then
35751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35753      fi
35754      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35755    fi
35756  fi
35757
35758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35761  # "foo.exe" is OK but "foo" is an error.
35762  #
35763  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35764  # It is also a way to make sure we got the proper file name for the real test later on.
35765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35766  if test "x$test_shortpath" = x; then
35767    # Short path failed, file does not exist as specified.
35768    # Try adding .exe or .cmd
35769    if test -f "${new_path}.exe"; then
35770      input_to_shortpath="${new_path}.exe"
35771    elif test -f "${new_path}.cmd"; then
35772      input_to_shortpath="${new_path}.cmd"
35773    else
35774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35775$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35778      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35779    fi
35780  else
35781    input_to_shortpath="$new_path"
35782  fi
35783
35784  # Call helper function which possibly converts this using DOS-style short mode.
35785  # If so, the updated path is stored in $new_path.
35786  new_path="$input_to_shortpath"
35787
35788  input_path="$input_to_shortpath"
35789  # Check if we need to convert this using DOS-style short mode. If the path
35790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35791  # take no chances and rewrite it.
35792  # Note: m4 eats our [], so we need to use [ and ] instead.
35793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35794  if test "x$has_forbidden_chars" != x; then
35795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35799      # Going to short mode and back again did indeed matter. Since short mode is
35800      # case insensitive, let's make it lowercase to improve readability.
35801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35802      # Now convert it back to Unix-stile (cygpath)
35803      input_path=`$CYGPATH -u "$shortmode_path"`
35804      new_path="$input_path"
35805    fi
35806  fi
35807
35808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35809  if test "x$test_cygdrive_prefix" = x; then
35810    # As a simple fix, exclude /usr/bin since it's not a real path.
35811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35813      # a path prefixed by /cygdrive for fixpath to work.
35814      new_path="$CYGWIN_ROOT_PATH$input_path"
35815    fi
35816  fi
35817
35818  # remove trailing .exe if any
35819  new_path="${new_path/%.exe/}"
35820
35821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35822
35823  # First separate the path from the arguments. This will split at the first
35824  # space.
35825  complete="$NM"
35826  path="${complete%% *}"
35827  tmp="$complete EOL"
35828  arguments="${tmp#* }"
35829
35830  # Input might be given as Windows format, start by converting to
35831  # unix format.
35832  new_path="$path"
35833
35834  windows_path="$new_path"
35835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35836    unix_path=`$CYGPATH -u "$windows_path"`
35837    new_path="$unix_path"
35838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35840    new_path="$unix_path"
35841  fi
35842
35843
35844  # Now try to locate executable using which
35845  new_path=`$WHICH "$new_path" 2> /dev/null`
35846
35847  if test "x$new_path" = x; then
35848    # Oops. Which didn't find the executable.
35849    # The splitting of arguments from the executable at a space might have been incorrect,
35850    # since paths with space are more likely in Windows. Give it another try with the whole
35851    # argument.
35852    path="$complete"
35853    arguments="EOL"
35854    new_path="$path"
35855
35856  windows_path="$new_path"
35857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35858    unix_path=`$CYGPATH -u "$windows_path"`
35859    new_path="$unix_path"
35860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35862    new_path="$unix_path"
35863  fi
35864
35865
35866    new_path=`$WHICH "$new_path" 2> /dev/null`
35867    # bat and cmd files are not always considered executable in MSYS causing which
35868    # to not find them
35869    if test "x$new_path" = x \
35870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35872      new_path="$path"
35873
35874  windows_path="$new_path"
35875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35876    unix_path=`$CYGPATH -u "$windows_path"`
35877    new_path="$unix_path"
35878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35880    new_path="$unix_path"
35881  fi
35882
35883    fi
35884
35885    if test "x$new_path" = x; then
35886      # It's still not found. Now this is an unrecoverable error.
35887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35888$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35889      has_space=`$ECHO "$complete" | $GREP " "`
35890      if test "x$has_space" != x; then
35891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35893      fi
35894      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35895    fi
35896  fi
35897
35898  # Now new_path has a complete unix path to the binary
35899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35900    # Keep paths in /bin as-is, but remove trailing .exe if any
35901    new_path="${new_path/%.exe/}"
35902    # Do not save /bin paths to all_fixpath_prefixes!
35903  else
35904    # Not in mixed or Windows style, start by that.
35905    new_path=`cmd //c echo $new_path`
35906
35907  input_path="$new_path"
35908  # Check if we need to convert this using DOS-style short mode. If the path
35909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35910  # take no chances and rewrite it.
35911  # Note: m4 eats our [], so we need to use [ and ] instead.
35912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35913  if test "x$has_forbidden_chars" != x; then
35914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35916  fi
35917
35918    # Output is in $new_path
35919
35920  windows_path="$new_path"
35921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35922    unix_path=`$CYGPATH -u "$windows_path"`
35923    new_path="$unix_path"
35924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35926    new_path="$unix_path"
35927  fi
35928
35929    # remove trailing .exe if any
35930    new_path="${new_path/%.exe/}"
35931
35932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35934  fi
35935
35936  else
35937    # We're on a unix platform. Hooray! :)
35938    # First separate the path from the arguments. This will split at the first
35939    # space.
35940    complete="$NM"
35941    path="${complete%% *}"
35942    tmp="$complete EOL"
35943    arguments="${tmp#* }"
35944
35945    # Cannot rely on the command "which" here since it doesn't always work.
35946    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35947    if test -z "$is_absolute_path"; then
35948      # Path to executable is not absolute. Find it.
35949      IFS_save="$IFS"
35950      IFS=:
35951      for p in $PATH; do
35952        if test -f "$p/$path" && test -x "$p/$path"; then
35953          new_path="$p/$path"
35954          break
35955        fi
35956      done
35957      IFS="$IFS_save"
35958    else
35959      # This is an absolute path, we can use it without further modifications.
35960      new_path="$path"
35961    fi
35962
35963    if test "x$new_path" = x; then
35964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35965$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35966      has_space=`$ECHO "$complete" | $GREP " "`
35967      if test "x$has_space" != x; then
35968        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35969$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35970      fi
35971      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35972    fi
35973  fi
35974
35975  # Now join together the path and the arguments once again
35976  if test "x$arguments" != xEOL; then
35977    new_complete="$new_path ${arguments% *}"
35978  else
35979    new_complete="$new_path"
35980  fi
35981
35982  if test "x$complete" != "x$new_complete"; then
35983    NM="$new_complete"
35984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35985$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35986  fi
35987
35988
35989
35990  # Publish this variable in the help.
35991
35992
35993  if test "x$GNM" = x; then
35994    # The variable is not set by user, try to locate tool using the code snippet
35995    for ac_prog in gnm
35996do
35997  # Extract the first word of "$ac_prog", so it can be a program name with args.
35998set dummy $ac_prog; ac_word=$2
35999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36000$as_echo_n "checking for $ac_word... " >&6; }
36001if ${ac_cv_path_GNM+:} false; then :
36002  $as_echo_n "(cached) " >&6
36003else
36004  case $GNM in
36005  [\\/]* | ?:[\\/]*)
36006  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36007  ;;
36008  *)
36009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36010for as_dir in $PATH
36011do
36012  IFS=$as_save_IFS
36013  test -z "$as_dir" && as_dir=.
36014    for ac_exec_ext in '' $ac_executable_extensions; do
36015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36016    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36018    break 2
36019  fi
36020done
36021  done
36022IFS=$as_save_IFS
36023
36024  ;;
36025esac
36026fi
36027GNM=$ac_cv_path_GNM
36028if test -n "$GNM"; then
36029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36030$as_echo "$GNM" >&6; }
36031else
36032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36033$as_echo "no" >&6; }
36034fi
36035
36036
36037  test -n "$GNM" && break
36038done
36039
36040  else
36041    # The variable is set, but is it from the command line or the environment?
36042
36043    # Try to remove the string !GNM! from our list.
36044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36046      # If it failed, the variable was not from the command line. Ignore it,
36047      # but warn the user (except for BASH, which is always set by the calling BASH).
36048      if test "xGNM" != xBASH; then
36049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36050$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36051      fi
36052      # Try to locate tool using the code snippet
36053      for ac_prog in gnm
36054do
36055  # Extract the first word of "$ac_prog", so it can be a program name with args.
36056set dummy $ac_prog; ac_word=$2
36057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36058$as_echo_n "checking for $ac_word... " >&6; }
36059if ${ac_cv_path_GNM+:} false; then :
36060  $as_echo_n "(cached) " >&6
36061else
36062  case $GNM in
36063  [\\/]* | ?:[\\/]*)
36064  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36065  ;;
36066  *)
36067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36068for as_dir in $PATH
36069do
36070  IFS=$as_save_IFS
36071  test -z "$as_dir" && as_dir=.
36072    for ac_exec_ext in '' $ac_executable_extensions; do
36073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36074    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36076    break 2
36077  fi
36078done
36079  done
36080IFS=$as_save_IFS
36081
36082  ;;
36083esac
36084fi
36085GNM=$ac_cv_path_GNM
36086if test -n "$GNM"; then
36087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36088$as_echo "$GNM" >&6; }
36089else
36090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36091$as_echo "no" >&6; }
36092fi
36093
36094
36095  test -n "$GNM" && break
36096done
36097
36098    else
36099      # If it succeeded, then it was overridden by the user. We will use it
36100      # for the tool.
36101
36102      # First remove it from the list of overridden variables, so we can test
36103      # for unknown variables in the end.
36104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36105
36106      # Check if the provided tool contains a complete path.
36107      tool_specified="$GNM"
36108      tool_basename="${tool_specified##*/}"
36109      if test "x$tool_basename" = "x$tool_specified"; then
36110        # A command without a complete path is provided, search $PATH.
36111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36112$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36113        # Extract the first word of "$tool_basename", so it can be a program name with args.
36114set dummy $tool_basename; ac_word=$2
36115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36116$as_echo_n "checking for $ac_word... " >&6; }
36117if ${ac_cv_path_GNM+:} false; then :
36118  $as_echo_n "(cached) " >&6
36119else
36120  case $GNM in
36121  [\\/]* | ?:[\\/]*)
36122  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36123  ;;
36124  *)
36125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36126for as_dir in $PATH
36127do
36128  IFS=$as_save_IFS
36129  test -z "$as_dir" && as_dir=.
36130    for ac_exec_ext in '' $ac_executable_extensions; do
36131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36132    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36134    break 2
36135  fi
36136done
36137  done
36138IFS=$as_save_IFS
36139
36140  ;;
36141esac
36142fi
36143GNM=$ac_cv_path_GNM
36144if test -n "$GNM"; then
36145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36146$as_echo "$GNM" >&6; }
36147else
36148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36149$as_echo "no" >&6; }
36150fi
36151
36152
36153        if test "x$GNM" = x; then
36154          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36155        fi
36156      else
36157        # Otherwise we believe it is a complete path. Use it as it is.
36158        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36159$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36160        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36161$as_echo_n "checking for GNM... " >&6; }
36162        if test ! -x "$tool_specified"; then
36163          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36164$as_echo "not found" >&6; }
36165          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36166        fi
36167        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36168$as_echo "$tool_specified" >&6; }
36169      fi
36170    fi
36171  fi
36172
36173
36174
36175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36176
36177  # First separate the path from the arguments. This will split at the first
36178  # space.
36179  complete="$GNM"
36180  path="${complete%% *}"
36181  tmp="$complete EOL"
36182  arguments="${tmp#* }"
36183
36184  # Input might be given as Windows format, start by converting to
36185  # unix format.
36186  new_path=`$CYGPATH -u "$path"`
36187
36188  # Now try to locate executable using which
36189  new_path=`$WHICH "$new_path" 2> /dev/null`
36190  # bat and cmd files are not always considered executable in cygwin causing which
36191  # to not find them
36192  if test "x$new_path" = x \
36193      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36194      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36195    new_path=`$CYGPATH -u "$path"`
36196  fi
36197  if test "x$new_path" = x; then
36198    # Oops. Which didn't find the executable.
36199    # The splitting of arguments from the executable at a space might have been incorrect,
36200    # since paths with space are more likely in Windows. Give it another try with the whole
36201    # argument.
36202    path="$complete"
36203    arguments="EOL"
36204    new_path=`$CYGPATH -u "$path"`
36205    new_path=`$WHICH "$new_path" 2> /dev/null`
36206    # bat and cmd files are not always considered executable in cygwin causing which
36207    # to not find them
36208    if test "x$new_path" = x \
36209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36211      new_path=`$CYGPATH -u "$path"`
36212    fi
36213    if test "x$new_path" = x; then
36214      # It's still not found. Now this is an unrecoverable error.
36215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36216$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36217      has_space=`$ECHO "$complete" | $GREP " "`
36218      if test "x$has_space" != x; then
36219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36221      fi
36222      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36223    fi
36224  fi
36225
36226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36229  # "foo.exe" is OK but "foo" is an error.
36230  #
36231  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36232  # It is also a way to make sure we got the proper file name for the real test later on.
36233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36234  if test "x$test_shortpath" = x; then
36235    # Short path failed, file does not exist as specified.
36236    # Try adding .exe or .cmd
36237    if test -f "${new_path}.exe"; then
36238      input_to_shortpath="${new_path}.exe"
36239    elif test -f "${new_path}.cmd"; then
36240      input_to_shortpath="${new_path}.cmd"
36241    else
36242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36243$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36246      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36247    fi
36248  else
36249    input_to_shortpath="$new_path"
36250  fi
36251
36252  # Call helper function which possibly converts this using DOS-style short mode.
36253  # If so, the updated path is stored in $new_path.
36254  new_path="$input_to_shortpath"
36255
36256  input_path="$input_to_shortpath"
36257  # Check if we need to convert this using DOS-style short mode. If the path
36258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36259  # take no chances and rewrite it.
36260  # Note: m4 eats our [], so we need to use [ and ] instead.
36261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36262  if test "x$has_forbidden_chars" != x; then
36263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36267      # Going to short mode and back again did indeed matter. Since short mode is
36268      # case insensitive, let's make it lowercase to improve readability.
36269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36270      # Now convert it back to Unix-stile (cygpath)
36271      input_path=`$CYGPATH -u "$shortmode_path"`
36272      new_path="$input_path"
36273    fi
36274  fi
36275
36276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36277  if test "x$test_cygdrive_prefix" = x; then
36278    # As a simple fix, exclude /usr/bin since it's not a real path.
36279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36281      # a path prefixed by /cygdrive for fixpath to work.
36282      new_path="$CYGWIN_ROOT_PATH$input_path"
36283    fi
36284  fi
36285
36286  # remove trailing .exe if any
36287  new_path="${new_path/%.exe/}"
36288
36289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36290
36291  # First separate the path from the arguments. This will split at the first
36292  # space.
36293  complete="$GNM"
36294  path="${complete%% *}"
36295  tmp="$complete EOL"
36296  arguments="${tmp#* }"
36297
36298  # Input might be given as Windows format, start by converting to
36299  # unix format.
36300  new_path="$path"
36301
36302  windows_path="$new_path"
36303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36304    unix_path=`$CYGPATH -u "$windows_path"`
36305    new_path="$unix_path"
36306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36308    new_path="$unix_path"
36309  fi
36310
36311
36312  # Now try to locate executable using which
36313  new_path=`$WHICH "$new_path" 2> /dev/null`
36314
36315  if test "x$new_path" = x; then
36316    # Oops. Which didn't find the executable.
36317    # The splitting of arguments from the executable at a space might have been incorrect,
36318    # since paths with space are more likely in Windows. Give it another try with the whole
36319    # argument.
36320    path="$complete"
36321    arguments="EOL"
36322    new_path="$path"
36323
36324  windows_path="$new_path"
36325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36326    unix_path=`$CYGPATH -u "$windows_path"`
36327    new_path="$unix_path"
36328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36330    new_path="$unix_path"
36331  fi
36332
36333
36334    new_path=`$WHICH "$new_path" 2> /dev/null`
36335    # bat and cmd files are not always considered executable in MSYS causing which
36336    # to not find them
36337    if test "x$new_path" = x \
36338        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36339        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36340      new_path="$path"
36341
36342  windows_path="$new_path"
36343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36344    unix_path=`$CYGPATH -u "$windows_path"`
36345    new_path="$unix_path"
36346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36348    new_path="$unix_path"
36349  fi
36350
36351    fi
36352
36353    if test "x$new_path" = x; then
36354      # It's still not found. Now this is an unrecoverable error.
36355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36356$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36357      has_space=`$ECHO "$complete" | $GREP " "`
36358      if test "x$has_space" != x; then
36359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36361      fi
36362      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36363    fi
36364  fi
36365
36366  # Now new_path has a complete unix path to the binary
36367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36368    # Keep paths in /bin as-is, but remove trailing .exe if any
36369    new_path="${new_path/%.exe/}"
36370    # Do not save /bin paths to all_fixpath_prefixes!
36371  else
36372    # Not in mixed or Windows style, start by that.
36373    new_path=`cmd //c echo $new_path`
36374
36375  input_path="$new_path"
36376  # Check if we need to convert this using DOS-style short mode. If the path
36377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36378  # take no chances and rewrite it.
36379  # Note: m4 eats our [], so we need to use [ and ] instead.
36380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36381  if test "x$has_forbidden_chars" != x; then
36382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36384  fi
36385
36386    # Output is in $new_path
36387
36388  windows_path="$new_path"
36389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36390    unix_path=`$CYGPATH -u "$windows_path"`
36391    new_path="$unix_path"
36392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36394    new_path="$unix_path"
36395  fi
36396
36397    # remove trailing .exe if any
36398    new_path="${new_path/%.exe/}"
36399
36400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36402  fi
36403
36404  else
36405    # We're on a unix platform. Hooray! :)
36406    # First separate the path from the arguments. This will split at the first
36407    # space.
36408    complete="$GNM"
36409    path="${complete%% *}"
36410    tmp="$complete EOL"
36411    arguments="${tmp#* }"
36412
36413    # Cannot rely on the command "which" here since it doesn't always work.
36414    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36415    if test -z "$is_absolute_path"; then
36416      # Path to executable is not absolute. Find it.
36417      IFS_save="$IFS"
36418      IFS=:
36419      for p in $PATH; do
36420        if test -f "$p/$path" && test -x "$p/$path"; then
36421          new_path="$p/$path"
36422          break
36423        fi
36424      done
36425      IFS="$IFS_save"
36426    else
36427      # This is an absolute path, we can use it without further modifications.
36428      new_path="$path"
36429    fi
36430
36431    if test "x$new_path" = x; then
36432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36433$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36434      has_space=`$ECHO "$complete" | $GREP " "`
36435      if test "x$has_space" != x; then
36436        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36437$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36438      fi
36439      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36440    fi
36441  fi
36442
36443  # Now join together the path and the arguments once again
36444  if test "x$arguments" != xEOL; then
36445    new_complete="$new_path ${arguments% *}"
36446  else
36447    new_complete="$new_path"
36448  fi
36449
36450  if test "x$complete" != "x$new_complete"; then
36451    GNM="$new_complete"
36452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36453$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36454  fi
36455
36456
36457
36458
36459  # Publish this variable in the help.
36460
36461
36462  if test "x$MCS" = x; then
36463    # The variable is not set by user, try to locate tool using the code snippet
36464    for ac_prog in mcs
36465do
36466  # Extract the first word of "$ac_prog", so it can be a program name with args.
36467set dummy $ac_prog; ac_word=$2
36468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36469$as_echo_n "checking for $ac_word... " >&6; }
36470if ${ac_cv_path_MCS+:} false; then :
36471  $as_echo_n "(cached) " >&6
36472else
36473  case $MCS in
36474  [\\/]* | ?:[\\/]*)
36475  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36476  ;;
36477  *)
36478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36479for as_dir in $PATH
36480do
36481  IFS=$as_save_IFS
36482  test -z "$as_dir" && as_dir=.
36483    for ac_exec_ext in '' $ac_executable_extensions; do
36484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36485    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36487    break 2
36488  fi
36489done
36490  done
36491IFS=$as_save_IFS
36492
36493  ;;
36494esac
36495fi
36496MCS=$ac_cv_path_MCS
36497if test -n "$MCS"; then
36498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36499$as_echo "$MCS" >&6; }
36500else
36501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36502$as_echo "no" >&6; }
36503fi
36504
36505
36506  test -n "$MCS" && break
36507done
36508
36509  else
36510    # The variable is set, but is it from the command line or the environment?
36511
36512    # Try to remove the string !MCS! from our list.
36513    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36514    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36515      # If it failed, the variable was not from the command line. Ignore it,
36516      # but warn the user (except for BASH, which is always set by the calling BASH).
36517      if test "xMCS" != xBASH; then
36518        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36519$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36520      fi
36521      # Try to locate tool using the code snippet
36522      for ac_prog in mcs
36523do
36524  # Extract the first word of "$ac_prog", so it can be a program name with args.
36525set dummy $ac_prog; ac_word=$2
36526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36527$as_echo_n "checking for $ac_word... " >&6; }
36528if ${ac_cv_path_MCS+:} false; then :
36529  $as_echo_n "(cached) " >&6
36530else
36531  case $MCS in
36532  [\\/]* | ?:[\\/]*)
36533  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36534  ;;
36535  *)
36536  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36537for as_dir in $PATH
36538do
36539  IFS=$as_save_IFS
36540  test -z "$as_dir" && as_dir=.
36541    for ac_exec_ext in '' $ac_executable_extensions; do
36542  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36543    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36544    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36545    break 2
36546  fi
36547done
36548  done
36549IFS=$as_save_IFS
36550
36551  ;;
36552esac
36553fi
36554MCS=$ac_cv_path_MCS
36555if test -n "$MCS"; then
36556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36557$as_echo "$MCS" >&6; }
36558else
36559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36560$as_echo "no" >&6; }
36561fi
36562
36563
36564  test -n "$MCS" && break
36565done
36566
36567    else
36568      # If it succeeded, then it was overridden by the user. We will use it
36569      # for the tool.
36570
36571      # First remove it from the list of overridden variables, so we can test
36572      # for unknown variables in the end.
36573      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36574
36575      # Check if the provided tool contains a complete path.
36576      tool_specified="$MCS"
36577      tool_basename="${tool_specified##*/}"
36578      if test "x$tool_basename" = "x$tool_specified"; then
36579        # A command without a complete path is provided, search $PATH.
36580        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36581$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36582        # Extract the first word of "$tool_basename", so it can be a program name with args.
36583set dummy $tool_basename; ac_word=$2
36584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36585$as_echo_n "checking for $ac_word... " >&6; }
36586if ${ac_cv_path_MCS+:} false; then :
36587  $as_echo_n "(cached) " >&6
36588else
36589  case $MCS in
36590  [\\/]* | ?:[\\/]*)
36591  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36592  ;;
36593  *)
36594  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36595for as_dir in $PATH
36596do
36597  IFS=$as_save_IFS
36598  test -z "$as_dir" && as_dir=.
36599    for ac_exec_ext in '' $ac_executable_extensions; do
36600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36601    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36603    break 2
36604  fi
36605done
36606  done
36607IFS=$as_save_IFS
36608
36609  ;;
36610esac
36611fi
36612MCS=$ac_cv_path_MCS
36613if test -n "$MCS"; then
36614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36615$as_echo "$MCS" >&6; }
36616else
36617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36618$as_echo "no" >&6; }
36619fi
36620
36621
36622        if test "x$MCS" = x; then
36623          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36624        fi
36625      else
36626        # Otherwise we believe it is a complete path. Use it as it is.
36627        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36628$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36630$as_echo_n "checking for MCS... " >&6; }
36631        if test ! -x "$tool_specified"; then
36632          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36633$as_echo "not found" >&6; }
36634          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36635        fi
36636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36637$as_echo "$tool_specified" >&6; }
36638      fi
36639    fi
36640  fi
36641
36642
36643
36644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36645
36646  # First separate the path from the arguments. This will split at the first
36647  # space.
36648  complete="$MCS"
36649  path="${complete%% *}"
36650  tmp="$complete EOL"
36651  arguments="${tmp#* }"
36652
36653  # Input might be given as Windows format, start by converting to
36654  # unix format.
36655  new_path=`$CYGPATH -u "$path"`
36656
36657  # Now try to locate executable using which
36658  new_path=`$WHICH "$new_path" 2> /dev/null`
36659  # bat and cmd files are not always considered executable in cygwin causing which
36660  # to not find them
36661  if test "x$new_path" = x \
36662      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36663      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36664    new_path=`$CYGPATH -u "$path"`
36665  fi
36666  if test "x$new_path" = x; then
36667    # Oops. Which didn't find the executable.
36668    # The splitting of arguments from the executable at a space might have been incorrect,
36669    # since paths with space are more likely in Windows. Give it another try with the whole
36670    # argument.
36671    path="$complete"
36672    arguments="EOL"
36673    new_path=`$CYGPATH -u "$path"`
36674    new_path=`$WHICH "$new_path" 2> /dev/null`
36675    # bat and cmd files are not always considered executable in cygwin causing which
36676    # to not find them
36677    if test "x$new_path" = x \
36678        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36679        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36680      new_path=`$CYGPATH -u "$path"`
36681    fi
36682    if test "x$new_path" = x; then
36683      # It's still not found. Now this is an unrecoverable error.
36684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36685$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36686      has_space=`$ECHO "$complete" | $GREP " "`
36687      if test "x$has_space" != x; then
36688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36690      fi
36691      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36692    fi
36693  fi
36694
36695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36698  # "foo.exe" is OK but "foo" is an error.
36699  #
36700  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36701  # It is also a way to make sure we got the proper file name for the real test later on.
36702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36703  if test "x$test_shortpath" = x; then
36704    # Short path failed, file does not exist as specified.
36705    # Try adding .exe or .cmd
36706    if test -f "${new_path}.exe"; then
36707      input_to_shortpath="${new_path}.exe"
36708    elif test -f "${new_path}.cmd"; then
36709      input_to_shortpath="${new_path}.cmd"
36710    else
36711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36712$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36713      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36714$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36715      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36716    fi
36717  else
36718    input_to_shortpath="$new_path"
36719  fi
36720
36721  # Call helper function which possibly converts this using DOS-style short mode.
36722  # If so, the updated path is stored in $new_path.
36723  new_path="$input_to_shortpath"
36724
36725  input_path="$input_to_shortpath"
36726  # Check if we need to convert this using DOS-style short mode. If the path
36727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36728  # take no chances and rewrite it.
36729  # Note: m4 eats our [], so we need to use [ and ] instead.
36730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36731  if test "x$has_forbidden_chars" != x; then
36732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36736      # Going to short mode and back again did indeed matter. Since short mode is
36737      # case insensitive, let's make it lowercase to improve readability.
36738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36739      # Now convert it back to Unix-stile (cygpath)
36740      input_path=`$CYGPATH -u "$shortmode_path"`
36741      new_path="$input_path"
36742    fi
36743  fi
36744
36745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36746  if test "x$test_cygdrive_prefix" = x; then
36747    # As a simple fix, exclude /usr/bin since it's not a real path.
36748    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36750      # a path prefixed by /cygdrive for fixpath to work.
36751      new_path="$CYGWIN_ROOT_PATH$input_path"
36752    fi
36753  fi
36754
36755  # remove trailing .exe if any
36756  new_path="${new_path/%.exe/}"
36757
36758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36759
36760  # First separate the path from the arguments. This will split at the first
36761  # space.
36762  complete="$MCS"
36763  path="${complete%% *}"
36764  tmp="$complete EOL"
36765  arguments="${tmp#* }"
36766
36767  # Input might be given as Windows format, start by converting to
36768  # unix format.
36769  new_path="$path"
36770
36771  windows_path="$new_path"
36772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36773    unix_path=`$CYGPATH -u "$windows_path"`
36774    new_path="$unix_path"
36775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36777    new_path="$unix_path"
36778  fi
36779
36780
36781  # Now try to locate executable using which
36782  new_path=`$WHICH "$new_path" 2> /dev/null`
36783
36784  if test "x$new_path" = x; then
36785    # Oops. Which didn't find the executable.
36786    # The splitting of arguments from the executable at a space might have been incorrect,
36787    # since paths with space are more likely in Windows. Give it another try with the whole
36788    # argument.
36789    path="$complete"
36790    arguments="EOL"
36791    new_path="$path"
36792
36793  windows_path="$new_path"
36794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36795    unix_path=`$CYGPATH -u "$windows_path"`
36796    new_path="$unix_path"
36797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36799    new_path="$unix_path"
36800  fi
36801
36802
36803    new_path=`$WHICH "$new_path" 2> /dev/null`
36804    # bat and cmd files are not always considered executable in MSYS causing which
36805    # to not find them
36806    if test "x$new_path" = x \
36807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36809      new_path="$path"
36810
36811  windows_path="$new_path"
36812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36813    unix_path=`$CYGPATH -u "$windows_path"`
36814    new_path="$unix_path"
36815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36817    new_path="$unix_path"
36818  fi
36819
36820    fi
36821
36822    if test "x$new_path" = x; then
36823      # It's still not found. Now this is an unrecoverable error.
36824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36825$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36826      has_space=`$ECHO "$complete" | $GREP " "`
36827      if test "x$has_space" != x; then
36828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36830      fi
36831      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36832    fi
36833  fi
36834
36835  # Now new_path has a complete unix path to the binary
36836  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36837    # Keep paths in /bin as-is, but remove trailing .exe if any
36838    new_path="${new_path/%.exe/}"
36839    # Do not save /bin paths to all_fixpath_prefixes!
36840  else
36841    # Not in mixed or Windows style, start by that.
36842    new_path=`cmd //c echo $new_path`
36843
36844  input_path="$new_path"
36845  # Check if we need to convert this using DOS-style short mode. If the path
36846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36847  # take no chances and rewrite it.
36848  # Note: m4 eats our [], so we need to use [ and ] instead.
36849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36850  if test "x$has_forbidden_chars" != x; then
36851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36852    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36853  fi
36854
36855    # Output is in $new_path
36856
36857  windows_path="$new_path"
36858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36859    unix_path=`$CYGPATH -u "$windows_path"`
36860    new_path="$unix_path"
36861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36863    new_path="$unix_path"
36864  fi
36865
36866    # remove trailing .exe if any
36867    new_path="${new_path/%.exe/}"
36868
36869    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36870    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36871  fi
36872
36873  else
36874    # We're on a unix platform. Hooray! :)
36875    # First separate the path from the arguments. This will split at the first
36876    # space.
36877    complete="$MCS"
36878    path="${complete%% *}"
36879    tmp="$complete EOL"
36880    arguments="${tmp#* }"
36881
36882    # Cannot rely on the command "which" here since it doesn't always work.
36883    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36884    if test -z "$is_absolute_path"; then
36885      # Path to executable is not absolute. Find it.
36886      IFS_save="$IFS"
36887      IFS=:
36888      for p in $PATH; do
36889        if test -f "$p/$path" && test -x "$p/$path"; then
36890          new_path="$p/$path"
36891          break
36892        fi
36893      done
36894      IFS="$IFS_save"
36895    else
36896      # This is an absolute path, we can use it without further modifications.
36897      new_path="$path"
36898    fi
36899
36900    if test "x$new_path" = x; then
36901      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36902$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36903      has_space=`$ECHO "$complete" | $GREP " "`
36904      if test "x$has_space" != x; then
36905        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36906$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36907      fi
36908      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36909    fi
36910  fi
36911
36912  # Now join together the path and the arguments once again
36913  if test "x$arguments" != xEOL; then
36914    new_complete="$new_path ${arguments% *}"
36915  else
36916    new_complete="$new_path"
36917  fi
36918
36919  if test "x$complete" != "x$new_complete"; then
36920    MCS="$new_complete"
36921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36922$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36923  fi
36924
36925  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36926    # FIXME: we should unify this with the solaris case above.
36927
36928
36929  # Publish this variable in the help.
36930
36931
36932  if test "x$STRIP" = x; then
36933    # The variable is not set by user, try to locate tool using the code snippet
36934    if test -n "$ac_tool_prefix"; then
36935  for ac_prog in strip
36936  do
36937    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36938set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36940$as_echo_n "checking for $ac_word... " >&6; }
36941if ${ac_cv_prog_STRIP+:} false; then :
36942  $as_echo_n "(cached) " >&6
36943else
36944  if test -n "$STRIP"; then
36945  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36946else
36947as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36948for as_dir in $PATH
36949do
36950  IFS=$as_save_IFS
36951  test -z "$as_dir" && as_dir=.
36952    for ac_exec_ext in '' $ac_executable_extensions; do
36953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36954    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36956    break 2
36957  fi
36958done
36959  done
36960IFS=$as_save_IFS
36961
36962fi
36963fi
36964STRIP=$ac_cv_prog_STRIP
36965if test -n "$STRIP"; then
36966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36967$as_echo "$STRIP" >&6; }
36968else
36969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36970$as_echo "no" >&6; }
36971fi
36972
36973
36974    test -n "$STRIP" && break
36975  done
36976fi
36977if test -z "$STRIP"; then
36978  ac_ct_STRIP=$STRIP
36979  for ac_prog in strip
36980do
36981  # Extract the first word of "$ac_prog", so it can be a program name with args.
36982set dummy $ac_prog; ac_word=$2
36983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36984$as_echo_n "checking for $ac_word... " >&6; }
36985if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36986  $as_echo_n "(cached) " >&6
36987else
36988  if test -n "$ac_ct_STRIP"; then
36989  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36990else
36991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36992for as_dir in $PATH
36993do
36994  IFS=$as_save_IFS
36995  test -z "$as_dir" && as_dir=.
36996    for ac_exec_ext in '' $ac_executable_extensions; do
36997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36998    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37000    break 2
37001  fi
37002done
37003  done
37004IFS=$as_save_IFS
37005
37006fi
37007fi
37008ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37009if test -n "$ac_ct_STRIP"; then
37010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37011$as_echo "$ac_ct_STRIP" >&6; }
37012else
37013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37014$as_echo "no" >&6; }
37015fi
37016
37017
37018  test -n "$ac_ct_STRIP" && break
37019done
37020
37021  if test "x$ac_ct_STRIP" = x; then
37022    STRIP=""
37023  else
37024    case $cross_compiling:$ac_tool_warned in
37025yes:)
37026{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37027$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37028ac_tool_warned=yes ;;
37029esac
37030    STRIP=$ac_ct_STRIP
37031  fi
37032fi
37033
37034  else
37035    # The variable is set, but is it from the command line or the environment?
37036
37037    # Try to remove the string !STRIP! from our list.
37038    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37039    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37040      # If it failed, the variable was not from the command line. Ignore it,
37041      # but warn the user (except for BASH, which is always set by the calling BASH).
37042      if test "xSTRIP" != xBASH; then
37043        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37044$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37045      fi
37046      # Try to locate tool using the code snippet
37047      if test -n "$ac_tool_prefix"; then
37048  for ac_prog in strip
37049  do
37050    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37051set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37053$as_echo_n "checking for $ac_word... " >&6; }
37054if ${ac_cv_prog_STRIP+:} false; then :
37055  $as_echo_n "(cached) " >&6
37056else
37057  if test -n "$STRIP"; then
37058  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37059else
37060as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37061for as_dir in $PATH
37062do
37063  IFS=$as_save_IFS
37064  test -z "$as_dir" && as_dir=.
37065    for ac_exec_ext in '' $ac_executable_extensions; do
37066  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37067    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37069    break 2
37070  fi
37071done
37072  done
37073IFS=$as_save_IFS
37074
37075fi
37076fi
37077STRIP=$ac_cv_prog_STRIP
37078if test -n "$STRIP"; then
37079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37080$as_echo "$STRIP" >&6; }
37081else
37082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37083$as_echo "no" >&6; }
37084fi
37085
37086
37087    test -n "$STRIP" && break
37088  done
37089fi
37090if test -z "$STRIP"; then
37091  ac_ct_STRIP=$STRIP
37092  for ac_prog in strip
37093do
37094  # Extract the first word of "$ac_prog", so it can be a program name with args.
37095set dummy $ac_prog; ac_word=$2
37096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37097$as_echo_n "checking for $ac_word... " >&6; }
37098if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37099  $as_echo_n "(cached) " >&6
37100else
37101  if test -n "$ac_ct_STRIP"; then
37102  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37103else
37104as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37105for as_dir in $PATH
37106do
37107  IFS=$as_save_IFS
37108  test -z "$as_dir" && as_dir=.
37109    for ac_exec_ext in '' $ac_executable_extensions; do
37110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37111    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37113    break 2
37114  fi
37115done
37116  done
37117IFS=$as_save_IFS
37118
37119fi
37120fi
37121ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37122if test -n "$ac_ct_STRIP"; then
37123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37124$as_echo "$ac_ct_STRIP" >&6; }
37125else
37126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37127$as_echo "no" >&6; }
37128fi
37129
37130
37131  test -n "$ac_ct_STRIP" && break
37132done
37133
37134  if test "x$ac_ct_STRIP" = x; then
37135    STRIP=""
37136  else
37137    case $cross_compiling:$ac_tool_warned in
37138yes:)
37139{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37140$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37141ac_tool_warned=yes ;;
37142esac
37143    STRIP=$ac_ct_STRIP
37144  fi
37145fi
37146
37147    else
37148      # If it succeeded, then it was overridden by the user. We will use it
37149      # for the tool.
37150
37151      # First remove it from the list of overridden variables, so we can test
37152      # for unknown variables in the end.
37153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37154
37155      # Check if the provided tool contains a complete path.
37156      tool_specified="$STRIP"
37157      tool_basename="${tool_specified##*/}"
37158      if test "x$tool_basename" = "x$tool_specified"; then
37159        # A command without a complete path is provided, search $PATH.
37160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37161$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37162        # Extract the first word of "$tool_basename", so it can be a program name with args.
37163set dummy $tool_basename; ac_word=$2
37164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37165$as_echo_n "checking for $ac_word... " >&6; }
37166if ${ac_cv_path_STRIP+:} false; then :
37167  $as_echo_n "(cached) " >&6
37168else
37169  case $STRIP in
37170  [\\/]* | ?:[\\/]*)
37171  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37172  ;;
37173  *)
37174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37175for as_dir in $PATH
37176do
37177  IFS=$as_save_IFS
37178  test -z "$as_dir" && as_dir=.
37179    for ac_exec_ext in '' $ac_executable_extensions; do
37180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37181    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37183    break 2
37184  fi
37185done
37186  done
37187IFS=$as_save_IFS
37188
37189  ;;
37190esac
37191fi
37192STRIP=$ac_cv_path_STRIP
37193if test -n "$STRIP"; then
37194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37195$as_echo "$STRIP" >&6; }
37196else
37197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37198$as_echo "no" >&6; }
37199fi
37200
37201
37202        if test "x$STRIP" = x; then
37203          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37204        fi
37205      else
37206        # Otherwise we believe it is a complete path. Use it as it is.
37207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37208$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37210$as_echo_n "checking for STRIP... " >&6; }
37211        if test ! -x "$tool_specified"; then
37212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37213$as_echo "not found" >&6; }
37214          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37215        fi
37216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37217$as_echo "$tool_specified" >&6; }
37218      fi
37219    fi
37220  fi
37221
37222
37223
37224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37225
37226  # First separate the path from the arguments. This will split at the first
37227  # space.
37228  complete="$STRIP"
37229  path="${complete%% *}"
37230  tmp="$complete EOL"
37231  arguments="${tmp#* }"
37232
37233  # Input might be given as Windows format, start by converting to
37234  # unix format.
37235  new_path=`$CYGPATH -u "$path"`
37236
37237  # Now try to locate executable using which
37238  new_path=`$WHICH "$new_path" 2> /dev/null`
37239  # bat and cmd files are not always considered executable in cygwin causing which
37240  # to not find them
37241  if test "x$new_path" = x \
37242      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37243      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37244    new_path=`$CYGPATH -u "$path"`
37245  fi
37246  if test "x$new_path" = x; then
37247    # Oops. Which didn't find the executable.
37248    # The splitting of arguments from the executable at a space might have been incorrect,
37249    # since paths with space are more likely in Windows. Give it another try with the whole
37250    # argument.
37251    path="$complete"
37252    arguments="EOL"
37253    new_path=`$CYGPATH -u "$path"`
37254    new_path=`$WHICH "$new_path" 2> /dev/null`
37255    # bat and cmd files are not always considered executable in cygwin causing which
37256    # to not find them
37257    if test "x$new_path" = x \
37258        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37259        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37260      new_path=`$CYGPATH -u "$path"`
37261    fi
37262    if test "x$new_path" = x; then
37263      # It's still not found. Now this is an unrecoverable error.
37264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37265$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37266      has_space=`$ECHO "$complete" | $GREP " "`
37267      if test "x$has_space" != x; then
37268        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37269$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37270      fi
37271      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37272    fi
37273  fi
37274
37275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37278  # "foo.exe" is OK but "foo" is an error.
37279  #
37280  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37281  # It is also a way to make sure we got the proper file name for the real test later on.
37282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37283  if test "x$test_shortpath" = x; then
37284    # Short path failed, file does not exist as specified.
37285    # Try adding .exe or .cmd
37286    if test -f "${new_path}.exe"; then
37287      input_to_shortpath="${new_path}.exe"
37288    elif test -f "${new_path}.cmd"; then
37289      input_to_shortpath="${new_path}.cmd"
37290    else
37291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37292$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37293      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37294$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37295      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37296    fi
37297  else
37298    input_to_shortpath="$new_path"
37299  fi
37300
37301  # Call helper function which possibly converts this using DOS-style short mode.
37302  # If so, the updated path is stored in $new_path.
37303  new_path="$input_to_shortpath"
37304
37305  input_path="$input_to_shortpath"
37306  # Check if we need to convert this using DOS-style short mode. If the path
37307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37308  # take no chances and rewrite it.
37309  # Note: m4 eats our [], so we need to use [ and ] instead.
37310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37311  if test "x$has_forbidden_chars" != x; then
37312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37313    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37314    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37315    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37316      # Going to short mode and back again did indeed matter. Since short mode is
37317      # case insensitive, let's make it lowercase to improve readability.
37318      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37319      # Now convert it back to Unix-stile (cygpath)
37320      input_path=`$CYGPATH -u "$shortmode_path"`
37321      new_path="$input_path"
37322    fi
37323  fi
37324
37325  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37326  if test "x$test_cygdrive_prefix" = x; then
37327    # As a simple fix, exclude /usr/bin since it's not a real path.
37328    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37329      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37330      # a path prefixed by /cygdrive for fixpath to work.
37331      new_path="$CYGWIN_ROOT_PATH$input_path"
37332    fi
37333  fi
37334
37335  # remove trailing .exe if any
37336  new_path="${new_path/%.exe/}"
37337
37338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37339
37340  # First separate the path from the arguments. This will split at the first
37341  # space.
37342  complete="$STRIP"
37343  path="${complete%% *}"
37344  tmp="$complete EOL"
37345  arguments="${tmp#* }"
37346
37347  # Input might be given as Windows format, start by converting to
37348  # unix format.
37349  new_path="$path"
37350
37351  windows_path="$new_path"
37352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37353    unix_path=`$CYGPATH -u "$windows_path"`
37354    new_path="$unix_path"
37355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37357    new_path="$unix_path"
37358  fi
37359
37360
37361  # Now try to locate executable using which
37362  new_path=`$WHICH "$new_path" 2> /dev/null`
37363
37364  if test "x$new_path" = x; then
37365    # Oops. Which didn't find the executable.
37366    # The splitting of arguments from the executable at a space might have been incorrect,
37367    # since paths with space are more likely in Windows. Give it another try with the whole
37368    # argument.
37369    path="$complete"
37370    arguments="EOL"
37371    new_path="$path"
37372
37373  windows_path="$new_path"
37374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37375    unix_path=`$CYGPATH -u "$windows_path"`
37376    new_path="$unix_path"
37377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37379    new_path="$unix_path"
37380  fi
37381
37382
37383    new_path=`$WHICH "$new_path" 2> /dev/null`
37384    # bat and cmd files are not always considered executable in MSYS causing which
37385    # to not find them
37386    if test "x$new_path" = x \
37387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37389      new_path="$path"
37390
37391  windows_path="$new_path"
37392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37393    unix_path=`$CYGPATH -u "$windows_path"`
37394    new_path="$unix_path"
37395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37397    new_path="$unix_path"
37398  fi
37399
37400    fi
37401
37402    if test "x$new_path" = x; then
37403      # It's still not found. Now this is an unrecoverable error.
37404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37405$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37406      has_space=`$ECHO "$complete" | $GREP " "`
37407      if test "x$has_space" != x; then
37408        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37409$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37410      fi
37411      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37412    fi
37413  fi
37414
37415  # Now new_path has a complete unix path to the binary
37416  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37417    # Keep paths in /bin as-is, but remove trailing .exe if any
37418    new_path="${new_path/%.exe/}"
37419    # Do not save /bin paths to all_fixpath_prefixes!
37420  else
37421    # Not in mixed or Windows style, start by that.
37422    new_path=`cmd //c echo $new_path`
37423
37424  input_path="$new_path"
37425  # Check if we need to convert this using DOS-style short mode. If the path
37426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37427  # take no chances and rewrite it.
37428  # Note: m4 eats our [], so we need to use [ and ] instead.
37429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37430  if test "x$has_forbidden_chars" != x; then
37431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37432    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37433  fi
37434
37435    # Output is in $new_path
37436
37437  windows_path="$new_path"
37438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37439    unix_path=`$CYGPATH -u "$windows_path"`
37440    new_path="$unix_path"
37441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37443    new_path="$unix_path"
37444  fi
37445
37446    # remove trailing .exe if any
37447    new_path="${new_path/%.exe/}"
37448
37449    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37450    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37451  fi
37452
37453  else
37454    # We're on a unix platform. Hooray! :)
37455    # First separate the path from the arguments. This will split at the first
37456    # space.
37457    complete="$STRIP"
37458    path="${complete%% *}"
37459    tmp="$complete EOL"
37460    arguments="${tmp#* }"
37461
37462    # Cannot rely on the command "which" here since it doesn't always work.
37463    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37464    if test -z "$is_absolute_path"; then
37465      # Path to executable is not absolute. Find it.
37466      IFS_save="$IFS"
37467      IFS=:
37468      for p in $PATH; do
37469        if test -f "$p/$path" && test -x "$p/$path"; then
37470          new_path="$p/$path"
37471          break
37472        fi
37473      done
37474      IFS="$IFS_save"
37475    else
37476      # This is an absolute path, we can use it without further modifications.
37477      new_path="$path"
37478    fi
37479
37480    if test "x$new_path" = x; then
37481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37482$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37483      has_space=`$ECHO "$complete" | $GREP " "`
37484      if test "x$has_space" != x; then
37485        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37486$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37487      fi
37488      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37489    fi
37490  fi
37491
37492  # Now join together the path and the arguments once again
37493  if test "x$arguments" != xEOL; then
37494    new_complete="$new_path ${arguments% *}"
37495  else
37496    new_complete="$new_path"
37497  fi
37498
37499  if test "x$complete" != "x$new_complete"; then
37500    STRIP="$new_complete"
37501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37502$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37503  fi
37504
37505
37506
37507  # Publish this variable in the help.
37508
37509
37510  if test "x$NM" = x; then
37511    # The variable is not set by user, try to locate tool using the code snippet
37512    if test -n "$ac_tool_prefix"; then
37513  for ac_prog in nm
37514  do
37515    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37516set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37518$as_echo_n "checking for $ac_word... " >&6; }
37519if ${ac_cv_prog_NM+:} false; then :
37520  $as_echo_n "(cached) " >&6
37521else
37522  if test -n "$NM"; then
37523  ac_cv_prog_NM="$NM" # Let the user override the test.
37524else
37525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37526for as_dir in $PATH
37527do
37528  IFS=$as_save_IFS
37529  test -z "$as_dir" && as_dir=.
37530    for ac_exec_ext in '' $ac_executable_extensions; do
37531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37532    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37534    break 2
37535  fi
37536done
37537  done
37538IFS=$as_save_IFS
37539
37540fi
37541fi
37542NM=$ac_cv_prog_NM
37543if test -n "$NM"; then
37544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37545$as_echo "$NM" >&6; }
37546else
37547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37548$as_echo "no" >&6; }
37549fi
37550
37551
37552    test -n "$NM" && break
37553  done
37554fi
37555if test -z "$NM"; then
37556  ac_ct_NM=$NM
37557  for ac_prog in nm
37558do
37559  # Extract the first word of "$ac_prog", so it can be a program name with args.
37560set dummy $ac_prog; ac_word=$2
37561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37562$as_echo_n "checking for $ac_word... " >&6; }
37563if ${ac_cv_prog_ac_ct_NM+:} false; then :
37564  $as_echo_n "(cached) " >&6
37565else
37566  if test -n "$ac_ct_NM"; then
37567  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37568else
37569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37570for as_dir in $PATH
37571do
37572  IFS=$as_save_IFS
37573  test -z "$as_dir" && as_dir=.
37574    for ac_exec_ext in '' $ac_executable_extensions; do
37575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37576    ac_cv_prog_ac_ct_NM="$ac_prog"
37577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37578    break 2
37579  fi
37580done
37581  done
37582IFS=$as_save_IFS
37583
37584fi
37585fi
37586ac_ct_NM=$ac_cv_prog_ac_ct_NM
37587if test -n "$ac_ct_NM"; then
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37589$as_echo "$ac_ct_NM" >&6; }
37590else
37591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37592$as_echo "no" >&6; }
37593fi
37594
37595
37596  test -n "$ac_ct_NM" && break
37597done
37598
37599  if test "x$ac_ct_NM" = x; then
37600    NM=""
37601  else
37602    case $cross_compiling:$ac_tool_warned in
37603yes:)
37604{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37605$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37606ac_tool_warned=yes ;;
37607esac
37608    NM=$ac_ct_NM
37609  fi
37610fi
37611
37612  else
37613    # The variable is set, but is it from the command line or the environment?
37614
37615    # Try to remove the string !NM! from our list.
37616    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37617    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37618      # If it failed, the variable was not from the command line. Ignore it,
37619      # but warn the user (except for BASH, which is always set by the calling BASH).
37620      if test "xNM" != xBASH; then
37621        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37622$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37623      fi
37624      # Try to locate tool using the code snippet
37625      if test -n "$ac_tool_prefix"; then
37626  for ac_prog in nm
37627  do
37628    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37629set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37631$as_echo_n "checking for $ac_word... " >&6; }
37632if ${ac_cv_prog_NM+:} false; then :
37633  $as_echo_n "(cached) " >&6
37634else
37635  if test -n "$NM"; then
37636  ac_cv_prog_NM="$NM" # Let the user override the test.
37637else
37638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37639for as_dir in $PATH
37640do
37641  IFS=$as_save_IFS
37642  test -z "$as_dir" && as_dir=.
37643    for ac_exec_ext in '' $ac_executable_extensions; do
37644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37645    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37647    break 2
37648  fi
37649done
37650  done
37651IFS=$as_save_IFS
37652
37653fi
37654fi
37655NM=$ac_cv_prog_NM
37656if test -n "$NM"; then
37657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37658$as_echo "$NM" >&6; }
37659else
37660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37661$as_echo "no" >&6; }
37662fi
37663
37664
37665    test -n "$NM" && break
37666  done
37667fi
37668if test -z "$NM"; then
37669  ac_ct_NM=$NM
37670  for ac_prog in nm
37671do
37672  # Extract the first word of "$ac_prog", so it can be a program name with args.
37673set dummy $ac_prog; ac_word=$2
37674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37675$as_echo_n "checking for $ac_word... " >&6; }
37676if ${ac_cv_prog_ac_ct_NM+:} false; then :
37677  $as_echo_n "(cached) " >&6
37678else
37679  if test -n "$ac_ct_NM"; then
37680  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37681else
37682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37683for as_dir in $PATH
37684do
37685  IFS=$as_save_IFS
37686  test -z "$as_dir" && as_dir=.
37687    for ac_exec_ext in '' $ac_executable_extensions; do
37688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37689    ac_cv_prog_ac_ct_NM="$ac_prog"
37690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37691    break 2
37692  fi
37693done
37694  done
37695IFS=$as_save_IFS
37696
37697fi
37698fi
37699ac_ct_NM=$ac_cv_prog_ac_ct_NM
37700if test -n "$ac_ct_NM"; then
37701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37702$as_echo "$ac_ct_NM" >&6; }
37703else
37704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37705$as_echo "no" >&6; }
37706fi
37707
37708
37709  test -n "$ac_ct_NM" && break
37710done
37711
37712  if test "x$ac_ct_NM" = x; then
37713    NM=""
37714  else
37715    case $cross_compiling:$ac_tool_warned in
37716yes:)
37717{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37718$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37719ac_tool_warned=yes ;;
37720esac
37721    NM=$ac_ct_NM
37722  fi
37723fi
37724
37725    else
37726      # If it succeeded, then it was overridden by the user. We will use it
37727      # for the tool.
37728
37729      # First remove it from the list of overridden variables, so we can test
37730      # for unknown variables in the end.
37731      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37732
37733      # Check if the provided tool contains a complete path.
37734      tool_specified="$NM"
37735      tool_basename="${tool_specified##*/}"
37736      if test "x$tool_basename" = "x$tool_specified"; then
37737        # A command without a complete path is provided, search $PATH.
37738        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37739$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37740        # Extract the first word of "$tool_basename", so it can be a program name with args.
37741set dummy $tool_basename; ac_word=$2
37742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37743$as_echo_n "checking for $ac_word... " >&6; }
37744if ${ac_cv_path_NM+:} false; then :
37745  $as_echo_n "(cached) " >&6
37746else
37747  case $NM in
37748  [\\/]* | ?:[\\/]*)
37749  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37750  ;;
37751  *)
37752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37753for as_dir in $PATH
37754do
37755  IFS=$as_save_IFS
37756  test -z "$as_dir" && as_dir=.
37757    for ac_exec_ext in '' $ac_executable_extensions; do
37758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37759    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37761    break 2
37762  fi
37763done
37764  done
37765IFS=$as_save_IFS
37766
37767  ;;
37768esac
37769fi
37770NM=$ac_cv_path_NM
37771if test -n "$NM"; then
37772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37773$as_echo "$NM" >&6; }
37774else
37775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37776$as_echo "no" >&6; }
37777fi
37778
37779
37780        if test "x$NM" = x; then
37781          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37782        fi
37783      else
37784        # Otherwise we believe it is a complete path. Use it as it is.
37785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37786$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37788$as_echo_n "checking for NM... " >&6; }
37789        if test ! -x "$tool_specified"; then
37790          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37791$as_echo "not found" >&6; }
37792          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37793        fi
37794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37795$as_echo "$tool_specified" >&6; }
37796      fi
37797    fi
37798  fi
37799
37800
37801
37802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37803
37804  # First separate the path from the arguments. This will split at the first
37805  # space.
37806  complete="$NM"
37807  path="${complete%% *}"
37808  tmp="$complete EOL"
37809  arguments="${tmp#* }"
37810
37811  # Input might be given as Windows format, start by converting to
37812  # unix format.
37813  new_path=`$CYGPATH -u "$path"`
37814
37815  # Now try to locate executable using which
37816  new_path=`$WHICH "$new_path" 2> /dev/null`
37817  # bat and cmd files are not always considered executable in cygwin causing which
37818  # to not find them
37819  if test "x$new_path" = x \
37820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37822    new_path=`$CYGPATH -u "$path"`
37823  fi
37824  if test "x$new_path" = x; then
37825    # Oops. Which didn't find the executable.
37826    # The splitting of arguments from the executable at a space might have been incorrect,
37827    # since paths with space are more likely in Windows. Give it another try with the whole
37828    # argument.
37829    path="$complete"
37830    arguments="EOL"
37831    new_path=`$CYGPATH -u "$path"`
37832    new_path=`$WHICH "$new_path" 2> /dev/null`
37833    # bat and cmd files are not always considered executable in cygwin causing which
37834    # to not find them
37835    if test "x$new_path" = x \
37836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37838      new_path=`$CYGPATH -u "$path"`
37839    fi
37840    if test "x$new_path" = x; then
37841      # It's still not found. Now this is an unrecoverable error.
37842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37843$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37844      has_space=`$ECHO "$complete" | $GREP " "`
37845      if test "x$has_space" != x; then
37846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37848      fi
37849      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37850    fi
37851  fi
37852
37853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37856  # "foo.exe" is OK but "foo" is an error.
37857  #
37858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37859  # It is also a way to make sure we got the proper file name for the real test later on.
37860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37861  if test "x$test_shortpath" = x; then
37862    # Short path failed, file does not exist as specified.
37863    # Try adding .exe or .cmd
37864    if test -f "${new_path}.exe"; then
37865      input_to_shortpath="${new_path}.exe"
37866    elif test -f "${new_path}.cmd"; then
37867      input_to_shortpath="${new_path}.cmd"
37868    else
37869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37870$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37873      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37874    fi
37875  else
37876    input_to_shortpath="$new_path"
37877  fi
37878
37879  # Call helper function which possibly converts this using DOS-style short mode.
37880  # If so, the updated path is stored in $new_path.
37881  new_path="$input_to_shortpath"
37882
37883  input_path="$input_to_shortpath"
37884  # Check if we need to convert this using DOS-style short mode. If the path
37885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37886  # take no chances and rewrite it.
37887  # Note: m4 eats our [], so we need to use [ and ] instead.
37888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37889  if test "x$has_forbidden_chars" != x; then
37890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37894      # Going to short mode and back again did indeed matter. Since short mode is
37895      # case insensitive, let's make it lowercase to improve readability.
37896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37897      # Now convert it back to Unix-stile (cygpath)
37898      input_path=`$CYGPATH -u "$shortmode_path"`
37899      new_path="$input_path"
37900    fi
37901  fi
37902
37903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37904  if test "x$test_cygdrive_prefix" = x; then
37905    # As a simple fix, exclude /usr/bin since it's not a real path.
37906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37908      # a path prefixed by /cygdrive for fixpath to work.
37909      new_path="$CYGWIN_ROOT_PATH$input_path"
37910    fi
37911  fi
37912
37913  # remove trailing .exe if any
37914  new_path="${new_path/%.exe/}"
37915
37916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37917
37918  # First separate the path from the arguments. This will split at the first
37919  # space.
37920  complete="$NM"
37921  path="${complete%% *}"
37922  tmp="$complete EOL"
37923  arguments="${tmp#* }"
37924
37925  # Input might be given as Windows format, start by converting to
37926  # unix format.
37927  new_path="$path"
37928
37929  windows_path="$new_path"
37930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37931    unix_path=`$CYGPATH -u "$windows_path"`
37932    new_path="$unix_path"
37933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37935    new_path="$unix_path"
37936  fi
37937
37938
37939  # Now try to locate executable using which
37940  new_path=`$WHICH "$new_path" 2> /dev/null`
37941
37942  if test "x$new_path" = x; then
37943    # Oops. Which didn't find the executable.
37944    # The splitting of arguments from the executable at a space might have been incorrect,
37945    # since paths with space are more likely in Windows. Give it another try with the whole
37946    # argument.
37947    path="$complete"
37948    arguments="EOL"
37949    new_path="$path"
37950
37951  windows_path="$new_path"
37952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37953    unix_path=`$CYGPATH -u "$windows_path"`
37954    new_path="$unix_path"
37955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37957    new_path="$unix_path"
37958  fi
37959
37960
37961    new_path=`$WHICH "$new_path" 2> /dev/null`
37962    # bat and cmd files are not always considered executable in MSYS causing which
37963    # to not find them
37964    if test "x$new_path" = x \
37965        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37966        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37967      new_path="$path"
37968
37969  windows_path="$new_path"
37970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37971    unix_path=`$CYGPATH -u "$windows_path"`
37972    new_path="$unix_path"
37973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37975    new_path="$unix_path"
37976  fi
37977
37978    fi
37979
37980    if test "x$new_path" = x; then
37981      # It's still not found. Now this is an unrecoverable error.
37982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37983$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37984      has_space=`$ECHO "$complete" | $GREP " "`
37985      if test "x$has_space" != x; then
37986        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37987$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37988      fi
37989      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37990    fi
37991  fi
37992
37993  # Now new_path has a complete unix path to the binary
37994  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37995    # Keep paths in /bin as-is, but remove trailing .exe if any
37996    new_path="${new_path/%.exe/}"
37997    # Do not save /bin paths to all_fixpath_prefixes!
37998  else
37999    # Not in mixed or Windows style, start by that.
38000    new_path=`cmd //c echo $new_path`
38001
38002  input_path="$new_path"
38003  # Check if we need to convert this using DOS-style short mode. If the path
38004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38005  # take no chances and rewrite it.
38006  # Note: m4 eats our [], so we need to use [ and ] instead.
38007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38008  if test "x$has_forbidden_chars" != x; then
38009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38010    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38011  fi
38012
38013    # Output is in $new_path
38014
38015  windows_path="$new_path"
38016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38017    unix_path=`$CYGPATH -u "$windows_path"`
38018    new_path="$unix_path"
38019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38021    new_path="$unix_path"
38022  fi
38023
38024    # remove trailing .exe if any
38025    new_path="${new_path/%.exe/}"
38026
38027    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38028    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38029  fi
38030
38031  else
38032    # We're on a unix platform. Hooray! :)
38033    # First separate the path from the arguments. This will split at the first
38034    # space.
38035    complete="$NM"
38036    path="${complete%% *}"
38037    tmp="$complete EOL"
38038    arguments="${tmp#* }"
38039
38040    # Cannot rely on the command "which" here since it doesn't always work.
38041    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38042    if test -z "$is_absolute_path"; then
38043      # Path to executable is not absolute. Find it.
38044      IFS_save="$IFS"
38045      IFS=:
38046      for p in $PATH; do
38047        if test -f "$p/$path" && test -x "$p/$path"; then
38048          new_path="$p/$path"
38049          break
38050        fi
38051      done
38052      IFS="$IFS_save"
38053    else
38054      # This is an absolute path, we can use it without further modifications.
38055      new_path="$path"
38056    fi
38057
38058    if test "x$new_path" = x; then
38059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38060$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38061      has_space=`$ECHO "$complete" | $GREP " "`
38062      if test "x$has_space" != x; then
38063        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38064$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38065      fi
38066      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38067    fi
38068  fi
38069
38070  # Now join together the path and the arguments once again
38071  if test "x$arguments" != xEOL; then
38072    new_complete="$new_path ${arguments% *}"
38073  else
38074    new_complete="$new_path"
38075  fi
38076
38077  if test "x$complete" != "x$new_complete"; then
38078    NM="$new_complete"
38079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38080$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38081  fi
38082
38083    GNM="$NM"
38084
38085  fi
38086
38087  # objcopy is used for moving debug symbols to separate files when
38088  # full debug symbols are enabled.
38089  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38090
38091
38092  # Publish this variable in the help.
38093
38094
38095  if test "x$OBJCOPY" = x; then
38096    # The variable is not set by user, try to locate tool using the code snippet
38097    if test -n "$ac_tool_prefix"; then
38098  for ac_prog in gobjcopy objcopy
38099  do
38100    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38101set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38103$as_echo_n "checking for $ac_word... " >&6; }
38104if ${ac_cv_prog_OBJCOPY+:} false; then :
38105  $as_echo_n "(cached) " >&6
38106else
38107  if test -n "$OBJCOPY"; then
38108  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38109else
38110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38111for as_dir in $PATH
38112do
38113  IFS=$as_save_IFS
38114  test -z "$as_dir" && as_dir=.
38115    for ac_exec_ext in '' $ac_executable_extensions; do
38116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38117    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38119    break 2
38120  fi
38121done
38122  done
38123IFS=$as_save_IFS
38124
38125fi
38126fi
38127OBJCOPY=$ac_cv_prog_OBJCOPY
38128if test -n "$OBJCOPY"; then
38129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38130$as_echo "$OBJCOPY" >&6; }
38131else
38132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38133$as_echo "no" >&6; }
38134fi
38135
38136
38137    test -n "$OBJCOPY" && break
38138  done
38139fi
38140if test -z "$OBJCOPY"; then
38141  ac_ct_OBJCOPY=$OBJCOPY
38142  for ac_prog in gobjcopy objcopy
38143do
38144  # Extract the first word of "$ac_prog", so it can be a program name with args.
38145set dummy $ac_prog; ac_word=$2
38146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38147$as_echo_n "checking for $ac_word... " >&6; }
38148if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38149  $as_echo_n "(cached) " >&6
38150else
38151  if test -n "$ac_ct_OBJCOPY"; then
38152  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38153else
38154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38155for as_dir in $PATH
38156do
38157  IFS=$as_save_IFS
38158  test -z "$as_dir" && as_dir=.
38159    for ac_exec_ext in '' $ac_executable_extensions; do
38160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38161    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38163    break 2
38164  fi
38165done
38166  done
38167IFS=$as_save_IFS
38168
38169fi
38170fi
38171ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38172if test -n "$ac_ct_OBJCOPY"; then
38173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38174$as_echo "$ac_ct_OBJCOPY" >&6; }
38175else
38176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38177$as_echo "no" >&6; }
38178fi
38179
38180
38181  test -n "$ac_ct_OBJCOPY" && break
38182done
38183
38184  if test "x$ac_ct_OBJCOPY" = x; then
38185    OBJCOPY=""
38186  else
38187    case $cross_compiling:$ac_tool_warned in
38188yes:)
38189{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38190$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38191ac_tool_warned=yes ;;
38192esac
38193    OBJCOPY=$ac_ct_OBJCOPY
38194  fi
38195fi
38196
38197  else
38198    # The variable is set, but is it from the command line or the environment?
38199
38200    # Try to remove the string !OBJCOPY! from our list.
38201    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38202    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38203      # If it failed, the variable was not from the command line. Ignore it,
38204      # but warn the user (except for BASH, which is always set by the calling BASH).
38205      if test "xOBJCOPY" != xBASH; then
38206        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38207$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38208      fi
38209      # Try to locate tool using the code snippet
38210      if test -n "$ac_tool_prefix"; then
38211  for ac_prog in gobjcopy objcopy
38212  do
38213    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38214set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38216$as_echo_n "checking for $ac_word... " >&6; }
38217if ${ac_cv_prog_OBJCOPY+:} false; then :
38218  $as_echo_n "(cached) " >&6
38219else
38220  if test -n "$OBJCOPY"; then
38221  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38222else
38223as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38224for as_dir in $PATH
38225do
38226  IFS=$as_save_IFS
38227  test -z "$as_dir" && as_dir=.
38228    for ac_exec_ext in '' $ac_executable_extensions; do
38229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38230    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38232    break 2
38233  fi
38234done
38235  done
38236IFS=$as_save_IFS
38237
38238fi
38239fi
38240OBJCOPY=$ac_cv_prog_OBJCOPY
38241if test -n "$OBJCOPY"; then
38242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38243$as_echo "$OBJCOPY" >&6; }
38244else
38245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38246$as_echo "no" >&6; }
38247fi
38248
38249
38250    test -n "$OBJCOPY" && break
38251  done
38252fi
38253if test -z "$OBJCOPY"; then
38254  ac_ct_OBJCOPY=$OBJCOPY
38255  for ac_prog in gobjcopy objcopy
38256do
38257  # Extract the first word of "$ac_prog", so it can be a program name with args.
38258set dummy $ac_prog; ac_word=$2
38259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38260$as_echo_n "checking for $ac_word... " >&6; }
38261if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38262  $as_echo_n "(cached) " >&6
38263else
38264  if test -n "$ac_ct_OBJCOPY"; then
38265  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38266else
38267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38268for as_dir in $PATH
38269do
38270  IFS=$as_save_IFS
38271  test -z "$as_dir" && as_dir=.
38272    for ac_exec_ext in '' $ac_executable_extensions; do
38273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38274    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38276    break 2
38277  fi
38278done
38279  done
38280IFS=$as_save_IFS
38281
38282fi
38283fi
38284ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38285if test -n "$ac_ct_OBJCOPY"; then
38286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38287$as_echo "$ac_ct_OBJCOPY" >&6; }
38288else
38289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38290$as_echo "no" >&6; }
38291fi
38292
38293
38294  test -n "$ac_ct_OBJCOPY" && break
38295done
38296
38297  if test "x$ac_ct_OBJCOPY" = x; then
38298    OBJCOPY=""
38299  else
38300    case $cross_compiling:$ac_tool_warned in
38301yes:)
38302{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38303$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38304ac_tool_warned=yes ;;
38305esac
38306    OBJCOPY=$ac_ct_OBJCOPY
38307  fi
38308fi
38309
38310    else
38311      # If it succeeded, then it was overridden by the user. We will use it
38312      # for the tool.
38313
38314      # First remove it from the list of overridden variables, so we can test
38315      # for unknown variables in the end.
38316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38317
38318      # Check if the provided tool contains a complete path.
38319      tool_specified="$OBJCOPY"
38320      tool_basename="${tool_specified##*/}"
38321      if test "x$tool_basename" = "x$tool_specified"; then
38322        # A command without a complete path is provided, search $PATH.
38323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38324$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38325        # Extract the first word of "$tool_basename", so it can be a program name with args.
38326set dummy $tool_basename; ac_word=$2
38327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38328$as_echo_n "checking for $ac_word... " >&6; }
38329if ${ac_cv_path_OBJCOPY+:} false; then :
38330  $as_echo_n "(cached) " >&6
38331else
38332  case $OBJCOPY in
38333  [\\/]* | ?:[\\/]*)
38334  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38335  ;;
38336  *)
38337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38338for as_dir in $PATH
38339do
38340  IFS=$as_save_IFS
38341  test -z "$as_dir" && as_dir=.
38342    for ac_exec_ext in '' $ac_executable_extensions; do
38343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38344    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38346    break 2
38347  fi
38348done
38349  done
38350IFS=$as_save_IFS
38351
38352  ;;
38353esac
38354fi
38355OBJCOPY=$ac_cv_path_OBJCOPY
38356if test -n "$OBJCOPY"; then
38357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38358$as_echo "$OBJCOPY" >&6; }
38359else
38360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38361$as_echo "no" >&6; }
38362fi
38363
38364
38365        if test "x$OBJCOPY" = x; then
38366          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38367        fi
38368      else
38369        # Otherwise we believe it is a complete path. Use it as it is.
38370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38371$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38373$as_echo_n "checking for OBJCOPY... " >&6; }
38374        if test ! -x "$tool_specified"; then
38375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38376$as_echo "not found" >&6; }
38377          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38378        fi
38379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38380$as_echo "$tool_specified" >&6; }
38381      fi
38382    fi
38383  fi
38384
38385
38386    # Only call fixup if objcopy was found.
38387    if test -n "$OBJCOPY"; then
38388
38389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38390
38391  # First separate the path from the arguments. This will split at the first
38392  # space.
38393  complete="$OBJCOPY"
38394  path="${complete%% *}"
38395  tmp="$complete EOL"
38396  arguments="${tmp#* }"
38397
38398  # Input might be given as Windows format, start by converting to
38399  # unix format.
38400  new_path=`$CYGPATH -u "$path"`
38401
38402  # Now try to locate executable using which
38403  new_path=`$WHICH "$new_path" 2> /dev/null`
38404  # bat and cmd files are not always considered executable in cygwin causing which
38405  # to not find them
38406  if test "x$new_path" = x \
38407      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38408      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38409    new_path=`$CYGPATH -u "$path"`
38410  fi
38411  if test "x$new_path" = x; then
38412    # Oops. Which didn't find the executable.
38413    # The splitting of arguments from the executable at a space might have been incorrect,
38414    # since paths with space are more likely in Windows. Give it another try with the whole
38415    # argument.
38416    path="$complete"
38417    arguments="EOL"
38418    new_path=`$CYGPATH -u "$path"`
38419    new_path=`$WHICH "$new_path" 2> /dev/null`
38420    # bat and cmd files are not always considered executable in cygwin causing which
38421    # to not find them
38422    if test "x$new_path" = x \
38423        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38424        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38425      new_path=`$CYGPATH -u "$path"`
38426    fi
38427    if test "x$new_path" = x; then
38428      # It's still not found. Now this is an unrecoverable error.
38429      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38430$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38431      has_space=`$ECHO "$complete" | $GREP " "`
38432      if test "x$has_space" != x; then
38433        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38434$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38435      fi
38436      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38437    fi
38438  fi
38439
38440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38443  # "foo.exe" is OK but "foo" is an error.
38444  #
38445  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38446  # It is also a way to make sure we got the proper file name for the real test later on.
38447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38448  if test "x$test_shortpath" = x; then
38449    # Short path failed, file does not exist as specified.
38450    # Try adding .exe or .cmd
38451    if test -f "${new_path}.exe"; then
38452      input_to_shortpath="${new_path}.exe"
38453    elif test -f "${new_path}.cmd"; then
38454      input_to_shortpath="${new_path}.cmd"
38455    else
38456      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38457$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38458      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38459$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38460      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38461    fi
38462  else
38463    input_to_shortpath="$new_path"
38464  fi
38465
38466  # Call helper function which possibly converts this using DOS-style short mode.
38467  # If so, the updated path is stored in $new_path.
38468  new_path="$input_to_shortpath"
38469
38470  input_path="$input_to_shortpath"
38471  # Check if we need to convert this using DOS-style short mode. If the path
38472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38473  # take no chances and rewrite it.
38474  # Note: m4 eats our [], so we need to use [ and ] instead.
38475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38476  if test "x$has_forbidden_chars" != x; then
38477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38478    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38479    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38480    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38481      # Going to short mode and back again did indeed matter. Since short mode is
38482      # case insensitive, let's make it lowercase to improve readability.
38483      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38484      # Now convert it back to Unix-stile (cygpath)
38485      input_path=`$CYGPATH -u "$shortmode_path"`
38486      new_path="$input_path"
38487    fi
38488  fi
38489
38490  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38491  if test "x$test_cygdrive_prefix" = x; then
38492    # As a simple fix, exclude /usr/bin since it's not a real path.
38493    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38494      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38495      # a path prefixed by /cygdrive for fixpath to work.
38496      new_path="$CYGWIN_ROOT_PATH$input_path"
38497    fi
38498  fi
38499
38500  # remove trailing .exe if any
38501  new_path="${new_path/%.exe/}"
38502
38503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38504
38505  # First separate the path from the arguments. This will split at the first
38506  # space.
38507  complete="$OBJCOPY"
38508  path="${complete%% *}"
38509  tmp="$complete EOL"
38510  arguments="${tmp#* }"
38511
38512  # Input might be given as Windows format, start by converting to
38513  # unix format.
38514  new_path="$path"
38515
38516  windows_path="$new_path"
38517  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38518    unix_path=`$CYGPATH -u "$windows_path"`
38519    new_path="$unix_path"
38520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38521    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38522    new_path="$unix_path"
38523  fi
38524
38525
38526  # Now try to locate executable using which
38527  new_path=`$WHICH "$new_path" 2> /dev/null`
38528
38529  if test "x$new_path" = x; then
38530    # Oops. Which didn't find the executable.
38531    # The splitting of arguments from the executable at a space might have been incorrect,
38532    # since paths with space are more likely in Windows. Give it another try with the whole
38533    # argument.
38534    path="$complete"
38535    arguments="EOL"
38536    new_path="$path"
38537
38538  windows_path="$new_path"
38539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38540    unix_path=`$CYGPATH -u "$windows_path"`
38541    new_path="$unix_path"
38542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38544    new_path="$unix_path"
38545  fi
38546
38547
38548    new_path=`$WHICH "$new_path" 2> /dev/null`
38549    # bat and cmd files are not always considered executable in MSYS causing which
38550    # to not find them
38551    if test "x$new_path" = x \
38552        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38553        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38554      new_path="$path"
38555
38556  windows_path="$new_path"
38557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38558    unix_path=`$CYGPATH -u "$windows_path"`
38559    new_path="$unix_path"
38560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38562    new_path="$unix_path"
38563  fi
38564
38565    fi
38566
38567    if test "x$new_path" = x; then
38568      # It's still not found. Now this is an unrecoverable error.
38569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38570$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38571      has_space=`$ECHO "$complete" | $GREP " "`
38572      if test "x$has_space" != x; then
38573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38575      fi
38576      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38577    fi
38578  fi
38579
38580  # Now new_path has a complete unix path to the binary
38581  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38582    # Keep paths in /bin as-is, but remove trailing .exe if any
38583    new_path="${new_path/%.exe/}"
38584    # Do not save /bin paths to all_fixpath_prefixes!
38585  else
38586    # Not in mixed or Windows style, start by that.
38587    new_path=`cmd //c echo $new_path`
38588
38589  input_path="$new_path"
38590  # Check if we need to convert this using DOS-style short mode. If the path
38591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38592  # take no chances and rewrite it.
38593  # Note: m4 eats our [], so we need to use [ and ] instead.
38594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38595  if test "x$has_forbidden_chars" != x; then
38596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38598  fi
38599
38600    # Output is in $new_path
38601
38602  windows_path="$new_path"
38603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38604    unix_path=`$CYGPATH -u "$windows_path"`
38605    new_path="$unix_path"
38606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38608    new_path="$unix_path"
38609  fi
38610
38611    # remove trailing .exe if any
38612    new_path="${new_path/%.exe/}"
38613
38614    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38615    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38616  fi
38617
38618  else
38619    # We're on a unix platform. Hooray! :)
38620    # First separate the path from the arguments. This will split at the first
38621    # space.
38622    complete="$OBJCOPY"
38623    path="${complete%% *}"
38624    tmp="$complete EOL"
38625    arguments="${tmp#* }"
38626
38627    # Cannot rely on the command "which" here since it doesn't always work.
38628    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38629    if test -z "$is_absolute_path"; then
38630      # Path to executable is not absolute. Find it.
38631      IFS_save="$IFS"
38632      IFS=:
38633      for p in $PATH; do
38634        if test -f "$p/$path" && test -x "$p/$path"; then
38635          new_path="$p/$path"
38636          break
38637        fi
38638      done
38639      IFS="$IFS_save"
38640    else
38641      # This is an absolute path, we can use it without further modifications.
38642      new_path="$path"
38643    fi
38644
38645    if test "x$new_path" = x; then
38646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38647$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38648      has_space=`$ECHO "$complete" | $GREP " "`
38649      if test "x$has_space" != x; then
38650        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38651$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38652      fi
38653      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38654    fi
38655  fi
38656
38657  # Now join together the path and the arguments once again
38658  if test "x$arguments" != xEOL; then
38659    new_complete="$new_path ${arguments% *}"
38660  else
38661    new_complete="$new_path"
38662  fi
38663
38664  if test "x$complete" != "x$new_complete"; then
38665    OBJCOPY="$new_complete"
38666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38667$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38668  fi
38669
38670    fi
38671  fi
38672
38673
38674
38675  # Publish this variable in the help.
38676
38677
38678  if test "x$OBJDUMP" = x; then
38679    # The variable is not set by user, try to locate tool using the code snippet
38680    if test -n "$ac_tool_prefix"; then
38681  for ac_prog in gobjdump objdump
38682  do
38683    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38684set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38686$as_echo_n "checking for $ac_word... " >&6; }
38687if ${ac_cv_prog_OBJDUMP+:} false; then :
38688  $as_echo_n "(cached) " >&6
38689else
38690  if test -n "$OBJDUMP"; then
38691  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38692else
38693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38694for as_dir in $PATH
38695do
38696  IFS=$as_save_IFS
38697  test -z "$as_dir" && as_dir=.
38698    for ac_exec_ext in '' $ac_executable_extensions; do
38699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38700    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38702    break 2
38703  fi
38704done
38705  done
38706IFS=$as_save_IFS
38707
38708fi
38709fi
38710OBJDUMP=$ac_cv_prog_OBJDUMP
38711if test -n "$OBJDUMP"; then
38712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38713$as_echo "$OBJDUMP" >&6; }
38714else
38715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38716$as_echo "no" >&6; }
38717fi
38718
38719
38720    test -n "$OBJDUMP" && break
38721  done
38722fi
38723if test -z "$OBJDUMP"; then
38724  ac_ct_OBJDUMP=$OBJDUMP
38725  for ac_prog in gobjdump objdump
38726do
38727  # Extract the first word of "$ac_prog", so it can be a program name with args.
38728set dummy $ac_prog; ac_word=$2
38729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38730$as_echo_n "checking for $ac_word... " >&6; }
38731if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38732  $as_echo_n "(cached) " >&6
38733else
38734  if test -n "$ac_ct_OBJDUMP"; then
38735  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38736else
38737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38738for as_dir in $PATH
38739do
38740  IFS=$as_save_IFS
38741  test -z "$as_dir" && as_dir=.
38742    for ac_exec_ext in '' $ac_executable_extensions; do
38743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38744    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38746    break 2
38747  fi
38748done
38749  done
38750IFS=$as_save_IFS
38751
38752fi
38753fi
38754ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38755if test -n "$ac_ct_OBJDUMP"; then
38756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38757$as_echo "$ac_ct_OBJDUMP" >&6; }
38758else
38759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38760$as_echo "no" >&6; }
38761fi
38762
38763
38764  test -n "$ac_ct_OBJDUMP" && break
38765done
38766
38767  if test "x$ac_ct_OBJDUMP" = x; then
38768    OBJDUMP=""
38769  else
38770    case $cross_compiling:$ac_tool_warned in
38771yes:)
38772{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38773$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38774ac_tool_warned=yes ;;
38775esac
38776    OBJDUMP=$ac_ct_OBJDUMP
38777  fi
38778fi
38779
38780  else
38781    # The variable is set, but is it from the command line or the environment?
38782
38783    # Try to remove the string !OBJDUMP! from our list.
38784    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38785    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38786      # If it failed, the variable was not from the command line. Ignore it,
38787      # but warn the user (except for BASH, which is always set by the calling BASH).
38788      if test "xOBJDUMP" != xBASH; then
38789        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38790$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38791      fi
38792      # Try to locate tool using the code snippet
38793      if test -n "$ac_tool_prefix"; then
38794  for ac_prog in gobjdump objdump
38795  do
38796    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38797set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38799$as_echo_n "checking for $ac_word... " >&6; }
38800if ${ac_cv_prog_OBJDUMP+:} false; then :
38801  $as_echo_n "(cached) " >&6
38802else
38803  if test -n "$OBJDUMP"; then
38804  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38805else
38806as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38807for as_dir in $PATH
38808do
38809  IFS=$as_save_IFS
38810  test -z "$as_dir" && as_dir=.
38811    for ac_exec_ext in '' $ac_executable_extensions; do
38812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38813    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38815    break 2
38816  fi
38817done
38818  done
38819IFS=$as_save_IFS
38820
38821fi
38822fi
38823OBJDUMP=$ac_cv_prog_OBJDUMP
38824if test -n "$OBJDUMP"; then
38825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38826$as_echo "$OBJDUMP" >&6; }
38827else
38828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38829$as_echo "no" >&6; }
38830fi
38831
38832
38833    test -n "$OBJDUMP" && break
38834  done
38835fi
38836if test -z "$OBJDUMP"; then
38837  ac_ct_OBJDUMP=$OBJDUMP
38838  for ac_prog in gobjdump objdump
38839do
38840  # Extract the first word of "$ac_prog", so it can be a program name with args.
38841set dummy $ac_prog; ac_word=$2
38842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38843$as_echo_n "checking for $ac_word... " >&6; }
38844if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38845  $as_echo_n "(cached) " >&6
38846else
38847  if test -n "$ac_ct_OBJDUMP"; then
38848  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38849else
38850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38851for as_dir in $PATH
38852do
38853  IFS=$as_save_IFS
38854  test -z "$as_dir" && as_dir=.
38855    for ac_exec_ext in '' $ac_executable_extensions; do
38856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38857    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38859    break 2
38860  fi
38861done
38862  done
38863IFS=$as_save_IFS
38864
38865fi
38866fi
38867ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38868if test -n "$ac_ct_OBJDUMP"; then
38869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38870$as_echo "$ac_ct_OBJDUMP" >&6; }
38871else
38872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38873$as_echo "no" >&6; }
38874fi
38875
38876
38877  test -n "$ac_ct_OBJDUMP" && break
38878done
38879
38880  if test "x$ac_ct_OBJDUMP" = x; then
38881    OBJDUMP=""
38882  else
38883    case $cross_compiling:$ac_tool_warned in
38884yes:)
38885{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38886$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38887ac_tool_warned=yes ;;
38888esac
38889    OBJDUMP=$ac_ct_OBJDUMP
38890  fi
38891fi
38892
38893    else
38894      # If it succeeded, then it was overridden by the user. We will use it
38895      # for the tool.
38896
38897      # First remove it from the list of overridden variables, so we can test
38898      # for unknown variables in the end.
38899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38900
38901      # Check if the provided tool contains a complete path.
38902      tool_specified="$OBJDUMP"
38903      tool_basename="${tool_specified##*/}"
38904      if test "x$tool_basename" = "x$tool_specified"; then
38905        # A command without a complete path is provided, search $PATH.
38906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38907$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38908        # Extract the first word of "$tool_basename", so it can be a program name with args.
38909set dummy $tool_basename; ac_word=$2
38910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38911$as_echo_n "checking for $ac_word... " >&6; }
38912if ${ac_cv_path_OBJDUMP+:} false; then :
38913  $as_echo_n "(cached) " >&6
38914else
38915  case $OBJDUMP in
38916  [\\/]* | ?:[\\/]*)
38917  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38918  ;;
38919  *)
38920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38921for as_dir in $PATH
38922do
38923  IFS=$as_save_IFS
38924  test -z "$as_dir" && as_dir=.
38925    for ac_exec_ext in '' $ac_executable_extensions; do
38926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38927    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38929    break 2
38930  fi
38931done
38932  done
38933IFS=$as_save_IFS
38934
38935  ;;
38936esac
38937fi
38938OBJDUMP=$ac_cv_path_OBJDUMP
38939if test -n "$OBJDUMP"; then
38940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38941$as_echo "$OBJDUMP" >&6; }
38942else
38943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38944$as_echo "no" >&6; }
38945fi
38946
38947
38948        if test "x$OBJDUMP" = x; then
38949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38950        fi
38951      else
38952        # Otherwise we believe it is a complete path. Use it as it is.
38953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38954$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38956$as_echo_n "checking for OBJDUMP... " >&6; }
38957        if test ! -x "$tool_specified"; then
38958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38959$as_echo "not found" >&6; }
38960          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38961        fi
38962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38963$as_echo "$tool_specified" >&6; }
38964      fi
38965    fi
38966  fi
38967
38968
38969  if test "x$OBJDUMP" != x; then
38970    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38971    # bails if argument is missing.
38972
38973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38974
38975  # First separate the path from the arguments. This will split at the first
38976  # space.
38977  complete="$OBJDUMP"
38978  path="${complete%% *}"
38979  tmp="$complete EOL"
38980  arguments="${tmp#* }"
38981
38982  # Input might be given as Windows format, start by converting to
38983  # unix format.
38984  new_path=`$CYGPATH -u "$path"`
38985
38986  # Now try to locate executable using which
38987  new_path=`$WHICH "$new_path" 2> /dev/null`
38988  # bat and cmd files are not always considered executable in cygwin causing which
38989  # to not find them
38990  if test "x$new_path" = x \
38991      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38992      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38993    new_path=`$CYGPATH -u "$path"`
38994  fi
38995  if test "x$new_path" = x; then
38996    # Oops. Which didn't find the executable.
38997    # The splitting of arguments from the executable at a space might have been incorrect,
38998    # since paths with space are more likely in Windows. Give it another try with the whole
38999    # argument.
39000    path="$complete"
39001    arguments="EOL"
39002    new_path=`$CYGPATH -u "$path"`
39003    new_path=`$WHICH "$new_path" 2> /dev/null`
39004    # bat and cmd files are not always considered executable in cygwin causing which
39005    # to not find them
39006    if test "x$new_path" = x \
39007        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39008        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39009      new_path=`$CYGPATH -u "$path"`
39010    fi
39011    if test "x$new_path" = x; then
39012      # It's still not found. Now this is an unrecoverable error.
39013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39014$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39015      has_space=`$ECHO "$complete" | $GREP " "`
39016      if test "x$has_space" != x; then
39017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39019      fi
39020      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39021    fi
39022  fi
39023
39024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39027  # "foo.exe" is OK but "foo" is an error.
39028  #
39029  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39030  # It is also a way to make sure we got the proper file name for the real test later on.
39031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39032  if test "x$test_shortpath" = x; then
39033    # Short path failed, file does not exist as specified.
39034    # Try adding .exe or .cmd
39035    if test -f "${new_path}.exe"; then
39036      input_to_shortpath="${new_path}.exe"
39037    elif test -f "${new_path}.cmd"; then
39038      input_to_shortpath="${new_path}.cmd"
39039    else
39040      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39041$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39042      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39043$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39044      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39045    fi
39046  else
39047    input_to_shortpath="$new_path"
39048  fi
39049
39050  # Call helper function which possibly converts this using DOS-style short mode.
39051  # If so, the updated path is stored in $new_path.
39052  new_path="$input_to_shortpath"
39053
39054  input_path="$input_to_shortpath"
39055  # Check if we need to convert this using DOS-style short mode. If the path
39056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39057  # take no chances and rewrite it.
39058  # Note: m4 eats our [], so we need to use [ and ] instead.
39059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39060  if test "x$has_forbidden_chars" != x; then
39061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39065      # Going to short mode and back again did indeed matter. Since short mode is
39066      # case insensitive, let's make it lowercase to improve readability.
39067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39068      # Now convert it back to Unix-stile (cygpath)
39069      input_path=`$CYGPATH -u "$shortmode_path"`
39070      new_path="$input_path"
39071    fi
39072  fi
39073
39074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39075  if test "x$test_cygdrive_prefix" = x; then
39076    # As a simple fix, exclude /usr/bin since it's not a real path.
39077    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39079      # a path prefixed by /cygdrive for fixpath to work.
39080      new_path="$CYGWIN_ROOT_PATH$input_path"
39081    fi
39082  fi
39083
39084  # remove trailing .exe if any
39085  new_path="${new_path/%.exe/}"
39086
39087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39088
39089  # First separate the path from the arguments. This will split at the first
39090  # space.
39091  complete="$OBJDUMP"
39092  path="${complete%% *}"
39093  tmp="$complete EOL"
39094  arguments="${tmp#* }"
39095
39096  # Input might be given as Windows format, start by converting to
39097  # unix format.
39098  new_path="$path"
39099
39100  windows_path="$new_path"
39101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39102    unix_path=`$CYGPATH -u "$windows_path"`
39103    new_path="$unix_path"
39104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39106    new_path="$unix_path"
39107  fi
39108
39109
39110  # Now try to locate executable using which
39111  new_path=`$WHICH "$new_path" 2> /dev/null`
39112
39113  if test "x$new_path" = x; then
39114    # Oops. Which didn't find the executable.
39115    # The splitting of arguments from the executable at a space might have been incorrect,
39116    # since paths with space are more likely in Windows. Give it another try with the whole
39117    # argument.
39118    path="$complete"
39119    arguments="EOL"
39120    new_path="$path"
39121
39122  windows_path="$new_path"
39123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39124    unix_path=`$CYGPATH -u "$windows_path"`
39125    new_path="$unix_path"
39126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39128    new_path="$unix_path"
39129  fi
39130
39131
39132    new_path=`$WHICH "$new_path" 2> /dev/null`
39133    # bat and cmd files are not always considered executable in MSYS causing which
39134    # to not find them
39135    if test "x$new_path" = x \
39136        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39137        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39138      new_path="$path"
39139
39140  windows_path="$new_path"
39141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39142    unix_path=`$CYGPATH -u "$windows_path"`
39143    new_path="$unix_path"
39144  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39145    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39146    new_path="$unix_path"
39147  fi
39148
39149    fi
39150
39151    if test "x$new_path" = x; then
39152      # It's still not found. Now this is an unrecoverable error.
39153      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39154$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39155      has_space=`$ECHO "$complete" | $GREP " "`
39156      if test "x$has_space" != x; then
39157        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39158$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39159      fi
39160      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39161    fi
39162  fi
39163
39164  # Now new_path has a complete unix path to the binary
39165  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39166    # Keep paths in /bin as-is, but remove trailing .exe if any
39167    new_path="${new_path/%.exe/}"
39168    # Do not save /bin paths to all_fixpath_prefixes!
39169  else
39170    # Not in mixed or Windows style, start by that.
39171    new_path=`cmd //c echo $new_path`
39172
39173  input_path="$new_path"
39174  # Check if we need to convert this using DOS-style short mode. If the path
39175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39176  # take no chances and rewrite it.
39177  # Note: m4 eats our [], so we need to use [ and ] instead.
39178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39179  if test "x$has_forbidden_chars" != x; then
39180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39181    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39182  fi
39183
39184    # Output is in $new_path
39185
39186  windows_path="$new_path"
39187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39188    unix_path=`$CYGPATH -u "$windows_path"`
39189    new_path="$unix_path"
39190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39192    new_path="$unix_path"
39193  fi
39194
39195    # remove trailing .exe if any
39196    new_path="${new_path/%.exe/}"
39197
39198    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39199    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39200  fi
39201
39202  else
39203    # We're on a unix platform. Hooray! :)
39204    # First separate the path from the arguments. This will split at the first
39205    # space.
39206    complete="$OBJDUMP"
39207    path="${complete%% *}"
39208    tmp="$complete EOL"
39209    arguments="${tmp#* }"
39210
39211    # Cannot rely on the command "which" here since it doesn't always work.
39212    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39213    if test -z "$is_absolute_path"; then
39214      # Path to executable is not absolute. Find it.
39215      IFS_save="$IFS"
39216      IFS=:
39217      for p in $PATH; do
39218        if test -f "$p/$path" && test -x "$p/$path"; then
39219          new_path="$p/$path"
39220          break
39221        fi
39222      done
39223      IFS="$IFS_save"
39224    else
39225      # This is an absolute path, we can use it without further modifications.
39226      new_path="$path"
39227    fi
39228
39229    if test "x$new_path" = x; then
39230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39231$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39232      has_space=`$ECHO "$complete" | $GREP " "`
39233      if test "x$has_space" != x; then
39234        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39235$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39236      fi
39237      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39238    fi
39239  fi
39240
39241  # Now join together the path and the arguments once again
39242  if test "x$arguments" != xEOL; then
39243    new_complete="$new_path ${arguments% *}"
39244  else
39245    new_complete="$new_path"
39246  fi
39247
39248  if test "x$complete" != "x$new_complete"; then
39249    OBJDUMP="$new_complete"
39250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39251$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39252  fi
39253
39254  fi
39255
39256
39257  # Restore old path.
39258  PATH="$OLD_PATH"
39259
39260  # Restore the flags to the user specified values.
39261  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39262  CFLAGS="$ORG_CFLAGS"
39263  CXXFLAGS="$ORG_CXXFLAGS"
39264  OBJCFLAGS="$ORG_OBJCFLAGS"
39265
39266
39267# Finally do some processing after the detection phase
39268
39269  if test "x$COMPILE_TYPE" = "xcross"; then
39270    # Now we need to find a C/C++ compiler that can build executables for the
39271    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39272    # used once. Also, we need to do this without adding a tools dir to the
39273    # path, otherwise we might pick up cross-compilers which don't use standard
39274    # naming.
39275
39276    # FIXME: we should list the discovered compilers as an exclude pattern!
39277    # If we do that, we can do this detection before POST_DETECTION, and still
39278    # find the build compilers in the tools dir, if needed.
39279
39280
39281  # Publish this variable in the help.
39282
39283
39284  if test "x$BUILD_CC" = x; then
39285    # The variable is not set by user, try to locate tool using the code snippet
39286    for ac_prog in cl cc gcc
39287do
39288  # Extract the first word of "$ac_prog", so it can be a program name with args.
39289set dummy $ac_prog; ac_word=$2
39290{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39291$as_echo_n "checking for $ac_word... " >&6; }
39292if ${ac_cv_path_BUILD_CC+:} false; then :
39293  $as_echo_n "(cached) " >&6
39294else
39295  case $BUILD_CC in
39296  [\\/]* | ?:[\\/]*)
39297  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39298  ;;
39299  *)
39300  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39301for as_dir in $PATH
39302do
39303  IFS=$as_save_IFS
39304  test -z "$as_dir" && as_dir=.
39305    for ac_exec_ext in '' $ac_executable_extensions; do
39306  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39307    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39308    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39309    break 2
39310  fi
39311done
39312  done
39313IFS=$as_save_IFS
39314
39315  ;;
39316esac
39317fi
39318BUILD_CC=$ac_cv_path_BUILD_CC
39319if test -n "$BUILD_CC"; then
39320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39321$as_echo "$BUILD_CC" >&6; }
39322else
39323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39324$as_echo "no" >&6; }
39325fi
39326
39327
39328  test -n "$BUILD_CC" && break
39329done
39330
39331  else
39332    # The variable is set, but is it from the command line or the environment?
39333
39334    # Try to remove the string !BUILD_CC! from our list.
39335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39337      # If it failed, the variable was not from the command line. Ignore it,
39338      # but warn the user (except for BASH, which is always set by the calling BASH).
39339      if test "xBUILD_CC" != xBASH; then
39340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39341$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39342      fi
39343      # Try to locate tool using the code snippet
39344      for ac_prog in cl cc gcc
39345do
39346  # Extract the first word of "$ac_prog", so it can be a program name with args.
39347set dummy $ac_prog; ac_word=$2
39348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39349$as_echo_n "checking for $ac_word... " >&6; }
39350if ${ac_cv_path_BUILD_CC+:} false; then :
39351  $as_echo_n "(cached) " >&6
39352else
39353  case $BUILD_CC in
39354  [\\/]* | ?:[\\/]*)
39355  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39356  ;;
39357  *)
39358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39359for as_dir in $PATH
39360do
39361  IFS=$as_save_IFS
39362  test -z "$as_dir" && as_dir=.
39363    for ac_exec_ext in '' $ac_executable_extensions; do
39364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39365    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39367    break 2
39368  fi
39369done
39370  done
39371IFS=$as_save_IFS
39372
39373  ;;
39374esac
39375fi
39376BUILD_CC=$ac_cv_path_BUILD_CC
39377if test -n "$BUILD_CC"; then
39378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39379$as_echo "$BUILD_CC" >&6; }
39380else
39381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39382$as_echo "no" >&6; }
39383fi
39384
39385
39386  test -n "$BUILD_CC" && break
39387done
39388
39389    else
39390      # If it succeeded, then it was overridden by the user. We will use it
39391      # for the tool.
39392
39393      # First remove it from the list of overridden variables, so we can test
39394      # for unknown variables in the end.
39395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39396
39397      # Check if the provided tool contains a complete path.
39398      tool_specified="$BUILD_CC"
39399      tool_basename="${tool_specified##*/}"
39400      if test "x$tool_basename" = "x$tool_specified"; then
39401        # A command without a complete path is provided, search $PATH.
39402        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39403$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39404        # Extract the first word of "$tool_basename", so it can be a program name with args.
39405set dummy $tool_basename; ac_word=$2
39406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39407$as_echo_n "checking for $ac_word... " >&6; }
39408if ${ac_cv_path_BUILD_CC+:} false; then :
39409  $as_echo_n "(cached) " >&6
39410else
39411  case $BUILD_CC in
39412  [\\/]* | ?:[\\/]*)
39413  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39414  ;;
39415  *)
39416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39417for as_dir in $PATH
39418do
39419  IFS=$as_save_IFS
39420  test -z "$as_dir" && as_dir=.
39421    for ac_exec_ext in '' $ac_executable_extensions; do
39422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39423    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39425    break 2
39426  fi
39427done
39428  done
39429IFS=$as_save_IFS
39430
39431  ;;
39432esac
39433fi
39434BUILD_CC=$ac_cv_path_BUILD_CC
39435if test -n "$BUILD_CC"; then
39436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39437$as_echo "$BUILD_CC" >&6; }
39438else
39439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39440$as_echo "no" >&6; }
39441fi
39442
39443
39444        if test "x$BUILD_CC" = x; then
39445          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39446        fi
39447      else
39448        # Otherwise we believe it is a complete path. Use it as it is.
39449        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39450$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39451        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39452$as_echo_n "checking for BUILD_CC... " >&6; }
39453        if test ! -x "$tool_specified"; then
39454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39455$as_echo "not found" >&6; }
39456          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39457        fi
39458        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39459$as_echo "$tool_specified" >&6; }
39460      fi
39461    fi
39462  fi
39463
39464
39465
39466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39467
39468  # First separate the path from the arguments. This will split at the first
39469  # space.
39470  complete="$BUILD_CC"
39471  path="${complete%% *}"
39472  tmp="$complete EOL"
39473  arguments="${tmp#* }"
39474
39475  # Input might be given as Windows format, start by converting to
39476  # unix format.
39477  new_path=`$CYGPATH -u "$path"`
39478
39479  # Now try to locate executable using which
39480  new_path=`$WHICH "$new_path" 2> /dev/null`
39481  # bat and cmd files are not always considered executable in cygwin causing which
39482  # to not find them
39483  if test "x$new_path" = x \
39484      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39485      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39486    new_path=`$CYGPATH -u "$path"`
39487  fi
39488  if test "x$new_path" = x; then
39489    # Oops. Which didn't find the executable.
39490    # The splitting of arguments from the executable at a space might have been incorrect,
39491    # since paths with space are more likely in Windows. Give it another try with the whole
39492    # argument.
39493    path="$complete"
39494    arguments="EOL"
39495    new_path=`$CYGPATH -u "$path"`
39496    new_path=`$WHICH "$new_path" 2> /dev/null`
39497    # bat and cmd files are not always considered executable in cygwin causing which
39498    # to not find them
39499    if test "x$new_path" = x \
39500        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39501        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39502      new_path=`$CYGPATH -u "$path"`
39503    fi
39504    if test "x$new_path" = x; then
39505      # It's still not found. Now this is an unrecoverable error.
39506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39507$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39508      has_space=`$ECHO "$complete" | $GREP " "`
39509      if test "x$has_space" != x; then
39510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39512      fi
39513      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39514    fi
39515  fi
39516
39517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39520  # "foo.exe" is OK but "foo" is an error.
39521  #
39522  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39523  # It is also a way to make sure we got the proper file name for the real test later on.
39524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39525  if test "x$test_shortpath" = x; then
39526    # Short path failed, file does not exist as specified.
39527    # Try adding .exe or .cmd
39528    if test -f "${new_path}.exe"; then
39529      input_to_shortpath="${new_path}.exe"
39530    elif test -f "${new_path}.cmd"; then
39531      input_to_shortpath="${new_path}.cmd"
39532    else
39533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39534$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39535      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39536$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39537      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39538    fi
39539  else
39540    input_to_shortpath="$new_path"
39541  fi
39542
39543  # Call helper function which possibly converts this using DOS-style short mode.
39544  # If so, the updated path is stored in $new_path.
39545  new_path="$input_to_shortpath"
39546
39547  input_path="$input_to_shortpath"
39548  # Check if we need to convert this using DOS-style short mode. If the path
39549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39550  # take no chances and rewrite it.
39551  # Note: m4 eats our [], so we need to use [ and ] instead.
39552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39553  if test "x$has_forbidden_chars" != x; then
39554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39558      # Going to short mode and back again did indeed matter. Since short mode is
39559      # case insensitive, let's make it lowercase to improve readability.
39560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39561      # Now convert it back to Unix-stile (cygpath)
39562      input_path=`$CYGPATH -u "$shortmode_path"`
39563      new_path="$input_path"
39564    fi
39565  fi
39566
39567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39568  if test "x$test_cygdrive_prefix" = x; then
39569    # As a simple fix, exclude /usr/bin since it's not a real path.
39570    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39572      # a path prefixed by /cygdrive for fixpath to work.
39573      new_path="$CYGWIN_ROOT_PATH$input_path"
39574    fi
39575  fi
39576
39577  # remove trailing .exe if any
39578  new_path="${new_path/%.exe/}"
39579
39580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39581
39582  # First separate the path from the arguments. This will split at the first
39583  # space.
39584  complete="$BUILD_CC"
39585  path="${complete%% *}"
39586  tmp="$complete EOL"
39587  arguments="${tmp#* }"
39588
39589  # Input might be given as Windows format, start by converting to
39590  # unix format.
39591  new_path="$path"
39592
39593  windows_path="$new_path"
39594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39595    unix_path=`$CYGPATH -u "$windows_path"`
39596    new_path="$unix_path"
39597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39599    new_path="$unix_path"
39600  fi
39601
39602
39603  # Now try to locate executable using which
39604  new_path=`$WHICH "$new_path" 2> /dev/null`
39605
39606  if test "x$new_path" = x; then
39607    # Oops. Which didn't find the executable.
39608    # The splitting of arguments from the executable at a space might have been incorrect,
39609    # since paths with space are more likely in Windows. Give it another try with the whole
39610    # argument.
39611    path="$complete"
39612    arguments="EOL"
39613    new_path="$path"
39614
39615  windows_path="$new_path"
39616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39617    unix_path=`$CYGPATH -u "$windows_path"`
39618    new_path="$unix_path"
39619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39621    new_path="$unix_path"
39622  fi
39623
39624
39625    new_path=`$WHICH "$new_path" 2> /dev/null`
39626    # bat and cmd files are not always considered executable in MSYS causing which
39627    # to not find them
39628    if test "x$new_path" = x \
39629        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39630        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39631      new_path="$path"
39632
39633  windows_path="$new_path"
39634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39635    unix_path=`$CYGPATH -u "$windows_path"`
39636    new_path="$unix_path"
39637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39639    new_path="$unix_path"
39640  fi
39641
39642    fi
39643
39644    if test "x$new_path" = x; then
39645      # It's still not found. Now this is an unrecoverable error.
39646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39647$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39648      has_space=`$ECHO "$complete" | $GREP " "`
39649      if test "x$has_space" != x; then
39650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39652      fi
39653      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39654    fi
39655  fi
39656
39657  # Now new_path has a complete unix path to the binary
39658  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39659    # Keep paths in /bin as-is, but remove trailing .exe if any
39660    new_path="${new_path/%.exe/}"
39661    # Do not save /bin paths to all_fixpath_prefixes!
39662  else
39663    # Not in mixed or Windows style, start by that.
39664    new_path=`cmd //c echo $new_path`
39665
39666  input_path="$new_path"
39667  # Check if we need to convert this using DOS-style short mode. If the path
39668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39669  # take no chances and rewrite it.
39670  # Note: m4 eats our [], so we need to use [ and ] instead.
39671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39672  if test "x$has_forbidden_chars" != x; then
39673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39675  fi
39676
39677    # Output is in $new_path
39678
39679  windows_path="$new_path"
39680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39681    unix_path=`$CYGPATH -u "$windows_path"`
39682    new_path="$unix_path"
39683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39685    new_path="$unix_path"
39686  fi
39687
39688    # remove trailing .exe if any
39689    new_path="${new_path/%.exe/}"
39690
39691    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39692    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39693  fi
39694
39695  else
39696    # We're on a unix platform. Hooray! :)
39697    # First separate the path from the arguments. This will split at the first
39698    # space.
39699    complete="$BUILD_CC"
39700    path="${complete%% *}"
39701    tmp="$complete EOL"
39702    arguments="${tmp#* }"
39703
39704    # Cannot rely on the command "which" here since it doesn't always work.
39705    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39706    if test -z "$is_absolute_path"; then
39707      # Path to executable is not absolute. Find it.
39708      IFS_save="$IFS"
39709      IFS=:
39710      for p in $PATH; do
39711        if test -f "$p/$path" && test -x "$p/$path"; then
39712          new_path="$p/$path"
39713          break
39714        fi
39715      done
39716      IFS="$IFS_save"
39717    else
39718      # This is an absolute path, we can use it without further modifications.
39719      new_path="$path"
39720    fi
39721
39722    if test "x$new_path" = x; then
39723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39724$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39725      has_space=`$ECHO "$complete" | $GREP " "`
39726      if test "x$has_space" != x; then
39727        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39728$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39729      fi
39730      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39731    fi
39732  fi
39733
39734  # Now join together the path and the arguments once again
39735  if test "x$arguments" != xEOL; then
39736    new_complete="$new_path ${arguments% *}"
39737  else
39738    new_complete="$new_path"
39739  fi
39740
39741  if test "x$complete" != "x$new_complete"; then
39742    BUILD_CC="$new_complete"
39743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39744$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39745  fi
39746
39747
39748
39749  # Publish this variable in the help.
39750
39751
39752  if test "x$BUILD_CXX" = x; then
39753    # The variable is not set by user, try to locate tool using the code snippet
39754    for ac_prog in cl CC g++
39755do
39756  # Extract the first word of "$ac_prog", so it can be a program name with args.
39757set dummy $ac_prog; ac_word=$2
39758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39759$as_echo_n "checking for $ac_word... " >&6; }
39760if ${ac_cv_path_BUILD_CXX+:} false; then :
39761  $as_echo_n "(cached) " >&6
39762else
39763  case $BUILD_CXX in
39764  [\\/]* | ?:[\\/]*)
39765  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39766  ;;
39767  *)
39768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39769for as_dir in $PATH
39770do
39771  IFS=$as_save_IFS
39772  test -z "$as_dir" && as_dir=.
39773    for ac_exec_ext in '' $ac_executable_extensions; do
39774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39775    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39777    break 2
39778  fi
39779done
39780  done
39781IFS=$as_save_IFS
39782
39783  ;;
39784esac
39785fi
39786BUILD_CXX=$ac_cv_path_BUILD_CXX
39787if test -n "$BUILD_CXX"; then
39788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39789$as_echo "$BUILD_CXX" >&6; }
39790else
39791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39792$as_echo "no" >&6; }
39793fi
39794
39795
39796  test -n "$BUILD_CXX" && break
39797done
39798
39799  else
39800    # The variable is set, but is it from the command line or the environment?
39801
39802    # Try to remove the string !BUILD_CXX! from our list.
39803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39805      # If it failed, the variable was not from the command line. Ignore it,
39806      # but warn the user (except for BASH, which is always set by the calling BASH).
39807      if test "xBUILD_CXX" != xBASH; then
39808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39809$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39810      fi
39811      # Try to locate tool using the code snippet
39812      for ac_prog in cl CC g++
39813do
39814  # Extract the first word of "$ac_prog", so it can be a program name with args.
39815set dummy $ac_prog; ac_word=$2
39816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39817$as_echo_n "checking for $ac_word... " >&6; }
39818if ${ac_cv_path_BUILD_CXX+:} false; then :
39819  $as_echo_n "(cached) " >&6
39820else
39821  case $BUILD_CXX in
39822  [\\/]* | ?:[\\/]*)
39823  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39824  ;;
39825  *)
39826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39827for as_dir in $PATH
39828do
39829  IFS=$as_save_IFS
39830  test -z "$as_dir" && as_dir=.
39831    for ac_exec_ext in '' $ac_executable_extensions; do
39832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39833    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39835    break 2
39836  fi
39837done
39838  done
39839IFS=$as_save_IFS
39840
39841  ;;
39842esac
39843fi
39844BUILD_CXX=$ac_cv_path_BUILD_CXX
39845if test -n "$BUILD_CXX"; then
39846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39847$as_echo "$BUILD_CXX" >&6; }
39848else
39849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39850$as_echo "no" >&6; }
39851fi
39852
39853
39854  test -n "$BUILD_CXX" && break
39855done
39856
39857    else
39858      # If it succeeded, then it was overridden by the user. We will use it
39859      # for the tool.
39860
39861      # First remove it from the list of overridden variables, so we can test
39862      # for unknown variables in the end.
39863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39864
39865      # Check if the provided tool contains a complete path.
39866      tool_specified="$BUILD_CXX"
39867      tool_basename="${tool_specified##*/}"
39868      if test "x$tool_basename" = "x$tool_specified"; then
39869        # A command without a complete path is provided, search $PATH.
39870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39871$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39872        # Extract the first word of "$tool_basename", so it can be a program name with args.
39873set dummy $tool_basename; ac_word=$2
39874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39875$as_echo_n "checking for $ac_word... " >&6; }
39876if ${ac_cv_path_BUILD_CXX+:} false; then :
39877  $as_echo_n "(cached) " >&6
39878else
39879  case $BUILD_CXX in
39880  [\\/]* | ?:[\\/]*)
39881  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39882  ;;
39883  *)
39884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39885for as_dir in $PATH
39886do
39887  IFS=$as_save_IFS
39888  test -z "$as_dir" && as_dir=.
39889    for ac_exec_ext in '' $ac_executable_extensions; do
39890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39891    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39893    break 2
39894  fi
39895done
39896  done
39897IFS=$as_save_IFS
39898
39899  ;;
39900esac
39901fi
39902BUILD_CXX=$ac_cv_path_BUILD_CXX
39903if test -n "$BUILD_CXX"; then
39904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39905$as_echo "$BUILD_CXX" >&6; }
39906else
39907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39908$as_echo "no" >&6; }
39909fi
39910
39911
39912        if test "x$BUILD_CXX" = x; then
39913          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39914        fi
39915      else
39916        # Otherwise we believe it is a complete path. Use it as it is.
39917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39918$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39920$as_echo_n "checking for BUILD_CXX... " >&6; }
39921        if test ! -x "$tool_specified"; then
39922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39923$as_echo "not found" >&6; }
39924          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39925        fi
39926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39927$as_echo "$tool_specified" >&6; }
39928      fi
39929    fi
39930  fi
39931
39932
39933
39934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39935
39936  # First separate the path from the arguments. This will split at the first
39937  # space.
39938  complete="$BUILD_CXX"
39939  path="${complete%% *}"
39940  tmp="$complete EOL"
39941  arguments="${tmp#* }"
39942
39943  # Input might be given as Windows format, start by converting to
39944  # unix format.
39945  new_path=`$CYGPATH -u "$path"`
39946
39947  # Now try to locate executable using which
39948  new_path=`$WHICH "$new_path" 2> /dev/null`
39949  # bat and cmd files are not always considered executable in cygwin causing which
39950  # to not find them
39951  if test "x$new_path" = x \
39952      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39953      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39954    new_path=`$CYGPATH -u "$path"`
39955  fi
39956  if test "x$new_path" = x; then
39957    # Oops. Which didn't find the executable.
39958    # The splitting of arguments from the executable at a space might have been incorrect,
39959    # since paths with space are more likely in Windows. Give it another try with the whole
39960    # argument.
39961    path="$complete"
39962    arguments="EOL"
39963    new_path=`$CYGPATH -u "$path"`
39964    new_path=`$WHICH "$new_path" 2> /dev/null`
39965    # bat and cmd files are not always considered executable in cygwin causing which
39966    # to not find them
39967    if test "x$new_path" = x \
39968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39970      new_path=`$CYGPATH -u "$path"`
39971    fi
39972    if test "x$new_path" = x; then
39973      # It's still not found. Now this is an unrecoverable error.
39974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39975$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39976      has_space=`$ECHO "$complete" | $GREP " "`
39977      if test "x$has_space" != x; then
39978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39980      fi
39981      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39982    fi
39983  fi
39984
39985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39988  # "foo.exe" is OK but "foo" is an error.
39989  #
39990  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39991  # It is also a way to make sure we got the proper file name for the real test later on.
39992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39993  if test "x$test_shortpath" = x; then
39994    # Short path failed, file does not exist as specified.
39995    # Try adding .exe or .cmd
39996    if test -f "${new_path}.exe"; then
39997      input_to_shortpath="${new_path}.exe"
39998    elif test -f "${new_path}.cmd"; then
39999      input_to_shortpath="${new_path}.cmd"
40000    else
40001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40002$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40005      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40006    fi
40007  else
40008    input_to_shortpath="$new_path"
40009  fi
40010
40011  # Call helper function which possibly converts this using DOS-style short mode.
40012  # If so, the updated path is stored in $new_path.
40013  new_path="$input_to_shortpath"
40014
40015  input_path="$input_to_shortpath"
40016  # Check if we need to convert this using DOS-style short mode. If the path
40017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40018  # take no chances and rewrite it.
40019  # Note: m4 eats our [], so we need to use [ and ] instead.
40020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40021  if test "x$has_forbidden_chars" != x; then
40022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40026      # Going to short mode and back again did indeed matter. Since short mode is
40027      # case insensitive, let's make it lowercase to improve readability.
40028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40029      # Now convert it back to Unix-stile (cygpath)
40030      input_path=`$CYGPATH -u "$shortmode_path"`
40031      new_path="$input_path"
40032    fi
40033  fi
40034
40035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40036  if test "x$test_cygdrive_prefix" = x; then
40037    # As a simple fix, exclude /usr/bin since it's not a real path.
40038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40040      # a path prefixed by /cygdrive for fixpath to work.
40041      new_path="$CYGWIN_ROOT_PATH$input_path"
40042    fi
40043  fi
40044
40045  # remove trailing .exe if any
40046  new_path="${new_path/%.exe/}"
40047
40048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40049
40050  # First separate the path from the arguments. This will split at the first
40051  # space.
40052  complete="$BUILD_CXX"
40053  path="${complete%% *}"
40054  tmp="$complete EOL"
40055  arguments="${tmp#* }"
40056
40057  # Input might be given as Windows format, start by converting to
40058  # unix format.
40059  new_path="$path"
40060
40061  windows_path="$new_path"
40062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40063    unix_path=`$CYGPATH -u "$windows_path"`
40064    new_path="$unix_path"
40065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40067    new_path="$unix_path"
40068  fi
40069
40070
40071  # Now try to locate executable using which
40072  new_path=`$WHICH "$new_path" 2> /dev/null`
40073
40074  if test "x$new_path" = x; then
40075    # Oops. Which didn't find the executable.
40076    # The splitting of arguments from the executable at a space might have been incorrect,
40077    # since paths with space are more likely in Windows. Give it another try with the whole
40078    # argument.
40079    path="$complete"
40080    arguments="EOL"
40081    new_path="$path"
40082
40083  windows_path="$new_path"
40084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40085    unix_path=`$CYGPATH -u "$windows_path"`
40086    new_path="$unix_path"
40087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40089    new_path="$unix_path"
40090  fi
40091
40092
40093    new_path=`$WHICH "$new_path" 2> /dev/null`
40094    # bat and cmd files are not always considered executable in MSYS causing which
40095    # to not find them
40096    if test "x$new_path" = x \
40097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40099      new_path="$path"
40100
40101  windows_path="$new_path"
40102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40103    unix_path=`$CYGPATH -u "$windows_path"`
40104    new_path="$unix_path"
40105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40107    new_path="$unix_path"
40108  fi
40109
40110    fi
40111
40112    if test "x$new_path" = x; then
40113      # It's still not found. Now this is an unrecoverable error.
40114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40115$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40116      has_space=`$ECHO "$complete" | $GREP " "`
40117      if test "x$has_space" != x; then
40118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40120      fi
40121      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40122    fi
40123  fi
40124
40125  # Now new_path has a complete unix path to the binary
40126  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40127    # Keep paths in /bin as-is, but remove trailing .exe if any
40128    new_path="${new_path/%.exe/}"
40129    # Do not save /bin paths to all_fixpath_prefixes!
40130  else
40131    # Not in mixed or Windows style, start by that.
40132    new_path=`cmd //c echo $new_path`
40133
40134  input_path="$new_path"
40135  # Check if we need to convert this using DOS-style short mode. If the path
40136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40137  # take no chances and rewrite it.
40138  # Note: m4 eats our [], so we need to use [ and ] instead.
40139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40140  if test "x$has_forbidden_chars" != x; then
40141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40142    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40143  fi
40144
40145    # Output is in $new_path
40146
40147  windows_path="$new_path"
40148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40149    unix_path=`$CYGPATH -u "$windows_path"`
40150    new_path="$unix_path"
40151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40153    new_path="$unix_path"
40154  fi
40155
40156    # remove trailing .exe if any
40157    new_path="${new_path/%.exe/}"
40158
40159    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40160    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40161  fi
40162
40163  else
40164    # We're on a unix platform. Hooray! :)
40165    # First separate the path from the arguments. This will split at the first
40166    # space.
40167    complete="$BUILD_CXX"
40168    path="${complete%% *}"
40169    tmp="$complete EOL"
40170    arguments="${tmp#* }"
40171
40172    # Cannot rely on the command "which" here since it doesn't always work.
40173    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40174    if test -z "$is_absolute_path"; then
40175      # Path to executable is not absolute. Find it.
40176      IFS_save="$IFS"
40177      IFS=:
40178      for p in $PATH; do
40179        if test -f "$p/$path" && test -x "$p/$path"; then
40180          new_path="$p/$path"
40181          break
40182        fi
40183      done
40184      IFS="$IFS_save"
40185    else
40186      # This is an absolute path, we can use it without further modifications.
40187      new_path="$path"
40188    fi
40189
40190    if test "x$new_path" = x; then
40191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40192$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40193      has_space=`$ECHO "$complete" | $GREP " "`
40194      if test "x$has_space" != x; then
40195        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40196$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40197      fi
40198      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40199    fi
40200  fi
40201
40202  # Now join together the path and the arguments once again
40203  if test "x$arguments" != xEOL; then
40204    new_complete="$new_path ${arguments% *}"
40205  else
40206    new_complete="$new_path"
40207  fi
40208
40209  if test "x$complete" != "x$new_complete"; then
40210    BUILD_CXX="$new_complete"
40211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40212$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40213  fi
40214
40215
40216
40217  # Publish this variable in the help.
40218
40219
40220  if test "x$BUILD_LD" = x; then
40221    # The variable is not set by user, try to locate tool using the code snippet
40222    for ac_prog in ld
40223do
40224  # Extract the first word of "$ac_prog", so it can be a program name with args.
40225set dummy $ac_prog; ac_word=$2
40226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40227$as_echo_n "checking for $ac_word... " >&6; }
40228if ${ac_cv_path_BUILD_LD+:} false; then :
40229  $as_echo_n "(cached) " >&6
40230else
40231  case $BUILD_LD in
40232  [\\/]* | ?:[\\/]*)
40233  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40234  ;;
40235  *)
40236  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40237for as_dir in $PATH
40238do
40239  IFS=$as_save_IFS
40240  test -z "$as_dir" && as_dir=.
40241    for ac_exec_ext in '' $ac_executable_extensions; do
40242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40243    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40245    break 2
40246  fi
40247done
40248  done
40249IFS=$as_save_IFS
40250
40251  ;;
40252esac
40253fi
40254BUILD_LD=$ac_cv_path_BUILD_LD
40255if test -n "$BUILD_LD"; then
40256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40257$as_echo "$BUILD_LD" >&6; }
40258else
40259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40260$as_echo "no" >&6; }
40261fi
40262
40263
40264  test -n "$BUILD_LD" && break
40265done
40266
40267  else
40268    # The variable is set, but is it from the command line or the environment?
40269
40270    # Try to remove the string !BUILD_LD! from our list.
40271    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40272    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40273      # If it failed, the variable was not from the command line. Ignore it,
40274      # but warn the user (except for BASH, which is always set by the calling BASH).
40275      if test "xBUILD_LD" != xBASH; then
40276        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40277$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40278      fi
40279      # Try to locate tool using the code snippet
40280      for ac_prog in ld
40281do
40282  # Extract the first word of "$ac_prog", so it can be a program name with args.
40283set dummy $ac_prog; ac_word=$2
40284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40285$as_echo_n "checking for $ac_word... " >&6; }
40286if ${ac_cv_path_BUILD_LD+:} false; then :
40287  $as_echo_n "(cached) " >&6
40288else
40289  case $BUILD_LD in
40290  [\\/]* | ?:[\\/]*)
40291  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40292  ;;
40293  *)
40294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40295for as_dir in $PATH
40296do
40297  IFS=$as_save_IFS
40298  test -z "$as_dir" && as_dir=.
40299    for ac_exec_ext in '' $ac_executable_extensions; do
40300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40301    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40303    break 2
40304  fi
40305done
40306  done
40307IFS=$as_save_IFS
40308
40309  ;;
40310esac
40311fi
40312BUILD_LD=$ac_cv_path_BUILD_LD
40313if test -n "$BUILD_LD"; then
40314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40315$as_echo "$BUILD_LD" >&6; }
40316else
40317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40318$as_echo "no" >&6; }
40319fi
40320
40321
40322  test -n "$BUILD_LD" && break
40323done
40324
40325    else
40326      # If it succeeded, then it was overridden by the user. We will use it
40327      # for the tool.
40328
40329      # First remove it from the list of overridden variables, so we can test
40330      # for unknown variables in the end.
40331      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40332
40333      # Check if the provided tool contains a complete path.
40334      tool_specified="$BUILD_LD"
40335      tool_basename="${tool_specified##*/}"
40336      if test "x$tool_basename" = "x$tool_specified"; then
40337        # A command without a complete path is provided, search $PATH.
40338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40339$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40340        # Extract the first word of "$tool_basename", so it can be a program name with args.
40341set dummy $tool_basename; ac_word=$2
40342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40343$as_echo_n "checking for $ac_word... " >&6; }
40344if ${ac_cv_path_BUILD_LD+:} false; then :
40345  $as_echo_n "(cached) " >&6
40346else
40347  case $BUILD_LD in
40348  [\\/]* | ?:[\\/]*)
40349  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40350  ;;
40351  *)
40352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40353for as_dir in $PATH
40354do
40355  IFS=$as_save_IFS
40356  test -z "$as_dir" && as_dir=.
40357    for ac_exec_ext in '' $ac_executable_extensions; do
40358  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40359    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40360    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40361    break 2
40362  fi
40363done
40364  done
40365IFS=$as_save_IFS
40366
40367  ;;
40368esac
40369fi
40370BUILD_LD=$ac_cv_path_BUILD_LD
40371if test -n "$BUILD_LD"; then
40372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40373$as_echo "$BUILD_LD" >&6; }
40374else
40375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40376$as_echo "no" >&6; }
40377fi
40378
40379
40380        if test "x$BUILD_LD" = x; then
40381          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40382        fi
40383      else
40384        # Otherwise we believe it is a complete path. Use it as it is.
40385        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40386$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40387        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40388$as_echo_n "checking for BUILD_LD... " >&6; }
40389        if test ! -x "$tool_specified"; then
40390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40391$as_echo "not found" >&6; }
40392          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40393        fi
40394        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40395$as_echo "$tool_specified" >&6; }
40396      fi
40397    fi
40398  fi
40399
40400
40401
40402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403
40404  # First separate the path from the arguments. This will split at the first
40405  # space.
40406  complete="$BUILD_LD"
40407  path="${complete%% *}"
40408  tmp="$complete EOL"
40409  arguments="${tmp#* }"
40410
40411  # Input might be given as Windows format, start by converting to
40412  # unix format.
40413  new_path=`$CYGPATH -u "$path"`
40414
40415  # Now try to locate executable using which
40416  new_path=`$WHICH "$new_path" 2> /dev/null`
40417  # bat and cmd files are not always considered executable in cygwin causing which
40418  # to not find them
40419  if test "x$new_path" = x \
40420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40422    new_path=`$CYGPATH -u "$path"`
40423  fi
40424  if test "x$new_path" = x; then
40425    # Oops. Which didn't find the executable.
40426    # The splitting of arguments from the executable at a space might have been incorrect,
40427    # since paths with space are more likely in Windows. Give it another try with the whole
40428    # argument.
40429    path="$complete"
40430    arguments="EOL"
40431    new_path=`$CYGPATH -u "$path"`
40432    new_path=`$WHICH "$new_path" 2> /dev/null`
40433    # bat and cmd files are not always considered executable in cygwin causing which
40434    # to not find them
40435    if test "x$new_path" = x \
40436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40438      new_path=`$CYGPATH -u "$path"`
40439    fi
40440    if test "x$new_path" = x; then
40441      # It's still not found. Now this is an unrecoverable error.
40442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40443$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40444      has_space=`$ECHO "$complete" | $GREP " "`
40445      if test "x$has_space" != x; then
40446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40448      fi
40449      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40450    fi
40451  fi
40452
40453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40456  # "foo.exe" is OK but "foo" is an error.
40457  #
40458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40459  # It is also a way to make sure we got the proper file name for the real test later on.
40460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40461  if test "x$test_shortpath" = x; then
40462    # Short path failed, file does not exist as specified.
40463    # Try adding .exe or .cmd
40464    if test -f "${new_path}.exe"; then
40465      input_to_shortpath="${new_path}.exe"
40466    elif test -f "${new_path}.cmd"; then
40467      input_to_shortpath="${new_path}.cmd"
40468    else
40469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40470$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40473      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40474    fi
40475  else
40476    input_to_shortpath="$new_path"
40477  fi
40478
40479  # Call helper function which possibly converts this using DOS-style short mode.
40480  # If so, the updated path is stored in $new_path.
40481  new_path="$input_to_shortpath"
40482
40483  input_path="$input_to_shortpath"
40484  # Check if we need to convert this using DOS-style short mode. If the path
40485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40486  # take no chances and rewrite it.
40487  # Note: m4 eats our [], so we need to use [ and ] instead.
40488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40489  if test "x$has_forbidden_chars" != x; then
40490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40494      # Going to short mode and back again did indeed matter. Since short mode is
40495      # case insensitive, let's make it lowercase to improve readability.
40496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40497      # Now convert it back to Unix-stile (cygpath)
40498      input_path=`$CYGPATH -u "$shortmode_path"`
40499      new_path="$input_path"
40500    fi
40501  fi
40502
40503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40504  if test "x$test_cygdrive_prefix" = x; then
40505    # As a simple fix, exclude /usr/bin since it's not a real path.
40506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40508      # a path prefixed by /cygdrive for fixpath to work.
40509      new_path="$CYGWIN_ROOT_PATH$input_path"
40510    fi
40511  fi
40512
40513  # remove trailing .exe if any
40514  new_path="${new_path/%.exe/}"
40515
40516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40517
40518  # First separate the path from the arguments. This will split at the first
40519  # space.
40520  complete="$BUILD_LD"
40521  path="${complete%% *}"
40522  tmp="$complete EOL"
40523  arguments="${tmp#* }"
40524
40525  # Input might be given as Windows format, start by converting to
40526  # unix format.
40527  new_path="$path"
40528
40529  windows_path="$new_path"
40530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40531    unix_path=`$CYGPATH -u "$windows_path"`
40532    new_path="$unix_path"
40533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40535    new_path="$unix_path"
40536  fi
40537
40538
40539  # Now try to locate executable using which
40540  new_path=`$WHICH "$new_path" 2> /dev/null`
40541
40542  if test "x$new_path" = x; then
40543    # Oops. Which didn't find the executable.
40544    # The splitting of arguments from the executable at a space might have been incorrect,
40545    # since paths with space are more likely in Windows. Give it another try with the whole
40546    # argument.
40547    path="$complete"
40548    arguments="EOL"
40549    new_path="$path"
40550
40551  windows_path="$new_path"
40552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40553    unix_path=`$CYGPATH -u "$windows_path"`
40554    new_path="$unix_path"
40555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40557    new_path="$unix_path"
40558  fi
40559
40560
40561    new_path=`$WHICH "$new_path" 2> /dev/null`
40562    # bat and cmd files are not always considered executable in MSYS causing which
40563    # to not find them
40564    if test "x$new_path" = x \
40565        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40566        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40567      new_path="$path"
40568
40569  windows_path="$new_path"
40570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40571    unix_path=`$CYGPATH -u "$windows_path"`
40572    new_path="$unix_path"
40573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40575    new_path="$unix_path"
40576  fi
40577
40578    fi
40579
40580    if test "x$new_path" = x; then
40581      # It's still not found. Now this is an unrecoverable error.
40582      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40583$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40584      has_space=`$ECHO "$complete" | $GREP " "`
40585      if test "x$has_space" != x; then
40586        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40587$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40588      fi
40589      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40590    fi
40591  fi
40592
40593  # Now new_path has a complete unix path to the binary
40594  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40595    # Keep paths in /bin as-is, but remove trailing .exe if any
40596    new_path="${new_path/%.exe/}"
40597    # Do not save /bin paths to all_fixpath_prefixes!
40598  else
40599    # Not in mixed or Windows style, start by that.
40600    new_path=`cmd //c echo $new_path`
40601
40602  input_path="$new_path"
40603  # Check if we need to convert this using DOS-style short mode. If the path
40604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40605  # take no chances and rewrite it.
40606  # Note: m4 eats our [], so we need to use [ and ] instead.
40607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40608  if test "x$has_forbidden_chars" != x; then
40609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40610    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40611  fi
40612
40613    # Output is in $new_path
40614
40615  windows_path="$new_path"
40616  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40617    unix_path=`$CYGPATH -u "$windows_path"`
40618    new_path="$unix_path"
40619  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40620    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40621    new_path="$unix_path"
40622  fi
40623
40624    # remove trailing .exe if any
40625    new_path="${new_path/%.exe/}"
40626
40627    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40628    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40629  fi
40630
40631  else
40632    # We're on a unix platform. Hooray! :)
40633    # First separate the path from the arguments. This will split at the first
40634    # space.
40635    complete="$BUILD_LD"
40636    path="${complete%% *}"
40637    tmp="$complete EOL"
40638    arguments="${tmp#* }"
40639
40640    # Cannot rely on the command "which" here since it doesn't always work.
40641    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40642    if test -z "$is_absolute_path"; then
40643      # Path to executable is not absolute. Find it.
40644      IFS_save="$IFS"
40645      IFS=:
40646      for p in $PATH; do
40647        if test -f "$p/$path" && test -x "$p/$path"; then
40648          new_path="$p/$path"
40649          break
40650        fi
40651      done
40652      IFS="$IFS_save"
40653    else
40654      # This is an absolute path, we can use it without further modifications.
40655      new_path="$path"
40656    fi
40657
40658    if test "x$new_path" = x; then
40659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40660$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40661      has_space=`$ECHO "$complete" | $GREP " "`
40662      if test "x$has_space" != x; then
40663        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40664$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40665      fi
40666      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40667    fi
40668  fi
40669
40670  # Now join together the path and the arguments once again
40671  if test "x$arguments" != xEOL; then
40672    new_complete="$new_path ${arguments% *}"
40673  else
40674    new_complete="$new_path"
40675  fi
40676
40677  if test "x$complete" != "x$new_complete"; then
40678    BUILD_LD="$new_complete"
40679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40680$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40681  fi
40682
40683  else
40684    # If we are not cross compiling, use the normal target compilers for
40685    # building the build platform executables.
40686    BUILD_CC="$CC"
40687    BUILD_CXX="$CXX"
40688    BUILD_LD="$LD"
40689  fi
40690
40691
40692
40693
40694
40695
40696  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40697    # For hotspot, we need these in Windows mixed path,
40698    # so rewrite them all. Need added .exe suffix.
40699    HOTSPOT_CXX="$CXX.exe"
40700    HOTSPOT_LD="$LD.exe"
40701    HOTSPOT_MT="$MT.exe"
40702    HOTSPOT_RC="$RC.exe"
40703
40704  unix_path="$HOTSPOT_CXX"
40705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40706    windows_path=`$CYGPATH -m "$unix_path"`
40707    HOTSPOT_CXX="$windows_path"
40708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40709    windows_path=`cmd //c echo $unix_path`
40710    HOTSPOT_CXX="$windows_path"
40711  fi
40712
40713
40714  unix_path="$HOTSPOT_LD"
40715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40716    windows_path=`$CYGPATH -m "$unix_path"`
40717    HOTSPOT_LD="$windows_path"
40718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40719    windows_path=`cmd //c echo $unix_path`
40720    HOTSPOT_LD="$windows_path"
40721  fi
40722
40723
40724  unix_path="$HOTSPOT_MT"
40725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40726    windows_path=`$CYGPATH -m "$unix_path"`
40727    HOTSPOT_MT="$windows_path"
40728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40729    windows_path=`cmd //c echo $unix_path`
40730    HOTSPOT_MT="$windows_path"
40731  fi
40732
40733
40734  unix_path="$HOTSPOT_RC"
40735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40736    windows_path=`$CYGPATH -m "$unix_path"`
40737    HOTSPOT_RC="$windows_path"
40738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40739    windows_path=`cmd //c echo $unix_path`
40740    HOTSPOT_RC="$windows_path"
40741  fi
40742
40743
40744
40745  else
40746    HOTSPOT_CXX="$CXX"
40747    HOTSPOT_LD="$LD"
40748  fi
40749
40750
40751
40752  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40753    USE_CLANG=true
40754  fi
40755
40756
40757  # LDEXE is the linker to use, when creating executables. Not really used.
40758  # FIXME: These should just be removed!
40759  LDEXE="$LD"
40760  LDEXECXX="$LDCXX"
40761
40762
40763
40764
40765
40766
40767  # The package path is used only on macosx?
40768  # FIXME: clean this up, and/or move it elsewhere.
40769  PACKAGE_PATH=/opt/local
40770
40771
40772  # Check for extra potential brokenness.
40773  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40774    # On Windows, double-check that we got the right compiler.
40775    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40776    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40777    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40778      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40779        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
40780      fi
40781    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40782      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40783        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40784      fi
40785    fi
40786  fi
40787
40788  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40789    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40790    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40791    # This is later checked when setting flags.
40792
40793    # "-Og" suppported for GCC 4.8 and later
40794    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40795
40796  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40797$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40798  supports=yes
40799
40800  saved_cflags="$CFLAGS"
40801  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40802  ac_ext=c
40803ac_cpp='$CPP $CPPFLAGS'
40804ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40805ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40806ac_compiler_gnu=$ac_cv_c_compiler_gnu
40807
40808  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40809/* end confdefs.h.  */
40810int i;
40811_ACEOF
40812if ac_fn_c_try_compile "$LINENO"; then :
40813
40814else
40815  supports=no
40816fi
40817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40818  ac_ext=cpp
40819ac_cpp='$CXXCPP $CPPFLAGS'
40820ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40821ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40822ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40823
40824  CFLAGS="$saved_cflags"
40825
40826  saved_cxxflags="$CXXFLAGS"
40827  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40828  ac_ext=cpp
40829ac_cpp='$CXXCPP $CPPFLAGS'
40830ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40831ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40832ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40833
40834  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40835/* end confdefs.h.  */
40836int i;
40837_ACEOF
40838if ac_fn_cxx_try_compile "$LINENO"; then :
40839
40840else
40841  supports=no
40842fi
40843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40844  ac_ext=cpp
40845ac_cpp='$CXXCPP $CPPFLAGS'
40846ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40847ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40848ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40849
40850  CXXFLAGS="$saved_cxxflags"
40851
40852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40853$as_echo "$supports" >&6; }
40854  if test "x$supports" = "xyes" ; then
40855    HAS_CFLAG_OPTIMIZE_DEBUG=true
40856  else
40857    HAS_CFLAG_OPTIMIZE_DEBUG=false
40858  fi
40859
40860
40861    # "-z relro" supported in GNU binutils 2.17 and later
40862    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40863
40864  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40865$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40866  supports=yes
40867
40868  saved_ldflags="$LDFLAGS"
40869  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40870  ac_ext=c
40871ac_cpp='$CPP $CPPFLAGS'
40872ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40873ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40874ac_compiler_gnu=$ac_cv_c_compiler_gnu
40875
40876  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40877/* end confdefs.h.  */
40878
40879int
40880main ()
40881{
40882
40883  ;
40884  return 0;
40885}
40886_ACEOF
40887if ac_fn_c_try_link "$LINENO"; then :
40888
40889else
40890  supports=no
40891fi
40892rm -f core conftest.err conftest.$ac_objext \
40893    conftest$ac_exeext conftest.$ac_ext
40894  ac_ext=cpp
40895ac_cpp='$CXXCPP $CPPFLAGS'
40896ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40897ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40898ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40899
40900  LDFLAGS="$saved_ldflags"
40901
40902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40903$as_echo "$supports" >&6; }
40904  if test "x$supports" = "xyes" ; then
40905    HAS_LINKER_RELRO=true
40906  else
40907    HAS_LINKER_RELRO=false
40908  fi
40909
40910
40911    # "-z now" supported in GNU binutils 2.11 and later
40912    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40913
40914  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40915$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40916  supports=yes
40917
40918  saved_ldflags="$LDFLAGS"
40919  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40920  ac_ext=c
40921ac_cpp='$CPP $CPPFLAGS'
40922ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40923ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40924ac_compiler_gnu=$ac_cv_c_compiler_gnu
40925
40926  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40927/* end confdefs.h.  */
40928
40929int
40930main ()
40931{
40932
40933  ;
40934  return 0;
40935}
40936_ACEOF
40937if ac_fn_c_try_link "$LINENO"; then :
40938
40939else
40940  supports=no
40941fi
40942rm -f core conftest.err conftest.$ac_objext \
40943    conftest$ac_exeext conftest.$ac_ext
40944  ac_ext=cpp
40945ac_cpp='$CXXCPP $CPPFLAGS'
40946ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40947ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40948ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40949
40950  LDFLAGS="$saved_ldflags"
40951
40952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40953$as_echo "$supports" >&6; }
40954  if test "x$supports" = "xyes" ; then
40955    HAS_LINKER_NOW=true
40956  else
40957    HAS_LINKER_NOW=false
40958  fi
40959
40960  fi
40961
40962  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40963  # in executable.'
40964  USING_BROKEN_SUSE_LD=no
40965  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40966    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40967$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40968    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40969    $ECHO "int main() { }" > main.c
40970    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40972$as_echo "no" >&6; }
40973      USING_BROKEN_SUSE_LD=no
40974    else
40975      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40976$as_echo "yes" >&6; }
40977      USING_BROKEN_SUSE_LD=yes
40978    fi
40979    rm -rf version-script.map main.c a.out
40980  fi
40981
40982
40983
40984# Setup the JTReg Regression Test Harness.
40985
40986
40987# Check whether --with-jtreg was given.
40988if test "${with_jtreg+set}" = set; then :
40989  withval=$with_jtreg;
40990else
40991  with_jtreg=no
40992fi
40993
40994
40995  if test "x$with_jtreg" = xno; then
40996    # jtreg disabled
40997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40998$as_echo_n "checking for jtreg... " >&6; }
40999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41000$as_echo "no" >&6; }
41001  else
41002    if test "x$with_jtreg" != xyes; then
41003      # with path specified.
41004      JT_HOME="$with_jtreg"
41005    fi
41006
41007    if test "x$JT_HOME" != x; then
41008      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41009$as_echo_n "checking for jtreg... " >&6; }
41010
41011      # use JT_HOME enviroment var.
41012
41013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41014
41015  # Input might be given as Windows format, start by converting to
41016  # unix format.
41017  path="$JT_HOME"
41018  new_path=`$CYGPATH -u "$path"`
41019
41020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41023  # "foo.exe" is OK but "foo" is an error.
41024  #
41025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41026  # It is also a way to make sure we got the proper file name for the real test later on.
41027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41028  if test "x$test_shortpath" = x; then
41029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41030$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41031    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41032  fi
41033
41034  # Call helper function which possibly converts this using DOS-style short mode.
41035  # If so, the updated path is stored in $new_path.
41036
41037  input_path="$new_path"
41038  # Check if we need to convert this using DOS-style short mode. If the path
41039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41040  # take no chances and rewrite it.
41041  # Note: m4 eats our [], so we need to use [ and ] instead.
41042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41043  if test "x$has_forbidden_chars" != x; then
41044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41048      # Going to short mode and back again did indeed matter. Since short mode is
41049      # case insensitive, let's make it lowercase to improve readability.
41050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41051      # Now convert it back to Unix-stile (cygpath)
41052      input_path=`$CYGPATH -u "$shortmode_path"`
41053      new_path="$input_path"
41054    fi
41055  fi
41056
41057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41058  if test "x$test_cygdrive_prefix" = x; then
41059    # As a simple fix, exclude /usr/bin since it's not a real path.
41060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41062      # a path prefixed by /cygdrive for fixpath to work.
41063      new_path="$CYGWIN_ROOT_PATH$input_path"
41064    fi
41065  fi
41066
41067
41068  if test "x$path" != "x$new_path"; then
41069    JT_HOME="$new_path"
41070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41071$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41072  fi
41073
41074  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41075
41076  path="$JT_HOME"
41077  has_colon=`$ECHO $path | $GREP ^.:`
41078  new_path="$path"
41079  if test "x$has_colon" = x; then
41080    # Not in mixed or Windows style, start by that.
41081    new_path=`cmd //c echo $path`
41082  fi
41083
41084
41085  input_path="$new_path"
41086  # Check if we need to convert this using DOS-style short mode. If the path
41087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41088  # take no chances and rewrite it.
41089  # Note: m4 eats our [], so we need to use [ and ] instead.
41090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41091  if test "x$has_forbidden_chars" != x; then
41092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41094  fi
41095
41096
41097  windows_path="$new_path"
41098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41099    unix_path=`$CYGPATH -u "$windows_path"`
41100    new_path="$unix_path"
41101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41103    new_path="$unix_path"
41104  fi
41105
41106  if test "x$path" != "x$new_path"; then
41107    JT_HOME="$new_path"
41108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41109$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41110  fi
41111
41112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41114
41115  else
41116    # We're on a unix platform. Hooray! :)
41117    path="$JT_HOME"
41118    has_space=`$ECHO "$path" | $GREP " "`
41119    if test "x$has_space" != x; then
41120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41121$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41122      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41123    fi
41124
41125    # Use eval to expand a potential ~
41126    eval path="$path"
41127    if test ! -f "$path" && test ! -d "$path"; then
41128      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41129    fi
41130
41131    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41132  fi
41133
41134
41135      # jtreg win32 script works for everybody
41136      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41137
41138      if test ! -f "$JTREGEXE"; then
41139        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41140      fi
41141
41142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41143$as_echo "$JTREGEXE" >&6; }
41144    else
41145      # try to find jtreg on path
41146
41147
41148
41149  # Publish this variable in the help.
41150
41151
41152  if test "x$JTREGEXE" = x; then
41153    # The variable is not set by user, try to locate tool using the code snippet
41154    for ac_prog in jtreg
41155do
41156  # Extract the first word of "$ac_prog", so it can be a program name with args.
41157set dummy $ac_prog; ac_word=$2
41158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41159$as_echo_n "checking for $ac_word... " >&6; }
41160if ${ac_cv_path_JTREGEXE+:} false; then :
41161  $as_echo_n "(cached) " >&6
41162else
41163  case $JTREGEXE in
41164  [\\/]* | ?:[\\/]*)
41165  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41166  ;;
41167  *)
41168  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41169for as_dir in $PATH
41170do
41171  IFS=$as_save_IFS
41172  test -z "$as_dir" && as_dir=.
41173    for ac_exec_ext in '' $ac_executable_extensions; do
41174  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41175    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41176    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41177    break 2
41178  fi
41179done
41180  done
41181IFS=$as_save_IFS
41182
41183  ;;
41184esac
41185fi
41186JTREGEXE=$ac_cv_path_JTREGEXE
41187if test -n "$JTREGEXE"; then
41188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41189$as_echo "$JTREGEXE" >&6; }
41190else
41191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41192$as_echo "no" >&6; }
41193fi
41194
41195
41196  test -n "$JTREGEXE" && break
41197done
41198
41199  else
41200    # The variable is set, but is it from the command line or the environment?
41201
41202    # Try to remove the string !JTREGEXE! from our list.
41203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41205      # If it failed, the variable was not from the command line. Ignore it,
41206      # but warn the user (except for BASH, which is always set by the calling BASH).
41207      if test "xJTREGEXE" != xBASH; then
41208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41209$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41210      fi
41211      # Try to locate tool using the code snippet
41212      for ac_prog in jtreg
41213do
41214  # Extract the first word of "$ac_prog", so it can be a program name with args.
41215set dummy $ac_prog; ac_word=$2
41216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41217$as_echo_n "checking for $ac_word... " >&6; }
41218if ${ac_cv_path_JTREGEXE+:} false; then :
41219  $as_echo_n "(cached) " >&6
41220else
41221  case $JTREGEXE in
41222  [\\/]* | ?:[\\/]*)
41223  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41224  ;;
41225  *)
41226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41227for as_dir in $PATH
41228do
41229  IFS=$as_save_IFS
41230  test -z "$as_dir" && as_dir=.
41231    for ac_exec_ext in '' $ac_executable_extensions; do
41232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41233    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41235    break 2
41236  fi
41237done
41238  done
41239IFS=$as_save_IFS
41240
41241  ;;
41242esac
41243fi
41244JTREGEXE=$ac_cv_path_JTREGEXE
41245if test -n "$JTREGEXE"; then
41246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41247$as_echo "$JTREGEXE" >&6; }
41248else
41249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41250$as_echo "no" >&6; }
41251fi
41252
41253
41254  test -n "$JTREGEXE" && break
41255done
41256
41257    else
41258      # If it succeeded, then it was overridden by the user. We will use it
41259      # for the tool.
41260
41261      # First remove it from the list of overridden variables, so we can test
41262      # for unknown variables in the end.
41263      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41264
41265      # Check if the provided tool contains a complete path.
41266      tool_specified="$JTREGEXE"
41267      tool_basename="${tool_specified##*/}"
41268      if test "x$tool_basename" = "x$tool_specified"; then
41269        # A command without a complete path is provided, search $PATH.
41270        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41271$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41272        # Extract the first word of "$tool_basename", so it can be a program name with args.
41273set dummy $tool_basename; ac_word=$2
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41275$as_echo_n "checking for $ac_word... " >&6; }
41276if ${ac_cv_path_JTREGEXE+:} false; then :
41277  $as_echo_n "(cached) " >&6
41278else
41279  case $JTREGEXE in
41280  [\\/]* | ?:[\\/]*)
41281  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41282  ;;
41283  *)
41284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41285for as_dir in $PATH
41286do
41287  IFS=$as_save_IFS
41288  test -z "$as_dir" && as_dir=.
41289    for ac_exec_ext in '' $ac_executable_extensions; do
41290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41291    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41293    break 2
41294  fi
41295done
41296  done
41297IFS=$as_save_IFS
41298
41299  ;;
41300esac
41301fi
41302JTREGEXE=$ac_cv_path_JTREGEXE
41303if test -n "$JTREGEXE"; then
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41305$as_echo "$JTREGEXE" >&6; }
41306else
41307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41308$as_echo "no" >&6; }
41309fi
41310
41311
41312        if test "x$JTREGEXE" = x; then
41313          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41314        fi
41315      else
41316        # Otherwise we believe it is a complete path. Use it as it is.
41317        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41318$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41320$as_echo_n "checking for JTREGEXE... " >&6; }
41321        if test ! -x "$tool_specified"; then
41322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41323$as_echo "not found" >&6; }
41324          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41325        fi
41326        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41327$as_echo "$tool_specified" >&6; }
41328      fi
41329    fi
41330  fi
41331
41332
41333
41334  if test "x$JTREGEXE" = x; then
41335    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41336  fi
41337
41338
41339      JT_HOME="`$DIRNAME $JTREGEXE`"
41340    fi
41341  fi
41342
41343
41344
41345
41346
41347
41348  # Option used to tell the compiler whether to create 32- or 64-bit executables
41349  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41350    COMPILER_TARGET_BITS_FLAG="-q"
41351  else
41352    COMPILER_TARGET_BITS_FLAG="-m"
41353  fi
41354
41355
41356  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41357  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41358    ARFLAGS="-r"
41359  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41360    ARFLAGS="-X64"
41361  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41362    # lib.exe is used as AR to create static libraries.
41363    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41364  else
41365    ARFLAGS=""
41366  fi
41367
41368
41369  ## Setup strip.
41370  # FIXME: should this really be per platform, or should it be per toolchain type?
41371  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41372  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41373  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41374    STRIPFLAGS="-g"
41375  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41376    STRIPFLAGS="-x"
41377  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41378    STRIPFLAGS="-S"
41379  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41380    STRIPFLAGS="-X32_64"
41381  fi
41382
41383  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41384    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41385  fi
41386
41387
41388  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41389    # FIXME: break out into MCSFLAGS
41390    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41391  fi
41392
41393
41394  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41395    CC_OUT_OPTION=-Fo
41396    EXE_OUT_OPTION=-out:
41397    LD_OUT_OPTION=-out:
41398    AR_OUT_OPTION=-out:
41399  else
41400    # The option used to specify the target .o,.a or .so file.
41401    # When compiling, how to specify the to be created object file.
41402    CC_OUT_OPTION='-o$(SPACE)'
41403    # When linking, how to specify the to be created executable.
41404    EXE_OUT_OPTION='-o$(SPACE)'
41405    # When linking, how to specify the to be created dynamically linkable library.
41406    LD_OUT_OPTION='-o$(SPACE)'
41407    # When archiving, how to specify the to be create static archive for object files.
41408    AR_OUT_OPTION='rcs$(SPACE)'
41409  fi
41410
41411
41412
41413
41414
41415  # On Windows, we need to set RC flags.
41416  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41417    RC_FLAGS="-nologo -l0x409"
41418    if test "x$VARIANT" = xOPT; then
41419      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41420    fi
41421
41422    # The version variables used to create RC_FLAGS may be overridden
41423    # in a custom configure script, or possibly the command line.
41424    # Let those variables be expanded at make time in spec.gmk.
41425    # The \$ are escaped to the shell, and the $(...) variables
41426    # are evaluated by make.
41427    RC_FLAGS="$RC_FLAGS \
41428        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41429        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41430        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41431        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41432        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41433        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41434        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41435  fi
41436
41437
41438  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41439    # silence copyright notice and other headers.
41440    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41441  fi
41442
41443  if test "x$SYSROOT" != "x"; then
41444    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41445      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41446        # Solaris Studio does not have a concept of sysroot. Instead we must
41447        # make sure the default include and lib dirs are appended to each
41448        # compile and link command line.
41449        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41450        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41451            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41452            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41453      fi
41454    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41455      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41456      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41457      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41458    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41459      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41460      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41461    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41462      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41463      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41464    fi
41465    # Propagate the sysroot args to hotspot
41466    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41467    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41468    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41469  fi
41470
41471  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41472  # set this here so it doesn't have to be peppered throughout the forest
41473  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41474    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41475    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41476  fi
41477
41478
41479
41480
41481
41482# FIXME: Currently we must test this after toolchain but before flags. Fix!
41483
41484# Now we can test some aspects on the target using configure macros.
41485
41486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41487$as_echo_n "checking for ANSI C header files... " >&6; }
41488if ${ac_cv_header_stdc+:} false; then :
41489  $as_echo_n "(cached) " >&6
41490else
41491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41492/* end confdefs.h.  */
41493#include <stdlib.h>
41494#include <stdarg.h>
41495#include <string.h>
41496#include <float.h>
41497
41498int
41499main ()
41500{
41501
41502  ;
41503  return 0;
41504}
41505_ACEOF
41506if ac_fn_cxx_try_compile "$LINENO"; then :
41507  ac_cv_header_stdc=yes
41508else
41509  ac_cv_header_stdc=no
41510fi
41511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41512
41513if test $ac_cv_header_stdc = yes; then
41514  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41515  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41516/* end confdefs.h.  */
41517#include <string.h>
41518
41519_ACEOF
41520if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41521  $EGREP "memchr" >/dev/null 2>&1; then :
41522
41523else
41524  ac_cv_header_stdc=no
41525fi
41526rm -f conftest*
41527
41528fi
41529
41530if test $ac_cv_header_stdc = yes; then
41531  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41533/* end confdefs.h.  */
41534#include <stdlib.h>
41535
41536_ACEOF
41537if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41538  $EGREP "free" >/dev/null 2>&1; then :
41539
41540else
41541  ac_cv_header_stdc=no
41542fi
41543rm -f conftest*
41544
41545fi
41546
41547if test $ac_cv_header_stdc = yes; then
41548  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41549  if test "$cross_compiling" = yes; then :
41550  :
41551else
41552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41553/* end confdefs.h.  */
41554#include <ctype.h>
41555#include <stdlib.h>
41556#if ((' ' & 0x0FF) == 0x020)
41557# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41558# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41559#else
41560# define ISLOWER(c) \
41561		   (('a' <= (c) && (c) <= 'i') \
41562		     || ('j' <= (c) && (c) <= 'r') \
41563		     || ('s' <= (c) && (c) <= 'z'))
41564# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41565#endif
41566
41567#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41568int
41569main ()
41570{
41571  int i;
41572  for (i = 0; i < 256; i++)
41573    if (XOR (islower (i), ISLOWER (i))
41574	|| toupper (i) != TOUPPER (i))
41575      return 2;
41576  return 0;
41577}
41578_ACEOF
41579if ac_fn_cxx_try_run "$LINENO"; then :
41580
41581else
41582  ac_cv_header_stdc=no
41583fi
41584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41585  conftest.$ac_objext conftest.beam conftest.$ac_ext
41586fi
41587
41588fi
41589fi
41590{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41591$as_echo "$ac_cv_header_stdc" >&6; }
41592if test $ac_cv_header_stdc = yes; then
41593
41594$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41595
41596fi
41597
41598# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41599for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41600		  inttypes.h stdint.h unistd.h
41601do :
41602  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41603ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41604"
41605if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41606  cat >>confdefs.h <<_ACEOF
41607#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41608_ACEOF
41609
41610fi
41611
41612done
41613
41614
41615
41616  ###############################################################################
41617  #
41618  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41619  # (The JVM can use 32 or 64 bit Java pointers but that decision
41620  # is made at runtime.)
41621  #
41622
41623  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41624    # Always specify -m flag on Solaris
41625    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41626
41627  # When we add flags to the "official" CFLAGS etc, we need to
41628  # keep track of these additions in ADDED_CFLAGS etc. These
41629  # will later be checked to make sure only controlled additions
41630  # have been made to CFLAGS etc.
41631  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41632  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41633  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41634
41635  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41636  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41637  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41638
41639  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41640  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41641  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41642
41643  elif test "x$COMPILE_TYPE" = xreduced; then
41644    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41645      # Specify -m if running reduced on unix platforms
41646
41647  # When we add flags to the "official" CFLAGS etc, we need to
41648  # keep track of these additions in ADDED_CFLAGS etc. These
41649  # will later be checked to make sure only controlled additions
41650  # have been made to CFLAGS etc.
41651  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41652  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41653  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41654
41655  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41656  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41657  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41658
41659  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41660  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41661  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41662
41663    fi
41664  fi
41665
41666  # Make compilation sanity check
41667  for ac_header in stdio.h
41668do :
41669  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41670if test "x$ac_cv_header_stdio_h" = xyes; then :
41671  cat >>confdefs.h <<_ACEOF
41672#define HAVE_STDIO_H 1
41673_ACEOF
41674
41675else
41676
41677    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41678$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41679    if test "x$COMPILE_TYPE" = xreduced; then
41680      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41681$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41682    elif test "x$COMPILE_TYPE" = xcross; then
41683      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41684$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41685    fi
41686    as_fn_error $? "Cannot continue." "$LINENO" 5
41687
41688fi
41689
41690done
41691
41692
41693  # The cast to long int works around a bug in the HP C Compiler
41694# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41695# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41696# This bug is HP SR number 8606223364.
41697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41698$as_echo_n "checking size of int *... " >&6; }
41699if ${ac_cv_sizeof_int_p+:} false; then :
41700  $as_echo_n "(cached) " >&6
41701else
41702  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41703
41704else
41705  if test "$ac_cv_type_int_p" = yes; then
41706     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41707$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41708as_fn_error 77 "cannot compute sizeof (int *)
41709See \`config.log' for more details" "$LINENO" 5; }
41710   else
41711     ac_cv_sizeof_int_p=0
41712   fi
41713fi
41714
41715fi
41716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41717$as_echo "$ac_cv_sizeof_int_p" >&6; }
41718
41719
41720
41721cat >>confdefs.h <<_ACEOF
41722#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41723_ACEOF
41724
41725
41726
41727  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41728  if test "x$ac_cv_sizeof_int_p" = x; then
41729    # The test failed, lets stick to the assumed value.
41730    { $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
41731$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41732  else
41733    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41734
41735    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41736      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41737      # Let's try to implicitely set the compilers target architecture and retry the test
41738      { $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
41739$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;}
41740      { $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
41741$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;}
41742
41743  # When we add flags to the "official" CFLAGS etc, we need to
41744  # keep track of these additions in ADDED_CFLAGS etc. These
41745  # will later be checked to make sure only controlled additions
41746  # have been made to CFLAGS etc.
41747  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41748  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41749  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41750
41751  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41752  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41753  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41754
41755  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41756  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41757  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41758
41759
41760      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41761      unset ac_cv_sizeof_int_p
41762      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41763      cat >>confdefs.h <<_ACEOF
41764#undef SIZEOF_INT_P
41765_ACEOF
41766
41767      # The cast to long int works around a bug in the HP C Compiler
41768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41770# This bug is HP SR number 8606223364.
41771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41772$as_echo_n "checking size of int *... " >&6; }
41773if ${ac_cv_sizeof_int_p+:} false; then :
41774  $as_echo_n "(cached) " >&6
41775else
41776  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41777
41778else
41779  if test "$ac_cv_type_int_p" = yes; then
41780     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41781$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41782as_fn_error 77 "cannot compute sizeof (int *)
41783See \`config.log' for more details" "$LINENO" 5; }
41784   else
41785     ac_cv_sizeof_int_p=0
41786   fi
41787fi
41788
41789fi
41790{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41791$as_echo "$ac_cv_sizeof_int_p" >&6; }
41792
41793
41794
41795cat >>confdefs.h <<_ACEOF
41796#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41797_ACEOF
41798
41799
41800
41801      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41802
41803      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41804        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
41805      fi
41806    fi
41807  fi
41808
41809  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41810$as_echo_n "checking for target address size... " >&6; }
41811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41812$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41813
41814
41815  ###############################################################################
41816  #
41817  # Is the target little of big endian?
41818  #
41819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41820$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41821if ${ac_cv_c_bigendian+:} false; then :
41822  $as_echo_n "(cached) " >&6
41823else
41824  ac_cv_c_bigendian=unknown
41825    # See if we're dealing with a universal compiler.
41826    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41827/* end confdefs.h.  */
41828#ifndef __APPLE_CC__
41829	       not a universal capable compiler
41830	     #endif
41831	     typedef int dummy;
41832
41833_ACEOF
41834if ac_fn_cxx_try_compile "$LINENO"; then :
41835
41836	# Check for potential -arch flags.  It is not universal unless
41837	# there are at least two -arch flags with different values.
41838	ac_arch=
41839	ac_prev=
41840	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41841	 if test -n "$ac_prev"; then
41842	   case $ac_word in
41843	     i?86 | x86_64 | ppc | ppc64)
41844	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41845		 ac_arch=$ac_word
41846	       else
41847		 ac_cv_c_bigendian=universal
41848		 break
41849	       fi
41850	       ;;
41851	   esac
41852	   ac_prev=
41853	 elif test "x$ac_word" = "x-arch"; then
41854	   ac_prev=arch
41855	 fi
41856       done
41857fi
41858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41859    if test $ac_cv_c_bigendian = unknown; then
41860      # See if sys/param.h defines the BYTE_ORDER macro.
41861      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41862/* end confdefs.h.  */
41863#include <sys/types.h>
41864	     #include <sys/param.h>
41865
41866int
41867main ()
41868{
41869#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41870		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41871		     && LITTLE_ENDIAN)
41872	      bogus endian macros
41873	     #endif
41874
41875  ;
41876  return 0;
41877}
41878_ACEOF
41879if ac_fn_cxx_try_compile "$LINENO"; then :
41880  # It does; now see whether it defined to BIG_ENDIAN or not.
41881	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41882/* end confdefs.h.  */
41883#include <sys/types.h>
41884		#include <sys/param.h>
41885
41886int
41887main ()
41888{
41889#if BYTE_ORDER != BIG_ENDIAN
41890		 not big endian
41891		#endif
41892
41893  ;
41894  return 0;
41895}
41896_ACEOF
41897if ac_fn_cxx_try_compile "$LINENO"; then :
41898  ac_cv_c_bigendian=yes
41899else
41900  ac_cv_c_bigendian=no
41901fi
41902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41903fi
41904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41905    fi
41906    if test $ac_cv_c_bigendian = unknown; then
41907      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41908      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41909/* end confdefs.h.  */
41910#include <limits.h>
41911
41912int
41913main ()
41914{
41915#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41916	      bogus endian macros
41917	     #endif
41918
41919  ;
41920  return 0;
41921}
41922_ACEOF
41923if ac_fn_cxx_try_compile "$LINENO"; then :
41924  # It does; now see whether it defined to _BIG_ENDIAN or not.
41925	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41926/* end confdefs.h.  */
41927#include <limits.h>
41928
41929int
41930main ()
41931{
41932#ifndef _BIG_ENDIAN
41933		 not big endian
41934		#endif
41935
41936  ;
41937  return 0;
41938}
41939_ACEOF
41940if ac_fn_cxx_try_compile "$LINENO"; then :
41941  ac_cv_c_bigendian=yes
41942else
41943  ac_cv_c_bigendian=no
41944fi
41945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41946fi
41947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41948    fi
41949    if test $ac_cv_c_bigendian = unknown; then
41950      # Compile a test program.
41951      if test "$cross_compiling" = yes; then :
41952  # Try to guess by grepping values from an object file.
41953	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41954/* end confdefs.h.  */
41955short int ascii_mm[] =
41956		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41957		short int ascii_ii[] =
41958		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41959		int use_ascii (int i) {
41960		  return ascii_mm[i] + ascii_ii[i];
41961		}
41962		short int ebcdic_ii[] =
41963		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41964		short int ebcdic_mm[] =
41965		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41966		int use_ebcdic (int i) {
41967		  return ebcdic_mm[i] + ebcdic_ii[i];
41968		}
41969		extern int foo;
41970
41971int
41972main ()
41973{
41974return use_ascii (foo) == use_ebcdic (foo);
41975  ;
41976  return 0;
41977}
41978_ACEOF
41979if ac_fn_cxx_try_compile "$LINENO"; then :
41980  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41981	      ac_cv_c_bigendian=yes
41982	    fi
41983	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41984	      if test "$ac_cv_c_bigendian" = unknown; then
41985		ac_cv_c_bigendian=no
41986	      else
41987		# finding both strings is unlikely to happen, but who knows?
41988		ac_cv_c_bigendian=unknown
41989	      fi
41990	    fi
41991fi
41992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41993else
41994  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41995/* end confdefs.h.  */
41996$ac_includes_default
41997int
41998main ()
41999{
42000
42001	     /* Are we little or big endian?  From Harbison&Steele.  */
42002	     union
42003	     {
42004	       long int l;
42005	       char c[sizeof (long int)];
42006	     } u;
42007	     u.l = 1;
42008	     return u.c[sizeof (long int) - 1] == 1;
42009
42010  ;
42011  return 0;
42012}
42013_ACEOF
42014if ac_fn_cxx_try_run "$LINENO"; then :
42015  ac_cv_c_bigendian=no
42016else
42017  ac_cv_c_bigendian=yes
42018fi
42019rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42020  conftest.$ac_objext conftest.beam conftest.$ac_ext
42021fi
42022
42023    fi
42024fi
42025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42026$as_echo "$ac_cv_c_bigendian" >&6; }
42027 case $ac_cv_c_bigendian in #(
42028   yes)
42029     ENDIAN="big";; #(
42030   no)
42031     ENDIAN="little" ;; #(
42032   universal)
42033     ENDIAN="universal_endianness"
42034     ;; #(
42035   *)
42036     ENDIAN="unknown" ;;
42037 esac
42038
42039
42040  if test "x$ENDIAN" = xuniversal_endianness; then
42041    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42042  fi
42043  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42044    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
42045  fi
42046
42047
42048# Configure flags for the tools
42049
42050  ###############################################################################
42051  #
42052  # How to compile shared libraries.
42053  #
42054
42055  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42056    PICFLAG="-fPIC"
42057    C_FLAG_REORDER=''
42058    CXX_FLAG_REORDER=''
42059
42060    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42061      # Linking is different on MacOSX
42062      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42063      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42064      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42065      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42066      SET_SHARED_LIBRARY_MAPFILE=''
42067    else
42068      # Default works for linux, might work on other platforms as well.
42069      SHARED_LIBRARY_FLAGS='-shared'
42070      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42071      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42072      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42073      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42074    fi
42075  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42076    PICFLAG=''
42077    C_FLAG_REORDER=''
42078    CXX_FLAG_REORDER=''
42079
42080    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42081      # Linking is different on MacOSX
42082      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42083      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42084      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42085      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42086      SET_SHARED_LIBRARY_MAPFILE=''
42087    else
42088      # Default works for linux, might work on other platforms as well.
42089      SHARED_LIBRARY_FLAGS='-shared'
42090      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42091      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42092      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42093      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42094    fi
42095  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42096    PICFLAG="-KPIC"
42097    C_FLAG_REORDER='-xF'
42098    CXX_FLAG_REORDER='-xF'
42099    SHARED_LIBRARY_FLAGS="-G"
42100    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42101    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42102    SET_SHARED_LIBRARY_NAME=''
42103    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42104  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42105    PICFLAG="-qpic=large"
42106    C_FLAG_REORDER=''
42107    CXX_FLAG_REORDER=''
42108    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42109    SET_EXECUTABLE_ORIGIN=""
42110    SET_SHARED_LIBRARY_ORIGIN=''
42111    SET_SHARED_LIBRARY_NAME=''
42112    SET_SHARED_LIBRARY_MAPFILE=''
42113  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42114    PICFLAG=""
42115    C_FLAG_REORDER=''
42116    CXX_FLAG_REORDER=''
42117    SHARED_LIBRARY_FLAGS="-LD"
42118    SET_EXECUTABLE_ORIGIN=''
42119    SET_SHARED_LIBRARY_ORIGIN=''
42120    SET_SHARED_LIBRARY_NAME=''
42121    SET_SHARED_LIBRARY_MAPFILE=''
42122  fi
42123
42124
42125
42126
42127
42128
42129
42130
42131
42132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42133    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42134    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42135    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42136  fi
42137  # The (cross) compiler is now configured, we can now test capabilities
42138  # of the target platform.
42139
42140
42141
42142  ###############################################################################
42143  #
42144  # Setup the opt flags for different compilers
42145  # and different operating systems.
42146  #
42147
42148  # FIXME: this was indirectly the old default, but just inherited.
42149  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42150  #   C_FLAG_DEPS="-MMD -MF"
42151  # fi
42152
42153  # Generate make dependency files
42154  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42155    C_FLAG_DEPS="-MMD -MF"
42156  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42157    C_FLAG_DEPS="-MMD -MF"
42158  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42159    C_FLAG_DEPS="-xMMD -xMF"
42160  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42161    C_FLAG_DEPS="-qmakedep=gcc -MF"
42162  fi
42163  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42164
42165
42166
42167  # Debug symbols
42168  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42169    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42170      # reduce from default "-g2" option to save space
42171      CFLAGS_DEBUG_SYMBOLS="-g1"
42172      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42173    else
42174      CFLAGS_DEBUG_SYMBOLS="-g"
42175      CXXFLAGS_DEBUG_SYMBOLS="-g"
42176    fi
42177  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42178    CFLAGS_DEBUG_SYMBOLS="-g"
42179    CXXFLAGS_DEBUG_SYMBOLS="-g"
42180  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42181    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42182    # FIXME: likely a bug, this disables debug symbols rather than enables them
42183    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42184  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42185    CFLAGS_DEBUG_SYMBOLS="-g"
42186    CXXFLAGS_DEBUG_SYMBOLS="-g"
42187  fi
42188
42189
42190
42191  # bounds, memory and behavior checking options
42192  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42193    case $DEBUG_LEVEL in
42194    release )
42195      # no adjustment
42196      ;;
42197    fastdebug )
42198      # no adjustment
42199      ;;
42200    slowdebug )
42201      # Add runtime stack smashing and undefined behavior checks
42202      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42203      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42204      ;;
42205    esac
42206  fi
42207
42208
42209
42210  # Optimization levels
42211  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42212    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42213
42214    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42215      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42216      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42217      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42218      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42219      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42220      C_O_FLAG_NONE="-xregs=no%frameptr"
42221      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42222      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42223      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42224      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42225      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42226      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42227        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42228        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42229      fi
42230    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42231      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42232      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42233      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42234      C_O_FLAG_DEBUG=""
42235      C_O_FLAG_NONE=""
42236      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42237      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42238      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42239      C_O_FLAG_DEBUG=""
42240      CXX_O_FLAG_NONE=""
42241    fi
42242  else
42243    # The remaining toolchains share opt flags between CC and CXX;
42244    # setup for C and duplicate afterwards.
42245    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42246      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42247        # On MacOSX we optimize for size, something
42248        # we should do for all platforms?
42249        C_O_FLAG_HIGHEST="-Os"
42250        C_O_FLAG_HI="-Os"
42251        C_O_FLAG_NORM="-Os"
42252      else
42253        C_O_FLAG_HIGHEST="-O3"
42254        C_O_FLAG_HI="-O3"
42255        C_O_FLAG_NORM="-O2"
42256      fi
42257      C_O_FLAG_DEBUG="-O0"
42258      C_O_FLAG_NONE="-O0"
42259    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42260      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42261        # On MacOSX we optimize for size, something
42262        # we should do for all platforms?
42263        C_O_FLAG_HIGHEST="-Os"
42264        C_O_FLAG_HI="-Os"
42265        C_O_FLAG_NORM="-Os"
42266      else
42267        C_O_FLAG_HIGHEST="-O3"
42268        C_O_FLAG_HI="-O3"
42269        C_O_FLAG_NORM="-O2"
42270      fi
42271      C_O_FLAG_DEBUG="-O0"
42272      C_O_FLAG_NONE="-O0"
42273    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42274      C_O_FLAG_HIGHEST="-O3"
42275      C_O_FLAG_HI="-O3 -qstrict"
42276      C_O_FLAG_NORM="-O2"
42277      C_O_FLAG_DEBUG="-qnoopt"
42278      C_O_FLAG_NONE="-qnoop"
42279    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42280      C_O_FLAG_HIGHEST="-O2"
42281      C_O_FLAG_HI="-O1"
42282      C_O_FLAG_NORM="-O1"
42283      C_O_FLAG_DEBUG="-Od"
42284      C_O_FLAG_NONE="-Od"
42285    fi
42286    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42287    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42288    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42289    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42290    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42291  fi
42292
42293  # Adjust optimization flags according to debug level.
42294  case $DEBUG_LEVEL in
42295    release )
42296      # no adjustment
42297      ;;
42298    fastdebug )
42299      # Not quite so much optimization
42300      C_O_FLAG_HI="$C_O_FLAG_NORM"
42301      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42302      ;;
42303    slowdebug )
42304      # Disable optimization
42305      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42306      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42307      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42308      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42309      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42310      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42311      ;;
42312  esac
42313
42314
42315
42316
42317
42318
42319
42320
42321
42322
42323
42324
42325
42326  # Special extras...
42327  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42328    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42329      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42330      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42331    fi
42332  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42333    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42334    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42335    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42336  fi
42337
42338  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42339    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42340$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42341  fi
42342
42343  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42344    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42345$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42346  fi
42347
42348  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42349    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42350$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42351  fi
42352
42353
42354# Check whether --with-extra-cflags was given.
42355if test "${with_extra_cflags+set}" = set; then :
42356  withval=$with_extra_cflags;
42357fi
42358
42359
42360
42361# Check whether --with-extra-cxxflags was given.
42362if test "${with_extra_cxxflags+set}" = set; then :
42363  withval=$with_extra_cxxflags;
42364fi
42365
42366
42367
42368# Check whether --with-extra-ldflags was given.
42369if test "${with_extra_ldflags+set}" = set; then :
42370  withval=$with_extra_ldflags;
42371fi
42372
42373
42374  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42375  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42376  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42377
42378  # Hotspot needs these set in their legacy form
42379  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42380  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42381  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42382
42383
42384
42385
42386
42387  ###############################################################################
42388  #
42389  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42390  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42391  #
42392
42393  # Setup compiler/platform specific flags into
42394  #    CFLAGS_JDK    - C Compiler flags
42395  #    CXXFLAGS_JDK  - C++ Compiler flags
42396  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42397  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42398    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42399        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42400    case $OPENJDK_TARGET_CPU_ARCH in
42401      arm )
42402        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42403        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42404        ;;
42405      ppc )
42406        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42407        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42408        ;;
42409      * )
42410        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42411        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42412        ;;
42413    esac
42414  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42415    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42416    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42417      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42418      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42419    fi
42420
42421    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42422    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42423  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42424    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42425    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42426  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42427    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42428        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42429        -DWIN32_LEAN_AND_MEAN \
42430        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42431        -DWIN32 -DIAL"
42432    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42433      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42434    else
42435      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42436    fi
42437    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42438    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42439    # studio.
42440    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42441      COMMON_CXXFLAGS_JDK="$COMMON_CXXFLAGS_JDK \
42442          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42443    fi
42444  fi
42445
42446  ###############################################################################
42447
42448  # Adjust flags according to debug level.
42449  case $DEBUG_LEVEL in
42450    fastdebug | slowdebug )
42451      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42452      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42453      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42454      ;;
42455    release )
42456      ;;
42457    * )
42458      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42459      ;;
42460  esac
42461
42462  # Setup LP64
42463  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42464
42465  # Set some common defines. These works for all compilers, but assume
42466  # -D is universally accepted.
42467
42468  # Setup endianness
42469  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42470    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42471    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42472    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42473    #   Note: -Dmacro         is the same as    #define macro 1
42474    #         -Dmacro=        is the same as    #define macro
42475    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42476      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42477    else
42478      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42479    fi
42480  else
42481    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42482    # are defined in the system?
42483    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42484      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42485    else
42486      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42487    fi
42488  fi
42489
42490  # Setup target OS define. Use OS target name but in upper case.
42491  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42492  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42493
42494  # Setup target CPU
42495  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42496
42497  # Setup debug/release defines
42498  if test "x$DEBUG_LEVEL" = xrelease; then
42499    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42500    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42501      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42502    fi
42503  else
42504    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42505  fi
42506
42507  # Setup release name
42508  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42509
42510
42511  # Set some additional per-OS defines.
42512  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42513    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42514  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42515    # FIXME: PPC64 should not be here.
42516    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42517  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42518    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42519  fi
42520
42521  # Additional macosx handling
42522  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42523    # Setting these parameters makes it an error to link to macosx APIs that are
42524    # newer than the given OS version and makes the linked binaries compatible
42525    # even if built on a newer version of the OS.
42526    # The expected format is X.Y.Z
42527    MACOSX_VERSION_MIN=10.7.0
42528
42529
42530    # The macro takes the version with no dots, ex: 1070
42531    # Let the flags variables get resolved in make for easier override on make
42532    # command line.
42533    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42534    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42535  fi
42536
42537  # Setup some hard coded includes
42538  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42539      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42540      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42541      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42542
42543  # The shared libraries are compiled using the picflag.
42544  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42545  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42546
42547  # Executable flags
42548  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42549  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42550
42551
42552
42553
42554
42555
42556  # Setup LDFLAGS et al.
42557  #
42558
42559  # Now this is odd. The JDK native libraries have to link against libjvm.so
42560  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42561  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42562  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42563  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42564  # libraries will link to whatever is in memory. Yuck.
42565  #
42566  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42567  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42568    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42569    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42570      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42571    fi
42572    # TODO: make -debug optional "--disable-full-debug-symbols"
42573    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42574  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42575    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42576    # We have previously set HAS_GNU_HASH if this is the case
42577    if test -n "$HAS_GNU_HASH"; then
42578      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42579    fi
42580    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42581      # And since we now know that the linker is gnu, then add -z defs, to forbid
42582      # undefined symbols in object files.
42583      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42584      case $DEBUG_LEVEL in
42585        release )
42586          # tell linker to optimize libraries.
42587          # Should this be supplied to the OSS linker as well?
42588          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42589          ;;
42590        slowdebug )
42591          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42592            # do relocations at load
42593            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42594            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42595          fi
42596          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42597            # mark relocations read only
42598            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42599            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42600          fi
42601          ;;
42602        fastdebug )
42603          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42604            # mark relocations read only
42605            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42606            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42607          fi
42608          ;;
42609        * )
42610          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42611          ;;
42612        esac
42613    fi
42614  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42615    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42616    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42617  fi
42618
42619  # Customize LDFLAGS for executables
42620
42621  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42622
42623  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42624    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42625      LDFLAGS_STACK_SIZE=1048576
42626    else
42627      LDFLAGS_STACK_SIZE=327680
42628    fi
42629    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42630  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42631    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42632  fi
42633
42634  # Customize LDFLAGS for libs
42635  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42636
42637  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42638    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42639    LDFLAGS_JDKLIB_SUFFIX=""
42640  else
42641    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42642        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42643
42644    # On some platforms (mac) the linker warns about non existing -L dirs.
42645    # Add server first if available. Linking aginst client does not always produce the same results.
42646    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42647    # Default to server for other variants.
42648    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42649      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42650    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42651      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42652    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42653      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42654    else
42655      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42656    fi
42657
42658    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42659    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42660      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42661    fi
42662  fi
42663
42664
42665
42666
42667
42668
42669
42670
42671  # Some Zero and Shark settings.
42672  # ZERO_ARCHFLAG tells the compiler which mode to build for
42673  case "${OPENJDK_TARGET_CPU}" in
42674    s390)
42675      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42676      ;;
42677    *)
42678      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42679  esac
42680
42681  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42682$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42683  supports=yes
42684
42685  saved_cflags="$CFLAGS"
42686  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42687  ac_ext=c
42688ac_cpp='$CPP $CPPFLAGS'
42689ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42690ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42691ac_compiler_gnu=$ac_cv_c_compiler_gnu
42692
42693  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42694/* end confdefs.h.  */
42695int i;
42696_ACEOF
42697if ac_fn_c_try_compile "$LINENO"; then :
42698
42699else
42700  supports=no
42701fi
42702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42703  ac_ext=cpp
42704ac_cpp='$CXXCPP $CPPFLAGS'
42705ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42706ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42707ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42708
42709  CFLAGS="$saved_cflags"
42710
42711  saved_cxxflags="$CXXFLAGS"
42712  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42713  ac_ext=cpp
42714ac_cpp='$CXXCPP $CPPFLAGS'
42715ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42716ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42717ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42718
42719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42720/* end confdefs.h.  */
42721int i;
42722_ACEOF
42723if ac_fn_cxx_try_compile "$LINENO"; then :
42724
42725else
42726  supports=no
42727fi
42728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42729  ac_ext=cpp
42730ac_cpp='$CXXCPP $CPPFLAGS'
42731ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42732ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42733ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42734
42735  CXXFLAGS="$saved_cxxflags"
42736
42737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42738$as_echo "$supports" >&6; }
42739  if test "x$supports" = "xyes" ; then
42740    :
42741  else
42742    ZERO_ARCHFLAG=""
42743  fi
42744
42745
42746
42747  # Check that the compiler supports -mX (or -qX on AIX) flags
42748  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42749
42750  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42751$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42752  supports=yes
42753
42754  saved_cflags="$CFLAGS"
42755  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42756  ac_ext=c
42757ac_cpp='$CPP $CPPFLAGS'
42758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42760ac_compiler_gnu=$ac_cv_c_compiler_gnu
42761
42762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42763/* end confdefs.h.  */
42764int i;
42765_ACEOF
42766if ac_fn_c_try_compile "$LINENO"; then :
42767
42768else
42769  supports=no
42770fi
42771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42772  ac_ext=cpp
42773ac_cpp='$CXXCPP $CPPFLAGS'
42774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42777
42778  CFLAGS="$saved_cflags"
42779
42780  saved_cxxflags="$CXXFLAGS"
42781  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42782  ac_ext=cpp
42783ac_cpp='$CXXCPP $CPPFLAGS'
42784ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42785ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42786ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42787
42788  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42789/* end confdefs.h.  */
42790int i;
42791_ACEOF
42792if ac_fn_cxx_try_compile "$LINENO"; then :
42793
42794else
42795  supports=no
42796fi
42797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42798  ac_ext=cpp
42799ac_cpp='$CXXCPP $CPPFLAGS'
42800ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42801ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42802ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42803
42804  CXXFLAGS="$saved_cxxflags"
42805
42806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42807$as_echo "$supports" >&6; }
42808  if test "x$supports" = "xyes" ; then
42809    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42810  else
42811    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42812  fi
42813
42814
42815
42816  case "${TOOLCHAIN_TYPE}" in
42817    microsoft)
42818      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42819      ;;
42820    solstudio)
42821      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42822      ;;
42823    gcc)
42824      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42825      ;;
42826    clang)
42827      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42828      ;;
42829  esac
42830
42831
42832
42833# Setup debug symbols (need objcopy from the toolchain for that)
42834
42835  #
42836  # ENABLE_DEBUG_SYMBOLS
42837  # This must be done after the toolchain is setup, since we're looking at objcopy.
42838  #
42839  # Check whether --enable-debug-symbols was given.
42840if test "${enable_debug_symbols+set}" = set; then :
42841  enableval=$enable_debug_symbols;
42842fi
42843
42844
42845  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42846$as_echo_n "checking if we should generate debug symbols... " >&6; }
42847
42848  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42849    # explicit enabling of enable-debug-symbols and can't find objcopy
42850    #   this is an error
42851    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42852  fi
42853
42854  if test "x$enable_debug_symbols" = "xyes"; then
42855    ENABLE_DEBUG_SYMBOLS=true
42856  elif test "x$enable_debug_symbols" = "xno"; then
42857    ENABLE_DEBUG_SYMBOLS=false
42858  else
42859    # Default is on if objcopy is found
42860    if test "x$OBJCOPY" != x; then
42861      ENABLE_DEBUG_SYMBOLS=true
42862    # MacOS X and Windows don't use objcopy but default is on for those OSes
42863    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42864      ENABLE_DEBUG_SYMBOLS=true
42865    else
42866      ENABLE_DEBUG_SYMBOLS=false
42867    fi
42868  fi
42869
42870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42871$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42872
42873  #
42874  # ZIP_DEBUGINFO_FILES
42875  #
42876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42877$as_echo_n "checking if we should zip debug-info files... " >&6; }
42878  # Check whether --enable-zip-debug-info was given.
42879if test "${enable_zip_debug_info+set}" = set; then :
42880  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42881else
42882  enable_zip_debug_info="yes"
42883fi
42884
42885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42886$as_echo "${enable_zip_debug_info}" >&6; }
42887
42888  if test "x${enable_zip_debug_info}" = "xno"; then
42889    ZIP_DEBUGINFO_FILES=false
42890  else
42891    ZIP_DEBUGINFO_FILES=true
42892  fi
42893
42894
42895
42896
42897
42898###############################################################################
42899#
42900# Check dependencies for external and internal libraries.
42901#
42902###############################################################################
42903
42904# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42905
42906  # When using cygwin or msys, we need a wrapper binary that renames
42907  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42908  # @files and rewrites these too! This wrapper binary is
42909  # called fixpath.
42910  FIXPATH=
42911  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42913$as_echo_n "checking if fixpath can be created... " >&6; }
42914    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42915    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42916    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42917      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42918      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42919      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42920      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42921    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42922      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42923      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42924
42925      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42926      # @ was chosen as separator to minimize risk of other tools messing around with it
42927      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42928      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42929
42930      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42931    fi
42932    rm -f $OUTPUT_ROOT/fixpath*
42933    cd $OUTPUT_ROOT
42934    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42935    cd $CURDIR
42936
42937    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42939$as_echo "no" >&6; }
42940      cat $OUTPUT_ROOT/fixpath1.log
42941      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42942    fi
42943    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42944$as_echo "yes" >&6; }
42945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42946$as_echo_n "checking if fixpath.exe works... " >&6; }
42947    cd $OUTPUT_ROOT
42948    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42949    cd $CURDIR
42950    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42952$as_echo "no" >&6; }
42953      cat $OUTPUT_ROOT/fixpath2.log
42954      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42955    fi
42956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42957$as_echo "yes" >&6; }
42958    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42959  fi
42960
42961
42962
42963
42964
42965
42966  ###############################################################################
42967  #
42968  # OS specific settings that we never will need to probe.
42969  #
42970  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42971    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42972$as_echo_n "checking what is not needed on Linux?... " >&6; }
42973    PULSE_NOT_NEEDED=yes
42974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42975$as_echo "pulse" >&6; }
42976  fi
42977
42978  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42979    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42980$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42981    ALSA_NOT_NEEDED=yes
42982    PULSE_NOT_NEEDED=yes
42983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42984$as_echo "alsa pulse" >&6; }
42985  fi
42986
42987  if test "x$OPENJDK_TARGET_OS" = xaix; then
42988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42989$as_echo_n "checking what is not needed on AIX?... " >&6; }
42990    ALSA_NOT_NEEDED=yes
42991    PULSE_NOT_NEEDED=yes
42992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42993$as_echo "alsa pulse" >&6; }
42994  fi
42995
42996
42997  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42999$as_echo_n "checking what is not needed on Windows?... " >&6; }
43000    CUPS_NOT_NEEDED=yes
43001    ALSA_NOT_NEEDED=yes
43002    PULSE_NOT_NEEDED=yes
43003    X11_NOT_NEEDED=yes
43004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43005$as_echo "alsa cups pulse x11" >&6; }
43006  fi
43007
43008  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43010$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43011    ALSA_NOT_NEEDED=yes
43012    PULSE_NOT_NEEDED=yes
43013    X11_NOT_NEEDED=yes
43014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43015$as_echo "alsa pulse x11" >&6; }
43016  fi
43017
43018  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43020$as_echo_n "checking what is not needed on bsd?... " >&6; }
43021    ALSA_NOT_NEEDED=yes
43022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43023$as_echo "alsa" >&6; }
43024  fi
43025
43026  if test "x$OPENJDK" = "xfalse"; then
43027    FREETYPE_NOT_NEEDED=yes
43028  fi
43029
43030  if test "x$SUPPORT_HEADFUL" = xno; then
43031    X11_NOT_NEEDED=yes
43032  fi
43033
43034
43035
43036  ###############################################################################
43037  #
43038  # Check for X Windows
43039  #
43040
43041  if test "x$X11_NOT_NEEDED" = xyes; then
43042    if test "x${with_x}" != x; then
43043      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43044$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43045    fi
43046    X_CFLAGS=
43047    X_LIBS=
43048  else
43049    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43050    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43051    # --x-libraries for the sysroot, if that seems to be correct.
43052    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43053      if test "x$SYSROOT" != "x"; then
43054        if test "x$x_includes" = xNONE; then
43055          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43056            x_includes="$SYSROOT/usr/X11R6/include"
43057          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43058            x_includes="$SYSROOT/usr/include"
43059          fi
43060        fi
43061        if test "x$x_libraries" = xNONE; then
43062          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43063            x_libraries="$SYSROOT/usr/X11R6/lib"
43064          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43065            x_libraries="$SYSROOT/usr/lib64"
43066          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43067            x_libraries="$SYSROOT/usr/lib"
43068          fi
43069        fi
43070      fi
43071    fi
43072
43073    # Now let autoconf do it's magic
43074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43075$as_echo_n "checking for X... " >&6; }
43076
43077
43078# Check whether --with-x was given.
43079if test "${with_x+set}" = set; then :
43080  withval=$with_x;
43081fi
43082
43083# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43084if test "x$with_x" = xno; then
43085  # The user explicitly disabled X.
43086  have_x=disabled
43087else
43088  case $x_includes,$x_libraries in #(
43089    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43090    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43091  $as_echo_n "(cached) " >&6
43092else
43093  # One or both of the vars are not set, and there is no cached value.
43094ac_x_includes=no ac_x_libraries=no
43095rm -f -r conftest.dir
43096if mkdir conftest.dir; then
43097  cd conftest.dir
43098  cat >Imakefile <<'_ACEOF'
43099incroot:
43100	@echo incroot='${INCROOT}'
43101usrlibdir:
43102	@echo usrlibdir='${USRLIBDIR}'
43103libdir:
43104	@echo libdir='${LIBDIR}'
43105_ACEOF
43106  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43107    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43108    for ac_var in incroot usrlibdir libdir; do
43109      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43110    done
43111    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43112    for ac_extension in a so sl dylib la dll; do
43113      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43114	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43115	ac_im_usrlibdir=$ac_im_libdir; break
43116      fi
43117    done
43118    # Screen out bogus values from the imake configuration.  They are
43119    # bogus both because they are the default anyway, and because
43120    # using them would break gcc on systems where it needs fixed includes.
43121    case $ac_im_incroot in
43122	/usr/include) ac_x_includes= ;;
43123	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43124    esac
43125    case $ac_im_usrlibdir in
43126	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43127	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43128    esac
43129  fi
43130  cd ..
43131  rm -f -r conftest.dir
43132fi
43133
43134# Standard set of common directories for X headers.
43135# Check X11 before X11Rn because it is often a symlink to the current release.
43136ac_x_header_dirs='
43137/usr/X11/include
43138/usr/X11R7/include
43139/usr/X11R6/include
43140/usr/X11R5/include
43141/usr/X11R4/include
43142
43143/usr/include/X11
43144/usr/include/X11R7
43145/usr/include/X11R6
43146/usr/include/X11R5
43147/usr/include/X11R4
43148
43149/usr/local/X11/include
43150/usr/local/X11R7/include
43151/usr/local/X11R6/include
43152/usr/local/X11R5/include
43153/usr/local/X11R4/include
43154
43155/usr/local/include/X11
43156/usr/local/include/X11R7
43157/usr/local/include/X11R6
43158/usr/local/include/X11R5
43159/usr/local/include/X11R4
43160
43161/usr/X386/include
43162/usr/x386/include
43163/usr/XFree86/include/X11
43164
43165/usr/include
43166/usr/local/include
43167/usr/unsupported/include
43168/usr/athena/include
43169/usr/local/x11r5/include
43170/usr/lpp/Xamples/include
43171
43172/usr/openwin/include
43173/usr/openwin/share/include'
43174
43175if test "$ac_x_includes" = no; then
43176  # Guess where to find include files, by looking for Xlib.h.
43177  # First, try using that file with no special directory specified.
43178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43179/* end confdefs.h.  */
43180#include <X11/Xlib.h>
43181_ACEOF
43182if ac_fn_cxx_try_cpp "$LINENO"; then :
43183  # We can compile using X headers with no special include directory.
43184ac_x_includes=
43185else
43186  for ac_dir in $ac_x_header_dirs; do
43187  if test -r "$ac_dir/X11/Xlib.h"; then
43188    ac_x_includes=$ac_dir
43189    break
43190  fi
43191done
43192fi
43193rm -f conftest.err conftest.i conftest.$ac_ext
43194fi # $ac_x_includes = no
43195
43196if test "$ac_x_libraries" = no; then
43197  # Check for the libraries.
43198  # See if we find them without any special options.
43199  # Don't add to $LIBS permanently.
43200  ac_save_LIBS=$LIBS
43201  LIBS="-lX11 $LIBS"
43202  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43203/* end confdefs.h.  */
43204#include <X11/Xlib.h>
43205int
43206main ()
43207{
43208XrmInitialize ()
43209  ;
43210  return 0;
43211}
43212_ACEOF
43213if ac_fn_cxx_try_link "$LINENO"; then :
43214  LIBS=$ac_save_LIBS
43215# We can link X programs with no special library path.
43216ac_x_libraries=
43217else
43218  LIBS=$ac_save_LIBS
43219for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43220do
43221  # Don't even attempt the hair of trying to link an X program!
43222  for ac_extension in a so sl dylib la dll; do
43223    if test -r "$ac_dir/libX11.$ac_extension"; then
43224      ac_x_libraries=$ac_dir
43225      break 2
43226    fi
43227  done
43228done
43229fi
43230rm -f core conftest.err conftest.$ac_objext \
43231    conftest$ac_exeext conftest.$ac_ext
43232fi # $ac_x_libraries = no
43233
43234case $ac_x_includes,$ac_x_libraries in #(
43235  no,* | *,no | *\'*)
43236    # Didn't find X, or a directory has "'" in its name.
43237    ac_cv_have_x="have_x=no";; #(
43238  *)
43239    # Record where we found X for the cache.
43240    ac_cv_have_x="have_x=yes\
43241	ac_x_includes='$ac_x_includes'\
43242	ac_x_libraries='$ac_x_libraries'"
43243esac
43244fi
43245;; #(
43246    *) have_x=yes;;
43247  esac
43248  eval "$ac_cv_have_x"
43249fi # $with_x != no
43250
43251if test "$have_x" != yes; then
43252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43253$as_echo "$have_x" >&6; }
43254  no_x=yes
43255else
43256  # If each of the values was on the command line, it overrides each guess.
43257  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43258  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43259  # Update the cache value to reflect the command line values.
43260  ac_cv_have_x="have_x=yes\
43261	ac_x_includes='$x_includes'\
43262	ac_x_libraries='$x_libraries'"
43263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43264$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43265fi
43266
43267    if test "$no_x" = yes; then
43268  # Not all programs may use this symbol, but it does not hurt to define it.
43269
43270$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43271
43272  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43273else
43274  if test -n "$x_includes"; then
43275    X_CFLAGS="$X_CFLAGS -I$x_includes"
43276  fi
43277
43278  # It would also be nice to do this for all -L options, not just this one.
43279  if test -n "$x_libraries"; then
43280    X_LIBS="$X_LIBS -L$x_libraries"
43281    # For Solaris; some versions of Sun CC require a space after -R and
43282    # others require no space.  Words are not sufficient . . . .
43283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43284$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43285    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43286    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43287    ac_cxx_werror_flag=yes
43288    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43289/* end confdefs.h.  */
43290
43291int
43292main ()
43293{
43294
43295  ;
43296  return 0;
43297}
43298_ACEOF
43299if ac_fn_cxx_try_link "$LINENO"; then :
43300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43301$as_echo "no" >&6; }
43302       X_LIBS="$X_LIBS -R$x_libraries"
43303else
43304  LIBS="$ac_xsave_LIBS -R $x_libraries"
43305       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43306/* end confdefs.h.  */
43307
43308int
43309main ()
43310{
43311
43312  ;
43313  return 0;
43314}
43315_ACEOF
43316if ac_fn_cxx_try_link "$LINENO"; then :
43317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43318$as_echo "yes" >&6; }
43319	  X_LIBS="$X_LIBS -R $x_libraries"
43320else
43321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43322$as_echo "neither works" >&6; }
43323fi
43324rm -f core conftest.err conftest.$ac_objext \
43325    conftest$ac_exeext conftest.$ac_ext
43326fi
43327rm -f core conftest.err conftest.$ac_objext \
43328    conftest$ac_exeext conftest.$ac_ext
43329    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43330    LIBS=$ac_xsave_LIBS
43331  fi
43332
43333  # Check for system-dependent libraries X programs must link with.
43334  # Do this before checking for the system-independent R6 libraries
43335  # (-lICE), since we may need -lsocket or whatever for X linking.
43336
43337  if test "$ISC" = yes; then
43338    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43339  else
43340    # Martyn Johnson says this is needed for Ultrix, if the X
43341    # libraries were built with DECnet support.  And Karl Berry says
43342    # the Alpha needs dnet_stub (dnet does not exist).
43343    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43344    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43345/* end confdefs.h.  */
43346
43347/* Override any GCC internal prototype to avoid an error.
43348   Use char because int might match the return type of a GCC
43349   builtin and then its argument prototype would still apply.  */
43350#ifdef __cplusplus
43351extern "C"
43352#endif
43353char XOpenDisplay ();
43354int
43355main ()
43356{
43357return XOpenDisplay ();
43358  ;
43359  return 0;
43360}
43361_ACEOF
43362if ac_fn_cxx_try_link "$LINENO"; then :
43363
43364else
43365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43366$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43367if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43368  $as_echo_n "(cached) " >&6
43369else
43370  ac_check_lib_save_LIBS=$LIBS
43371LIBS="-ldnet  $LIBS"
43372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43373/* end confdefs.h.  */
43374
43375/* Override any GCC internal prototype to avoid an error.
43376   Use char because int might match the return type of a GCC
43377   builtin and then its argument prototype would still apply.  */
43378#ifdef __cplusplus
43379extern "C"
43380#endif
43381char dnet_ntoa ();
43382int
43383main ()
43384{
43385return dnet_ntoa ();
43386  ;
43387  return 0;
43388}
43389_ACEOF
43390if ac_fn_cxx_try_link "$LINENO"; then :
43391  ac_cv_lib_dnet_dnet_ntoa=yes
43392else
43393  ac_cv_lib_dnet_dnet_ntoa=no
43394fi
43395rm -f core conftest.err conftest.$ac_objext \
43396    conftest$ac_exeext conftest.$ac_ext
43397LIBS=$ac_check_lib_save_LIBS
43398fi
43399{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43400$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43401if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43402  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43403fi
43404
43405    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43406      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43407$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43408if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43409  $as_echo_n "(cached) " >&6
43410else
43411  ac_check_lib_save_LIBS=$LIBS
43412LIBS="-ldnet_stub  $LIBS"
43413cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43414/* end confdefs.h.  */
43415
43416/* Override any GCC internal prototype to avoid an error.
43417   Use char because int might match the return type of a GCC
43418   builtin and then its argument prototype would still apply.  */
43419#ifdef __cplusplus
43420extern "C"
43421#endif
43422char dnet_ntoa ();
43423int
43424main ()
43425{
43426return dnet_ntoa ();
43427  ;
43428  return 0;
43429}
43430_ACEOF
43431if ac_fn_cxx_try_link "$LINENO"; then :
43432  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43433else
43434  ac_cv_lib_dnet_stub_dnet_ntoa=no
43435fi
43436rm -f core conftest.err conftest.$ac_objext \
43437    conftest$ac_exeext conftest.$ac_ext
43438LIBS=$ac_check_lib_save_LIBS
43439fi
43440{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43441$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43442if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43443  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43444fi
43445
43446    fi
43447fi
43448rm -f core conftest.err conftest.$ac_objext \
43449    conftest$ac_exeext conftest.$ac_ext
43450    LIBS="$ac_xsave_LIBS"
43451
43452    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43453    # to get the SysV transport functions.
43454    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43455    # needs -lnsl.
43456    # The nsl library prevents programs from opening the X display
43457    # on Irix 5.2, according to T.E. Dickey.
43458    # The functions gethostbyname, getservbyname, and inet_addr are
43459    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43460    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43461if test "x$ac_cv_func_gethostbyname" = xyes; then :
43462
43463fi
43464
43465    if test $ac_cv_func_gethostbyname = no; then
43466      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43467$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43468if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43469  $as_echo_n "(cached) " >&6
43470else
43471  ac_check_lib_save_LIBS=$LIBS
43472LIBS="-lnsl  $LIBS"
43473cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43474/* end confdefs.h.  */
43475
43476/* Override any GCC internal prototype to avoid an error.
43477   Use char because int might match the return type of a GCC
43478   builtin and then its argument prototype would still apply.  */
43479#ifdef __cplusplus
43480extern "C"
43481#endif
43482char gethostbyname ();
43483int
43484main ()
43485{
43486return gethostbyname ();
43487  ;
43488  return 0;
43489}
43490_ACEOF
43491if ac_fn_cxx_try_link "$LINENO"; then :
43492  ac_cv_lib_nsl_gethostbyname=yes
43493else
43494  ac_cv_lib_nsl_gethostbyname=no
43495fi
43496rm -f core conftest.err conftest.$ac_objext \
43497    conftest$ac_exeext conftest.$ac_ext
43498LIBS=$ac_check_lib_save_LIBS
43499fi
43500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43501$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43502if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43503  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43504fi
43505
43506      if test $ac_cv_lib_nsl_gethostbyname = no; then
43507	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43508$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43509if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43510  $as_echo_n "(cached) " >&6
43511else
43512  ac_check_lib_save_LIBS=$LIBS
43513LIBS="-lbsd  $LIBS"
43514cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43515/* end confdefs.h.  */
43516
43517/* Override any GCC internal prototype to avoid an error.
43518   Use char because int might match the return type of a GCC
43519   builtin and then its argument prototype would still apply.  */
43520#ifdef __cplusplus
43521extern "C"
43522#endif
43523char gethostbyname ();
43524int
43525main ()
43526{
43527return gethostbyname ();
43528  ;
43529  return 0;
43530}
43531_ACEOF
43532if ac_fn_cxx_try_link "$LINENO"; then :
43533  ac_cv_lib_bsd_gethostbyname=yes
43534else
43535  ac_cv_lib_bsd_gethostbyname=no
43536fi
43537rm -f core conftest.err conftest.$ac_objext \
43538    conftest$ac_exeext conftest.$ac_ext
43539LIBS=$ac_check_lib_save_LIBS
43540fi
43541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43542$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43543if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43544  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43545fi
43546
43547      fi
43548    fi
43549
43550    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43551    # socket/setsockopt and other routines are undefined under SCO ODT
43552    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43553    # on later versions), says Simon Leinen: it contains gethostby*
43554    # variants that don't use the name server (or something).  -lsocket
43555    # must be given before -lnsl if both are needed.  We assume that
43556    # if connect needs -lnsl, so does gethostbyname.
43557    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43558if test "x$ac_cv_func_connect" = xyes; then :
43559
43560fi
43561
43562    if test $ac_cv_func_connect = no; then
43563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43564$as_echo_n "checking for connect in -lsocket... " >&6; }
43565if ${ac_cv_lib_socket_connect+:} false; then :
43566  $as_echo_n "(cached) " >&6
43567else
43568  ac_check_lib_save_LIBS=$LIBS
43569LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43571/* end confdefs.h.  */
43572
43573/* Override any GCC internal prototype to avoid an error.
43574   Use char because int might match the return type of a GCC
43575   builtin and then its argument prototype would still apply.  */
43576#ifdef __cplusplus
43577extern "C"
43578#endif
43579char connect ();
43580int
43581main ()
43582{
43583return connect ();
43584  ;
43585  return 0;
43586}
43587_ACEOF
43588if ac_fn_cxx_try_link "$LINENO"; then :
43589  ac_cv_lib_socket_connect=yes
43590else
43591  ac_cv_lib_socket_connect=no
43592fi
43593rm -f core conftest.err conftest.$ac_objext \
43594    conftest$ac_exeext conftest.$ac_ext
43595LIBS=$ac_check_lib_save_LIBS
43596fi
43597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43598$as_echo "$ac_cv_lib_socket_connect" >&6; }
43599if test "x$ac_cv_lib_socket_connect" = xyes; then :
43600  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43601fi
43602
43603    fi
43604
43605    # Guillermo Gomez says -lposix is necessary on A/UX.
43606    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43607if test "x$ac_cv_func_remove" = xyes; then :
43608
43609fi
43610
43611    if test $ac_cv_func_remove = no; then
43612      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43613$as_echo_n "checking for remove in -lposix... " >&6; }
43614if ${ac_cv_lib_posix_remove+:} false; then :
43615  $as_echo_n "(cached) " >&6
43616else
43617  ac_check_lib_save_LIBS=$LIBS
43618LIBS="-lposix  $LIBS"
43619cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43620/* end confdefs.h.  */
43621
43622/* Override any GCC internal prototype to avoid an error.
43623   Use char because int might match the return type of a GCC
43624   builtin and then its argument prototype would still apply.  */
43625#ifdef __cplusplus
43626extern "C"
43627#endif
43628char remove ();
43629int
43630main ()
43631{
43632return remove ();
43633  ;
43634  return 0;
43635}
43636_ACEOF
43637if ac_fn_cxx_try_link "$LINENO"; then :
43638  ac_cv_lib_posix_remove=yes
43639else
43640  ac_cv_lib_posix_remove=no
43641fi
43642rm -f core conftest.err conftest.$ac_objext \
43643    conftest$ac_exeext conftest.$ac_ext
43644LIBS=$ac_check_lib_save_LIBS
43645fi
43646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43647$as_echo "$ac_cv_lib_posix_remove" >&6; }
43648if test "x$ac_cv_lib_posix_remove" = xyes; then :
43649  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43650fi
43651
43652    fi
43653
43654    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43655    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43656if test "x$ac_cv_func_shmat" = xyes; then :
43657
43658fi
43659
43660    if test $ac_cv_func_shmat = no; then
43661      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43662$as_echo_n "checking for shmat in -lipc... " >&6; }
43663if ${ac_cv_lib_ipc_shmat+:} false; then :
43664  $as_echo_n "(cached) " >&6
43665else
43666  ac_check_lib_save_LIBS=$LIBS
43667LIBS="-lipc  $LIBS"
43668cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43669/* end confdefs.h.  */
43670
43671/* Override any GCC internal prototype to avoid an error.
43672   Use char because int might match the return type of a GCC
43673   builtin and then its argument prototype would still apply.  */
43674#ifdef __cplusplus
43675extern "C"
43676#endif
43677char shmat ();
43678int
43679main ()
43680{
43681return shmat ();
43682  ;
43683  return 0;
43684}
43685_ACEOF
43686if ac_fn_cxx_try_link "$LINENO"; then :
43687  ac_cv_lib_ipc_shmat=yes
43688else
43689  ac_cv_lib_ipc_shmat=no
43690fi
43691rm -f core conftest.err conftest.$ac_objext \
43692    conftest$ac_exeext conftest.$ac_ext
43693LIBS=$ac_check_lib_save_LIBS
43694fi
43695{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43696$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43697if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43698  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43699fi
43700
43701    fi
43702  fi
43703
43704  # Check for libraries that X11R6 Xt/Xaw programs need.
43705  ac_save_LDFLAGS=$LDFLAGS
43706  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43707  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43708  # check for ICE first), but we must link in the order -lSM -lICE or
43709  # we get undefined symbols.  So assume we have SM if we have ICE.
43710  # These have to be linked with before -lX11, unlike the other
43711  # libraries we check for below, so use a different variable.
43712  # John Interrante, Karl Berry
43713  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43714$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43715if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43716  $as_echo_n "(cached) " >&6
43717else
43718  ac_check_lib_save_LIBS=$LIBS
43719LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43720cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43721/* end confdefs.h.  */
43722
43723/* Override any GCC internal prototype to avoid an error.
43724   Use char because int might match the return type of a GCC
43725   builtin and then its argument prototype would still apply.  */
43726#ifdef __cplusplus
43727extern "C"
43728#endif
43729char IceConnectionNumber ();
43730int
43731main ()
43732{
43733return IceConnectionNumber ();
43734  ;
43735  return 0;
43736}
43737_ACEOF
43738if ac_fn_cxx_try_link "$LINENO"; then :
43739  ac_cv_lib_ICE_IceConnectionNumber=yes
43740else
43741  ac_cv_lib_ICE_IceConnectionNumber=no
43742fi
43743rm -f core conftest.err conftest.$ac_objext \
43744    conftest$ac_exeext conftest.$ac_ext
43745LIBS=$ac_check_lib_save_LIBS
43746fi
43747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43748$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43749if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43750  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43751fi
43752
43753  LDFLAGS=$ac_save_LDFLAGS
43754
43755fi
43756
43757
43758    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43759    # this doesn't make sense so we remove it.
43760    if test "x$COMPILE_TYPE" = xcross; then
43761      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43762    fi
43763
43764    if test "x$no_x" = xyes; then
43765
43766  # Print a helpful message on how to acquire the necessary build dependency.
43767  # x11 is the help tag: freetype, cups, pulse, alsa etc
43768  MISSING_DEPENDENCY=x11
43769
43770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43771    cygwin_help $MISSING_DEPENDENCY
43772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43773    msys_help $MISSING_DEPENDENCY
43774  else
43775    PKGHANDLER_COMMAND=
43776
43777    case $PKGHANDLER in
43778      apt-get)
43779        apt_help     $MISSING_DEPENDENCY ;;
43780      yum)
43781        yum_help     $MISSING_DEPENDENCY ;;
43782      port)
43783        port_help    $MISSING_DEPENDENCY ;;
43784      pkgutil)
43785        pkgutil_help $MISSING_DEPENDENCY ;;
43786      pkgadd)
43787        pkgadd_help  $MISSING_DEPENDENCY ;;
43788    esac
43789
43790    if test "x$PKGHANDLER_COMMAND" != x; then
43791      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43792    fi
43793  fi
43794
43795      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43796    fi
43797
43798    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43799      OPENWIN_HOME="/usr/openwin"
43800      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43801      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43802          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43803          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43804          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43805    fi
43806
43807    ac_ext=c
43808ac_cpp='$CPP $CPPFLAGS'
43809ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43810ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43811ac_compiler_gnu=$ac_cv_c_compiler_gnu
43812
43813    OLD_CFLAGS="$CFLAGS"
43814    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43815
43816    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43817    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43818do :
43819  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43820ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43821          # include <X11/Xlib.h>
43822          # include <X11/Xutil.h>
43823
43824
43825"
43826if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43827  cat >>confdefs.h <<_ACEOF
43828#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43829_ACEOF
43830 X11_HEADERS_OK=yes
43831else
43832  X11_HEADERS_OK=no; break
43833fi
43834
43835done
43836
43837
43838    if test "x$X11_HEADERS_OK" = xno; then
43839
43840  # Print a helpful message on how to acquire the necessary build dependency.
43841  # x11 is the help tag: freetype, cups, pulse, alsa etc
43842  MISSING_DEPENDENCY=x11
43843
43844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43845    cygwin_help $MISSING_DEPENDENCY
43846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43847    msys_help $MISSING_DEPENDENCY
43848  else
43849    PKGHANDLER_COMMAND=
43850
43851    case $PKGHANDLER in
43852      apt-get)
43853        apt_help     $MISSING_DEPENDENCY ;;
43854      yum)
43855        yum_help     $MISSING_DEPENDENCY ;;
43856      port)
43857        port_help    $MISSING_DEPENDENCY ;;
43858      pkgutil)
43859        pkgutil_help $MISSING_DEPENDENCY ;;
43860      pkgadd)
43861        pkgadd_help  $MISSING_DEPENDENCY ;;
43862    esac
43863
43864    if test "x$PKGHANDLER_COMMAND" != x; then
43865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43866    fi
43867  fi
43868
43869      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43870    fi
43871
43872    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43873    # defined in libawt_xawt.
43874    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43875$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43876    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43877/* end confdefs.h.  */
43878#include <X11/extensions/Xrender.h>
43879int
43880main ()
43881{
43882XLinearGradient x;
43883  ;
43884  return 0;
43885}
43886_ACEOF
43887if ac_fn_c_try_compile "$LINENO"; then :
43888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43889$as_echo "yes" >&6; }
43890else
43891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43892$as_echo "no" >&6; }
43893         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43894fi
43895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43896
43897    CFLAGS="$OLD_CFLAGS"
43898    ac_ext=cpp
43899ac_cpp='$CXXCPP $CPPFLAGS'
43900ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43901ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43902ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43903
43904  fi # X11_NOT_NEEDED
43905
43906
43907
43908
43909
43910
43911  ###############################################################################
43912  #
43913  # The common unix printing system cups is used to print from java.
43914  #
43915
43916# Check whether --with-cups was given.
43917if test "${with_cups+set}" = set; then :
43918  withval=$with_cups;
43919fi
43920
43921
43922# Check whether --with-cups-include was given.
43923if test "${with_cups_include+set}" = set; then :
43924  withval=$with_cups_include;
43925fi
43926
43927
43928  if test "x$CUPS_NOT_NEEDED" = xyes; then
43929    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43930      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43931$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43932    fi
43933    CUPS_CFLAGS=
43934  else
43935    CUPS_FOUND=no
43936
43937    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43938      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43939    fi
43940
43941    if test "x${with_cups}" != x; then
43942      CUPS_CFLAGS="-I${with_cups}/include"
43943      CUPS_FOUND=yes
43944    fi
43945    if test "x${with_cups_include}" != x; then
43946      CUPS_CFLAGS="-I${with_cups_include}"
43947      CUPS_FOUND=yes
43948    fi
43949    if test "x$CUPS_FOUND" = xno; then
43950
43951
43952  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43953    # Source the builddeps file again, to make sure it uses the latest variables!
43954    . $builddepsfile
43955    # Look for a target and build machine specific resource!
43956    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43957    if test "x$resource" = x; then
43958      # Ok, lets instead look for a target specific resource
43959      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43960    fi
43961    if test "x$resource" = x; then
43962      # Ok, lets instead look for a build specific resource
43963      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43964    fi
43965    if test "x$resource" = x; then
43966      # Ok, lets instead look for a generic resource
43967      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43968      resource=${builddep_cups}
43969    fi
43970    if test "x$resource" != x; then
43971      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43972$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43973      # If the resource in the builddeps.conf file is an existing directory,
43974      # for example /java/linux/cups
43975      if test -d ${resource}; then
43976        depdir=${resource}
43977      else
43978
43979  # cups is for example mymodule
43980  # $resource is for example libs/general/libmymod_1_2_3.zip
43981  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43982  # $with_builddeps_dir is for example /localhome/builddeps
43983  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43984  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43985  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43986  filename=`basename $resource`
43987  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43988  filebase=${filename%%.*}
43989  extension=${filename#*.}
43990  installdir=$with_builddeps_dir/$filebase
43991  if test ! -f $installdir/$filename.unpacked; then
43992    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43993$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43994    if test ! -d $installdir; then
43995      mkdir -p $installdir
43996    fi
43997    if test ! -d $installdir; then
43998      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43999    fi
44000    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44001    touch $tmpfile
44002    if test ! -f $tmpfile; then
44003      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44004    fi
44005
44006  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44007  # $tmpfile is the local file name for the downloaded file.
44008  VALID_TOOL=no
44009  if test "x$BDEPS_FTP" = xwget; then
44010    VALID_TOOL=yes
44011    wget -O $tmpfile $with_builddeps_server/$resource
44012  fi
44013  if test "x$BDEPS_FTP" = xlftp; then
44014    VALID_TOOL=yes
44015    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44016  fi
44017  if test "x$BDEPS_FTP" = xftp; then
44018    VALID_TOOL=yes
44019    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44020    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44021    FTPUSERPWD=${FTPSERVER%%@*}
44022    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44023      FTPUSER=${userpwd%%:*}
44024      FTPPWD=${userpwd#*@}
44025      FTPSERVER=${FTPSERVER#*@}
44026    else
44027      FTPUSER=ftp
44028      FTPPWD=ftp
44029    fi
44030    # the "pass" command does not work on some
44031    # ftp clients (read ftp.exe) but if it works,
44032    # passive mode is better!
44033    ( \
44034        echo "user $FTPUSER $FTPPWD"        ; \
44035        echo "pass"                         ; \
44036        echo "bin"                          ; \
44037        echo "get $FTPPATH $tmpfile"              ; \
44038    ) | ftp -in $FTPSERVER
44039  fi
44040  if test "x$VALID_TOOL" != xyes; then
44041    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44042  fi
44043
44044    mv $tmpfile $installdir/$filename
44045    if test ! -s $installdir/$filename; then
44046      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44047    fi
44048    case "$extension" in
44049      zip)  echo "Unzipping $installdir/$filename..."
44050        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44051        ;;
44052      tar.gz) echo "Untaring $installdir/$filename..."
44053        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44054        ;;
44055      tgz) echo "Untaring $installdir/$filename..."
44056        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44057        ;;
44058      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44059        ;;
44060    esac
44061  fi
44062  if test -f $installdir/$filename.unpacked; then
44063    depdir=$installdir
44064  fi
44065
44066      fi
44067      # Source the builddeps file again, because in the previous command, the depdir
44068      # was updated to point at the current build dependency install directory.
44069      . $builddepsfile
44070      # Now extract variables from the builddeps.conf files.
44071      theroot=${builddep_cups_ROOT}
44072      thecflags=${builddep_cups_CFLAGS}
44073      thelibs=${builddep_cups_LIBS}
44074      if test "x$depdir" = x; then
44075        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44076      fi
44077      CUPS=$depdir
44078      if test "x$theroot" != x; then
44079        CUPS="$theroot"
44080      fi
44081      if test "x$thecflags" != x; then
44082        CUPS_CFLAGS="$thecflags"
44083      fi
44084      if test "x$thelibs" != x; then
44085        CUPS_LIBS="$thelibs"
44086      fi
44087      CUPS_FOUND=yes
44088
44089    fi
44090
44091  fi
44092
44093    fi
44094    if test "x$CUPS_FOUND" = xno; then
44095      # Are the cups headers installed in the default /usr/include location?
44096      for ac_header in cups/cups.h cups/ppd.h
44097do :
44098  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44099ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44100if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44101  cat >>confdefs.h <<_ACEOF
44102#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44103_ACEOF
44104
44105            CUPS_FOUND=yes
44106            CUPS_CFLAGS=
44107            DEFAULT_CUPS=yes
44108
44109
44110fi
44111
44112done
44113
44114    fi
44115    if test "x$CUPS_FOUND" = xno; then
44116      # Getting nervous now? Lets poke around for standard Solaris third-party
44117      # package installation locations.
44118      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44119$as_echo_n "checking for cups headers... " >&6; }
44120      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44121        # An SFW package seems to be installed!
44122        CUPS_FOUND=yes
44123        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44124      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44125        # A CSW package seems to be installed!
44126        CUPS_FOUND=yes
44127        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44128      fi
44129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44130$as_echo "$CUPS_FOUND" >&6; }
44131    fi
44132    if test "x$CUPS_FOUND" = xno; then
44133
44134  # Print a helpful message on how to acquire the necessary build dependency.
44135  # cups is the help tag: freetype, cups, pulse, alsa etc
44136  MISSING_DEPENDENCY=cups
44137
44138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44139    cygwin_help $MISSING_DEPENDENCY
44140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44141    msys_help $MISSING_DEPENDENCY
44142  else
44143    PKGHANDLER_COMMAND=
44144
44145    case $PKGHANDLER in
44146      apt-get)
44147        apt_help     $MISSING_DEPENDENCY ;;
44148      yum)
44149        yum_help     $MISSING_DEPENDENCY ;;
44150      port)
44151        port_help    $MISSING_DEPENDENCY ;;
44152      pkgutil)
44153        pkgutil_help $MISSING_DEPENDENCY ;;
44154      pkgadd)
44155        pkgadd_help  $MISSING_DEPENDENCY ;;
44156    esac
44157
44158    if test "x$PKGHANDLER_COMMAND" != x; then
44159      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44160    fi
44161  fi
44162
44163      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44164    fi
44165  fi
44166
44167
44168
44169
44170
44171
44172  ###############################################################################
44173  #
44174  # The ubiquitous freetype library is used to render fonts.
44175  #
44176
44177# Check whether --with-freetype was given.
44178if test "${with_freetype+set}" = set; then :
44179  withval=$with_freetype;
44180fi
44181
44182
44183# Check whether --with-freetype-include was given.
44184if test "${with_freetype_include+set}" = set; then :
44185  withval=$with_freetype_include;
44186fi
44187
44188
44189# Check whether --with-freetype-lib was given.
44190if test "${with_freetype_lib+set}" = set; then :
44191  withval=$with_freetype_lib;
44192fi
44193
44194
44195# Check whether --with-freetype-src was given.
44196if test "${with_freetype_src+set}" = set; then :
44197  withval=$with_freetype_src;
44198fi
44199
44200  # Check whether --enable-freetype-bundling was given.
44201if test "${enable_freetype_bundling+set}" = set; then :
44202  enableval=$enable_freetype_bundling;
44203fi
44204
44205
44206  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44207  FREETYPE_BASE_NAME=freetype
44208  FREETYPE_CFLAGS=
44209  FREETYPE_LIBS=
44210  FREETYPE_BUNDLE_LIB_PATH=
44211
44212  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44213    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
44214      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44215$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44216    fi
44217    if test "x$enable_freetype_bundling" != x; then
44218      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44219$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44220    fi
44221  else
44222    # freetype is needed to build; go get it!
44223
44224    BUNDLE_FREETYPE="$enable_freetype_bundling"
44225
44226    if  test "x$with_freetype_src" != x; then
44227      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44228        # Try to build freetype if --with-freetype-src was given on Windows
44229
44230  FREETYPE_SRC_PATH="$with_freetype_src"
44231  BUILD_FREETYPE=yes
44232
44233  # Check if the freetype sources are acessible..
44234  if ! test -d $FREETYPE_SRC_PATH; then
44235    { $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
44236$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44237    BUILD_FREETYPE=no
44238  fi
44239  # ..and contain a vc2010 project file
44240  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44241  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44242    { $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
44243$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44244    BUILD_FREETYPE=no
44245  fi
44246  # Now check if configure found a version of 'msbuild.exe'
44247  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44248    { $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
44249$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;}
44250    BUILD_FREETYPE=no
44251  fi
44252
44253  # Ready to go..
44254  if test "x$BUILD_FREETYPE" = xyes; then
44255
44256    # msbuild requires trailing slashes for output directories
44257    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44258    freetype_lib_path_unix="$freetype_lib_path"
44259    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44260
44261  unix_path="$vcxproj_path"
44262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44263    windows_path=`$CYGPATH -m "$unix_path"`
44264    vcxproj_path="$windows_path"
44265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44266    windows_path=`cmd //c echo $unix_path`
44267    vcxproj_path="$windows_path"
44268  fi
44269
44270
44271  unix_path="$freetype_lib_path"
44272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44273    windows_path=`$CYGPATH -m "$unix_path"`
44274    freetype_lib_path="$windows_path"
44275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44276    windows_path=`cmd //c echo $unix_path`
44277    freetype_lib_path="$windows_path"
44278  fi
44279
44280
44281  unix_path="$freetype_obj_path"
44282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44283    windows_path=`$CYGPATH -m "$unix_path"`
44284    freetype_obj_path="$windows_path"
44285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44286    windows_path=`cmd //c echo $unix_path`
44287    freetype_obj_path="$windows_path"
44288  fi
44289
44290    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44291      freetype_platform=x64
44292    else
44293      freetype_platform=win32
44294    fi
44295
44296    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44297    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44298    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44299    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44300    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44301$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44302
44303    # First we try to build the freetype.dll
44304    $ECHO -e "@echo off\n"\
44305	     "$MSBUILD $vcxproj_path "\
44306		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44307		       "/p:Configuration=\"Release Multithreaded\" "\
44308		       "/p:Platform=$freetype_platform "\
44309		       "/p:ConfigurationType=DynamicLibrary "\
44310		       "/p:TargetName=freetype "\
44311		       "/p:OutDir=\"$freetype_lib_path\" "\
44312		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44313    cmd /c freetype.bat
44314
44315    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44316      # If that succeeds we also build freetype.lib
44317      $ECHO -e "@echo off\n"\
44318	       "$MSBUILD $vcxproj_path "\
44319			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44320			 "/p:Configuration=\"Release Multithreaded\" "\
44321			 "/p:Platform=$freetype_platform "\
44322			 "/p:ConfigurationType=StaticLibrary "\
44323			 "/p:TargetName=freetype "\
44324			 "/p:OutDir=\"$freetype_lib_path\" "\
44325			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44326      cmd /c freetype.bat
44327
44328      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44329	# Once we build both, lib and dll, set freetype lib and include path appropriately
44330	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44331	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44332	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44333$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44334      else
44335	BUILD_FREETYPE=no
44336      fi
44337    else
44338      BUILD_FREETYPE=no
44339    fi
44340  fi
44341
44342        if test "x$BUILD_FREETYPE" = xyes; then
44343          # Okay, we built it. Check that it works.
44344
44345  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44346  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44347  METHOD="--with-freetype-src"
44348
44349  # Let's start with an optimistic view of the world :-)
44350  FOUND_FREETYPE=yes
44351
44352  # First look for the canonical freetype main include file ft2build.h.
44353  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44354    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44355    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44356    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44357      # Fail.
44358      FOUND_FREETYPE=no
44359    fi
44360  fi
44361
44362  if test "x$FOUND_FREETYPE" = xyes; then
44363    # Include file found, let's continue the sanity check.
44364    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44365$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44366
44367    # Reset to default value
44368    FREETYPE_BASE_NAME=freetype
44369    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44370    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44371      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44372          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44373        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44374        # for the .6 version explicitly.
44375        FREETYPE_BASE_NAME=freetype.6
44376        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44377        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44378$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44379      else
44380        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44381$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44382        FOUND_FREETYPE=no
44383      fi
44384    else
44385      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44386        # On Windows, we will need both .lib and .dll file.
44387        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44388          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44389$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44390          FOUND_FREETYPE=no
44391        fi
44392      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44393          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44394        # Found lib in isa dir, use that instead.
44395        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44396        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44397$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44398      fi
44399    fi
44400  fi
44401
44402  if test "x$FOUND_FREETYPE" = xyes; then
44403
44404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44405
44406  # Input might be given as Windows format, start by converting to
44407  # unix format.
44408  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44409  new_path=`$CYGPATH -u "$path"`
44410
44411  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44412  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44413  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44414  # "foo.exe" is OK but "foo" is an error.
44415  #
44416  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44417  # It is also a way to make sure we got the proper file name for the real test later on.
44418  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44419  if test "x$test_shortpath" = x; then
44420    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44421$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44422    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44423  fi
44424
44425  # Call helper function which possibly converts this using DOS-style short mode.
44426  # If so, the updated path is stored in $new_path.
44427
44428  input_path="$new_path"
44429  # Check if we need to convert this using DOS-style short mode. If the path
44430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44431  # take no chances and rewrite it.
44432  # Note: m4 eats our [], so we need to use [ and ] instead.
44433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44434  if test "x$has_forbidden_chars" != x; then
44435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44436    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44437    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44438    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44439      # Going to short mode and back again did indeed matter. Since short mode is
44440      # case insensitive, let's make it lowercase to improve readability.
44441      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44442      # Now convert it back to Unix-stile (cygpath)
44443      input_path=`$CYGPATH -u "$shortmode_path"`
44444      new_path="$input_path"
44445    fi
44446  fi
44447
44448  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44449  if test "x$test_cygdrive_prefix" = x; then
44450    # As a simple fix, exclude /usr/bin since it's not a real path.
44451    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44452      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44453      # a path prefixed by /cygdrive for fixpath to work.
44454      new_path="$CYGWIN_ROOT_PATH$input_path"
44455    fi
44456  fi
44457
44458
44459  if test "x$path" != "x$new_path"; then
44460    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44462$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44463  fi
44464
44465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44466
44467  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44468  has_colon=`$ECHO $path | $GREP ^.:`
44469  new_path="$path"
44470  if test "x$has_colon" = x; then
44471    # Not in mixed or Windows style, start by that.
44472    new_path=`cmd //c echo $path`
44473  fi
44474
44475
44476  input_path="$new_path"
44477  # Check if we need to convert this using DOS-style short mode. If the path
44478  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44479  # take no chances and rewrite it.
44480  # Note: m4 eats our [], so we need to use [ and ] instead.
44481  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44482  if test "x$has_forbidden_chars" != x; then
44483    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44484    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44485  fi
44486
44487
44488  windows_path="$new_path"
44489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44490    unix_path=`$CYGPATH -u "$windows_path"`
44491    new_path="$unix_path"
44492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44494    new_path="$unix_path"
44495  fi
44496
44497  if test "x$path" != "x$new_path"; then
44498    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44500$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44501  fi
44502
44503  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44504  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44505
44506  else
44507    # We're on a unix platform. Hooray! :)
44508    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44509    has_space=`$ECHO "$path" | $GREP " "`
44510    if test "x$has_space" != x; then
44511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44512$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44513      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44514    fi
44515
44516    # Use eval to expand a potential ~
44517    eval path="$path"
44518    if test ! -f "$path" && test ! -d "$path"; then
44519      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44520    fi
44521
44522    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44523  fi
44524
44525
44526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44527
44528  # Input might be given as Windows format, start by converting to
44529  # unix format.
44530  path="$POTENTIAL_FREETYPE_LIB_PATH"
44531  new_path=`$CYGPATH -u "$path"`
44532
44533  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44534  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44535  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44536  # "foo.exe" is OK but "foo" is an error.
44537  #
44538  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44539  # It is also a way to make sure we got the proper file name for the real test later on.
44540  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44541  if test "x$test_shortpath" = x; then
44542    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44543$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44544    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44545  fi
44546
44547  # Call helper function which possibly converts this using DOS-style short mode.
44548  # If so, the updated path is stored in $new_path.
44549
44550  input_path="$new_path"
44551  # Check if we need to convert this using DOS-style short mode. If the path
44552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44553  # take no chances and rewrite it.
44554  # Note: m4 eats our [], so we need to use [ and ] instead.
44555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44556  if test "x$has_forbidden_chars" != x; then
44557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44558    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44559    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44560    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44561      # Going to short mode and back again did indeed matter. Since short mode is
44562      # case insensitive, let's make it lowercase to improve readability.
44563      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44564      # Now convert it back to Unix-stile (cygpath)
44565      input_path=`$CYGPATH -u "$shortmode_path"`
44566      new_path="$input_path"
44567    fi
44568  fi
44569
44570  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44571  if test "x$test_cygdrive_prefix" = x; then
44572    # As a simple fix, exclude /usr/bin since it's not a real path.
44573    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44574      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44575      # a path prefixed by /cygdrive for fixpath to work.
44576      new_path="$CYGWIN_ROOT_PATH$input_path"
44577    fi
44578  fi
44579
44580
44581  if test "x$path" != "x$new_path"; then
44582    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44585  fi
44586
44587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44588
44589  path="$POTENTIAL_FREETYPE_LIB_PATH"
44590  has_colon=`$ECHO $path | $GREP ^.:`
44591  new_path="$path"
44592  if test "x$has_colon" = x; then
44593    # Not in mixed or Windows style, start by that.
44594    new_path=`cmd //c echo $path`
44595  fi
44596
44597
44598  input_path="$new_path"
44599  # Check if we need to convert this using DOS-style short mode. If the path
44600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44601  # take no chances and rewrite it.
44602  # Note: m4 eats our [], so we need to use [ and ] instead.
44603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44604  if test "x$has_forbidden_chars" != x; then
44605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44606    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44607  fi
44608
44609
44610  windows_path="$new_path"
44611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44612    unix_path=`$CYGPATH -u "$windows_path"`
44613    new_path="$unix_path"
44614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44616    new_path="$unix_path"
44617  fi
44618
44619  if test "x$path" != "x$new_path"; then
44620    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44623  fi
44624
44625  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44626  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44627
44628  else
44629    # We're on a unix platform. Hooray! :)
44630    path="$POTENTIAL_FREETYPE_LIB_PATH"
44631    has_space=`$ECHO "$path" | $GREP " "`
44632    if test "x$has_space" != x; then
44633      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44634$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44635      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44636    fi
44637
44638    # Use eval to expand a potential ~
44639    eval path="$path"
44640    if test ! -f "$path" && test ! -d "$path"; then
44641      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44642    fi
44643
44644    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44645  fi
44646
44647
44648    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44650$as_echo_n "checking for freetype includes... " >&6; }
44651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44652$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44653    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44655$as_echo_n "checking for freetype libraries... " >&6; }
44656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44657$as_echo "$FREETYPE_LIB_PATH" >&6; }
44658  fi
44659
44660          if test "x$FOUND_FREETYPE" != xyes; then
44661            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44662          fi
44663        else
44664          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44665$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44666          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44667        fi
44668      else
44669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44670$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44671      fi
44672    fi
44673
44674    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44675      # User has specified settings
44676
44677      if test "x$BUNDLE_FREETYPE" = x; then
44678        # If not specified, default is to bundle freetype
44679        BUNDLE_FREETYPE=yes
44680      fi
44681
44682      if test "x$with_freetype" != x; then
44683        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44684        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44685      fi
44686
44687      # Allow --with-freetype-lib and --with-freetype-include to override
44688      if test "x$with_freetype_include" != x; then
44689        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44690      fi
44691      if test "x$with_freetype_lib" != x; then
44692        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44693      fi
44694
44695      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44696        # Okay, we got it. Check that it works.
44697
44698  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44699  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44700  METHOD="--with-freetype"
44701
44702  # Let's start with an optimistic view of the world :-)
44703  FOUND_FREETYPE=yes
44704
44705  # First look for the canonical freetype main include file ft2build.h.
44706  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44707    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44708    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44709    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44710      # Fail.
44711      FOUND_FREETYPE=no
44712    fi
44713  fi
44714
44715  if test "x$FOUND_FREETYPE" = xyes; then
44716    # Include file found, let's continue the sanity check.
44717    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44718$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44719
44720    # Reset to default value
44721    FREETYPE_BASE_NAME=freetype
44722    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44723    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44724      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44725          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44726        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44727        # for the .6 version explicitly.
44728        FREETYPE_BASE_NAME=freetype.6
44729        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44730        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44731$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44732      else
44733        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44734$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44735        FOUND_FREETYPE=no
44736      fi
44737    else
44738      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44739        # On Windows, we will need both .lib and .dll file.
44740        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44741          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44742$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44743          FOUND_FREETYPE=no
44744        fi
44745      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44746          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44747        # Found lib in isa dir, use that instead.
44748        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44749        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44750$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44751      fi
44752    fi
44753  fi
44754
44755  if test "x$FOUND_FREETYPE" = xyes; then
44756
44757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44758
44759  # Input might be given as Windows format, start by converting to
44760  # unix format.
44761  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44762  new_path=`$CYGPATH -u "$path"`
44763
44764  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44765  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44766  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44767  # "foo.exe" is OK but "foo" is an error.
44768  #
44769  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44770  # It is also a way to make sure we got the proper file name for the real test later on.
44771  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44772  if test "x$test_shortpath" = x; then
44773    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44774$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44775    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44776  fi
44777
44778  # Call helper function which possibly converts this using DOS-style short mode.
44779  # If so, the updated path is stored in $new_path.
44780
44781  input_path="$new_path"
44782  # Check if we need to convert this using DOS-style short mode. If the path
44783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44784  # take no chances and rewrite it.
44785  # Note: m4 eats our [], so we need to use [ and ] instead.
44786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44787  if test "x$has_forbidden_chars" != x; then
44788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44789    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44790    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44791    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44792      # Going to short mode and back again did indeed matter. Since short mode is
44793      # case insensitive, let's make it lowercase to improve readability.
44794      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44795      # Now convert it back to Unix-stile (cygpath)
44796      input_path=`$CYGPATH -u "$shortmode_path"`
44797      new_path="$input_path"
44798    fi
44799  fi
44800
44801  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44802  if test "x$test_cygdrive_prefix" = x; then
44803    # As a simple fix, exclude /usr/bin since it's not a real path.
44804    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44805      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44806      # a path prefixed by /cygdrive for fixpath to work.
44807      new_path="$CYGWIN_ROOT_PATH$input_path"
44808    fi
44809  fi
44810
44811
44812  if test "x$path" != "x$new_path"; then
44813    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44815$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44816  fi
44817
44818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44819
44820  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44821  has_colon=`$ECHO $path | $GREP ^.:`
44822  new_path="$path"
44823  if test "x$has_colon" = x; then
44824    # Not in mixed or Windows style, start by that.
44825    new_path=`cmd //c echo $path`
44826  fi
44827
44828
44829  input_path="$new_path"
44830  # Check if we need to convert this using DOS-style short mode. If the path
44831  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44832  # take no chances and rewrite it.
44833  # Note: m4 eats our [], so we need to use [ and ] instead.
44834  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44835  if test "x$has_forbidden_chars" != x; then
44836    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44837    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44838  fi
44839
44840
44841  windows_path="$new_path"
44842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44843    unix_path=`$CYGPATH -u "$windows_path"`
44844    new_path="$unix_path"
44845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44847    new_path="$unix_path"
44848  fi
44849
44850  if test "x$path" != "x$new_path"; then
44851    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44853$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44854  fi
44855
44856  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44857  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44858
44859  else
44860    # We're on a unix platform. Hooray! :)
44861    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44862    has_space=`$ECHO "$path" | $GREP " "`
44863    if test "x$has_space" != x; then
44864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44865$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44866      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44867    fi
44868
44869    # Use eval to expand a potential ~
44870    eval path="$path"
44871    if test ! -f "$path" && test ! -d "$path"; then
44872      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44873    fi
44874
44875    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44876  fi
44877
44878
44879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44880
44881  # Input might be given as Windows format, start by converting to
44882  # unix format.
44883  path="$POTENTIAL_FREETYPE_LIB_PATH"
44884  new_path=`$CYGPATH -u "$path"`
44885
44886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44889  # "foo.exe" is OK but "foo" is an error.
44890  #
44891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44892  # It is also a way to make sure we got the proper file name for the real test later on.
44893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44894  if test "x$test_shortpath" = x; then
44895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44896$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44897    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44898  fi
44899
44900  # Call helper function which possibly converts this using DOS-style short mode.
44901  # If so, the updated path is stored in $new_path.
44902
44903  input_path="$new_path"
44904  # Check if we need to convert this using DOS-style short mode. If the path
44905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44906  # take no chances and rewrite it.
44907  # Note: m4 eats our [], so we need to use [ and ] instead.
44908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44909  if test "x$has_forbidden_chars" != x; then
44910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44914      # Going to short mode and back again did indeed matter. Since short mode is
44915      # case insensitive, let's make it lowercase to improve readability.
44916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44917      # Now convert it back to Unix-stile (cygpath)
44918      input_path=`$CYGPATH -u "$shortmode_path"`
44919      new_path="$input_path"
44920    fi
44921  fi
44922
44923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44924  if test "x$test_cygdrive_prefix" = x; then
44925    # As a simple fix, exclude /usr/bin since it's not a real path.
44926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44928      # a path prefixed by /cygdrive for fixpath to work.
44929      new_path="$CYGWIN_ROOT_PATH$input_path"
44930    fi
44931  fi
44932
44933
44934  if test "x$path" != "x$new_path"; then
44935    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44937$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44938  fi
44939
44940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44941
44942  path="$POTENTIAL_FREETYPE_LIB_PATH"
44943  has_colon=`$ECHO $path | $GREP ^.:`
44944  new_path="$path"
44945  if test "x$has_colon" = x; then
44946    # Not in mixed or Windows style, start by that.
44947    new_path=`cmd //c echo $path`
44948  fi
44949
44950
44951  input_path="$new_path"
44952  # Check if we need to convert this using DOS-style short mode. If the path
44953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44954  # take no chances and rewrite it.
44955  # Note: m4 eats our [], so we need to use [ and ] instead.
44956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44957  if test "x$has_forbidden_chars" != x; then
44958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44960  fi
44961
44962
44963  windows_path="$new_path"
44964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44965    unix_path=`$CYGPATH -u "$windows_path"`
44966    new_path="$unix_path"
44967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44969    new_path="$unix_path"
44970  fi
44971
44972  if test "x$path" != "x$new_path"; then
44973    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44975$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44976  fi
44977
44978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44980
44981  else
44982    # We're on a unix platform. Hooray! :)
44983    path="$POTENTIAL_FREETYPE_LIB_PATH"
44984    has_space=`$ECHO "$path" | $GREP " "`
44985    if test "x$has_space" != x; then
44986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44987$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44988      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44989    fi
44990
44991    # Use eval to expand a potential ~
44992    eval path="$path"
44993    if test ! -f "$path" && test ! -d "$path"; then
44994      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44995    fi
44996
44997    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44998  fi
44999
45000
45001    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45003$as_echo_n "checking for freetype includes... " >&6; }
45004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45005$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45006    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45008$as_echo_n "checking for freetype libraries... " >&6; }
45009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45010$as_echo "$FREETYPE_LIB_PATH" >&6; }
45011  fi
45012
45013        if test "x$FOUND_FREETYPE" != xyes; then
45014          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45015        fi
45016      else
45017        # User specified only one of lib or include. This is an error.
45018        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45019          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45020$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45021          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45022        else
45023          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45024$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45025          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45026        fi
45027      fi
45028    else
45029      # User did not specify settings, but we need freetype. Try to locate it.
45030
45031      if test "x$BUNDLE_FREETYPE" = x; then
45032        # If not specified, default is to bundle freetype only on windows
45033        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45034          BUNDLE_FREETYPE=yes
45035        else
45036          BUNDLE_FREETYPE=no
45037        fi
45038      fi
45039
45040      if test "x$FOUND_FREETYPE" != xyes; then
45041        # Check builddeps
45042
45043
45044  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45045    # Source the builddeps file again, to make sure it uses the latest variables!
45046    . $builddepsfile
45047    # Look for a target and build machine specific resource!
45048    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45049    if test "x$resource" = x; then
45050      # Ok, lets instead look for a target specific resource
45051      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45052    fi
45053    if test "x$resource" = x; then
45054      # Ok, lets instead look for a build specific resource
45055      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45056    fi
45057    if test "x$resource" = x; then
45058      # Ok, lets instead look for a generic resource
45059      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45060      resource=${builddep_freetype2}
45061    fi
45062    if test "x$resource" != x; then
45063      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45064$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45065      # If the resource in the builddeps.conf file is an existing directory,
45066      # for example /java/linux/cups
45067      if test -d ${resource}; then
45068        depdir=${resource}
45069      else
45070
45071  # freetype2 is for example mymodule
45072  # $resource is for example libs/general/libmymod_1_2_3.zip
45073  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45074  # $with_builddeps_dir is for example /localhome/builddeps
45075  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45076  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45077  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45078  filename=`basename $resource`
45079  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45080  filebase=${filename%%.*}
45081  extension=${filename#*.}
45082  installdir=$with_builddeps_dir/$filebase
45083  if test ! -f $installdir/$filename.unpacked; then
45084    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45085$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45086    if test ! -d $installdir; then
45087      mkdir -p $installdir
45088    fi
45089    if test ! -d $installdir; then
45090      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45091    fi
45092    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45093    touch $tmpfile
45094    if test ! -f $tmpfile; then
45095      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45096    fi
45097
45098  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45099  # $tmpfile is the local file name for the downloaded file.
45100  VALID_TOOL=no
45101  if test "x$BDEPS_FTP" = xwget; then
45102    VALID_TOOL=yes
45103    wget -O $tmpfile $with_builddeps_server/$resource
45104  fi
45105  if test "x$BDEPS_FTP" = xlftp; then
45106    VALID_TOOL=yes
45107    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45108  fi
45109  if test "x$BDEPS_FTP" = xftp; then
45110    VALID_TOOL=yes
45111    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45112    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45113    FTPUSERPWD=${FTPSERVER%%@*}
45114    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45115      FTPUSER=${userpwd%%:*}
45116      FTPPWD=${userpwd#*@}
45117      FTPSERVER=${FTPSERVER#*@}
45118    else
45119      FTPUSER=ftp
45120      FTPPWD=ftp
45121    fi
45122    # the "pass" command does not work on some
45123    # ftp clients (read ftp.exe) but if it works,
45124    # passive mode is better!
45125    ( \
45126        echo "user $FTPUSER $FTPPWD"        ; \
45127        echo "pass"                         ; \
45128        echo "bin"                          ; \
45129        echo "get $FTPPATH $tmpfile"              ; \
45130    ) | ftp -in $FTPSERVER
45131  fi
45132  if test "x$VALID_TOOL" != xyes; then
45133    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45134  fi
45135
45136    mv $tmpfile $installdir/$filename
45137    if test ! -s $installdir/$filename; then
45138      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45139    fi
45140    case "$extension" in
45141      zip)  echo "Unzipping $installdir/$filename..."
45142        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45143        ;;
45144      tar.gz) echo "Untaring $installdir/$filename..."
45145        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45146        ;;
45147      tgz) echo "Untaring $installdir/$filename..."
45148        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45149        ;;
45150      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45151        ;;
45152    esac
45153  fi
45154  if test -f $installdir/$filename.unpacked; then
45155    depdir=$installdir
45156  fi
45157
45158      fi
45159      # Source the builddeps file again, because in the previous command, the depdir
45160      # was updated to point at the current build dependency install directory.
45161      . $builddepsfile
45162      # Now extract variables from the builddeps.conf files.
45163      theroot=${builddep_freetype2_ROOT}
45164      thecflags=${builddep_freetype2_CFLAGS}
45165      thelibs=${builddep_freetype2_LIBS}
45166      if test "x$depdir" = x; then
45167        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45168      fi
45169      FREETYPE=$depdir
45170      if test "x$theroot" != x; then
45171        FREETYPE="$theroot"
45172      fi
45173      if test "x$thecflags" != x; then
45174        FREETYPE_CFLAGS="$thecflags"
45175      fi
45176      if test "x$thelibs" != x; then
45177        FREETYPE_LIBS="$thelibs"
45178      fi
45179      FOUND_FREETYPE=yes
45180      else FOUND_FREETYPE=no
45181
45182    fi
45183    else FOUND_FREETYPE=no
45184
45185  fi
45186
45187        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45188        if test "x$FOUND_FREETYPE" = xyes; then
45189          if test "x$BUNDLE_FREETYPE" = xyes; then
45190            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45191$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45192            FOUND_FREETYPE=no
45193          else
45194            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45195$as_echo_n "checking for freetype... " >&6; }
45196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45197$as_echo "yes (using builddeps)" >&6; }
45198          fi
45199        fi
45200      fi
45201
45202      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45203      if test "x$SYSROOT" = x; then
45204        if test "x$FOUND_FREETYPE" != xyes; then
45205          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45206          if test "x$PKG_CONFIG" != x; then
45207
45208pkg_failed=no
45209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45210$as_echo_n "checking for FREETYPE... " >&6; }
45211
45212if test -n "$FREETYPE_CFLAGS"; then
45213    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45214 elif test -n "$PKG_CONFIG"; then
45215    if test -n "$PKG_CONFIG" && \
45216    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45217  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45218  ac_status=$?
45219  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45220  test $ac_status = 0; }; then
45221  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45222else
45223  pkg_failed=yes
45224fi
45225 else
45226    pkg_failed=untried
45227fi
45228if test -n "$FREETYPE_LIBS"; then
45229    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45230 elif test -n "$PKG_CONFIG"; then
45231    if test -n "$PKG_CONFIG" && \
45232    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45233  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45234  ac_status=$?
45235  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45236  test $ac_status = 0; }; then
45237  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45238else
45239  pkg_failed=yes
45240fi
45241 else
45242    pkg_failed=untried
45243fi
45244
45245
45246
45247if test $pkg_failed = yes; then
45248
45249if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45250        _pkg_short_errors_supported=yes
45251else
45252        _pkg_short_errors_supported=no
45253fi
45254        if test $_pkg_short_errors_supported = yes; then
45255	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45256        else
45257	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45258        fi
45259	# Put the nasty error message in config.log where it belongs
45260	echo "$FREETYPE_PKG_ERRORS" >&5
45261
45262	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45263$as_echo "no" >&6; }
45264                FOUND_FREETYPE=no
45265elif test $pkg_failed = untried; then
45266	FOUND_FREETYPE=no
45267else
45268	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45269	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45271$as_echo "yes" >&6; }
45272	FOUND_FREETYPE=yes
45273fi
45274            if test "x$FOUND_FREETYPE" = xyes; then
45275              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45276              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45277              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45278              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45279                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45280              fi
45281              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45282              if test "x$BUNDLE_FREETYPE" = xyes; then
45283                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45284$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45285                FOUND_FREETYPE=no
45286              else
45287                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45288$as_echo_n "checking for freetype... " >&6; }
45289                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45290$as_echo "yes (using pkg-config)" >&6; }
45291              fi
45292            fi
45293          fi
45294        fi
45295      fi
45296
45297      if test "x$FOUND_FREETYPE" != xyes; then
45298        # Check in well-known locations
45299        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45300          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45301
45302  windows_path="$FREETYPE_BASE_DIR"
45303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45304    unix_path=`$CYGPATH -u "$windows_path"`
45305    FREETYPE_BASE_DIR="$unix_path"
45306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45308    FREETYPE_BASE_DIR="$unix_path"
45309  fi
45310
45311
45312  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45313  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45314  METHOD="well-known location"
45315
45316  # Let's start with an optimistic view of the world :-)
45317  FOUND_FREETYPE=yes
45318
45319  # First look for the canonical freetype main include file ft2build.h.
45320  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45321    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45322    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45323    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45324      # Fail.
45325      FOUND_FREETYPE=no
45326    fi
45327  fi
45328
45329  if test "x$FOUND_FREETYPE" = xyes; then
45330    # Include file found, let's continue the sanity check.
45331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45332$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45333
45334    # Reset to default value
45335    FREETYPE_BASE_NAME=freetype
45336    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45337    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45338      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45339          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45340        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45341        # for the .6 version explicitly.
45342        FREETYPE_BASE_NAME=freetype.6
45343        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45344        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45345$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45346      else
45347        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45348$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45349        FOUND_FREETYPE=no
45350      fi
45351    else
45352      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45353        # On Windows, we will need both .lib and .dll file.
45354        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45355          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45356$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45357          FOUND_FREETYPE=no
45358        fi
45359      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45360          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45361        # Found lib in isa dir, use that instead.
45362        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45363        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45364$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45365      fi
45366    fi
45367  fi
45368
45369  if test "x$FOUND_FREETYPE" = xyes; then
45370
45371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45372
45373  # Input might be given as Windows format, start by converting to
45374  # unix format.
45375  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45376  new_path=`$CYGPATH -u "$path"`
45377
45378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45381  # "foo.exe" is OK but "foo" is an error.
45382  #
45383  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45384  # It is also a way to make sure we got the proper file name for the real test later on.
45385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45386  if test "x$test_shortpath" = x; then
45387    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45388$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45389    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45390  fi
45391
45392  # Call helper function which possibly converts this using DOS-style short mode.
45393  # If so, the updated path is stored in $new_path.
45394
45395  input_path="$new_path"
45396  # Check if we need to convert this using DOS-style short mode. If the path
45397  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45398  # take no chances and rewrite it.
45399  # Note: m4 eats our [], so we need to use [ and ] instead.
45400  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45401  if test "x$has_forbidden_chars" != x; then
45402    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45403    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45404    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45405    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45406      # Going to short mode and back again did indeed matter. Since short mode is
45407      # case insensitive, let's make it lowercase to improve readability.
45408      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45409      # Now convert it back to Unix-stile (cygpath)
45410      input_path=`$CYGPATH -u "$shortmode_path"`
45411      new_path="$input_path"
45412    fi
45413  fi
45414
45415  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45416  if test "x$test_cygdrive_prefix" = x; then
45417    # As a simple fix, exclude /usr/bin since it's not a real path.
45418    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45419      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45420      # a path prefixed by /cygdrive for fixpath to work.
45421      new_path="$CYGWIN_ROOT_PATH$input_path"
45422    fi
45423  fi
45424
45425
45426  if test "x$path" != "x$new_path"; then
45427    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45428    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45429$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45430  fi
45431
45432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45433
45434  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45435  has_colon=`$ECHO $path | $GREP ^.:`
45436  new_path="$path"
45437  if test "x$has_colon" = x; then
45438    # Not in mixed or Windows style, start by that.
45439    new_path=`cmd //c echo $path`
45440  fi
45441
45442
45443  input_path="$new_path"
45444  # Check if we need to convert this using DOS-style short mode. If the path
45445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45446  # take no chances and rewrite it.
45447  # Note: m4 eats our [], so we need to use [ and ] instead.
45448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45449  if test "x$has_forbidden_chars" != x; then
45450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45452  fi
45453
45454
45455  windows_path="$new_path"
45456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45457    unix_path=`$CYGPATH -u "$windows_path"`
45458    new_path="$unix_path"
45459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45461    new_path="$unix_path"
45462  fi
45463
45464  if test "x$path" != "x$new_path"; then
45465    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45466    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45467$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45468  fi
45469
45470  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45471  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45472
45473  else
45474    # We're on a unix platform. Hooray! :)
45475    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45476    has_space=`$ECHO "$path" | $GREP " "`
45477    if test "x$has_space" != x; then
45478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45479$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45480      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45481    fi
45482
45483    # Use eval to expand a potential ~
45484    eval path="$path"
45485    if test ! -f "$path" && test ! -d "$path"; then
45486      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45487    fi
45488
45489    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45490  fi
45491
45492
45493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45494
45495  # Input might be given as Windows format, start by converting to
45496  # unix format.
45497  path="$POTENTIAL_FREETYPE_LIB_PATH"
45498  new_path=`$CYGPATH -u "$path"`
45499
45500  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45501  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45502  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45503  # "foo.exe" is OK but "foo" is an error.
45504  #
45505  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45506  # It is also a way to make sure we got the proper file name for the real test later on.
45507  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45508  if test "x$test_shortpath" = x; then
45509    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45510$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45511    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45512  fi
45513
45514  # Call helper function which possibly converts this using DOS-style short mode.
45515  # If so, the updated path is stored in $new_path.
45516
45517  input_path="$new_path"
45518  # Check if we need to convert this using DOS-style short mode. If the path
45519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45520  # take no chances and rewrite it.
45521  # Note: m4 eats our [], so we need to use [ and ] instead.
45522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45523  if test "x$has_forbidden_chars" != x; then
45524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45525    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45526    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45527    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45528      # Going to short mode and back again did indeed matter. Since short mode is
45529      # case insensitive, let's make it lowercase to improve readability.
45530      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45531      # Now convert it back to Unix-stile (cygpath)
45532      input_path=`$CYGPATH -u "$shortmode_path"`
45533      new_path="$input_path"
45534    fi
45535  fi
45536
45537  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45538  if test "x$test_cygdrive_prefix" = x; then
45539    # As a simple fix, exclude /usr/bin since it's not a real path.
45540    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45541      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45542      # a path prefixed by /cygdrive for fixpath to work.
45543      new_path="$CYGWIN_ROOT_PATH$input_path"
45544    fi
45545  fi
45546
45547
45548  if test "x$path" != "x$new_path"; then
45549    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45551$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45552  fi
45553
45554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45555
45556  path="$POTENTIAL_FREETYPE_LIB_PATH"
45557  has_colon=`$ECHO $path | $GREP ^.:`
45558  new_path="$path"
45559  if test "x$has_colon" = x; then
45560    # Not in mixed or Windows style, start by that.
45561    new_path=`cmd //c echo $path`
45562  fi
45563
45564
45565  input_path="$new_path"
45566  # Check if we need to convert this using DOS-style short mode. If the path
45567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45568  # take no chances and rewrite it.
45569  # Note: m4 eats our [], so we need to use [ and ] instead.
45570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45571  if test "x$has_forbidden_chars" != x; then
45572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45573    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45574  fi
45575
45576
45577  windows_path="$new_path"
45578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45579    unix_path=`$CYGPATH -u "$windows_path"`
45580    new_path="$unix_path"
45581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45583    new_path="$unix_path"
45584  fi
45585
45586  if test "x$path" != "x$new_path"; then
45587    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45589$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45590  fi
45591
45592  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45593  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45594
45595  else
45596    # We're on a unix platform. Hooray! :)
45597    path="$POTENTIAL_FREETYPE_LIB_PATH"
45598    has_space=`$ECHO "$path" | $GREP " "`
45599    if test "x$has_space" != x; then
45600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45601$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45602      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45603    fi
45604
45605    # Use eval to expand a potential ~
45606    eval path="$path"
45607    if test ! -f "$path" && test ! -d "$path"; then
45608      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45609    fi
45610
45611    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45612  fi
45613
45614
45615    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45617$as_echo_n "checking for freetype includes... " >&6; }
45618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45619$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45620    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45622$as_echo_n "checking for freetype libraries... " >&6; }
45623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45624$as_echo "$FREETYPE_LIB_PATH" >&6; }
45625  fi
45626
45627          if test "x$FOUND_FREETYPE" != xyes; then
45628            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45629
45630  windows_path="$FREETYPE_BASE_DIR"
45631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45632    unix_path=`$CYGPATH -u "$windows_path"`
45633    FREETYPE_BASE_DIR="$unix_path"
45634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45636    FREETYPE_BASE_DIR="$unix_path"
45637  fi
45638
45639
45640  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45641  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45642  METHOD="well-known location"
45643
45644  # Let's start with an optimistic view of the world :-)
45645  FOUND_FREETYPE=yes
45646
45647  # First look for the canonical freetype main include file ft2build.h.
45648  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45649    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45650    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45651    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45652      # Fail.
45653      FOUND_FREETYPE=no
45654    fi
45655  fi
45656
45657  if test "x$FOUND_FREETYPE" = xyes; then
45658    # Include file found, let's continue the sanity check.
45659    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45660$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45661
45662    # Reset to default value
45663    FREETYPE_BASE_NAME=freetype
45664    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45665    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45666      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45667          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45668        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45669        # for the .6 version explicitly.
45670        FREETYPE_BASE_NAME=freetype.6
45671        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45672        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45673$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45674      else
45675        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45676$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45677        FOUND_FREETYPE=no
45678      fi
45679    else
45680      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45681        # On Windows, we will need both .lib and .dll file.
45682        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45683          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45684$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45685          FOUND_FREETYPE=no
45686        fi
45687      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45688          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45689        # Found lib in isa dir, use that instead.
45690        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45691        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45692$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45693      fi
45694    fi
45695  fi
45696
45697  if test "x$FOUND_FREETYPE" = xyes; then
45698
45699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45700
45701  # Input might be given as Windows format, start by converting to
45702  # unix format.
45703  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45704  new_path=`$CYGPATH -u "$path"`
45705
45706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45709  # "foo.exe" is OK but "foo" is an error.
45710  #
45711  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45712  # It is also a way to make sure we got the proper file name for the real test later on.
45713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45714  if test "x$test_shortpath" = x; then
45715    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45716$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45717    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45718  fi
45719
45720  # Call helper function which possibly converts this using DOS-style short mode.
45721  # If so, the updated path is stored in $new_path.
45722
45723  input_path="$new_path"
45724  # Check if we need to convert this using DOS-style short mode. If the path
45725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45726  # take no chances and rewrite it.
45727  # Note: m4 eats our [], so we need to use [ and ] instead.
45728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45729  if test "x$has_forbidden_chars" != x; then
45730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45731    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45732    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45733    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45734      # Going to short mode and back again did indeed matter. Since short mode is
45735      # case insensitive, let's make it lowercase to improve readability.
45736      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45737      # Now convert it back to Unix-stile (cygpath)
45738      input_path=`$CYGPATH -u "$shortmode_path"`
45739      new_path="$input_path"
45740    fi
45741  fi
45742
45743  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45744  if test "x$test_cygdrive_prefix" = x; then
45745    # As a simple fix, exclude /usr/bin since it's not a real path.
45746    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45747      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45748      # a path prefixed by /cygdrive for fixpath to work.
45749      new_path="$CYGWIN_ROOT_PATH$input_path"
45750    fi
45751  fi
45752
45753
45754  if test "x$path" != "x$new_path"; then
45755    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45757$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45758  fi
45759
45760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45761
45762  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45763  has_colon=`$ECHO $path | $GREP ^.:`
45764  new_path="$path"
45765  if test "x$has_colon" = x; then
45766    # Not in mixed or Windows style, start by that.
45767    new_path=`cmd //c echo $path`
45768  fi
45769
45770
45771  input_path="$new_path"
45772  # Check if we need to convert this using DOS-style short mode. If the path
45773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45774  # take no chances and rewrite it.
45775  # Note: m4 eats our [], so we need to use [ and ] instead.
45776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45777  if test "x$has_forbidden_chars" != x; then
45778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45779    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45780  fi
45781
45782
45783  windows_path="$new_path"
45784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45785    unix_path=`$CYGPATH -u "$windows_path"`
45786    new_path="$unix_path"
45787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45789    new_path="$unix_path"
45790  fi
45791
45792  if test "x$path" != "x$new_path"; then
45793    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45794    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45795$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45796  fi
45797
45798  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45799  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45800
45801  else
45802    # We're on a unix platform. Hooray! :)
45803    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45804    has_space=`$ECHO "$path" | $GREP " "`
45805    if test "x$has_space" != x; then
45806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45807$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45808      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45809    fi
45810
45811    # Use eval to expand a potential ~
45812    eval path="$path"
45813    if test ! -f "$path" && test ! -d "$path"; then
45814      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45815    fi
45816
45817    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45818  fi
45819
45820
45821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45822
45823  # Input might be given as Windows format, start by converting to
45824  # unix format.
45825  path="$POTENTIAL_FREETYPE_LIB_PATH"
45826  new_path=`$CYGPATH -u "$path"`
45827
45828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45831  # "foo.exe" is OK but "foo" is an error.
45832  #
45833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45834  # It is also a way to make sure we got the proper file name for the real test later on.
45835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45836  if test "x$test_shortpath" = x; then
45837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45838$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45839    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45840  fi
45841
45842  # Call helper function which possibly converts this using DOS-style short mode.
45843  # If so, the updated path is stored in $new_path.
45844
45845  input_path="$new_path"
45846  # Check if we need to convert this using DOS-style short mode. If the path
45847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45848  # take no chances and rewrite it.
45849  # Note: m4 eats our [], so we need to use [ and ] instead.
45850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45851  if test "x$has_forbidden_chars" != x; then
45852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45856      # Going to short mode and back again did indeed matter. Since short mode is
45857      # case insensitive, let's make it lowercase to improve readability.
45858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45859      # Now convert it back to Unix-stile (cygpath)
45860      input_path=`$CYGPATH -u "$shortmode_path"`
45861      new_path="$input_path"
45862    fi
45863  fi
45864
45865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45866  if test "x$test_cygdrive_prefix" = x; then
45867    # As a simple fix, exclude /usr/bin since it's not a real path.
45868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45870      # a path prefixed by /cygdrive for fixpath to work.
45871      new_path="$CYGWIN_ROOT_PATH$input_path"
45872    fi
45873  fi
45874
45875
45876  if test "x$path" != "x$new_path"; then
45877    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45879$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45880  fi
45881
45882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45883
45884  path="$POTENTIAL_FREETYPE_LIB_PATH"
45885  has_colon=`$ECHO $path | $GREP ^.:`
45886  new_path="$path"
45887  if test "x$has_colon" = x; then
45888    # Not in mixed or Windows style, start by that.
45889    new_path=`cmd //c echo $path`
45890  fi
45891
45892
45893  input_path="$new_path"
45894  # Check if we need to convert this using DOS-style short mode. If the path
45895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45896  # take no chances and rewrite it.
45897  # Note: m4 eats our [], so we need to use [ and ] instead.
45898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45899  if test "x$has_forbidden_chars" != x; then
45900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45902  fi
45903
45904
45905  windows_path="$new_path"
45906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45907    unix_path=`$CYGPATH -u "$windows_path"`
45908    new_path="$unix_path"
45909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45911    new_path="$unix_path"
45912  fi
45913
45914  if test "x$path" != "x$new_path"; then
45915    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45917$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45918  fi
45919
45920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45922
45923  else
45924    # We're on a unix platform. Hooray! :)
45925    path="$POTENTIAL_FREETYPE_LIB_PATH"
45926    has_space=`$ECHO "$path" | $GREP " "`
45927    if test "x$has_space" != x; then
45928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45929$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45930      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45931    fi
45932
45933    # Use eval to expand a potential ~
45934    eval path="$path"
45935    if test ! -f "$path" && test ! -d "$path"; then
45936      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45937    fi
45938
45939    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45940  fi
45941
45942
45943    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45945$as_echo_n "checking for freetype includes... " >&6; }
45946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45947$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45948    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45950$as_echo_n "checking for freetype libraries... " >&6; }
45951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45952$as_echo "$FREETYPE_LIB_PATH" >&6; }
45953  fi
45954
45955          fi
45956        else
45957          FREETYPE_BASE_DIR="$SYSROOT/usr"
45958
45959  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45960  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45961  METHOD="well-known location"
45962
45963  # Let's start with an optimistic view of the world :-)
45964  FOUND_FREETYPE=yes
45965
45966  # First look for the canonical freetype main include file ft2build.h.
45967  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45968    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45969    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45970    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45971      # Fail.
45972      FOUND_FREETYPE=no
45973    fi
45974  fi
45975
45976  if test "x$FOUND_FREETYPE" = xyes; then
45977    # Include file found, let's continue the sanity check.
45978    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45979$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45980
45981    # Reset to default value
45982    FREETYPE_BASE_NAME=freetype
45983    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45984    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45985      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45986          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45987        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45988        # for the .6 version explicitly.
45989        FREETYPE_BASE_NAME=freetype.6
45990        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45991        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45992$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45993      else
45994        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45995$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45996        FOUND_FREETYPE=no
45997      fi
45998    else
45999      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46000        # On Windows, we will need both .lib and .dll file.
46001        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46002          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46003$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46004          FOUND_FREETYPE=no
46005        fi
46006      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46007          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46008        # Found lib in isa dir, use that instead.
46009        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46010        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46011$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46012      fi
46013    fi
46014  fi
46015
46016  if test "x$FOUND_FREETYPE" = xyes; then
46017
46018  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46019
46020  # Input might be given as Windows format, start by converting to
46021  # unix format.
46022  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46023  new_path=`$CYGPATH -u "$path"`
46024
46025  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46026  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46027  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46028  # "foo.exe" is OK but "foo" is an error.
46029  #
46030  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46031  # It is also a way to make sure we got the proper file name for the real test later on.
46032  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46033  if test "x$test_shortpath" = x; then
46034    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46035$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46036    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46037  fi
46038
46039  # Call helper function which possibly converts this using DOS-style short mode.
46040  # If so, the updated path is stored in $new_path.
46041
46042  input_path="$new_path"
46043  # Check if we need to convert this using DOS-style short mode. If the path
46044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46045  # take no chances and rewrite it.
46046  # Note: m4 eats our [], so we need to use [ and ] instead.
46047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46048  if test "x$has_forbidden_chars" != x; then
46049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46050    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46051    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46052    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46053      # Going to short mode and back again did indeed matter. Since short mode is
46054      # case insensitive, let's make it lowercase to improve readability.
46055      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46056      # Now convert it back to Unix-stile (cygpath)
46057      input_path=`$CYGPATH -u "$shortmode_path"`
46058      new_path="$input_path"
46059    fi
46060  fi
46061
46062  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46063  if test "x$test_cygdrive_prefix" = x; then
46064    # As a simple fix, exclude /usr/bin since it's not a real path.
46065    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46066      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46067      # a path prefixed by /cygdrive for fixpath to work.
46068      new_path="$CYGWIN_ROOT_PATH$input_path"
46069    fi
46070  fi
46071
46072
46073  if test "x$path" != "x$new_path"; then
46074    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46075    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46076$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46077  fi
46078
46079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46080
46081  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46082  has_colon=`$ECHO $path | $GREP ^.:`
46083  new_path="$path"
46084  if test "x$has_colon" = x; then
46085    # Not in mixed or Windows style, start by that.
46086    new_path=`cmd //c echo $path`
46087  fi
46088
46089
46090  input_path="$new_path"
46091  # Check if we need to convert this using DOS-style short mode. If the path
46092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46093  # take no chances and rewrite it.
46094  # Note: m4 eats our [], so we need to use [ and ] instead.
46095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46096  if test "x$has_forbidden_chars" != x; then
46097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46099  fi
46100
46101
46102  windows_path="$new_path"
46103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46104    unix_path=`$CYGPATH -u "$windows_path"`
46105    new_path="$unix_path"
46106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46108    new_path="$unix_path"
46109  fi
46110
46111  if test "x$path" != "x$new_path"; then
46112    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46113    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46114$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46115  fi
46116
46117  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46118  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46119
46120  else
46121    # We're on a unix platform. Hooray! :)
46122    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46123    has_space=`$ECHO "$path" | $GREP " "`
46124    if test "x$has_space" != x; then
46125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46126$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46127      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46128    fi
46129
46130    # Use eval to expand a potential ~
46131    eval path="$path"
46132    if test ! -f "$path" && test ! -d "$path"; then
46133      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46134    fi
46135
46136    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46137  fi
46138
46139
46140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46141
46142  # Input might be given as Windows format, start by converting to
46143  # unix format.
46144  path="$POTENTIAL_FREETYPE_LIB_PATH"
46145  new_path=`$CYGPATH -u "$path"`
46146
46147  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46148  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46149  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46150  # "foo.exe" is OK but "foo" is an error.
46151  #
46152  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46153  # It is also a way to make sure we got the proper file name for the real test later on.
46154  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46155  if test "x$test_shortpath" = x; then
46156    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46157$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46158    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46159  fi
46160
46161  # Call helper function which possibly converts this using DOS-style short mode.
46162  # If so, the updated path is stored in $new_path.
46163
46164  input_path="$new_path"
46165  # Check if we need to convert this using DOS-style short mode. If the path
46166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46167  # take no chances and rewrite it.
46168  # Note: m4 eats our [], so we need to use [ and ] instead.
46169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46170  if test "x$has_forbidden_chars" != x; then
46171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46172    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46173    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46174    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46175      # Going to short mode and back again did indeed matter. Since short mode is
46176      # case insensitive, let's make it lowercase to improve readability.
46177      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46178      # Now convert it back to Unix-stile (cygpath)
46179      input_path=`$CYGPATH -u "$shortmode_path"`
46180      new_path="$input_path"
46181    fi
46182  fi
46183
46184  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46185  if test "x$test_cygdrive_prefix" = x; then
46186    # As a simple fix, exclude /usr/bin since it's not a real path.
46187    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46188      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46189      # a path prefixed by /cygdrive for fixpath to work.
46190      new_path="$CYGWIN_ROOT_PATH$input_path"
46191    fi
46192  fi
46193
46194
46195  if test "x$path" != "x$new_path"; then
46196    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46198$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46199  fi
46200
46201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46202
46203  path="$POTENTIAL_FREETYPE_LIB_PATH"
46204  has_colon=`$ECHO $path | $GREP ^.:`
46205  new_path="$path"
46206  if test "x$has_colon" = x; then
46207    # Not in mixed or Windows style, start by that.
46208    new_path=`cmd //c echo $path`
46209  fi
46210
46211
46212  input_path="$new_path"
46213  # Check if we need to convert this using DOS-style short mode. If the path
46214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46215  # take no chances and rewrite it.
46216  # Note: m4 eats our [], so we need to use [ and ] instead.
46217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46218  if test "x$has_forbidden_chars" != x; then
46219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46221  fi
46222
46223
46224  windows_path="$new_path"
46225  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46226    unix_path=`$CYGPATH -u "$windows_path"`
46227    new_path="$unix_path"
46228  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46229    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46230    new_path="$unix_path"
46231  fi
46232
46233  if test "x$path" != "x$new_path"; then
46234    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46236$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46237  fi
46238
46239  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46240  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46241
46242  else
46243    # We're on a unix platform. Hooray! :)
46244    path="$POTENTIAL_FREETYPE_LIB_PATH"
46245    has_space=`$ECHO "$path" | $GREP " "`
46246    if test "x$has_space" != x; then
46247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46248$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46249      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46250    fi
46251
46252    # Use eval to expand a potential ~
46253    eval path="$path"
46254    if test ! -f "$path" && test ! -d "$path"; then
46255      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46256    fi
46257
46258    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46259  fi
46260
46261
46262    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46264$as_echo_n "checking for freetype includes... " >&6; }
46265    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46266$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46267    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46269$as_echo_n "checking for freetype libraries... " >&6; }
46270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46271$as_echo "$FREETYPE_LIB_PATH" >&6; }
46272  fi
46273
46274
46275          if test "x$FOUND_FREETYPE" != xyes; then
46276            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46277
46278  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46279  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46280  METHOD="well-known location"
46281
46282  # Let's start with an optimistic view of the world :-)
46283  FOUND_FREETYPE=yes
46284
46285  # First look for the canonical freetype main include file ft2build.h.
46286  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46287    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46288    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46289    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46290      # Fail.
46291      FOUND_FREETYPE=no
46292    fi
46293  fi
46294
46295  if test "x$FOUND_FREETYPE" = xyes; then
46296    # Include file found, let's continue the sanity check.
46297    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46298$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46299
46300    # Reset to default value
46301    FREETYPE_BASE_NAME=freetype
46302    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46303    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46304      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46305          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46306        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46307        # for the .6 version explicitly.
46308        FREETYPE_BASE_NAME=freetype.6
46309        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46310        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46311$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46312      else
46313        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46314$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46315        FOUND_FREETYPE=no
46316      fi
46317    else
46318      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46319        # On Windows, we will need both .lib and .dll file.
46320        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46321          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46322$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46323          FOUND_FREETYPE=no
46324        fi
46325      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46326          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46327        # Found lib in isa dir, use that instead.
46328        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46329        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46330$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46331      fi
46332    fi
46333  fi
46334
46335  if test "x$FOUND_FREETYPE" = xyes; then
46336
46337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46338
46339  # Input might be given as Windows format, start by converting to
46340  # unix format.
46341  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46342  new_path=`$CYGPATH -u "$path"`
46343
46344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46347  # "foo.exe" is OK but "foo" is an error.
46348  #
46349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46350  # It is also a way to make sure we got the proper file name for the real test later on.
46351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46352  if test "x$test_shortpath" = x; then
46353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46355    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46356  fi
46357
46358  # Call helper function which possibly converts this using DOS-style short mode.
46359  # If so, the updated path is stored in $new_path.
46360
46361  input_path="$new_path"
46362  # Check if we need to convert this using DOS-style short mode. If the path
46363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46364  # take no chances and rewrite it.
46365  # Note: m4 eats our [], so we need to use [ and ] instead.
46366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46367  if test "x$has_forbidden_chars" != x; then
46368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46372      # Going to short mode and back again did indeed matter. Since short mode is
46373      # case insensitive, let's make it lowercase to improve readability.
46374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46375      # Now convert it back to Unix-stile (cygpath)
46376      input_path=`$CYGPATH -u "$shortmode_path"`
46377      new_path="$input_path"
46378    fi
46379  fi
46380
46381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46382  if test "x$test_cygdrive_prefix" = x; then
46383    # As a simple fix, exclude /usr/bin since it's not a real path.
46384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46386      # a path prefixed by /cygdrive for fixpath to work.
46387      new_path="$CYGWIN_ROOT_PATH$input_path"
46388    fi
46389  fi
46390
46391
46392  if test "x$path" != "x$new_path"; then
46393    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46395$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46396  fi
46397
46398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46399
46400  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46401  has_colon=`$ECHO $path | $GREP ^.:`
46402  new_path="$path"
46403  if test "x$has_colon" = x; then
46404    # Not in mixed or Windows style, start by that.
46405    new_path=`cmd //c echo $path`
46406  fi
46407
46408
46409  input_path="$new_path"
46410  # Check if we need to convert this using DOS-style short mode. If the path
46411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46412  # take no chances and rewrite it.
46413  # Note: m4 eats our [], so we need to use [ and ] instead.
46414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46415  if test "x$has_forbidden_chars" != x; then
46416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46418  fi
46419
46420
46421  windows_path="$new_path"
46422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46423    unix_path=`$CYGPATH -u "$windows_path"`
46424    new_path="$unix_path"
46425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46427    new_path="$unix_path"
46428  fi
46429
46430  if test "x$path" != "x$new_path"; then
46431    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46433$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46434  fi
46435
46436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46438
46439  else
46440    # We're on a unix platform. Hooray! :)
46441    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46442    has_space=`$ECHO "$path" | $GREP " "`
46443    if test "x$has_space" != x; then
46444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46445$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46446      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46447    fi
46448
46449    # Use eval to expand a potential ~
46450    eval path="$path"
46451    if test ! -f "$path" && test ! -d "$path"; then
46452      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46453    fi
46454
46455    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46456  fi
46457
46458
46459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46460
46461  # Input might be given as Windows format, start by converting to
46462  # unix format.
46463  path="$POTENTIAL_FREETYPE_LIB_PATH"
46464  new_path=`$CYGPATH -u "$path"`
46465
46466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46469  # "foo.exe" is OK but "foo" is an error.
46470  #
46471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46472  # It is also a way to make sure we got the proper file name for the real test later on.
46473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46474  if test "x$test_shortpath" = x; then
46475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46476$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46477    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46478  fi
46479
46480  # Call helper function which possibly converts this using DOS-style short mode.
46481  # If so, the updated path is stored in $new_path.
46482
46483  input_path="$new_path"
46484  # Check if we need to convert this using DOS-style short mode. If the path
46485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46486  # take no chances and rewrite it.
46487  # Note: m4 eats our [], so we need to use [ and ] instead.
46488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46489  if test "x$has_forbidden_chars" != x; then
46490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46494      # Going to short mode and back again did indeed matter. Since short mode is
46495      # case insensitive, let's make it lowercase to improve readability.
46496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46497      # Now convert it back to Unix-stile (cygpath)
46498      input_path=`$CYGPATH -u "$shortmode_path"`
46499      new_path="$input_path"
46500    fi
46501  fi
46502
46503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46504  if test "x$test_cygdrive_prefix" = x; then
46505    # As a simple fix, exclude /usr/bin since it's not a real path.
46506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46508      # a path prefixed by /cygdrive for fixpath to work.
46509      new_path="$CYGWIN_ROOT_PATH$input_path"
46510    fi
46511  fi
46512
46513
46514  if test "x$path" != "x$new_path"; then
46515    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46517$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46518  fi
46519
46520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46521
46522  path="$POTENTIAL_FREETYPE_LIB_PATH"
46523  has_colon=`$ECHO $path | $GREP ^.:`
46524  new_path="$path"
46525  if test "x$has_colon" = x; then
46526    # Not in mixed or Windows style, start by that.
46527    new_path=`cmd //c echo $path`
46528  fi
46529
46530
46531  input_path="$new_path"
46532  # Check if we need to convert this using DOS-style short mode. If the path
46533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46534  # take no chances and rewrite it.
46535  # Note: m4 eats our [], so we need to use [ and ] instead.
46536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46537  if test "x$has_forbidden_chars" != x; then
46538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46540  fi
46541
46542
46543  windows_path="$new_path"
46544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46545    unix_path=`$CYGPATH -u "$windows_path"`
46546    new_path="$unix_path"
46547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46549    new_path="$unix_path"
46550  fi
46551
46552  if test "x$path" != "x$new_path"; then
46553    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46556  fi
46557
46558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46560
46561  else
46562    # We're on a unix platform. Hooray! :)
46563    path="$POTENTIAL_FREETYPE_LIB_PATH"
46564    has_space=`$ECHO "$path" | $GREP " "`
46565    if test "x$has_space" != x; then
46566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46567$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46568      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46569    fi
46570
46571    # Use eval to expand a potential ~
46572    eval path="$path"
46573    if test ! -f "$path" && test ! -d "$path"; then
46574      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46575    fi
46576
46577    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46578  fi
46579
46580
46581    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46582    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46583$as_echo_n "checking for freetype includes... " >&6; }
46584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46585$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46586    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46588$as_echo_n "checking for freetype libraries... " >&6; }
46589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46590$as_echo "$FREETYPE_LIB_PATH" >&6; }
46591  fi
46592
46593          fi
46594
46595          if test "x$FOUND_FREETYPE" != xyes; then
46596            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46597
46598  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46599  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46600  METHOD="well-known location"
46601
46602  # Let's start with an optimistic view of the world :-)
46603  FOUND_FREETYPE=yes
46604
46605  # First look for the canonical freetype main include file ft2build.h.
46606  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46607    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46608    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46609    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46610      # Fail.
46611      FOUND_FREETYPE=no
46612    fi
46613  fi
46614
46615  if test "x$FOUND_FREETYPE" = xyes; then
46616    # Include file found, let's continue the sanity check.
46617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46618$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46619
46620    # Reset to default value
46621    FREETYPE_BASE_NAME=freetype
46622    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46623    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46624      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46625          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46626        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46627        # for the .6 version explicitly.
46628        FREETYPE_BASE_NAME=freetype.6
46629        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46630        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46631$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46632      else
46633        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46634$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46635        FOUND_FREETYPE=no
46636      fi
46637    else
46638      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46639        # On Windows, we will need both .lib and .dll file.
46640        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46641          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46642$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46643          FOUND_FREETYPE=no
46644        fi
46645      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46646          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46647        # Found lib in isa dir, use that instead.
46648        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46649        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46650$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46651      fi
46652    fi
46653  fi
46654
46655  if test "x$FOUND_FREETYPE" = xyes; then
46656
46657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46658
46659  # Input might be given as Windows format, start by converting to
46660  # unix format.
46661  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46662  new_path=`$CYGPATH -u "$path"`
46663
46664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46667  # "foo.exe" is OK but "foo" is an error.
46668  #
46669  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46670  # It is also a way to make sure we got the proper file name for the real test later on.
46671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46672  if test "x$test_shortpath" = x; then
46673    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46674$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46675    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46676  fi
46677
46678  # Call helper function which possibly converts this using DOS-style short mode.
46679  # If so, the updated path is stored in $new_path.
46680
46681  input_path="$new_path"
46682  # Check if we need to convert this using DOS-style short mode. If the path
46683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46684  # take no chances and rewrite it.
46685  # Note: m4 eats our [], so we need to use [ and ] instead.
46686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46687  if test "x$has_forbidden_chars" != x; then
46688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46689    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46690    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46691    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46692      # Going to short mode and back again did indeed matter. Since short mode is
46693      # case insensitive, let's make it lowercase to improve readability.
46694      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46695      # Now convert it back to Unix-stile (cygpath)
46696      input_path=`$CYGPATH -u "$shortmode_path"`
46697      new_path="$input_path"
46698    fi
46699  fi
46700
46701  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46702  if test "x$test_cygdrive_prefix" = x; then
46703    # As a simple fix, exclude /usr/bin since it's not a real path.
46704    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46705      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46706      # a path prefixed by /cygdrive for fixpath to work.
46707      new_path="$CYGWIN_ROOT_PATH$input_path"
46708    fi
46709  fi
46710
46711
46712  if test "x$path" != "x$new_path"; then
46713    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46714    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46715$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46716  fi
46717
46718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46719
46720  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46721  has_colon=`$ECHO $path | $GREP ^.:`
46722  new_path="$path"
46723  if test "x$has_colon" = x; then
46724    # Not in mixed or Windows style, start by that.
46725    new_path=`cmd //c echo $path`
46726  fi
46727
46728
46729  input_path="$new_path"
46730  # Check if we need to convert this using DOS-style short mode. If the path
46731  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46732  # take no chances and rewrite it.
46733  # Note: m4 eats our [], so we need to use [ and ] instead.
46734  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46735  if test "x$has_forbidden_chars" != x; then
46736    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46737    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46738  fi
46739
46740
46741  windows_path="$new_path"
46742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46743    unix_path=`$CYGPATH -u "$windows_path"`
46744    new_path="$unix_path"
46745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46747    new_path="$unix_path"
46748  fi
46749
46750  if test "x$path" != "x$new_path"; then
46751    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46753$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46754  fi
46755
46756  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46757  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46758
46759  else
46760    # We're on a unix platform. Hooray! :)
46761    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46762    has_space=`$ECHO "$path" | $GREP " "`
46763    if test "x$has_space" != x; then
46764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46765$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46766      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46767    fi
46768
46769    # Use eval to expand a potential ~
46770    eval path="$path"
46771    if test ! -f "$path" && test ! -d "$path"; then
46772      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46773    fi
46774
46775    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46776  fi
46777
46778
46779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46780
46781  # Input might be given as Windows format, start by converting to
46782  # unix format.
46783  path="$POTENTIAL_FREETYPE_LIB_PATH"
46784  new_path=`$CYGPATH -u "$path"`
46785
46786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46789  # "foo.exe" is OK but "foo" is an error.
46790  #
46791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46792  # It is also a way to make sure we got the proper file name for the real test later on.
46793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46794  if test "x$test_shortpath" = x; then
46795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46796$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46797    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46798  fi
46799
46800  # Call helper function which possibly converts this using DOS-style short mode.
46801  # If so, the updated path is stored in $new_path.
46802
46803  input_path="$new_path"
46804  # Check if we need to convert this using DOS-style short mode. If the path
46805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46806  # take no chances and rewrite it.
46807  # Note: m4 eats our [], so we need to use [ and ] instead.
46808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46809  if test "x$has_forbidden_chars" != x; then
46810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46814      # Going to short mode and back again did indeed matter. Since short mode is
46815      # case insensitive, let's make it lowercase to improve readability.
46816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46817      # Now convert it back to Unix-stile (cygpath)
46818      input_path=`$CYGPATH -u "$shortmode_path"`
46819      new_path="$input_path"
46820    fi
46821  fi
46822
46823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46824  if test "x$test_cygdrive_prefix" = x; then
46825    # As a simple fix, exclude /usr/bin since it's not a real path.
46826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46828      # a path prefixed by /cygdrive for fixpath to work.
46829      new_path="$CYGWIN_ROOT_PATH$input_path"
46830    fi
46831  fi
46832
46833
46834  if test "x$path" != "x$new_path"; then
46835    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46837$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46838  fi
46839
46840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46841
46842  path="$POTENTIAL_FREETYPE_LIB_PATH"
46843  has_colon=`$ECHO $path | $GREP ^.:`
46844  new_path="$path"
46845  if test "x$has_colon" = x; then
46846    # Not in mixed or Windows style, start by that.
46847    new_path=`cmd //c echo $path`
46848  fi
46849
46850
46851  input_path="$new_path"
46852  # Check if we need to convert this using DOS-style short mode. If the path
46853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46854  # take no chances and rewrite it.
46855  # Note: m4 eats our [], so we need to use [ and ] instead.
46856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46857  if test "x$has_forbidden_chars" != x; then
46858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46860  fi
46861
46862
46863  windows_path="$new_path"
46864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46865    unix_path=`$CYGPATH -u "$windows_path"`
46866    new_path="$unix_path"
46867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46869    new_path="$unix_path"
46870  fi
46871
46872  if test "x$path" != "x$new_path"; then
46873    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46876  fi
46877
46878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46880
46881  else
46882    # We're on a unix platform. Hooray! :)
46883    path="$POTENTIAL_FREETYPE_LIB_PATH"
46884    has_space=`$ECHO "$path" | $GREP " "`
46885    if test "x$has_space" != x; then
46886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46887$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46888      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46889    fi
46890
46891    # Use eval to expand a potential ~
46892    eval path="$path"
46893    if test ! -f "$path" && test ! -d "$path"; then
46894      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46895    fi
46896
46897    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46898  fi
46899
46900
46901    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46903$as_echo_n "checking for freetype includes... " >&6; }
46904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46905$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46906    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46907    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46908$as_echo_n "checking for freetype libraries... " >&6; }
46909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46910$as_echo "$FREETYPE_LIB_PATH" >&6; }
46911  fi
46912
46913          fi
46914
46915          if test "x$FOUND_FREETYPE" != xyes; then
46916            FREETYPE_BASE_DIR="$SYSROOT/usr"
46917            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46918
46919  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46920  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46921  METHOD="well-known location"
46922
46923  # Let's start with an optimistic view of the world :-)
46924  FOUND_FREETYPE=yes
46925
46926  # First look for the canonical freetype main include file ft2build.h.
46927  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46928    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46929    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46930    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46931      # Fail.
46932      FOUND_FREETYPE=no
46933    fi
46934  fi
46935
46936  if test "x$FOUND_FREETYPE" = xyes; then
46937    # Include file found, let's continue the sanity check.
46938    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46939$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46940
46941    # Reset to default value
46942    FREETYPE_BASE_NAME=freetype
46943    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46944    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46945      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46946          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46947        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46948        # for the .6 version explicitly.
46949        FREETYPE_BASE_NAME=freetype.6
46950        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46951        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46952$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46953      else
46954        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46955$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46956        FOUND_FREETYPE=no
46957      fi
46958    else
46959      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46960        # On Windows, we will need both .lib and .dll file.
46961        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46962          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46963$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46964          FOUND_FREETYPE=no
46965        fi
46966      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46967          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46968        # Found lib in isa dir, use that instead.
46969        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46970        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46971$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46972      fi
46973    fi
46974  fi
46975
46976  if test "x$FOUND_FREETYPE" = xyes; then
46977
46978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46979
46980  # Input might be given as Windows format, start by converting to
46981  # unix format.
46982  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46983  new_path=`$CYGPATH -u "$path"`
46984
46985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46988  # "foo.exe" is OK but "foo" is an error.
46989  #
46990  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46991  # It is also a way to make sure we got the proper file name for the real test later on.
46992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46993  if test "x$test_shortpath" = x; then
46994    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46996    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46997  fi
46998
46999  # Call helper function which possibly converts this using DOS-style short mode.
47000  # If so, the updated path is stored in $new_path.
47001
47002  input_path="$new_path"
47003  # Check if we need to convert this using DOS-style short mode. If the path
47004  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47005  # take no chances and rewrite it.
47006  # Note: m4 eats our [], so we need to use [ and ] instead.
47007  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47008  if test "x$has_forbidden_chars" != x; then
47009    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47010    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47011    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47012    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47013      # Going to short mode and back again did indeed matter. Since short mode is
47014      # case insensitive, let's make it lowercase to improve readability.
47015      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47016      # Now convert it back to Unix-stile (cygpath)
47017      input_path=`$CYGPATH -u "$shortmode_path"`
47018      new_path="$input_path"
47019    fi
47020  fi
47021
47022  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47023  if test "x$test_cygdrive_prefix" = x; then
47024    # As a simple fix, exclude /usr/bin since it's not a real path.
47025    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47026      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47027      # a path prefixed by /cygdrive for fixpath to work.
47028      new_path="$CYGWIN_ROOT_PATH$input_path"
47029    fi
47030  fi
47031
47032
47033  if test "x$path" != "x$new_path"; then
47034    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47035    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47036$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47037  fi
47038
47039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47040
47041  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47042  has_colon=`$ECHO $path | $GREP ^.:`
47043  new_path="$path"
47044  if test "x$has_colon" = x; then
47045    # Not in mixed or Windows style, start by that.
47046    new_path=`cmd //c echo $path`
47047  fi
47048
47049
47050  input_path="$new_path"
47051  # Check if we need to convert this using DOS-style short mode. If the path
47052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47053  # take no chances and rewrite it.
47054  # Note: m4 eats our [], so we need to use [ and ] instead.
47055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47056  if test "x$has_forbidden_chars" != x; then
47057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47058    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47059  fi
47060
47061
47062  windows_path="$new_path"
47063  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47064    unix_path=`$CYGPATH -u "$windows_path"`
47065    new_path="$unix_path"
47066  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47067    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47068    new_path="$unix_path"
47069  fi
47070
47071  if test "x$path" != "x$new_path"; then
47072    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47074$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47075  fi
47076
47077  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47078  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47079
47080  else
47081    # We're on a unix platform. Hooray! :)
47082    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47083    has_space=`$ECHO "$path" | $GREP " "`
47084    if test "x$has_space" != x; then
47085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47087      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47088    fi
47089
47090    # Use eval to expand a potential ~
47091    eval path="$path"
47092    if test ! -f "$path" && test ! -d "$path"; then
47093      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47094    fi
47095
47096    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47097  fi
47098
47099
47100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47101
47102  # Input might be given as Windows format, start by converting to
47103  # unix format.
47104  path="$POTENTIAL_FREETYPE_LIB_PATH"
47105  new_path=`$CYGPATH -u "$path"`
47106
47107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47110  # "foo.exe" is OK but "foo" is an error.
47111  #
47112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47113  # It is also a way to make sure we got the proper file name for the real test later on.
47114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47115  if test "x$test_shortpath" = x; then
47116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47118    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47119  fi
47120
47121  # Call helper function which possibly converts this using DOS-style short mode.
47122  # If so, the updated path is stored in $new_path.
47123
47124  input_path="$new_path"
47125  # Check if we need to convert this using DOS-style short mode. If the path
47126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47127  # take no chances and rewrite it.
47128  # Note: m4 eats our [], so we need to use [ and ] instead.
47129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47130  if test "x$has_forbidden_chars" != x; then
47131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47135      # Going to short mode and back again did indeed matter. Since short mode is
47136      # case insensitive, let's make it lowercase to improve readability.
47137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47138      # Now convert it back to Unix-stile (cygpath)
47139      input_path=`$CYGPATH -u "$shortmode_path"`
47140      new_path="$input_path"
47141    fi
47142  fi
47143
47144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47145  if test "x$test_cygdrive_prefix" = x; then
47146    # As a simple fix, exclude /usr/bin since it's not a real path.
47147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47149      # a path prefixed by /cygdrive for fixpath to work.
47150      new_path="$CYGWIN_ROOT_PATH$input_path"
47151    fi
47152  fi
47153
47154
47155  if test "x$path" != "x$new_path"; then
47156    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47159  fi
47160
47161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47162
47163  path="$POTENTIAL_FREETYPE_LIB_PATH"
47164  has_colon=`$ECHO $path | $GREP ^.:`
47165  new_path="$path"
47166  if test "x$has_colon" = x; then
47167    # Not in mixed or Windows style, start by that.
47168    new_path=`cmd //c echo $path`
47169  fi
47170
47171
47172  input_path="$new_path"
47173  # Check if we need to convert this using DOS-style short mode. If the path
47174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47175  # take no chances and rewrite it.
47176  # Note: m4 eats our [], so we need to use [ and ] instead.
47177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47178  if test "x$has_forbidden_chars" != x; then
47179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47181  fi
47182
47183
47184  windows_path="$new_path"
47185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47186    unix_path=`$CYGPATH -u "$windows_path"`
47187    new_path="$unix_path"
47188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47190    new_path="$unix_path"
47191  fi
47192
47193  if test "x$path" != "x$new_path"; then
47194    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47196$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47197  fi
47198
47199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47201
47202  else
47203    # We're on a unix platform. Hooray! :)
47204    path="$POTENTIAL_FREETYPE_LIB_PATH"
47205    has_space=`$ECHO "$path" | $GREP " "`
47206    if test "x$has_space" != x; then
47207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47209      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47210    fi
47211
47212    # Use eval to expand a potential ~
47213    eval path="$path"
47214    if test ! -f "$path" && test ! -d "$path"; then
47215      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47216    fi
47217
47218    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47219  fi
47220
47221
47222    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47223    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47224$as_echo_n "checking for freetype includes... " >&6; }
47225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47226$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47227    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47228    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47229$as_echo_n "checking for freetype libraries... " >&6; }
47230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47231$as_echo "$FREETYPE_LIB_PATH" >&6; }
47232  fi
47233
47234            else
47235
47236  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47237  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47238  METHOD="well-known location"
47239
47240  # Let's start with an optimistic view of the world :-)
47241  FOUND_FREETYPE=yes
47242
47243  # First look for the canonical freetype main include file ft2build.h.
47244  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47245    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47246    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47247    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47248      # Fail.
47249      FOUND_FREETYPE=no
47250    fi
47251  fi
47252
47253  if test "x$FOUND_FREETYPE" = xyes; then
47254    # Include file found, let's continue the sanity check.
47255    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47256$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47257
47258    # Reset to default value
47259    FREETYPE_BASE_NAME=freetype
47260    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47261    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47262      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47263          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47264        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47265        # for the .6 version explicitly.
47266        FREETYPE_BASE_NAME=freetype.6
47267        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47268        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47269$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47270      else
47271        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47272$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47273        FOUND_FREETYPE=no
47274      fi
47275    else
47276      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47277        # On Windows, we will need both .lib and .dll file.
47278        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47279          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47280$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47281          FOUND_FREETYPE=no
47282        fi
47283      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47284          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47285        # Found lib in isa dir, use that instead.
47286        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47287        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47288$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47289      fi
47290    fi
47291  fi
47292
47293  if test "x$FOUND_FREETYPE" = xyes; then
47294
47295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47296
47297  # Input might be given as Windows format, start by converting to
47298  # unix format.
47299  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47300  new_path=`$CYGPATH -u "$path"`
47301
47302  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47303  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47304  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47305  # "foo.exe" is OK but "foo" is an error.
47306  #
47307  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47308  # It is also a way to make sure we got the proper file name for the real test later on.
47309  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47310  if test "x$test_shortpath" = x; then
47311    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47312$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47313    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47314  fi
47315
47316  # Call helper function which possibly converts this using DOS-style short mode.
47317  # If so, the updated path is stored in $new_path.
47318
47319  input_path="$new_path"
47320  # Check if we need to convert this using DOS-style short mode. If the path
47321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47322  # take no chances and rewrite it.
47323  # Note: m4 eats our [], so we need to use [ and ] instead.
47324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47325  if test "x$has_forbidden_chars" != x; then
47326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47330      # Going to short mode and back again did indeed matter. Since short mode is
47331      # case insensitive, let's make it lowercase to improve readability.
47332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47333      # Now convert it back to Unix-stile (cygpath)
47334      input_path=`$CYGPATH -u "$shortmode_path"`
47335      new_path="$input_path"
47336    fi
47337  fi
47338
47339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47340  if test "x$test_cygdrive_prefix" = x; then
47341    # As a simple fix, exclude /usr/bin since it's not a real path.
47342    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47344      # a path prefixed by /cygdrive for fixpath to work.
47345      new_path="$CYGWIN_ROOT_PATH$input_path"
47346    fi
47347  fi
47348
47349
47350  if test "x$path" != "x$new_path"; then
47351    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47353$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47354  fi
47355
47356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47357
47358  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47359  has_colon=`$ECHO $path | $GREP ^.:`
47360  new_path="$path"
47361  if test "x$has_colon" = x; then
47362    # Not in mixed or Windows style, start by that.
47363    new_path=`cmd //c echo $path`
47364  fi
47365
47366
47367  input_path="$new_path"
47368  # Check if we need to convert this using DOS-style short mode. If the path
47369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47370  # take no chances and rewrite it.
47371  # Note: m4 eats our [], so we need to use [ and ] instead.
47372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47373  if test "x$has_forbidden_chars" != x; then
47374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47376  fi
47377
47378
47379  windows_path="$new_path"
47380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47381    unix_path=`$CYGPATH -u "$windows_path"`
47382    new_path="$unix_path"
47383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47385    new_path="$unix_path"
47386  fi
47387
47388  if test "x$path" != "x$new_path"; then
47389    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47390    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47391$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47392  fi
47393
47394  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47395  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47396
47397  else
47398    # We're on a unix platform. Hooray! :)
47399    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47400    has_space=`$ECHO "$path" | $GREP " "`
47401    if test "x$has_space" != x; then
47402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47403$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47404      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47405    fi
47406
47407    # Use eval to expand a potential ~
47408    eval path="$path"
47409    if test ! -f "$path" && test ! -d "$path"; then
47410      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47411    fi
47412
47413    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47414  fi
47415
47416
47417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47418
47419  # Input might be given as Windows format, start by converting to
47420  # unix format.
47421  path="$POTENTIAL_FREETYPE_LIB_PATH"
47422  new_path=`$CYGPATH -u "$path"`
47423
47424  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47425  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47426  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47427  # "foo.exe" is OK but "foo" is an error.
47428  #
47429  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47430  # It is also a way to make sure we got the proper file name for the real test later on.
47431  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47432  if test "x$test_shortpath" = x; then
47433    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47435    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47436  fi
47437
47438  # Call helper function which possibly converts this using DOS-style short mode.
47439  # If so, the updated path is stored in $new_path.
47440
47441  input_path="$new_path"
47442  # Check if we need to convert this using DOS-style short mode. If the path
47443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47444  # take no chances and rewrite it.
47445  # Note: m4 eats our [], so we need to use [ and ] instead.
47446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47447  if test "x$has_forbidden_chars" != x; then
47448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47449    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47450    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47451    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47452      # Going to short mode and back again did indeed matter. Since short mode is
47453      # case insensitive, let's make it lowercase to improve readability.
47454      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47455      # Now convert it back to Unix-stile (cygpath)
47456      input_path=`$CYGPATH -u "$shortmode_path"`
47457      new_path="$input_path"
47458    fi
47459  fi
47460
47461  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47462  if test "x$test_cygdrive_prefix" = x; then
47463    # As a simple fix, exclude /usr/bin since it's not a real path.
47464    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47465      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47466      # a path prefixed by /cygdrive for fixpath to work.
47467      new_path="$CYGWIN_ROOT_PATH$input_path"
47468    fi
47469  fi
47470
47471
47472  if test "x$path" != "x$new_path"; then
47473    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47474    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47475$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47476  fi
47477
47478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47479
47480  path="$POTENTIAL_FREETYPE_LIB_PATH"
47481  has_colon=`$ECHO $path | $GREP ^.:`
47482  new_path="$path"
47483  if test "x$has_colon" = x; then
47484    # Not in mixed or Windows style, start by that.
47485    new_path=`cmd //c echo $path`
47486  fi
47487
47488
47489  input_path="$new_path"
47490  # Check if we need to convert this using DOS-style short mode. If the path
47491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47492  # take no chances and rewrite it.
47493  # Note: m4 eats our [], so we need to use [ and ] instead.
47494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47495  if test "x$has_forbidden_chars" != x; then
47496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47497    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47498  fi
47499
47500
47501  windows_path="$new_path"
47502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47503    unix_path=`$CYGPATH -u "$windows_path"`
47504    new_path="$unix_path"
47505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47507    new_path="$unix_path"
47508  fi
47509
47510  if test "x$path" != "x$new_path"; then
47511    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47513$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47514  fi
47515
47516  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47517  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47518
47519  else
47520    # We're on a unix platform. Hooray! :)
47521    path="$POTENTIAL_FREETYPE_LIB_PATH"
47522    has_space=`$ECHO "$path" | $GREP " "`
47523    if test "x$has_space" != x; then
47524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47525$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47526      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47527    fi
47528
47529    # Use eval to expand a potential ~
47530    eval path="$path"
47531    if test ! -f "$path" && test ! -d "$path"; then
47532      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47533    fi
47534
47535    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47536  fi
47537
47538
47539    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47541$as_echo_n "checking for freetype includes... " >&6; }
47542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47543$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47544    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47545    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47546$as_echo_n "checking for freetype libraries... " >&6; }
47547    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47548$as_echo "$FREETYPE_LIB_PATH" >&6; }
47549  fi
47550
47551              if test "x$FOUND_FREETYPE" != xyes; then
47552
47553  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47554  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47555  METHOD="well-known location"
47556
47557  # Let's start with an optimistic view of the world :-)
47558  FOUND_FREETYPE=yes
47559
47560  # First look for the canonical freetype main include file ft2build.h.
47561  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47562    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47563    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47564    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47565      # Fail.
47566      FOUND_FREETYPE=no
47567    fi
47568  fi
47569
47570  if test "x$FOUND_FREETYPE" = xyes; then
47571    # Include file found, let's continue the sanity check.
47572    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47573$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47574
47575    # Reset to default value
47576    FREETYPE_BASE_NAME=freetype
47577    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47578    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47579      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47580          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47581        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47582        # for the .6 version explicitly.
47583        FREETYPE_BASE_NAME=freetype.6
47584        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47585        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47586$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47587      else
47588        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47589$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47590        FOUND_FREETYPE=no
47591      fi
47592    else
47593      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47594        # On Windows, we will need both .lib and .dll file.
47595        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47596          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47597$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47598          FOUND_FREETYPE=no
47599        fi
47600      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47601          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47602        # Found lib in isa dir, use that instead.
47603        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47604        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47605$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47606      fi
47607    fi
47608  fi
47609
47610  if test "x$FOUND_FREETYPE" = xyes; then
47611
47612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47613
47614  # Input might be given as Windows format, start by converting to
47615  # unix format.
47616  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47617  new_path=`$CYGPATH -u "$path"`
47618
47619  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47620  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47621  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47622  # "foo.exe" is OK but "foo" is an error.
47623  #
47624  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47625  # It is also a way to make sure we got the proper file name for the real test later on.
47626  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47627  if test "x$test_shortpath" = x; then
47628    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47629$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47630    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47631  fi
47632
47633  # Call helper function which possibly converts this using DOS-style short mode.
47634  # If so, the updated path is stored in $new_path.
47635
47636  input_path="$new_path"
47637  # Check if we need to convert this using DOS-style short mode. If the path
47638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47639  # take no chances and rewrite it.
47640  # Note: m4 eats our [], so we need to use [ and ] instead.
47641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47642  if test "x$has_forbidden_chars" != x; then
47643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47644    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47645    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47646    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47647      # Going to short mode and back again did indeed matter. Since short mode is
47648      # case insensitive, let's make it lowercase to improve readability.
47649      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47650      # Now convert it back to Unix-stile (cygpath)
47651      input_path=`$CYGPATH -u "$shortmode_path"`
47652      new_path="$input_path"
47653    fi
47654  fi
47655
47656  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47657  if test "x$test_cygdrive_prefix" = x; then
47658    # As a simple fix, exclude /usr/bin since it's not a real path.
47659    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47660      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47661      # a path prefixed by /cygdrive for fixpath to work.
47662      new_path="$CYGWIN_ROOT_PATH$input_path"
47663    fi
47664  fi
47665
47666
47667  if test "x$path" != "x$new_path"; then
47668    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47670$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47671  fi
47672
47673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47674
47675  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47676  has_colon=`$ECHO $path | $GREP ^.:`
47677  new_path="$path"
47678  if test "x$has_colon" = x; then
47679    # Not in mixed or Windows style, start by that.
47680    new_path=`cmd //c echo $path`
47681  fi
47682
47683
47684  input_path="$new_path"
47685  # Check if we need to convert this using DOS-style short mode. If the path
47686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47687  # take no chances and rewrite it.
47688  # Note: m4 eats our [], so we need to use [ and ] instead.
47689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47690  if test "x$has_forbidden_chars" != x; then
47691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47692    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47693  fi
47694
47695
47696  windows_path="$new_path"
47697  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47698    unix_path=`$CYGPATH -u "$windows_path"`
47699    new_path="$unix_path"
47700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47701    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47702    new_path="$unix_path"
47703  fi
47704
47705  if test "x$path" != "x$new_path"; then
47706    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47708$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47709  fi
47710
47711  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47712  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47713
47714  else
47715    # We're on a unix platform. Hooray! :)
47716    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47717    has_space=`$ECHO "$path" | $GREP " "`
47718    if test "x$has_space" != x; then
47719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47720$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47721      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47722    fi
47723
47724    # Use eval to expand a potential ~
47725    eval path="$path"
47726    if test ! -f "$path" && test ! -d "$path"; then
47727      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47728    fi
47729
47730    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47731  fi
47732
47733
47734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47735
47736  # Input might be given as Windows format, start by converting to
47737  # unix format.
47738  path="$POTENTIAL_FREETYPE_LIB_PATH"
47739  new_path=`$CYGPATH -u "$path"`
47740
47741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47744  # "foo.exe" is OK but "foo" is an error.
47745  #
47746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47747  # It is also a way to make sure we got the proper file name for the real test later on.
47748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47749  if test "x$test_shortpath" = x; then
47750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47751$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47752    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47753  fi
47754
47755  # Call helper function which possibly converts this using DOS-style short mode.
47756  # If so, the updated path is stored in $new_path.
47757
47758  input_path="$new_path"
47759  # Check if we need to convert this using DOS-style short mode. If the path
47760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47761  # take no chances and rewrite it.
47762  # Note: m4 eats our [], so we need to use [ and ] instead.
47763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47764  if test "x$has_forbidden_chars" != x; then
47765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47769      # Going to short mode and back again did indeed matter. Since short mode is
47770      # case insensitive, let's make it lowercase to improve readability.
47771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47772      # Now convert it back to Unix-stile (cygpath)
47773      input_path=`$CYGPATH -u "$shortmode_path"`
47774      new_path="$input_path"
47775    fi
47776  fi
47777
47778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47779  if test "x$test_cygdrive_prefix" = x; then
47780    # As a simple fix, exclude /usr/bin since it's not a real path.
47781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47783      # a path prefixed by /cygdrive for fixpath to work.
47784      new_path="$CYGWIN_ROOT_PATH$input_path"
47785    fi
47786  fi
47787
47788
47789  if test "x$path" != "x$new_path"; then
47790    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47792$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47793  fi
47794
47795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47796
47797  path="$POTENTIAL_FREETYPE_LIB_PATH"
47798  has_colon=`$ECHO $path | $GREP ^.:`
47799  new_path="$path"
47800  if test "x$has_colon" = x; then
47801    # Not in mixed or Windows style, start by that.
47802    new_path=`cmd //c echo $path`
47803  fi
47804
47805
47806  input_path="$new_path"
47807  # Check if we need to convert this using DOS-style short mode. If the path
47808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47809  # take no chances and rewrite it.
47810  # Note: m4 eats our [], so we need to use [ and ] instead.
47811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47812  if test "x$has_forbidden_chars" != x; then
47813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47815  fi
47816
47817
47818  windows_path="$new_path"
47819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47820    unix_path=`$CYGPATH -u "$windows_path"`
47821    new_path="$unix_path"
47822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47824    new_path="$unix_path"
47825  fi
47826
47827  if test "x$path" != "x$new_path"; then
47828    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47830$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47831  fi
47832
47833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47835
47836  else
47837    # We're on a unix platform. Hooray! :)
47838    path="$POTENTIAL_FREETYPE_LIB_PATH"
47839    has_space=`$ECHO "$path" | $GREP " "`
47840    if test "x$has_space" != x; then
47841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47842$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47843      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47844    fi
47845
47846    # Use eval to expand a potential ~
47847    eval path="$path"
47848    if test ! -f "$path" && test ! -d "$path"; then
47849      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47850    fi
47851
47852    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47853  fi
47854
47855
47856    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47858$as_echo_n "checking for freetype includes... " >&6; }
47859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47860$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47861    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47862    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47863$as_echo_n "checking for freetype libraries... " >&6; }
47864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47865$as_echo "$FREETYPE_LIB_PATH" >&6; }
47866  fi
47867
47868              fi
47869            fi
47870          fi
47871        fi
47872      fi # end check in well-known locations
47873
47874      if test "x$FOUND_FREETYPE" != xyes; then
47875
47876  # Print a helpful message on how to acquire the necessary build dependency.
47877  # freetype is the help tag: freetype, cups, pulse, alsa etc
47878  MISSING_DEPENDENCY=freetype
47879
47880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47881    cygwin_help $MISSING_DEPENDENCY
47882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47883    msys_help $MISSING_DEPENDENCY
47884  else
47885    PKGHANDLER_COMMAND=
47886
47887    case $PKGHANDLER in
47888      apt-get)
47889        apt_help     $MISSING_DEPENDENCY ;;
47890      yum)
47891        yum_help     $MISSING_DEPENDENCY ;;
47892      port)
47893        port_help    $MISSING_DEPENDENCY ;;
47894      pkgutil)
47895        pkgutil_help $MISSING_DEPENDENCY ;;
47896      pkgadd)
47897        pkgadd_help  $MISSING_DEPENDENCY ;;
47898    esac
47899
47900    if test "x$PKGHANDLER_COMMAND" != x; then
47901      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47902    fi
47903  fi
47904
47905        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47906      fi
47907    fi # end user specified settings
47908
47909    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47910    if test "x$FREETYPE_CFLAGS" = x; then
47911
47912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47913
47914  # Input might be given as Windows format, start by converting to
47915  # unix format.
47916  path="$FREETYPE_INCLUDE_PATH"
47917  new_path=`$CYGPATH -u "$path"`
47918
47919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47922  # "foo.exe" is OK but "foo" is an error.
47923  #
47924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47925  # It is also a way to make sure we got the proper file name for the real test later on.
47926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47927  if test "x$test_shortpath" = x; then
47928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47929$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47930    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47931  fi
47932
47933  # Call helper function which possibly converts this using DOS-style short mode.
47934  # If so, the updated path is stored in $new_path.
47935
47936  input_path="$new_path"
47937  # Check if we need to convert this using DOS-style short mode. If the path
47938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47939  # take no chances and rewrite it.
47940  # Note: m4 eats our [], so we need to use [ and ] instead.
47941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47942  if test "x$has_forbidden_chars" != x; then
47943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47947      # Going to short mode and back again did indeed matter. Since short mode is
47948      # case insensitive, let's make it lowercase to improve readability.
47949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47950      # Now convert it back to Unix-stile (cygpath)
47951      input_path=`$CYGPATH -u "$shortmode_path"`
47952      new_path="$input_path"
47953    fi
47954  fi
47955
47956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47957  if test "x$test_cygdrive_prefix" = x; then
47958    # As a simple fix, exclude /usr/bin since it's not a real path.
47959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47961      # a path prefixed by /cygdrive for fixpath to work.
47962      new_path="$CYGWIN_ROOT_PATH$input_path"
47963    fi
47964  fi
47965
47966
47967  if test "x$path" != "x$new_path"; then
47968    FREETYPE_INCLUDE_PATH="$new_path"
47969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47970$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47971  fi
47972
47973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47974
47975  path="$FREETYPE_INCLUDE_PATH"
47976  has_colon=`$ECHO $path | $GREP ^.:`
47977  new_path="$path"
47978  if test "x$has_colon" = x; then
47979    # Not in mixed or Windows style, start by that.
47980    new_path=`cmd //c echo $path`
47981  fi
47982
47983
47984  input_path="$new_path"
47985  # Check if we need to convert this using DOS-style short mode. If the path
47986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47987  # take no chances and rewrite it.
47988  # Note: m4 eats our [], so we need to use [ and ] instead.
47989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47990  if test "x$has_forbidden_chars" != x; then
47991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47993  fi
47994
47995
47996  windows_path="$new_path"
47997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47998    unix_path=`$CYGPATH -u "$windows_path"`
47999    new_path="$unix_path"
48000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48002    new_path="$unix_path"
48003  fi
48004
48005  if test "x$path" != "x$new_path"; then
48006    FREETYPE_INCLUDE_PATH="$new_path"
48007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48008$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48009  fi
48010
48011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48013
48014  else
48015    # We're on a unix platform. Hooray! :)
48016    path="$FREETYPE_INCLUDE_PATH"
48017    has_space=`$ECHO "$path" | $GREP " "`
48018    if test "x$has_space" != x; then
48019      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48020$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48021      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48022    fi
48023
48024    # Use eval to expand a potential ~
48025    eval path="$path"
48026    if test ! -f "$path" && test ! -d "$path"; then
48027      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48028    fi
48029
48030    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48031  fi
48032
48033      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48034        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48035      else
48036        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48037      fi
48038    fi
48039
48040    if test "x$FREETYPE_LIBS" = x; then
48041
48042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48043
48044  # Input might be given as Windows format, start by converting to
48045  # unix format.
48046  path="$FREETYPE_LIB_PATH"
48047  new_path=`$CYGPATH -u "$path"`
48048
48049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48052  # "foo.exe" is OK but "foo" is an error.
48053  #
48054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48055  # It is also a way to make sure we got the proper file name for the real test later on.
48056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48057  if test "x$test_shortpath" = x; then
48058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48059$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48060    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48061  fi
48062
48063  # Call helper function which possibly converts this using DOS-style short mode.
48064  # If so, the updated path is stored in $new_path.
48065
48066  input_path="$new_path"
48067  # Check if we need to convert this using DOS-style short mode. If the path
48068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48069  # take no chances and rewrite it.
48070  # Note: m4 eats our [], so we need to use [ and ] instead.
48071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48072  if test "x$has_forbidden_chars" != x; then
48073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48077      # Going to short mode and back again did indeed matter. Since short mode is
48078      # case insensitive, let's make it lowercase to improve readability.
48079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48080      # Now convert it back to Unix-stile (cygpath)
48081      input_path=`$CYGPATH -u "$shortmode_path"`
48082      new_path="$input_path"
48083    fi
48084  fi
48085
48086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48087  if test "x$test_cygdrive_prefix" = x; then
48088    # As a simple fix, exclude /usr/bin since it's not a real path.
48089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48091      # a path prefixed by /cygdrive for fixpath to work.
48092      new_path="$CYGWIN_ROOT_PATH$input_path"
48093    fi
48094  fi
48095
48096
48097  if test "x$path" != "x$new_path"; then
48098    FREETYPE_LIB_PATH="$new_path"
48099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48100$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48101  fi
48102
48103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48104
48105  path="$FREETYPE_LIB_PATH"
48106  has_colon=`$ECHO $path | $GREP ^.:`
48107  new_path="$path"
48108  if test "x$has_colon" = x; then
48109    # Not in mixed or Windows style, start by that.
48110    new_path=`cmd //c echo $path`
48111  fi
48112
48113
48114  input_path="$new_path"
48115  # Check if we need to convert this using DOS-style short mode. If the path
48116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48117  # take no chances and rewrite it.
48118  # Note: m4 eats our [], so we need to use [ and ] instead.
48119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48120  if test "x$has_forbidden_chars" != x; then
48121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48123  fi
48124
48125
48126  windows_path="$new_path"
48127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48128    unix_path=`$CYGPATH -u "$windows_path"`
48129    new_path="$unix_path"
48130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48132    new_path="$unix_path"
48133  fi
48134
48135  if test "x$path" != "x$new_path"; then
48136    FREETYPE_LIB_PATH="$new_path"
48137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48138$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48139  fi
48140
48141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48143
48144  else
48145    # We're on a unix platform. Hooray! :)
48146    path="$FREETYPE_LIB_PATH"
48147    has_space=`$ECHO "$path" | $GREP " "`
48148    if test "x$has_space" != x; then
48149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48150$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48151      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48152    fi
48153
48154    # Use eval to expand a potential ~
48155    eval path="$path"
48156    if test ! -f "$path" && test ! -d "$path"; then
48157      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48158    fi
48159
48160    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48161  fi
48162
48163      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48164        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48165      else
48166        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48167      fi
48168    fi
48169
48170    # Try to compile it
48171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48172$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48173    ac_ext=cpp
48174ac_cpp='$CXXCPP $CPPFLAGS'
48175ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48176ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48177ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48178
48179    PREV_CXXCFLAGS="$CXXFLAGS"
48180    PREV_LIBS="$LIBS"
48181    PREV_CXX="$CXX"
48182    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48183    LIBS="$LIBS $FREETYPE_LIBS"
48184    CXX="$FIXPATH $CXX"
48185    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48186/* end confdefs.h.  */
48187
48188          #include<ft2build.h>
48189          #include FT_FREETYPE_H
48190          int main () {
48191            FT_Init_FreeType(NULL);
48192            return 0;
48193          }
48194
48195_ACEOF
48196if ac_fn_cxx_try_link "$LINENO"; then :
48197
48198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48199$as_echo "yes" >&6; }
48200
48201else
48202
48203          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48204$as_echo "no" >&6; }
48205          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48206$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48207          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48208$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48209
48210
48211  # Print a helpful message on how to acquire the necessary build dependency.
48212  # freetype is the help tag: freetype, cups, pulse, alsa etc
48213  MISSING_DEPENDENCY=freetype
48214
48215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48216    cygwin_help $MISSING_DEPENDENCY
48217  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48218    msys_help $MISSING_DEPENDENCY
48219  else
48220    PKGHANDLER_COMMAND=
48221
48222    case $PKGHANDLER in
48223      apt-get)
48224        apt_help     $MISSING_DEPENDENCY ;;
48225      yum)
48226        yum_help     $MISSING_DEPENDENCY ;;
48227      port)
48228        port_help    $MISSING_DEPENDENCY ;;
48229      pkgutil)
48230        pkgutil_help $MISSING_DEPENDENCY ;;
48231      pkgadd)
48232        pkgadd_help  $MISSING_DEPENDENCY ;;
48233    esac
48234
48235    if test "x$PKGHANDLER_COMMAND" != x; then
48236      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48237    fi
48238  fi
48239
48240
48241          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48242
48243
48244fi
48245rm -f core conftest.err conftest.$ac_objext \
48246    conftest$ac_exeext conftest.$ac_ext
48247    CXXCFLAGS="$PREV_CXXFLAGS"
48248    LIBS="$PREV_LIBS"
48249    CXX="$PREV_CXX"
48250    ac_ext=cpp
48251ac_cpp='$CXXCPP $CPPFLAGS'
48252ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48253ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48254ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48255
48256
48257    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48258$as_echo_n "checking if we should bundle freetype... " >&6; }
48259    if test "x$BUNDLE_FREETYPE" = xyes; then
48260      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48261    fi
48262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48263$as_echo "$BUNDLE_FREETYPE" >&6; }
48264
48265  fi # end freetype needed
48266
48267
48268
48269
48270
48271
48272
48273  ###############################################################################
48274  #
48275  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48276  #
48277
48278# Check whether --with-alsa was given.
48279if test "${with_alsa+set}" = set; then :
48280  withval=$with_alsa;
48281fi
48282
48283
48284# Check whether --with-alsa-include was given.
48285if test "${with_alsa_include+set}" = set; then :
48286  withval=$with_alsa_include;
48287fi
48288
48289
48290# Check whether --with-alsa-lib was given.
48291if test "${with_alsa_lib+set}" = set; then :
48292  withval=$with_alsa_lib;
48293fi
48294
48295
48296  if test "x$ALSA_NOT_NEEDED" = xyes; then
48297    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48298      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48299$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48300    fi
48301    ALSA_CFLAGS=
48302    ALSA_LIBS=
48303  else
48304    ALSA_FOUND=no
48305
48306    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48307      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48308    fi
48309
48310    if test "x${with_alsa}" != x; then
48311      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48312      ALSA_CFLAGS="-I${with_alsa}/include"
48313      ALSA_FOUND=yes
48314    fi
48315    if test "x${with_alsa_include}" != x; then
48316      ALSA_CFLAGS="-I${with_alsa_include}"
48317      ALSA_FOUND=yes
48318    fi
48319    if test "x${with_alsa_lib}" != x; then
48320      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48321      ALSA_FOUND=yes
48322    fi
48323    if test "x$ALSA_FOUND" = xno; then
48324
48325
48326  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48327    # Source the builddeps file again, to make sure it uses the latest variables!
48328    . $builddepsfile
48329    # Look for a target and build machine specific resource!
48330    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48331    if test "x$resource" = x; then
48332      # Ok, lets instead look for a target specific resource
48333      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48334    fi
48335    if test "x$resource" = x; then
48336      # Ok, lets instead look for a build specific resource
48337      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48338    fi
48339    if test "x$resource" = x; then
48340      # Ok, lets instead look for a generic resource
48341      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48342      resource=${builddep_alsa}
48343    fi
48344    if test "x$resource" != x; then
48345      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48346$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48347      # If the resource in the builddeps.conf file is an existing directory,
48348      # for example /java/linux/cups
48349      if test -d ${resource}; then
48350        depdir=${resource}
48351      else
48352
48353  # alsa is for example mymodule
48354  # $resource is for example libs/general/libmymod_1_2_3.zip
48355  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48356  # $with_builddeps_dir is for example /localhome/builddeps
48357  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48358  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48359  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48360  filename=`basename $resource`
48361  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48362  filebase=${filename%%.*}
48363  extension=${filename#*.}
48364  installdir=$with_builddeps_dir/$filebase
48365  if test ! -f $installdir/$filename.unpacked; then
48366    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48367$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48368    if test ! -d $installdir; then
48369      mkdir -p $installdir
48370    fi
48371    if test ! -d $installdir; then
48372      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48373    fi
48374    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48375    touch $tmpfile
48376    if test ! -f $tmpfile; then
48377      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48378    fi
48379
48380  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48381  # $tmpfile is the local file name for the downloaded file.
48382  VALID_TOOL=no
48383  if test "x$BDEPS_FTP" = xwget; then
48384    VALID_TOOL=yes
48385    wget -O $tmpfile $with_builddeps_server/$resource
48386  fi
48387  if test "x$BDEPS_FTP" = xlftp; then
48388    VALID_TOOL=yes
48389    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48390  fi
48391  if test "x$BDEPS_FTP" = xftp; then
48392    VALID_TOOL=yes
48393    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48394    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48395    FTPUSERPWD=${FTPSERVER%%@*}
48396    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48397      FTPUSER=${userpwd%%:*}
48398      FTPPWD=${userpwd#*@}
48399      FTPSERVER=${FTPSERVER#*@}
48400    else
48401      FTPUSER=ftp
48402      FTPPWD=ftp
48403    fi
48404    # the "pass" command does not work on some
48405    # ftp clients (read ftp.exe) but if it works,
48406    # passive mode is better!
48407    ( \
48408        echo "user $FTPUSER $FTPPWD"        ; \
48409        echo "pass"                         ; \
48410        echo "bin"                          ; \
48411        echo "get $FTPPATH $tmpfile"              ; \
48412    ) | ftp -in $FTPSERVER
48413  fi
48414  if test "x$VALID_TOOL" != xyes; then
48415    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48416  fi
48417
48418    mv $tmpfile $installdir/$filename
48419    if test ! -s $installdir/$filename; then
48420      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48421    fi
48422    case "$extension" in
48423      zip)  echo "Unzipping $installdir/$filename..."
48424        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48425        ;;
48426      tar.gz) echo "Untaring $installdir/$filename..."
48427        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48428        ;;
48429      tgz) echo "Untaring $installdir/$filename..."
48430        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48431        ;;
48432      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48433        ;;
48434    esac
48435  fi
48436  if test -f $installdir/$filename.unpacked; then
48437    depdir=$installdir
48438  fi
48439
48440      fi
48441      # Source the builddeps file again, because in the previous command, the depdir
48442      # was updated to point at the current build dependency install directory.
48443      . $builddepsfile
48444      # Now extract variables from the builddeps.conf files.
48445      theroot=${builddep_alsa_ROOT}
48446      thecflags=${builddep_alsa_CFLAGS}
48447      thelibs=${builddep_alsa_LIBS}
48448      if test "x$depdir" = x; then
48449        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48450      fi
48451      ALSA=$depdir
48452      if test "x$theroot" != x; then
48453        ALSA="$theroot"
48454      fi
48455      if test "x$thecflags" != x; then
48456        ALSA_CFLAGS="$thecflags"
48457      fi
48458      if test "x$thelibs" != x; then
48459        ALSA_LIBS="$thelibs"
48460      fi
48461      ALSA_FOUND=yes
48462      else ALSA_FOUND=no
48463
48464    fi
48465    else ALSA_FOUND=no
48466
48467  fi
48468
48469    fi
48470    # Do not try pkg-config if we have a sysroot set.
48471    if test "x$SYSROOT" = x; then
48472      if test "x$ALSA_FOUND" = xno; then
48473
48474pkg_failed=no
48475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48476$as_echo_n "checking for ALSA... " >&6; }
48477
48478if test -n "$ALSA_CFLAGS"; then
48479    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48480 elif test -n "$PKG_CONFIG"; then
48481    if test -n "$PKG_CONFIG" && \
48482    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48483  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48484  ac_status=$?
48485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48486  test $ac_status = 0; }; then
48487  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48488else
48489  pkg_failed=yes
48490fi
48491 else
48492    pkg_failed=untried
48493fi
48494if test -n "$ALSA_LIBS"; then
48495    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48496 elif test -n "$PKG_CONFIG"; then
48497    if test -n "$PKG_CONFIG" && \
48498    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48499  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48500  ac_status=$?
48501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48502  test $ac_status = 0; }; then
48503  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48504else
48505  pkg_failed=yes
48506fi
48507 else
48508    pkg_failed=untried
48509fi
48510
48511
48512
48513if test $pkg_failed = yes; then
48514
48515if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48516        _pkg_short_errors_supported=yes
48517else
48518        _pkg_short_errors_supported=no
48519fi
48520        if test $_pkg_short_errors_supported = yes; then
48521	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48522        else
48523	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48524        fi
48525	# Put the nasty error message in config.log where it belongs
48526	echo "$ALSA_PKG_ERRORS" >&5
48527
48528	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48529$as_echo "no" >&6; }
48530                ALSA_FOUND=no
48531elif test $pkg_failed = untried; then
48532	ALSA_FOUND=no
48533else
48534	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48535	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48537$as_echo "yes" >&6; }
48538	ALSA_FOUND=yes
48539fi
48540      fi
48541    fi
48542    if test "x$ALSA_FOUND" = xno; then
48543      for ac_header in alsa/asoundlib.h
48544do :
48545  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48546if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48547  cat >>confdefs.h <<_ACEOF
48548#define HAVE_ALSA_ASOUNDLIB_H 1
48549_ACEOF
48550
48551            ALSA_FOUND=yes
48552            ALSA_CFLAGS=-Iignoreme
48553            ALSA_LIBS=-lasound
48554            DEFAULT_ALSA=yes
48555
48556else
48557  ALSA_FOUND=no
48558fi
48559
48560done
48561
48562    fi
48563    if test "x$ALSA_FOUND" = xno; then
48564
48565  # Print a helpful message on how to acquire the necessary build dependency.
48566  # alsa is the help tag: freetype, cups, pulse, alsa etc
48567  MISSING_DEPENDENCY=alsa
48568
48569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48570    cygwin_help $MISSING_DEPENDENCY
48571  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48572    msys_help $MISSING_DEPENDENCY
48573  else
48574    PKGHANDLER_COMMAND=
48575
48576    case $PKGHANDLER in
48577      apt-get)
48578        apt_help     $MISSING_DEPENDENCY ;;
48579      yum)
48580        yum_help     $MISSING_DEPENDENCY ;;
48581      port)
48582        port_help    $MISSING_DEPENDENCY ;;
48583      pkgutil)
48584        pkgutil_help $MISSING_DEPENDENCY ;;
48585      pkgadd)
48586        pkgadd_help  $MISSING_DEPENDENCY ;;
48587    esac
48588
48589    if test "x$PKGHANDLER_COMMAND" != x; then
48590      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48591    fi
48592  fi
48593
48594      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48595    fi
48596  fi
48597
48598
48599
48600
48601
48602
48603  ###############################################################################
48604  #
48605  # Check for the jpeg library
48606  #
48607
48608
48609# Check whether --with-libjpeg was given.
48610if test "${with_libjpeg+set}" = set; then :
48611  withval=$with_libjpeg;
48612fi
48613
48614
48615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48616$as_echo_n "checking for which libjpeg to use... " >&6; }
48617
48618  # default is bundled
48619  DEFAULT_LIBJPEG=bundled
48620
48621  #
48622  # if user didn't specify, use DEFAULT_LIBJPEG
48623  #
48624  if test "x${with_libjpeg}" = "x"; then
48625    with_libjpeg=${DEFAULT_LIBJPEG}
48626  fi
48627
48628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48629$as_echo "${with_libjpeg}" >&6; }
48630
48631  if test "x${with_libjpeg}" = "xbundled"; then
48632    USE_EXTERNAL_LIBJPEG=false
48633  elif test "x${with_libjpeg}" = "xsystem"; then
48634    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48635if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48636
48637else
48638   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48639fi
48640
48641
48642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48643$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48644if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48645  $as_echo_n "(cached) " >&6
48646else
48647  ac_check_lib_save_LIBS=$LIBS
48648LIBS="-ljpeg  $LIBS"
48649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48650/* end confdefs.h.  */
48651
48652/* Override any GCC internal prototype to avoid an error.
48653   Use char because int might match the return type of a GCC
48654   builtin and then its argument prototype would still apply.  */
48655#ifdef __cplusplus
48656extern "C"
48657#endif
48658char jpeg_CreateDecompress ();
48659int
48660main ()
48661{
48662return jpeg_CreateDecompress ();
48663  ;
48664  return 0;
48665}
48666_ACEOF
48667if ac_fn_cxx_try_link "$LINENO"; then :
48668  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48669else
48670  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48671fi
48672rm -f core conftest.err conftest.$ac_objext \
48673    conftest$ac_exeext conftest.$ac_ext
48674LIBS=$ac_check_lib_save_LIBS
48675fi
48676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48677$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48678if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48679  cat >>confdefs.h <<_ACEOF
48680#define HAVE_LIBJPEG 1
48681_ACEOF
48682
48683  LIBS="-ljpeg $LIBS"
48684
48685else
48686   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48687fi
48688
48689
48690    USE_EXTERNAL_LIBJPEG=true
48691  else
48692    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48693  fi
48694
48695
48696
48697  ###############################################################################
48698  #
48699  # Check for the gif library
48700  #
48701
48702
48703# Check whether --with-giflib was given.
48704if test "${with_giflib+set}" = set; then :
48705  withval=$with_giflib;
48706fi
48707
48708
48709
48710  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48711$as_echo_n "checking for which giflib to use... " >&6; }
48712
48713  # default is bundled
48714  DEFAULT_GIFLIB=bundled
48715
48716  #
48717  # if user didn't specify, use DEFAULT_GIFLIB
48718  #
48719  if test "x${with_giflib}" = "x"; then
48720    with_giflib=${DEFAULT_GIFLIB}
48721  fi
48722
48723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48724$as_echo "${with_giflib}" >&6; }
48725
48726  if test "x${with_giflib}" = "xbundled"; then
48727    USE_EXTERNAL_LIBGIF=false
48728  elif test "x${with_giflib}" = "xsystem"; then
48729    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48730if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48731
48732else
48733   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48734fi
48735
48736
48737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48738$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48739if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48740  $as_echo_n "(cached) " >&6
48741else
48742  ac_check_lib_save_LIBS=$LIBS
48743LIBS="-lgif  $LIBS"
48744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48745/* end confdefs.h.  */
48746
48747/* Override any GCC internal prototype to avoid an error.
48748   Use char because int might match the return type of a GCC
48749   builtin and then its argument prototype would still apply.  */
48750#ifdef __cplusplus
48751extern "C"
48752#endif
48753char DGifGetCode ();
48754int
48755main ()
48756{
48757return DGifGetCode ();
48758  ;
48759  return 0;
48760}
48761_ACEOF
48762if ac_fn_cxx_try_link "$LINENO"; then :
48763  ac_cv_lib_gif_DGifGetCode=yes
48764else
48765  ac_cv_lib_gif_DGifGetCode=no
48766fi
48767rm -f core conftest.err conftest.$ac_objext \
48768    conftest$ac_exeext conftest.$ac_ext
48769LIBS=$ac_check_lib_save_LIBS
48770fi
48771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48772$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48773if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48774  cat >>confdefs.h <<_ACEOF
48775#define HAVE_LIBGIF 1
48776_ACEOF
48777
48778  LIBS="-lgif $LIBS"
48779
48780else
48781   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48782fi
48783
48784
48785    USE_EXTERNAL_LIBGIF=true
48786  else
48787    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48788  fi
48789
48790
48791  ###############################################################################
48792  #
48793  # Check for the lcms2 library
48794  #
48795
48796
48797# Check whether --with-lcms was given.
48798if test "${with_lcms+set}" = set; then :
48799  withval=$with_lcms;
48800fi
48801
48802
48803  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48804$as_echo_n "checking for which lcms to use... " >&6; }
48805
48806  DEFAULT_LCMS=bundled
48807
48808  #
48809  # If user didn't specify, use DEFAULT_LCMS
48810  #
48811  if test "x${with_lcms}" = "x"; then
48812      with_lcms=${DEFAULT_LCMS}
48813  fi
48814
48815  if test "x${with_lcms}" = "xbundled"; then
48816    USE_EXTERNAL_LCMS=false
48817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48818$as_echo "bundled" >&6; }
48819  elif test "x${with_lcms}" = "xsystem"; then
48820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48821$as_echo "system" >&6; }
48822
48823pkg_failed=no
48824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48825$as_echo_n "checking for LCMS... " >&6; }
48826
48827if test -n "$LCMS_CFLAGS"; then
48828    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48829 elif test -n "$PKG_CONFIG"; then
48830    if test -n "$PKG_CONFIG" && \
48831    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48832  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48833  ac_status=$?
48834  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48835  test $ac_status = 0; }; then
48836  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48837else
48838  pkg_failed=yes
48839fi
48840 else
48841    pkg_failed=untried
48842fi
48843if test -n "$LCMS_LIBS"; then
48844    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48845 elif test -n "$PKG_CONFIG"; then
48846    if test -n "$PKG_CONFIG" && \
48847    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48848  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48849  ac_status=$?
48850  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48851  test $ac_status = 0; }; then
48852  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48853else
48854  pkg_failed=yes
48855fi
48856 else
48857    pkg_failed=untried
48858fi
48859
48860
48861
48862if test $pkg_failed = yes; then
48863
48864if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48865        _pkg_short_errors_supported=yes
48866else
48867        _pkg_short_errors_supported=no
48868fi
48869        if test $_pkg_short_errors_supported = yes; then
48870	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48871        else
48872	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48873        fi
48874	# Put the nasty error message in config.log where it belongs
48875	echo "$LCMS_PKG_ERRORS" >&5
48876
48877	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48878$as_echo "no" >&6; }
48879                LCMS_FOUND=no
48880elif test $pkg_failed = untried; then
48881	LCMS_FOUND=no
48882else
48883	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48884	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48885        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48886$as_echo "yes" >&6; }
48887	LCMS_FOUND=yes
48888fi
48889    if test "x${LCMS_FOUND}" = "xyes"; then
48890      USE_EXTERNAL_LCMS=true
48891    else
48892      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48893    fi
48894  else
48895    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48896  fi
48897
48898
48899
48900  ###############################################################################
48901  #
48902  # Check for the png library
48903  #
48904
48905
48906# Check whether --with-libpng was given.
48907if test "${with_libpng+set}" = set; then :
48908  withval=$with_libpng;
48909fi
48910
48911
48912
48913  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48914$as_echo_n "checking for which libpng to use... " >&6; }
48915
48916  # default is bundled
48917  DEFAULT_LIBPNG=bundled
48918
48919  #
48920  # if user didn't specify, use DEFAULT_LIBPNG
48921  #
48922  if test "x${with_libpng}" = "x"; then
48923      with_libpng=${DEFAULT_LIBPNG}
48924  fi
48925
48926  if test "x${with_libpng}" = "xbundled"; then
48927      USE_EXTERNAL_LIBPNG=false
48928      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48929$as_echo "bundled" >&6; }
48930  elif test "x${with_libpng}" = "xsystem"; then
48931
48932pkg_failed=no
48933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48934$as_echo_n "checking for PNG... " >&6; }
48935
48936if test -n "$PNG_CFLAGS"; then
48937    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48938 elif test -n "$PKG_CONFIG"; then
48939    if test -n "$PKG_CONFIG" && \
48940    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48941  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48942  ac_status=$?
48943  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48944  test $ac_status = 0; }; then
48945  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48946else
48947  pkg_failed=yes
48948fi
48949 else
48950    pkg_failed=untried
48951fi
48952if test -n "$PNG_LIBS"; then
48953    pkg_cv_PNG_LIBS="$PNG_LIBS"
48954 elif test -n "$PKG_CONFIG"; then
48955    if test -n "$PKG_CONFIG" && \
48956    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48957  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48958  ac_status=$?
48959  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48960  test $ac_status = 0; }; then
48961  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48962else
48963  pkg_failed=yes
48964fi
48965 else
48966    pkg_failed=untried
48967fi
48968
48969
48970
48971if test $pkg_failed = yes; then
48972
48973if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48974        _pkg_short_errors_supported=yes
48975else
48976        _pkg_short_errors_supported=no
48977fi
48978        if test $_pkg_short_errors_supported = yes; then
48979	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48980        else
48981	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48982        fi
48983	# Put the nasty error message in config.log where it belongs
48984	echo "$PNG_PKG_ERRORS" >&5
48985
48986	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48987$as_echo "no" >&6; }
48988                 LIBPNG_FOUND=no
48989elif test $pkg_failed = untried; then
48990	 LIBPNG_FOUND=no
48991else
48992	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48993	PNG_LIBS=$pkg_cv_PNG_LIBS
48994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48995$as_echo "yes" >&6; }
48996	 LIBPNG_FOUND=yes
48997fi
48998      if test "x${LIBPNG_FOUND}" = "xyes"; then
48999          USE_EXTERNAL_LIBPNG=true
49000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49001$as_echo "system" >&6; }
49002      else
49003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49004$as_echo "system not found" >&6; }
49005          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49006      fi
49007  else
49008      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49009  fi
49010
49011
49012  ###############################################################################
49013  #
49014  # Check for the zlib library
49015  #
49016
49017
49018# Check whether --with-zlib was given.
49019if test "${with_zlib+set}" = set; then :
49020  withval=$with_zlib;
49021fi
49022
49023
49024  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49025$as_echo_n "checking for compress in -lz... " >&6; }
49026if ${ac_cv_lib_z_compress+:} false; then :
49027  $as_echo_n "(cached) " >&6
49028else
49029  ac_check_lib_save_LIBS=$LIBS
49030LIBS="-lz  $LIBS"
49031cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49032/* end confdefs.h.  */
49033
49034/* Override any GCC internal prototype to avoid an error.
49035   Use char because int might match the return type of a GCC
49036   builtin and then its argument prototype would still apply.  */
49037#ifdef __cplusplus
49038extern "C"
49039#endif
49040char compress ();
49041int
49042main ()
49043{
49044return compress ();
49045  ;
49046  return 0;
49047}
49048_ACEOF
49049if ac_fn_cxx_try_link "$LINENO"; then :
49050  ac_cv_lib_z_compress=yes
49051else
49052  ac_cv_lib_z_compress=no
49053fi
49054rm -f core conftest.err conftest.$ac_objext \
49055    conftest$ac_exeext conftest.$ac_ext
49056LIBS=$ac_check_lib_save_LIBS
49057fi
49058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49059$as_echo "$ac_cv_lib_z_compress" >&6; }
49060if test "x$ac_cv_lib_z_compress" = xyes; then :
49061   ZLIB_FOUND=yes
49062else
49063   ZLIB_FOUND=no
49064fi
49065
49066
49067  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49068$as_echo_n "checking for which zlib to use... " >&6; }
49069
49070  DEFAULT_ZLIB=bundled
49071  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49072    #
49073    # On macosx default is system...on others default is
49074    #
49075    DEFAULT_ZLIB=system
49076  fi
49077
49078  if test "x${ZLIB_FOUND}" != "xyes"; then
49079    #
49080    # If we don't find any system...set default to bundled
49081    #
49082    DEFAULT_ZLIB=bundled
49083  fi
49084
49085  #
49086  # If user didn't specify, use DEFAULT_ZLIB
49087  #
49088  if test "x${with_zlib}" = "x"; then
49089    with_zlib=${DEFAULT_ZLIB}
49090  fi
49091
49092  if test "x${with_zlib}" = "xbundled"; then
49093    USE_EXTERNAL_LIBZ=false
49094    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49095$as_echo "bundled" >&6; }
49096  elif test "x${with_zlib}" = "xsystem"; then
49097    if test "x${ZLIB_FOUND}" = "xyes"; then
49098      USE_EXTERNAL_LIBZ=true
49099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49100$as_echo "system" >&6; }
49101    else
49102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49103$as_echo "system not found" >&6; }
49104      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49105    fi
49106  else
49107    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49108  fi
49109
49110
49111
49112  ###############################################################################
49113  LIBZIP_CAN_USE_MMAP=true
49114
49115
49116
49117  ###############################################################################
49118  #
49119  # Check if altzone exists in time.h
49120  #
49121
49122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49123/* end confdefs.h.  */
49124#include <time.h>
49125int
49126main ()
49127{
49128return (int)altzone;
49129  ;
49130  return 0;
49131}
49132_ACEOF
49133if ac_fn_cxx_try_link "$LINENO"; then :
49134  has_altzone=yes
49135else
49136  has_altzone=no
49137fi
49138rm -f core conftest.err conftest.$ac_objext \
49139    conftest$ac_exeext conftest.$ac_ext
49140  if test "x$has_altzone" = xyes; then
49141
49142$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49143
49144  fi
49145
49146  ###############################################################################
49147  #
49148  # Check the maths library
49149  #
49150
49151  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49152$as_echo_n "checking for cos in -lm... " >&6; }
49153if ${ac_cv_lib_m_cos+:} false; then :
49154  $as_echo_n "(cached) " >&6
49155else
49156  ac_check_lib_save_LIBS=$LIBS
49157LIBS="-lm  $LIBS"
49158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49159/* end confdefs.h.  */
49160
49161/* Override any GCC internal prototype to avoid an error.
49162   Use char because int might match the return type of a GCC
49163   builtin and then its argument prototype would still apply.  */
49164#ifdef __cplusplus
49165extern "C"
49166#endif
49167char cos ();
49168int
49169main ()
49170{
49171return cos ();
49172  ;
49173  return 0;
49174}
49175_ACEOF
49176if ac_fn_cxx_try_link "$LINENO"; then :
49177  ac_cv_lib_m_cos=yes
49178else
49179  ac_cv_lib_m_cos=no
49180fi
49181rm -f core conftest.err conftest.$ac_objext \
49182    conftest$ac_exeext conftest.$ac_ext
49183LIBS=$ac_check_lib_save_LIBS
49184fi
49185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49186$as_echo "$ac_cv_lib_m_cos" >&6; }
49187if test "x$ac_cv_lib_m_cos" = xyes; then :
49188  cat >>confdefs.h <<_ACEOF
49189#define HAVE_LIBM 1
49190_ACEOF
49191
49192  LIBS="-lm $LIBS"
49193
49194else
49195
49196        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49197$as_echo "$as_me: Maths library was not found" >&6;}
49198
49199
49200fi
49201
49202
49203
49204  ###############################################################################
49205  #
49206  # Check for libdl.so
49207
49208  save_LIBS="$LIBS"
49209  LIBS=""
49210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49211$as_echo_n "checking for dlopen in -ldl... " >&6; }
49212if ${ac_cv_lib_dl_dlopen+:} false; then :
49213  $as_echo_n "(cached) " >&6
49214else
49215  ac_check_lib_save_LIBS=$LIBS
49216LIBS="-ldl  $LIBS"
49217cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49218/* end confdefs.h.  */
49219
49220/* Override any GCC internal prototype to avoid an error.
49221   Use char because int might match the return type of a GCC
49222   builtin and then its argument prototype would still apply.  */
49223#ifdef __cplusplus
49224extern "C"
49225#endif
49226char dlopen ();
49227int
49228main ()
49229{
49230return dlopen ();
49231  ;
49232  return 0;
49233}
49234_ACEOF
49235if ac_fn_cxx_try_link "$LINENO"; then :
49236  ac_cv_lib_dl_dlopen=yes
49237else
49238  ac_cv_lib_dl_dlopen=no
49239fi
49240rm -f core conftest.err conftest.$ac_objext \
49241    conftest$ac_exeext conftest.$ac_ext
49242LIBS=$ac_check_lib_save_LIBS
49243fi
49244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49245$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49246if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49247  cat >>confdefs.h <<_ACEOF
49248#define HAVE_LIBDL 1
49249_ACEOF
49250
49251  LIBS="-ldl $LIBS"
49252
49253fi
49254
49255  LIBDL="$LIBS"
49256
49257  LIBS="$save_LIBS"
49258
49259
49260  ###############################################################################
49261  #
49262  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49263  # dynamic build is configured on command line.
49264  #
49265
49266# Check whether --with-stdc++lib was given.
49267if test "${with_stdc__lib+set}" = set; then :
49268  withval=$with_stdc__lib;
49269        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49270                && test "x$with_stdc__lib" != xdefault; then
49271          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49272        fi
49273
49274else
49275  with_stdc__lib=default
49276
49277fi
49278
49279
49280  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49281    # Test if -lstdc++ works.
49282    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49283$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49284    ac_ext=cpp
49285ac_cpp='$CXXCPP $CPPFLAGS'
49286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49289
49290    OLD_CXXFLAGS="$CXXFLAGS"
49291    CXXFLAGS="$CXXFLAGS -lstdc++"
49292    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49293/* end confdefs.h.  */
49294
49295int
49296main ()
49297{
49298return 0;
49299  ;
49300  return 0;
49301}
49302_ACEOF
49303if ac_fn_cxx_try_link "$LINENO"; then :
49304  has_dynamic_libstdcxx=yes
49305else
49306  has_dynamic_libstdcxx=no
49307fi
49308rm -f core conftest.err conftest.$ac_objext \
49309    conftest$ac_exeext conftest.$ac_ext
49310    CXXFLAGS="$OLD_CXXFLAGS"
49311    ac_ext=cpp
49312ac_cpp='$CXXCPP $CPPFLAGS'
49313ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49314ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49315ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49316
49317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49318$as_echo "$has_dynamic_libstdcxx" >&6; }
49319
49320    # Test if stdc++ can be linked statically.
49321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49322$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49323    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49324    ac_ext=cpp
49325ac_cpp='$CXXCPP $CPPFLAGS'
49326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49329
49330    OLD_LIBS="$LIBS"
49331    OLD_CXX="$CXX"
49332    LIBS="$STATIC_STDCXX_FLAGS"
49333    CXX="$CC"
49334    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49335/* end confdefs.h.  */
49336
49337int
49338main ()
49339{
49340return 0;
49341  ;
49342  return 0;
49343}
49344_ACEOF
49345if ac_fn_cxx_try_link "$LINENO"; then :
49346  has_static_libstdcxx=yes
49347else
49348  has_static_libstdcxx=no
49349fi
49350rm -f core conftest.err conftest.$ac_objext \
49351    conftest$ac_exeext conftest.$ac_ext
49352    LIBS="$OLD_LIBS"
49353    CXX="$OLD_CXX"
49354    ac_ext=cpp
49355ac_cpp='$CXXCPP $CPPFLAGS'
49356ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49357ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49358ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49359
49360    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49361$as_echo "$has_static_libstdcxx" >&6; }
49362
49363    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49364      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49365    fi
49366
49367    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49368      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49369    fi
49370
49371    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49372      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49373    fi
49374
49375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49376$as_echo_n "checking how to link with libstdc++... " >&6; }
49377    # If dynamic was requested, it's available since it would fail above otherwise.
49378    # If dynamic wasn't requested, go with static unless it isn't available.
49379    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49380      LIBCXX="$LIBCXX -lstdc++"
49381      LDCXX="$CXX"
49382      STATIC_CXX_SETTING="STATIC_CXX=false"
49383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49384$as_echo "dynamic" >&6; }
49385    else
49386      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49387      LDCXX="$CC"
49388      STATIC_CXX_SETTING="STATIC_CXX=true"
49389      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49390$as_echo "static" >&6; }
49391    fi
49392  fi
49393
49394
49395  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49396    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49397
49398pkg_failed=no
49399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49400$as_echo_n "checking for LIBFFI... " >&6; }
49401
49402if test -n "$LIBFFI_CFLAGS"; then
49403    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49404 elif test -n "$PKG_CONFIG"; then
49405    if test -n "$PKG_CONFIG" && \
49406    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49407  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49408  ac_status=$?
49409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49410  test $ac_status = 0; }; then
49411  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49412else
49413  pkg_failed=yes
49414fi
49415 else
49416    pkg_failed=untried
49417fi
49418if test -n "$LIBFFI_LIBS"; then
49419    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49420 elif test -n "$PKG_CONFIG"; then
49421    if test -n "$PKG_CONFIG" && \
49422    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49423  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49424  ac_status=$?
49425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49426  test $ac_status = 0; }; then
49427  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49428else
49429  pkg_failed=yes
49430fi
49431 else
49432    pkg_failed=untried
49433fi
49434
49435
49436
49437if test $pkg_failed = yes; then
49438
49439if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49440        _pkg_short_errors_supported=yes
49441else
49442        _pkg_short_errors_supported=no
49443fi
49444        if test $_pkg_short_errors_supported = yes; then
49445	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49446        else
49447	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49448        fi
49449	# Put the nasty error message in config.log where it belongs
49450	echo "$LIBFFI_PKG_ERRORS" >&5
49451
49452	as_fn_error $? "Package requirements (libffi) were not met:
49453
49454$LIBFFI_PKG_ERRORS
49455
49456Consider adjusting the PKG_CONFIG_PATH environment variable if you
49457installed software in a non-standard prefix.
49458
49459Alternatively, you may set the environment variables LIBFFI_CFLAGS
49460and LIBFFI_LIBS to avoid the need to call pkg-config.
49461See the pkg-config man page for more details.
49462" "$LINENO" 5
49463elif test $pkg_failed = untried; then
49464	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49465$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49466as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49467is in your PATH or set the PKG_CONFIG environment variable to the full
49468path to pkg-config.
49469
49470Alternatively, you may set the environment variables LIBFFI_CFLAGS
49471and LIBFFI_LIBS to avoid the need to call pkg-config.
49472See the pkg-config man page for more details.
49473
49474To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49475See \`config.log' for more details" "$LINENO" 5; }
49476else
49477	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49478	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49480$as_echo "yes" >&6; }
49481	:
49482fi
49483
49484  fi
49485
49486  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49487    # Extract the first word of "llvm-config", so it can be a program name with args.
49488set dummy llvm-config; ac_word=$2
49489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49490$as_echo_n "checking for $ac_word... " >&6; }
49491if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49492  $as_echo_n "(cached) " >&6
49493else
49494  if test -n "$LLVM_CONFIG"; then
49495  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49496else
49497as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49498for as_dir in $PATH
49499do
49500  IFS=$as_save_IFS
49501  test -z "$as_dir" && as_dir=.
49502    for ac_exec_ext in '' $ac_executable_extensions; do
49503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49504    ac_cv_prog_LLVM_CONFIG="llvm-config"
49505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49506    break 2
49507  fi
49508done
49509  done
49510IFS=$as_save_IFS
49511
49512fi
49513fi
49514LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49515if test -n "$LLVM_CONFIG"; then
49516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49517$as_echo "$LLVM_CONFIG" >&6; }
49518else
49519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49520$as_echo "no" >&6; }
49521fi
49522
49523
49524
49525    if test "x$LLVM_CONFIG" != xllvm-config; then
49526      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49527    fi
49528
49529    llvm_components="jit mcjit engine nativecodegen native"
49530    unset LLVM_CFLAGS
49531    for flag in $("$LLVM_CONFIG" --cxxflags); do
49532      if echo "${flag}" | grep -q '^-[ID]'; then
49533        if test "${flag}" != "-D_DEBUG" ; then
49534          if test "${LLVM_CFLAGS}" != "" ; then
49535            LLVM_CFLAGS="${LLVM_CFLAGS} "
49536          fi
49537          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49538        fi
49539      fi
49540    done
49541    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49542    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49543
49544    unset LLVM_LDFLAGS
49545    for flag in $("${LLVM_CONFIG}" --ldflags); do
49546      if echo "${flag}" | grep -q '^-L'; then
49547        if test "${LLVM_LDFLAGS}" != ""; then
49548          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49549        fi
49550        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49551      fi
49552    done
49553
49554    unset LLVM_LIBS
49555    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49556      if echo "${flag}" | grep -q '^-l'; then
49557        if test "${LLVM_LIBS}" != ""; then
49558          LLVM_LIBS="${LLVM_LIBS} "
49559        fi
49560        LLVM_LIBS="${LLVM_LIBS}${flag}"
49561      fi
49562    done
49563
49564
49565
49566
49567  fi
49568
49569  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49570  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49571    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49572  fi
49573
49574  # TODO better (platform agnostic) test
49575  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49576    LIBCXX="-lstdc++"
49577  fi
49578
49579
49580
49581
49582  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49583
49584
49585# Check whether --with-msvcr-dll was given.
49586if test "${with_msvcr_dll+set}" = set; then :
49587  withval=$with_msvcr_dll;
49588fi
49589
49590
49591  if test "x$with_msvcr_dll" != x; then
49592    # If given explicitely by user, do not probe. If not present, fail directly.
49593
49594  DLL_NAME="$DLL_NAME"
49595  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49596  METHOD="--with-msvcr-dll"
49597  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49598    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49599$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49600
49601    # Need to check if the found msvcr is correct architecture
49602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49603$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49604    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49606      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49607      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49608      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49609        CORRECT_MSVCR_ARCH="PE32 executable"
49610      else
49611        CORRECT_MSVCR_ARCH="PE32+ executable"
49612      fi
49613    else
49614      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49615        CORRECT_MSVCR_ARCH=386
49616      else
49617        CORRECT_MSVCR_ARCH=x86-64
49618      fi
49619    fi
49620    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49621      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49622$as_echo "ok" >&6; }
49623      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49624      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49625$as_echo_n "checking for $DLL_NAME... " >&6; }
49626      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49627$as_echo "$MSVC_DLL" >&6; }
49628    else
49629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49630$as_echo "incorrect, ignoring" >&6; }
49631      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49632$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49633    fi
49634  fi
49635
49636    if test "x$MSVC_DLL" = x; then
49637      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49638    fi
49639  else
49640
49641  VAR_NAME="MSVCR_DLL"
49642  DLL_NAME="${MSVCR_NAME}"
49643  MSVC_DLL=
49644
49645  if test "x$MSVC_DLL" = x; then
49646    # Probe: Using well-known location from Visual Studio 10.0
49647    if test "x$VCINSTALLDIR" != x; then
49648      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49649
49650  windows_path="$CYGWIN_VC_INSTALL_DIR"
49651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49652    unix_path=`$CYGPATH -u "$windows_path"`
49653    CYGWIN_VC_INSTALL_DIR="$unix_path"
49654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49656    CYGWIN_VC_INSTALL_DIR="$unix_path"
49657  fi
49658
49659      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49660        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49661      else
49662        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49663      fi
49664      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49665
49666  DLL_NAME="$DLL_NAME"
49667  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49668  METHOD="well-known location in VCINSTALLDIR"
49669  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49670    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49671$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49672
49673    # Need to check if the found msvcr is correct architecture
49674    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49675$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49676    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49678      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49679      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49680      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49681        CORRECT_MSVCR_ARCH="PE32 executable"
49682      else
49683        CORRECT_MSVCR_ARCH="PE32+ executable"
49684      fi
49685    else
49686      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49687        CORRECT_MSVCR_ARCH=386
49688      else
49689        CORRECT_MSVCR_ARCH=x86-64
49690      fi
49691    fi
49692    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49694$as_echo "ok" >&6; }
49695      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49696      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49697$as_echo_n "checking for $DLL_NAME... " >&6; }
49698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49699$as_echo "$MSVC_DLL" >&6; }
49700    else
49701      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49702$as_echo "incorrect, ignoring" >&6; }
49703      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49704$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49705    fi
49706  fi
49707
49708    fi
49709  fi
49710
49711  if test "x$MSVC_DLL" = x; then
49712    # Probe: Check in the Boot JDK directory.
49713    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49714
49715  DLL_NAME="$DLL_NAME"
49716  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49717  METHOD="well-known location in Boot JDK"
49718  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49719    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49720$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49721
49722    # Need to check if the found msvcr is correct architecture
49723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49724$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49725    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49727      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49728      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49729      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49730        CORRECT_MSVCR_ARCH="PE32 executable"
49731      else
49732        CORRECT_MSVCR_ARCH="PE32+ executable"
49733      fi
49734    else
49735      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49736        CORRECT_MSVCR_ARCH=386
49737      else
49738        CORRECT_MSVCR_ARCH=x86-64
49739      fi
49740    fi
49741    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49742      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49743$as_echo "ok" >&6; }
49744      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49745      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49746$as_echo_n "checking for $DLL_NAME... " >&6; }
49747      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49748$as_echo "$MSVC_DLL" >&6; }
49749    else
49750      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49751$as_echo "incorrect, ignoring" >&6; }
49752      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49753$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49754    fi
49755  fi
49756
49757  fi
49758
49759  if test "x$MSVC_DLL" = x; then
49760    # Probe: Look in the Windows system32 directory
49761    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
49762
49763  windows_path="$CYGWIN_SYSTEMROOT"
49764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49765    unix_path=`$CYGPATH -u "$windows_path"`
49766    CYGWIN_SYSTEMROOT="$unix_path"
49767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49769    CYGWIN_SYSTEMROOT="$unix_path"
49770  fi
49771
49772    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
49773
49774  DLL_NAME="$DLL_NAME"
49775  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49776  METHOD="well-known location in SYSTEMROOT"
49777  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49779$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49780
49781    # Need to check if the found msvcr is correct architecture
49782    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49783$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49784    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49785    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49786      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49787      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49788      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49789        CORRECT_MSVCR_ARCH="PE32 executable"
49790      else
49791        CORRECT_MSVCR_ARCH="PE32+ executable"
49792      fi
49793    else
49794      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49795        CORRECT_MSVCR_ARCH=386
49796      else
49797        CORRECT_MSVCR_ARCH=x86-64
49798      fi
49799    fi
49800    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49801      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49802$as_echo "ok" >&6; }
49803      MSVC_DLL="$POSSIBLE_MSVC_DLL"
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  fi
49817
49818  if test "x$MSVC_DLL" = x; then
49819    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
49820    if test "x$VS100COMNTOOLS" != x; then
49821      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
49822
49823  windows_path="$CYGWIN_VS_TOOLS_DIR"
49824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49825    unix_path=`$CYGPATH -u "$windows_path"`
49826    CYGWIN_VS_TOOLS_DIR="$unix_path"
49827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49829    CYGWIN_VS_TOOLS_DIR="$unix_path"
49830  fi
49831
49832      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49833        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49834	    | $GREP -i /x64/ | $HEAD --lines 1`
49835      else
49836        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
49837	    | $GREP -i /x86/ | $HEAD --lines 1`
49838      fi
49839
49840  DLL_NAME="$DLL_NAME"
49841  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49842  METHOD="search of VS100COMNTOOLS"
49843  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49844    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49845$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49846
49847    # Need to check if the found msvcr is correct architecture
49848    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49849$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49850    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49852      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49853      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49854      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49855        CORRECT_MSVCR_ARCH="PE32 executable"
49856      else
49857        CORRECT_MSVCR_ARCH="PE32+ executable"
49858      fi
49859    else
49860      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49861        CORRECT_MSVCR_ARCH=386
49862      else
49863        CORRECT_MSVCR_ARCH=x86-64
49864      fi
49865    fi
49866    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49868$as_echo "ok" >&6; }
49869      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49870      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49871$as_echo_n "checking for $DLL_NAME... " >&6; }
49872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49873$as_echo "$MSVC_DLL" >&6; }
49874    else
49875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49876$as_echo "incorrect, ignoring" >&6; }
49877      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49878$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49879    fi
49880  fi
49881
49882    fi
49883  fi
49884
49885  if test "x$MSVC_DLL" = x; then
49886    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
49887    # (This was the original behaviour; kept since it might turn something up)
49888    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
49889      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49890        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49891	    | $GREP x64 | $HEAD --lines 1`
49892      else
49893        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49894	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
49895        if test "x$POSSIBLE_MSVC_DLL" = x; then
49896          # We're grasping at straws now...
49897          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
49898	      | $HEAD --lines 1`
49899        fi
49900      fi
49901
49902
49903  DLL_NAME="$DLL_NAME"
49904  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49905  METHOD="search of VCINSTALLDIR"
49906  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49907    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49908$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49909
49910    # Need to check if the found msvcr is correct architecture
49911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49912$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49913    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49915      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49916      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49917      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49918        CORRECT_MSVCR_ARCH="PE32 executable"
49919      else
49920        CORRECT_MSVCR_ARCH="PE32+ executable"
49921      fi
49922    else
49923      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49924        CORRECT_MSVCR_ARCH=386
49925      else
49926        CORRECT_MSVCR_ARCH=x86-64
49927      fi
49928    fi
49929    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49931$as_echo "ok" >&6; }
49932      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49934$as_echo_n "checking for $DLL_NAME... " >&6; }
49935      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49936$as_echo "$MSVC_DLL" >&6; }
49937    else
49938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49939$as_echo "incorrect, ignoring" >&6; }
49940      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49941$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49942    fi
49943  fi
49944
49945    fi
49946  fi
49947
49948  if test "x$MSVC_DLL" = x; then
49949    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49950$as_echo_n "checking for $DLL_NAME... " >&6; }
49951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49952$as_echo "no" >&6; }
49953    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
49954  fi
49955
49956  MSVCR_DLL=$MSVC_DLL
49957
49958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49959
49960  # Input might be given as Windows format, start by converting to
49961  # unix format.
49962  path="$MSVCR_DLL"
49963  new_path=`$CYGPATH -u "$path"`
49964
49965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49968  # "foo.exe" is OK but "foo" is an error.
49969  #
49970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49971  # It is also a way to make sure we got the proper file name for the real test later on.
49972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49973  if test "x$test_shortpath" = x; then
49974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49975$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49976    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
49977  fi
49978
49979  # Call helper function which possibly converts this using DOS-style short mode.
49980  # If so, the updated path is stored in $new_path.
49981
49982  input_path="$new_path"
49983  # Check if we need to convert this using DOS-style short mode. If the path
49984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49985  # take no chances and rewrite it.
49986  # Note: m4 eats our [], so we need to use [ and ] instead.
49987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49988  if test "x$has_forbidden_chars" != x; then
49989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49993      # Going to short mode and back again did indeed matter. Since short mode is
49994      # case insensitive, let's make it lowercase to improve readability.
49995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49996      # Now convert it back to Unix-stile (cygpath)
49997      input_path=`$CYGPATH -u "$shortmode_path"`
49998      new_path="$input_path"
49999    fi
50000  fi
50001
50002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50003  if test "x$test_cygdrive_prefix" = x; then
50004    # As a simple fix, exclude /usr/bin since it's not a real path.
50005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50007      # a path prefixed by /cygdrive for fixpath to work.
50008      new_path="$CYGWIN_ROOT_PATH$input_path"
50009    fi
50010  fi
50011
50012
50013  if test "x$path" != "x$new_path"; then
50014    MSVCR_DLL="$new_path"
50015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50016$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50017  fi
50018
50019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50020
50021  path="$MSVCR_DLL"
50022  has_colon=`$ECHO $path | $GREP ^.:`
50023  new_path="$path"
50024  if test "x$has_colon" = x; then
50025    # Not in mixed or Windows style, start by that.
50026    new_path=`cmd //c echo $path`
50027  fi
50028
50029
50030  input_path="$new_path"
50031  # Check if we need to convert this using DOS-style short mode. If the path
50032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50033  # take no chances and rewrite it.
50034  # Note: m4 eats our [], so we need to use [ and ] instead.
50035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50036  if test "x$has_forbidden_chars" != x; then
50037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50039  fi
50040
50041
50042  windows_path="$new_path"
50043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50044    unix_path=`$CYGPATH -u "$windows_path"`
50045    new_path="$unix_path"
50046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50048    new_path="$unix_path"
50049  fi
50050
50051  if test "x$path" != "x$new_path"; then
50052    MSVCR_DLL="$new_path"
50053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50054$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50055  fi
50056
50057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50059
50060  else
50061    # We're on a unix platform. Hooray! :)
50062    path="$MSVCR_DLL"
50063    has_space=`$ECHO "$path" | $GREP " "`
50064    if test "x$has_space" != x; then
50065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50066$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50067      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50068    fi
50069
50070    # Use eval to expand a potential ~
50071    eval path="$path"
50072    if test ! -f "$path" && test ! -d "$path"; then
50073      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50074    fi
50075
50076    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50077  fi
50078
50079  MSVCR_DLL=$MSVCR_DLL
50080
50081
50082  fi
50083
50084
50085# Check whether --with-msvcp-dll was given.
50086if test "${with_msvcp_dll+set}" = set; then :
50087  withval=$with_msvcp_dll;
50088fi
50089
50090
50091  if test "x$MSVCP_NAME" != "x"; then
50092    if test "x$with_msvcp_dll" != x; then
50093      # If given explicitely by user, do not probe. If not present, fail directly.
50094
50095  DLL_NAME="$DLL_NAME"
50096  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50097  METHOD="--with-msvcp-dll"
50098  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50099    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50100$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50101
50102    # Need to check if the found msvcr is correct architecture
50103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50104$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50105    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50106    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50107      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50108      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50109      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50110        CORRECT_MSVCR_ARCH="PE32 executable"
50111      else
50112        CORRECT_MSVCR_ARCH="PE32+ executable"
50113      fi
50114    else
50115      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50116        CORRECT_MSVCR_ARCH=386
50117      else
50118        CORRECT_MSVCR_ARCH=x86-64
50119      fi
50120    fi
50121    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50122      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50123$as_echo "ok" >&6; }
50124      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50125      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50126$as_echo_n "checking for $DLL_NAME... " >&6; }
50127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50128$as_echo "$MSVC_DLL" >&6; }
50129    else
50130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50131$as_echo "incorrect, ignoring" >&6; }
50132      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50133$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50134    fi
50135  fi
50136
50137      if test "x$MSVC_DLL" = x; then
50138        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50139      fi
50140    else
50141
50142  VAR_NAME="MSVCP_DLL"
50143  DLL_NAME="${MSVCP_NAME}"
50144  MSVC_DLL=
50145
50146  if test "x$MSVC_DLL" = x; then
50147    # Probe: Using well-known location from Visual Studio 10.0
50148    if test "x$VCINSTALLDIR" != x; then
50149      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50150
50151  windows_path="$CYGWIN_VC_INSTALL_DIR"
50152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50153    unix_path=`$CYGPATH -u "$windows_path"`
50154    CYGWIN_VC_INSTALL_DIR="$unix_path"
50155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50157    CYGWIN_VC_INSTALL_DIR="$unix_path"
50158  fi
50159
50160      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50161        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50162      else
50163        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50164      fi
50165      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50166
50167  DLL_NAME="$DLL_NAME"
50168  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50169  METHOD="well-known location in VCINSTALLDIR"
50170  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50171    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50172$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50173
50174    # Need to check if the found msvcr is correct architecture
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50176$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50177    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50179      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50180      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50181      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50182        CORRECT_MSVCR_ARCH="PE32 executable"
50183      else
50184        CORRECT_MSVCR_ARCH="PE32+ executable"
50185      fi
50186    else
50187      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50188        CORRECT_MSVCR_ARCH=386
50189      else
50190        CORRECT_MSVCR_ARCH=x86-64
50191      fi
50192    fi
50193    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50194      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50195$as_echo "ok" >&6; }
50196      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50197      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50198$as_echo_n "checking for $DLL_NAME... " >&6; }
50199      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50200$as_echo "$MSVC_DLL" >&6; }
50201    else
50202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50203$as_echo "incorrect, ignoring" >&6; }
50204      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50205$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50206    fi
50207  fi
50208
50209    fi
50210  fi
50211
50212  if test "x$MSVC_DLL" = x; then
50213    # Probe: Check in the Boot JDK directory.
50214    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50215
50216  DLL_NAME="$DLL_NAME"
50217  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50218  METHOD="well-known location in Boot JDK"
50219  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50220    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50221$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50222
50223    # Need to check if the found msvcr is correct architecture
50224    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50225$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50226    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50228      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50229      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50230      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50231        CORRECT_MSVCR_ARCH="PE32 executable"
50232      else
50233        CORRECT_MSVCR_ARCH="PE32+ executable"
50234      fi
50235    else
50236      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50237        CORRECT_MSVCR_ARCH=386
50238      else
50239        CORRECT_MSVCR_ARCH=x86-64
50240      fi
50241    fi
50242    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50243      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50244$as_echo "ok" >&6; }
50245      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50246      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50247$as_echo_n "checking for $DLL_NAME... " >&6; }
50248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50249$as_echo "$MSVC_DLL" >&6; }
50250    else
50251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50252$as_echo "incorrect, ignoring" >&6; }
50253      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50254$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50255    fi
50256  fi
50257
50258  fi
50259
50260  if test "x$MSVC_DLL" = x; then
50261    # Probe: Look in the Windows system32 directory
50262    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50263
50264  windows_path="$CYGWIN_SYSTEMROOT"
50265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50266    unix_path=`$CYGPATH -u "$windows_path"`
50267    CYGWIN_SYSTEMROOT="$unix_path"
50268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50270    CYGWIN_SYSTEMROOT="$unix_path"
50271  fi
50272
50273    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50274
50275  DLL_NAME="$DLL_NAME"
50276  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50277  METHOD="well-known location in SYSTEMROOT"
50278  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50279    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50280$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50281
50282    # Need to check if the found msvcr is correct architecture
50283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50284$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50285    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50287      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50288      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50289      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50290        CORRECT_MSVCR_ARCH="PE32 executable"
50291      else
50292        CORRECT_MSVCR_ARCH="PE32+ executable"
50293      fi
50294    else
50295      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50296        CORRECT_MSVCR_ARCH=386
50297      else
50298        CORRECT_MSVCR_ARCH=x86-64
50299      fi
50300    fi
50301    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50303$as_echo "ok" >&6; }
50304      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50306$as_echo_n "checking for $DLL_NAME... " >&6; }
50307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50308$as_echo "$MSVC_DLL" >&6; }
50309    else
50310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50311$as_echo "incorrect, ignoring" >&6; }
50312      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50313$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50314    fi
50315  fi
50316
50317  fi
50318
50319  if test "x$MSVC_DLL" = x; then
50320    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50321    if test "x$VS100COMNTOOLS" != x; then
50322      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50323
50324  windows_path="$CYGWIN_VS_TOOLS_DIR"
50325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50326    unix_path=`$CYGPATH -u "$windows_path"`
50327    CYGWIN_VS_TOOLS_DIR="$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    CYGWIN_VS_TOOLS_DIR="$unix_path"
50331  fi
50332
50333      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50334        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50335	    | $GREP -i /x64/ | $HEAD --lines 1`
50336      else
50337        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50338	    | $GREP -i /x86/ | $HEAD --lines 1`
50339      fi
50340
50341  DLL_NAME="$DLL_NAME"
50342  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50343  METHOD="search of VS100COMNTOOLS"
50344  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50345    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50346$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50347
50348    # Need to check if the found msvcr is correct architecture
50349    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50350$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50351    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50352    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50353      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50354      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50355      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50356        CORRECT_MSVCR_ARCH="PE32 executable"
50357      else
50358        CORRECT_MSVCR_ARCH="PE32+ executable"
50359      fi
50360    else
50361      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50362        CORRECT_MSVCR_ARCH=386
50363      else
50364        CORRECT_MSVCR_ARCH=x86-64
50365      fi
50366    fi
50367    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50368      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50369$as_echo "ok" >&6; }
50370      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50371      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50372$as_echo_n "checking for $DLL_NAME... " >&6; }
50373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50374$as_echo "$MSVC_DLL" >&6; }
50375    else
50376      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50377$as_echo "incorrect, ignoring" >&6; }
50378      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50379$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50380    fi
50381  fi
50382
50383    fi
50384  fi
50385
50386  if test "x$MSVC_DLL" = x; then
50387    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50388    # (This was the original behaviour; kept since it might turn something up)
50389    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50390      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50391        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50392	    | $GREP x64 | $HEAD --lines 1`
50393      else
50394        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50395	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50396        if test "x$POSSIBLE_MSVC_DLL" = x; then
50397          # We're grasping at straws now...
50398          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50399	      | $HEAD --lines 1`
50400        fi
50401      fi
50402
50403
50404  DLL_NAME="$DLL_NAME"
50405  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50406  METHOD="search of VCINSTALLDIR"
50407  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50408    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50409$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50410
50411    # Need to check if the found msvcr is correct architecture
50412    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50413$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50414    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50415    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50416      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50417      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50418      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50419        CORRECT_MSVCR_ARCH="PE32 executable"
50420      else
50421        CORRECT_MSVCR_ARCH="PE32+ executable"
50422      fi
50423    else
50424      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50425        CORRECT_MSVCR_ARCH=386
50426      else
50427        CORRECT_MSVCR_ARCH=x86-64
50428      fi
50429    fi
50430    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50432$as_echo "ok" >&6; }
50433      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50435$as_echo_n "checking for $DLL_NAME... " >&6; }
50436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50437$as_echo "$MSVC_DLL" >&6; }
50438    else
50439      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50440$as_echo "incorrect, ignoring" >&6; }
50441      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50442$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50443    fi
50444  fi
50445
50446    fi
50447  fi
50448
50449  if test "x$MSVC_DLL" = x; then
50450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50451$as_echo_n "checking for $DLL_NAME... " >&6; }
50452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50453$as_echo "no" >&6; }
50454    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50455  fi
50456
50457  MSVCP_DLL=$MSVC_DLL
50458
50459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50460
50461  # Input might be given as Windows format, start by converting to
50462  # unix format.
50463  path="$MSVCP_DLL"
50464  new_path=`$CYGPATH -u "$path"`
50465
50466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50469  # "foo.exe" is OK but "foo" is an error.
50470  #
50471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50472  # It is also a way to make sure we got the proper file name for the real test later on.
50473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50474  if test "x$test_shortpath" = x; then
50475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50476$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50477    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50478  fi
50479
50480  # Call helper function which possibly converts this using DOS-style short mode.
50481  # If so, the updated path is stored in $new_path.
50482
50483  input_path="$new_path"
50484  # Check if we need to convert this using DOS-style short mode. If the path
50485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50486  # take no chances and rewrite it.
50487  # Note: m4 eats our [], so we need to use [ and ] instead.
50488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50489  if test "x$has_forbidden_chars" != x; then
50490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50494      # Going to short mode and back again did indeed matter. Since short mode is
50495      # case insensitive, let's make it lowercase to improve readability.
50496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50497      # Now convert it back to Unix-stile (cygpath)
50498      input_path=`$CYGPATH -u "$shortmode_path"`
50499      new_path="$input_path"
50500    fi
50501  fi
50502
50503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50504  if test "x$test_cygdrive_prefix" = x; then
50505    # As a simple fix, exclude /usr/bin since it's not a real path.
50506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50508      # a path prefixed by /cygdrive for fixpath to work.
50509      new_path="$CYGWIN_ROOT_PATH$input_path"
50510    fi
50511  fi
50512
50513
50514  if test "x$path" != "x$new_path"; then
50515    MSVCP_DLL="$new_path"
50516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50517$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50518  fi
50519
50520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50521
50522  path="$MSVCP_DLL"
50523  has_colon=`$ECHO $path | $GREP ^.:`
50524  new_path="$path"
50525  if test "x$has_colon" = x; then
50526    # Not in mixed or Windows style, start by that.
50527    new_path=`cmd //c echo $path`
50528  fi
50529
50530
50531  input_path="$new_path"
50532  # Check if we need to convert this using DOS-style short mode. If the path
50533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50534  # take no chances and rewrite it.
50535  # Note: m4 eats our [], so we need to use [ and ] instead.
50536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50537  if test "x$has_forbidden_chars" != x; then
50538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50540  fi
50541
50542
50543  windows_path="$new_path"
50544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50545    unix_path=`$CYGPATH -u "$windows_path"`
50546    new_path="$unix_path"
50547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50549    new_path="$unix_path"
50550  fi
50551
50552  if test "x$path" != "x$new_path"; then
50553    MSVCP_DLL="$new_path"
50554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50555$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50556  fi
50557
50558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50560
50561  else
50562    # We're on a unix platform. Hooray! :)
50563    path="$MSVCP_DLL"
50564    has_space=`$ECHO "$path" | $GREP " "`
50565    if test "x$has_space" != x; then
50566      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50567$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50568      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50569    fi
50570
50571    # Use eval to expand a potential ~
50572    eval path="$path"
50573    if test ! -f "$path" && test ! -d "$path"; then
50574      as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50575    fi
50576
50577    MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50578  fi
50579
50580  MSVCP_DLL=$MSVCP_DLL
50581
50582
50583    fi
50584  fi
50585
50586
50587
50588# Check whether --with-dxsdk was given.
50589if test "${with_dxsdk+set}" = set; then :
50590  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50591$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50592fi
50593
50594
50595
50596
50597# Check whether --with-dxsdk-lib was given.
50598if test "${with_dxsdk_lib+set}" = set; then :
50599  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50600$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50601fi
50602
50603
50604
50605
50606# Check whether --with-dxsdk-include was given.
50607if test "${with_dxsdk_include+set}" = set; then :
50608  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50609$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50610fi
50611
50612
50613  fi
50614
50615
50616###############################################################################
50617#
50618# We need to do some final tweaking, when everything else is done.
50619#
50620###############################################################################
50621
50622
50623  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50624
50625
50626  # The name of the Service Agent jar.
50627  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50628  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50629    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50630  fi
50631
50632
50633
50634    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50635$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50636
50637    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50638      ENABLE_INTREE_EC=yes
50639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50640$as_echo "yes" >&6; }
50641    else
50642      ENABLE_INTREE_EC=no
50643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50644$as_echo "no" >&6; }
50645    fi
50646
50647
50648
50649
50650###############################################################################
50651#
50652# Configure parts of the build that only affect the build performance,
50653# not the result.
50654#
50655###############################################################################
50656
50657
50658  # How many cores do we have on this build system?
50659
50660# Check whether --with-num-cores was given.
50661if test "${with_num_cores+set}" = set; then :
50662  withval=$with_num_cores;
50663fi
50664
50665  if test "x$with_num_cores" = x; then
50666    # The number of cores were not specified, try to probe them.
50667
50668  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50669$as_echo_n "checking for number of cores... " >&6; }
50670  NUM_CORES=1
50671  FOUND_CORES=no
50672
50673  if test -f /proc/cpuinfo; then
50674    # Looks like a Linux (or cygwin) system
50675    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50676    FOUND_CORES=yes
50677  elif test -x /usr/sbin/psrinfo; then
50678    # Looks like a Solaris system
50679    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50680    FOUND_CORES=yes
50681  elif test -x /usr/sbin/system_profiler; then
50682    # Looks like a MacOSX system
50683    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50684    FOUND_CORES=yes
50685  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50686    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50687    FOUND_CORES=yes
50688  elif test -n "$NUMBER_OF_PROCESSORS"; then
50689    # On windows, look in the env
50690    NUM_CORES=$NUMBER_OF_PROCESSORS
50691    FOUND_CORES=yes
50692  fi
50693
50694  if test "x$FOUND_CORES" = xyes; then
50695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50696$as_echo "$NUM_CORES" >&6; }
50697  else
50698    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50699$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50700    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50701$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50702  fi
50703
50704  else
50705    NUM_CORES=$with_num_cores
50706  fi
50707
50708
50709
50710  # How much memory do we have on this build system?
50711
50712# Check whether --with-memory-size was given.
50713if test "${with_memory_size+set}" = set; then :
50714  withval=$with_memory_size;
50715fi
50716
50717  if test "x$with_memory_size" = x; then
50718    # The memory size was not specified, try to probe it.
50719
50720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50721$as_echo_n "checking for memory size... " >&6; }
50722  # Default to 1024 MB
50723  MEMORY_SIZE=1024
50724  FOUND_MEM=no
50725
50726  if test -f /proc/meminfo; then
50727    # Looks like a Linux (or cygwin) system
50728    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
50729    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
50730    FOUND_MEM=yes
50731  elif test -x /usr/sbin/prtconf; then
50732    # Looks like a Solaris or AIX system
50733    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
50734    FOUND_MEM=yes
50735  elif test -x /usr/sbin/system_profiler; then
50736    # Looks like a MacOSX system
50737    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
50738    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
50739    FOUND_MEM=yes
50740  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50741    # Windows, but without cygwin
50742    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
50743    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
50744    FOUND_MEM=yes
50745  fi
50746
50747  if test "x$FOUND_MEM" = xyes; then
50748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
50749$as_echo "$MEMORY_SIZE MB" >&6; }
50750  else
50751    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
50752$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
50753    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
50754$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
50755  fi
50756
50757  else
50758    MEMORY_SIZE=$with_memory_size
50759  fi
50760
50761
50762
50763  # Provide a decent default number of parallel jobs for make depending on
50764  # number of cores, amount of memory and machine architecture.
50765
50766# Check whether --with-jobs was given.
50767if test "${with_jobs+set}" = set; then :
50768  withval=$with_jobs;
50769fi
50770
50771  if test "x$with_jobs" = x; then
50772    # Number of jobs was not specified, calculate.
50773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
50774$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
50775    # Approximate memory in GB.
50776    memory_gb=`expr $MEMORY_SIZE / 1024`
50777    # Pick the lowest of memory in gb and number of cores.
50778    if test "$memory_gb" -lt "$NUM_CORES"; then
50779      JOBS="$memory_gb"
50780    else
50781      JOBS="$NUM_CORES"
50782      # On bigger machines, leave some room for other processes to run
50783      if test "$JOBS" -gt "4"; then
50784        JOBS=`expr $JOBS '*' 90 / 100`
50785      fi
50786    fi
50787    # Cap number of jobs to 16
50788    if test "$JOBS" -gt "16"; then
50789      JOBS=16
50790    fi
50791    if test "$JOBS" -eq "0"; then
50792      JOBS=1
50793    fi
50794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
50795$as_echo "$JOBS" >&6; }
50796  else
50797    JOBS=$with_jobs
50798  fi
50799
50800
50801
50802# Setup arguments for the boot jdk (after cores and memory have been setup)
50803
50804  ##############################################################################
50805  #
50806  # Specify jvm options for anything that is run with the Boot JDK.
50807  # Not all JVM:s accept the same arguments on the command line.
50808  #
50809
50810# Check whether --with-boot-jdk-jvmargs was given.
50811if test "${with_boot_jdk_jvmargs+set}" = set; then :
50812  withval=$with_boot_jdk_jvmargs;
50813fi
50814
50815
50816  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
50817$as_echo_n "checking flags for boot jdk java command ... " >&6; }
50818
50819  # Disable special log output when a debug build is used as Boot JDK...
50820
50821  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
50822  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
50823  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
50824  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50825  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50826  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50827    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
50828    JVM_ARG_OK=true
50829  else
50830    $ECHO "Arg failed:" >&5
50831    $ECHO "$OUTPUT" >&5
50832    JVM_ARG_OK=false
50833  fi
50834
50835
50836  # Apply user provided options.
50837
50838  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
50839  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
50840  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
50841  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50842  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50843  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50844    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
50845    JVM_ARG_OK=true
50846  else
50847    $ECHO "Arg failed:" >&5
50848    $ECHO "$OUTPUT" >&5
50849    JVM_ARG_OK=false
50850  fi
50851
50852
50853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
50854$as_echo "$boot_jdk_jvmargs" >&6; }
50855
50856  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
50857  JAVA_FLAGS=$boot_jdk_jvmargs
50858
50859
50860
50861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
50862$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
50863
50864  # Starting amount of heap memory.
50865
50866  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
50867  $ECHO "Command: $JAVA -Xms64M -version" >&5
50868  OUTPUT=`$JAVA -Xms64M -version 2>&1`
50869  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50870  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50871  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50872    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
50873    JVM_ARG_OK=true
50874  else
50875    $ECHO "Arg failed:" >&5
50876    $ECHO "$OUTPUT" >&5
50877    JVM_ARG_OK=false
50878  fi
50879
50880
50881  # Maximum amount of heap memory.
50882  # Maximum stack size.
50883  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
50884  if test "x$BUILD_NUM_BITS" = x32; then
50885    if test "$JVM_MAX_HEAP" -gt "1100"; then
50886      JVM_MAX_HEAP=1100
50887    elif test "$JVM_MAX_HEAP" -lt "512"; then
50888      JVM_MAX_HEAP=512
50889    fi
50890    STACK_SIZE=768
50891  else
50892    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
50893    # pointers are used. Apparently, we need to increase the heap and stack
50894    # space for the jvm. More specifically, when running javac to build huge
50895    # jdk batch
50896    if test "$JVM_MAX_HEAP" -gt "1600"; then
50897      JVM_MAX_HEAP=1600
50898    elif test "$JVM_MAX_HEAP" -lt "512"; then
50899      JVM_MAX_HEAP=512
50900    fi
50901    STACK_SIZE=1536
50902  fi
50903
50904  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
50905  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
50906  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
50907  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50908  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50909  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50910    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
50911    JVM_ARG_OK=true
50912  else
50913    $ECHO "Arg failed:" >&5
50914    $ECHO "$OUTPUT" >&5
50915    JVM_ARG_OK=false
50916  fi
50917
50918
50919  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
50920  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
50921  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
50922  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50923  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50924  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50925    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
50926    JVM_ARG_OK=true
50927  else
50928    $ECHO "Arg failed:" >&5
50929    $ECHO "$OUTPUT" >&5
50930    JVM_ARG_OK=false
50931  fi
50932
50933
50934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
50935$as_echo "$boot_jdk_jvmargs_big" >&6; }
50936
50937  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
50938
50939
50940
50941  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
50942$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
50943
50944  # Use serial gc for small short lived tools if possible
50945
50946  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
50947  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
50948  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
50949  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50950  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50951  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50952    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
50953    JVM_ARG_OK=true
50954  else
50955    $ECHO "Arg failed:" >&5
50956    $ECHO "$OUTPUT" >&5
50957    JVM_ARG_OK=false
50958  fi
50959
50960
50961  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
50962  $ECHO "Command: $JAVA -Xms32M -version" >&5
50963  OUTPUT=`$JAVA -Xms32M -version 2>&1`
50964  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50965  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50966  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50967    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
50968    JVM_ARG_OK=true
50969  else
50970    $ECHO "Arg failed:" >&5
50971    $ECHO "$OUTPUT" >&5
50972    JVM_ARG_OK=false
50973  fi
50974
50975
50976  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
50977  $ECHO "Command: $JAVA -Xmx512M -version" >&5
50978  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
50979  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
50980  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
50981  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
50982    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
50983    JVM_ARG_OK=true
50984  else
50985    $ECHO "Arg failed:" >&5
50986    $ECHO "$OUTPUT" >&5
50987    JVM_ARG_OK=false
50988  fi
50989
50990
50991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
50992$as_echo "$boot_jdk_jvmargs_small" >&6; }
50993
50994  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
50995
50996
50997  JAVA_TOOL_FLAGS_SMALL=""
50998  for f in $JAVA_FLAGS_SMALL; do
50999    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51000  done
51001
51002
51003
51004# Setup smart javac (after cores and memory have been setup)
51005
51006
51007# Check whether --with-sjavac-server-java was given.
51008if test "${with_sjavac_server_java+set}" = set; then :
51009  withval=$with_sjavac_server_java;
51010fi
51011
51012
51013  if test "x$with_sjavac_server_java" != x; then
51014    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51015    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51016    if test "x$FOUND_VERSION" = x; then
51017      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51018    fi
51019  else
51020    SJAVAC_SERVER_JAVA="$JAVA"
51021  fi
51022
51023
51024  if test "$MEMORY_SIZE" -gt "3000"; then
51025
51026  $ECHO "Check if jvm arg is ok: -d64" >&5
51027  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51028  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51029  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51030  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51031  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51032    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51033    JVM_ARG_OK=true
51034  else
51035    $ECHO "Arg failed:" >&5
51036    $ECHO "$OUTPUT" >&5
51037    JVM_ARG_OK=false
51038  fi
51039
51040    if test "$JVM_ARG_OK" = true; then
51041      JVM_64BIT=true
51042      JVM_ARG_OK=false
51043    fi
51044  fi
51045
51046  MX_VALUE=`expr $MEMORY_SIZE / 2`
51047  if test "$JVM_64BIT" = true; then
51048    # Set ms lower than mx since more than one instance of the server might
51049    # get launched at the same time before they figure out which instance won.
51050    MS_VALUE=512
51051    if test "$MX_VALUE" -gt "2048"; then
51052      MX_VALUE=2048
51053    fi
51054  else
51055    MS_VALUE=256
51056    if test "$MX_VALUE" -gt "1500"; then
51057      MX_VALUE=1500
51058    fi
51059  fi
51060  if test "$MX_VALUE" -lt "512"; then
51061    MX_VALUE=512
51062  fi
51063
51064  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51065  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51066  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51067  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51068  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51069  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51070    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51071    JVM_ARG_OK=true
51072  else
51073    $ECHO "Arg failed:" >&5
51074    $ECHO "$OUTPUT" >&5
51075    JVM_ARG_OK=false
51076  fi
51077
51078
51079
51080  # Check whether --enable-sjavac was given.
51081if test "${enable_sjavac+set}" = set; then :
51082  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51083else
51084  ENABLE_SJAVAC='no'
51085fi
51086
51087  if test "x$JVM_ARG_OK" = "xfalse"; then
51088    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51089$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51090    ENABLE_SJAVAC=no;
51091  fi
51092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51093$as_echo_n "checking whether to use sjavac... " >&6; }
51094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51095$as_echo "$ENABLE_SJAVAC" >&6; }
51096
51097
51098  if test "x$ENABLE_SJAVAC" = xyes; then
51099    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51100  else
51101    SJAVAC_SERVER_DIR=
51102  fi
51103
51104
51105
51106# Can the C/C++ compiler use precompiled headers?
51107
51108
51109  ###############################################################################
51110  #
51111  # Can the C/C++ compiler use precompiled headers?
51112  #
51113  # Check whether --enable-precompiled-headers was given.
51114if test "${enable_precompiled_headers+set}" = set; then :
51115  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51116else
51117  ENABLE_PRECOMPH=yes
51118fi
51119
51120
51121  USE_PRECOMPILED_HEADER=1
51122  if test "x$ENABLE_PRECOMPH" = xno; then
51123    USE_PRECOMPILED_HEADER=0
51124  fi
51125
51126  if test "x$ENABLE_PRECOMPH" = xyes; then
51127    # Check that the compiler actually supports precomp headers.
51128    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51129      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51130$as_echo_n "checking that precompiled headers work... " >&6; }
51131      echo "int alfa();" > conftest.h
51132      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51133      if test ! -f conftest.hpp.gch; then
51134        USE_PRECOMPILED_HEADER=0
51135        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51136$as_echo "no" >&6; }
51137      else
51138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51139$as_echo "yes" >&6; }
51140      fi
51141      rm -f conftest.h conftest.hpp.gch
51142    fi
51143  fi
51144
51145
51146
51147
51148# Setup use of ccache, if available
51149
51150  # Check whether --enable-ccache was given.
51151if test "${enable_ccache+set}" = set; then :
51152  enableval=$enable_ccache;
51153fi
51154
51155
51156  CCACHE=
51157  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51158$as_echo_n "checking is ccache enabled... " >&6; }
51159  ENABLE_CCACHE=$enable_ccache
51160  if test "x$enable_ccache" = xyes; then
51161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51162$as_echo "yes" >&6; }
51163    OLD_PATH="$PATH"
51164    if test "x$TOOLCHAIN_PATH" != x; then
51165      PATH=$TOOLCHAIN_PATH:$PATH
51166    fi
51167
51168
51169
51170  # Publish this variable in the help.
51171
51172
51173  if test "x$CCACHE" = x; then
51174    # The variable is not set by user, try to locate tool using the code snippet
51175    for ac_prog in ccache
51176do
51177  # Extract the first word of "$ac_prog", so it can be a program name with args.
51178set dummy $ac_prog; ac_word=$2
51179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51180$as_echo_n "checking for $ac_word... " >&6; }
51181if ${ac_cv_path_CCACHE+:} false; then :
51182  $as_echo_n "(cached) " >&6
51183else
51184  case $CCACHE in
51185  [\\/]* | ?:[\\/]*)
51186  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51187  ;;
51188  *)
51189  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51190for as_dir in $PATH
51191do
51192  IFS=$as_save_IFS
51193  test -z "$as_dir" && as_dir=.
51194    for ac_exec_ext in '' $ac_executable_extensions; do
51195  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51196    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51197    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51198    break 2
51199  fi
51200done
51201  done
51202IFS=$as_save_IFS
51203
51204  ;;
51205esac
51206fi
51207CCACHE=$ac_cv_path_CCACHE
51208if test -n "$CCACHE"; then
51209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51210$as_echo "$CCACHE" >&6; }
51211else
51212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51213$as_echo "no" >&6; }
51214fi
51215
51216
51217  test -n "$CCACHE" && break
51218done
51219
51220  else
51221    # The variable is set, but is it from the command line or the environment?
51222
51223    # Try to remove the string !CCACHE! from our list.
51224    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51225    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51226      # If it failed, the variable was not from the command line. Ignore it,
51227      # but warn the user (except for BASH, which is always set by the calling BASH).
51228      if test "xCCACHE" != xBASH; then
51229        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51230$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51231      fi
51232      # Try to locate tool using the code snippet
51233      for ac_prog in ccache
51234do
51235  # Extract the first word of "$ac_prog", so it can be a program name with args.
51236set dummy $ac_prog; ac_word=$2
51237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51238$as_echo_n "checking for $ac_word... " >&6; }
51239if ${ac_cv_path_CCACHE+:} false; then :
51240  $as_echo_n "(cached) " >&6
51241else
51242  case $CCACHE in
51243  [\\/]* | ?:[\\/]*)
51244  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51245  ;;
51246  *)
51247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51248for as_dir in $PATH
51249do
51250  IFS=$as_save_IFS
51251  test -z "$as_dir" && as_dir=.
51252    for ac_exec_ext in '' $ac_executable_extensions; do
51253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51254    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51256    break 2
51257  fi
51258done
51259  done
51260IFS=$as_save_IFS
51261
51262  ;;
51263esac
51264fi
51265CCACHE=$ac_cv_path_CCACHE
51266if test -n "$CCACHE"; then
51267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51268$as_echo "$CCACHE" >&6; }
51269else
51270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51271$as_echo "no" >&6; }
51272fi
51273
51274
51275  test -n "$CCACHE" && break
51276done
51277
51278    else
51279      # If it succeeded, then it was overridden by the user. We will use it
51280      # for the tool.
51281
51282      # First remove it from the list of overridden variables, so we can test
51283      # for unknown variables in the end.
51284      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51285
51286      # Check if the provided tool contains a complete path.
51287      tool_specified="$CCACHE"
51288      tool_basename="${tool_specified##*/}"
51289      if test "x$tool_basename" = "x$tool_specified"; then
51290        # A command without a complete path is provided, search $PATH.
51291        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51292$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51293        # Extract the first word of "$tool_basename", so it can be a program name with args.
51294set dummy $tool_basename; ac_word=$2
51295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51296$as_echo_n "checking for $ac_word... " >&6; }
51297if ${ac_cv_path_CCACHE+:} false; then :
51298  $as_echo_n "(cached) " >&6
51299else
51300  case $CCACHE in
51301  [\\/]* | ?:[\\/]*)
51302  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51303  ;;
51304  *)
51305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51306for as_dir in $PATH
51307do
51308  IFS=$as_save_IFS
51309  test -z "$as_dir" && as_dir=.
51310    for ac_exec_ext in '' $ac_executable_extensions; do
51311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51312    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51314    break 2
51315  fi
51316done
51317  done
51318IFS=$as_save_IFS
51319
51320  ;;
51321esac
51322fi
51323CCACHE=$ac_cv_path_CCACHE
51324if test -n "$CCACHE"; then
51325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51326$as_echo "$CCACHE" >&6; }
51327else
51328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51329$as_echo "no" >&6; }
51330fi
51331
51332
51333        if test "x$CCACHE" = x; then
51334          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51335        fi
51336      else
51337        # Otherwise we believe it is a complete path. Use it as it is.
51338        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51339$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51341$as_echo_n "checking for CCACHE... " >&6; }
51342        if test ! -x "$tool_specified"; then
51343          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51344$as_echo "not found" >&6; }
51345          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51346        fi
51347        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51348$as_echo "$tool_specified" >&6; }
51349      fi
51350    fi
51351  fi
51352
51353
51354
51355  if test "x$CCACHE" = x; then
51356    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51357  fi
51358
51359
51360    CCACHE_STATUS="enabled"
51361    PATH="$OLD_PATH"
51362  elif test "x$enable_ccache" = xno; then
51363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51364$as_echo "no, explicitly disabled" >&6; }
51365  elif test "x$enable_ccache" = x; then
51366    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51367$as_echo "no" >&6; }
51368  else
51369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51370$as_echo "unknown" >&6; }
51371    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51372  fi
51373
51374
51375
51376# Check whether --with-ccache-dir was given.
51377if test "${with_ccache_dir+set}" = set; then :
51378  withval=$with_ccache_dir;
51379fi
51380
51381
51382  if test "x$with_ccache_dir" != x; then
51383    # When using a non home ccache directory, assume the use is to share ccache files
51384    # with other users. Thus change the umask.
51385    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51386    if test "x$CCACHE" = x; then
51387      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51388$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51389    fi
51390  fi
51391
51392  if test "x$CCACHE" != x; then
51393
51394  if test "x$CCACHE" != x; then
51395    # Only use ccache if it is 3.1.4 or later, which supports
51396    # precompiled headers.
51397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
51398$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
51399    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
51400    if test "x$HAS_GOOD_CCACHE" = x; then
51401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
51402$as_echo "no, disabling ccache" >&6; }
51403      CCACHE=
51404      CCACHE_STATUS="disabled"
51405    else
51406      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51407$as_echo "yes" >&6; }
51408      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51409$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51410      PUSHED_FLAGS="$CXXFLAGS"
51411      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
51412      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51413/* end confdefs.h.  */
51414
51415int
51416main ()
51417{
51418
51419  ;
51420  return 0;
51421}
51422_ACEOF
51423if ac_fn_cxx_try_compile "$LINENO"; then :
51424  CC_KNOWS_CCACHE_TRICK=yes
51425else
51426  CC_KNOWS_CCACHE_TRICK=no
51427fi
51428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51429      CXXFLAGS="$PUSHED_FLAGS"
51430      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51432$as_echo "yes" >&6; }
51433      else
51434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
51435$as_echo "no, disabling ccaching of precompiled headers" >&6; }
51436        CCACHE=
51437        CCACHE_STATUS="disabled"
51438      fi
51439    fi
51440  fi
51441
51442  if test "x$CCACHE" != x; then
51443    CCACHE_SLOPPINESS=time_macros
51444    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
51445    CCACHE_FLAGS=-fpch-preprocess
51446
51447    if test "x$SET_CCACHE_DIR" != x; then
51448      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51449      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51450    fi
51451  fi
51452
51453  fi
51454
51455
51456###############################################################################
51457#
51458# And now the finish...
51459#
51460###############################################################################
51461
51462# Check for some common pitfalls
51463
51464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51465    file_to_test="$SRC_ROOT/LICENSE"
51466    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51467      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
51468    fi
51469  fi
51470
51471
51472  # Did user specify any unknown variables?
51473
51474  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51475    # Replace the separating ! with spaces before presenting for end user.
51476    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51477    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51478$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51479  fi
51480
51481
51482  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51483$as_echo_n "checking if build directory is on local disk... " >&6; }
51484
51485  # df -l lists only local disks; if the given directory is not found then
51486  # a non-zero exit code is given
51487  if test "x$DF" = x; then
51488    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51489      # msys does not have df; use Windows "net use" instead.
51490      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51491      if test "x$IS_NETWORK_DISK" = x; then
51492        OUTPUT_DIR_IS_LOCAL="yes"
51493      else
51494        OUTPUT_DIR_IS_LOCAL="no"
51495      fi
51496    else
51497      # No df here, say it's local
51498      OUTPUT_DIR_IS_LOCAL="yes"
51499    fi
51500  else
51501    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51502      OUTPUT_DIR_IS_LOCAL="yes"
51503    else
51504      OUTPUT_DIR_IS_LOCAL="no"
51505    fi
51506  fi
51507
51508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51509$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51510
51511
51512
51513  # Check if the user has any old-style ALT_ variables set.
51514  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51515
51516  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51517  # Since we can't properly handle the dependencies for this, warn the user about the situation
51518  if test -e $OUTPUT_ROOT/spec.gmk; then
51519    IS_RECONFIGURE=yes
51520  else
51521    IS_RECONFIGURE=no
51522  fi
51523
51524
51525# At the end, call the custom hook. (Dummy macro if no custom sources available)
51526
51527
51528# We're messing a bit with internal autoconf variables to put the config.status
51529# in the output directory instead of the current directory.
51530CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51531
51532# Create the actual output files. Now the main work of configure is done.
51533cat >confcache <<\_ACEOF
51534# This file is a shell script that caches the results of configure
51535# tests run on this system so they can be shared between configure
51536# scripts and configure runs, see configure's option --config-cache.
51537# It is not useful on other systems.  If it contains results you don't
51538# want to keep, you may remove or edit it.
51539#
51540# config.status only pays attention to the cache file if you give it
51541# the --recheck option to rerun configure.
51542#
51543# `ac_cv_env_foo' variables (set or unset) will be overridden when
51544# loading this file, other *unset* `ac_cv_foo' will be assigned the
51545# following values.
51546
51547_ACEOF
51548
51549# The following way of writing the cache mishandles newlines in values,
51550# but we know of no workaround that is simple, portable, and efficient.
51551# So, we kill variables containing newlines.
51552# Ultrix sh set writes to stderr and can't be redirected directly,
51553# and sets the high bit in the cache file unless we assign to the vars.
51554(
51555  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51556    eval ac_val=\$$ac_var
51557    case $ac_val in #(
51558    *${as_nl}*)
51559      case $ac_var in #(
51560      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51561$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51562      esac
51563      case $ac_var in #(
51564      _ | IFS | as_nl) ;; #(
51565      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51566      *) { eval $ac_var=; unset $ac_var;} ;;
51567      esac ;;
51568    esac
51569  done
51570
51571  (set) 2>&1 |
51572    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51573    *${as_nl}ac_space=\ *)
51574      # `set' does not quote correctly, so add quotes: double-quote
51575      # substitution turns \\\\ into \\, and sed turns \\ into \.
51576      sed -n \
51577	"s/'/'\\\\''/g;
51578	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51579      ;; #(
51580    *)
51581      # `set' quotes correctly as required by POSIX, so do not add quotes.
51582      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51583      ;;
51584    esac |
51585    sort
51586) |
51587  sed '
51588     /^ac_cv_env_/b end
51589     t clear
51590     :clear
51591     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51592     t end
51593     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51594     :end' >>confcache
51595if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51596  if test -w "$cache_file"; then
51597    if test "x$cache_file" != "x/dev/null"; then
51598      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51599$as_echo "$as_me: updating cache $cache_file" >&6;}
51600      if test ! -f "$cache_file" || test -h "$cache_file"; then
51601	cat confcache >"$cache_file"
51602      else
51603        case $cache_file in #(
51604        */* | ?:*)
51605	  mv -f confcache "$cache_file"$$ &&
51606	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51607        *)
51608	  mv -f confcache "$cache_file" ;;
51609	esac
51610      fi
51611    fi
51612  else
51613    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51614$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51615  fi
51616fi
51617rm -f confcache
51618
51619test "x$prefix" = xNONE && prefix=$ac_default_prefix
51620# Let make expand exec_prefix.
51621test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51622
51623# Transform confdefs.h into DEFS.
51624# Protect against shell expansion while executing Makefile rules.
51625# Protect against Makefile macro expansion.
51626#
51627# If the first sed substitution is executed (which looks for macros that
51628# take arguments), then branch to the quote section.  Otherwise,
51629# look for a macro that doesn't take arguments.
51630ac_script='
51631:mline
51632/\\$/{
51633 N
51634 s,\\\n,,
51635 b mline
51636}
51637t clear
51638:clear
51639s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51640t quote
51641s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51642t quote
51643b any
51644:quote
51645s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51646s/\[/\\&/g
51647s/\]/\\&/g
51648s/\$/$$/g
51649H
51650:any
51651${
51652	g
51653	s/^\n//
51654	s/\n/ /g
51655	p
51656}
51657'
51658DEFS=`sed -n "$ac_script" confdefs.h`
51659
51660
51661ac_libobjs=
51662ac_ltlibobjs=
51663U=
51664for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51665  # 1. Remove the extension, and $U if already installed.
51666  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51667  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51668  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51669  #    will be set to the directory where LIBOBJS objects are built.
51670  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51671  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51672done
51673LIBOBJS=$ac_libobjs
51674
51675LTLIBOBJS=$ac_ltlibobjs
51676
51677
51678
51679: "${CONFIG_STATUS=./config.status}"
51680ac_write_fail=0
51681ac_clean_files_save=$ac_clean_files
51682ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51683{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51684$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51685as_write_fail=0
51686cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51687#! $SHELL
51688# Generated by $as_me.
51689# Run this file to recreate the current configuration.
51690# Compiler output produced by configure, useful for debugging
51691# configure, is in config.log if it exists.
51692
51693debug=false
51694ac_cs_recheck=false
51695ac_cs_silent=false
51696
51697SHELL=\${CONFIG_SHELL-$SHELL}
51698export SHELL
51699_ASEOF
51700cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51701## -------------------- ##
51702## M4sh Initialization. ##
51703## -------------------- ##
51704
51705# Be more Bourne compatible
51706DUALCASE=1; export DUALCASE # for MKS sh
51707if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51708  emulate sh
51709  NULLCMD=:
51710  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51711  # is contrary to our usage.  Disable this feature.
51712  alias -g '${1+"$@"}'='"$@"'
51713  setopt NO_GLOB_SUBST
51714else
51715  case `(set -o) 2>/dev/null` in #(
51716  *posix*) :
51717    set -o posix ;; #(
51718  *) :
51719     ;;
51720esac
51721fi
51722
51723
51724as_nl='
51725'
51726export as_nl
51727# Printing a long string crashes Solaris 7 /usr/bin/printf.
51728as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
51729as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
51730as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
51731# Prefer a ksh shell builtin over an external printf program on Solaris,
51732# but without wasting forks for bash or zsh.
51733if test -z "$BASH_VERSION$ZSH_VERSION" \
51734    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
51735  as_echo='print -r --'
51736  as_echo_n='print -rn --'
51737elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51738  as_echo='printf %s\n'
51739  as_echo_n='printf %s'
51740else
51741  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
51742    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
51743    as_echo_n='/usr/ucb/echo -n'
51744  else
51745    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
51746    as_echo_n_body='eval
51747      arg=$1;
51748      case $arg in #(
51749      *"$as_nl"*)
51750	expr "X$arg" : "X\\(.*\\)$as_nl";
51751	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
51752      esac;
51753      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
51754    '
51755    export as_echo_n_body
51756    as_echo_n='sh -c $as_echo_n_body as_echo'
51757  fi
51758  export as_echo_body
51759  as_echo='sh -c $as_echo_body as_echo'
51760fi
51761
51762# The user is always right.
51763if test "${PATH_SEPARATOR+set}" != set; then
51764  PATH_SEPARATOR=:
51765  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
51766    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
51767      PATH_SEPARATOR=';'
51768  }
51769fi
51770
51771
51772# IFS
51773# We need space, tab and new line, in precisely that order.  Quoting is
51774# there to prevent editors from complaining about space-tab.
51775# (If _AS_PATH_WALK were called with IFS unset, it would disable word
51776# splitting by setting IFS to empty value.)
51777IFS=" ""	$as_nl"
51778
51779# Find who we are.  Look in the path if we contain no directory separator.
51780as_myself=
51781case $0 in #((
51782  *[\\/]* ) as_myself=$0 ;;
51783  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51784for as_dir in $PATH
51785do
51786  IFS=$as_save_IFS
51787  test -z "$as_dir" && as_dir=.
51788    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
51789  done
51790IFS=$as_save_IFS
51791
51792     ;;
51793esac
51794# We did not find ourselves, most probably we were run as `sh COMMAND'
51795# in which case we are not to be found in the path.
51796if test "x$as_myself" = x; then
51797  as_myself=$0
51798fi
51799if test ! -f "$as_myself"; then
51800  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
51801  exit 1
51802fi
51803
51804# Unset variables that we do not need and which cause bugs (e.g. in
51805# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
51806# suppresses any "Segmentation fault" message there.  '((' could
51807# trigger a bug in pdksh 5.2.14.
51808for as_var in BASH_ENV ENV MAIL MAILPATH
51809do eval test x\${$as_var+set} = xset \
51810  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
51811done
51812PS1='$ '
51813PS2='> '
51814PS4='+ '
51815
51816# NLS nuisances.
51817LC_ALL=C
51818export LC_ALL
51819LANGUAGE=C
51820export LANGUAGE
51821
51822# CDPATH.
51823(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
51824
51825
51826# as_fn_error STATUS ERROR [LINENO LOG_FD]
51827# ----------------------------------------
51828# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
51829# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
51830# script with STATUS, using 1 if that was 0.
51831as_fn_error ()
51832{
51833  as_status=$1; test $as_status -eq 0 && as_status=1
51834  if test "$4"; then
51835    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
51836    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
51837  fi
51838  $as_echo "$as_me: error: $2" >&2
51839  as_fn_exit $as_status
51840} # as_fn_error
51841
51842
51843# as_fn_set_status STATUS
51844# -----------------------
51845# Set $? to STATUS, without forking.
51846as_fn_set_status ()
51847{
51848  return $1
51849} # as_fn_set_status
51850
51851# as_fn_exit STATUS
51852# -----------------
51853# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
51854as_fn_exit ()
51855{
51856  set +e
51857  as_fn_set_status $1
51858  exit $1
51859} # as_fn_exit
51860
51861# as_fn_unset VAR
51862# ---------------
51863# Portably unset VAR.
51864as_fn_unset ()
51865{
51866  { eval $1=; unset $1;}
51867}
51868as_unset=as_fn_unset
51869# as_fn_append VAR VALUE
51870# ----------------------
51871# Append the text in VALUE to the end of the definition contained in VAR. Take
51872# advantage of any shell optimizations that allow amortized linear growth over
51873# repeated appends, instead of the typical quadratic growth present in naive
51874# implementations.
51875if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
51876  eval 'as_fn_append ()
51877  {
51878    eval $1+=\$2
51879  }'
51880else
51881  as_fn_append ()
51882  {
51883    eval $1=\$$1\$2
51884  }
51885fi # as_fn_append
51886
51887# as_fn_arith ARG...
51888# ------------------
51889# Perform arithmetic evaluation on the ARGs, and store the result in the
51890# global $as_val. Take advantage of shells that can avoid forks. The arguments
51891# must be portable across $(()) and expr.
51892if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
51893  eval 'as_fn_arith ()
51894  {
51895    as_val=$(( $* ))
51896  }'
51897else
51898  as_fn_arith ()
51899  {
51900    as_val=`expr "$@" || test $? -eq 1`
51901  }
51902fi # as_fn_arith
51903
51904
51905if expr a : '\(a\)' >/dev/null 2>&1 &&
51906   test "X`expr 00001 : '.*\(...\)'`" = X001; then
51907  as_expr=expr
51908else
51909  as_expr=false
51910fi
51911
51912if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
51913  as_basename=basename
51914else
51915  as_basename=false
51916fi
51917
51918if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
51919  as_dirname=dirname
51920else
51921  as_dirname=false
51922fi
51923
51924as_me=`$as_basename -- "$0" ||
51925$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
51926	 X"$0" : 'X\(//\)$' \| \
51927	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
51928$as_echo X/"$0" |
51929    sed '/^.*\/\([^/][^/]*\)\/*$/{
51930	    s//\1/
51931	    q
51932	  }
51933	  /^X\/\(\/\/\)$/{
51934	    s//\1/
51935	    q
51936	  }
51937	  /^X\/\(\/\).*/{
51938	    s//\1/
51939	    q
51940	  }
51941	  s/.*/./; q'`
51942
51943# Avoid depending upon Character Ranges.
51944as_cr_letters='abcdefghijklmnopqrstuvwxyz'
51945as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
51946as_cr_Letters=$as_cr_letters$as_cr_LETTERS
51947as_cr_digits='0123456789'
51948as_cr_alnum=$as_cr_Letters$as_cr_digits
51949
51950ECHO_C= ECHO_N= ECHO_T=
51951case `echo -n x` in #(((((
51952-n*)
51953  case `echo 'xy\c'` in
51954  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
51955  xy)  ECHO_C='\c';;
51956  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
51957       ECHO_T='	';;
51958  esac;;
51959*)
51960  ECHO_N='-n';;
51961esac
51962
51963rm -f conf$$ conf$$.exe conf$$.file
51964if test -d conf$$.dir; then
51965  rm -f conf$$.dir/conf$$.file
51966else
51967  rm -f conf$$.dir
51968  mkdir conf$$.dir 2>/dev/null
51969fi
51970if (echo >conf$$.file) 2>/dev/null; then
51971  if ln -s conf$$.file conf$$ 2>/dev/null; then
51972    as_ln_s='ln -s'
51973    # ... but there are two gotchas:
51974    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
51975    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
51976    # In both cases, we have to default to `cp -pR'.
51977    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
51978      as_ln_s='cp -pR'
51979  elif ln conf$$.file conf$$ 2>/dev/null; then
51980    as_ln_s=ln
51981  else
51982    as_ln_s='cp -pR'
51983  fi
51984else
51985  as_ln_s='cp -pR'
51986fi
51987rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
51988rmdir conf$$.dir 2>/dev/null
51989
51990
51991# as_fn_mkdir_p
51992# -------------
51993# Create "$as_dir" as a directory, including parents if necessary.
51994as_fn_mkdir_p ()
51995{
51996
51997  case $as_dir in #(
51998  -*) as_dir=./$as_dir;;
51999  esac
52000  test -d "$as_dir" || eval $as_mkdir_p || {
52001    as_dirs=
52002    while :; do
52003      case $as_dir in #(
52004      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52005      *) as_qdir=$as_dir;;
52006      esac
52007      as_dirs="'$as_qdir' $as_dirs"
52008      as_dir=`$as_dirname -- "$as_dir" ||
52009$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52010	 X"$as_dir" : 'X\(//\)[^/]' \| \
52011	 X"$as_dir" : 'X\(//\)$' \| \
52012	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52013$as_echo X"$as_dir" |
52014    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52015	    s//\1/
52016	    q
52017	  }
52018	  /^X\(\/\/\)[^/].*/{
52019	    s//\1/
52020	    q
52021	  }
52022	  /^X\(\/\/\)$/{
52023	    s//\1/
52024	    q
52025	  }
52026	  /^X\(\/\).*/{
52027	    s//\1/
52028	    q
52029	  }
52030	  s/.*/./; q'`
52031      test -d "$as_dir" && break
52032    done
52033    test -z "$as_dirs" || eval "mkdir $as_dirs"
52034  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52035
52036
52037} # as_fn_mkdir_p
52038if mkdir -p . 2>/dev/null; then
52039  as_mkdir_p='mkdir -p "$as_dir"'
52040else
52041  test -d ./-p && rmdir ./-p
52042  as_mkdir_p=false
52043fi
52044
52045
52046# as_fn_executable_p FILE
52047# -----------------------
52048# Test if FILE is an executable regular file.
52049as_fn_executable_p ()
52050{
52051  test -f "$1" && test -x "$1"
52052} # as_fn_executable_p
52053as_test_x='test -x'
52054as_executable_p=as_fn_executable_p
52055
52056# Sed expression to map a string onto a valid CPP name.
52057as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52058
52059# Sed expression to map a string onto a valid variable name.
52060as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52061
52062
52063exec 6>&1
52064## ----------------------------------- ##
52065## Main body of $CONFIG_STATUS script. ##
52066## ----------------------------------- ##
52067_ASEOF
52068test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52069
52070cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52071# Save the log message, to keep $0 and so on meaningful, and to
52072# report actual input values of CONFIG_FILES etc. instead of their
52073# values after options handling.
52074ac_log="
52075This file was extended by OpenJDK $as_me jdk9, which was
52076generated by GNU Autoconf 2.69.  Invocation command line was
52077
52078  CONFIG_FILES    = $CONFIG_FILES
52079  CONFIG_HEADERS  = $CONFIG_HEADERS
52080  CONFIG_LINKS    = $CONFIG_LINKS
52081  CONFIG_COMMANDS = $CONFIG_COMMANDS
52082  $ $0 $@
52083
52084on `(hostname || uname -n) 2>/dev/null | sed 1q`
52085"
52086
52087_ACEOF
52088
52089case $ac_config_files in *"
52090"*) set x $ac_config_files; shift; ac_config_files=$*;;
52091esac
52092
52093
52094
52095cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52096# Files that config.status was made for.
52097config_files="$ac_config_files"
52098
52099_ACEOF
52100
52101cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52102ac_cs_usage="\
52103\`$as_me' instantiates files and other configuration actions
52104from templates according to the current configuration.  Unless the files
52105and actions are specified as TAGs, all are instantiated by default.
52106
52107Usage: $0 [OPTION]... [TAG]...
52108
52109  -h, --help       print this help, then exit
52110  -V, --version    print version number and configuration settings, then exit
52111      --config     print configuration, then exit
52112  -q, --quiet, --silent
52113                   do not print progress messages
52114  -d, --debug      don't remove temporary files
52115      --recheck    update $as_me by reconfiguring in the same conditions
52116      --file=FILE[:TEMPLATE]
52117                   instantiate the configuration file FILE
52118
52119Configuration files:
52120$config_files
52121
52122Report bugs to <build-dev@openjdk.java.net>.
52123OpenJDK home page: <http://openjdk.java.net>."
52124
52125_ACEOF
52126cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52127ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52128ac_cs_version="\\
52129OpenJDK config.status jdk9
52130configured by $0, generated by GNU Autoconf 2.69,
52131  with options \\"\$ac_cs_config\\"
52132
52133Copyright (C) 2012 Free Software Foundation, Inc.
52134This config.status script is free software; the Free Software Foundation
52135gives unlimited permission to copy, distribute and modify it."
52136
52137ac_pwd='$ac_pwd'
52138srcdir='$srcdir'
52139AWK='$AWK'
52140test -n "\$AWK" || AWK=awk
52141_ACEOF
52142
52143cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52144# The default lists apply if the user does not specify any file.
52145ac_need_defaults=:
52146while test $# != 0
52147do
52148  case $1 in
52149  --*=?*)
52150    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52151    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52152    ac_shift=:
52153    ;;
52154  --*=)
52155    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52156    ac_optarg=
52157    ac_shift=:
52158    ;;
52159  *)
52160    ac_option=$1
52161    ac_optarg=$2
52162    ac_shift=shift
52163    ;;
52164  esac
52165
52166  case $ac_option in
52167  # Handling of the options.
52168  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52169    ac_cs_recheck=: ;;
52170  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52171    $as_echo "$ac_cs_version"; exit ;;
52172  --config | --confi | --conf | --con | --co | --c )
52173    $as_echo "$ac_cs_config"; exit ;;
52174  --debug | --debu | --deb | --de | --d | -d )
52175    debug=: ;;
52176  --file | --fil | --fi | --f )
52177    $ac_shift
52178    case $ac_optarg in
52179    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52180    '') as_fn_error $? "missing file argument" ;;
52181    esac
52182    as_fn_append CONFIG_FILES " '$ac_optarg'"
52183    ac_need_defaults=false;;
52184  --he | --h |  --help | --hel | -h )
52185    $as_echo "$ac_cs_usage"; exit ;;
52186  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52187  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52188    ac_cs_silent=: ;;
52189
52190  # This is an error.
52191  -*) as_fn_error $? "unrecognized option: \`$1'
52192Try \`$0 --help' for more information." ;;
52193
52194  *) as_fn_append ac_config_targets " $1"
52195     ac_need_defaults=false ;;
52196
52197  esac
52198  shift
52199done
52200
52201ac_configure_extra_args=
52202
52203if $ac_cs_silent; then
52204  exec 6>/dev/null
52205  ac_configure_extra_args="$ac_configure_extra_args --silent"
52206fi
52207
52208_ACEOF
52209cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52210if \$ac_cs_recheck; then
52211  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52212  shift
52213  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52214  CONFIG_SHELL='$SHELL'
52215  export CONFIG_SHELL
52216  exec "\$@"
52217fi
52218
52219_ACEOF
52220cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52221exec 5>>config.log
52222{
52223  echo
52224  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52225## Running $as_me. ##
52226_ASBOX
52227  $as_echo "$ac_log"
52228} >&5
52229
52230_ACEOF
52231cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52232_ACEOF
52233
52234cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52235
52236# Handling of arguments.
52237for ac_config_target in $ac_config_targets
52238do
52239  case $ac_config_target in
52240    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52241    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52242    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52243    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52244    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52245
52246  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52247  esac
52248done
52249
52250
52251# If the user did not use the arguments to specify the items to instantiate,
52252# then the envvar interface is used.  Set only those that are not.
52253# We use the long form for the default assignment because of an extremely
52254# bizarre bug on SunOS 4.1.3.
52255if $ac_need_defaults; then
52256  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52257fi
52258
52259# Have a temporary directory for convenience.  Make it in the build tree
52260# simply because there is no reason against having it here, and in addition,
52261# creating and moving files from /tmp can sometimes cause problems.
52262# Hook for its removal unless debugging.
52263# Note that there is a small window in which the directory will not be cleaned:
52264# after its creation but before its name has been assigned to `$tmp'.
52265$debug ||
52266{
52267  tmp= ac_tmp=
52268  trap 'exit_status=$?
52269  : "${ac_tmp:=$tmp}"
52270  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52271' 0
52272  trap 'as_fn_exit 1' 1 2 13 15
52273}
52274# Create a (secure) tmp directory for tmp files.
52275
52276{
52277  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52278  test -d "$tmp"
52279}  ||
52280{
52281  tmp=./conf$$-$RANDOM
52282  (umask 077 && mkdir "$tmp")
52283} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52284ac_tmp=$tmp
52285
52286# Set up the scripts for CONFIG_FILES section.
52287# No need to generate them if there are no CONFIG_FILES.
52288# This happens for instance with `./config.status config.h'.
52289if test -n "$CONFIG_FILES"; then
52290
52291
52292ac_cr=`echo X | tr X '\015'`
52293# On cygwin, bash can eat \r inside `` if the user requested igncr.
52294# But we know of no other shell where ac_cr would be empty at this
52295# point, so we can use a bashism as a fallback.
52296if test "x$ac_cr" = x; then
52297  eval ac_cr=\$\'\\r\'
52298fi
52299ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52300if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52301  ac_cs_awk_cr='\\r'
52302else
52303  ac_cs_awk_cr=$ac_cr
52304fi
52305
52306echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52307_ACEOF
52308
52309
52310{
52311  echo "cat >conf$$subs.awk <<_ACEOF" &&
52312  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52313  echo "_ACEOF"
52314} >conf$$subs.sh ||
52315  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52316ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52317ac_delim='%!_!# '
52318for ac_last_try in false false false false false :; do
52319  . ./conf$$subs.sh ||
52320    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52321
52322  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52323  if test $ac_delim_n = $ac_delim_num; then
52324    break
52325  elif $ac_last_try; then
52326    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52327  else
52328    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52329  fi
52330done
52331rm -f conf$$subs.sh
52332
52333cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52334cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52335_ACEOF
52336sed -n '
52337h
52338s/^/S["/; s/!.*/"]=/
52339p
52340g
52341s/^[^!]*!//
52342:repl
52343t repl
52344s/'"$ac_delim"'$//
52345t delim
52346:nl
52347h
52348s/\(.\{148\}\)..*/\1/
52349t more1
52350s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52351p
52352n
52353b repl
52354:more1
52355s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52356p
52357g
52358s/.\{148\}//
52359t nl
52360:delim
52361h
52362s/\(.\{148\}\)..*/\1/
52363t more2
52364s/["\\]/\\&/g; s/^/"/; s/$/"/
52365p
52366b
52367:more2
52368s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52369p
52370g
52371s/.\{148\}//
52372t delim
52373' <conf$$subs.awk | sed '
52374/^[^""]/{
52375  N
52376  s/\n//
52377}
52378' >>$CONFIG_STATUS || ac_write_fail=1
52379rm -f conf$$subs.awk
52380cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52381_ACAWK
52382cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52383  for (key in S) S_is_set[key] = 1
52384  FS = ""
52385
52386}
52387{
52388  line = $ 0
52389  nfields = split(line, field, "@")
52390  substed = 0
52391  len = length(field[1])
52392  for (i = 2; i < nfields; i++) {
52393    key = field[i]
52394    keylen = length(key)
52395    if (S_is_set[key]) {
52396      value = S[key]
52397      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52398      len += length(value) + length(field[++i])
52399      substed = 1
52400    } else
52401      len += 1 + keylen
52402  }
52403
52404  print line
52405}
52406
52407_ACAWK
52408_ACEOF
52409cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52410if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52411  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52412else
52413  cat
52414fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52415  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52416_ACEOF
52417
52418# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52419# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52420# trailing colons and then remove the whole line if VPATH becomes empty
52421# (actually we leave an empty line to preserve line numbers).
52422if test "x$srcdir" = x.; then
52423  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52424h
52425s///
52426s/^/:/
52427s/[	 ]*$/:/
52428s/:\$(srcdir):/:/g
52429s/:\${srcdir}:/:/g
52430s/:@srcdir@:/:/g
52431s/^:*//
52432s/:*$//
52433x
52434s/\(=[	 ]*\).*/\1/
52435G
52436s/\n//
52437s/^[^=]*=[	 ]*$//
52438}'
52439fi
52440
52441cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52442fi # test -n "$CONFIG_FILES"
52443
52444
52445eval set X "  :F $CONFIG_FILES      "
52446shift
52447for ac_tag
52448do
52449  case $ac_tag in
52450  :[FHLC]) ac_mode=$ac_tag; continue;;
52451  esac
52452  case $ac_mode$ac_tag in
52453  :[FHL]*:*);;
52454  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52455  :[FH]-) ac_tag=-:-;;
52456  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52457  esac
52458  ac_save_IFS=$IFS
52459  IFS=:
52460  set x $ac_tag
52461  IFS=$ac_save_IFS
52462  shift
52463  ac_file=$1
52464  shift
52465
52466  case $ac_mode in
52467  :L) ac_source=$1;;
52468  :[FH])
52469    ac_file_inputs=
52470    for ac_f
52471    do
52472      case $ac_f in
52473      -) ac_f="$ac_tmp/stdin";;
52474      *) # Look for the file first in the build tree, then in the source tree
52475	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52476	 # because $ac_f cannot contain `:'.
52477	 test -f "$ac_f" ||
52478	   case $ac_f in
52479	   [\\/$]*) false;;
52480	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52481	   esac ||
52482	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52483      esac
52484      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52485      as_fn_append ac_file_inputs " '$ac_f'"
52486    done
52487
52488    # Let's still pretend it is `configure' which instantiates (i.e., don't
52489    # use $as_me), people would be surprised to read:
52490    #    /* config.h.  Generated by config.status.  */
52491    configure_input='Generated from '`
52492	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52493	`' by configure.'
52494    if test x"$ac_file" != x-; then
52495      configure_input="$ac_file.  $configure_input"
52496      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52497$as_echo "$as_me: creating $ac_file" >&6;}
52498    fi
52499    # Neutralize special characters interpreted by sed in replacement strings.
52500    case $configure_input in #(
52501    *\&* | *\|* | *\\* )
52502       ac_sed_conf_input=`$as_echo "$configure_input" |
52503       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52504    *) ac_sed_conf_input=$configure_input;;
52505    esac
52506
52507    case $ac_tag in
52508    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52509      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52510    esac
52511    ;;
52512  esac
52513
52514  ac_dir=`$as_dirname -- "$ac_file" ||
52515$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52516	 X"$ac_file" : 'X\(//\)[^/]' \| \
52517	 X"$ac_file" : 'X\(//\)$' \| \
52518	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52519$as_echo X"$ac_file" |
52520    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52521	    s//\1/
52522	    q
52523	  }
52524	  /^X\(\/\/\)[^/].*/{
52525	    s//\1/
52526	    q
52527	  }
52528	  /^X\(\/\/\)$/{
52529	    s//\1/
52530	    q
52531	  }
52532	  /^X\(\/\).*/{
52533	    s//\1/
52534	    q
52535	  }
52536	  s/.*/./; q'`
52537  as_dir="$ac_dir"; as_fn_mkdir_p
52538  ac_builddir=.
52539
52540case "$ac_dir" in
52541.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52542*)
52543  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52544  # A ".." for each directory in $ac_dir_suffix.
52545  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52546  case $ac_top_builddir_sub in
52547  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52548  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52549  esac ;;
52550esac
52551ac_abs_top_builddir=$ac_pwd
52552ac_abs_builddir=$ac_pwd$ac_dir_suffix
52553# for backward compatibility:
52554ac_top_builddir=$ac_top_build_prefix
52555
52556case $srcdir in
52557  .)  # We are building in place.
52558    ac_srcdir=.
52559    ac_top_srcdir=$ac_top_builddir_sub
52560    ac_abs_top_srcdir=$ac_pwd ;;
52561  [\\/]* | ?:[\\/]* )  # Absolute name.
52562    ac_srcdir=$srcdir$ac_dir_suffix;
52563    ac_top_srcdir=$srcdir
52564    ac_abs_top_srcdir=$srcdir ;;
52565  *) # Relative name.
52566    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52567    ac_top_srcdir=$ac_top_build_prefix$srcdir
52568    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52569esac
52570ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52571
52572
52573  case $ac_mode in
52574  :F)
52575  #
52576  # CONFIG_FILE
52577  #
52578
52579_ACEOF
52580
52581cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52582# If the template does not know about datarootdir, expand it.
52583# FIXME: This hack should be removed a few years after 2.60.
52584ac_datarootdir_hack=; ac_datarootdir_seen=
52585ac_sed_dataroot='
52586/datarootdir/ {
52587  p
52588  q
52589}
52590/@datadir@/p
52591/@docdir@/p
52592/@infodir@/p
52593/@localedir@/p
52594/@mandir@/p'
52595case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52596*datarootdir*) ac_datarootdir_seen=yes;;
52597*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52598  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52599$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52600_ACEOF
52601cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52602  ac_datarootdir_hack='
52603  s&@datadir@&$datadir&g
52604  s&@docdir@&$docdir&g
52605  s&@infodir@&$infodir&g
52606  s&@localedir@&$localedir&g
52607  s&@mandir@&$mandir&g
52608  s&\\\${datarootdir}&$datarootdir&g' ;;
52609esac
52610_ACEOF
52611
52612# Neutralize VPATH when `$srcdir' = `.'.
52613# Shell code in configure.ac might set extrasub.
52614# FIXME: do we really want to maintain this feature?
52615cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52616ac_sed_extra="$ac_vpsub
52617$extrasub
52618_ACEOF
52619cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52620:t
52621/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52622s|@configure_input@|$ac_sed_conf_input|;t t
52623s&@top_builddir@&$ac_top_builddir_sub&;t t
52624s&@top_build_prefix@&$ac_top_build_prefix&;t t
52625s&@srcdir@&$ac_srcdir&;t t
52626s&@abs_srcdir@&$ac_abs_srcdir&;t t
52627s&@top_srcdir@&$ac_top_srcdir&;t t
52628s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52629s&@builddir@&$ac_builddir&;t t
52630s&@abs_builddir@&$ac_abs_builddir&;t t
52631s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52632$ac_datarootdir_hack
52633"
52634eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52635  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52636
52637test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52638  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52639  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52640      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52641  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52642which seems to be undefined.  Please make sure it is defined" >&5
52643$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52644which seems to be undefined.  Please make sure it is defined" >&2;}
52645
52646  rm -f "$ac_tmp/stdin"
52647  case $ac_file in
52648  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52649  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52650  esac \
52651  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52652 ;;
52653
52654
52655
52656  esac
52657
52658done # for ac_tag
52659
52660
52661as_fn_exit 0
52662_ACEOF
52663ac_clean_files=$ac_clean_files_save
52664
52665test $ac_write_fail = 0 ||
52666  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52667
52668
52669# configure is writing to config.log, and then calls config.status.
52670# config.status does its own redirection, appending to config.log.
52671# Unfortunately, on DOS this fails, as config.log is still kept open
52672# by configure, so config.status won't be able to write to it; its
52673# output is simply discarded.  So we exec the FD to /dev/null,
52674# effectively closing config.log, so it can be properly (re)opened and
52675# appended to by config.status.  When coming back to configure, we
52676# need to make the FD available again.
52677if test "$no_create" != yes; then
52678  ac_cs_success=:
52679  ac_config_status_args=
52680  test "$silent" = yes &&
52681    ac_config_status_args="$ac_config_status_args --quiet"
52682  exec 5>/dev/null
52683  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52684  exec 5>>config.log
52685  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52686  # would make configure fail if this is the last instruction.
52687  $ac_cs_success || as_fn_exit 1
52688fi
52689if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52690  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52691$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52692fi
52693
52694
52695# Try to move the config.log file to the output directory.
52696if test -e ./config.log; then
52697  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52698fi
52699
52700# Make the compare script executable
52701$CHMOD +x $OUTPUT_ROOT/compare.sh
52702
52703# Finally output some useful information to the user
52704
52705  # Finally output some useful information to the user
52706
52707  printf "\n"
52708  printf "====================================================\n"
52709  if test "x$no_create" != "xyes"; then
52710    if test "x$IS_RECONFIGURE" != "xyes"; then
52711      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52712    else
52713      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52714    fi
52715  else
52716    if test "x$IS_RECONFIGURE" != "xyes"; then
52717      printf "A configuration has been successfully checked but not created\n"
52718    else
52719      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52720    fi
52721  fi
52722  if test "x$CONFIGURE_COMMAND_LINE" != x; then
52723    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
52724  else
52725    printf "using default settings.\n"
52726  fi
52727
52728  printf "\n"
52729  printf "Configuration summary:\n"
52730  printf "* Debug level:    $DEBUG_LEVEL\n"
52731  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
52732  printf "* JDK variant:    $JDK_VARIANT\n"
52733  printf "* JVM variants:   $with_jvm_variants\n"
52734  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
52735
52736  printf "\n"
52737  printf "Tools summary:\n"
52738  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
52739    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
52740  fi
52741  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
52742  if test "x$TOOLCHAIN_VERSION" != "x"; then
52743    print_version=" $TOOLCHAIN_VERSION"
52744  fi
52745  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
52746  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
52747  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
52748
52749  printf "\n"
52750  printf "Build performance summary:\n"
52751  printf "* Cores to use:   $JOBS\n"
52752  printf "* Memory limit:   $MEMORY_SIZE MB\n"
52753  if test "x$CCACHE_STATUS" != "x"; then
52754    printf "* ccache status:  $CCACHE_STATUS\n"
52755  fi
52756  printf "\n"
52757
52758  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
52759    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
52760    printf "will result in longer build times.\n"
52761    printf "\n"
52762  fi
52763
52764  if test "x$FOUND_ALT_VARIABLES" != "x"; then
52765    printf "WARNING: You have old-style ALT_ environment variables set.\n"
52766    printf "These are not respected, and will be ignored. It is recommended\n"
52767    printf "that you clean your environment. The following variables are set:\n"
52768    printf "$FOUND_ALT_VARIABLES\n"
52769    printf "\n"
52770  fi
52771
52772  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
52773    printf "WARNING: Your build output directory is not on a local disk.\n"
52774    printf "This will severely degrade build performance!\n"
52775    printf "It is recommended that you create an output directory on a local disk,\n"
52776    printf "and run the configure script again from that directory.\n"
52777    printf "\n"
52778  fi
52779
52780  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
52781    printf "WARNING: The result of this configuration has overridden an older\n"
52782    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
52783    printf "proper build. Failure to do so might result in strange build problems.\n"
52784    printf "\n"
52785  fi
52786
52787  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
52788    printf "WARNING: The result of this configuration was not saved.\n"
52789    printf "You should run without '--no-create | -n' to create the configuration.\n"
52790    printf "\n"
52791  fi
52792
52793
52794
52795if test -e "$OUTPUT_ROOT/config.log"; then
52796  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
52797  if test $? -eq 0; then
52798    printf "The following warnings were produced. Repeated here for convenience:\n"
52799    # We must quote sed expression (using []) to stop m4 from eating the [].
52800    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
52801    printf "\n"
52802  fi
52803fi
52804
52805
52806