generated-configure.sh revision 1651:6849581ba4ab
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA_FLAGS
637SJAVAC_SERVER_JAVA
638JAVA_TOOL_FLAGS_SMALL
639JAVA_FLAGS_SMALL
640JAVA_FLAGS_BIG
641JAVA_FLAGS
642JOBS
643MEMORY_SIZE
644NUM_CORES
645ENABLE_INTREE_EC
646SALIB_NAME
647HOTSPOT_MAKE_ARGS
648MSVCP_DLL
649MSVCR_DLL
650LIBCXX
651LLVM_LIBS
652LLVM_LDFLAGS
653LLVM_CFLAGS
654LLVM_CONFIG
655LIBFFI_LIBS
656LIBFFI_CFLAGS
657STATIC_CXX_SETTING
658LIBDL
659LIBM
660LIBZIP_CAN_USE_MMAP
661USE_EXTERNAL_LIBZ
662USE_EXTERNAL_LIBPNG
663PNG_LIBS
664PNG_CFLAGS
665USE_EXTERNAL_LCMS
666LCMS_LIBS
667LCMS_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670ALSA_LIBS
671ALSA_CFLAGS
672FREETYPE_BUNDLE_LIB_PATH
673FREETYPE_LIBS
674FREETYPE_CFLAGS
675CUPS_CFLAGS
676X_EXTRA_LIBS
677X_LIBS
678X_PRE_LIBS
679X_CFLAGS
680XMKMF
681FIXPATH
682GCOV_ENABLED
683ZIP_DEBUGINFO_FILES
684ENABLE_DEBUG_SYMBOLS
685CFLAGS_WARNINGS_ARE_ERRORS
686DISABLE_WARNING_PREFIX
687WARNINGS_AS_ERRORS
688COMPILER_SUPPORTS_TARGET_BITS_FLAG
689ZERO_ARCHFLAG
690LDFLAGS_TESTEXE_SUFFIX
691LDFLAGS_TESTLIB_SUFFIX
692LDFLAGS_TESTEXE
693LDFLAGS_TESTLIB
694LDFLAGS_CXX_JDK
695LDFLAGS_JDKEXE_SUFFIX
696LDFLAGS_JDKLIB_SUFFIX
697LDFLAGS_JDKEXE
698LDFLAGS_JDKLIB
699CXXFLAGS_TESTEXE
700CXXFLAGS_TESTLIB
701CFLAGS_TESTEXE
702CFLAGS_TESTLIB
703CXXFLAGS_JDKEXE
704CXXFLAGS_JDKLIB
705CFLAGS_JDKEXE
706CFLAGS_JDKLIB
707MACOSX_VERSION_MIN
708LEGACY_EXTRA_LDFLAGS
709LEGACY_EXTRA_CXXFLAGS
710LEGACY_EXTRA_CFLAGS
711CXX_O_FLAG_NONE
712CXX_O_FLAG_DEBUG
713CXX_O_FLAG_NORM
714CXX_O_FLAG_HI
715CXX_O_FLAG_HIGHEST
716C_O_FLAG_NONE
717C_O_FLAG_DEBUG
718C_O_FLAG_NORM
719C_O_FLAG_HI
720C_O_FLAG_HIGHEST
721CXXFLAGS_DEBUG_SYMBOLS
722CFLAGS_DEBUG_SYMBOLS
723CXX_FLAG_DEPS
724C_FLAG_DEPS
725SET_SHARED_LIBRARY_MAPFILE
726SET_SHARED_LIBRARY_NAME
727SET_SHARED_LIBRARY_ORIGIN
728SET_EXECUTABLE_ORIGIN
729CXX_FLAG_REORDER
730C_FLAG_REORDER
731SYSROOT_LDFLAGS
732SYSROOT_CFLAGS
733RC_FLAGS
734AR_OUT_OPTION
735LD_OUT_OPTION
736EXE_OUT_OPTION
737CC_OUT_OPTION
738POST_STRIP_CMD
739ARFLAGS
740COMPILER_TARGET_BITS_FLAG
741JT_HOME
742JTREGEXE
743USING_BROKEN_SUSE_LD
744PACKAGE_PATH
745USE_CLANG
746HOTSPOT_LD
747HOTSPOT_CXX
748HOTSPOT_RC
749HOTSPOT_MT
750BUILD_LD
751BUILD_CXX
752BUILD_CC
753ac_ct_OBJDUMP
754OBJDUMP
755ac_ct_OBJCOPY
756OBJCOPY
757ac_ct_NM
758ac_ct_STRIP
759GNM
760NM
761STRIP
762MSBUILD
763DUMPBIN
764RC
765MT
766LIPO
767ac_ct_AR
768AR
769AS
770LDCXX
771LD
772CXXCPP
773CPP
774ac_ct_CXX
775CXXFLAGS
776CXX
777ac_ct_PROPER_COMPILER_CXX
778PROPER_COMPILER_CXX
779TOOLCHAIN_PATH_CXX
780POTENTIAL_CXX
781OBJEXT
782EXEEXT
783ac_ct_CC
784CPPFLAGS
785LDFLAGS
786CFLAGS
787CC
788ac_ct_PROPER_COMPILER_CC
789PROPER_COMPILER_CC
790TOOLCHAIN_PATH_CC
791POTENTIAL_CC
792VS_LIB
793VS_INCLUDE
794VS_PATH
795CYGWIN_LINK
796EXE_SUFFIX
797OBJ_SUFFIX
798STATIC_LIBRARY
799SHARED_LIBRARY
800STATIC_LIBRARY_SUFFIX
801SHARED_LIBRARY_SUFFIX
802LIBRARY_PREFIX
803TOOLCHAIN_TYPE
804BUILD_HOTSPOT
805HOTSPOT_DIST
806BUILD_OUTPUT
807OVERRIDE_SRC_ROOT
808ADD_SRC_ROOT
809JDK_TOPDIR
810NASHORN_TOPDIR
811HOTSPOT_TOPDIR
812JAXWS_TOPDIR
813JAXP_TOPDIR
814CORBA_TOPDIR
815LANGTOOLS_TOPDIR
816JAVAC_FLAGS
817BOOT_JDK_SOURCETARGET
818JARSIGNER
819JAR
820JAVAH
821JAVAC
822JAVA
823BOOT_JDK
824JAVA_CHECK
825JAVAC_CHECK
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
844UNLIMITED_CRYPTO
845CACERTS_FILE
846TEST_IN_BUILD
847BUILD_HEADLESS
848SUPPORT_HEADFUL
849SUPPORT_HEADLESS
850BDEPS_FTP
851BDEPS_UNZIP
852OS_VERSION_MICRO
853OS_VERSION_MINOR
854OS_VERSION_MAJOR
855PKG_CONFIG
856BASH_ARGS
857SETFILE
858CODESIGN
859XATTR
860DSYMUTIL
861IS_GNU_TIME
862PATCH
863TIME
864STAT
865HG
866READELF
867OTOOL
868LDD
869ZIP
870UNZIP
871FIND_DELETE
872OUTPUT_SYNC
873OUTPUT_SYNC_SUPPORTED
874MAKE
875CHECK_TOOLSDIR_MAKE
876CHECK_TOOLSDIR_GMAKE
877CHECK_MAKE
878CHECK_GMAKE
879PKGHANDLER
880CONFIGURESUPPORT_OUTPUTDIR
881OUTPUT_ROOT
882CONF_NAME
883SPEC
884SDKROOT
885XCODEBUILD
886BUILD_VARIANT_RELEASE
887DEBUG_CLASSFILES
888FASTDEBUG
889VARIANT
890DEBUG_LEVEL
891MACOSX_UNIVERSAL
892INCLUDE_SA
893JVM_VARIANT_CORE
894JVM_VARIANT_ZEROSHARK
895JVM_VARIANT_ZERO
896JVM_VARIANT_KERNEL
897JVM_VARIANT_MINIMAL1
898JVM_VARIANT_CLIENT
899JVM_VARIANT_SERVER
900JVM_VARIANTS
901JVM_INTERPRETER
902JDK_VARIANT
903SET_OPENJDK
904CANONICAL_TOPDIR
905ORIGINAL_TOPDIR
906TOPDIR
907PATH_SEP
908ZERO_ARCHDEF
909DEFINE_CROSS_COMPILE_ARCH
910LP64
911OPENJDK_TARGET_OS_EXPORT_DIR
912OPENJDK_TARGET_CPU_JLI_CFLAGS
913OPENJDK_TARGET_CPU_OSARCH
914OPENJDK_TARGET_CPU_ISADIR
915OPENJDK_TARGET_CPU_LIBDIR
916OPENJDK_TARGET_CPU_LEGACY_LIB
917OPENJDK_TARGET_CPU_LEGACY
918REQUIRED_OS_VERSION
919REQUIRED_OS_NAME
920COMPILE_TYPE
921OPENJDK_TARGET_CPU_ENDIAN
922OPENJDK_TARGET_CPU_BITS
923OPENJDK_TARGET_CPU_ARCH
924OPENJDK_TARGET_CPU
925OPENJDK_TARGET_OS_ENV
926OPENJDK_TARGET_OS_TYPE
927OPENJDK_TARGET_OS
928OPENJDK_BUILD_CPU_ENDIAN
929OPENJDK_BUILD_CPU_BITS
930OPENJDK_BUILD_CPU_ARCH
931OPENJDK_BUILD_CPU
932OPENJDK_BUILD_OS_ENV
933OPENJDK_BUILD_OS_TYPE
934OPENJDK_BUILD_OS
935OPENJDK_BUILD_AUTOCONF_NAME
936OPENJDK_TARGET_AUTOCONF_NAME
937target_os
938target_vendor
939target_cpu
940target
941host_os
942host_vendor
943host_cpu
944host
945build_os
946build_vendor
947build_cpu
948build
949CPIO
950DF
951READLINK
952CYGPATH
953SED
954FGREP
955EGREP
956GREP
957AWK
958XARGS
959WHICH
960WC
961UNIQ
962UNAME
963TR
964TOUCH
965TEE
966TAR
967TAIL
968SORT
969SH
970RM
971PRINTF
972NAWK
973MV
974MKTEMP
975MKDIR
976LS
977LN
978HEAD
979FIND
980FILE
981EXPR
982ECHO
983DIRNAME
984DIFF
985DATE
986CUT
987CP
988COMM
989CMP
990CHMOD
991CAT
992BASH
993BASENAME
994DATE_WHEN_CONFIGURED
995ORIGINAL_PATH
996CONFIGURE_COMMAND_LINE
997target_alias
998host_alias
999build_alias
1000LIBS
1001ECHO_T
1002ECHO_N
1003ECHO_C
1004DEFS
1005mandir
1006localedir
1007libdir
1008psdir
1009pdfdir
1010dvidir
1011htmldir
1012infodir
1013docdir
1014oldincludedir
1015includedir
1016localstatedir
1017sharedstatedir
1018sysconfdir
1019datadir
1020datarootdir
1021libexecdir
1022sbindir
1023bindir
1024program_transform_name
1025prefix
1026exec_prefix
1027PACKAGE_URL
1028PACKAGE_BUGREPORT
1029PACKAGE_STRING
1030PACKAGE_VERSION
1031PACKAGE_TARNAME
1032PACKAGE_NAME
1033PATH_SEPARATOR
1034SHELL'
1035ac_subst_files=''
1036ac_user_opts='
1037enable_option_checking
1038with_target_bits
1039enable_openjdk_only
1040with_custom_make_dir
1041with_jdk_variant
1042with_jvm_interpreter
1043with_jvm_variants
1044enable_debug
1045with_debug_level
1046with_devkit
1047with_sys_root
1048with_sysroot
1049with_tools_dir
1050with_toolchain_path
1051with_extra_path
1052with_sdk_name
1053with_conf_name
1054with_output_sync
1055with_builddeps_conf
1056with_builddeps_server
1057with_builddeps_dir
1058with_builddeps_group
1059enable_headful
1060enable_hotspot_test_in_build
1061with_cacerts_file
1062enable_unlimited_crypto
1063with_milestone
1064with_update_version
1065with_user_release_suffix
1066with_build_number
1067with_copyright_year
1068with_boot_jdk
1069with_add_source_root
1070with_override_source_root
1071with_adds_and_overrides
1072with_override_langtools
1073with_override_corba
1074with_override_jaxp
1075with_override_jaxws
1076with_override_hotspot
1077with_override_nashorn
1078with_override_jdk
1079with_import_hotspot
1080with_toolchain_type
1081with_toolchain_version
1082with_jtreg
1083with_extra_cflags
1084with_extra_cxxflags
1085with_extra_ldflags
1086enable_warnings_as_errors
1087enable_debug_symbols
1088enable_zip_debug_info
1089enable_native_coverage
1090with_x
1091with_cups
1092with_cups_include
1093with_freetype
1094with_freetype_include
1095with_freetype_lib
1096with_freetype_src
1097enable_freetype_bundling
1098with_alsa
1099with_alsa_include
1100with_alsa_lib
1101with_libjpeg
1102with_giflib
1103with_lcms
1104with_libpng
1105with_zlib
1106with_stdc__lib
1107with_msvcr_dll
1108with_msvcp_dll
1109with_dxsdk
1110with_dxsdk_lib
1111with_dxsdk_include
1112with_num_cores
1113with_memory_size
1114with_jobs
1115with_boot_jdk_jvmargs
1116with_sjavac_server_java
1117enable_sjavac
1118enable_precompiled_headers
1119enable_ccache
1120with_ccache_dir
1121'
1122      ac_precious_vars='build_alias
1123host_alias
1124target_alias
1125BASENAME
1126BASH
1127CAT
1128CHMOD
1129CMP
1130COMM
1131CP
1132CUT
1133DATE
1134DIFF
1135DIRNAME
1136ECHO
1137EXPR
1138FILE
1139FIND
1140HEAD
1141LN
1142LS
1143MKDIR
1144MKTEMP
1145MV
1146NAWK
1147PRINTF
1148RM
1149SH
1150SORT
1151TAIL
1152TAR
1153TEE
1154TOUCH
1155TR
1156UNAME
1157UNIQ
1158WC
1159WHICH
1160XARGS
1161AWK
1162GREP
1163EGREP
1164FGREP
1165SED
1166CYGPATH
1167READLINK
1168DF
1169CPIO
1170UNZIP
1171ZIP
1172LDD
1173OTOOL
1174READELF
1175HG
1176STAT
1177TIME
1178PATCH
1179DSYMUTIL
1180XATTR
1181CODESIGN
1182SETFILE
1183PKG_CONFIG
1184JAVA
1185JAVAC
1186JAVAH
1187JAR
1188JARSIGNER
1189CC
1190CFLAGS
1191LDFLAGS
1192LIBS
1193CPPFLAGS
1194CXX
1195CXXFLAGS
1196CCC
1197CPP
1198CXXCPP
1199AS
1200AR
1201LIPO
1202STRIP
1203NM
1204GNM
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  --disable-warnings-as-errors
1852                          do not consider native warnings to be an error
1853                          [enabled]
1854  --disable-debug-symbols disable generation of debug symbols [enabled]
1855  --disable-zip-debug-info
1856                          disable zipping of debug-info files [enabled]
1857  --enable-native-coverage
1858                          enable native compilation with code coverage
1859                          data[disabled]
1860  --disable-freetype-bundling
1861                          disable bundling of the freetype library with the
1862                          build result [enabled on Windows or when using
1863                          --with-freetype, disabled otherwise]
1864  --enable-sjavac         use sjavac to do fast incremental compiles
1865                          [disabled]
1866  --disable-precompiled-headers
1867                          disable using precompiled headers when compiling C++
1868                          [enabled]
1869  --enable-ccache         enable using ccache to speed up recompilations
1870                          [disabled]
1871
1872Optional Packages:
1873  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1874  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1875  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1876                          support it), e.g. --with-target-bits=32 [guessed]
1877  --with-custom-make-dir  Deprecated. Option is kept for backwards
1878                          compatibility and is ignored
1879  --with-jdk-variant      JDK variant to build (normal) [normal]
1880  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1881  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1882                          client, minimal1, kernel, zero, zeroshark, core)
1883                          [server]
1884  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1885                          optimized (HotSpot build only)) [release]
1886  --with-devkit           use this devkit for compilers, tools and resources
1887  --with-sys-root         alias for --with-sysroot for backwards compatability
1888  --with-sysroot          use this directory as sysroot
1889  --with-tools-dir        alias for --with-toolchain-path for backwards
1890                          compatibility
1891  --with-toolchain-path   prepend these directories when searching for
1892                          toolchain binaries (compilers etc)
1893  --with-extra-path       prepend these directories to the default path
1894  --with-sdk-name         use the platform SDK of the given name. [macosx]
1895  --with-conf-name        use this as the name of the configuration [generated
1896                          from important configuration options]
1897  --with-output-sync      set make output sync type if supported by make.
1898                          [recurse]
1899  --with-builddeps-conf   use this configuration file for the builddeps
1900  --with-builddeps-server download and use build dependencies from this server
1901                          url
1902  --with-builddeps-dir    store downloaded build dependencies here
1903                          [/localhome/builddeps]
1904  --with-builddeps-group  chgrp the downloaded build dependencies to this
1905                          group
1906  --with-cacerts-file     specify alternative cacerts file
1907  --with-milestone        Set milestone value for build [internal]
1908  --with-update-version   Set update version value for build [b00]
1909  --with-user-release-suffix
1910                          Add a custom string to the version string if build
1911                          number is not set.[username_builddateb00]
1912  --with-build-number     Set build number value for build [b00]
1913  --with-copyright-year   Set copyright year value for build [current year]
1914  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1915  --with-add-source-root  for each and every source directory, look in this
1916                          additional source root for the same directory; if it
1917                          exists and have files in it, include it in the build
1918  --with-override-source-root
1919                          for each and every source directory, look in this
1920                          override source root for the same directory; if it
1921                          exists, use that directory instead and ignore the
1922                          directory in the original source root
1923  --with-adds-and-overrides
1924                          use the subdirs 'adds' and 'overrides' in the
1925                          specified directory as add-source-root and
1926                          override-source-root
1927  --with-override-langtools
1928                          use this langtools dir for the build
1929  --with-override-corba   use this corba dir for the build
1930  --with-override-jaxp    use this jaxp dir for the build
1931  --with-override-jaxws   use this jaxws dir for the build
1932  --with-override-hotspot use this hotspot dir for the build
1933  --with-override-nashorn use this nashorn dir for the build
1934  --with-override-jdk     use this jdk dir for the build
1935  --with-import-hotspot   import hotspot binaries from this jdk image or
1936                          hotspot build dist dir instead of building from
1937                          source
1938  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1939                          to show possible values [platform dependent]
1940  --with-toolchain-version
1941                          the version of the toolchain to look for, use
1942                          '--help' to show possible values [platform
1943                          dependent]
1944  --with-jtreg            Regression Test Harness [probed]
1945  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1946  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1947  --with-extra-ldflags    extra flags to be used when linking jdk
1948  --with-x                use the X Window System
1949  --with-cups             specify prefix directory for the cups package
1950                          (expecting the headers under PATH/include)
1951  --with-cups-include     specify directory for the cups include files
1952  --with-freetype         specify prefix directory for the freetype package
1953                          (expecting the libraries under PATH/lib and the
1954                          headers under PATH/include)
1955  --with-freetype-include specify directory for the freetype include files
1956  --with-freetype-lib     specify directory for the freetype library
1957  --with-freetype-src     specify directory with freetype sources to
1958                          automatically build the library (experimental,
1959                          Windows-only)
1960  --with-alsa             specify prefix directory for the alsa package
1961                          (expecting the libraries under PATH/lib and the
1962                          headers under PATH/include)
1963  --with-alsa-include     specify directory for the alsa include files
1964  --with-alsa-lib         specify directory for the alsa library
1965  --with-libjpeg          use libjpeg from build system or OpenJDK source
1966                          (system, bundled) [bundled]
1967  --with-giflib           use giflib from build system or OpenJDK source
1968                          (system, bundled) [bundled]
1969  --with-lcms             use lcms2 from build system or OpenJDK source
1970                          (system, bundled) [bundled]
1971  --with-libpng           use libpng from build system or OpenJDK source
1972                          (system, bundled) [bundled]
1973  --with-zlib             use zlib from build system or OpenJDK source
1974                          (system, bundled) [bundled]
1975  --with-stdc++lib=<static>,<dynamic>,<default>
1976                          force linking of the C++ runtime on Linux to either
1977                          static or dynamic, default is static with dynamic as
1978                          fallback
1979  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1980                          (Windows only) [probed]
1981  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1982                          (Windows only) [probed]
1983  --with-dxsdk            Deprecated. Option is kept for backwards
1984                          compatibility and is ignored
1985  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1986                          compatibility and is ignored
1987  --with-dxsdk-include    Deprecated. Option is kept for backwards
1988                          compatibility and is ignored
1989  --with-num-cores        number of cores in the build system, e.g.
1990                          --with-num-cores=8 [probed]
1991  --with-memory-size      memory (in MB) available in the build system, e.g.
1992                          --with-memory-size=1024 [probed]
1993  --with-jobs             number of parallel jobs to let make run [calculated
1994                          based on cores and memory]
1995  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1996                          invocations of boot JDK, overriding the default
1997                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1998                          -enableassertions"
1999  --with-sjavac-server-java
2000                          use this java binary for running the sjavac
2001                          background server [Boot JDK java]
2002  --with-ccache-dir       where to store ccache files [~/.ccache]
2003
2004Some influential environment variables:
2005  BASENAME    Override default value for BASENAME
2006  BASH        Override default value for BASH
2007  CAT         Override default value for CAT
2008  CHMOD       Override default value for CHMOD
2009  CMP         Override default value for CMP
2010  COMM        Override default value for COMM
2011  CP          Override default value for CP
2012  CUT         Override default value for CUT
2013  DATE        Override default value for DATE
2014  DIFF        Override default value for DIFF
2015  DIRNAME     Override default value for DIRNAME
2016  ECHO        Override default value for ECHO
2017  EXPR        Override default value for EXPR
2018  FILE        Override default value for FILE
2019  FIND        Override default value for FIND
2020  HEAD        Override default value for HEAD
2021  LN          Override default value for LN
2022  LS          Override default value for LS
2023  MKDIR       Override default value for MKDIR
2024  MKTEMP      Override default value for MKTEMP
2025  MV          Override default value for MV
2026  NAWK        Override default value for NAWK
2027  PRINTF      Override default value for PRINTF
2028  RM          Override default value for RM
2029  SH          Override default value for SH
2030  SORT        Override default value for SORT
2031  TAIL        Override default value for TAIL
2032  TAR         Override default value for TAR
2033  TEE         Override default value for TEE
2034  TOUCH       Override default value for TOUCH
2035  TR          Override default value for TR
2036  UNAME       Override default value for UNAME
2037  UNIQ        Override default value for UNIQ
2038  WC          Override default value for WC
2039  WHICH       Override default value for WHICH
2040  XARGS       Override default value for XARGS
2041  AWK         Override default value for AWK
2042  GREP        Override default value for GREP
2043  EGREP       Override default value for EGREP
2044  FGREP       Override default value for FGREP
2045  SED         Override default value for SED
2046  CYGPATH     Override default value for CYGPATH
2047  READLINK    Override default value for READLINK
2048  DF          Override default value for DF
2049  CPIO        Override default value for CPIO
2050  UNZIP       Override default value for UNZIP
2051  ZIP         Override default value for ZIP
2052  LDD         Override default value for LDD
2053  OTOOL       Override default value for OTOOL
2054  READELF     Override default value for READELF
2055  HG          Override default value for HG
2056  STAT        Override default value for STAT
2057  TIME        Override default value for TIME
2058  PATCH       Override default value for PATCH
2059  DSYMUTIL    Override default value for DSYMUTIL
2060  XATTR       Override default value for XATTR
2061  CODESIGN    Override default value for CODESIGN
2062  SETFILE     Override default value for SETFILE
2063  PKG_CONFIG  path to pkg-config utility
2064  JAVA        Override default value for JAVA
2065  JAVAC       Override default value for JAVAC
2066  JAVAH       Override default value for JAVAH
2067  JAR         Override default value for JAR
2068  JARSIGNER   Override default value for JARSIGNER
2069  CC          C compiler command
2070  CFLAGS      C compiler flags
2071  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2072              nonstandard directory <lib dir>
2073  LIBS        libraries to pass to the linker, e.g. -l<library>
2074  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2075              you have headers in a nonstandard directory <include dir>
2076  CXX         C++ compiler command
2077  CXXFLAGS    C++ compiler flags
2078  CPP         C preprocessor
2079  CXXCPP      C++ preprocessor
2080  AS          Override default value for AS
2081  AR          Override default value for AR
2082  LIPO        Override default value for LIPO
2083  STRIP       Override default value for STRIP
2084  NM          Override default value for NM
2085  GNM         Override default value for GNM
2086  OBJCOPY     Override default value for OBJCOPY
2087  OBJDUMP     Override default value for OBJDUMP
2088  BUILD_CC    Override default value for BUILD_CC
2089  BUILD_CXX   Override default value for BUILD_CXX
2090  BUILD_LD    Override default value for BUILD_LD
2091  JTREGEXE    Override default value for JTREGEXE
2092  XMKMF       Path to xmkmf, Makefile generator for X Window System
2093  FREETYPE_CFLAGS
2094              C compiler flags for FREETYPE, overriding pkg-config
2095  FREETYPE_LIBS
2096              linker flags for FREETYPE, overriding pkg-config
2097  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2098  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2099  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2100  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2101  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2102  PNG_LIBS    linker flags for PNG, overriding pkg-config
2103  LIBFFI_CFLAGS
2104              C compiler flags for LIBFFI, overriding pkg-config
2105  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2106  CCACHE      Override default value for CCACHE
2107
2108Use these variables to override the choices made by `configure' or to help
2109it to find libraries and programs with nonstandard names/locations.
2110
2111Report bugs to <build-dev@openjdk.java.net>.
2112OpenJDK home page: <http://openjdk.java.net>.
2113_ACEOF
2114ac_status=$?
2115fi
2116
2117if test "$ac_init_help" = "recursive"; then
2118  # If there are subdirs, report their specific --help.
2119  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2120    test -d "$ac_dir" ||
2121      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2122      continue
2123    ac_builddir=.
2124
2125case "$ac_dir" in
2126.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2127*)
2128  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2129  # A ".." for each directory in $ac_dir_suffix.
2130  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2131  case $ac_top_builddir_sub in
2132  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2133  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2134  esac ;;
2135esac
2136ac_abs_top_builddir=$ac_pwd
2137ac_abs_builddir=$ac_pwd$ac_dir_suffix
2138# for backward compatibility:
2139ac_top_builddir=$ac_top_build_prefix
2140
2141case $srcdir in
2142  .)  # We are building in place.
2143    ac_srcdir=.
2144    ac_top_srcdir=$ac_top_builddir_sub
2145    ac_abs_top_srcdir=$ac_pwd ;;
2146  [\\/]* | ?:[\\/]* )  # Absolute name.
2147    ac_srcdir=$srcdir$ac_dir_suffix;
2148    ac_top_srcdir=$srcdir
2149    ac_abs_top_srcdir=$srcdir ;;
2150  *) # Relative name.
2151    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2152    ac_top_srcdir=$ac_top_build_prefix$srcdir
2153    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2154esac
2155ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2156
2157    cd "$ac_dir" || { ac_status=$?; continue; }
2158    # Check for guested configure.
2159    if test -f "$ac_srcdir/configure.gnu"; then
2160      echo &&
2161      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2162    elif test -f "$ac_srcdir/configure"; then
2163      echo &&
2164      $SHELL "$ac_srcdir/configure" --help=recursive
2165    else
2166      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2167    fi || ac_status=$?
2168    cd "$ac_pwd" || { ac_status=$?; break; }
2169  done
2170fi
2171
2172test -n "$ac_init_help" && exit $ac_status
2173if $ac_init_version; then
2174  cat <<\_ACEOF
2175OpenJDK configure jdk9
2176generated by GNU Autoconf 2.69
2177
2178Copyright (C) 2012 Free Software Foundation, Inc.
2179This configure script is free software; the Free Software Foundation
2180gives unlimited permission to copy, distribute and modify it.
2181_ACEOF
2182  exit
2183fi
2184
2185## ------------------------ ##
2186## Autoconf initialization. ##
2187## ------------------------ ##
2188
2189# ac_fn_c_try_compile LINENO
2190# --------------------------
2191# Try to compile conftest.$ac_ext, and return whether this succeeded.
2192ac_fn_c_try_compile ()
2193{
2194  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2195  rm -f conftest.$ac_objext
2196  if { { ac_try="$ac_compile"
2197case "(($ac_try" in
2198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2199  *) ac_try_echo=$ac_try;;
2200esac
2201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2202$as_echo "$ac_try_echo"; } >&5
2203  (eval "$ac_compile") 2>conftest.err
2204  ac_status=$?
2205  if test -s conftest.err; then
2206    grep -v '^ *+' conftest.err >conftest.er1
2207    cat conftest.er1 >&5
2208    mv -f conftest.er1 conftest.err
2209  fi
2210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2211  test $ac_status = 0; } && {
2212	 test -z "$ac_c_werror_flag" ||
2213	 test ! -s conftest.err
2214       } && test -s conftest.$ac_objext; then :
2215  ac_retval=0
2216else
2217  $as_echo "$as_me: failed program was:" >&5
2218sed 's/^/| /' conftest.$ac_ext >&5
2219
2220	ac_retval=1
2221fi
2222  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2223  as_fn_set_status $ac_retval
2224
2225} # ac_fn_c_try_compile
2226
2227# ac_fn_cxx_try_compile LINENO
2228# ----------------------------
2229# Try to compile conftest.$ac_ext, and return whether this succeeded.
2230ac_fn_cxx_try_compile ()
2231{
2232  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2233  rm -f conftest.$ac_objext
2234  if { { ac_try="$ac_compile"
2235case "(($ac_try" in
2236  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2237  *) ac_try_echo=$ac_try;;
2238esac
2239eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2240$as_echo "$ac_try_echo"; } >&5
2241  (eval "$ac_compile") 2>conftest.err
2242  ac_status=$?
2243  if test -s conftest.err; then
2244    grep -v '^ *+' conftest.err >conftest.er1
2245    cat conftest.er1 >&5
2246    mv -f conftest.er1 conftest.err
2247  fi
2248  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2249  test $ac_status = 0; } && {
2250	 test -z "$ac_cxx_werror_flag" ||
2251	 test ! -s conftest.err
2252       } && test -s conftest.$ac_objext; then :
2253  ac_retval=0
2254else
2255  $as_echo "$as_me: failed program was:" >&5
2256sed 's/^/| /' conftest.$ac_ext >&5
2257
2258	ac_retval=1
2259fi
2260  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2261  as_fn_set_status $ac_retval
2262
2263} # ac_fn_cxx_try_compile
2264
2265# ac_fn_c_try_cpp LINENO
2266# ----------------------
2267# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2268ac_fn_c_try_cpp ()
2269{
2270  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2271  if { { ac_try="$ac_cpp conftest.$ac_ext"
2272case "(($ac_try" in
2273  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2274  *) ac_try_echo=$ac_try;;
2275esac
2276eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2277$as_echo "$ac_try_echo"; } >&5
2278  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2279  ac_status=$?
2280  if test -s conftest.err; then
2281    grep -v '^ *+' conftest.err >conftest.er1
2282    cat conftest.er1 >&5
2283    mv -f conftest.er1 conftest.err
2284  fi
2285  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2286  test $ac_status = 0; } > conftest.i && {
2287	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2288	 test ! -s conftest.err
2289       }; then :
2290  ac_retval=0
2291else
2292  $as_echo "$as_me: failed program was:" >&5
2293sed 's/^/| /' conftest.$ac_ext >&5
2294
2295    ac_retval=1
2296fi
2297  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2298  as_fn_set_status $ac_retval
2299
2300} # ac_fn_c_try_cpp
2301
2302# ac_fn_cxx_try_cpp LINENO
2303# ------------------------
2304# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2305ac_fn_cxx_try_cpp ()
2306{
2307  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2308  if { { ac_try="$ac_cpp conftest.$ac_ext"
2309case "(($ac_try" in
2310  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2311  *) ac_try_echo=$ac_try;;
2312esac
2313eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2314$as_echo "$ac_try_echo"; } >&5
2315  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2316  ac_status=$?
2317  if test -s conftest.err; then
2318    grep -v '^ *+' conftest.err >conftest.er1
2319    cat conftest.er1 >&5
2320    mv -f conftest.er1 conftest.err
2321  fi
2322  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2323  test $ac_status = 0; } > conftest.i && {
2324	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2325	 test ! -s conftest.err
2326       }; then :
2327  ac_retval=0
2328else
2329  $as_echo "$as_me: failed program was:" >&5
2330sed 's/^/| /' conftest.$ac_ext >&5
2331
2332    ac_retval=1
2333fi
2334  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2335  as_fn_set_status $ac_retval
2336
2337} # ac_fn_cxx_try_cpp
2338
2339# ac_fn_c_try_link LINENO
2340# -----------------------
2341# Try to link conftest.$ac_ext, and return whether this succeeded.
2342ac_fn_c_try_link ()
2343{
2344  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2345  rm -f conftest.$ac_objext conftest$ac_exeext
2346  if { { ac_try="$ac_link"
2347case "(($ac_try" in
2348  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2349  *) ac_try_echo=$ac_try;;
2350esac
2351eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2352$as_echo "$ac_try_echo"; } >&5
2353  (eval "$ac_link") 2>conftest.err
2354  ac_status=$?
2355  if test -s conftest.err; then
2356    grep -v '^ *+' conftest.err >conftest.er1
2357    cat conftest.er1 >&5
2358    mv -f conftest.er1 conftest.err
2359  fi
2360  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2361  test $ac_status = 0; } && {
2362	 test -z "$ac_c_werror_flag" ||
2363	 test ! -s conftest.err
2364       } && test -s conftest$ac_exeext && {
2365	 test "$cross_compiling" = yes ||
2366	 test -x conftest$ac_exeext
2367       }; then :
2368  ac_retval=0
2369else
2370  $as_echo "$as_me: failed program was:" >&5
2371sed 's/^/| /' conftest.$ac_ext >&5
2372
2373	ac_retval=1
2374fi
2375  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2376  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2377  # interfere with the next link command; also delete a directory that is
2378  # left behind by Apple's compiler.  We do this before executing the actions.
2379  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2380  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2381  as_fn_set_status $ac_retval
2382
2383} # ac_fn_c_try_link
2384
2385# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2386# ---------------------------------------------------------
2387# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2388# the include files in INCLUDES and setting the cache variable VAR
2389# accordingly.
2390ac_fn_cxx_check_header_mongrel ()
2391{
2392  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2393  if eval \${$3+:} false; then :
2394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2395$as_echo_n "checking for $2... " >&6; }
2396if eval \${$3+:} false; then :
2397  $as_echo_n "(cached) " >&6
2398fi
2399eval ac_res=\$$3
2400	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2401$as_echo "$ac_res" >&6; }
2402else
2403  # Is the header compilable?
2404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2405$as_echo_n "checking $2 usability... " >&6; }
2406cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2407/* end confdefs.h.  */
2408$4
2409#include <$2>
2410_ACEOF
2411if ac_fn_cxx_try_compile "$LINENO"; then :
2412  ac_header_compiler=yes
2413else
2414  ac_header_compiler=no
2415fi
2416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2418$as_echo "$ac_header_compiler" >&6; }
2419
2420# Is the header present?
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2422$as_echo_n "checking $2 presence... " >&6; }
2423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h.  */
2425#include <$2>
2426_ACEOF
2427if ac_fn_cxx_try_cpp "$LINENO"; then :
2428  ac_header_preproc=yes
2429else
2430  ac_header_preproc=no
2431fi
2432rm -f conftest.err conftest.i conftest.$ac_ext
2433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2434$as_echo "$ac_header_preproc" >&6; }
2435
2436# So?  What about this header?
2437case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2438  yes:no: )
2439    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2440$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2441    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2442$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2443    ;;
2444  no:yes:* )
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2446$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2447    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2448$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2450$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2452$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2454$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2455( $as_echo "## ----------------------------------------- ##
2456## Report this to build-dev@openjdk.java.net ##
2457## ----------------------------------------- ##"
2458     ) | sed "s/^/$as_me: WARNING:     /" >&2
2459    ;;
2460esac
2461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2462$as_echo_n "checking for $2... " >&6; }
2463if eval \${$3+:} false; then :
2464  $as_echo_n "(cached) " >&6
2465else
2466  eval "$3=\$ac_header_compiler"
2467fi
2468eval ac_res=\$$3
2469	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2470$as_echo "$ac_res" >&6; }
2471fi
2472  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2473
2474} # ac_fn_cxx_check_header_mongrel
2475
2476# ac_fn_cxx_try_run LINENO
2477# ------------------------
2478# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2479# that executables *can* be run.
2480ac_fn_cxx_try_run ()
2481{
2482  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2483  if { { ac_try="$ac_link"
2484case "(($ac_try" in
2485  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2486  *) ac_try_echo=$ac_try;;
2487esac
2488eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2489$as_echo "$ac_try_echo"; } >&5
2490  (eval "$ac_link") 2>&5
2491  ac_status=$?
2492  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2493  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2494  { { case "(($ac_try" in
2495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2496  *) ac_try_echo=$ac_try;;
2497esac
2498eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2499$as_echo "$ac_try_echo"; } >&5
2500  (eval "$ac_try") 2>&5
2501  ac_status=$?
2502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2503  test $ac_status = 0; }; }; then :
2504  ac_retval=0
2505else
2506  $as_echo "$as_me: program exited with status $ac_status" >&5
2507       $as_echo "$as_me: failed program was:" >&5
2508sed 's/^/| /' conftest.$ac_ext >&5
2509
2510       ac_retval=$ac_status
2511fi
2512  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2513  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2514  as_fn_set_status $ac_retval
2515
2516} # ac_fn_cxx_try_run
2517
2518# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2519# ---------------------------------------------------------
2520# Tests whether HEADER exists and can be compiled using the include files in
2521# INCLUDES, setting the cache variable VAR accordingly.
2522ac_fn_cxx_check_header_compile ()
2523{
2524  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2525  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2526$as_echo_n "checking for $2... " >&6; }
2527if eval \${$3+:} false; then :
2528  $as_echo_n "(cached) " >&6
2529else
2530  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2531/* end confdefs.h.  */
2532$4
2533#include <$2>
2534_ACEOF
2535if ac_fn_cxx_try_compile "$LINENO"; then :
2536  eval "$3=yes"
2537else
2538  eval "$3=no"
2539fi
2540rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2541fi
2542eval ac_res=\$$3
2543	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2544$as_echo "$ac_res" >&6; }
2545  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2546
2547} # ac_fn_cxx_check_header_compile
2548
2549# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2550# ----------------------------------------------
2551# Tries to find the compile-time value of EXPR in a program that includes
2552# INCLUDES, setting VAR accordingly. Returns whether the value could be
2553# computed
2554ac_fn_cxx_compute_int ()
2555{
2556  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2557  if test "$cross_compiling" = yes; then
2558    # Depending upon the size, compute the lo and hi bounds.
2559cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2560/* end confdefs.h.  */
2561$4
2562int
2563main ()
2564{
2565static int test_array [1 - 2 * !(($2) >= 0)];
2566test_array [0] = 0;
2567return test_array [0];
2568
2569  ;
2570  return 0;
2571}
2572_ACEOF
2573if ac_fn_cxx_try_compile "$LINENO"; then :
2574  ac_lo=0 ac_mid=0
2575  while :; do
2576    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h.  */
2578$4
2579int
2580main ()
2581{
2582static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2583test_array [0] = 0;
2584return test_array [0];
2585
2586  ;
2587  return 0;
2588}
2589_ACEOF
2590if ac_fn_cxx_try_compile "$LINENO"; then :
2591  ac_hi=$ac_mid; break
2592else
2593  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2594			if test $ac_lo -le $ac_mid; then
2595			  ac_lo= ac_hi=
2596			  break
2597			fi
2598			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2599fi
2600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601  done
2602else
2603  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2604/* end confdefs.h.  */
2605$4
2606int
2607main ()
2608{
2609static int test_array [1 - 2 * !(($2) < 0)];
2610test_array [0] = 0;
2611return test_array [0];
2612
2613  ;
2614  return 0;
2615}
2616_ACEOF
2617if ac_fn_cxx_try_compile "$LINENO"; then :
2618  ac_hi=-1 ac_mid=-1
2619  while :; do
2620    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622$4
2623int
2624main ()
2625{
2626static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2627test_array [0] = 0;
2628return test_array [0];
2629
2630  ;
2631  return 0;
2632}
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_lo=$ac_mid; break
2636else
2637  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2638			if test $ac_mid -le $ac_hi; then
2639			  ac_lo= ac_hi=
2640			  break
2641			fi
2642			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2643fi
2644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2645  done
2646else
2647  ac_lo= ac_hi=
2648fi
2649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2650fi
2651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2652# Binary search between lo and hi bounds.
2653while test "x$ac_lo" != "x$ac_hi"; do
2654  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2656/* end confdefs.h.  */
2657$4
2658int
2659main ()
2660{
2661static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2662test_array [0] = 0;
2663return test_array [0];
2664
2665  ;
2666  return 0;
2667}
2668_ACEOF
2669if ac_fn_cxx_try_compile "$LINENO"; then :
2670  ac_hi=$ac_mid
2671else
2672  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2673fi
2674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2675done
2676case $ac_lo in #((
2677?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2678'') ac_retval=1 ;;
2679esac
2680  else
2681    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2682/* end confdefs.h.  */
2683$4
2684static long int longval () { return $2; }
2685static unsigned long int ulongval () { return $2; }
2686#include <stdio.h>
2687#include <stdlib.h>
2688int
2689main ()
2690{
2691
2692  FILE *f = fopen ("conftest.val", "w");
2693  if (! f)
2694    return 1;
2695  if (($2) < 0)
2696    {
2697      long int i = longval ();
2698      if (i != ($2))
2699	return 1;
2700      fprintf (f, "%ld", i);
2701    }
2702  else
2703    {
2704      unsigned long int i = ulongval ();
2705      if (i != ($2))
2706	return 1;
2707      fprintf (f, "%lu", i);
2708    }
2709  /* Do not output a trailing newline, as this causes \r\n confusion
2710     on some platforms.  */
2711  return ferror (f) || fclose (f) != 0;
2712
2713  ;
2714  return 0;
2715}
2716_ACEOF
2717if ac_fn_cxx_try_run "$LINENO"; then :
2718  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2719else
2720  ac_retval=1
2721fi
2722rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2723  conftest.$ac_objext conftest.beam conftest.$ac_ext
2724rm -f conftest.val
2725
2726  fi
2727  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2728  as_fn_set_status $ac_retval
2729
2730} # ac_fn_cxx_compute_int
2731
2732# ac_fn_cxx_try_link LINENO
2733# -------------------------
2734# Try to link conftest.$ac_ext, and return whether this succeeded.
2735ac_fn_cxx_try_link ()
2736{
2737  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2738  rm -f conftest.$ac_objext conftest$ac_exeext
2739  if { { ac_try="$ac_link"
2740case "(($ac_try" in
2741  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2742  *) ac_try_echo=$ac_try;;
2743esac
2744eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2745$as_echo "$ac_try_echo"; } >&5
2746  (eval "$ac_link") 2>conftest.err
2747  ac_status=$?
2748  if test -s conftest.err; then
2749    grep -v '^ *+' conftest.err >conftest.er1
2750    cat conftest.er1 >&5
2751    mv -f conftest.er1 conftest.err
2752  fi
2753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2754  test $ac_status = 0; } && {
2755	 test -z "$ac_cxx_werror_flag" ||
2756	 test ! -s conftest.err
2757       } && test -s conftest$ac_exeext && {
2758	 test "$cross_compiling" = yes ||
2759	 test -x conftest$ac_exeext
2760       }; then :
2761  ac_retval=0
2762else
2763  $as_echo "$as_me: failed program was:" >&5
2764sed 's/^/| /' conftest.$ac_ext >&5
2765
2766	ac_retval=1
2767fi
2768  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2769  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2770  # interfere with the next link command; also delete a directory that is
2771  # left behind by Apple's compiler.  We do this before executing the actions.
2772  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2773  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2774  as_fn_set_status $ac_retval
2775
2776} # ac_fn_cxx_try_link
2777
2778# ac_fn_cxx_check_func LINENO FUNC VAR
2779# ------------------------------------
2780# Tests whether FUNC exists, setting the cache variable VAR accordingly
2781ac_fn_cxx_check_func ()
2782{
2783  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2785$as_echo_n "checking for $2... " >&6; }
2786if eval \${$3+:} false; then :
2787  $as_echo_n "(cached) " >&6
2788else
2789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2790/* end confdefs.h.  */
2791/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2792   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2793#define $2 innocuous_$2
2794
2795/* System header to define __stub macros and hopefully few prototypes,
2796    which can conflict with char $2 (); below.
2797    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2798    <limits.h> exists even on freestanding compilers.  */
2799
2800#ifdef __STDC__
2801# include <limits.h>
2802#else
2803# include <assert.h>
2804#endif
2805
2806#undef $2
2807
2808/* Override any GCC internal prototype to avoid an error.
2809   Use char because int might match the return type of a GCC
2810   builtin and then its argument prototype would still apply.  */
2811#ifdef __cplusplus
2812extern "C"
2813#endif
2814char $2 ();
2815/* The GNU C library defines this for functions which it implements
2816    to always fail with ENOSYS.  Some functions are actually named
2817    something starting with __ and the normal name is an alias.  */
2818#if defined __stub_$2 || defined __stub___$2
2819choke me
2820#endif
2821
2822int
2823main ()
2824{
2825return $2 ();
2826  ;
2827  return 0;
2828}
2829_ACEOF
2830if ac_fn_cxx_try_link "$LINENO"; then :
2831  eval "$3=yes"
2832else
2833  eval "$3=no"
2834fi
2835rm -f core conftest.err conftest.$ac_objext \
2836    conftest$ac_exeext conftest.$ac_ext
2837fi
2838eval ac_res=\$$3
2839	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2840$as_echo "$ac_res" >&6; }
2841  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2842
2843} # ac_fn_cxx_check_func
2844
2845# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2846# -------------------------------------------------------
2847# Tests whether HEADER exists and can be compiled using the include files in
2848# INCLUDES, setting the cache variable VAR accordingly.
2849ac_fn_c_check_header_compile ()
2850{
2851  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2853$as_echo_n "checking for $2... " >&6; }
2854if eval \${$3+:} false; then :
2855  $as_echo_n "(cached) " >&6
2856else
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860#include <$2>
2861_ACEOF
2862if ac_fn_c_try_compile "$LINENO"; then :
2863  eval "$3=yes"
2864else
2865  eval "$3=no"
2866fi
2867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2868fi
2869eval ac_res=\$$3
2870	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2871$as_echo "$ac_res" >&6; }
2872  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2873
2874} # ac_fn_c_check_header_compile
2875cat >config.log <<_ACEOF
2876This file contains any messages produced by compilers while
2877running configure, to aid debugging if configure makes a mistake.
2878
2879It was created by OpenJDK $as_me jdk9, which was
2880generated by GNU Autoconf 2.69.  Invocation command line was
2881
2882  $ $0 $@
2883
2884_ACEOF
2885exec 5>>config.log
2886{
2887cat <<_ASUNAME
2888## --------- ##
2889## Platform. ##
2890## --------- ##
2891
2892hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2893uname -m = `(uname -m) 2>/dev/null || echo unknown`
2894uname -r = `(uname -r) 2>/dev/null || echo unknown`
2895uname -s = `(uname -s) 2>/dev/null || echo unknown`
2896uname -v = `(uname -v) 2>/dev/null || echo unknown`
2897
2898/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2899/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2900
2901/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2902/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2903/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2904/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2905/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2906/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2907/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2908
2909_ASUNAME
2910
2911as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2912for as_dir in $PATH
2913do
2914  IFS=$as_save_IFS
2915  test -z "$as_dir" && as_dir=.
2916    $as_echo "PATH: $as_dir"
2917  done
2918IFS=$as_save_IFS
2919
2920} >&5
2921
2922cat >&5 <<_ACEOF
2923
2924
2925## ----------- ##
2926## Core tests. ##
2927## ----------- ##
2928
2929_ACEOF
2930
2931
2932# Keep a trace of the command line.
2933# Strip out --no-create and --no-recursion so they do not pile up.
2934# Strip out --silent because we don't want to record it for future runs.
2935# Also quote any args containing shell meta-characters.
2936# Make two passes to allow for proper duplicate-argument suppression.
2937ac_configure_args=
2938ac_configure_args0=
2939ac_configure_args1=
2940ac_must_keep_next=false
2941for ac_pass in 1 2
2942do
2943  for ac_arg
2944  do
2945    case $ac_arg in
2946    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2947    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2948    | -silent | --silent | --silen | --sile | --sil)
2949      continue ;;
2950    *\'*)
2951      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2952    esac
2953    case $ac_pass in
2954    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2955    2)
2956      as_fn_append ac_configure_args1 " '$ac_arg'"
2957      if test $ac_must_keep_next = true; then
2958	ac_must_keep_next=false # Got value, back to normal.
2959      else
2960	case $ac_arg in
2961	  *=* | --config-cache | -C | -disable-* | --disable-* \
2962	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2963	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2964	  | -with-* | --with-* | -without-* | --without-* | --x)
2965	    case "$ac_configure_args0 " in
2966	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2967	    esac
2968	    ;;
2969	  -* ) ac_must_keep_next=true ;;
2970	esac
2971      fi
2972      as_fn_append ac_configure_args " '$ac_arg'"
2973      ;;
2974    esac
2975  done
2976done
2977{ ac_configure_args0=; unset ac_configure_args0;}
2978{ ac_configure_args1=; unset ac_configure_args1;}
2979
2980# When interrupted or exit'd, cleanup temporary files, and complete
2981# config.log.  We remove comments because anyway the quotes in there
2982# would cause problems or look ugly.
2983# WARNING: Use '\'' to represent an apostrophe within the trap.
2984# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2985trap 'exit_status=$?
2986  # Save into config.log some information that might help in debugging.
2987  {
2988    echo
2989
2990    $as_echo "## ---------------- ##
2991## Cache variables. ##
2992## ---------------- ##"
2993    echo
2994    # The following way of writing the cache mishandles newlines in values,
2995(
2996  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2997    eval ac_val=\$$ac_var
2998    case $ac_val in #(
2999    *${as_nl}*)
3000      case $ac_var in #(
3001      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3002$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3003      esac
3004      case $ac_var in #(
3005      _ | IFS | as_nl) ;; #(
3006      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3007      *) { eval $ac_var=; unset $ac_var;} ;;
3008      esac ;;
3009    esac
3010  done
3011  (set) 2>&1 |
3012    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3013    *${as_nl}ac_space=\ *)
3014      sed -n \
3015	"s/'\''/'\''\\\\'\'''\''/g;
3016	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3017      ;; #(
3018    *)
3019      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3020      ;;
3021    esac |
3022    sort
3023)
3024    echo
3025
3026    $as_echo "## ----------------- ##
3027## Output variables. ##
3028## ----------------- ##"
3029    echo
3030    for ac_var in $ac_subst_vars
3031    do
3032      eval ac_val=\$$ac_var
3033      case $ac_val in
3034      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3035      esac
3036      $as_echo "$ac_var='\''$ac_val'\''"
3037    done | sort
3038    echo
3039
3040    if test -n "$ac_subst_files"; then
3041      $as_echo "## ------------------- ##
3042## File substitutions. ##
3043## ------------------- ##"
3044      echo
3045      for ac_var in $ac_subst_files
3046      do
3047	eval ac_val=\$$ac_var
3048	case $ac_val in
3049	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3050	esac
3051	$as_echo "$ac_var='\''$ac_val'\''"
3052      done | sort
3053      echo
3054    fi
3055
3056    if test -s confdefs.h; then
3057      $as_echo "## ----------- ##
3058## confdefs.h. ##
3059## ----------- ##"
3060      echo
3061      cat confdefs.h
3062      echo
3063    fi
3064    test "$ac_signal" != 0 &&
3065      $as_echo "$as_me: caught signal $ac_signal"
3066    $as_echo "$as_me: exit $exit_status"
3067  } >&5
3068  rm -f core *.core core.conftest.* &&
3069    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3070    exit $exit_status
3071' 0
3072for ac_signal in 1 2 13 15; do
3073  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3074done
3075ac_signal=0
3076
3077# confdefs.h avoids OS command line length limits that DEFS can exceed.
3078rm -f -r conftest* confdefs.h
3079
3080$as_echo "/* confdefs.h */" > confdefs.h
3081
3082# Predefined preprocessor variables.
3083
3084cat >>confdefs.h <<_ACEOF
3085#define PACKAGE_NAME "$PACKAGE_NAME"
3086_ACEOF
3087
3088cat >>confdefs.h <<_ACEOF
3089#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3090_ACEOF
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_VERSION "$PACKAGE_VERSION"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_STRING "$PACKAGE_STRING"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_URL "$PACKAGE_URL"
3106_ACEOF
3107
3108
3109# Let the site file select an alternate cache file if it wants to.
3110# Prefer an explicitly selected file to automatically selected ones.
3111ac_site_file1=NONE
3112ac_site_file2=NONE
3113if test -n "$CONFIG_SITE"; then
3114  # We do not want a PATH search for config.site.
3115  case $CONFIG_SITE in #((
3116    -*)  ac_site_file1=./$CONFIG_SITE;;
3117    */*) ac_site_file1=$CONFIG_SITE;;
3118    *)   ac_site_file1=./$CONFIG_SITE;;
3119  esac
3120elif test "x$prefix" != xNONE; then
3121  ac_site_file1=$prefix/share/config.site
3122  ac_site_file2=$prefix/etc/config.site
3123else
3124  ac_site_file1=$ac_default_prefix/share/config.site
3125  ac_site_file2=$ac_default_prefix/etc/config.site
3126fi
3127for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3128do
3129  test "x$ac_site_file" = xNONE && continue
3130  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3131    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3132$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3133    sed 's/^/| /' "$ac_site_file" >&5
3134    . "$ac_site_file" \
3135      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3136$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3137as_fn_error $? "failed to load site script $ac_site_file
3138See \`config.log' for more details" "$LINENO" 5; }
3139  fi
3140done
3141
3142if test -r "$cache_file"; then
3143  # Some versions of bash will fail to source /dev/null (special files
3144  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3145  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3146    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3147$as_echo "$as_me: loading cache $cache_file" >&6;}
3148    case $cache_file in
3149      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3150      *)                      . "./$cache_file";;
3151    esac
3152  fi
3153else
3154  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3155$as_echo "$as_me: creating cache $cache_file" >&6;}
3156  >$cache_file
3157fi
3158
3159# Check that the precious variables saved in the cache have kept the same
3160# value.
3161ac_cache_corrupted=false
3162for ac_var in $ac_precious_vars; do
3163  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3164  eval ac_new_set=\$ac_env_${ac_var}_set
3165  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3166  eval ac_new_val=\$ac_env_${ac_var}_value
3167  case $ac_old_set,$ac_new_set in
3168    set,)
3169      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3170$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3171      ac_cache_corrupted=: ;;
3172    ,set)
3173      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3174$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3175      ac_cache_corrupted=: ;;
3176    ,);;
3177    *)
3178      if test "x$ac_old_val" != "x$ac_new_val"; then
3179	# differences in whitespace do not lead to failure.
3180	ac_old_val_w=`echo x $ac_old_val`
3181	ac_new_val_w=`echo x $ac_new_val`
3182	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3183	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3184$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3185	  ac_cache_corrupted=:
3186	else
3187	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3188$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3189	  eval $ac_var=\$ac_old_val
3190	fi
3191	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3192$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3193	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3194$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3195      fi;;
3196  esac
3197  # Pass precious variables to config.status.
3198  if test "$ac_new_set" = set; then
3199    case $ac_new_val in
3200    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3201    *) ac_arg=$ac_var=$ac_new_val ;;
3202    esac
3203    case " $ac_configure_args " in
3204      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3205      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3206    esac
3207  fi
3208done
3209if $ac_cache_corrupted; then
3210  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3211$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3212  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3213$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3214  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3215fi
3216## -------------------- ##
3217## Main body of script. ##
3218## -------------------- ##
3219
3220ac_ext=c
3221ac_cpp='$CPP $CPPFLAGS'
3222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3224ac_compiler_gnu=$ac_cv_c_compiler_gnu
3225
3226
3227
3228ac_aux_dir=
3229for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3230  if test -f "$ac_dir/install-sh"; then
3231    ac_aux_dir=$ac_dir
3232    ac_install_sh="$ac_aux_dir/install-sh -c"
3233    break
3234  elif test -f "$ac_dir/install.sh"; then
3235    ac_aux_dir=$ac_dir
3236    ac_install_sh="$ac_aux_dir/install.sh -c"
3237    break
3238  elif test -f "$ac_dir/shtool"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/shtool install -c"
3241    break
3242  fi
3243done
3244if test -z "$ac_aux_dir"; then
3245  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3246fi
3247
3248# These three variables are undocumented and unsupported,
3249# and are intended to be withdrawn in a future Autoconf release.
3250# They can cause serious problems if a builder's source tree is in a directory
3251# whose full name contains unusual characters.
3252ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3253ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3254ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3255
3256
3257# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3258
3259#
3260# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3261# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3262#
3263# This code is free software; you can redistribute it and/or modify it
3264# under the terms of the GNU General Public License version 2 only, as
3265# published by the Free Software Foundation.  Oracle designates this
3266# particular file as subject to the "Classpath" exception as provided
3267# by Oracle in the LICENSE file that accompanied this code.
3268#
3269# This code is distributed in the hope that it will be useful, but WITHOUT
3270# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3271# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3272# version 2 for more details (a copy is included in the LICENSE file that
3273# accompanied this code).
3274#
3275# You should have received a copy of the GNU General Public License version
3276# 2 along with this work; if not, write to the Free Software Foundation,
3277# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3278#
3279# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3280# or visit www.oracle.com if you need additional information or have any
3281# questions.
3282#
3283
3284#
3285# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3286#
3287# This program is free software; you can redistribute it and/or modify
3288# it under the terms of the GNU General Public License as published by
3289# the Free Software Foundation; either version 2 of the License, or
3290# (at your option) any later version.
3291#
3292# This program is distributed in the hope that it will be useful, but
3293# WITHOUT ANY WARRANTY; without even the implied warranty of
3294# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3295# General Public License for more details.
3296#
3297# You should have received a copy of the GNU General Public License
3298# along with this program; if not, write to the Free Software
3299# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3300#
3301# As a special exception to the GNU General Public License, if you
3302# distribute this file as part of a program that contains a
3303# configuration script generated by Autoconf, you may include it under
3304# the same distribution terms that you use for the rest of that program.
3305
3306# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3307# ----------------------------------
3308# PKG_PROG_PKG_CONFIG
3309
3310# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3311#
3312# Check to see whether a particular set of modules exists.  Similar
3313# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3314#
3315#
3316# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3317# this or PKG_CHECK_MODULES is called, or make sure to call
3318# PKG_CHECK_EXISTS manually
3319# --------------------------------------------------------------
3320
3321
3322
3323# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3324# ---------------------------------------------
3325# _PKG_CONFIG
3326
3327# _PKG_SHORT_ERRORS_SUPPORTED
3328# -----------------------------
3329# _PKG_SHORT_ERRORS_SUPPORTED
3330
3331
3332# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3333# [ACTION-IF-NOT-FOUND])
3334#
3335#
3336# Note that if there is a possibility the first call to
3337# PKG_CHECK_MODULES might not happen, you should be sure to include an
3338# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3339#
3340#
3341# --------------------------------------------------------------
3342# PKG_CHECK_MODULES
3343
3344
3345# Include these first...
3346#
3347# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3348# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3349#
3350# This code is free software; you can redistribute it and/or modify it
3351# under the terms of the GNU General Public License version 2 only, as
3352# published by the Free Software Foundation.  Oracle designates this
3353# particular file as subject to the "Classpath" exception as provided
3354# by Oracle in the LICENSE file that accompanied this code.
3355#
3356# This code is distributed in the hope that it will be useful, but WITHOUT
3357# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3358# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3359# version 2 for more details (a copy is included in the LICENSE file that
3360# accompanied this code).
3361#
3362# You should have received a copy of the GNU General Public License version
3363# 2 along with this work; if not, write to the Free Software Foundation,
3364# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3365#
3366# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3367# or visit www.oracle.com if you need additional information or have any
3368# questions.
3369#
3370
3371# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3372# If so, then append $1 to $2 \
3373# Also set JVM_ARG_OK to true/false depending on outcome.
3374
3375
3376# Appends a string to a path variable, only adding the : when needed.
3377
3378
3379# Prepends a string to a path variable, only adding the : when needed.
3380
3381
3382# This will make sure the given variable points to a full and proper
3383# path. This means:
3384# 1) There will be no spaces in the path. On unix platforms,
3385#    spaces in the path will result in an error. On Windows,
3386#    the path will be rewritten using short-style to be space-free.
3387# 2) The path will be absolute, and it will be in unix-style (on
3388#     cygwin).
3389# $1: The name of the variable to fix
3390
3391
3392# This will make sure the given variable points to a executable
3393# with a full and proper path. This means:
3394# 1) There will be no spaces in the path. On unix platforms,
3395#    spaces in the path will result in an error. On Windows,
3396#    the path will be rewritten using short-style to be space-free.
3397# 2) The path will be absolute, and it will be in unix-style (on
3398#     cygwin).
3399# Any arguments given to the executable is preserved.
3400# If the input variable does not have a directory specification, then
3401# it need to be in the PATH.
3402# $1: The name of the variable to fix
3403
3404
3405
3406
3407# Register a --with argument but mark it as deprecated
3408# $1: The name of the with argument to deprecate, not including --with-
3409
3410
3411# Register a --enable argument but mark it as deprecated
3412# $1: The name of the with argument to deprecate, not including --enable-
3413# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3414
3415
3416
3417
3418# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3419# $1: variable to check
3420
3421
3422# Check that there are no unprocessed overridden variables left.
3423# If so, they are an incorrect argument and we will exit with an error.
3424
3425
3426# Setup a tool for the given variable. If correctly specified by the user,
3427# use that value, otherwise search for the tool using the supplied code snippet.
3428# $1: variable to set
3429# $2: code snippet to call to look for the tool
3430
3431
3432# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3433# $1: variable to set
3434# $2: executable name (or list of names) to look for
3435
3436
3437# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3438# $1: variable to set
3439# $2: executable name (or list of names) to look for
3440
3441
3442# Like BASIC_PATH_PROGS but fails if no tool was found.
3443# $1: variable to set
3444# $2: executable name (or list of names) to look for
3445
3446
3447# Like BASIC_SETUP_TOOL but fails if no tool was found.
3448# $1: variable to set
3449# $2: autoconf macro to call to look for the special tool
3450
3451
3452# Setup the most fundamental tools that relies on not much else to set up,
3453# but is used by much of the early bootstrap code.
3454
3455
3456# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3457
3458
3459# Evaluates platform specific overrides for devkit variables.
3460# $1: Name of variable
3461
3462
3463
3464
3465
3466
3467#%%% Simple tools %%%
3468
3469# Check if we have found a usable version of make
3470# $1: the path to a potential make binary (or empty)
3471# $2: the description on how we found this
3472
3473
3474
3475
3476# Goes looking for a usable version of GNU make.
3477
3478
3479
3480
3481
3482
3483# Check if build directory is on local disk. If not possible to determine,
3484# we prefer to claim it's local.
3485# Argument 1: directory to test
3486# Argument 2: what to do if it is on local disk
3487# Argument 3: what to do otherwise (remote disk or failure)
3488
3489
3490# Check that source files have basic read permissions set. This might
3491# not be the case in cygwin in certain conditions.
3492
3493
3494
3495
3496# Check for support for specific options in bash
3497
3498
3499# Code to run after AC_OUTPUT
3500
3501
3502#
3503# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3504# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3505#
3506# This code is free software; you can redistribute it and/or modify it
3507# under the terms of the GNU General Public License version 2 only, as
3508# published by the Free Software Foundation.  Oracle designates this
3509# particular file as subject to the "Classpath" exception as provided
3510# by Oracle in the LICENSE file that accompanied this code.
3511#
3512# This code is distributed in the hope that it will be useful, but WITHOUT
3513# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3514# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3515# version 2 for more details (a copy is included in the LICENSE file that
3516# accompanied this code).
3517#
3518# You should have received a copy of the GNU General Public License version
3519# 2 along with this work; if not, write to the Free Software Foundation,
3520# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3521#
3522# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3523# or visit www.oracle.com if you need additional information or have any
3524# questions.
3525#
3526
3527
3528
3529
3530
3531# Helper function which possibly converts a path using DOS-style short mode.
3532# If so, the updated path is stored in $new_path.
3533# $1: The path to check
3534
3535
3536# Helper function which possibly converts a path using DOS-style short mode.
3537# If so, the updated path is stored in $new_path.
3538# $1: The path to check
3539
3540
3541# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3542# and could probably be heavily simplified. However, all changes in this
3543# area tend to need lot of testing in different scenarios, and in lack of
3544# proper unit testing, cleaning this up has not been deemed worth the effort
3545# at the moment.
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3556
3557
3558
3559
3560#
3561# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3562# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3563#
3564# This code is free software; you can redistribute it and/or modify it
3565# under the terms of the GNU General Public License version 2 only, as
3566# published by the Free Software Foundation.  Oracle designates this
3567# particular file as subject to the "Classpath" exception as provided
3568# by Oracle in the LICENSE file that accompanied this code.
3569#
3570# This code is distributed in the hope that it will be useful, but WITHOUT
3571# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3572# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3573# version 2 for more details (a copy is included in the LICENSE file that
3574# accompanied this code).
3575#
3576# You should have received a copy of the GNU General Public License version
3577# 2 along with this work; if not, write to the Free Software Foundation,
3578# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3579#
3580# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3581# or visit www.oracle.com if you need additional information or have any
3582# questions.
3583#
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595# ... then the rest
3596#
3597# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3598# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3599#
3600# This code is free software; you can redistribute it and/or modify it
3601# under the terms of the GNU General Public License version 2 only, as
3602# published by the Free Software Foundation.  Oracle designates this
3603# particular file as subject to the "Classpath" exception as provided
3604# by Oracle in the LICENSE file that accompanied this code.
3605#
3606# This code is distributed in the hope that it will be useful, but WITHOUT
3607# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3608# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3609# version 2 for more details (a copy is included in the LICENSE file that
3610# accompanied this code).
3611#
3612# You should have received a copy of the GNU General Public License version
3613# 2 along with this work; if not, write to the Free Software Foundation,
3614# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3615#
3616# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3617# or visit www.oracle.com if you need additional information or have any
3618# questions.
3619#
3620
3621########################################################################
3622# This file handles detection of the Boot JDK. The Boot JDK detection
3623# process has been developed as a response to solve a complex real-world
3624# problem. Initially, it was simple, but it has grown as platform after
3625# platform, idiosyncracy after idiosyncracy has been supported.
3626#
3627# The basic idea is this:
3628# 1) You need an acceptable *) JDK to use as a Boot JDK
3629# 2) There are several ways to locate a JDK, that are mostly platform
3630#    dependent **)
3631# 3) You can have multiple JDKs installed
3632# 4) If possible, configure should try to dig out an acceptable JDK
3633#    automatically, without having to resort to command-line options
3634#
3635# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3636#     javac) and not a JRE, etc.
3637#
3638# **) On Windows we typically use a well-known path.
3639#     On MacOSX we typically use the tool java_home.
3640#     On Linux we typically find javac in the $PATH, and then follow a
3641#     chain of symlinks that often ends up in a real JDK.
3642#
3643# This leads to the code where we check in different ways to locate a
3644# JDK, and if one is found, check if it is acceptable. If not, we print
3645# our reasons for rejecting it (useful when debugging non-working
3646# configure situations) and continue checking the next one.
3647########################################################################
3648
3649# Execute the check given as argument, and verify the result
3650# If the Boot JDK was previously found, do nothing
3651# $1 A command line (typically autoconf macro) to execute
3652
3653
3654# Test: Is bootjdk explicitely set by command line arguments?
3655
3656
3657# Test: Is bootjdk available from builddeps?
3658
3659
3660# Test: Is $JAVA_HOME set?
3661
3662
3663# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3664
3665
3666# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3667# $1: Argument to the java_home binary (optional)
3668
3669
3670# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3671
3672
3673# Look for a jdk in the given path. If there are multiple, try to select the newest.
3674# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3675# $1 = Path to directory containing jdk installations.
3676# $2 = String to append to the found JDK directory to get the proper JDK home
3677
3678
3679# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3680# environmental variable as base for where to look.
3681# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3682
3683
3684# Test: Is there a JDK installed in default, well-known locations?
3685
3686
3687# Check that a command-line tool in the Boot JDK is correct
3688# $1 = name of variable to assign
3689# $2 = name of binary
3690
3691
3692###############################################################################
3693#
3694# We need a Boot JDK to bootstrap the build.
3695#
3696
3697
3698
3699
3700
3701#
3702# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3703# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3704#
3705# This code is free software; you can redistribute it and/or modify it
3706# under the terms of the GNU General Public License version 2 only, as
3707# published by the Free Software Foundation.  Oracle designates this
3708# particular file as subject to the "Classpath" exception as provided
3709# by Oracle in the LICENSE file that accompanied this code.
3710#
3711# This code is distributed in the hope that it will be useful, but WITHOUT
3712# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3713# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3714# version 2 for more details (a copy is included in the LICENSE file that
3715# accompanied this code).
3716#
3717# You should have received a copy of the GNU General Public License version
3718# 2 along with this work; if not, write to the Free Software Foundation,
3719# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3720#
3721# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3722# or visit www.oracle.com if you need additional information or have any
3723# questions.
3724#
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745#
3746# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3747# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3748#
3749# This code is free software; you can redistribute it and/or modify it
3750# under the terms of the GNU General Public License version 2 only, as
3751# published by the Free Software Foundation.  Oracle designates this
3752# particular file as subject to the "Classpath" exception as provided
3753# by Oracle in the LICENSE file that accompanied this code.
3754#
3755# This code is distributed in the hope that it will be useful, but WITHOUT
3756# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3757# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3758# version 2 for more details (a copy is included in the LICENSE file that
3759# accompanied this code).
3760#
3761# You should have received a copy of the GNU General Public License version
3762# 2 along with this work; if not, write to the Free Software Foundation,
3763# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3764#
3765# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3766# or visit www.oracle.com if you need additional information or have any
3767# questions.
3768#
3769
3770
3771
3772
3773
3774# Documentation on common flags used for solstudio in HIGHEST.
3775#
3776# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3777#          done with care, there are some assumptions below that need to
3778#          be understood about the use of pointers, and IEEE behavior.
3779#
3780# -fns: Use non-standard floating point mode (not IEEE 754)
3781# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3782# -fsingle: Use single precision floating point with 'float'
3783# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3784#   (Source with excessing pointer casting and data access with mixed
3785#    pointer types are not recommended)
3786# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3787#   (If you expect perfect errno behavior, do not use this)
3788# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3789# -xrestrict: Pointer parameters to functions do not overlap
3790#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3791#    If you pass in multiple pointers to the same data, do not use this)
3792# -xlibmil: Inline some library routines
3793#   (If you expect perfect errno behavior, do not use this)
3794# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3795#   (If you expect perfect errno behavior, do not use this)
3796#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3797
3798    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3799    # Bug?
3800    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3801    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3802    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3803    #fi
3804
3805
3806
3807
3808
3809# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3810#                                   [RUN-IF-FALSE])
3811# ------------------------------------------------------------
3812# Check that the c and c++ compilers support an argument
3813
3814
3815# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3816#                                    [RUN-IF-FALSE])
3817# ------------------------------------------------------------
3818# Check that the linker support an argument
3819
3820
3821
3822
3823#
3824# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3826#
3827# This code is free software; you can redistribute it and/or modify it
3828# under the terms of the GNU General Public License version 2 only, as
3829# published by the Free Software Foundation.  Oracle designates this
3830# particular file as subject to the "Classpath" exception as provided
3831# by Oracle in the LICENSE file that accompanied this code.
3832#
3833# This code is distributed in the hope that it will be useful, but WITHOUT
3834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3836# version 2 for more details (a copy is included in the LICENSE file that
3837# accompanied this code).
3838#
3839# You should have received a copy of the GNU General Public License version
3840# 2 along with this work; if not, write to the Free Software Foundation,
3841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3842#
3843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3844# or visit www.oracle.com if you need additional information or have any
3845# questions.
3846#
3847
3848
3849
3850
3851
3852cygwin_help() {
3853  case $1 in
3854    unzip)
3855      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3856      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3857      ;;
3858    zip)
3859      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3860      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3861      ;;
3862    make)
3863      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3864      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3865      ;;
3866    freetype)
3867      HELP_MSG="
3868The freetype library can now be build during the configure process.
3869Download the freetype sources and unpack them into an arbitrary directory:
3870
3871wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3872tar -xzf freetype-2.5.3.tar.gz
3873
3874Then run configure with '--with-freetype-src=<freetype_src>'. This will
3875automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3876builds or into '<freetype_src>/lib32' for 32-bit builds.
3877Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3878and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3879      ;;
3880  esac
3881}
3882
3883msys_help() {
3884  PKGHANDLER_COMMAND=""
3885}
3886
3887apt_help() {
3888  case $1 in
3889    devkit)
3890      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3891    openjdk)
3892      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3893    alsa)
3894      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3895    cups)
3896      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3897    freetype)
3898      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3899    pulse)
3900      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3901    x11)
3902      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3903    ccache)
3904      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3905  esac
3906}
3907
3908yum_help() {
3909  case $1 in
3910    devkit)
3911      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3912    openjdk)
3913      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3914    alsa)
3915      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3916    cups)
3917      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3918    freetype)
3919      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3920    pulse)
3921      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3922    x11)
3923      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3924    ccache)
3925      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3926  esac
3927}
3928
3929port_help() {
3930  PKGHANDLER_COMMAND=""
3931}
3932
3933pkgutil_help() {
3934  PKGHANDLER_COMMAND=""
3935}
3936
3937pkgadd_help() {
3938  PKGHANDLER_COMMAND=""
3939}
3940
3941# This function will check if we're called from the "configure" wrapper while
3942# printing --help. If so, we will print out additional information that can
3943# only be extracted within the autoconf script, and then exit. This must be
3944# called at the very beginning in configure.ac.
3945
3946
3947
3948
3949
3950
3951#
3952# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3953# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3954#
3955# This code is free software; you can redistribute it and/or modify it
3956# under the terms of the GNU General Public License version 2 only, as
3957# published by the Free Software Foundation.  Oracle designates this
3958# particular file as subject to the "Classpath" exception as provided
3959# by Oracle in the LICENSE file that accompanied this code.
3960#
3961# This code is distributed in the hope that it will be useful, but WITHOUT
3962# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3963# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3964# version 2 for more details (a copy is included in the LICENSE file that
3965# accompanied this code).
3966#
3967# You should have received a copy of the GNU General Public License version
3968# 2 along with this work; if not, write to the Free Software Foundation,
3969# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3970#
3971# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3972# or visit www.oracle.com if you need additional information or have any
3973# questions.
3974#
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985###############################################################################
3986#
3987# Should we build only OpenJDK even if closed sources are present?
3988#
3989
3990
3991
3992
3993###############################################################################
3994#
3995# Setup version numbers
3996#
3997
3998
3999
4000
4001
4002
4003################################################################################
4004#
4005# Gcov coverage data for hotspot
4006#
4007
4008
4009#
4010# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4011# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4012#
4013# This code is free software; you can redistribute it and/or modify it
4014# under the terms of the GNU General Public License version 2 only, as
4015# published by the Free Software Foundation.  Oracle designates this
4016# particular file as subject to the "Classpath" exception as provided
4017# by Oracle in the LICENSE file that accompanied this code.
4018#
4019# This code is distributed in the hope that it will be useful, but WITHOUT
4020# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4021# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4022# version 2 for more details (a copy is included in the LICENSE file that
4023# accompanied this code).
4024#
4025# You should have received a copy of the GNU General Public License version
4026# 2 along with this work; if not, write to the Free Software Foundation,
4027# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4028#
4029# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4030# or visit www.oracle.com if you need additional information or have any
4031# questions.
4032#
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054#
4055# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4056# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4057#
4058# This code is free software; you can redistribute it and/or modify it
4059# under the terms of the GNU General Public License version 2 only, as
4060# published by the Free Software Foundation.  Oracle designates this
4061# particular file as subject to the "Classpath" exception as provided
4062# by Oracle in the LICENSE file that accompanied this code.
4063#
4064# This code is distributed in the hope that it will be useful, but WITHOUT
4065# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4066# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4067# version 2 for more details (a copy is included in the LICENSE file that
4068# accompanied this code).
4069#
4070# You should have received a copy of the GNU General Public License version
4071# 2 along with this work; if not, write to the Free Software Foundation,
4072# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4073#
4074# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4075# or visit www.oracle.com if you need additional information or have any
4076# questions.
4077#
4078
4079# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4080# Converts autoconf style CPU name to OpenJDK style, into
4081# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4082
4083
4084# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4085# Converts autoconf style OS name to OpenJDK style, into
4086# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4087
4088
4089# Expects $host_os $host_cpu $build_os and $build_cpu
4090# and $with_target_bits to have been setup!
4091#
4092# Translate the standard triplet(quadruplet) definition
4093# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4094# OPENJDK_BUILD_OS, etc.
4095
4096
4097# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4098# accordingly. Must be done after setting up build and target system, but before
4099# doing anything else with these values.
4100
4101
4102# Setup the legacy variables, for controlling the old makefiles.
4103#
4104
4105
4106
4107
4108#%%% Build and target systems %%%
4109
4110
4111
4112
4113# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4114# Add -mX to various FLAGS variables.
4115
4116
4117
4118
4119
4120
4121#
4122# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4123# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4124#
4125# This code is free software; you can redistribute it and/or modify it
4126# under the terms of the GNU General Public License version 2 only, as
4127# published by the Free Software Foundation.  Oracle designates this
4128# particular file as subject to the "Classpath" exception as provided
4129# by Oracle in the LICENSE file that accompanied this code.
4130#
4131# This code is distributed in the hope that it will be useful, but WITHOUT
4132# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4133# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4134# version 2 for more details (a copy is included in the LICENSE file that
4135# accompanied this code).
4136#
4137# You should have received a copy of the GNU General Public License version
4138# 2 along with this work; if not, write to the Free Software Foundation,
4139# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4140#
4141# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4142# or visit www.oracle.com if you need additional information or have any
4143# questions.
4144#
4145
4146
4147
4148
4149
4150
4151
4152
4153#
4154# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4155# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4156#
4157# This code is free software; you can redistribute it and/or modify it
4158# under the terms of the GNU General Public License version 2 only, as
4159# published by the Free Software Foundation.  Oracle designates this
4160# particular file as subject to the "Classpath" exception as provided
4161# by Oracle in the LICENSE file that accompanied this code.
4162#
4163# This code is distributed in the hope that it will be useful, but WITHOUT
4164# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4165# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4166# version 2 for more details (a copy is included in the LICENSE file that
4167# accompanied this code).
4168#
4169# You should have received a copy of the GNU General Public License version
4170# 2 along with this work; if not, write to the Free Software Foundation,
4171# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4172#
4173# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4174# or visit www.oracle.com if you need additional information or have any
4175# questions.
4176#
4177
4178########################################################################
4179# This file is responsible for detecting, verifying and setting up the
4180# toolchain, i.e. the compiler, linker and related utilities. It will setup
4181# proper paths to the binaries, but it will not setup any flags.
4182#
4183# The binaries used is determined by the toolchain type, which is the family of
4184# compilers and related tools that are used.
4185########################################################################
4186
4187
4188# All valid toolchains, regardless of platform (used by help.m4)
4189VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4190
4191# These toolchains are valid on different platforms
4192VALID_TOOLCHAINS_linux="gcc clang"
4193VALID_TOOLCHAINS_solaris="solstudio"
4194VALID_TOOLCHAINS_macosx="gcc clang"
4195VALID_TOOLCHAINS_aix="xlc"
4196VALID_TOOLCHAINS_windows="microsoft"
4197
4198# Toolchain descriptions
4199TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4200TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4201TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4202TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4203TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4204
4205# Setup a number of variables describing how native output files are
4206# named on this platform/toolchain.
4207
4208
4209# Determine which toolchain type to use, and make sure it is valid for this
4210# platform. Setup various information about the selected toolchain.
4211
4212
4213# Before we start detecting the toolchain executables, we might need some
4214# special setup, e.g. additional paths etc.
4215
4216
4217# Restore path, etc
4218
4219
4220# Check if a compiler is of the toolchain type we expect, and save the version
4221# information from it. If the compiler does not match the expected type,
4222# this function will abort using AC_MSG_ERROR. If it matches, the version will
4223# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4224# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4225#
4226# $1 = compiler to test (CC or CXX)
4227# $2 = human readable name of compiler (C or C++)
4228
4229
4230# Try to locate the given C or C++ compiler in the path, or otherwise.
4231#
4232# $1 = compiler to test (CC or CXX)
4233# $2 = human readable name of compiler (C or C++)
4234# $3 = list of compiler names to search for
4235
4236
4237# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4238# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4239# archiver (AR). Verify that the compilers are correct according to the
4240# toolchain type.
4241
4242
4243# Setup additional tools that is considered a part of the toolchain, but not the
4244# core part. Many of these are highly platform-specific and do not exist,
4245# and/or are not needed on all platforms.
4246
4247
4248# Setup the build tools (i.e, the compiler and linker used to build programs
4249# that should be run on the build platform, not the target platform, as a build
4250# helper). Since the non-cross-compile case uses the normal, target compilers
4251# for this, we can only do this after these have been setup.
4252
4253
4254# Setup legacy variables that are still needed as alternative ways to refer to
4255# parts of the toolchain.
4256
4257
4258# Do some additional checks on the detected tools.
4259
4260
4261# Setup the JTReg Regression Test Harness.
4262
4263
4264#
4265# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4266# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4267#
4268# This code is free software; you can redistribute it and/or modify it
4269# under the terms of the GNU General Public License version 2 only, as
4270# published by the Free Software Foundation.  Oracle designates this
4271# particular file as subject to the "Classpath" exception as provided
4272# by Oracle in the LICENSE file that accompanied this code.
4273#
4274# This code is distributed in the hope that it will be useful, but WITHOUT
4275# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4276# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4277# version 2 for more details (a copy is included in the LICENSE file that
4278# accompanied this code).
4279#
4280# You should have received a copy of the GNU General Public License version
4281# 2 along with this work; if not, write to the Free Software Foundation,
4282# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4283#
4284# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4285# or visit www.oracle.com if you need additional information or have any
4286# questions.
4287#
4288
4289################################################################################
4290# The order of these defines the priority by which we try to find them.
4291VALID_VS_VERSIONS="2013 2012 2010"
4292
4293VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4294VS_VERSION_INTERNAL_2010=100
4295VS_MSVCR_2010=msvcr100.dll
4296# We don't use msvcp on Visual Studio 2010
4297#VS_MSVCP_2010=msvcp100.dll
4298VS_ENVVAR_2010="VS100COMNTOOLS"
4299VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4300VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4301VS_VS_PLATFORM_NAME_2010="v100"
4302VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4303
4304VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4305VS_VERSION_INTERNAL_2012=110
4306VS_MSVCR_2012=msvcr110.dll
4307VS_MSVCP_2012=msvcp110.dll
4308VS_ENVVAR_2012="VS110COMNTOOLS"
4309VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4310VS_SDK_INSTALLDIR_2012=
4311VS_VS_PLATFORM_NAME_2012="v110"
4312VS_SDK_PLATFORM_NAME_2012=
4313
4314VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4315VS_VERSION_INTERNAL_2013=120
4316VS_MSVCR_2013=msvcr120.dll
4317VS_MSVCP_2013=msvcp120.dll
4318VS_ENVVAR_2013="VS120COMNTOOLS"
4319VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4320VS_SDK_INSTALLDIR_2013=
4321VS_VS_PLATFORM_NAME_2013="v120"
4322VS_SDK_PLATFORM_NAME_2013=
4323
4324################################################################################
4325
4326
4327
4328################################################################################
4329
4330
4331
4332################################################################################
4333# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4334# build environment and assigns it to VS_ENV_CMD
4335
4336
4337################################################################################
4338
4339
4340
4341################################################################################
4342# Check if the VS env variables were setup prior to running configure.
4343# If not, then find vcvarsall.bat and run it automatically, and integrate
4344# the set env variables into the spec file.
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359# This line needs to be here, verbatim, after all includes and the dummy hook
4360# definitions. It is replaced with custom functionality when building
4361# custom sources.
4362#CUSTOM_AUTOCONF_INCLUDE
4363
4364# Do not change or remove the following line, it is needed for consistency checks:
4365DATE_WHEN_GENERATED=1442820670
4366
4367###############################################################################
4368#
4369# Initialization / Boot-strapping
4370#
4371# The bootstrapping process needs to solve the "chicken or the egg" problem,
4372# thus it jumps back and forth, each time gaining something needed later on.
4373#
4374###############################################################################
4375
4376# If we are requested to print additional help, do that and then exit.
4377# This must be the very first call.
4378
4379  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4380    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4381    $PRINTF "Which are valid to use depends on the build platform.\n"
4382    for toolchain in $VALID_TOOLCHAINS_all; do
4383      # Use indirect variable referencing
4384      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4385      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4386      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4387    done
4388
4389    # And now exit directly
4390    exit 0
4391  fi
4392
4393
4394# Basic initialization that must happen first of all in the normal process.
4395
4396  # Save the original command line. This is passed to us by the wrapper configure script.
4397
4398  # Save the path variable before it gets changed
4399  ORIGINAL_PATH="$PATH"
4400
4401  DATE_WHEN_CONFIGURED=`LANG=C date`
4402
4403  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4404$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4405  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4406$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4407
4408
4409  # Start with tools that do not need have cross compilation support
4410  # and can be expected to be found in the default PATH. These tools are
4411  # used by configure. Nor are these tools expected to be found in the
4412  # devkit from the builddeps server either, since they are
4413  # needed to download the devkit.
4414
4415  # First are all the simple required tools.
4416
4417
4418
4419  # Publish this variable in the help.
4420
4421
4422  if test "x$BASENAME" = x; then
4423    # The variable is not set by user, try to locate tool using the code snippet
4424    for ac_prog in basename
4425do
4426  # Extract the first word of "$ac_prog", so it can be a program name with args.
4427set dummy $ac_prog; ac_word=$2
4428{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4429$as_echo_n "checking for $ac_word... " >&6; }
4430if ${ac_cv_path_BASENAME+:} false; then :
4431  $as_echo_n "(cached) " >&6
4432else
4433  case $BASENAME in
4434  [\\/]* | ?:[\\/]*)
4435  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4436  ;;
4437  *)
4438  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in $PATH
4440do
4441  IFS=$as_save_IFS
4442  test -z "$as_dir" && as_dir=.
4443    for ac_exec_ext in '' $ac_executable_extensions; do
4444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4445    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447    break 2
4448  fi
4449done
4450  done
4451IFS=$as_save_IFS
4452
4453  ;;
4454esac
4455fi
4456BASENAME=$ac_cv_path_BASENAME
4457if test -n "$BASENAME"; then
4458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4459$as_echo "$BASENAME" >&6; }
4460else
4461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4462$as_echo "no" >&6; }
4463fi
4464
4465
4466  test -n "$BASENAME" && break
4467done
4468
4469  else
4470    # The variable is set, but is it from the command line or the environment?
4471
4472    # Try to remove the string !BASENAME! from our list.
4473    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4474    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4475      # If it failed, the variable was not from the command line. Ignore it,
4476      # but warn the user (except for BASH, which is always set by the calling BASH).
4477      if test "xBASENAME" != xBASH; then
4478        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4479$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4480      fi
4481      # Try to locate tool using the code snippet
4482      for ac_prog in basename
4483do
4484  # Extract the first word of "$ac_prog", so it can be a program name with args.
4485set dummy $ac_prog; ac_word=$2
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487$as_echo_n "checking for $ac_word... " >&6; }
4488if ${ac_cv_path_BASENAME+:} false; then :
4489  $as_echo_n "(cached) " >&6
4490else
4491  case $BASENAME in
4492  [\\/]* | ?:[\\/]*)
4493  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4494  ;;
4495  *)
4496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in $PATH
4498do
4499  IFS=$as_save_IFS
4500  test -z "$as_dir" && as_dir=.
4501    for ac_exec_ext in '' $ac_executable_extensions; do
4502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4503    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4505    break 2
4506  fi
4507done
4508  done
4509IFS=$as_save_IFS
4510
4511  ;;
4512esac
4513fi
4514BASENAME=$ac_cv_path_BASENAME
4515if test -n "$BASENAME"; then
4516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4517$as_echo "$BASENAME" >&6; }
4518else
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520$as_echo "no" >&6; }
4521fi
4522
4523
4524  test -n "$BASENAME" && break
4525done
4526
4527    else
4528      # If it succeeded, then it was overridden by the user. We will use it
4529      # for the tool.
4530
4531      # First remove it from the list of overridden variables, so we can test
4532      # for unknown variables in the end.
4533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4534
4535      # Check if the provided tool contains a complete path.
4536      tool_specified="$BASENAME"
4537      tool_basename="${tool_specified##*/}"
4538      if test "x$tool_basename" = "x$tool_specified"; then
4539        # A command without a complete path is provided, search $PATH.
4540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4541$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4542        # Extract the first word of "$tool_basename", so it can be a program name with args.
4543set dummy $tool_basename; ac_word=$2
4544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4545$as_echo_n "checking for $ac_word... " >&6; }
4546if ${ac_cv_path_BASENAME+:} false; then :
4547  $as_echo_n "(cached) " >&6
4548else
4549  case $BASENAME in
4550  [\\/]* | ?:[\\/]*)
4551  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4552  ;;
4553  *)
4554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in $PATH
4556do
4557  IFS=$as_save_IFS
4558  test -z "$as_dir" && as_dir=.
4559    for ac_exec_ext in '' $ac_executable_extensions; do
4560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4561    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4563    break 2
4564  fi
4565done
4566  done
4567IFS=$as_save_IFS
4568
4569  ;;
4570esac
4571fi
4572BASENAME=$ac_cv_path_BASENAME
4573if test -n "$BASENAME"; then
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4575$as_echo "$BASENAME" >&6; }
4576else
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4578$as_echo "no" >&6; }
4579fi
4580
4581
4582        if test "x$BASENAME" = x; then
4583          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4584        fi
4585      else
4586        # Otherwise we believe it is a complete path. Use it as it is.
4587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4588$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4589        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4590$as_echo_n "checking for BASENAME... " >&6; }
4591        if test ! -x "$tool_specified"; then
4592          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4593$as_echo "not found" >&6; }
4594          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4595        fi
4596        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4597$as_echo "$tool_specified" >&6; }
4598      fi
4599    fi
4600  fi
4601
4602
4603
4604  if test "x$BASENAME" = x; then
4605    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4606  fi
4607
4608
4609
4610
4611
4612  # Publish this variable in the help.
4613
4614
4615  if test "x$BASH" = x; then
4616    # The variable is not set by user, try to locate tool using the code snippet
4617    for ac_prog in bash
4618do
4619  # Extract the first word of "$ac_prog", so it can be a program name with args.
4620set dummy $ac_prog; ac_word=$2
4621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4622$as_echo_n "checking for $ac_word... " >&6; }
4623if ${ac_cv_path_BASH+:} false; then :
4624  $as_echo_n "(cached) " >&6
4625else
4626  case $BASH in
4627  [\\/]* | ?:[\\/]*)
4628  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4629  ;;
4630  *)
4631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4632for as_dir in $PATH
4633do
4634  IFS=$as_save_IFS
4635  test -z "$as_dir" && as_dir=.
4636    for ac_exec_ext in '' $ac_executable_extensions; do
4637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4638    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4640    break 2
4641  fi
4642done
4643  done
4644IFS=$as_save_IFS
4645
4646  ;;
4647esac
4648fi
4649BASH=$ac_cv_path_BASH
4650if test -n "$BASH"; then
4651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4652$as_echo "$BASH" >&6; }
4653else
4654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4655$as_echo "no" >&6; }
4656fi
4657
4658
4659  test -n "$BASH" && break
4660done
4661
4662  else
4663    # The variable is set, but is it from the command line or the environment?
4664
4665    # Try to remove the string !BASH! from our list.
4666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4668      # If it failed, the variable was not from the command line. Ignore it,
4669      # but warn the user (except for BASH, which is always set by the calling BASH).
4670      if test "xBASH" != xBASH; then
4671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4672$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4673      fi
4674      # Try to locate tool using the code snippet
4675      for ac_prog in bash
4676do
4677  # Extract the first word of "$ac_prog", so it can be a program name with args.
4678set dummy $ac_prog; ac_word=$2
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
4681if ${ac_cv_path_BASH+:} false; then :
4682  $as_echo_n "(cached) " >&6
4683else
4684  case $BASH in
4685  [\\/]* | ?:[\\/]*)
4686  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4687  ;;
4688  *)
4689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in $PATH
4691do
4692  IFS=$as_save_IFS
4693  test -z "$as_dir" && as_dir=.
4694    for ac_exec_ext in '' $ac_executable_extensions; do
4695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4696    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698    break 2
4699  fi
4700done
4701  done
4702IFS=$as_save_IFS
4703
4704  ;;
4705esac
4706fi
4707BASH=$ac_cv_path_BASH
4708if test -n "$BASH"; then
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4710$as_echo "$BASH" >&6; }
4711else
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716
4717  test -n "$BASH" && break
4718done
4719
4720    else
4721      # If it succeeded, then it was overridden by the user. We will use it
4722      # for the tool.
4723
4724      # First remove it from the list of overridden variables, so we can test
4725      # for unknown variables in the end.
4726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4727
4728      # Check if the provided tool contains a complete path.
4729      tool_specified="$BASH"
4730      tool_basename="${tool_specified##*/}"
4731      if test "x$tool_basename" = "x$tool_specified"; then
4732        # A command without a complete path is provided, search $PATH.
4733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4734$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4735        # Extract the first word of "$tool_basename", so it can be a program name with args.
4736set dummy $tool_basename; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_path_BASH+:} false; then :
4740  $as_echo_n "(cached) " >&6
4741else
4742  case $BASH in
4743  [\\/]* | ?:[\\/]*)
4744  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4745  ;;
4746  *)
4747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750  IFS=$as_save_IFS
4751  test -z "$as_dir" && as_dir=.
4752    for ac_exec_ext in '' $ac_executable_extensions; do
4753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4754    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756    break 2
4757  fi
4758done
4759  done
4760IFS=$as_save_IFS
4761
4762  ;;
4763esac
4764fi
4765BASH=$ac_cv_path_BASH
4766if test -n "$BASH"; then
4767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4768$as_echo "$BASH" >&6; }
4769else
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771$as_echo "no" >&6; }
4772fi
4773
4774
4775        if test "x$BASH" = x; then
4776          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4777        fi
4778      else
4779        # Otherwise we believe it is a complete path. Use it as it is.
4780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4781$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4783$as_echo_n "checking for BASH... " >&6; }
4784        if test ! -x "$tool_specified"; then
4785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4786$as_echo "not found" >&6; }
4787          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4788        fi
4789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4790$as_echo "$tool_specified" >&6; }
4791      fi
4792    fi
4793  fi
4794
4795
4796
4797  if test "x$BASH" = x; then
4798    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4799  fi
4800
4801
4802
4803
4804
4805  # Publish this variable in the help.
4806
4807
4808  if test "x$CAT" = x; then
4809    # The variable is not set by user, try to locate tool using the code snippet
4810    for ac_prog in cat
4811do
4812  # Extract the first word of "$ac_prog", so it can be a program name with args.
4813set dummy $ac_prog; ac_word=$2
4814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4815$as_echo_n "checking for $ac_word... " >&6; }
4816if ${ac_cv_path_CAT+:} false; then :
4817  $as_echo_n "(cached) " >&6
4818else
4819  case $CAT in
4820  [\\/]* | ?:[\\/]*)
4821  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4822  ;;
4823  *)
4824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4825for as_dir in $PATH
4826do
4827  IFS=$as_save_IFS
4828  test -z "$as_dir" && as_dir=.
4829    for ac_exec_ext in '' $ac_executable_extensions; do
4830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4831    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4833    break 2
4834  fi
4835done
4836  done
4837IFS=$as_save_IFS
4838
4839  ;;
4840esac
4841fi
4842CAT=$ac_cv_path_CAT
4843if test -n "$CAT"; then
4844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4845$as_echo "$CAT" >&6; }
4846else
4847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4848$as_echo "no" >&6; }
4849fi
4850
4851
4852  test -n "$CAT" && break
4853done
4854
4855  else
4856    # The variable is set, but is it from the command line or the environment?
4857
4858    # Try to remove the string !CAT! from our list.
4859    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4860    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4861      # If it failed, the variable was not from the command line. Ignore it,
4862      # but warn the user (except for BASH, which is always set by the calling BASH).
4863      if test "xCAT" != xBASH; then
4864        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4865$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4866      fi
4867      # Try to locate tool using the code snippet
4868      for ac_prog in cat
4869do
4870  # Extract the first word of "$ac_prog", so it can be a program name with args.
4871set dummy $ac_prog; ac_word=$2
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4873$as_echo_n "checking for $ac_word... " >&6; }
4874if ${ac_cv_path_CAT+:} false; then :
4875  $as_echo_n "(cached) " >&6
4876else
4877  case $CAT in
4878  [\\/]* | ?:[\\/]*)
4879  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4880  ;;
4881  *)
4882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in $PATH
4884do
4885  IFS=$as_save_IFS
4886  test -z "$as_dir" && as_dir=.
4887    for ac_exec_ext in '' $ac_executable_extensions; do
4888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4889    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891    break 2
4892  fi
4893done
4894  done
4895IFS=$as_save_IFS
4896
4897  ;;
4898esac
4899fi
4900CAT=$ac_cv_path_CAT
4901if test -n "$CAT"; then
4902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4903$as_echo "$CAT" >&6; }
4904else
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4906$as_echo "no" >&6; }
4907fi
4908
4909
4910  test -n "$CAT" && break
4911done
4912
4913    else
4914      # If it succeeded, then it was overridden by the user. We will use it
4915      # for the tool.
4916
4917      # First remove it from the list of overridden variables, so we can test
4918      # for unknown variables in the end.
4919      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4920
4921      # Check if the provided tool contains a complete path.
4922      tool_specified="$CAT"
4923      tool_basename="${tool_specified##*/}"
4924      if test "x$tool_basename" = "x$tool_specified"; then
4925        # A command without a complete path is provided, search $PATH.
4926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4927$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4928        # Extract the first word of "$tool_basename", so it can be a program name with args.
4929set dummy $tool_basename; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
4932if ${ac_cv_path_CAT+:} false; then :
4933  $as_echo_n "(cached) " >&6
4934else
4935  case $CAT in
4936  [\\/]* | ?:[\\/]*)
4937  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4938  ;;
4939  *)
4940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in $PATH
4942do
4943  IFS=$as_save_IFS
4944  test -z "$as_dir" && as_dir=.
4945    for ac_exec_ext in '' $ac_executable_extensions; do
4946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4947    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949    break 2
4950  fi
4951done
4952  done
4953IFS=$as_save_IFS
4954
4955  ;;
4956esac
4957fi
4958CAT=$ac_cv_path_CAT
4959if test -n "$CAT"; then
4960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4961$as_echo "$CAT" >&6; }
4962else
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967
4968        if test "x$CAT" = x; then
4969          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4970        fi
4971      else
4972        # Otherwise we believe it is a complete path. Use it as it is.
4973        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4974$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4975        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4976$as_echo_n "checking for CAT... " >&6; }
4977        if test ! -x "$tool_specified"; then
4978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4979$as_echo "not found" >&6; }
4980          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4981        fi
4982        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4983$as_echo "$tool_specified" >&6; }
4984      fi
4985    fi
4986  fi
4987
4988
4989
4990  if test "x$CAT" = x; then
4991    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4992  fi
4993
4994
4995
4996
4997
4998  # Publish this variable in the help.
4999
5000
5001  if test "x$CHMOD" = x; then
5002    # The variable is not set by user, try to locate tool using the code snippet
5003    for ac_prog in chmod
5004do
5005  # Extract the first word of "$ac_prog", so it can be a program name with args.
5006set dummy $ac_prog; ac_word=$2
5007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5008$as_echo_n "checking for $ac_word... " >&6; }
5009if ${ac_cv_path_CHMOD+:} false; then :
5010  $as_echo_n "(cached) " >&6
5011else
5012  case $CHMOD in
5013  [\\/]* | ?:[\\/]*)
5014  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5015  ;;
5016  *)
5017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5018for as_dir in $PATH
5019do
5020  IFS=$as_save_IFS
5021  test -z "$as_dir" && as_dir=.
5022    for ac_exec_ext in '' $ac_executable_extensions; do
5023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5024    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5026    break 2
5027  fi
5028done
5029  done
5030IFS=$as_save_IFS
5031
5032  ;;
5033esac
5034fi
5035CHMOD=$ac_cv_path_CHMOD
5036if test -n "$CHMOD"; then
5037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5038$as_echo "$CHMOD" >&6; }
5039else
5040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5041$as_echo "no" >&6; }
5042fi
5043
5044
5045  test -n "$CHMOD" && break
5046done
5047
5048  else
5049    # The variable is set, but is it from the command line or the environment?
5050
5051    # Try to remove the string !CHMOD! from our list.
5052    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5053    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5054      # If it failed, the variable was not from the command line. Ignore it,
5055      # but warn the user (except for BASH, which is always set by the calling BASH).
5056      if test "xCHMOD" != xBASH; then
5057        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5058$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5059      fi
5060      # Try to locate tool using the code snippet
5061      for ac_prog in chmod
5062do
5063  # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if ${ac_cv_path_CHMOD+:} false; then :
5068  $as_echo_n "(cached) " >&6
5069else
5070  case $CHMOD in
5071  [\\/]* | ?:[\\/]*)
5072  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5073  ;;
5074  *)
5075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078  IFS=$as_save_IFS
5079  test -z "$as_dir" && as_dir=.
5080    for ac_exec_ext in '' $ac_executable_extensions; do
5081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5082    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5084    break 2
5085  fi
5086done
5087  done
5088IFS=$as_save_IFS
5089
5090  ;;
5091esac
5092fi
5093CHMOD=$ac_cv_path_CHMOD
5094if test -n "$CHMOD"; then
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5096$as_echo "$CHMOD" >&6; }
5097else
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
5100fi
5101
5102
5103  test -n "$CHMOD" && break
5104done
5105
5106    else
5107      # If it succeeded, then it was overridden by the user. We will use it
5108      # for the tool.
5109
5110      # First remove it from the list of overridden variables, so we can test
5111      # for unknown variables in the end.
5112      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5113
5114      # Check if the provided tool contains a complete path.
5115      tool_specified="$CHMOD"
5116      tool_basename="${tool_specified##*/}"
5117      if test "x$tool_basename" = "x$tool_specified"; then
5118        # A command without a complete path is provided, search $PATH.
5119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5120$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5121        # Extract the first word of "$tool_basename", so it can be a program name with args.
5122set dummy $tool_basename; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if ${ac_cv_path_CHMOD+:} false; then :
5126  $as_echo_n "(cached) " >&6
5127else
5128  case $CHMOD in
5129  [\\/]* | ?:[\\/]*)
5130  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5131  ;;
5132  *)
5133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136  IFS=$as_save_IFS
5137  test -z "$as_dir" && as_dir=.
5138    for ac_exec_ext in '' $ac_executable_extensions; do
5139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142    break 2
5143  fi
5144done
5145  done
5146IFS=$as_save_IFS
5147
5148  ;;
5149esac
5150fi
5151CHMOD=$ac_cv_path_CHMOD
5152if test -n "$CHMOD"; then
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5154$as_echo "$CHMOD" >&6; }
5155else
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161        if test "x$CHMOD" = x; then
5162          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5163        fi
5164      else
5165        # Otherwise we believe it is a complete path. Use it as it is.
5166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5167$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5168        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5169$as_echo_n "checking for CHMOD... " >&6; }
5170        if test ! -x "$tool_specified"; then
5171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5172$as_echo "not found" >&6; }
5173          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5174        fi
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5176$as_echo "$tool_specified" >&6; }
5177      fi
5178    fi
5179  fi
5180
5181
5182
5183  if test "x$CHMOD" = x; then
5184    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5185  fi
5186
5187
5188
5189
5190
5191  # Publish this variable in the help.
5192
5193
5194  if test "x$CMP" = x; then
5195    # The variable is not set by user, try to locate tool using the code snippet
5196    for ac_prog in cmp
5197do
5198  # Extract the first word of "$ac_prog", so it can be a program name with args.
5199set dummy $ac_prog; ac_word=$2
5200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5201$as_echo_n "checking for $ac_word... " >&6; }
5202if ${ac_cv_path_CMP+:} false; then :
5203  $as_echo_n "(cached) " >&6
5204else
5205  case $CMP in
5206  [\\/]* | ?:[\\/]*)
5207  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5208  ;;
5209  *)
5210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5211for as_dir in $PATH
5212do
5213  IFS=$as_save_IFS
5214  test -z "$as_dir" && as_dir=.
5215    for ac_exec_ext in '' $ac_executable_extensions; do
5216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5217    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5219    break 2
5220  fi
5221done
5222  done
5223IFS=$as_save_IFS
5224
5225  ;;
5226esac
5227fi
5228CMP=$ac_cv_path_CMP
5229if test -n "$CMP"; then
5230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5231$as_echo "$CMP" >&6; }
5232else
5233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5234$as_echo "no" >&6; }
5235fi
5236
5237
5238  test -n "$CMP" && break
5239done
5240
5241  else
5242    # The variable is set, but is it from the command line or the environment?
5243
5244    # Try to remove the string !CMP! from our list.
5245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5247      # If it failed, the variable was not from the command line. Ignore it,
5248      # but warn the user (except for BASH, which is always set by the calling BASH).
5249      if test "xCMP" != xBASH; then
5250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5251$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5252      fi
5253      # Try to locate tool using the code snippet
5254      for ac_prog in cmp
5255do
5256  # Extract the first word of "$ac_prog", so it can be a program name with args.
5257set dummy $ac_prog; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
5260if ${ac_cv_path_CMP+:} false; then :
5261  $as_echo_n "(cached) " >&6
5262else
5263  case $CMP in
5264  [\\/]* | ?:[\\/]*)
5265  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5266  ;;
5267  *)
5268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269for as_dir in $PATH
5270do
5271  IFS=$as_save_IFS
5272  test -z "$as_dir" && as_dir=.
5273    for ac_exec_ext in '' $ac_executable_extensions; do
5274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5275    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277    break 2
5278  fi
5279done
5280  done
5281IFS=$as_save_IFS
5282
5283  ;;
5284esac
5285fi
5286CMP=$ac_cv_path_CMP
5287if test -n "$CMP"; then
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5289$as_echo "$CMP" >&6; }
5290else
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }
5293fi
5294
5295
5296  test -n "$CMP" && break
5297done
5298
5299    else
5300      # If it succeeded, then it was overridden by the user. We will use it
5301      # for the tool.
5302
5303      # First remove it from the list of overridden variables, so we can test
5304      # for unknown variables in the end.
5305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5306
5307      # Check if the provided tool contains a complete path.
5308      tool_specified="$CMP"
5309      tool_basename="${tool_specified##*/}"
5310      if test "x$tool_basename" = "x$tool_specified"; then
5311        # A command without a complete path is provided, search $PATH.
5312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5313$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5314        # Extract the first word of "$tool_basename", so it can be a program name with args.
5315set dummy $tool_basename; ac_word=$2
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5317$as_echo_n "checking for $ac_word... " >&6; }
5318if ${ac_cv_path_CMP+:} false; then :
5319  $as_echo_n "(cached) " >&6
5320else
5321  case $CMP in
5322  [\\/]* | ?:[\\/]*)
5323  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5324  ;;
5325  *)
5326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5327for as_dir in $PATH
5328do
5329  IFS=$as_save_IFS
5330  test -z "$as_dir" && as_dir=.
5331    for ac_exec_ext in '' $ac_executable_extensions; do
5332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5333    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5335    break 2
5336  fi
5337done
5338  done
5339IFS=$as_save_IFS
5340
5341  ;;
5342esac
5343fi
5344CMP=$ac_cv_path_CMP
5345if test -n "$CMP"; then
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5347$as_echo "$CMP" >&6; }
5348else
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352
5353
5354        if test "x$CMP" = x; then
5355          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5356        fi
5357      else
5358        # Otherwise we believe it is a complete path. Use it as it is.
5359        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5360$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5361        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5362$as_echo_n "checking for CMP... " >&6; }
5363        if test ! -x "$tool_specified"; then
5364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5365$as_echo "not found" >&6; }
5366          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5367        fi
5368        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5369$as_echo "$tool_specified" >&6; }
5370      fi
5371    fi
5372  fi
5373
5374
5375
5376  if test "x$CMP" = x; then
5377    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5378  fi
5379
5380
5381
5382
5383
5384  # Publish this variable in the help.
5385
5386
5387  if test "x$COMM" = x; then
5388    # The variable is not set by user, try to locate tool using the code snippet
5389    for ac_prog in comm
5390do
5391  # Extract the first word of "$ac_prog", so it can be a program name with args.
5392set dummy $ac_prog; ac_word=$2
5393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5394$as_echo_n "checking for $ac_word... " >&6; }
5395if ${ac_cv_path_COMM+:} false; then :
5396  $as_echo_n "(cached) " >&6
5397else
5398  case $COMM in
5399  [\\/]* | ?:[\\/]*)
5400  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5401  ;;
5402  *)
5403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5404for as_dir in $PATH
5405do
5406  IFS=$as_save_IFS
5407  test -z "$as_dir" && as_dir=.
5408    for ac_exec_ext in '' $ac_executable_extensions; do
5409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5410    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5412    break 2
5413  fi
5414done
5415  done
5416IFS=$as_save_IFS
5417
5418  ;;
5419esac
5420fi
5421COMM=$ac_cv_path_COMM
5422if test -n "$COMM"; then
5423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5424$as_echo "$COMM" >&6; }
5425else
5426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5427$as_echo "no" >&6; }
5428fi
5429
5430
5431  test -n "$COMM" && break
5432done
5433
5434  else
5435    # The variable is set, but is it from the command line or the environment?
5436
5437    # Try to remove the string !COMM! from our list.
5438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5440      # If it failed, the variable was not from the command line. Ignore it,
5441      # but warn the user (except for BASH, which is always set by the calling BASH).
5442      if test "xCOMM" != xBASH; then
5443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5444$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5445      fi
5446      # Try to locate tool using the code snippet
5447      for ac_prog in comm
5448do
5449  # Extract the first word of "$ac_prog", so it can be a program name with args.
5450set dummy $ac_prog; ac_word=$2
5451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452$as_echo_n "checking for $ac_word... " >&6; }
5453if ${ac_cv_path_COMM+:} false; then :
5454  $as_echo_n "(cached) " >&6
5455else
5456  case $COMM in
5457  [\\/]* | ?:[\\/]*)
5458  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5459  ;;
5460  *)
5461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462for as_dir in $PATH
5463do
5464  IFS=$as_save_IFS
5465  test -z "$as_dir" && as_dir=.
5466    for ac_exec_ext in '' $ac_executable_extensions; do
5467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470    break 2
5471  fi
5472done
5473  done
5474IFS=$as_save_IFS
5475
5476  ;;
5477esac
5478fi
5479COMM=$ac_cv_path_COMM
5480if test -n "$COMM"; then
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5482$as_echo "$COMM" >&6; }
5483else
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485$as_echo "no" >&6; }
5486fi
5487
5488
5489  test -n "$COMM" && break
5490done
5491
5492    else
5493      # If it succeeded, then it was overridden by the user. We will use it
5494      # for the tool.
5495
5496      # First remove it from the list of overridden variables, so we can test
5497      # for unknown variables in the end.
5498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5499
5500      # Check if the provided tool contains a complete path.
5501      tool_specified="$COMM"
5502      tool_basename="${tool_specified##*/}"
5503      if test "x$tool_basename" = "x$tool_specified"; then
5504        # A command without a complete path is provided, search $PATH.
5505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5506$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5507        # Extract the first word of "$tool_basename", so it can be a program name with args.
5508set dummy $tool_basename; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_COMM+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $COMM in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537COMM=$ac_cv_path_COMM
5538if test -n "$COMM"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5540$as_echo "$COMM" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547        if test "x$COMM" = x; then
5548          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5549        fi
5550      else
5551        # Otherwise we believe it is a complete path. Use it as it is.
5552        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5553$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5554        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5555$as_echo_n "checking for COMM... " >&6; }
5556        if test ! -x "$tool_specified"; then
5557          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5558$as_echo "not found" >&6; }
5559          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5560        fi
5561        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5562$as_echo "$tool_specified" >&6; }
5563      fi
5564    fi
5565  fi
5566
5567
5568
5569  if test "x$COMM" = x; then
5570    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5571  fi
5572
5573
5574
5575
5576
5577  # Publish this variable in the help.
5578
5579
5580  if test "x$CP" = x; then
5581    # The variable is not set by user, try to locate tool using the code snippet
5582    for ac_prog in cp
5583do
5584  # Extract the first word of "$ac_prog", so it can be a program name with args.
5585set dummy $ac_prog; ac_word=$2
5586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5587$as_echo_n "checking for $ac_word... " >&6; }
5588if ${ac_cv_path_CP+:} false; then :
5589  $as_echo_n "(cached) " >&6
5590else
5591  case $CP in
5592  [\\/]* | ?:[\\/]*)
5593  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5594  ;;
5595  *)
5596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5597for as_dir in $PATH
5598do
5599  IFS=$as_save_IFS
5600  test -z "$as_dir" && as_dir=.
5601    for ac_exec_ext in '' $ac_executable_extensions; do
5602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5603    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5605    break 2
5606  fi
5607done
5608  done
5609IFS=$as_save_IFS
5610
5611  ;;
5612esac
5613fi
5614CP=$ac_cv_path_CP
5615if test -n "$CP"; then
5616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5617$as_echo "$CP" >&6; }
5618else
5619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5620$as_echo "no" >&6; }
5621fi
5622
5623
5624  test -n "$CP" && break
5625done
5626
5627  else
5628    # The variable is set, but is it from the command line or the environment?
5629
5630    # Try to remove the string !CP! from our list.
5631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5633      # If it failed, the variable was not from the command line. Ignore it,
5634      # but warn the user (except for BASH, which is always set by the calling BASH).
5635      if test "xCP" != xBASH; then
5636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5637$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5638      fi
5639      # Try to locate tool using the code snippet
5640      for ac_prog in cp
5641do
5642  # Extract the first word of "$ac_prog", so it can be a program name with args.
5643set dummy $ac_prog; ac_word=$2
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
5646if ${ac_cv_path_CP+:} false; then :
5647  $as_echo_n "(cached) " >&6
5648else
5649  case $CP in
5650  [\\/]* | ?:[\\/]*)
5651  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5652  ;;
5653  *)
5654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5655for as_dir in $PATH
5656do
5657  IFS=$as_save_IFS
5658  test -z "$as_dir" && as_dir=.
5659    for ac_exec_ext in '' $ac_executable_extensions; do
5660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5661    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5663    break 2
5664  fi
5665done
5666  done
5667IFS=$as_save_IFS
5668
5669  ;;
5670esac
5671fi
5672CP=$ac_cv_path_CP
5673if test -n "$CP"; then
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5675$as_echo "$CP" >&6; }
5676else
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5678$as_echo "no" >&6; }
5679fi
5680
5681
5682  test -n "$CP" && break
5683done
5684
5685    else
5686      # If it succeeded, then it was overridden by the user. We will use it
5687      # for the tool.
5688
5689      # First remove it from the list of overridden variables, so we can test
5690      # for unknown variables in the end.
5691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5692
5693      # Check if the provided tool contains a complete path.
5694      tool_specified="$CP"
5695      tool_basename="${tool_specified##*/}"
5696      if test "x$tool_basename" = "x$tool_specified"; then
5697        # A command without a complete path is provided, search $PATH.
5698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5699$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5700        # Extract the first word of "$tool_basename", so it can be a program name with args.
5701set dummy $tool_basename; ac_word=$2
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703$as_echo_n "checking for $ac_word... " >&6; }
5704if ${ac_cv_path_CP+:} false; then :
5705  $as_echo_n "(cached) " >&6
5706else
5707  case $CP in
5708  [\\/]* | ?:[\\/]*)
5709  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5710  ;;
5711  *)
5712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713for as_dir in $PATH
5714do
5715  IFS=$as_save_IFS
5716  test -z "$as_dir" && as_dir=.
5717    for ac_exec_ext in '' $ac_executable_extensions; do
5718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5719    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5721    break 2
5722  fi
5723done
5724  done
5725IFS=$as_save_IFS
5726
5727  ;;
5728esac
5729fi
5730CP=$ac_cv_path_CP
5731if test -n "$CP"; then
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5733$as_echo "$CP" >&6; }
5734else
5735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5736$as_echo "no" >&6; }
5737fi
5738
5739
5740        if test "x$CP" = x; then
5741          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5742        fi
5743      else
5744        # Otherwise we believe it is a complete path. Use it as it is.
5745        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5746$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5748$as_echo_n "checking for CP... " >&6; }
5749        if test ! -x "$tool_specified"; then
5750          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5751$as_echo "not found" >&6; }
5752          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5753        fi
5754        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5755$as_echo "$tool_specified" >&6; }
5756      fi
5757    fi
5758  fi
5759
5760
5761
5762  if test "x$CP" = x; then
5763    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5764  fi
5765
5766
5767
5768
5769
5770  # Publish this variable in the help.
5771
5772
5773  if test "x$CUT" = x; then
5774    # The variable is not set by user, try to locate tool using the code snippet
5775    for ac_prog in cut
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if ${ac_cv_path_CUT+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  case $CUT in
5785  [\\/]* | ?:[\\/]*)
5786  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5787  ;;
5788  *)
5789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5790for as_dir in $PATH
5791do
5792  IFS=$as_save_IFS
5793  test -z "$as_dir" && as_dir=.
5794    for ac_exec_ext in '' $ac_executable_extensions; do
5795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5796    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798    break 2
5799  fi
5800done
5801  done
5802IFS=$as_save_IFS
5803
5804  ;;
5805esac
5806fi
5807CUT=$ac_cv_path_CUT
5808if test -n "$CUT"; then
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5810$as_echo "$CUT" >&6; }
5811else
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817  test -n "$CUT" && break
5818done
5819
5820  else
5821    # The variable is set, but is it from the command line or the environment?
5822
5823    # Try to remove the string !CUT! from our list.
5824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5826      # If it failed, the variable was not from the command line. Ignore it,
5827      # but warn the user (except for BASH, which is always set by the calling BASH).
5828      if test "xCUT" != xBASH; then
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5830$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5831      fi
5832      # Try to locate tool using the code snippet
5833      for ac_prog in cut
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CUT+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CUT in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CUT=$ac_cv_path_CUT
5866if test -n "$CUT"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5868$as_echo "$CUT" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CUT" && break
5876done
5877
5878    else
5879      # If it succeeded, then it was overridden by the user. We will use it
5880      # for the tool.
5881
5882      # First remove it from the list of overridden variables, so we can test
5883      # for unknown variables in the end.
5884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5885
5886      # Check if the provided tool contains a complete path.
5887      tool_specified="$CUT"
5888      tool_basename="${tool_specified##*/}"
5889      if test "x$tool_basename" = "x$tool_specified"; then
5890        # A command without a complete path is provided, search $PATH.
5891        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5892$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5893        # Extract the first word of "$tool_basename", so it can be a program name with args.
5894set dummy $tool_basename; ac_word=$2
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5896$as_echo_n "checking for $ac_word... " >&6; }
5897if ${ac_cv_path_CUT+:} false; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  case $CUT in
5901  [\\/]* | ?:[\\/]*)
5902  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5903  ;;
5904  *)
5905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908  IFS=$as_save_IFS
5909  test -z "$as_dir" && as_dir=.
5910    for ac_exec_ext in '' $ac_executable_extensions; do
5911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5912    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914    break 2
5915  fi
5916done
5917  done
5918IFS=$as_save_IFS
5919
5920  ;;
5921esac
5922fi
5923CUT=$ac_cv_path_CUT
5924if test -n "$CUT"; then
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5926$as_echo "$CUT" >&6; }
5927else
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929$as_echo "no" >&6; }
5930fi
5931
5932
5933        if test "x$CUT" = x; then
5934          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5935        fi
5936      else
5937        # Otherwise we believe it is a complete path. Use it as it is.
5938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5939$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5940        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5941$as_echo_n "checking for CUT... " >&6; }
5942        if test ! -x "$tool_specified"; then
5943          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5944$as_echo "not found" >&6; }
5945          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5946        fi
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5948$as_echo "$tool_specified" >&6; }
5949      fi
5950    fi
5951  fi
5952
5953
5954
5955  if test "x$CUT" = x; then
5956    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5957  fi
5958
5959
5960
5961
5962
5963  # Publish this variable in the help.
5964
5965
5966  if test "x$DATE" = x; then
5967    # The variable is not set by user, try to locate tool using the code snippet
5968    for ac_prog in date
5969do
5970  # Extract the first word of "$ac_prog", so it can be a program name with args.
5971set dummy $ac_prog; ac_word=$2
5972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5973$as_echo_n "checking for $ac_word... " >&6; }
5974if ${ac_cv_path_DATE+:} false; then :
5975  $as_echo_n "(cached) " >&6
5976else
5977  case $DATE in
5978  [\\/]* | ?:[\\/]*)
5979  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5980  ;;
5981  *)
5982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5983for as_dir in $PATH
5984do
5985  IFS=$as_save_IFS
5986  test -z "$as_dir" && as_dir=.
5987    for ac_exec_ext in '' $ac_executable_extensions; do
5988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5989    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5991    break 2
5992  fi
5993done
5994  done
5995IFS=$as_save_IFS
5996
5997  ;;
5998esac
5999fi
6000DATE=$ac_cv_path_DATE
6001if test -n "$DATE"; then
6002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6003$as_echo "$DATE" >&6; }
6004else
6005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006$as_echo "no" >&6; }
6007fi
6008
6009
6010  test -n "$DATE" && break
6011done
6012
6013  else
6014    # The variable is set, but is it from the command line or the environment?
6015
6016    # Try to remove the string !DATE! from our list.
6017    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6018    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6019      # If it failed, the variable was not from the command line. Ignore it,
6020      # but warn the user (except for BASH, which is always set by the calling BASH).
6021      if test "xDATE" != xBASH; then
6022        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6023$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6024      fi
6025      # Try to locate tool using the code snippet
6026      for ac_prog in date
6027do
6028  # Extract the first word of "$ac_prog", so it can be a program name with args.
6029set dummy $ac_prog; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if ${ac_cv_path_DATE+:} false; then :
6033  $as_echo_n "(cached) " >&6
6034else
6035  case $DATE in
6036  [\\/]* | ?:[\\/]*)
6037  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6038  ;;
6039  *)
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_exec_ext in '' $ac_executable_extensions; do
6046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049    break 2
6050  fi
6051done
6052  done
6053IFS=$as_save_IFS
6054
6055  ;;
6056esac
6057fi
6058DATE=$ac_cv_path_DATE
6059if test -n "$DATE"; then
6060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6061$as_echo "$DATE" >&6; }
6062else
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
6065fi
6066
6067
6068  test -n "$DATE" && break
6069done
6070
6071    else
6072      # If it succeeded, then it was overridden by the user. We will use it
6073      # for the tool.
6074
6075      # First remove it from the list of overridden variables, so we can test
6076      # for unknown variables in the end.
6077      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6078
6079      # Check if the provided tool contains a complete path.
6080      tool_specified="$DATE"
6081      tool_basename="${tool_specified##*/}"
6082      if test "x$tool_basename" = "x$tool_specified"; then
6083        # A command without a complete path is provided, search $PATH.
6084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6085$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6086        # Extract the first word of "$tool_basename", so it can be a program name with args.
6087set dummy $tool_basename; ac_word=$2
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
6090if ${ac_cv_path_DATE+:} false; then :
6091  $as_echo_n "(cached) " >&6
6092else
6093  case $DATE in
6094  [\\/]* | ?:[\\/]*)
6095  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6096  ;;
6097  *)
6098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101  IFS=$as_save_IFS
6102  test -z "$as_dir" && as_dir=.
6103    for ac_exec_ext in '' $ac_executable_extensions; do
6104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6105    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107    break 2
6108  fi
6109done
6110  done
6111IFS=$as_save_IFS
6112
6113  ;;
6114esac
6115fi
6116DATE=$ac_cv_path_DATE
6117if test -n "$DATE"; then
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6119$as_echo "$DATE" >&6; }
6120else
6121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122$as_echo "no" >&6; }
6123fi
6124
6125
6126        if test "x$DATE" = x; then
6127          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6128        fi
6129      else
6130        # Otherwise we believe it is a complete path. Use it as it is.
6131        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6132$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6134$as_echo_n "checking for DATE... " >&6; }
6135        if test ! -x "$tool_specified"; then
6136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6137$as_echo "not found" >&6; }
6138          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6139        fi
6140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6141$as_echo "$tool_specified" >&6; }
6142      fi
6143    fi
6144  fi
6145
6146
6147
6148  if test "x$DATE" = x; then
6149    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6150  fi
6151
6152
6153
6154
6155
6156  # Publish this variable in the help.
6157
6158
6159  if test "x$DIFF" = x; then
6160    # The variable is not set by user, try to locate tool using the code snippet
6161    for ac_prog in gdiff diff
6162do
6163  # Extract the first word of "$ac_prog", so it can be a program name with args.
6164set dummy $ac_prog; ac_word=$2
6165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6166$as_echo_n "checking for $ac_word... " >&6; }
6167if ${ac_cv_path_DIFF+:} false; then :
6168  $as_echo_n "(cached) " >&6
6169else
6170  case $DIFF in
6171  [\\/]* | ?:[\\/]*)
6172  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6173  ;;
6174  *)
6175  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6176for as_dir in $PATH
6177do
6178  IFS=$as_save_IFS
6179  test -z "$as_dir" && as_dir=.
6180    for ac_exec_ext in '' $ac_executable_extensions; do
6181  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6182    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6183    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6184    break 2
6185  fi
6186done
6187  done
6188IFS=$as_save_IFS
6189
6190  ;;
6191esac
6192fi
6193DIFF=$ac_cv_path_DIFF
6194if test -n "$DIFF"; then
6195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6196$as_echo "$DIFF" >&6; }
6197else
6198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6199$as_echo "no" >&6; }
6200fi
6201
6202
6203  test -n "$DIFF" && break
6204done
6205
6206  else
6207    # The variable is set, but is it from the command line or the environment?
6208
6209    # Try to remove the string !DIFF! from our list.
6210    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6211    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6212      # If it failed, the variable was not from the command line. Ignore it,
6213      # but warn the user (except for BASH, which is always set by the calling BASH).
6214      if test "xDIFF" != xBASH; then
6215        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6216$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6217      fi
6218      # Try to locate tool using the code snippet
6219      for ac_prog in gdiff diff
6220do
6221  # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_path_DIFF+:} false; then :
6226  $as_echo_n "(cached) " >&6
6227else
6228  case $DIFF in
6229  [\\/]* | ?:[\\/]*)
6230  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6231  ;;
6232  *)
6233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH
6235do
6236  IFS=$as_save_IFS
6237  test -z "$as_dir" && as_dir=.
6238    for ac_exec_ext in '' $ac_executable_extensions; do
6239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6240    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242    break 2
6243  fi
6244done
6245  done
6246IFS=$as_save_IFS
6247
6248  ;;
6249esac
6250fi
6251DIFF=$ac_cv_path_DIFF
6252if test -n "$DIFF"; then
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6254$as_echo "$DIFF" >&6; }
6255else
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6257$as_echo "no" >&6; }
6258fi
6259
6260
6261  test -n "$DIFF" && break
6262done
6263
6264    else
6265      # If it succeeded, then it was overridden by the user. We will use it
6266      # for the tool.
6267
6268      # First remove it from the list of overridden variables, so we can test
6269      # for unknown variables in the end.
6270      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6271
6272      # Check if the provided tool contains a complete path.
6273      tool_specified="$DIFF"
6274      tool_basename="${tool_specified##*/}"
6275      if test "x$tool_basename" = "x$tool_specified"; then
6276        # A command without a complete path is provided, search $PATH.
6277        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6278$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6279        # Extract the first word of "$tool_basename", so it can be a program name with args.
6280set dummy $tool_basename; ac_word=$2
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282$as_echo_n "checking for $ac_word... " >&6; }
6283if ${ac_cv_path_DIFF+:} false; then :
6284  $as_echo_n "(cached) " >&6
6285else
6286  case $DIFF in
6287  [\\/]* | ?:[\\/]*)
6288  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6289  ;;
6290  *)
6291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292for as_dir in $PATH
6293do
6294  IFS=$as_save_IFS
6295  test -z "$as_dir" && as_dir=.
6296    for ac_exec_ext in '' $ac_executable_extensions; do
6297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6298    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6300    break 2
6301  fi
6302done
6303  done
6304IFS=$as_save_IFS
6305
6306  ;;
6307esac
6308fi
6309DIFF=$ac_cv_path_DIFF
6310if test -n "$DIFF"; then
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6312$as_echo "$DIFF" >&6; }
6313else
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
6316fi
6317
6318
6319        if test "x$DIFF" = x; then
6320          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6321        fi
6322      else
6323        # Otherwise we believe it is a complete path. Use it as it is.
6324        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6325$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6327$as_echo_n "checking for DIFF... " >&6; }
6328        if test ! -x "$tool_specified"; then
6329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6330$as_echo "not found" >&6; }
6331          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6332        fi
6333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6334$as_echo "$tool_specified" >&6; }
6335      fi
6336    fi
6337  fi
6338
6339
6340
6341  if test "x$DIFF" = x; then
6342    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6343  fi
6344
6345
6346
6347
6348
6349  # Publish this variable in the help.
6350
6351
6352  if test "x$DIRNAME" = x; then
6353    # The variable is not set by user, try to locate tool using the code snippet
6354    for ac_prog in dirname
6355do
6356  # Extract the first word of "$ac_prog", so it can be a program name with args.
6357set dummy $ac_prog; ac_word=$2
6358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6359$as_echo_n "checking for $ac_word... " >&6; }
6360if ${ac_cv_path_DIRNAME+:} false; then :
6361  $as_echo_n "(cached) " >&6
6362else
6363  case $DIRNAME in
6364  [\\/]* | ?:[\\/]*)
6365  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6366  ;;
6367  *)
6368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6369for as_dir in $PATH
6370do
6371  IFS=$as_save_IFS
6372  test -z "$as_dir" && as_dir=.
6373    for ac_exec_ext in '' $ac_executable_extensions; do
6374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6375    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6377    break 2
6378  fi
6379done
6380  done
6381IFS=$as_save_IFS
6382
6383  ;;
6384esac
6385fi
6386DIRNAME=$ac_cv_path_DIRNAME
6387if test -n "$DIRNAME"; then
6388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6389$as_echo "$DIRNAME" >&6; }
6390else
6391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6392$as_echo "no" >&6; }
6393fi
6394
6395
6396  test -n "$DIRNAME" && break
6397done
6398
6399  else
6400    # The variable is set, but is it from the command line or the environment?
6401
6402    # Try to remove the string !DIRNAME! from our list.
6403    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6404    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6405      # If it failed, the variable was not from the command line. Ignore it,
6406      # but warn the user (except for BASH, which is always set by the calling BASH).
6407      if test "xDIRNAME" != xBASH; then
6408        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6409$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6410      fi
6411      # Try to locate tool using the code snippet
6412      for ac_prog in dirname
6413do
6414  # Extract the first word of "$ac_prog", so it can be a program name with args.
6415set dummy $ac_prog; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if ${ac_cv_path_DIRNAME+:} false; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $DIRNAME in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6433    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444DIRNAME=$ac_cv_path_DIRNAME
6445if test -n "$DIRNAME"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6447$as_echo "$DIRNAME" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454  test -n "$DIRNAME" && break
6455done
6456
6457    else
6458      # If it succeeded, then it was overridden by the user. We will use it
6459      # for the tool.
6460
6461      # First remove it from the list of overridden variables, so we can test
6462      # for unknown variables in the end.
6463      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6464
6465      # Check if the provided tool contains a complete path.
6466      tool_specified="$DIRNAME"
6467      tool_basename="${tool_specified##*/}"
6468      if test "x$tool_basename" = "x$tool_specified"; then
6469        # A command without a complete path is provided, search $PATH.
6470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6471$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6472        # Extract the first word of "$tool_basename", so it can be a program name with args.
6473set dummy $tool_basename; ac_word=$2
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475$as_echo_n "checking for $ac_word... " >&6; }
6476if ${ac_cv_path_DIRNAME+:} false; then :
6477  $as_echo_n "(cached) " >&6
6478else
6479  case $DIRNAME in
6480  [\\/]* | ?:[\\/]*)
6481  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6482  ;;
6483  *)
6484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485for as_dir in $PATH
6486do
6487  IFS=$as_save_IFS
6488  test -z "$as_dir" && as_dir=.
6489    for ac_exec_ext in '' $ac_executable_extensions; do
6490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493    break 2
6494  fi
6495done
6496  done
6497IFS=$as_save_IFS
6498
6499  ;;
6500esac
6501fi
6502DIRNAME=$ac_cv_path_DIRNAME
6503if test -n "$DIRNAME"; then
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6505$as_echo "$DIRNAME" >&6; }
6506else
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508$as_echo "no" >&6; }
6509fi
6510
6511
6512        if test "x$DIRNAME" = x; then
6513          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6514        fi
6515      else
6516        # Otherwise we believe it is a complete path. Use it as it is.
6517        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6518$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6519        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6520$as_echo_n "checking for DIRNAME... " >&6; }
6521        if test ! -x "$tool_specified"; then
6522          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6523$as_echo "not found" >&6; }
6524          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6525        fi
6526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6527$as_echo "$tool_specified" >&6; }
6528      fi
6529    fi
6530  fi
6531
6532
6533
6534  if test "x$DIRNAME" = x; then
6535    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6536  fi
6537
6538
6539
6540
6541
6542  # Publish this variable in the help.
6543
6544
6545  if test "x$ECHO" = x; then
6546    # The variable is not set by user, try to locate tool using the code snippet
6547    for ac_prog in echo
6548do
6549  # Extract the first word of "$ac_prog", so it can be a program name with args.
6550set dummy $ac_prog; ac_word=$2
6551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6552$as_echo_n "checking for $ac_word... " >&6; }
6553if ${ac_cv_path_ECHO+:} false; then :
6554  $as_echo_n "(cached) " >&6
6555else
6556  case $ECHO in
6557  [\\/]* | ?:[\\/]*)
6558  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6559  ;;
6560  *)
6561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6562for as_dir in $PATH
6563do
6564  IFS=$as_save_IFS
6565  test -z "$as_dir" && as_dir=.
6566    for ac_exec_ext in '' $ac_executable_extensions; do
6567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6568    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6570    break 2
6571  fi
6572done
6573  done
6574IFS=$as_save_IFS
6575
6576  ;;
6577esac
6578fi
6579ECHO=$ac_cv_path_ECHO
6580if test -n "$ECHO"; then
6581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6582$as_echo "$ECHO" >&6; }
6583else
6584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
6586fi
6587
6588
6589  test -n "$ECHO" && break
6590done
6591
6592  else
6593    # The variable is set, but is it from the command line or the environment?
6594
6595    # Try to remove the string !ECHO! from our list.
6596    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6597    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6598      # If it failed, the variable was not from the command line. Ignore it,
6599      # but warn the user (except for BASH, which is always set by the calling BASH).
6600      if test "xECHO" != xBASH; then
6601        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6602$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6603      fi
6604      # Try to locate tool using the code snippet
6605      for ac_prog in echo
6606do
6607  # Extract the first word of "$ac_prog", so it can be a program name with args.
6608set dummy $ac_prog; ac_word=$2
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610$as_echo_n "checking for $ac_word... " >&6; }
6611if ${ac_cv_path_ECHO+:} false; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  case $ECHO in
6615  [\\/]* | ?:[\\/]*)
6616  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6617  ;;
6618  *)
6619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620for as_dir in $PATH
6621do
6622  IFS=$as_save_IFS
6623  test -z "$as_dir" && as_dir=.
6624    for ac_exec_ext in '' $ac_executable_extensions; do
6625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628    break 2
6629  fi
6630done
6631  done
6632IFS=$as_save_IFS
6633
6634  ;;
6635esac
6636fi
6637ECHO=$ac_cv_path_ECHO
6638if test -n "$ECHO"; then
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6640$as_echo "$ECHO" >&6; }
6641else
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643$as_echo "no" >&6; }
6644fi
6645
6646
6647  test -n "$ECHO" && break
6648done
6649
6650    else
6651      # If it succeeded, then it was overridden by the user. We will use it
6652      # for the tool.
6653
6654      # First remove it from the list of overridden variables, so we can test
6655      # for unknown variables in the end.
6656      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6657
6658      # Check if the provided tool contains a complete path.
6659      tool_specified="$ECHO"
6660      tool_basename="${tool_specified##*/}"
6661      if test "x$tool_basename" = "x$tool_specified"; then
6662        # A command without a complete path is provided, search $PATH.
6663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6664$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6665        # Extract the first word of "$tool_basename", so it can be a program name with args.
6666set dummy $tool_basename; ac_word=$2
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if ${ac_cv_path_ECHO+:} false; then :
6670  $as_echo_n "(cached) " >&6
6671else
6672  case $ECHO in
6673  [\\/]* | ?:[\\/]*)
6674  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6675  ;;
6676  *)
6677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678for as_dir in $PATH
6679do
6680  IFS=$as_save_IFS
6681  test -z "$as_dir" && as_dir=.
6682    for ac_exec_ext in '' $ac_executable_extensions; do
6683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686    break 2
6687  fi
6688done
6689  done
6690IFS=$as_save_IFS
6691
6692  ;;
6693esac
6694fi
6695ECHO=$ac_cv_path_ECHO
6696if test -n "$ECHO"; then
6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6698$as_echo "$ECHO" >&6; }
6699else
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701$as_echo "no" >&6; }
6702fi
6703
6704
6705        if test "x$ECHO" = x; then
6706          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6707        fi
6708      else
6709        # Otherwise we believe it is a complete path. Use it as it is.
6710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6711$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6712        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6713$as_echo_n "checking for ECHO... " >&6; }
6714        if test ! -x "$tool_specified"; then
6715          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6716$as_echo "not found" >&6; }
6717          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6718        fi
6719        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6720$as_echo "$tool_specified" >&6; }
6721      fi
6722    fi
6723  fi
6724
6725
6726
6727  if test "x$ECHO" = x; then
6728    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6729  fi
6730
6731
6732
6733
6734
6735  # Publish this variable in the help.
6736
6737
6738  if test "x$EXPR" = x; then
6739    # The variable is not set by user, try to locate tool using the code snippet
6740    for ac_prog in expr
6741do
6742  # Extract the first word of "$ac_prog", so it can be a program name with args.
6743set dummy $ac_prog; ac_word=$2
6744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6745$as_echo_n "checking for $ac_word... " >&6; }
6746if ${ac_cv_path_EXPR+:} false; then :
6747  $as_echo_n "(cached) " >&6
6748else
6749  case $EXPR in
6750  [\\/]* | ?:[\\/]*)
6751  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6752  ;;
6753  *)
6754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6755for as_dir in $PATH
6756do
6757  IFS=$as_save_IFS
6758  test -z "$as_dir" && as_dir=.
6759    for ac_exec_ext in '' $ac_executable_extensions; do
6760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6761    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6763    break 2
6764  fi
6765done
6766  done
6767IFS=$as_save_IFS
6768
6769  ;;
6770esac
6771fi
6772EXPR=$ac_cv_path_EXPR
6773if test -n "$EXPR"; then
6774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6775$as_echo "$EXPR" >&6; }
6776else
6777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6778$as_echo "no" >&6; }
6779fi
6780
6781
6782  test -n "$EXPR" && break
6783done
6784
6785  else
6786    # The variable is set, but is it from the command line or the environment?
6787
6788    # Try to remove the string !EXPR! from our list.
6789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6791      # If it failed, the variable was not from the command line. Ignore it,
6792      # but warn the user (except for BASH, which is always set by the calling BASH).
6793      if test "xEXPR" != xBASH; then
6794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6795$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6796      fi
6797      # Try to locate tool using the code snippet
6798      for ac_prog in expr
6799do
6800  # Extract the first word of "$ac_prog", so it can be a program name with args.
6801set dummy $ac_prog; ac_word=$2
6802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6803$as_echo_n "checking for $ac_word... " >&6; }
6804if ${ac_cv_path_EXPR+:} false; then :
6805  $as_echo_n "(cached) " >&6
6806else
6807  case $EXPR in
6808  [\\/]* | ?:[\\/]*)
6809  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6810  ;;
6811  *)
6812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6813for as_dir in $PATH
6814do
6815  IFS=$as_save_IFS
6816  test -z "$as_dir" && as_dir=.
6817    for ac_exec_ext in '' $ac_executable_extensions; do
6818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6819    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6821    break 2
6822  fi
6823done
6824  done
6825IFS=$as_save_IFS
6826
6827  ;;
6828esac
6829fi
6830EXPR=$ac_cv_path_EXPR
6831if test -n "$EXPR"; then
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6833$as_echo "$EXPR" >&6; }
6834else
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836$as_echo "no" >&6; }
6837fi
6838
6839
6840  test -n "$EXPR" && break
6841done
6842
6843    else
6844      # If it succeeded, then it was overridden by the user. We will use it
6845      # for the tool.
6846
6847      # First remove it from the list of overridden variables, so we can test
6848      # for unknown variables in the end.
6849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6850
6851      # Check if the provided tool contains a complete path.
6852      tool_specified="$EXPR"
6853      tool_basename="${tool_specified##*/}"
6854      if test "x$tool_basename" = "x$tool_specified"; then
6855        # A command without a complete path is provided, search $PATH.
6856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6857$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6858        # Extract the first word of "$tool_basename", so it can be a program name with args.
6859set dummy $tool_basename; ac_word=$2
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861$as_echo_n "checking for $ac_word... " >&6; }
6862if ${ac_cv_path_EXPR+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  case $EXPR in
6866  [\\/]* | ?:[\\/]*)
6867  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6868  ;;
6869  *)
6870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875    for ac_exec_ext in '' $ac_executable_extensions; do
6876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6877    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6879    break 2
6880  fi
6881done
6882  done
6883IFS=$as_save_IFS
6884
6885  ;;
6886esac
6887fi
6888EXPR=$ac_cv_path_EXPR
6889if test -n "$EXPR"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6891$as_echo "$EXPR" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896
6897
6898        if test "x$EXPR" = x; then
6899          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6900        fi
6901      else
6902        # Otherwise we believe it is a complete path. Use it as it is.
6903        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6904$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6905        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6906$as_echo_n "checking for EXPR... " >&6; }
6907        if test ! -x "$tool_specified"; then
6908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6909$as_echo "not found" >&6; }
6910          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6911        fi
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6913$as_echo "$tool_specified" >&6; }
6914      fi
6915    fi
6916  fi
6917
6918
6919
6920  if test "x$EXPR" = x; then
6921    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6922  fi
6923
6924
6925
6926
6927
6928  # Publish this variable in the help.
6929
6930
6931  if test "x$FILE" = x; then
6932    # The variable is not set by user, try to locate tool using the code snippet
6933    for ac_prog in file
6934do
6935  # Extract the first word of "$ac_prog", so it can be a program name with args.
6936set dummy $ac_prog; ac_word=$2
6937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6938$as_echo_n "checking for $ac_word... " >&6; }
6939if ${ac_cv_path_FILE+:} false; then :
6940  $as_echo_n "(cached) " >&6
6941else
6942  case $FILE in
6943  [\\/]* | ?:[\\/]*)
6944  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6945  ;;
6946  *)
6947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6948for as_dir in $PATH
6949do
6950  IFS=$as_save_IFS
6951  test -z "$as_dir" && as_dir=.
6952    for ac_exec_ext in '' $ac_executable_extensions; do
6953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6954    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6956    break 2
6957  fi
6958done
6959  done
6960IFS=$as_save_IFS
6961
6962  ;;
6963esac
6964fi
6965FILE=$ac_cv_path_FILE
6966if test -n "$FILE"; then
6967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6968$as_echo "$FILE" >&6; }
6969else
6970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6971$as_echo "no" >&6; }
6972fi
6973
6974
6975  test -n "$FILE" && break
6976done
6977
6978  else
6979    # The variable is set, but is it from the command line or the environment?
6980
6981    # Try to remove the string !FILE! from our list.
6982    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6983    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6984      # If it failed, the variable was not from the command line. Ignore it,
6985      # but warn the user (except for BASH, which is always set by the calling BASH).
6986      if test "xFILE" != xBASH; then
6987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6988$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6989      fi
6990      # Try to locate tool using the code snippet
6991      for ac_prog in file
6992do
6993  # Extract the first word of "$ac_prog", so it can be a program name with args.
6994set dummy $ac_prog; ac_word=$2
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6996$as_echo_n "checking for $ac_word... " >&6; }
6997if ${ac_cv_path_FILE+:} false; then :
6998  $as_echo_n "(cached) " >&6
6999else
7000  case $FILE in
7001  [\\/]* | ?:[\\/]*)
7002  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7003  ;;
7004  *)
7005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006for as_dir in $PATH
7007do
7008  IFS=$as_save_IFS
7009  test -z "$as_dir" && as_dir=.
7010    for ac_exec_ext in '' $ac_executable_extensions; do
7011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7012    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7014    break 2
7015  fi
7016done
7017  done
7018IFS=$as_save_IFS
7019
7020  ;;
7021esac
7022fi
7023FILE=$ac_cv_path_FILE
7024if test -n "$FILE"; then
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7026$as_echo "$FILE" >&6; }
7027else
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029$as_echo "no" >&6; }
7030fi
7031
7032
7033  test -n "$FILE" && break
7034done
7035
7036    else
7037      # If it succeeded, then it was overridden by the user. We will use it
7038      # for the tool.
7039
7040      # First remove it from the list of overridden variables, so we can test
7041      # for unknown variables in the end.
7042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7043
7044      # Check if the provided tool contains a complete path.
7045      tool_specified="$FILE"
7046      tool_basename="${tool_specified##*/}"
7047      if test "x$tool_basename" = "x$tool_specified"; then
7048        # A command without a complete path is provided, search $PATH.
7049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7050$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7051        # Extract the first word of "$tool_basename", so it can be a program name with args.
7052set dummy $tool_basename; ac_word=$2
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7054$as_echo_n "checking for $ac_word... " >&6; }
7055if ${ac_cv_path_FILE+:} false; then :
7056  $as_echo_n "(cached) " >&6
7057else
7058  case $FILE in
7059  [\\/]* | ?:[\\/]*)
7060  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7061  ;;
7062  *)
7063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7064for as_dir in $PATH
7065do
7066  IFS=$as_save_IFS
7067  test -z "$as_dir" && as_dir=.
7068    for ac_exec_ext in '' $ac_executable_extensions; do
7069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7070    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7072    break 2
7073  fi
7074done
7075  done
7076IFS=$as_save_IFS
7077
7078  ;;
7079esac
7080fi
7081FILE=$ac_cv_path_FILE
7082if test -n "$FILE"; then
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7084$as_echo "$FILE" >&6; }
7085else
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7087$as_echo "no" >&6; }
7088fi
7089
7090
7091        if test "x$FILE" = x; then
7092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7093        fi
7094      else
7095        # Otherwise we believe it is a complete path. Use it as it is.
7096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7097$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7099$as_echo_n "checking for FILE... " >&6; }
7100        if test ! -x "$tool_specified"; then
7101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7102$as_echo "not found" >&6; }
7103          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7104        fi
7105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7106$as_echo "$tool_specified" >&6; }
7107      fi
7108    fi
7109  fi
7110
7111
7112
7113  if test "x$FILE" = x; then
7114    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7115  fi
7116
7117
7118
7119
7120
7121  # Publish this variable in the help.
7122
7123
7124  if test "x$FIND" = x; then
7125    # The variable is not set by user, try to locate tool using the code snippet
7126    for ac_prog in find
7127do
7128  # Extract the first word of "$ac_prog", so it can be a program name with args.
7129set dummy $ac_prog; ac_word=$2
7130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7131$as_echo_n "checking for $ac_word... " >&6; }
7132if ${ac_cv_path_FIND+:} false; then :
7133  $as_echo_n "(cached) " >&6
7134else
7135  case $FIND in
7136  [\\/]* | ?:[\\/]*)
7137  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7138  ;;
7139  *)
7140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7141for as_dir in $PATH
7142do
7143  IFS=$as_save_IFS
7144  test -z "$as_dir" && as_dir=.
7145    for ac_exec_ext in '' $ac_executable_extensions; do
7146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7147    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7149    break 2
7150  fi
7151done
7152  done
7153IFS=$as_save_IFS
7154
7155  ;;
7156esac
7157fi
7158FIND=$ac_cv_path_FIND
7159if test -n "$FIND"; then
7160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7161$as_echo "$FIND" >&6; }
7162else
7163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7164$as_echo "no" >&6; }
7165fi
7166
7167
7168  test -n "$FIND" && break
7169done
7170
7171  else
7172    # The variable is set, but is it from the command line or the environment?
7173
7174    # Try to remove the string !FIND! from our list.
7175    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7176    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7177      # If it failed, the variable was not from the command line. Ignore it,
7178      # but warn the user (except for BASH, which is always set by the calling BASH).
7179      if test "xFIND" != xBASH; then
7180        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7181$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7182      fi
7183      # Try to locate tool using the code snippet
7184      for ac_prog in find
7185do
7186  # Extract the first word of "$ac_prog", so it can be a program name with args.
7187set dummy $ac_prog; ac_word=$2
7188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7189$as_echo_n "checking for $ac_word... " >&6; }
7190if ${ac_cv_path_FIND+:} false; then :
7191  $as_echo_n "(cached) " >&6
7192else
7193  case $FIND in
7194  [\\/]* | ?:[\\/]*)
7195  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7196  ;;
7197  *)
7198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7199for as_dir in $PATH
7200do
7201  IFS=$as_save_IFS
7202  test -z "$as_dir" && as_dir=.
7203    for ac_exec_ext in '' $ac_executable_extensions; do
7204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7205    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7207    break 2
7208  fi
7209done
7210  done
7211IFS=$as_save_IFS
7212
7213  ;;
7214esac
7215fi
7216FIND=$ac_cv_path_FIND
7217if test -n "$FIND"; then
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7219$as_echo "$FIND" >&6; }
7220else
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
7223fi
7224
7225
7226  test -n "$FIND" && break
7227done
7228
7229    else
7230      # If it succeeded, then it was overridden by the user. We will use it
7231      # for the tool.
7232
7233      # First remove it from the list of overridden variables, so we can test
7234      # for unknown variables in the end.
7235      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7236
7237      # Check if the provided tool contains a complete path.
7238      tool_specified="$FIND"
7239      tool_basename="${tool_specified##*/}"
7240      if test "x$tool_basename" = "x$tool_specified"; then
7241        # A command without a complete path is provided, search $PATH.
7242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7243$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7244        # Extract the first word of "$tool_basename", so it can be a program name with args.
7245set dummy $tool_basename; ac_word=$2
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7247$as_echo_n "checking for $ac_word... " >&6; }
7248if ${ac_cv_path_FIND+:} false; then :
7249  $as_echo_n "(cached) " >&6
7250else
7251  case $FIND in
7252  [\\/]* | ?:[\\/]*)
7253  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7254  ;;
7255  *)
7256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7257for as_dir in $PATH
7258do
7259  IFS=$as_save_IFS
7260  test -z "$as_dir" && as_dir=.
7261    for ac_exec_ext in '' $ac_executable_extensions; do
7262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7263    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7265    break 2
7266  fi
7267done
7268  done
7269IFS=$as_save_IFS
7270
7271  ;;
7272esac
7273fi
7274FIND=$ac_cv_path_FIND
7275if test -n "$FIND"; then
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7277$as_echo "$FIND" >&6; }
7278else
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7280$as_echo "no" >&6; }
7281fi
7282
7283
7284        if test "x$FIND" = x; then
7285          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7286        fi
7287      else
7288        # Otherwise we believe it is a complete path. Use it as it is.
7289        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7290$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7291        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7292$as_echo_n "checking for FIND... " >&6; }
7293        if test ! -x "$tool_specified"; then
7294          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7295$as_echo "not found" >&6; }
7296          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7297        fi
7298        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7299$as_echo "$tool_specified" >&6; }
7300      fi
7301    fi
7302  fi
7303
7304
7305
7306  if test "x$FIND" = x; then
7307    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7308  fi
7309
7310
7311
7312
7313
7314  # Publish this variable in the help.
7315
7316
7317  if test "x$HEAD" = x; then
7318    # The variable is not set by user, try to locate tool using the code snippet
7319    for ac_prog in head
7320do
7321  # Extract the first word of "$ac_prog", so it can be a program name with args.
7322set dummy $ac_prog; ac_word=$2
7323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7324$as_echo_n "checking for $ac_word... " >&6; }
7325if ${ac_cv_path_HEAD+:} false; then :
7326  $as_echo_n "(cached) " >&6
7327else
7328  case $HEAD in
7329  [\\/]* | ?:[\\/]*)
7330  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7331  ;;
7332  *)
7333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7334for as_dir in $PATH
7335do
7336  IFS=$as_save_IFS
7337  test -z "$as_dir" && as_dir=.
7338    for ac_exec_ext in '' $ac_executable_extensions; do
7339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7340    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7342    break 2
7343  fi
7344done
7345  done
7346IFS=$as_save_IFS
7347
7348  ;;
7349esac
7350fi
7351HEAD=$ac_cv_path_HEAD
7352if test -n "$HEAD"; then
7353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7354$as_echo "$HEAD" >&6; }
7355else
7356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7357$as_echo "no" >&6; }
7358fi
7359
7360
7361  test -n "$HEAD" && break
7362done
7363
7364  else
7365    # The variable is set, but is it from the command line or the environment?
7366
7367    # Try to remove the string !HEAD! from our list.
7368    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7369    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7370      # If it failed, the variable was not from the command line. Ignore it,
7371      # but warn the user (except for BASH, which is always set by the calling BASH).
7372      if test "xHEAD" != xBASH; then
7373        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7374$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7375      fi
7376      # Try to locate tool using the code snippet
7377      for ac_prog in head
7378do
7379  # Extract the first word of "$ac_prog", so it can be a program name with args.
7380set dummy $ac_prog; ac_word=$2
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7382$as_echo_n "checking for $ac_word... " >&6; }
7383if ${ac_cv_path_HEAD+:} false; then :
7384  $as_echo_n "(cached) " >&6
7385else
7386  case $HEAD in
7387  [\\/]* | ?:[\\/]*)
7388  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7389  ;;
7390  *)
7391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7392for as_dir in $PATH
7393do
7394  IFS=$as_save_IFS
7395  test -z "$as_dir" && as_dir=.
7396    for ac_exec_ext in '' $ac_executable_extensions; do
7397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7398    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7400    break 2
7401  fi
7402done
7403  done
7404IFS=$as_save_IFS
7405
7406  ;;
7407esac
7408fi
7409HEAD=$ac_cv_path_HEAD
7410if test -n "$HEAD"; then
7411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7412$as_echo "$HEAD" >&6; }
7413else
7414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7415$as_echo "no" >&6; }
7416fi
7417
7418
7419  test -n "$HEAD" && break
7420done
7421
7422    else
7423      # If it succeeded, then it was overridden by the user. We will use it
7424      # for the tool.
7425
7426      # First remove it from the list of overridden variables, so we can test
7427      # for unknown variables in the end.
7428      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7429
7430      # Check if the provided tool contains a complete path.
7431      tool_specified="$HEAD"
7432      tool_basename="${tool_specified##*/}"
7433      if test "x$tool_basename" = "x$tool_specified"; then
7434        # A command without a complete path is provided, search $PATH.
7435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7436$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7437        # Extract the first word of "$tool_basename", so it can be a program name with args.
7438set dummy $tool_basename; ac_word=$2
7439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7440$as_echo_n "checking for $ac_word... " >&6; }
7441if ${ac_cv_path_HEAD+:} false; then :
7442  $as_echo_n "(cached) " >&6
7443else
7444  case $HEAD in
7445  [\\/]* | ?:[\\/]*)
7446  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7447  ;;
7448  *)
7449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450for as_dir in $PATH
7451do
7452  IFS=$as_save_IFS
7453  test -z "$as_dir" && as_dir=.
7454    for ac_exec_ext in '' $ac_executable_extensions; do
7455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7456    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7458    break 2
7459  fi
7460done
7461  done
7462IFS=$as_save_IFS
7463
7464  ;;
7465esac
7466fi
7467HEAD=$ac_cv_path_HEAD
7468if test -n "$HEAD"; then
7469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7470$as_echo "$HEAD" >&6; }
7471else
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
7474fi
7475
7476
7477        if test "x$HEAD" = x; then
7478          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7479        fi
7480      else
7481        # Otherwise we believe it is a complete path. Use it as it is.
7482        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7483$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7485$as_echo_n "checking for HEAD... " >&6; }
7486        if test ! -x "$tool_specified"; then
7487          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7488$as_echo "not found" >&6; }
7489          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7490        fi
7491        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7492$as_echo "$tool_specified" >&6; }
7493      fi
7494    fi
7495  fi
7496
7497
7498
7499  if test "x$HEAD" = x; then
7500    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7501  fi
7502
7503
7504
7505
7506
7507  # Publish this variable in the help.
7508
7509
7510  if test "x$LN" = x; then
7511    # The variable is not set by user, try to locate tool using the code snippet
7512    for ac_prog in ln
7513do
7514  # Extract the first word of "$ac_prog", so it can be a program name with args.
7515set dummy $ac_prog; ac_word=$2
7516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7517$as_echo_n "checking for $ac_word... " >&6; }
7518if ${ac_cv_path_LN+:} false; then :
7519  $as_echo_n "(cached) " >&6
7520else
7521  case $LN in
7522  [\\/]* | ?:[\\/]*)
7523  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7524  ;;
7525  *)
7526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527for as_dir in $PATH
7528do
7529  IFS=$as_save_IFS
7530  test -z "$as_dir" && as_dir=.
7531    for ac_exec_ext in '' $ac_executable_extensions; do
7532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7533    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7535    break 2
7536  fi
7537done
7538  done
7539IFS=$as_save_IFS
7540
7541  ;;
7542esac
7543fi
7544LN=$ac_cv_path_LN
7545if test -n "$LN"; then
7546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7547$as_echo "$LN" >&6; }
7548else
7549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7550$as_echo "no" >&6; }
7551fi
7552
7553
7554  test -n "$LN" && break
7555done
7556
7557  else
7558    # The variable is set, but is it from the command line or the environment?
7559
7560    # Try to remove the string !LN! from our list.
7561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7563      # If it failed, the variable was not from the command line. Ignore it,
7564      # but warn the user (except for BASH, which is always set by the calling BASH).
7565      if test "xLN" != xBASH; then
7566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7567$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7568      fi
7569      # Try to locate tool using the code snippet
7570      for ac_prog in ln
7571do
7572  # Extract the first word of "$ac_prog", so it can be a program name with args.
7573set dummy $ac_prog; ac_word=$2
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7575$as_echo_n "checking for $ac_word... " >&6; }
7576if ${ac_cv_path_LN+:} false; then :
7577  $as_echo_n "(cached) " >&6
7578else
7579  case $LN in
7580  [\\/]* | ?:[\\/]*)
7581  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7582  ;;
7583  *)
7584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587  IFS=$as_save_IFS
7588  test -z "$as_dir" && as_dir=.
7589    for ac_exec_ext in '' $ac_executable_extensions; do
7590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7591    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7593    break 2
7594  fi
7595done
7596  done
7597IFS=$as_save_IFS
7598
7599  ;;
7600esac
7601fi
7602LN=$ac_cv_path_LN
7603if test -n "$LN"; then
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7605$as_echo "$LN" >&6; }
7606else
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
7609fi
7610
7611
7612  test -n "$LN" && break
7613done
7614
7615    else
7616      # If it succeeded, then it was overridden by the user. We will use it
7617      # for the tool.
7618
7619      # First remove it from the list of overridden variables, so we can test
7620      # for unknown variables in the end.
7621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7622
7623      # Check if the provided tool contains a complete path.
7624      tool_specified="$LN"
7625      tool_basename="${tool_specified##*/}"
7626      if test "x$tool_basename" = "x$tool_specified"; then
7627        # A command without a complete path is provided, search $PATH.
7628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7629$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7630        # Extract the first word of "$tool_basename", so it can be a program name with args.
7631set dummy $tool_basename; ac_word=$2
7632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7633$as_echo_n "checking for $ac_word... " >&6; }
7634if ${ac_cv_path_LN+:} false; then :
7635  $as_echo_n "(cached) " >&6
7636else
7637  case $LN in
7638  [\\/]* | ?:[\\/]*)
7639  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7640  ;;
7641  *)
7642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7643for as_dir in $PATH
7644do
7645  IFS=$as_save_IFS
7646  test -z "$as_dir" && as_dir=.
7647    for ac_exec_ext in '' $ac_executable_extensions; do
7648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7649    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7651    break 2
7652  fi
7653done
7654  done
7655IFS=$as_save_IFS
7656
7657  ;;
7658esac
7659fi
7660LN=$ac_cv_path_LN
7661if test -n "$LN"; then
7662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7663$as_echo "$LN" >&6; }
7664else
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7666$as_echo "no" >&6; }
7667fi
7668
7669
7670        if test "x$LN" = x; then
7671          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7672        fi
7673      else
7674        # Otherwise we believe it is a complete path. Use it as it is.
7675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7676$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7678$as_echo_n "checking for LN... " >&6; }
7679        if test ! -x "$tool_specified"; then
7680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7681$as_echo "not found" >&6; }
7682          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7683        fi
7684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7685$as_echo "$tool_specified" >&6; }
7686      fi
7687    fi
7688  fi
7689
7690
7691
7692  if test "x$LN" = x; then
7693    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7694  fi
7695
7696
7697
7698
7699
7700  # Publish this variable in the help.
7701
7702
7703  if test "x$LS" = x; then
7704    # The variable is not set by user, try to locate tool using the code snippet
7705    for ac_prog in ls
7706do
7707  # Extract the first word of "$ac_prog", so it can be a program name with args.
7708set dummy $ac_prog; ac_word=$2
7709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7710$as_echo_n "checking for $ac_word... " >&6; }
7711if ${ac_cv_path_LS+:} false; then :
7712  $as_echo_n "(cached) " >&6
7713else
7714  case $LS in
7715  [\\/]* | ?:[\\/]*)
7716  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7717  ;;
7718  *)
7719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7720for as_dir in $PATH
7721do
7722  IFS=$as_save_IFS
7723  test -z "$as_dir" && as_dir=.
7724    for ac_exec_ext in '' $ac_executable_extensions; do
7725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7726    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7728    break 2
7729  fi
7730done
7731  done
7732IFS=$as_save_IFS
7733
7734  ;;
7735esac
7736fi
7737LS=$ac_cv_path_LS
7738if test -n "$LS"; then
7739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7740$as_echo "$LS" >&6; }
7741else
7742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7743$as_echo "no" >&6; }
7744fi
7745
7746
7747  test -n "$LS" && break
7748done
7749
7750  else
7751    # The variable is set, but is it from the command line or the environment?
7752
7753    # Try to remove the string !LS! from our list.
7754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7756      # If it failed, the variable was not from the command line. Ignore it,
7757      # but warn the user (except for BASH, which is always set by the calling BASH).
7758      if test "xLS" != xBASH; then
7759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7760$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7761      fi
7762      # Try to locate tool using the code snippet
7763      for ac_prog in ls
7764do
7765  # Extract the first word of "$ac_prog", so it can be a program name with args.
7766set dummy $ac_prog; ac_word=$2
7767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768$as_echo_n "checking for $ac_word... " >&6; }
7769if ${ac_cv_path_LS+:} false; then :
7770  $as_echo_n "(cached) " >&6
7771else
7772  case $LS in
7773  [\\/]* | ?:[\\/]*)
7774  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7775  ;;
7776  *)
7777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7778for as_dir in $PATH
7779do
7780  IFS=$as_save_IFS
7781  test -z "$as_dir" && as_dir=.
7782    for ac_exec_ext in '' $ac_executable_extensions; do
7783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7784    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7786    break 2
7787  fi
7788done
7789  done
7790IFS=$as_save_IFS
7791
7792  ;;
7793esac
7794fi
7795LS=$ac_cv_path_LS
7796if test -n "$LS"; then
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7798$as_echo "$LS" >&6; }
7799else
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801$as_echo "no" >&6; }
7802fi
7803
7804
7805  test -n "$LS" && break
7806done
7807
7808    else
7809      # If it succeeded, then it was overridden by the user. We will use it
7810      # for the tool.
7811
7812      # First remove it from the list of overridden variables, so we can test
7813      # for unknown variables in the end.
7814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7815
7816      # Check if the provided tool contains a complete path.
7817      tool_specified="$LS"
7818      tool_basename="${tool_specified##*/}"
7819      if test "x$tool_basename" = "x$tool_specified"; then
7820        # A command without a complete path is provided, search $PATH.
7821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7822$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7823        # Extract the first word of "$tool_basename", so it can be a program name with args.
7824set dummy $tool_basename; ac_word=$2
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7826$as_echo_n "checking for $ac_word... " >&6; }
7827if ${ac_cv_path_LS+:} false; then :
7828  $as_echo_n "(cached) " >&6
7829else
7830  case $LS in
7831  [\\/]* | ?:[\\/]*)
7832  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7833  ;;
7834  *)
7835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7836for as_dir in $PATH
7837do
7838  IFS=$as_save_IFS
7839  test -z "$as_dir" && as_dir=.
7840    for ac_exec_ext in '' $ac_executable_extensions; do
7841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7842    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7844    break 2
7845  fi
7846done
7847  done
7848IFS=$as_save_IFS
7849
7850  ;;
7851esac
7852fi
7853LS=$ac_cv_path_LS
7854if test -n "$LS"; then
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7856$as_echo "$LS" >&6; }
7857else
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
7860fi
7861
7862
7863        if test "x$LS" = x; then
7864          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7865        fi
7866      else
7867        # Otherwise we believe it is a complete path. Use it as it is.
7868        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7869$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7871$as_echo_n "checking for LS... " >&6; }
7872        if test ! -x "$tool_specified"; then
7873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7874$as_echo "not found" >&6; }
7875          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7876        fi
7877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7878$as_echo "$tool_specified" >&6; }
7879      fi
7880    fi
7881  fi
7882
7883
7884
7885  if test "x$LS" = x; then
7886    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7887  fi
7888
7889
7890
7891
7892
7893  # Publish this variable in the help.
7894
7895
7896  if test "x$MKDIR" = x; then
7897    # The variable is not set by user, try to locate tool using the code snippet
7898    for ac_prog in mkdir
7899do
7900  # Extract the first word of "$ac_prog", so it can be a program name with args.
7901set dummy $ac_prog; ac_word=$2
7902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7903$as_echo_n "checking for $ac_word... " >&6; }
7904if ${ac_cv_path_MKDIR+:} false; then :
7905  $as_echo_n "(cached) " >&6
7906else
7907  case $MKDIR in
7908  [\\/]* | ?:[\\/]*)
7909  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7910  ;;
7911  *)
7912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7913for as_dir in $PATH
7914do
7915  IFS=$as_save_IFS
7916  test -z "$as_dir" && as_dir=.
7917    for ac_exec_ext in '' $ac_executable_extensions; do
7918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7919    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7921    break 2
7922  fi
7923done
7924  done
7925IFS=$as_save_IFS
7926
7927  ;;
7928esac
7929fi
7930MKDIR=$ac_cv_path_MKDIR
7931if test -n "$MKDIR"; then
7932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7933$as_echo "$MKDIR" >&6; }
7934else
7935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7936$as_echo "no" >&6; }
7937fi
7938
7939
7940  test -n "$MKDIR" && break
7941done
7942
7943  else
7944    # The variable is set, but is it from the command line or the environment?
7945
7946    # Try to remove the string !MKDIR! from our list.
7947    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7948    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7949      # If it failed, the variable was not from the command line. Ignore it,
7950      # but warn the user (except for BASH, which is always set by the calling BASH).
7951      if test "xMKDIR" != xBASH; then
7952        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7953$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7954      fi
7955      # Try to locate tool using the code snippet
7956      for ac_prog in mkdir
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_path_MKDIR+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  case $MKDIR in
7966  [\\/]* | ?:[\\/]*)
7967  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7968  ;;
7969  *)
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973  IFS=$as_save_IFS
7974  test -z "$as_dir" && as_dir=.
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979    break 2
7980  fi
7981done
7982  done
7983IFS=$as_save_IFS
7984
7985  ;;
7986esac
7987fi
7988MKDIR=$ac_cv_path_MKDIR
7989if test -n "$MKDIR"; then
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7991$as_echo "$MKDIR" >&6; }
7992else
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7994$as_echo "no" >&6; }
7995fi
7996
7997
7998  test -n "$MKDIR" && break
7999done
8000
8001    else
8002      # If it succeeded, then it was overridden by the user. We will use it
8003      # for the tool.
8004
8005      # First remove it from the list of overridden variables, so we can test
8006      # for unknown variables in the end.
8007      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8008
8009      # Check if the provided tool contains a complete path.
8010      tool_specified="$MKDIR"
8011      tool_basename="${tool_specified##*/}"
8012      if test "x$tool_basename" = "x$tool_specified"; then
8013        # A command without a complete path is provided, search $PATH.
8014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8015$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8016        # Extract the first word of "$tool_basename", so it can be a program name with args.
8017set dummy $tool_basename; ac_word=$2
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8019$as_echo_n "checking for $ac_word... " >&6; }
8020if ${ac_cv_path_MKDIR+:} false; then :
8021  $as_echo_n "(cached) " >&6
8022else
8023  case $MKDIR in
8024  [\\/]* | ?:[\\/]*)
8025  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8026  ;;
8027  *)
8028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8029for as_dir in $PATH
8030do
8031  IFS=$as_save_IFS
8032  test -z "$as_dir" && as_dir=.
8033    for ac_exec_ext in '' $ac_executable_extensions; do
8034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8035    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8037    break 2
8038  fi
8039done
8040  done
8041IFS=$as_save_IFS
8042
8043  ;;
8044esac
8045fi
8046MKDIR=$ac_cv_path_MKDIR
8047if test -n "$MKDIR"; then
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8049$as_echo "$MKDIR" >&6; }
8050else
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
8053fi
8054
8055
8056        if test "x$MKDIR" = x; then
8057          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8058        fi
8059      else
8060        # Otherwise we believe it is a complete path. Use it as it is.
8061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8062$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8063        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8064$as_echo_n "checking for MKDIR... " >&6; }
8065        if test ! -x "$tool_specified"; then
8066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8067$as_echo "not found" >&6; }
8068          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8069        fi
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8071$as_echo "$tool_specified" >&6; }
8072      fi
8073    fi
8074  fi
8075
8076
8077
8078  if test "x$MKDIR" = x; then
8079    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8080  fi
8081
8082
8083
8084
8085
8086  # Publish this variable in the help.
8087
8088
8089  if test "x$MKTEMP" = x; then
8090    # The variable is not set by user, try to locate tool using the code snippet
8091    for ac_prog in mktemp
8092do
8093  # Extract the first word of "$ac_prog", so it can be a program name with args.
8094set dummy $ac_prog; ac_word=$2
8095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8096$as_echo_n "checking for $ac_word... " >&6; }
8097if ${ac_cv_path_MKTEMP+:} false; then :
8098  $as_echo_n "(cached) " >&6
8099else
8100  case $MKTEMP in
8101  [\\/]* | ?:[\\/]*)
8102  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8103  ;;
8104  *)
8105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8106for as_dir in $PATH
8107do
8108  IFS=$as_save_IFS
8109  test -z "$as_dir" && as_dir=.
8110    for ac_exec_ext in '' $ac_executable_extensions; do
8111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8112    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8114    break 2
8115  fi
8116done
8117  done
8118IFS=$as_save_IFS
8119
8120  ;;
8121esac
8122fi
8123MKTEMP=$ac_cv_path_MKTEMP
8124if test -n "$MKTEMP"; then
8125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8126$as_echo "$MKTEMP" >&6; }
8127else
8128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8129$as_echo "no" >&6; }
8130fi
8131
8132
8133  test -n "$MKTEMP" && break
8134done
8135
8136  else
8137    # The variable is set, but is it from the command line or the environment?
8138
8139    # Try to remove the string !MKTEMP! from our list.
8140    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8141    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8142      # If it failed, the variable was not from the command line. Ignore it,
8143      # but warn the user (except for BASH, which is always set by the calling BASH).
8144      if test "xMKTEMP" != xBASH; then
8145        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8146$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8147      fi
8148      # Try to locate tool using the code snippet
8149      for ac_prog in mktemp
8150do
8151  # Extract the first word of "$ac_prog", so it can be a program name with args.
8152set dummy $ac_prog; ac_word=$2
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
8155if ${ac_cv_path_MKTEMP+:} false; then :
8156  $as_echo_n "(cached) " >&6
8157else
8158  case $MKTEMP in
8159  [\\/]* | ?:[\\/]*)
8160  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8161  ;;
8162  *)
8163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166  IFS=$as_save_IFS
8167  test -z "$as_dir" && as_dir=.
8168    for ac_exec_ext in '' $ac_executable_extensions; do
8169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8170    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8172    break 2
8173  fi
8174done
8175  done
8176IFS=$as_save_IFS
8177
8178  ;;
8179esac
8180fi
8181MKTEMP=$ac_cv_path_MKTEMP
8182if test -n "$MKTEMP"; then
8183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8184$as_echo "$MKTEMP" >&6; }
8185else
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8187$as_echo "no" >&6; }
8188fi
8189
8190
8191  test -n "$MKTEMP" && break
8192done
8193
8194    else
8195      # If it succeeded, then it was overridden by the user. We will use it
8196      # for the tool.
8197
8198      # First remove it from the list of overridden variables, so we can test
8199      # for unknown variables in the end.
8200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8201
8202      # Check if the provided tool contains a complete path.
8203      tool_specified="$MKTEMP"
8204      tool_basename="${tool_specified##*/}"
8205      if test "x$tool_basename" = "x$tool_specified"; then
8206        # A command without a complete path is provided, search $PATH.
8207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8208$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8209        # Extract the first word of "$tool_basename", so it can be a program name with args.
8210set dummy $tool_basename; ac_word=$2
8211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212$as_echo_n "checking for $ac_word... " >&6; }
8213if ${ac_cv_path_MKTEMP+:} false; then :
8214  $as_echo_n "(cached) " >&6
8215else
8216  case $MKTEMP in
8217  [\\/]* | ?:[\\/]*)
8218  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8219  ;;
8220  *)
8221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236  ;;
8237esac
8238fi
8239MKTEMP=$ac_cv_path_MKTEMP
8240if test -n "$MKTEMP"; then
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8242$as_echo "$MKTEMP" >&6; }
8243else
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
8249        if test "x$MKTEMP" = x; then
8250          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8251        fi
8252      else
8253        # Otherwise we believe it is a complete path. Use it as it is.
8254        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8255$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8257$as_echo_n "checking for MKTEMP... " >&6; }
8258        if test ! -x "$tool_specified"; then
8259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8260$as_echo "not found" >&6; }
8261          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8262        fi
8263        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8264$as_echo "$tool_specified" >&6; }
8265      fi
8266    fi
8267  fi
8268
8269
8270
8271  if test "x$MKTEMP" = x; then
8272    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8273  fi
8274
8275
8276
8277
8278
8279  # Publish this variable in the help.
8280
8281
8282  if test "x$MV" = x; then
8283    # The variable is not set by user, try to locate tool using the code snippet
8284    for ac_prog in mv
8285do
8286  # Extract the first word of "$ac_prog", so it can be a program name with args.
8287set dummy $ac_prog; ac_word=$2
8288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8289$as_echo_n "checking for $ac_word... " >&6; }
8290if ${ac_cv_path_MV+:} false; then :
8291  $as_echo_n "(cached) " >&6
8292else
8293  case $MV in
8294  [\\/]* | ?:[\\/]*)
8295  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8296  ;;
8297  *)
8298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8299for as_dir in $PATH
8300do
8301  IFS=$as_save_IFS
8302  test -z "$as_dir" && as_dir=.
8303    for ac_exec_ext in '' $ac_executable_extensions; do
8304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8305    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8307    break 2
8308  fi
8309done
8310  done
8311IFS=$as_save_IFS
8312
8313  ;;
8314esac
8315fi
8316MV=$ac_cv_path_MV
8317if test -n "$MV"; then
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8319$as_echo "$MV" >&6; }
8320else
8321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8322$as_echo "no" >&6; }
8323fi
8324
8325
8326  test -n "$MV" && break
8327done
8328
8329  else
8330    # The variable is set, but is it from the command line or the environment?
8331
8332    # Try to remove the string !MV! from our list.
8333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8335      # If it failed, the variable was not from the command line. Ignore it,
8336      # but warn the user (except for BASH, which is always set by the calling BASH).
8337      if test "xMV" != xBASH; then
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8339$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8340      fi
8341      # Try to locate tool using the code snippet
8342      for ac_prog in mv
8343do
8344  # Extract the first word of "$ac_prog", so it can be a program name with args.
8345set dummy $ac_prog; ac_word=$2
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347$as_echo_n "checking for $ac_word... " >&6; }
8348if ${ac_cv_path_MV+:} false; then :
8349  $as_echo_n "(cached) " >&6
8350else
8351  case $MV in
8352  [\\/]* | ?:[\\/]*)
8353  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8354  ;;
8355  *)
8356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8357for as_dir in $PATH
8358do
8359  IFS=$as_save_IFS
8360  test -z "$as_dir" && as_dir=.
8361    for ac_exec_ext in '' $ac_executable_extensions; do
8362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8363    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8365    break 2
8366  fi
8367done
8368  done
8369IFS=$as_save_IFS
8370
8371  ;;
8372esac
8373fi
8374MV=$ac_cv_path_MV
8375if test -n "$MV"; then
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8377$as_echo "$MV" >&6; }
8378else
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380$as_echo "no" >&6; }
8381fi
8382
8383
8384  test -n "$MV" && break
8385done
8386
8387    else
8388      # If it succeeded, then it was overridden by the user. We will use it
8389      # for the tool.
8390
8391      # First remove it from the list of overridden variables, so we can test
8392      # for unknown variables in the end.
8393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8394
8395      # Check if the provided tool contains a complete path.
8396      tool_specified="$MV"
8397      tool_basename="${tool_specified##*/}"
8398      if test "x$tool_basename" = "x$tool_specified"; then
8399        # A command without a complete path is provided, search $PATH.
8400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8401$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8402        # Extract the first word of "$tool_basename", so it can be a program name with args.
8403set dummy $tool_basename; ac_word=$2
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8405$as_echo_n "checking for $ac_word... " >&6; }
8406if ${ac_cv_path_MV+:} false; then :
8407  $as_echo_n "(cached) " >&6
8408else
8409  case $MV in
8410  [\\/]* | ?:[\\/]*)
8411  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8412  ;;
8413  *)
8414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8415for as_dir in $PATH
8416do
8417  IFS=$as_save_IFS
8418  test -z "$as_dir" && as_dir=.
8419    for ac_exec_ext in '' $ac_executable_extensions; do
8420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8421    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8423    break 2
8424  fi
8425done
8426  done
8427IFS=$as_save_IFS
8428
8429  ;;
8430esac
8431fi
8432MV=$ac_cv_path_MV
8433if test -n "$MV"; then
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8435$as_echo "$MV" >&6; }
8436else
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438$as_echo "no" >&6; }
8439fi
8440
8441
8442        if test "x$MV" = x; then
8443          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8444        fi
8445      else
8446        # Otherwise we believe it is a complete path. Use it as it is.
8447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8448$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8449        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8450$as_echo_n "checking for MV... " >&6; }
8451        if test ! -x "$tool_specified"; then
8452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8453$as_echo "not found" >&6; }
8454          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8455        fi
8456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8457$as_echo "$tool_specified" >&6; }
8458      fi
8459    fi
8460  fi
8461
8462
8463
8464  if test "x$MV" = x; then
8465    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8466  fi
8467
8468
8469
8470
8471
8472  # Publish this variable in the help.
8473
8474
8475  if test "x$NAWK" = x; then
8476    # The variable is not set by user, try to locate tool using the code snippet
8477    for ac_prog in nawk gawk awk
8478do
8479  # Extract the first word of "$ac_prog", so it can be a program name with args.
8480set dummy $ac_prog; ac_word=$2
8481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8482$as_echo_n "checking for $ac_word... " >&6; }
8483if ${ac_cv_path_NAWK+:} false; then :
8484  $as_echo_n "(cached) " >&6
8485else
8486  case $NAWK in
8487  [\\/]* | ?:[\\/]*)
8488  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8489  ;;
8490  *)
8491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8492for as_dir in $PATH
8493do
8494  IFS=$as_save_IFS
8495  test -z "$as_dir" && as_dir=.
8496    for ac_exec_ext in '' $ac_executable_extensions; do
8497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8498    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8500    break 2
8501  fi
8502done
8503  done
8504IFS=$as_save_IFS
8505
8506  ;;
8507esac
8508fi
8509NAWK=$ac_cv_path_NAWK
8510if test -n "$NAWK"; then
8511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8512$as_echo "$NAWK" >&6; }
8513else
8514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8515$as_echo "no" >&6; }
8516fi
8517
8518
8519  test -n "$NAWK" && break
8520done
8521
8522  else
8523    # The variable is set, but is it from the command line or the environment?
8524
8525    # Try to remove the string !NAWK! from our list.
8526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8528      # If it failed, the variable was not from the command line. Ignore it,
8529      # but warn the user (except for BASH, which is always set by the calling BASH).
8530      if test "xNAWK" != xBASH; then
8531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8532$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8533      fi
8534      # Try to locate tool using the code snippet
8535      for ac_prog in nawk gawk awk
8536do
8537  # Extract the first word of "$ac_prog", so it can be a program name with args.
8538set dummy $ac_prog; ac_word=$2
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8540$as_echo_n "checking for $ac_word... " >&6; }
8541if ${ac_cv_path_NAWK+:} false; then :
8542  $as_echo_n "(cached) " >&6
8543else
8544  case $NAWK in
8545  [\\/]* | ?:[\\/]*)
8546  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8547  ;;
8548  *)
8549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8550for as_dir in $PATH
8551do
8552  IFS=$as_save_IFS
8553  test -z "$as_dir" && as_dir=.
8554    for ac_exec_ext in '' $ac_executable_extensions; do
8555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8556    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8558    break 2
8559  fi
8560done
8561  done
8562IFS=$as_save_IFS
8563
8564  ;;
8565esac
8566fi
8567NAWK=$ac_cv_path_NAWK
8568if test -n "$NAWK"; then
8569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8570$as_echo "$NAWK" >&6; }
8571else
8572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8573$as_echo "no" >&6; }
8574fi
8575
8576
8577  test -n "$NAWK" && break
8578done
8579
8580    else
8581      # If it succeeded, then it was overridden by the user. We will use it
8582      # for the tool.
8583
8584      # First remove it from the list of overridden variables, so we can test
8585      # for unknown variables in the end.
8586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8587
8588      # Check if the provided tool contains a complete path.
8589      tool_specified="$NAWK"
8590      tool_basename="${tool_specified##*/}"
8591      if test "x$tool_basename" = "x$tool_specified"; then
8592        # A command without a complete path is provided, search $PATH.
8593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8594$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8595        # Extract the first word of "$tool_basename", so it can be a program name with args.
8596set dummy $tool_basename; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_NAWK+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $NAWK in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625NAWK=$ac_cv_path_NAWK
8626if test -n "$NAWK"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8628$as_echo "$NAWK" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635        if test "x$NAWK" = x; then
8636          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8637        fi
8638      else
8639        # Otherwise we believe it is a complete path. Use it as it is.
8640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8641$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8642        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8643$as_echo_n "checking for NAWK... " >&6; }
8644        if test ! -x "$tool_specified"; then
8645          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8646$as_echo "not found" >&6; }
8647          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8648        fi
8649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8650$as_echo "$tool_specified" >&6; }
8651      fi
8652    fi
8653  fi
8654
8655
8656
8657  if test "x$NAWK" = x; then
8658    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8659  fi
8660
8661
8662
8663
8664
8665  # Publish this variable in the help.
8666
8667
8668  if test "x$PRINTF" = x; then
8669    # The variable is not set by user, try to locate tool using the code snippet
8670    for ac_prog in printf
8671do
8672  # Extract the first word of "$ac_prog", so it can be a program name with args.
8673set dummy $ac_prog; ac_word=$2
8674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8675$as_echo_n "checking for $ac_word... " >&6; }
8676if ${ac_cv_path_PRINTF+:} false; then :
8677  $as_echo_n "(cached) " >&6
8678else
8679  case $PRINTF in
8680  [\\/]* | ?:[\\/]*)
8681  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8682  ;;
8683  *)
8684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8685for as_dir in $PATH
8686do
8687  IFS=$as_save_IFS
8688  test -z "$as_dir" && as_dir=.
8689    for ac_exec_ext in '' $ac_executable_extensions; do
8690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8691    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8693    break 2
8694  fi
8695done
8696  done
8697IFS=$as_save_IFS
8698
8699  ;;
8700esac
8701fi
8702PRINTF=$ac_cv_path_PRINTF
8703if test -n "$PRINTF"; then
8704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8705$as_echo "$PRINTF" >&6; }
8706else
8707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8708$as_echo "no" >&6; }
8709fi
8710
8711
8712  test -n "$PRINTF" && break
8713done
8714
8715  else
8716    # The variable is set, but is it from the command line or the environment?
8717
8718    # Try to remove the string !PRINTF! from our list.
8719    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8720    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8721      # If it failed, the variable was not from the command line. Ignore it,
8722      # but warn the user (except for BASH, which is always set by the calling BASH).
8723      if test "xPRINTF" != xBASH; then
8724        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8725$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8726      fi
8727      # Try to locate tool using the code snippet
8728      for ac_prog in printf
8729do
8730  # Extract the first word of "$ac_prog", so it can be a program name with args.
8731set dummy $ac_prog; ac_word=$2
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733$as_echo_n "checking for $ac_word... " >&6; }
8734if ${ac_cv_path_PRINTF+:} false; then :
8735  $as_echo_n "(cached) " >&6
8736else
8737  case $PRINTF in
8738  [\\/]* | ?:[\\/]*)
8739  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8740  ;;
8741  *)
8742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8743for as_dir in $PATH
8744do
8745  IFS=$as_save_IFS
8746  test -z "$as_dir" && as_dir=.
8747    for ac_exec_ext in '' $ac_executable_extensions; do
8748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8749    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8751    break 2
8752  fi
8753done
8754  done
8755IFS=$as_save_IFS
8756
8757  ;;
8758esac
8759fi
8760PRINTF=$ac_cv_path_PRINTF
8761if test -n "$PRINTF"; then
8762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8763$as_echo "$PRINTF" >&6; }
8764else
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8766$as_echo "no" >&6; }
8767fi
8768
8769
8770  test -n "$PRINTF" && break
8771done
8772
8773    else
8774      # If it succeeded, then it was overridden by the user. We will use it
8775      # for the tool.
8776
8777      # First remove it from the list of overridden variables, so we can test
8778      # for unknown variables in the end.
8779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8780
8781      # Check if the provided tool contains a complete path.
8782      tool_specified="$PRINTF"
8783      tool_basename="${tool_specified##*/}"
8784      if test "x$tool_basename" = "x$tool_specified"; then
8785        # A command without a complete path is provided, search $PATH.
8786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8787$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8788        # Extract the first word of "$tool_basename", so it can be a program name with args.
8789set dummy $tool_basename; ac_word=$2
8790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8791$as_echo_n "checking for $ac_word... " >&6; }
8792if ${ac_cv_path_PRINTF+:} false; then :
8793  $as_echo_n "(cached) " >&6
8794else
8795  case $PRINTF in
8796  [\\/]* | ?:[\\/]*)
8797  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8798  ;;
8799  *)
8800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8801for as_dir in $PATH
8802do
8803  IFS=$as_save_IFS
8804  test -z "$as_dir" && as_dir=.
8805    for ac_exec_ext in '' $ac_executable_extensions; do
8806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8807    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8809    break 2
8810  fi
8811done
8812  done
8813IFS=$as_save_IFS
8814
8815  ;;
8816esac
8817fi
8818PRINTF=$ac_cv_path_PRINTF
8819if test -n "$PRINTF"; then
8820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8821$as_echo "$PRINTF" >&6; }
8822else
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824$as_echo "no" >&6; }
8825fi
8826
8827
8828        if test "x$PRINTF" = x; then
8829          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8830        fi
8831      else
8832        # Otherwise we believe it is a complete path. Use it as it is.
8833        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8834$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8835        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8836$as_echo_n "checking for PRINTF... " >&6; }
8837        if test ! -x "$tool_specified"; then
8838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8839$as_echo "not found" >&6; }
8840          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8841        fi
8842        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8843$as_echo "$tool_specified" >&6; }
8844      fi
8845    fi
8846  fi
8847
8848
8849
8850  if test "x$PRINTF" = x; then
8851    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8852  fi
8853
8854
8855
8856
8857
8858  # Publish this variable in the help.
8859
8860
8861  if test "x$RM" = x; then
8862    # The variable is not set by user, try to locate tool using the code snippet
8863    for ac_prog in rm
8864do
8865  # Extract the first word of "$ac_prog", so it can be a program name with args.
8866set dummy $ac_prog; ac_word=$2
8867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8868$as_echo_n "checking for $ac_word... " >&6; }
8869if ${ac_cv_path_RM+:} false; then :
8870  $as_echo_n "(cached) " >&6
8871else
8872  case $RM in
8873  [\\/]* | ?:[\\/]*)
8874  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8875  ;;
8876  *)
8877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8878for as_dir in $PATH
8879do
8880  IFS=$as_save_IFS
8881  test -z "$as_dir" && as_dir=.
8882    for ac_exec_ext in '' $ac_executable_extensions; do
8883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8884    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8886    break 2
8887  fi
8888done
8889  done
8890IFS=$as_save_IFS
8891
8892  ;;
8893esac
8894fi
8895RM=$ac_cv_path_RM
8896if test -n "$RM"; then
8897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8898$as_echo "$RM" >&6; }
8899else
8900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8901$as_echo "no" >&6; }
8902fi
8903
8904
8905  test -n "$RM" && break
8906done
8907
8908  else
8909    # The variable is set, but is it from the command line or the environment?
8910
8911    # Try to remove the string !RM! from our list.
8912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8914      # If it failed, the variable was not from the command line. Ignore it,
8915      # but warn the user (except for BASH, which is always set by the calling BASH).
8916      if test "xRM" != xBASH; then
8917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8918$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8919      fi
8920      # Try to locate tool using the code snippet
8921      for ac_prog in rm
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if ${ac_cv_path_RM+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $RM in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953RM=$ac_cv_path_RM
8954if test -n "$RM"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8956$as_echo "$RM" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$RM" && break
8964done
8965
8966    else
8967      # If it succeeded, then it was overridden by the user. We will use it
8968      # for the tool.
8969
8970      # First remove it from the list of overridden variables, so we can test
8971      # for unknown variables in the end.
8972      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8973
8974      # Check if the provided tool contains a complete path.
8975      tool_specified="$RM"
8976      tool_basename="${tool_specified##*/}"
8977      if test "x$tool_basename" = "x$tool_specified"; then
8978        # A command without a complete path is provided, search $PATH.
8979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8980$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8981        # Extract the first word of "$tool_basename", so it can be a program name with args.
8982set dummy $tool_basename; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_RM+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $RM in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011RM=$ac_cv_path_RM
9012if test -n "$RM"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9014$as_echo "$RM" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021        if test "x$RM" = x; then
9022          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9023        fi
9024      else
9025        # Otherwise we believe it is a complete path. Use it as it is.
9026        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9027$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9028        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9029$as_echo_n "checking for RM... " >&6; }
9030        if test ! -x "$tool_specified"; then
9031          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9032$as_echo "not found" >&6; }
9033          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9034        fi
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9036$as_echo "$tool_specified" >&6; }
9037      fi
9038    fi
9039  fi
9040
9041
9042
9043  if test "x$RM" = x; then
9044    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9045  fi
9046
9047
9048
9049
9050
9051  # Publish this variable in the help.
9052
9053
9054  if test "x$SH" = x; then
9055    # The variable is not set by user, try to locate tool using the code snippet
9056    for ac_prog in sh
9057do
9058  # Extract the first word of "$ac_prog", so it can be a program name with args.
9059set dummy $ac_prog; ac_word=$2
9060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9061$as_echo_n "checking for $ac_word... " >&6; }
9062if ${ac_cv_path_SH+:} false; then :
9063  $as_echo_n "(cached) " >&6
9064else
9065  case $SH in
9066  [\\/]* | ?:[\\/]*)
9067  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9068  ;;
9069  *)
9070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9071for as_dir in $PATH
9072do
9073  IFS=$as_save_IFS
9074  test -z "$as_dir" && as_dir=.
9075    for ac_exec_ext in '' $ac_executable_extensions; do
9076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9077    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9079    break 2
9080  fi
9081done
9082  done
9083IFS=$as_save_IFS
9084
9085  ;;
9086esac
9087fi
9088SH=$ac_cv_path_SH
9089if test -n "$SH"; then
9090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9091$as_echo "$SH" >&6; }
9092else
9093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9094$as_echo "no" >&6; }
9095fi
9096
9097
9098  test -n "$SH" && break
9099done
9100
9101  else
9102    # The variable is set, but is it from the command line or the environment?
9103
9104    # Try to remove the string !SH! from our list.
9105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9107      # If it failed, the variable was not from the command line. Ignore it,
9108      # but warn the user (except for BASH, which is always set by the calling BASH).
9109      if test "xSH" != xBASH; then
9110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9111$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9112      fi
9113      # Try to locate tool using the code snippet
9114      for ac_prog in sh
9115do
9116  # Extract the first word of "$ac_prog", so it can be a program name with args.
9117set dummy $ac_prog; ac_word=$2
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9119$as_echo_n "checking for $ac_word... " >&6; }
9120if ${ac_cv_path_SH+:} false; then :
9121  $as_echo_n "(cached) " >&6
9122else
9123  case $SH in
9124  [\\/]* | ?:[\\/]*)
9125  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9126  ;;
9127  *)
9128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129for as_dir in $PATH
9130do
9131  IFS=$as_save_IFS
9132  test -z "$as_dir" && as_dir=.
9133    for ac_exec_ext in '' $ac_executable_extensions; do
9134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137    break 2
9138  fi
9139done
9140  done
9141IFS=$as_save_IFS
9142
9143  ;;
9144esac
9145fi
9146SH=$ac_cv_path_SH
9147if test -n "$SH"; then
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9149$as_echo "$SH" >&6; }
9150else
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
9153fi
9154
9155
9156  test -n "$SH" && break
9157done
9158
9159    else
9160      # If it succeeded, then it was overridden by the user. We will use it
9161      # for the tool.
9162
9163      # First remove it from the list of overridden variables, so we can test
9164      # for unknown variables in the end.
9165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9166
9167      # Check if the provided tool contains a complete path.
9168      tool_specified="$SH"
9169      tool_basename="${tool_specified##*/}"
9170      if test "x$tool_basename" = "x$tool_specified"; then
9171        # A command without a complete path is provided, search $PATH.
9172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9173$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9174        # Extract the first word of "$tool_basename", so it can be a program name with args.
9175set dummy $tool_basename; ac_word=$2
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9177$as_echo_n "checking for $ac_word... " >&6; }
9178if ${ac_cv_path_SH+:} false; then :
9179  $as_echo_n "(cached) " >&6
9180else
9181  case $SH in
9182  [\\/]* | ?:[\\/]*)
9183  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9184  ;;
9185  *)
9186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187for as_dir in $PATH
9188do
9189  IFS=$as_save_IFS
9190  test -z "$as_dir" && as_dir=.
9191    for ac_exec_ext in '' $ac_executable_extensions; do
9192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9193    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9195    break 2
9196  fi
9197done
9198  done
9199IFS=$as_save_IFS
9200
9201  ;;
9202esac
9203fi
9204SH=$ac_cv_path_SH
9205if test -n "$SH"; then
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9207$as_echo "$SH" >&6; }
9208else
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
9211fi
9212
9213
9214        if test "x$SH" = x; then
9215          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9216        fi
9217      else
9218        # Otherwise we believe it is a complete path. Use it as it is.
9219        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9220$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9222$as_echo_n "checking for SH... " >&6; }
9223        if test ! -x "$tool_specified"; then
9224          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9225$as_echo "not found" >&6; }
9226          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9227        fi
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9229$as_echo "$tool_specified" >&6; }
9230      fi
9231    fi
9232  fi
9233
9234
9235
9236  if test "x$SH" = x; then
9237    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9238  fi
9239
9240
9241
9242
9243
9244  # Publish this variable in the help.
9245
9246
9247  if test "x$SORT" = x; then
9248    # The variable is not set by user, try to locate tool using the code snippet
9249    for ac_prog in sort
9250do
9251  # Extract the first word of "$ac_prog", so it can be a program name with args.
9252set dummy $ac_prog; ac_word=$2
9253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9254$as_echo_n "checking for $ac_word... " >&6; }
9255if ${ac_cv_path_SORT+:} false; then :
9256  $as_echo_n "(cached) " >&6
9257else
9258  case $SORT in
9259  [\\/]* | ?:[\\/]*)
9260  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9261  ;;
9262  *)
9263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9264for as_dir in $PATH
9265do
9266  IFS=$as_save_IFS
9267  test -z "$as_dir" && as_dir=.
9268    for ac_exec_ext in '' $ac_executable_extensions; do
9269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9270    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9272    break 2
9273  fi
9274done
9275  done
9276IFS=$as_save_IFS
9277
9278  ;;
9279esac
9280fi
9281SORT=$ac_cv_path_SORT
9282if test -n "$SORT"; then
9283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9284$as_echo "$SORT" >&6; }
9285else
9286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9287$as_echo "no" >&6; }
9288fi
9289
9290
9291  test -n "$SORT" && break
9292done
9293
9294  else
9295    # The variable is set, but is it from the command line or the environment?
9296
9297    # Try to remove the string !SORT! from our list.
9298    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9299    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9300      # If it failed, the variable was not from the command line. Ignore it,
9301      # but warn the user (except for BASH, which is always set by the calling BASH).
9302      if test "xSORT" != xBASH; then
9303        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9304$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9305      fi
9306      # Try to locate tool using the code snippet
9307      for ac_prog in sort
9308do
9309  # Extract the first word of "$ac_prog", so it can be a program name with args.
9310set dummy $ac_prog; ac_word=$2
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9312$as_echo_n "checking for $ac_word... " >&6; }
9313if ${ac_cv_path_SORT+:} false; then :
9314  $as_echo_n "(cached) " >&6
9315else
9316  case $SORT in
9317  [\\/]* | ?:[\\/]*)
9318  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9319  ;;
9320  *)
9321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9322for as_dir in $PATH
9323do
9324  IFS=$as_save_IFS
9325  test -z "$as_dir" && as_dir=.
9326    for ac_exec_ext in '' $ac_executable_extensions; do
9327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9328    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9330    break 2
9331  fi
9332done
9333  done
9334IFS=$as_save_IFS
9335
9336  ;;
9337esac
9338fi
9339SORT=$ac_cv_path_SORT
9340if test -n "$SORT"; then
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9342$as_echo "$SORT" >&6; }
9343else
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
9346fi
9347
9348
9349  test -n "$SORT" && break
9350done
9351
9352    else
9353      # If it succeeded, then it was overridden by the user. We will use it
9354      # for the tool.
9355
9356      # First remove it from the list of overridden variables, so we can test
9357      # for unknown variables in the end.
9358      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9359
9360      # Check if the provided tool contains a complete path.
9361      tool_specified="$SORT"
9362      tool_basename="${tool_specified##*/}"
9363      if test "x$tool_basename" = "x$tool_specified"; then
9364        # A command without a complete path is provided, search $PATH.
9365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9366$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9367        # Extract the first word of "$tool_basename", so it can be a program name with args.
9368set dummy $tool_basename; ac_word=$2
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9370$as_echo_n "checking for $ac_word... " >&6; }
9371if ${ac_cv_path_SORT+:} false; then :
9372  $as_echo_n "(cached) " >&6
9373else
9374  case $SORT in
9375  [\\/]* | ?:[\\/]*)
9376  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9377  ;;
9378  *)
9379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9380for as_dir in $PATH
9381do
9382  IFS=$as_save_IFS
9383  test -z "$as_dir" && as_dir=.
9384    for ac_exec_ext in '' $ac_executable_extensions; do
9385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9386    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9388    break 2
9389  fi
9390done
9391  done
9392IFS=$as_save_IFS
9393
9394  ;;
9395esac
9396fi
9397SORT=$ac_cv_path_SORT
9398if test -n "$SORT"; then
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9400$as_echo "$SORT" >&6; }
9401else
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
9404fi
9405
9406
9407        if test "x$SORT" = x; then
9408          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9409        fi
9410      else
9411        # Otherwise we believe it is a complete path. Use it as it is.
9412        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9413$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9414        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9415$as_echo_n "checking for SORT... " >&6; }
9416        if test ! -x "$tool_specified"; then
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9418$as_echo "not found" >&6; }
9419          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9420        fi
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9422$as_echo "$tool_specified" >&6; }
9423      fi
9424    fi
9425  fi
9426
9427
9428
9429  if test "x$SORT" = x; then
9430    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9431  fi
9432
9433
9434
9435
9436
9437  # Publish this variable in the help.
9438
9439
9440  if test "x$TAIL" = x; then
9441    # The variable is not set by user, try to locate tool using the code snippet
9442    for ac_prog in tail
9443do
9444  # Extract the first word of "$ac_prog", so it can be a program name with args.
9445set dummy $ac_prog; ac_word=$2
9446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9447$as_echo_n "checking for $ac_word... " >&6; }
9448if ${ac_cv_path_TAIL+:} false; then :
9449  $as_echo_n "(cached) " >&6
9450else
9451  case $TAIL in
9452  [\\/]* | ?:[\\/]*)
9453  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9454  ;;
9455  *)
9456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9457for as_dir in $PATH
9458do
9459  IFS=$as_save_IFS
9460  test -z "$as_dir" && as_dir=.
9461    for ac_exec_ext in '' $ac_executable_extensions; do
9462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9463    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9465    break 2
9466  fi
9467done
9468  done
9469IFS=$as_save_IFS
9470
9471  ;;
9472esac
9473fi
9474TAIL=$ac_cv_path_TAIL
9475if test -n "$TAIL"; then
9476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9477$as_echo "$TAIL" >&6; }
9478else
9479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9480$as_echo "no" >&6; }
9481fi
9482
9483
9484  test -n "$TAIL" && break
9485done
9486
9487  else
9488    # The variable is set, but is it from the command line or the environment?
9489
9490    # Try to remove the string !TAIL! from our list.
9491    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9492    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9493      # If it failed, the variable was not from the command line. Ignore it,
9494      # but warn the user (except for BASH, which is always set by the calling BASH).
9495      if test "xTAIL" != xBASH; then
9496        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9497$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9498      fi
9499      # Try to locate tool using the code snippet
9500      for ac_prog in tail
9501do
9502  # Extract the first word of "$ac_prog", so it can be a program name with args.
9503set dummy $ac_prog; ac_word=$2
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9505$as_echo_n "checking for $ac_word... " >&6; }
9506if ${ac_cv_path_TAIL+:} false; then :
9507  $as_echo_n "(cached) " >&6
9508else
9509  case $TAIL in
9510  [\\/]* | ?:[\\/]*)
9511  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9512  ;;
9513  *)
9514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9515for as_dir in $PATH
9516do
9517  IFS=$as_save_IFS
9518  test -z "$as_dir" && as_dir=.
9519    for ac_exec_ext in '' $ac_executable_extensions; do
9520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9521    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9523    break 2
9524  fi
9525done
9526  done
9527IFS=$as_save_IFS
9528
9529  ;;
9530esac
9531fi
9532TAIL=$ac_cv_path_TAIL
9533if test -n "$TAIL"; then
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9535$as_echo "$TAIL" >&6; }
9536else
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
9539fi
9540
9541
9542  test -n "$TAIL" && break
9543done
9544
9545    else
9546      # If it succeeded, then it was overridden by the user. We will use it
9547      # for the tool.
9548
9549      # First remove it from the list of overridden variables, so we can test
9550      # for unknown variables in the end.
9551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9552
9553      # Check if the provided tool contains a complete path.
9554      tool_specified="$TAIL"
9555      tool_basename="${tool_specified##*/}"
9556      if test "x$tool_basename" = "x$tool_specified"; then
9557        # A command without a complete path is provided, search $PATH.
9558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9559$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9560        # Extract the first word of "$tool_basename", so it can be a program name with args.
9561set dummy $tool_basename; ac_word=$2
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9563$as_echo_n "checking for $ac_word... " >&6; }
9564if ${ac_cv_path_TAIL+:} false; then :
9565  $as_echo_n "(cached) " >&6
9566else
9567  case $TAIL in
9568  [\\/]* | ?:[\\/]*)
9569  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9570  ;;
9571  *)
9572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9573for as_dir in $PATH
9574do
9575  IFS=$as_save_IFS
9576  test -z "$as_dir" && as_dir=.
9577    for ac_exec_ext in '' $ac_executable_extensions; do
9578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9579    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9581    break 2
9582  fi
9583done
9584  done
9585IFS=$as_save_IFS
9586
9587  ;;
9588esac
9589fi
9590TAIL=$ac_cv_path_TAIL
9591if test -n "$TAIL"; then
9592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9593$as_echo "$TAIL" >&6; }
9594else
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
9597fi
9598
9599
9600        if test "x$TAIL" = x; then
9601          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9602        fi
9603      else
9604        # Otherwise we believe it is a complete path. Use it as it is.
9605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9606$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9608$as_echo_n "checking for TAIL... " >&6; }
9609        if test ! -x "$tool_specified"; then
9610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9611$as_echo "not found" >&6; }
9612          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9613        fi
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9615$as_echo "$tool_specified" >&6; }
9616      fi
9617    fi
9618  fi
9619
9620
9621
9622  if test "x$TAIL" = x; then
9623    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9624  fi
9625
9626
9627
9628
9629
9630  # Publish this variable in the help.
9631
9632
9633  if test "x$TAR" = x; then
9634    # The variable is not set by user, try to locate tool using the code snippet
9635    for ac_prog in tar
9636do
9637  # Extract the first word of "$ac_prog", so it can be a program name with args.
9638set dummy $ac_prog; ac_word=$2
9639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9640$as_echo_n "checking for $ac_word... " >&6; }
9641if ${ac_cv_path_TAR+:} false; then :
9642  $as_echo_n "(cached) " >&6
9643else
9644  case $TAR in
9645  [\\/]* | ?:[\\/]*)
9646  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9647  ;;
9648  *)
9649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9650for as_dir in $PATH
9651do
9652  IFS=$as_save_IFS
9653  test -z "$as_dir" && as_dir=.
9654    for ac_exec_ext in '' $ac_executable_extensions; do
9655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9656    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9658    break 2
9659  fi
9660done
9661  done
9662IFS=$as_save_IFS
9663
9664  ;;
9665esac
9666fi
9667TAR=$ac_cv_path_TAR
9668if test -n "$TAR"; then
9669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9670$as_echo "$TAR" >&6; }
9671else
9672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9673$as_echo "no" >&6; }
9674fi
9675
9676
9677  test -n "$TAR" && break
9678done
9679
9680  else
9681    # The variable is set, but is it from the command line or the environment?
9682
9683    # Try to remove the string !TAR! from our list.
9684    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9685    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9686      # If it failed, the variable was not from the command line. Ignore it,
9687      # but warn the user (except for BASH, which is always set by the calling BASH).
9688      if test "xTAR" != xBASH; then
9689        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9690$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9691      fi
9692      # Try to locate tool using the code snippet
9693      for ac_prog in tar
9694do
9695  # Extract the first word of "$ac_prog", so it can be a program name with args.
9696set dummy $ac_prog; ac_word=$2
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698$as_echo_n "checking for $ac_word... " >&6; }
9699if ${ac_cv_path_TAR+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  case $TAR in
9703  [\\/]* | ?:[\\/]*)
9704  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9705  ;;
9706  *)
9707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710  IFS=$as_save_IFS
9711  test -z "$as_dir" && as_dir=.
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722  ;;
9723esac
9724fi
9725TAR=$ac_cv_path_TAR
9726if test -n "$TAR"; then
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9728$as_echo "$TAR" >&6; }
9729else
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
9732fi
9733
9734
9735  test -n "$TAR" && break
9736done
9737
9738    else
9739      # If it succeeded, then it was overridden by the user. We will use it
9740      # for the tool.
9741
9742      # First remove it from the list of overridden variables, so we can test
9743      # for unknown variables in the end.
9744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9745
9746      # Check if the provided tool contains a complete path.
9747      tool_specified="$TAR"
9748      tool_basename="${tool_specified##*/}"
9749      if test "x$tool_basename" = "x$tool_specified"; then
9750        # A command without a complete path is provided, search $PATH.
9751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9752$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9753        # Extract the first word of "$tool_basename", so it can be a program name with args.
9754set dummy $tool_basename; ac_word=$2
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756$as_echo_n "checking for $ac_word... " >&6; }
9757if ${ac_cv_path_TAR+:} false; then :
9758  $as_echo_n "(cached) " >&6
9759else
9760  case $TAR in
9761  [\\/]* | ?:[\\/]*)
9762  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9763  ;;
9764  *)
9765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9766for as_dir in $PATH
9767do
9768  IFS=$as_save_IFS
9769  test -z "$as_dir" && as_dir=.
9770    for ac_exec_ext in '' $ac_executable_extensions; do
9771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9772    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9774    break 2
9775  fi
9776done
9777  done
9778IFS=$as_save_IFS
9779
9780  ;;
9781esac
9782fi
9783TAR=$ac_cv_path_TAR
9784if test -n "$TAR"; then
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9786$as_echo "$TAR" >&6; }
9787else
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790fi
9791
9792
9793        if test "x$TAR" = x; then
9794          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9795        fi
9796      else
9797        # Otherwise we believe it is a complete path. Use it as it is.
9798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9799$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9801$as_echo_n "checking for TAR... " >&6; }
9802        if test ! -x "$tool_specified"; then
9803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9804$as_echo "not found" >&6; }
9805          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9806        fi
9807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9808$as_echo "$tool_specified" >&6; }
9809      fi
9810    fi
9811  fi
9812
9813
9814
9815  if test "x$TAR" = x; then
9816    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9817  fi
9818
9819
9820
9821
9822
9823  # Publish this variable in the help.
9824
9825
9826  if test "x$TEE" = x; then
9827    # The variable is not set by user, try to locate tool using the code snippet
9828    for ac_prog in tee
9829do
9830  # Extract the first word of "$ac_prog", so it can be a program name with args.
9831set dummy $ac_prog; ac_word=$2
9832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9833$as_echo_n "checking for $ac_word... " >&6; }
9834if ${ac_cv_path_TEE+:} false; then :
9835  $as_echo_n "(cached) " >&6
9836else
9837  case $TEE in
9838  [\\/]* | ?:[\\/]*)
9839  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9840  ;;
9841  *)
9842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9843for as_dir in $PATH
9844do
9845  IFS=$as_save_IFS
9846  test -z "$as_dir" && as_dir=.
9847    for ac_exec_ext in '' $ac_executable_extensions; do
9848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9849    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9851    break 2
9852  fi
9853done
9854  done
9855IFS=$as_save_IFS
9856
9857  ;;
9858esac
9859fi
9860TEE=$ac_cv_path_TEE
9861if test -n "$TEE"; then
9862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9863$as_echo "$TEE" >&6; }
9864else
9865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
9867fi
9868
9869
9870  test -n "$TEE" && break
9871done
9872
9873  else
9874    # The variable is set, but is it from the command line or the environment?
9875
9876    # Try to remove the string !TEE! from our list.
9877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9879      # If it failed, the variable was not from the command line. Ignore it,
9880      # but warn the user (except for BASH, which is always set by the calling BASH).
9881      if test "xTEE" != xBASH; then
9882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9883$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9884      fi
9885      # Try to locate tool using the code snippet
9886      for ac_prog in tee
9887do
9888  # Extract the first word of "$ac_prog", so it can be a program name with args.
9889set dummy $ac_prog; ac_word=$2
9890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9891$as_echo_n "checking for $ac_word... " >&6; }
9892if ${ac_cv_path_TEE+:} false; then :
9893  $as_echo_n "(cached) " >&6
9894else
9895  case $TEE in
9896  [\\/]* | ?:[\\/]*)
9897  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9898  ;;
9899  *)
9900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9901for as_dir in $PATH
9902do
9903  IFS=$as_save_IFS
9904  test -z "$as_dir" && as_dir=.
9905    for ac_exec_ext in '' $ac_executable_extensions; do
9906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9907    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9909    break 2
9910  fi
9911done
9912  done
9913IFS=$as_save_IFS
9914
9915  ;;
9916esac
9917fi
9918TEE=$ac_cv_path_TEE
9919if test -n "$TEE"; then
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9921$as_echo "$TEE" >&6; }
9922else
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9924$as_echo "no" >&6; }
9925fi
9926
9927
9928  test -n "$TEE" && break
9929done
9930
9931    else
9932      # If it succeeded, then it was overridden by the user. We will use it
9933      # for the tool.
9934
9935      # First remove it from the list of overridden variables, so we can test
9936      # for unknown variables in the end.
9937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9938
9939      # Check if the provided tool contains a complete path.
9940      tool_specified="$TEE"
9941      tool_basename="${tool_specified##*/}"
9942      if test "x$tool_basename" = "x$tool_specified"; then
9943        # A command without a complete path is provided, search $PATH.
9944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9945$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9946        # Extract the first word of "$tool_basename", so it can be a program name with args.
9947set dummy $tool_basename; ac_word=$2
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949$as_echo_n "checking for $ac_word... " >&6; }
9950if ${ac_cv_path_TEE+:} false; then :
9951  $as_echo_n "(cached) " >&6
9952else
9953  case $TEE in
9954  [\\/]* | ?:[\\/]*)
9955  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9956  ;;
9957  *)
9958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961  IFS=$as_save_IFS
9962  test -z "$as_dir" && as_dir=.
9963    for ac_exec_ext in '' $ac_executable_extensions; do
9964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967    break 2
9968  fi
9969done
9970  done
9971IFS=$as_save_IFS
9972
9973  ;;
9974esac
9975fi
9976TEE=$ac_cv_path_TEE
9977if test -n "$TEE"; then
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9979$as_echo "$TEE" >&6; }
9980else
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983fi
9984
9985
9986        if test "x$TEE" = x; then
9987          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9988        fi
9989      else
9990        # Otherwise we believe it is a complete path. Use it as it is.
9991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9992$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9994$as_echo_n "checking for TEE... " >&6; }
9995        if test ! -x "$tool_specified"; then
9996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9997$as_echo "not found" >&6; }
9998          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
9999        fi
10000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10001$as_echo "$tool_specified" >&6; }
10002      fi
10003    fi
10004  fi
10005
10006
10007
10008  if test "x$TEE" = x; then
10009    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10010  fi
10011
10012
10013
10014
10015
10016  # Publish this variable in the help.
10017
10018
10019  if test "x$TOUCH" = x; then
10020    # The variable is not set by user, try to locate tool using the code snippet
10021    for ac_prog in touch
10022do
10023  # Extract the first word of "$ac_prog", so it can be a program name with args.
10024set dummy $ac_prog; ac_word=$2
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026$as_echo_n "checking for $ac_word... " >&6; }
10027if ${ac_cv_path_TOUCH+:} false; then :
10028  $as_echo_n "(cached) " >&6
10029else
10030  case $TOUCH in
10031  [\\/]* | ?:[\\/]*)
10032  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10033  ;;
10034  *)
10035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036for as_dir in $PATH
10037do
10038  IFS=$as_save_IFS
10039  test -z "$as_dir" && as_dir=.
10040    for ac_exec_ext in '' $ac_executable_extensions; do
10041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044    break 2
10045  fi
10046done
10047  done
10048IFS=$as_save_IFS
10049
10050  ;;
10051esac
10052fi
10053TOUCH=$ac_cv_path_TOUCH
10054if test -n "$TOUCH"; then
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10056$as_echo "$TOUCH" >&6; }
10057else
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
10060fi
10061
10062
10063  test -n "$TOUCH" && break
10064done
10065
10066  else
10067    # The variable is set, but is it from the command line or the environment?
10068
10069    # Try to remove the string !TOUCH! from our list.
10070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10072      # If it failed, the variable was not from the command line. Ignore it,
10073      # but warn the user (except for BASH, which is always set by the calling BASH).
10074      if test "xTOUCH" != xBASH; then
10075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10076$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10077      fi
10078      # Try to locate tool using the code snippet
10079      for ac_prog in touch
10080do
10081  # Extract the first word of "$ac_prog", so it can be a program name with args.
10082set dummy $ac_prog; ac_word=$2
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084$as_echo_n "checking for $ac_word... " >&6; }
10085if ${ac_cv_path_TOUCH+:} false; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  case $TOUCH in
10089  [\\/]* | ?:[\\/]*)
10090  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10091  ;;
10092  *)
10093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094for as_dir in $PATH
10095do
10096  IFS=$as_save_IFS
10097  test -z "$as_dir" && as_dir=.
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111TOUCH=$ac_cv_path_TOUCH
10112if test -n "$TOUCH"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10114$as_echo "$TOUCH" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
10121  test -n "$TOUCH" && break
10122done
10123
10124    else
10125      # If it succeeded, then it was overridden by the user. We will use it
10126      # for the tool.
10127
10128      # First remove it from the list of overridden variables, so we can test
10129      # for unknown variables in the end.
10130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10131
10132      # Check if the provided tool contains a complete path.
10133      tool_specified="$TOUCH"
10134      tool_basename="${tool_specified##*/}"
10135      if test "x$tool_basename" = "x$tool_specified"; then
10136        # A command without a complete path is provided, search $PATH.
10137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10138$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10139        # Extract the first word of "$tool_basename", so it can be a program name with args.
10140set dummy $tool_basename; ac_word=$2
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10142$as_echo_n "checking for $ac_word... " >&6; }
10143if ${ac_cv_path_TOUCH+:} false; then :
10144  $as_echo_n "(cached) " >&6
10145else
10146  case $TOUCH in
10147  [\\/]* | ?:[\\/]*)
10148  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10149  ;;
10150  *)
10151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10152for as_dir in $PATH
10153do
10154  IFS=$as_save_IFS
10155  test -z "$as_dir" && as_dir=.
10156    for ac_exec_ext in '' $ac_executable_extensions; do
10157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10158    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10160    break 2
10161  fi
10162done
10163  done
10164IFS=$as_save_IFS
10165
10166  ;;
10167esac
10168fi
10169TOUCH=$ac_cv_path_TOUCH
10170if test -n "$TOUCH"; then
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10172$as_echo "$TOUCH" >&6; }
10173else
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10175$as_echo "no" >&6; }
10176fi
10177
10178
10179        if test "x$TOUCH" = x; then
10180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10181        fi
10182      else
10183        # Otherwise we believe it is a complete path. Use it as it is.
10184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10185$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10187$as_echo_n "checking for TOUCH... " >&6; }
10188        if test ! -x "$tool_specified"; then
10189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10190$as_echo "not found" >&6; }
10191          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10192        fi
10193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10194$as_echo "$tool_specified" >&6; }
10195      fi
10196    fi
10197  fi
10198
10199
10200
10201  if test "x$TOUCH" = x; then
10202    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10203  fi
10204
10205
10206
10207
10208
10209  # Publish this variable in the help.
10210
10211
10212  if test "x$TR" = x; then
10213    # The variable is not set by user, try to locate tool using the code snippet
10214    for ac_prog in tr
10215do
10216  # Extract the first word of "$ac_prog", so it can be a program name with args.
10217set dummy $ac_prog; ac_word=$2
10218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10219$as_echo_n "checking for $ac_word... " >&6; }
10220if ${ac_cv_path_TR+:} false; then :
10221  $as_echo_n "(cached) " >&6
10222else
10223  case $TR in
10224  [\\/]* | ?:[\\/]*)
10225  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10226  ;;
10227  *)
10228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10229for as_dir in $PATH
10230do
10231  IFS=$as_save_IFS
10232  test -z "$as_dir" && as_dir=.
10233    for ac_exec_ext in '' $ac_executable_extensions; do
10234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10235    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10237    break 2
10238  fi
10239done
10240  done
10241IFS=$as_save_IFS
10242
10243  ;;
10244esac
10245fi
10246TR=$ac_cv_path_TR
10247if test -n "$TR"; then
10248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10249$as_echo "$TR" >&6; }
10250else
10251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10252$as_echo "no" >&6; }
10253fi
10254
10255
10256  test -n "$TR" && break
10257done
10258
10259  else
10260    # The variable is set, but is it from the command line or the environment?
10261
10262    # Try to remove the string !TR! from our list.
10263    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10264    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10265      # If it failed, the variable was not from the command line. Ignore it,
10266      # but warn the user (except for BASH, which is always set by the calling BASH).
10267      if test "xTR" != xBASH; then
10268        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10269$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10270      fi
10271      # Try to locate tool using the code snippet
10272      for ac_prog in tr
10273do
10274  # Extract the first word of "$ac_prog", so it can be a program name with args.
10275set dummy $ac_prog; ac_word=$2
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277$as_echo_n "checking for $ac_word... " >&6; }
10278if ${ac_cv_path_TR+:} false; then :
10279  $as_echo_n "(cached) " >&6
10280else
10281  case $TR in
10282  [\\/]* | ?:[\\/]*)
10283  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10284  ;;
10285  *)
10286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287for as_dir in $PATH
10288do
10289  IFS=$as_save_IFS
10290  test -z "$as_dir" && as_dir=.
10291    for ac_exec_ext in '' $ac_executable_extensions; do
10292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10293    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295    break 2
10296  fi
10297done
10298  done
10299IFS=$as_save_IFS
10300
10301  ;;
10302esac
10303fi
10304TR=$ac_cv_path_TR
10305if test -n "$TR"; then
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10307$as_echo "$TR" >&6; }
10308else
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
10311fi
10312
10313
10314  test -n "$TR" && break
10315done
10316
10317    else
10318      # If it succeeded, then it was overridden by the user. We will use it
10319      # for the tool.
10320
10321      # First remove it from the list of overridden variables, so we can test
10322      # for unknown variables in the end.
10323      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10324
10325      # Check if the provided tool contains a complete path.
10326      tool_specified="$TR"
10327      tool_basename="${tool_specified##*/}"
10328      if test "x$tool_basename" = "x$tool_specified"; then
10329        # A command without a complete path is provided, search $PATH.
10330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10331$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10332        # Extract the first word of "$tool_basename", so it can be a program name with args.
10333set dummy $tool_basename; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_TR+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $TR in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362TR=$ac_cv_path_TR
10363if test -n "$TR"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10365$as_echo "$TR" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372        if test "x$TR" = x; then
10373          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10374        fi
10375      else
10376        # Otherwise we believe it is a complete path. Use it as it is.
10377        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10378$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10380$as_echo_n "checking for TR... " >&6; }
10381        if test ! -x "$tool_specified"; then
10382          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10383$as_echo "not found" >&6; }
10384          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10385        fi
10386        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10387$as_echo "$tool_specified" >&6; }
10388      fi
10389    fi
10390  fi
10391
10392
10393
10394  if test "x$TR" = x; then
10395    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10396  fi
10397
10398
10399
10400
10401
10402  # Publish this variable in the help.
10403
10404
10405  if test "x$UNAME" = x; then
10406    # The variable is not set by user, try to locate tool using the code snippet
10407    for ac_prog in uname
10408do
10409  # Extract the first word of "$ac_prog", so it can be a program name with args.
10410set dummy $ac_prog; ac_word=$2
10411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10412$as_echo_n "checking for $ac_word... " >&6; }
10413if ${ac_cv_path_UNAME+:} false; then :
10414  $as_echo_n "(cached) " >&6
10415else
10416  case $UNAME in
10417  [\\/]* | ?:[\\/]*)
10418  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10419  ;;
10420  *)
10421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10422for as_dir in $PATH
10423do
10424  IFS=$as_save_IFS
10425  test -z "$as_dir" && as_dir=.
10426    for ac_exec_ext in '' $ac_executable_extensions; do
10427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10428    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10430    break 2
10431  fi
10432done
10433  done
10434IFS=$as_save_IFS
10435
10436  ;;
10437esac
10438fi
10439UNAME=$ac_cv_path_UNAME
10440if test -n "$UNAME"; then
10441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10442$as_echo "$UNAME" >&6; }
10443else
10444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10445$as_echo "no" >&6; }
10446fi
10447
10448
10449  test -n "$UNAME" && break
10450done
10451
10452  else
10453    # The variable is set, but is it from the command line or the environment?
10454
10455    # Try to remove the string !UNAME! from our list.
10456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10458      # If it failed, the variable was not from the command line. Ignore it,
10459      # but warn the user (except for BASH, which is always set by the calling BASH).
10460      if test "xUNAME" != xBASH; then
10461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10462$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10463      fi
10464      # Try to locate tool using the code snippet
10465      for ac_prog in uname
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_UNAME+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $UNAME in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497UNAME=$ac_cv_path_UNAME
10498if test -n "$UNAME"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10500$as_echo "$UNAME" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$UNAME" && break
10508done
10509
10510    else
10511      # If it succeeded, then it was overridden by the user. We will use it
10512      # for the tool.
10513
10514      # First remove it from the list of overridden variables, so we can test
10515      # for unknown variables in the end.
10516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10517
10518      # Check if the provided tool contains a complete path.
10519      tool_specified="$UNAME"
10520      tool_basename="${tool_specified##*/}"
10521      if test "x$tool_basename" = "x$tool_specified"; then
10522        # A command without a complete path is provided, search $PATH.
10523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10524$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10525        # Extract the first word of "$tool_basename", so it can be a program name with args.
10526set dummy $tool_basename; ac_word=$2
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10528$as_echo_n "checking for $ac_word... " >&6; }
10529if ${ac_cv_path_UNAME+:} false; then :
10530  $as_echo_n "(cached) " >&6
10531else
10532  case $UNAME in
10533  [\\/]* | ?:[\\/]*)
10534  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10535  ;;
10536  *)
10537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10538for as_dir in $PATH
10539do
10540  IFS=$as_save_IFS
10541  test -z "$as_dir" && as_dir=.
10542    for ac_exec_ext in '' $ac_executable_extensions; do
10543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10544    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10546    break 2
10547  fi
10548done
10549  done
10550IFS=$as_save_IFS
10551
10552  ;;
10553esac
10554fi
10555UNAME=$ac_cv_path_UNAME
10556if test -n "$UNAME"; then
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10558$as_echo "$UNAME" >&6; }
10559else
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561$as_echo "no" >&6; }
10562fi
10563
10564
10565        if test "x$UNAME" = x; then
10566          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10567        fi
10568      else
10569        # Otherwise we believe it is a complete path. Use it as it is.
10570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10571$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10573$as_echo_n "checking for UNAME... " >&6; }
10574        if test ! -x "$tool_specified"; then
10575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10576$as_echo "not found" >&6; }
10577          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10578        fi
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10580$as_echo "$tool_specified" >&6; }
10581      fi
10582    fi
10583  fi
10584
10585
10586
10587  if test "x$UNAME" = x; then
10588    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10589  fi
10590
10591
10592
10593
10594
10595  # Publish this variable in the help.
10596
10597
10598  if test "x$UNIQ" = x; then
10599    # The variable is not set by user, try to locate tool using the code snippet
10600    for ac_prog in uniq
10601do
10602  # Extract the first word of "$ac_prog", so it can be a program name with args.
10603set dummy $ac_prog; ac_word=$2
10604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10605$as_echo_n "checking for $ac_word... " >&6; }
10606if ${ac_cv_path_UNIQ+:} false; then :
10607  $as_echo_n "(cached) " >&6
10608else
10609  case $UNIQ in
10610  [\\/]* | ?:[\\/]*)
10611  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10612  ;;
10613  *)
10614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10615for as_dir in $PATH
10616do
10617  IFS=$as_save_IFS
10618  test -z "$as_dir" && as_dir=.
10619    for ac_exec_ext in '' $ac_executable_extensions; do
10620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10621    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10623    break 2
10624  fi
10625done
10626  done
10627IFS=$as_save_IFS
10628
10629  ;;
10630esac
10631fi
10632UNIQ=$ac_cv_path_UNIQ
10633if test -n "$UNIQ"; then
10634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10635$as_echo "$UNIQ" >&6; }
10636else
10637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10638$as_echo "no" >&6; }
10639fi
10640
10641
10642  test -n "$UNIQ" && break
10643done
10644
10645  else
10646    # The variable is set, but is it from the command line or the environment?
10647
10648    # Try to remove the string !UNIQ! from our list.
10649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10651      # If it failed, the variable was not from the command line. Ignore it,
10652      # but warn the user (except for BASH, which is always set by the calling BASH).
10653      if test "xUNIQ" != xBASH; then
10654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10655$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10656      fi
10657      # Try to locate tool using the code snippet
10658      for ac_prog in uniq
10659do
10660  # Extract the first word of "$ac_prog", so it can be a program name with args.
10661set dummy $ac_prog; ac_word=$2
10662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10663$as_echo_n "checking for $ac_word... " >&6; }
10664if ${ac_cv_path_UNIQ+:} false; then :
10665  $as_echo_n "(cached) " >&6
10666else
10667  case $UNIQ in
10668  [\\/]* | ?:[\\/]*)
10669  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10670  ;;
10671  *)
10672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10673for as_dir in $PATH
10674do
10675  IFS=$as_save_IFS
10676  test -z "$as_dir" && as_dir=.
10677    for ac_exec_ext in '' $ac_executable_extensions; do
10678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10679    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10681    break 2
10682  fi
10683done
10684  done
10685IFS=$as_save_IFS
10686
10687  ;;
10688esac
10689fi
10690UNIQ=$ac_cv_path_UNIQ
10691if test -n "$UNIQ"; then
10692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10693$as_echo "$UNIQ" >&6; }
10694else
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696$as_echo "no" >&6; }
10697fi
10698
10699
10700  test -n "$UNIQ" && break
10701done
10702
10703    else
10704      # If it succeeded, then it was overridden by the user. We will use it
10705      # for the tool.
10706
10707      # First remove it from the list of overridden variables, so we can test
10708      # for unknown variables in the end.
10709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10710
10711      # Check if the provided tool contains a complete path.
10712      tool_specified="$UNIQ"
10713      tool_basename="${tool_specified##*/}"
10714      if test "x$tool_basename" = "x$tool_specified"; then
10715        # A command without a complete path is provided, search $PATH.
10716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10717$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10718        # Extract the first word of "$tool_basename", so it can be a program name with args.
10719set dummy $tool_basename; ac_word=$2
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10721$as_echo_n "checking for $ac_word... " >&6; }
10722if ${ac_cv_path_UNIQ+:} false; then :
10723  $as_echo_n "(cached) " >&6
10724else
10725  case $UNIQ in
10726  [\\/]* | ?:[\\/]*)
10727  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10728  ;;
10729  *)
10730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10731for as_dir in $PATH
10732do
10733  IFS=$as_save_IFS
10734  test -z "$as_dir" && as_dir=.
10735    for ac_exec_ext in '' $ac_executable_extensions; do
10736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10737    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10739    break 2
10740  fi
10741done
10742  done
10743IFS=$as_save_IFS
10744
10745  ;;
10746esac
10747fi
10748UNIQ=$ac_cv_path_UNIQ
10749if test -n "$UNIQ"; then
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10751$as_echo "$UNIQ" >&6; }
10752else
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
10755fi
10756
10757
10758        if test "x$UNIQ" = x; then
10759          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10760        fi
10761      else
10762        # Otherwise we believe it is a complete path. Use it as it is.
10763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10764$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10766$as_echo_n "checking for UNIQ... " >&6; }
10767        if test ! -x "$tool_specified"; then
10768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10769$as_echo "not found" >&6; }
10770          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10771        fi
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10773$as_echo "$tool_specified" >&6; }
10774      fi
10775    fi
10776  fi
10777
10778
10779
10780  if test "x$UNIQ" = x; then
10781    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10782  fi
10783
10784
10785
10786
10787
10788  # Publish this variable in the help.
10789
10790
10791  if test "x$WC" = x; then
10792    # The variable is not set by user, try to locate tool using the code snippet
10793    for ac_prog in wc
10794do
10795  # Extract the first word of "$ac_prog", so it can be a program name with args.
10796set dummy $ac_prog; ac_word=$2
10797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10798$as_echo_n "checking for $ac_word... " >&6; }
10799if ${ac_cv_path_WC+:} false; then :
10800  $as_echo_n "(cached) " >&6
10801else
10802  case $WC in
10803  [\\/]* | ?:[\\/]*)
10804  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10805  ;;
10806  *)
10807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10808for as_dir in $PATH
10809do
10810  IFS=$as_save_IFS
10811  test -z "$as_dir" && as_dir=.
10812    for ac_exec_ext in '' $ac_executable_extensions; do
10813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10814    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10816    break 2
10817  fi
10818done
10819  done
10820IFS=$as_save_IFS
10821
10822  ;;
10823esac
10824fi
10825WC=$ac_cv_path_WC
10826if test -n "$WC"; then
10827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10828$as_echo "$WC" >&6; }
10829else
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10831$as_echo "no" >&6; }
10832fi
10833
10834
10835  test -n "$WC" && break
10836done
10837
10838  else
10839    # The variable is set, but is it from the command line or the environment?
10840
10841    # Try to remove the string !WC! from our list.
10842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10844      # If it failed, the variable was not from the command line. Ignore it,
10845      # but warn the user (except for BASH, which is always set by the calling BASH).
10846      if test "xWC" != xBASH; then
10847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10848$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10849      fi
10850      # Try to locate tool using the code snippet
10851      for ac_prog in wc
10852do
10853  # Extract the first word of "$ac_prog", so it can be a program name with args.
10854set dummy $ac_prog; ac_word=$2
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10856$as_echo_n "checking for $ac_word... " >&6; }
10857if ${ac_cv_path_WC+:} false; then :
10858  $as_echo_n "(cached) " >&6
10859else
10860  case $WC in
10861  [\\/]* | ?:[\\/]*)
10862  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10863  ;;
10864  *)
10865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868  IFS=$as_save_IFS
10869  test -z "$as_dir" && as_dir=.
10870    for ac_exec_ext in '' $ac_executable_extensions; do
10871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10872    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10874    break 2
10875  fi
10876done
10877  done
10878IFS=$as_save_IFS
10879
10880  ;;
10881esac
10882fi
10883WC=$ac_cv_path_WC
10884if test -n "$WC"; then
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10886$as_echo "$WC" >&6; }
10887else
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10889$as_echo "no" >&6; }
10890fi
10891
10892
10893  test -n "$WC" && break
10894done
10895
10896    else
10897      # If it succeeded, then it was overridden by the user. We will use it
10898      # for the tool.
10899
10900      # First remove it from the list of overridden variables, so we can test
10901      # for unknown variables in the end.
10902      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10903
10904      # Check if the provided tool contains a complete path.
10905      tool_specified="$WC"
10906      tool_basename="${tool_specified##*/}"
10907      if test "x$tool_basename" = "x$tool_specified"; then
10908        # A command without a complete path is provided, search $PATH.
10909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10910$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10911        # Extract the first word of "$tool_basename", so it can be a program name with args.
10912set dummy $tool_basename; ac_word=$2
10913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10914$as_echo_n "checking for $ac_word... " >&6; }
10915if ${ac_cv_path_WC+:} false; then :
10916  $as_echo_n "(cached) " >&6
10917else
10918  case $WC in
10919  [\\/]* | ?:[\\/]*)
10920  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10921  ;;
10922  *)
10923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10924for as_dir in $PATH
10925do
10926  IFS=$as_save_IFS
10927  test -z "$as_dir" && as_dir=.
10928    for ac_exec_ext in '' $ac_executable_extensions; do
10929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10930    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10932    break 2
10933  fi
10934done
10935  done
10936IFS=$as_save_IFS
10937
10938  ;;
10939esac
10940fi
10941WC=$ac_cv_path_WC
10942if test -n "$WC"; then
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10944$as_echo "$WC" >&6; }
10945else
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
10948fi
10949
10950
10951        if test "x$WC" = x; then
10952          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10953        fi
10954      else
10955        # Otherwise we believe it is a complete path. Use it as it is.
10956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10957$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10958        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10959$as_echo_n "checking for WC... " >&6; }
10960        if test ! -x "$tool_specified"; then
10961          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10962$as_echo "not found" >&6; }
10963          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10964        fi
10965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10966$as_echo "$tool_specified" >&6; }
10967      fi
10968    fi
10969  fi
10970
10971
10972
10973  if test "x$WC" = x; then
10974    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10975  fi
10976
10977
10978
10979
10980
10981  # Publish this variable in the help.
10982
10983
10984  if test "x$WHICH" = x; then
10985    # The variable is not set by user, try to locate tool using the code snippet
10986    for ac_prog in which
10987do
10988  # Extract the first word of "$ac_prog", so it can be a program name with args.
10989set dummy $ac_prog; ac_word=$2
10990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10991$as_echo_n "checking for $ac_word... " >&6; }
10992if ${ac_cv_path_WHICH+:} false; then :
10993  $as_echo_n "(cached) " >&6
10994else
10995  case $WHICH in
10996  [\\/]* | ?:[\\/]*)
10997  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10998  ;;
10999  *)
11000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11001for as_dir in $PATH
11002do
11003  IFS=$as_save_IFS
11004  test -z "$as_dir" && as_dir=.
11005    for ac_exec_ext in '' $ac_executable_extensions; do
11006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11007    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11009    break 2
11010  fi
11011done
11012  done
11013IFS=$as_save_IFS
11014
11015  ;;
11016esac
11017fi
11018WHICH=$ac_cv_path_WHICH
11019if test -n "$WHICH"; then
11020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11021$as_echo "$WHICH" >&6; }
11022else
11023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11024$as_echo "no" >&6; }
11025fi
11026
11027
11028  test -n "$WHICH" && break
11029done
11030
11031  else
11032    # The variable is set, but is it from the command line or the environment?
11033
11034    # Try to remove the string !WHICH! from our list.
11035    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11036    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11037      # If it failed, the variable was not from the command line. Ignore it,
11038      # but warn the user (except for BASH, which is always set by the calling BASH).
11039      if test "xWHICH" != xBASH; then
11040        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11041$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11042      fi
11043      # Try to locate tool using the code snippet
11044      for ac_prog in which
11045do
11046  # Extract the first word of "$ac_prog", so it can be a program name with args.
11047set dummy $ac_prog; ac_word=$2
11048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11049$as_echo_n "checking for $ac_word... " >&6; }
11050if ${ac_cv_path_WHICH+:} false; then :
11051  $as_echo_n "(cached) " >&6
11052else
11053  case $WHICH in
11054  [\\/]* | ?:[\\/]*)
11055  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11056  ;;
11057  *)
11058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11059for as_dir in $PATH
11060do
11061  IFS=$as_save_IFS
11062  test -z "$as_dir" && as_dir=.
11063    for ac_exec_ext in '' $ac_executable_extensions; do
11064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11065    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11067    break 2
11068  fi
11069done
11070  done
11071IFS=$as_save_IFS
11072
11073  ;;
11074esac
11075fi
11076WHICH=$ac_cv_path_WHICH
11077if test -n "$WHICH"; then
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11079$as_echo "$WHICH" >&6; }
11080else
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
11083fi
11084
11085
11086  test -n "$WHICH" && break
11087done
11088
11089    else
11090      # If it succeeded, then it was overridden by the user. We will use it
11091      # for the tool.
11092
11093      # First remove it from the list of overridden variables, so we can test
11094      # for unknown variables in the end.
11095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11096
11097      # Check if the provided tool contains a complete path.
11098      tool_specified="$WHICH"
11099      tool_basename="${tool_specified##*/}"
11100      if test "x$tool_basename" = "x$tool_specified"; then
11101        # A command without a complete path is provided, search $PATH.
11102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11103$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11104        # Extract the first word of "$tool_basename", so it can be a program name with args.
11105set dummy $tool_basename; ac_word=$2
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107$as_echo_n "checking for $ac_word... " >&6; }
11108if ${ac_cv_path_WHICH+:} false; then :
11109  $as_echo_n "(cached) " >&6
11110else
11111  case $WHICH in
11112  [\\/]* | ?:[\\/]*)
11113  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11114  ;;
11115  *)
11116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117for as_dir in $PATH
11118do
11119  IFS=$as_save_IFS
11120  test -z "$as_dir" && as_dir=.
11121    for ac_exec_ext in '' $ac_executable_extensions; do
11122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125    break 2
11126  fi
11127done
11128  done
11129IFS=$as_save_IFS
11130
11131  ;;
11132esac
11133fi
11134WHICH=$ac_cv_path_WHICH
11135if test -n "$WHICH"; then
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11137$as_echo "$WHICH" >&6; }
11138else
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
11141fi
11142
11143
11144        if test "x$WHICH" = x; then
11145          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11146        fi
11147      else
11148        # Otherwise we believe it is a complete path. Use it as it is.
11149        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11150$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11151        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11152$as_echo_n "checking for WHICH... " >&6; }
11153        if test ! -x "$tool_specified"; then
11154          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11155$as_echo "not found" >&6; }
11156          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11157        fi
11158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11159$as_echo "$tool_specified" >&6; }
11160      fi
11161    fi
11162  fi
11163
11164
11165
11166  if test "x$WHICH" = x; then
11167    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11168  fi
11169
11170
11171
11172
11173
11174  # Publish this variable in the help.
11175
11176
11177  if test "x$XARGS" = x; then
11178    # The variable is not set by user, try to locate tool using the code snippet
11179    for ac_prog in xargs
11180do
11181  # Extract the first word of "$ac_prog", so it can be a program name with args.
11182set dummy $ac_prog; ac_word=$2
11183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11184$as_echo_n "checking for $ac_word... " >&6; }
11185if ${ac_cv_path_XARGS+:} false; then :
11186  $as_echo_n "(cached) " >&6
11187else
11188  case $XARGS in
11189  [\\/]* | ?:[\\/]*)
11190  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11191  ;;
11192  *)
11193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11194for as_dir in $PATH
11195do
11196  IFS=$as_save_IFS
11197  test -z "$as_dir" && as_dir=.
11198    for ac_exec_ext in '' $ac_executable_extensions; do
11199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11200    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11202    break 2
11203  fi
11204done
11205  done
11206IFS=$as_save_IFS
11207
11208  ;;
11209esac
11210fi
11211XARGS=$ac_cv_path_XARGS
11212if test -n "$XARGS"; then
11213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11214$as_echo "$XARGS" >&6; }
11215else
11216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11217$as_echo "no" >&6; }
11218fi
11219
11220
11221  test -n "$XARGS" && break
11222done
11223
11224  else
11225    # The variable is set, but is it from the command line or the environment?
11226
11227    # Try to remove the string !XARGS! from our list.
11228    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11229    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11230      # If it failed, the variable was not from the command line. Ignore it,
11231      # but warn the user (except for BASH, which is always set by the calling BASH).
11232      if test "xXARGS" != xBASH; then
11233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11234$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11235      fi
11236      # Try to locate tool using the code snippet
11237      for ac_prog in xargs
11238do
11239  # Extract the first word of "$ac_prog", so it can be a program name with args.
11240set dummy $ac_prog; ac_word=$2
11241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11242$as_echo_n "checking for $ac_word... " >&6; }
11243if ${ac_cv_path_XARGS+:} false; then :
11244  $as_echo_n "(cached) " >&6
11245else
11246  case $XARGS in
11247  [\\/]* | ?:[\\/]*)
11248  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11249  ;;
11250  *)
11251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11252for as_dir in $PATH
11253do
11254  IFS=$as_save_IFS
11255  test -z "$as_dir" && as_dir=.
11256    for ac_exec_ext in '' $ac_executable_extensions; do
11257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11258    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11260    break 2
11261  fi
11262done
11263  done
11264IFS=$as_save_IFS
11265
11266  ;;
11267esac
11268fi
11269XARGS=$ac_cv_path_XARGS
11270if test -n "$XARGS"; then
11271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11272$as_echo "$XARGS" >&6; }
11273else
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11275$as_echo "no" >&6; }
11276fi
11277
11278
11279  test -n "$XARGS" && break
11280done
11281
11282    else
11283      # If it succeeded, then it was overridden by the user. We will use it
11284      # for the tool.
11285
11286      # First remove it from the list of overridden variables, so we can test
11287      # for unknown variables in the end.
11288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11289
11290      # Check if the provided tool contains a complete path.
11291      tool_specified="$XARGS"
11292      tool_basename="${tool_specified##*/}"
11293      if test "x$tool_basename" = "x$tool_specified"; then
11294        # A command without a complete path is provided, search $PATH.
11295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11296$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11297        # Extract the first word of "$tool_basename", so it can be a program name with args.
11298set dummy $tool_basename; ac_word=$2
11299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11300$as_echo_n "checking for $ac_word... " >&6; }
11301if ${ac_cv_path_XARGS+:} false; then :
11302  $as_echo_n "(cached) " >&6
11303else
11304  case $XARGS in
11305  [\\/]* | ?:[\\/]*)
11306  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11307  ;;
11308  *)
11309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11310for as_dir in $PATH
11311do
11312  IFS=$as_save_IFS
11313  test -z "$as_dir" && as_dir=.
11314    for ac_exec_ext in '' $ac_executable_extensions; do
11315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11316    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11318    break 2
11319  fi
11320done
11321  done
11322IFS=$as_save_IFS
11323
11324  ;;
11325esac
11326fi
11327XARGS=$ac_cv_path_XARGS
11328if test -n "$XARGS"; then
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11330$as_echo "$XARGS" >&6; }
11331else
11332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
11334fi
11335
11336
11337        if test "x$XARGS" = x; then
11338          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11339        fi
11340      else
11341        # Otherwise we believe it is a complete path. Use it as it is.
11342        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11343$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11345$as_echo_n "checking for XARGS... " >&6; }
11346        if test ! -x "$tool_specified"; then
11347          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11348$as_echo "not found" >&6; }
11349          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11350        fi
11351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11352$as_echo "$tool_specified" >&6; }
11353      fi
11354    fi
11355  fi
11356
11357
11358
11359  if test "x$XARGS" = x; then
11360    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11361  fi
11362
11363
11364
11365  # Then required tools that require some special treatment.
11366
11367
11368  # Publish this variable in the help.
11369
11370
11371  if test "x$AWK" = x; then
11372    # The variable is not set by user, try to locate tool using the code snippet
11373    for ac_prog in gawk mawk nawk awk
11374do
11375  # Extract the first word of "$ac_prog", so it can be a program name with args.
11376set dummy $ac_prog; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_prog_AWK+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  if test -n "$AWK"; then
11383  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11384else
11385as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11386for as_dir in $PATH
11387do
11388  IFS=$as_save_IFS
11389  test -z "$as_dir" && as_dir=.
11390    for ac_exec_ext in '' $ac_executable_extensions; do
11391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11392    ac_cv_prog_AWK="$ac_prog"
11393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11394    break 2
11395  fi
11396done
11397  done
11398IFS=$as_save_IFS
11399
11400fi
11401fi
11402AWK=$ac_cv_prog_AWK
11403if test -n "$AWK"; then
11404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11405$as_echo "$AWK" >&6; }
11406else
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11408$as_echo "no" >&6; }
11409fi
11410
11411
11412  test -n "$AWK" && break
11413done
11414
11415  else
11416    # The variable is set, but is it from the command line or the environment?
11417
11418    # Try to remove the string !AWK! from our list.
11419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11421      # If it failed, the variable was not from the command line. Ignore it,
11422      # but warn the user (except for BASH, which is always set by the calling BASH).
11423      if test "xAWK" != xBASH; then
11424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11425$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11426      fi
11427      # Try to locate tool using the code snippet
11428      for ac_prog in gawk mawk nawk awk
11429do
11430  # Extract the first word of "$ac_prog", so it can be a program name with args.
11431set dummy $ac_prog; ac_word=$2
11432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11433$as_echo_n "checking for $ac_word... " >&6; }
11434if ${ac_cv_prog_AWK+:} false; then :
11435  $as_echo_n "(cached) " >&6
11436else
11437  if test -n "$AWK"; then
11438  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11439else
11440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11441for as_dir in $PATH
11442do
11443  IFS=$as_save_IFS
11444  test -z "$as_dir" && as_dir=.
11445    for ac_exec_ext in '' $ac_executable_extensions; do
11446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11447    ac_cv_prog_AWK="$ac_prog"
11448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11449    break 2
11450  fi
11451done
11452  done
11453IFS=$as_save_IFS
11454
11455fi
11456fi
11457AWK=$ac_cv_prog_AWK
11458if test -n "$AWK"; then
11459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11460$as_echo "$AWK" >&6; }
11461else
11462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11463$as_echo "no" >&6; }
11464fi
11465
11466
11467  test -n "$AWK" && break
11468done
11469
11470    else
11471      # If it succeeded, then it was overridden by the user. We will use it
11472      # for the tool.
11473
11474      # First remove it from the list of overridden variables, so we can test
11475      # for unknown variables in the end.
11476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11477
11478      # Check if the provided tool contains a complete path.
11479      tool_specified="$AWK"
11480      tool_basename="${tool_specified##*/}"
11481      if test "x$tool_basename" = "x$tool_specified"; then
11482        # A command without a complete path is provided, search $PATH.
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11484$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11485        # Extract the first word of "$tool_basename", so it can be a program name with args.
11486set dummy $tool_basename; ac_word=$2
11487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11488$as_echo_n "checking for $ac_word... " >&6; }
11489if ${ac_cv_path_AWK+:} false; then :
11490  $as_echo_n "(cached) " >&6
11491else
11492  case $AWK in
11493  [\\/]* | ?:[\\/]*)
11494  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11495  ;;
11496  *)
11497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11498for as_dir in $PATH
11499do
11500  IFS=$as_save_IFS
11501  test -z "$as_dir" && as_dir=.
11502    for ac_exec_ext in '' $ac_executable_extensions; do
11503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11504    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11506    break 2
11507  fi
11508done
11509  done
11510IFS=$as_save_IFS
11511
11512  ;;
11513esac
11514fi
11515AWK=$ac_cv_path_AWK
11516if test -n "$AWK"; then
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11518$as_echo "$AWK" >&6; }
11519else
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11521$as_echo "no" >&6; }
11522fi
11523
11524
11525        if test "x$AWK" = x; then
11526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11527        fi
11528      else
11529        # Otherwise we believe it is a complete path. Use it as it is.
11530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11531$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11533$as_echo_n "checking for AWK... " >&6; }
11534        if test ! -x "$tool_specified"; then
11535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11536$as_echo "not found" >&6; }
11537          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11538        fi
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11540$as_echo "$tool_specified" >&6; }
11541      fi
11542    fi
11543  fi
11544
11545
11546  if test "x$AWK" = x; then
11547    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11548  fi
11549
11550
11551
11552
11553  # Publish this variable in the help.
11554
11555
11556  if test "x$GREP" = x; then
11557    # The variable is not set by user, try to locate tool using the code snippet
11558    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11559$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11560if ${ac_cv_path_GREP+:} false; then :
11561  $as_echo_n "(cached) " >&6
11562else
11563  if test -z "$GREP"; then
11564  ac_path_GREP_found=false
11565  # Loop through the user's path and test for each of PROGNAME-LIST
11566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11567for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11568do
11569  IFS=$as_save_IFS
11570  test -z "$as_dir" && as_dir=.
11571    for ac_prog in grep ggrep; do
11572    for ac_exec_ext in '' $ac_executable_extensions; do
11573      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11574      as_fn_executable_p "$ac_path_GREP" || continue
11575# Check for GNU ac_path_GREP and select it if it is found.
11576  # Check for GNU $ac_path_GREP
11577case `"$ac_path_GREP" --version 2>&1` in
11578*GNU*)
11579  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11580*)
11581  ac_count=0
11582  $as_echo_n 0123456789 >"conftest.in"
11583  while :
11584  do
11585    cat "conftest.in" "conftest.in" >"conftest.tmp"
11586    mv "conftest.tmp" "conftest.in"
11587    cp "conftest.in" "conftest.nl"
11588    $as_echo 'GREP' >> "conftest.nl"
11589    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11590    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11591    as_fn_arith $ac_count + 1 && ac_count=$as_val
11592    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11593      # Best one so far, save it but keep looking for a better one
11594      ac_cv_path_GREP="$ac_path_GREP"
11595      ac_path_GREP_max=$ac_count
11596    fi
11597    # 10*(2^10) chars as input seems more than enough
11598    test $ac_count -gt 10 && break
11599  done
11600  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11601esac
11602
11603      $ac_path_GREP_found && break 3
11604    done
11605  done
11606  done
11607IFS=$as_save_IFS
11608  if test -z "$ac_cv_path_GREP"; then
11609    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11610  fi
11611else
11612  ac_cv_path_GREP=$GREP
11613fi
11614
11615fi
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11617$as_echo "$ac_cv_path_GREP" >&6; }
11618 GREP="$ac_cv_path_GREP"
11619
11620
11621  else
11622    # The variable is set, but is it from the command line or the environment?
11623
11624    # Try to remove the string !GREP! from our list.
11625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11627      # If it failed, the variable was not from the command line. Ignore it,
11628      # but warn the user (except for BASH, which is always set by the calling BASH).
11629      if test "xGREP" != xBASH; then
11630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11631$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11632      fi
11633      # Try to locate tool using the code snippet
11634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11635$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11636if ${ac_cv_path_GREP+:} false; then :
11637  $as_echo_n "(cached) " >&6
11638else
11639  if test -z "$GREP"; then
11640  ac_path_GREP_found=false
11641  # Loop through the user's path and test for each of PROGNAME-LIST
11642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11643for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11644do
11645  IFS=$as_save_IFS
11646  test -z "$as_dir" && as_dir=.
11647    for ac_prog in grep ggrep; do
11648    for ac_exec_ext in '' $ac_executable_extensions; do
11649      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11650      as_fn_executable_p "$ac_path_GREP" || continue
11651# Check for GNU ac_path_GREP and select it if it is found.
11652  # Check for GNU $ac_path_GREP
11653case `"$ac_path_GREP" --version 2>&1` in
11654*GNU*)
11655  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11656*)
11657  ac_count=0
11658  $as_echo_n 0123456789 >"conftest.in"
11659  while :
11660  do
11661    cat "conftest.in" "conftest.in" >"conftest.tmp"
11662    mv "conftest.tmp" "conftest.in"
11663    cp "conftest.in" "conftest.nl"
11664    $as_echo 'GREP' >> "conftest.nl"
11665    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11666    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11667    as_fn_arith $ac_count + 1 && ac_count=$as_val
11668    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11669      # Best one so far, save it but keep looking for a better one
11670      ac_cv_path_GREP="$ac_path_GREP"
11671      ac_path_GREP_max=$ac_count
11672    fi
11673    # 10*(2^10) chars as input seems more than enough
11674    test $ac_count -gt 10 && break
11675  done
11676  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11677esac
11678
11679      $ac_path_GREP_found && break 3
11680    done
11681  done
11682  done
11683IFS=$as_save_IFS
11684  if test -z "$ac_cv_path_GREP"; then
11685    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11686  fi
11687else
11688  ac_cv_path_GREP=$GREP
11689fi
11690
11691fi
11692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11693$as_echo "$ac_cv_path_GREP" >&6; }
11694 GREP="$ac_cv_path_GREP"
11695
11696
11697    else
11698      # If it succeeded, then it was overridden by the user. We will use it
11699      # for the tool.
11700
11701      # First remove it from the list of overridden variables, so we can test
11702      # for unknown variables in the end.
11703      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11704
11705      # Check if the provided tool contains a complete path.
11706      tool_specified="$GREP"
11707      tool_basename="${tool_specified##*/}"
11708      if test "x$tool_basename" = "x$tool_specified"; then
11709        # A command without a complete path is provided, search $PATH.
11710        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11711$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11712        # Extract the first word of "$tool_basename", so it can be a program name with args.
11713set dummy $tool_basename; ac_word=$2
11714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11715$as_echo_n "checking for $ac_word... " >&6; }
11716if ${ac_cv_path_GREP+:} false; then :
11717  $as_echo_n "(cached) " >&6
11718else
11719  case $GREP in
11720  [\\/]* | ?:[\\/]*)
11721  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11722  ;;
11723  *)
11724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11725for as_dir in $PATH
11726do
11727  IFS=$as_save_IFS
11728  test -z "$as_dir" && as_dir=.
11729    for ac_exec_ext in '' $ac_executable_extensions; do
11730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11731    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11733    break 2
11734  fi
11735done
11736  done
11737IFS=$as_save_IFS
11738
11739  ;;
11740esac
11741fi
11742GREP=$ac_cv_path_GREP
11743if test -n "$GREP"; then
11744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11745$as_echo "$GREP" >&6; }
11746else
11747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11748$as_echo "no" >&6; }
11749fi
11750
11751
11752        if test "x$GREP" = x; then
11753          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11754        fi
11755      else
11756        # Otherwise we believe it is a complete path. Use it as it is.
11757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11758$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11759        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11760$as_echo_n "checking for GREP... " >&6; }
11761        if test ! -x "$tool_specified"; then
11762          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11763$as_echo "not found" >&6; }
11764          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11765        fi
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11767$as_echo "$tool_specified" >&6; }
11768      fi
11769    fi
11770  fi
11771
11772
11773  if test "x$GREP" = x; then
11774    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11775  fi
11776
11777
11778
11779
11780  # Publish this variable in the help.
11781
11782
11783  if test "x$EGREP" = x; then
11784    # The variable is not set by user, try to locate tool using the code snippet
11785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11786$as_echo_n "checking for egrep... " >&6; }
11787if ${ac_cv_path_EGREP+:} false; then :
11788  $as_echo_n "(cached) " >&6
11789else
11790  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11791   then ac_cv_path_EGREP="$GREP -E"
11792   else
11793     if test -z "$EGREP"; then
11794  ac_path_EGREP_found=false
11795  # Loop through the user's path and test for each of PROGNAME-LIST
11796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11797for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11798do
11799  IFS=$as_save_IFS
11800  test -z "$as_dir" && as_dir=.
11801    for ac_prog in egrep; do
11802    for ac_exec_ext in '' $ac_executable_extensions; do
11803      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11804      as_fn_executable_p "$ac_path_EGREP" || continue
11805# Check for GNU ac_path_EGREP and select it if it is found.
11806  # Check for GNU $ac_path_EGREP
11807case `"$ac_path_EGREP" --version 2>&1` in
11808*GNU*)
11809  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11810*)
11811  ac_count=0
11812  $as_echo_n 0123456789 >"conftest.in"
11813  while :
11814  do
11815    cat "conftest.in" "conftest.in" >"conftest.tmp"
11816    mv "conftest.tmp" "conftest.in"
11817    cp "conftest.in" "conftest.nl"
11818    $as_echo 'EGREP' >> "conftest.nl"
11819    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11820    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11821    as_fn_arith $ac_count + 1 && ac_count=$as_val
11822    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11823      # Best one so far, save it but keep looking for a better one
11824      ac_cv_path_EGREP="$ac_path_EGREP"
11825      ac_path_EGREP_max=$ac_count
11826    fi
11827    # 10*(2^10) chars as input seems more than enough
11828    test $ac_count -gt 10 && break
11829  done
11830  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11831esac
11832
11833      $ac_path_EGREP_found && break 3
11834    done
11835  done
11836  done
11837IFS=$as_save_IFS
11838  if test -z "$ac_cv_path_EGREP"; then
11839    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11840  fi
11841else
11842  ac_cv_path_EGREP=$EGREP
11843fi
11844
11845   fi
11846fi
11847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11848$as_echo "$ac_cv_path_EGREP" >&6; }
11849 EGREP="$ac_cv_path_EGREP"
11850
11851
11852  else
11853    # The variable is set, but is it from the command line or the environment?
11854
11855    # Try to remove the string !EGREP! from our list.
11856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11858      # If it failed, the variable was not from the command line. Ignore it,
11859      # but warn the user (except for BASH, which is always set by the calling BASH).
11860      if test "xEGREP" != xBASH; then
11861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11862$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11863      fi
11864      # Try to locate tool using the code snippet
11865      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11866$as_echo_n "checking for egrep... " >&6; }
11867if ${ac_cv_path_EGREP+:} false; then :
11868  $as_echo_n "(cached) " >&6
11869else
11870  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11871   then ac_cv_path_EGREP="$GREP -E"
11872   else
11873     if test -z "$EGREP"; then
11874  ac_path_EGREP_found=false
11875  # Loop through the user's path and test for each of PROGNAME-LIST
11876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11877for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11878do
11879  IFS=$as_save_IFS
11880  test -z "$as_dir" && as_dir=.
11881    for ac_prog in egrep; do
11882    for ac_exec_ext in '' $ac_executable_extensions; do
11883      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11884      as_fn_executable_p "$ac_path_EGREP" || continue
11885# Check for GNU ac_path_EGREP and select it if it is found.
11886  # Check for GNU $ac_path_EGREP
11887case `"$ac_path_EGREP" --version 2>&1` in
11888*GNU*)
11889  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11890*)
11891  ac_count=0
11892  $as_echo_n 0123456789 >"conftest.in"
11893  while :
11894  do
11895    cat "conftest.in" "conftest.in" >"conftest.tmp"
11896    mv "conftest.tmp" "conftest.in"
11897    cp "conftest.in" "conftest.nl"
11898    $as_echo 'EGREP' >> "conftest.nl"
11899    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11900    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11901    as_fn_arith $ac_count + 1 && ac_count=$as_val
11902    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11903      # Best one so far, save it but keep looking for a better one
11904      ac_cv_path_EGREP="$ac_path_EGREP"
11905      ac_path_EGREP_max=$ac_count
11906    fi
11907    # 10*(2^10) chars as input seems more than enough
11908    test $ac_count -gt 10 && break
11909  done
11910  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11911esac
11912
11913      $ac_path_EGREP_found && break 3
11914    done
11915  done
11916  done
11917IFS=$as_save_IFS
11918  if test -z "$ac_cv_path_EGREP"; then
11919    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11920  fi
11921else
11922  ac_cv_path_EGREP=$EGREP
11923fi
11924
11925   fi
11926fi
11927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11928$as_echo "$ac_cv_path_EGREP" >&6; }
11929 EGREP="$ac_cv_path_EGREP"
11930
11931
11932    else
11933      # If it succeeded, then it was overridden by the user. We will use it
11934      # for the tool.
11935
11936      # First remove it from the list of overridden variables, so we can test
11937      # for unknown variables in the end.
11938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11939
11940      # Check if the provided tool contains a complete path.
11941      tool_specified="$EGREP"
11942      tool_basename="${tool_specified##*/}"
11943      if test "x$tool_basename" = "x$tool_specified"; then
11944        # A command without a complete path is provided, search $PATH.
11945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11946$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11947        # Extract the first word of "$tool_basename", so it can be a program name with args.
11948set dummy $tool_basename; ac_word=$2
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11950$as_echo_n "checking for $ac_word... " >&6; }
11951if ${ac_cv_path_EGREP+:} false; then :
11952  $as_echo_n "(cached) " >&6
11953else
11954  case $EGREP in
11955  [\\/]* | ?:[\\/]*)
11956  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11957  ;;
11958  *)
11959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11960for as_dir in $PATH
11961do
11962  IFS=$as_save_IFS
11963  test -z "$as_dir" && as_dir=.
11964    for ac_exec_ext in '' $ac_executable_extensions; do
11965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11966    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11968    break 2
11969  fi
11970done
11971  done
11972IFS=$as_save_IFS
11973
11974  ;;
11975esac
11976fi
11977EGREP=$ac_cv_path_EGREP
11978if test -n "$EGREP"; then
11979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11980$as_echo "$EGREP" >&6; }
11981else
11982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11983$as_echo "no" >&6; }
11984fi
11985
11986
11987        if test "x$EGREP" = x; then
11988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11989        fi
11990      else
11991        # Otherwise we believe it is a complete path. Use it as it is.
11992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11993$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11995$as_echo_n "checking for EGREP... " >&6; }
11996        if test ! -x "$tool_specified"; then
11997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11998$as_echo "not found" >&6; }
11999          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12000        fi
12001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12002$as_echo "$tool_specified" >&6; }
12003      fi
12004    fi
12005  fi
12006
12007
12008  if test "x$EGREP" = x; then
12009    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12010  fi
12011
12012
12013
12014
12015  # Publish this variable in the help.
12016
12017
12018  if test "x$FGREP" = x; then
12019    # The variable is not set by user, try to locate tool using the code snippet
12020    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12021$as_echo_n "checking for fgrep... " >&6; }
12022if ${ac_cv_path_FGREP+:} false; then :
12023  $as_echo_n "(cached) " >&6
12024else
12025  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12026   then ac_cv_path_FGREP="$GREP -F"
12027   else
12028     if test -z "$FGREP"; then
12029  ac_path_FGREP_found=false
12030  # Loop through the user's path and test for each of PROGNAME-LIST
12031  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12032for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12033do
12034  IFS=$as_save_IFS
12035  test -z "$as_dir" && as_dir=.
12036    for ac_prog in fgrep; do
12037    for ac_exec_ext in '' $ac_executable_extensions; do
12038      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12039      as_fn_executable_p "$ac_path_FGREP" || continue
12040# Check for GNU ac_path_FGREP and select it if it is found.
12041  # Check for GNU $ac_path_FGREP
12042case `"$ac_path_FGREP" --version 2>&1` in
12043*GNU*)
12044  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12045*)
12046  ac_count=0
12047  $as_echo_n 0123456789 >"conftest.in"
12048  while :
12049  do
12050    cat "conftest.in" "conftest.in" >"conftest.tmp"
12051    mv "conftest.tmp" "conftest.in"
12052    cp "conftest.in" "conftest.nl"
12053    $as_echo 'FGREP' >> "conftest.nl"
12054    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12055    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12056    as_fn_arith $ac_count + 1 && ac_count=$as_val
12057    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12058      # Best one so far, save it but keep looking for a better one
12059      ac_cv_path_FGREP="$ac_path_FGREP"
12060      ac_path_FGREP_max=$ac_count
12061    fi
12062    # 10*(2^10) chars as input seems more than enough
12063    test $ac_count -gt 10 && break
12064  done
12065  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12066esac
12067
12068      $ac_path_FGREP_found && break 3
12069    done
12070  done
12071  done
12072IFS=$as_save_IFS
12073  if test -z "$ac_cv_path_FGREP"; then
12074    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12075  fi
12076else
12077  ac_cv_path_FGREP=$FGREP
12078fi
12079
12080   fi
12081fi
12082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12083$as_echo "$ac_cv_path_FGREP" >&6; }
12084 FGREP="$ac_cv_path_FGREP"
12085
12086
12087  else
12088    # The variable is set, but is it from the command line or the environment?
12089
12090    # Try to remove the string !FGREP! from our list.
12091    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12092    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12093      # If it failed, the variable was not from the command line. Ignore it,
12094      # but warn the user (except for BASH, which is always set by the calling BASH).
12095      if test "xFGREP" != xBASH; then
12096        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12097$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12098      fi
12099      # Try to locate tool using the code snippet
12100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12101$as_echo_n "checking for fgrep... " >&6; }
12102if ${ac_cv_path_FGREP+:} false; then :
12103  $as_echo_n "(cached) " >&6
12104else
12105  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12106   then ac_cv_path_FGREP="$GREP -F"
12107   else
12108     if test -z "$FGREP"; then
12109  ac_path_FGREP_found=false
12110  # Loop through the user's path and test for each of PROGNAME-LIST
12111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12112for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12113do
12114  IFS=$as_save_IFS
12115  test -z "$as_dir" && as_dir=.
12116    for ac_prog in fgrep; do
12117    for ac_exec_ext in '' $ac_executable_extensions; do
12118      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12119      as_fn_executable_p "$ac_path_FGREP" || continue
12120# Check for GNU ac_path_FGREP and select it if it is found.
12121  # Check for GNU $ac_path_FGREP
12122case `"$ac_path_FGREP" --version 2>&1` in
12123*GNU*)
12124  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12125*)
12126  ac_count=0
12127  $as_echo_n 0123456789 >"conftest.in"
12128  while :
12129  do
12130    cat "conftest.in" "conftest.in" >"conftest.tmp"
12131    mv "conftest.tmp" "conftest.in"
12132    cp "conftest.in" "conftest.nl"
12133    $as_echo 'FGREP' >> "conftest.nl"
12134    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12135    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12136    as_fn_arith $ac_count + 1 && ac_count=$as_val
12137    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12138      # Best one so far, save it but keep looking for a better one
12139      ac_cv_path_FGREP="$ac_path_FGREP"
12140      ac_path_FGREP_max=$ac_count
12141    fi
12142    # 10*(2^10) chars as input seems more than enough
12143    test $ac_count -gt 10 && break
12144  done
12145  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12146esac
12147
12148      $ac_path_FGREP_found && break 3
12149    done
12150  done
12151  done
12152IFS=$as_save_IFS
12153  if test -z "$ac_cv_path_FGREP"; then
12154    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12155  fi
12156else
12157  ac_cv_path_FGREP=$FGREP
12158fi
12159
12160   fi
12161fi
12162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12163$as_echo "$ac_cv_path_FGREP" >&6; }
12164 FGREP="$ac_cv_path_FGREP"
12165
12166
12167    else
12168      # If it succeeded, then it was overridden by the user. We will use it
12169      # for the tool.
12170
12171      # First remove it from the list of overridden variables, so we can test
12172      # for unknown variables in the end.
12173      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12174
12175      # Check if the provided tool contains a complete path.
12176      tool_specified="$FGREP"
12177      tool_basename="${tool_specified##*/}"
12178      if test "x$tool_basename" = "x$tool_specified"; then
12179        # A command without a complete path is provided, search $PATH.
12180        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12181$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12182        # Extract the first word of "$tool_basename", so it can be a program name with args.
12183set dummy $tool_basename; ac_word=$2
12184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12185$as_echo_n "checking for $ac_word... " >&6; }
12186if ${ac_cv_path_FGREP+:} false; then :
12187  $as_echo_n "(cached) " >&6
12188else
12189  case $FGREP in
12190  [\\/]* | ?:[\\/]*)
12191  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12192  ;;
12193  *)
12194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12195for as_dir in $PATH
12196do
12197  IFS=$as_save_IFS
12198  test -z "$as_dir" && as_dir=.
12199    for ac_exec_ext in '' $ac_executable_extensions; do
12200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12201    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12203    break 2
12204  fi
12205done
12206  done
12207IFS=$as_save_IFS
12208
12209  ;;
12210esac
12211fi
12212FGREP=$ac_cv_path_FGREP
12213if test -n "$FGREP"; then
12214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12215$as_echo "$FGREP" >&6; }
12216else
12217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12218$as_echo "no" >&6; }
12219fi
12220
12221
12222        if test "x$FGREP" = x; then
12223          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12224        fi
12225      else
12226        # Otherwise we believe it is a complete path. Use it as it is.
12227        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12228$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12230$as_echo_n "checking for FGREP... " >&6; }
12231        if test ! -x "$tool_specified"; then
12232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12233$as_echo "not found" >&6; }
12234          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12235        fi
12236        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12237$as_echo "$tool_specified" >&6; }
12238      fi
12239    fi
12240  fi
12241
12242
12243  if test "x$FGREP" = x; then
12244    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12245  fi
12246
12247
12248
12249
12250  # Publish this variable in the help.
12251
12252
12253  if test "x$SED" = x; then
12254    # The variable is not set by user, try to locate tool using the code snippet
12255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12256$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12257if ${ac_cv_path_SED+:} false; then :
12258  $as_echo_n "(cached) " >&6
12259else
12260            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12261     for ac_i in 1 2 3 4 5 6 7; do
12262       ac_script="$ac_script$as_nl$ac_script"
12263     done
12264     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12265     { ac_script=; unset ac_script;}
12266     if test -z "$SED"; then
12267  ac_path_SED_found=false
12268  # Loop through the user's path and test for each of PROGNAME-LIST
12269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12270for as_dir in $PATH
12271do
12272  IFS=$as_save_IFS
12273  test -z "$as_dir" && as_dir=.
12274    for ac_prog in sed gsed; do
12275    for ac_exec_ext in '' $ac_executable_extensions; do
12276      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12277      as_fn_executable_p "$ac_path_SED" || continue
12278# Check for GNU ac_path_SED and select it if it is found.
12279  # Check for GNU $ac_path_SED
12280case `"$ac_path_SED" --version 2>&1` in
12281*GNU*)
12282  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12283*)
12284  ac_count=0
12285  $as_echo_n 0123456789 >"conftest.in"
12286  while :
12287  do
12288    cat "conftest.in" "conftest.in" >"conftest.tmp"
12289    mv "conftest.tmp" "conftest.in"
12290    cp "conftest.in" "conftest.nl"
12291    $as_echo '' >> "conftest.nl"
12292    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12293    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12294    as_fn_arith $ac_count + 1 && ac_count=$as_val
12295    if test $ac_count -gt ${ac_path_SED_max-0}; then
12296      # Best one so far, save it but keep looking for a better one
12297      ac_cv_path_SED="$ac_path_SED"
12298      ac_path_SED_max=$ac_count
12299    fi
12300    # 10*(2^10) chars as input seems more than enough
12301    test $ac_count -gt 10 && break
12302  done
12303  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12304esac
12305
12306      $ac_path_SED_found && break 3
12307    done
12308  done
12309  done
12310IFS=$as_save_IFS
12311  if test -z "$ac_cv_path_SED"; then
12312    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12313  fi
12314else
12315  ac_cv_path_SED=$SED
12316fi
12317
12318fi
12319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12320$as_echo "$ac_cv_path_SED" >&6; }
12321 SED="$ac_cv_path_SED"
12322  rm -f conftest.sed
12323
12324  else
12325    # The variable is set, but is it from the command line or the environment?
12326
12327    # Try to remove the string !SED! from our list.
12328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12330      # If it failed, the variable was not from the command line. Ignore it,
12331      # but warn the user (except for BASH, which is always set by the calling BASH).
12332      if test "xSED" != xBASH; then
12333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12334$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12335      fi
12336      # Try to locate tool using the code snippet
12337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12338$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12339if ${ac_cv_path_SED+:} false; then :
12340  $as_echo_n "(cached) " >&6
12341else
12342            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12343     for ac_i in 1 2 3 4 5 6 7; do
12344       ac_script="$ac_script$as_nl$ac_script"
12345     done
12346     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12347     { ac_script=; unset ac_script;}
12348     if test -z "$SED"; then
12349  ac_path_SED_found=false
12350  # Loop through the user's path and test for each of PROGNAME-LIST
12351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12352for as_dir in $PATH
12353do
12354  IFS=$as_save_IFS
12355  test -z "$as_dir" && as_dir=.
12356    for ac_prog in sed gsed; do
12357    for ac_exec_ext in '' $ac_executable_extensions; do
12358      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12359      as_fn_executable_p "$ac_path_SED" || continue
12360# Check for GNU ac_path_SED and select it if it is found.
12361  # Check for GNU $ac_path_SED
12362case `"$ac_path_SED" --version 2>&1` in
12363*GNU*)
12364  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12365*)
12366  ac_count=0
12367  $as_echo_n 0123456789 >"conftest.in"
12368  while :
12369  do
12370    cat "conftest.in" "conftest.in" >"conftest.tmp"
12371    mv "conftest.tmp" "conftest.in"
12372    cp "conftest.in" "conftest.nl"
12373    $as_echo '' >> "conftest.nl"
12374    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12375    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12376    as_fn_arith $ac_count + 1 && ac_count=$as_val
12377    if test $ac_count -gt ${ac_path_SED_max-0}; then
12378      # Best one so far, save it but keep looking for a better one
12379      ac_cv_path_SED="$ac_path_SED"
12380      ac_path_SED_max=$ac_count
12381    fi
12382    # 10*(2^10) chars as input seems more than enough
12383    test $ac_count -gt 10 && break
12384  done
12385  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12386esac
12387
12388      $ac_path_SED_found && break 3
12389    done
12390  done
12391  done
12392IFS=$as_save_IFS
12393  if test -z "$ac_cv_path_SED"; then
12394    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12395  fi
12396else
12397  ac_cv_path_SED=$SED
12398fi
12399
12400fi
12401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12402$as_echo "$ac_cv_path_SED" >&6; }
12403 SED="$ac_cv_path_SED"
12404  rm -f conftest.sed
12405
12406    else
12407      # If it succeeded, then it was overridden by the user. We will use it
12408      # for the tool.
12409
12410      # First remove it from the list of overridden variables, so we can test
12411      # for unknown variables in the end.
12412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12413
12414      # Check if the provided tool contains a complete path.
12415      tool_specified="$SED"
12416      tool_basename="${tool_specified##*/}"
12417      if test "x$tool_basename" = "x$tool_specified"; then
12418        # A command without a complete path is provided, search $PATH.
12419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12420$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12421        # Extract the first word of "$tool_basename", so it can be a program name with args.
12422set dummy $tool_basename; ac_word=$2
12423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12424$as_echo_n "checking for $ac_word... " >&6; }
12425if ${ac_cv_path_SED+:} false; then :
12426  $as_echo_n "(cached) " >&6
12427else
12428  case $SED in
12429  [\\/]* | ?:[\\/]*)
12430  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12431  ;;
12432  *)
12433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12434for as_dir in $PATH
12435do
12436  IFS=$as_save_IFS
12437  test -z "$as_dir" && as_dir=.
12438    for ac_exec_ext in '' $ac_executable_extensions; do
12439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12440    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12442    break 2
12443  fi
12444done
12445  done
12446IFS=$as_save_IFS
12447
12448  ;;
12449esac
12450fi
12451SED=$ac_cv_path_SED
12452if test -n "$SED"; then
12453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12454$as_echo "$SED" >&6; }
12455else
12456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12457$as_echo "no" >&6; }
12458fi
12459
12460
12461        if test "x$SED" = x; then
12462          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12463        fi
12464      else
12465        # Otherwise we believe it is a complete path. Use it as it is.
12466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12467$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12468        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12469$as_echo_n "checking for SED... " >&6; }
12470        if test ! -x "$tool_specified"; then
12471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12472$as_echo "not found" >&6; }
12473          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12474        fi
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12476$as_echo "$tool_specified" >&6; }
12477      fi
12478    fi
12479  fi
12480
12481
12482  if test "x$SED" = x; then
12483    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12484  fi
12485
12486
12487
12488  # Always force rm.
12489  RM="$RM -f"
12490
12491  # pwd behaves differently on various platforms and some don't support the -L flag.
12492  # Always use the bash builtin pwd to get uniform behavior.
12493  THEPWDCMD=pwd
12494
12495  # These are not required on all platforms
12496
12497
12498  # Publish this variable in the help.
12499
12500
12501  if test "x$CYGPATH" = x; then
12502    # The variable is not set by user, try to locate tool using the code snippet
12503    for ac_prog in cygpath
12504do
12505  # Extract the first word of "$ac_prog", so it can be a program name with args.
12506set dummy $ac_prog; ac_word=$2
12507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12508$as_echo_n "checking for $ac_word... " >&6; }
12509if ${ac_cv_path_CYGPATH+:} false; then :
12510  $as_echo_n "(cached) " >&6
12511else
12512  case $CYGPATH in
12513  [\\/]* | ?:[\\/]*)
12514  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12515  ;;
12516  *)
12517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12518for as_dir in $PATH
12519do
12520  IFS=$as_save_IFS
12521  test -z "$as_dir" && as_dir=.
12522    for ac_exec_ext in '' $ac_executable_extensions; do
12523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12524    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12526    break 2
12527  fi
12528done
12529  done
12530IFS=$as_save_IFS
12531
12532  ;;
12533esac
12534fi
12535CYGPATH=$ac_cv_path_CYGPATH
12536if test -n "$CYGPATH"; then
12537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12538$as_echo "$CYGPATH" >&6; }
12539else
12540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12541$as_echo "no" >&6; }
12542fi
12543
12544
12545  test -n "$CYGPATH" && break
12546done
12547
12548  else
12549    # The variable is set, but is it from the command line or the environment?
12550
12551    # Try to remove the string !CYGPATH! from our list.
12552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12554      # If it failed, the variable was not from the command line. Ignore it,
12555      # but warn the user (except for BASH, which is always set by the calling BASH).
12556      if test "xCYGPATH" != xBASH; then
12557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12558$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12559      fi
12560      # Try to locate tool using the code snippet
12561      for ac_prog in cygpath
12562do
12563  # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set dummy $ac_prog; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
12567if ${ac_cv_path_CYGPATH+:} false; then :
12568  $as_echo_n "(cached) " >&6
12569else
12570  case $CYGPATH in
12571  [\\/]* | ?:[\\/]*)
12572  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12573  ;;
12574  *)
12575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578  IFS=$as_save_IFS
12579  test -z "$as_dir" && as_dir=.
12580    for ac_exec_ext in '' $ac_executable_extensions; do
12581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12582    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584    break 2
12585  fi
12586done
12587  done
12588IFS=$as_save_IFS
12589
12590  ;;
12591esac
12592fi
12593CYGPATH=$ac_cv_path_CYGPATH
12594if test -n "$CYGPATH"; then
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12596$as_echo "$CYGPATH" >&6; }
12597else
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
12600fi
12601
12602
12603  test -n "$CYGPATH" && break
12604done
12605
12606    else
12607      # If it succeeded, then it was overridden by the user. We will use it
12608      # for the tool.
12609
12610      # First remove it from the list of overridden variables, so we can test
12611      # for unknown variables in the end.
12612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12613
12614      # Check if the provided tool contains a complete path.
12615      tool_specified="$CYGPATH"
12616      tool_basename="${tool_specified##*/}"
12617      if test "x$tool_basename" = "x$tool_specified"; then
12618        # A command without a complete path is provided, search $PATH.
12619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12620$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12621        # Extract the first word of "$tool_basename", so it can be a program name with args.
12622set dummy $tool_basename; ac_word=$2
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624$as_echo_n "checking for $ac_word... " >&6; }
12625if ${ac_cv_path_CYGPATH+:} false; then :
12626  $as_echo_n "(cached) " >&6
12627else
12628  case $CYGPATH in
12629  [\\/]* | ?:[\\/]*)
12630  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12631  ;;
12632  *)
12633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634for as_dir in $PATH
12635do
12636  IFS=$as_save_IFS
12637  test -z "$as_dir" && as_dir=.
12638    for ac_exec_ext in '' $ac_executable_extensions; do
12639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642    break 2
12643  fi
12644done
12645  done
12646IFS=$as_save_IFS
12647
12648  ;;
12649esac
12650fi
12651CYGPATH=$ac_cv_path_CYGPATH
12652if test -n "$CYGPATH"; then
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12654$as_echo "$CYGPATH" >&6; }
12655else
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658fi
12659
12660
12661        if test "x$CYGPATH" = x; then
12662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12663        fi
12664      else
12665        # Otherwise we believe it is a complete path. Use it as it is.
12666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12667$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12669$as_echo_n "checking for CYGPATH... " >&6; }
12670        if test ! -x "$tool_specified"; then
12671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12672$as_echo "not found" >&6; }
12673          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12674        fi
12675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12676$as_echo "$tool_specified" >&6; }
12677      fi
12678    fi
12679  fi
12680
12681
12682
12683
12684  # Publish this variable in the help.
12685
12686
12687  if test "x$READLINK" = x; then
12688    # The variable is not set by user, try to locate tool using the code snippet
12689    for ac_prog in greadlink readlink
12690do
12691  # Extract the first word of "$ac_prog", so it can be a program name with args.
12692set dummy $ac_prog; ac_word=$2
12693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12694$as_echo_n "checking for $ac_word... " >&6; }
12695if ${ac_cv_path_READLINK+:} false; then :
12696  $as_echo_n "(cached) " >&6
12697else
12698  case $READLINK in
12699  [\\/]* | ?:[\\/]*)
12700  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12701  ;;
12702  *)
12703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12704for as_dir in $PATH
12705do
12706  IFS=$as_save_IFS
12707  test -z "$as_dir" && as_dir=.
12708    for ac_exec_ext in '' $ac_executable_extensions; do
12709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12710    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12712    break 2
12713  fi
12714done
12715  done
12716IFS=$as_save_IFS
12717
12718  ;;
12719esac
12720fi
12721READLINK=$ac_cv_path_READLINK
12722if test -n "$READLINK"; then
12723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12724$as_echo "$READLINK" >&6; }
12725else
12726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12727$as_echo "no" >&6; }
12728fi
12729
12730
12731  test -n "$READLINK" && break
12732done
12733
12734  else
12735    # The variable is set, but is it from the command line or the environment?
12736
12737    # Try to remove the string !READLINK! from our list.
12738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12740      # If it failed, the variable was not from the command line. Ignore it,
12741      # but warn the user (except for BASH, which is always set by the calling BASH).
12742      if test "xREADLINK" != xBASH; then
12743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12744$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12745      fi
12746      # Try to locate tool using the code snippet
12747      for ac_prog in greadlink readlink
12748do
12749  # Extract the first word of "$ac_prog", so it can be a program name with args.
12750set dummy $ac_prog; ac_word=$2
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12752$as_echo_n "checking for $ac_word... " >&6; }
12753if ${ac_cv_path_READLINK+:} false; then :
12754  $as_echo_n "(cached) " >&6
12755else
12756  case $READLINK in
12757  [\\/]* | ?:[\\/]*)
12758  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12759  ;;
12760  *)
12761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12762for as_dir in $PATH
12763do
12764  IFS=$as_save_IFS
12765  test -z "$as_dir" && as_dir=.
12766    for ac_exec_ext in '' $ac_executable_extensions; do
12767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12768    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12770    break 2
12771  fi
12772done
12773  done
12774IFS=$as_save_IFS
12775
12776  ;;
12777esac
12778fi
12779READLINK=$ac_cv_path_READLINK
12780if test -n "$READLINK"; then
12781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12782$as_echo "$READLINK" >&6; }
12783else
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
12786fi
12787
12788
12789  test -n "$READLINK" && break
12790done
12791
12792    else
12793      # If it succeeded, then it was overridden by the user. We will use it
12794      # for the tool.
12795
12796      # First remove it from the list of overridden variables, so we can test
12797      # for unknown variables in the end.
12798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12799
12800      # Check if the provided tool contains a complete path.
12801      tool_specified="$READLINK"
12802      tool_basename="${tool_specified##*/}"
12803      if test "x$tool_basename" = "x$tool_specified"; then
12804        # A command without a complete path is provided, search $PATH.
12805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12806$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12807        # Extract the first word of "$tool_basename", so it can be a program name with args.
12808set dummy $tool_basename; ac_word=$2
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12810$as_echo_n "checking for $ac_word... " >&6; }
12811if ${ac_cv_path_READLINK+:} false; then :
12812  $as_echo_n "(cached) " >&6
12813else
12814  case $READLINK in
12815  [\\/]* | ?:[\\/]*)
12816  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12817  ;;
12818  *)
12819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820for as_dir in $PATH
12821do
12822  IFS=$as_save_IFS
12823  test -z "$as_dir" && as_dir=.
12824    for ac_exec_ext in '' $ac_executable_extensions; do
12825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12826    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12828    break 2
12829  fi
12830done
12831  done
12832IFS=$as_save_IFS
12833
12834  ;;
12835esac
12836fi
12837READLINK=$ac_cv_path_READLINK
12838if test -n "$READLINK"; then
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12840$as_echo "$READLINK" >&6; }
12841else
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12843$as_echo "no" >&6; }
12844fi
12845
12846
12847        if test "x$READLINK" = x; then
12848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12849        fi
12850      else
12851        # Otherwise we believe it is a complete path. Use it as it is.
12852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12853$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12855$as_echo_n "checking for READLINK... " >&6; }
12856        if test ! -x "$tool_specified"; then
12857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12858$as_echo "not found" >&6; }
12859          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12860        fi
12861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12862$as_echo "$tool_specified" >&6; }
12863      fi
12864    fi
12865  fi
12866
12867
12868
12869
12870  # Publish this variable in the help.
12871
12872
12873  if test "x$DF" = x; then
12874    # The variable is not set by user, try to locate tool using the code snippet
12875    for ac_prog in df
12876do
12877  # Extract the first word of "$ac_prog", so it can be a program name with args.
12878set dummy $ac_prog; ac_word=$2
12879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12880$as_echo_n "checking for $ac_word... " >&6; }
12881if ${ac_cv_path_DF+:} false; then :
12882  $as_echo_n "(cached) " >&6
12883else
12884  case $DF in
12885  [\\/]* | ?:[\\/]*)
12886  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12887  ;;
12888  *)
12889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12890for as_dir in $PATH
12891do
12892  IFS=$as_save_IFS
12893  test -z "$as_dir" && as_dir=.
12894    for ac_exec_ext in '' $ac_executable_extensions; do
12895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12896    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12898    break 2
12899  fi
12900done
12901  done
12902IFS=$as_save_IFS
12903
12904  ;;
12905esac
12906fi
12907DF=$ac_cv_path_DF
12908if test -n "$DF"; then
12909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12910$as_echo "$DF" >&6; }
12911else
12912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12913$as_echo "no" >&6; }
12914fi
12915
12916
12917  test -n "$DF" && break
12918done
12919
12920  else
12921    # The variable is set, but is it from the command line or the environment?
12922
12923    # Try to remove the string !DF! from our list.
12924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12926      # If it failed, the variable was not from the command line. Ignore it,
12927      # but warn the user (except for BASH, which is always set by the calling BASH).
12928      if test "xDF" != xBASH; then
12929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12930$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12931      fi
12932      # Try to locate tool using the code snippet
12933      for ac_prog in df
12934do
12935  # Extract the first word of "$ac_prog", so it can be a program name with args.
12936set dummy $ac_prog; ac_word=$2
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12938$as_echo_n "checking for $ac_word... " >&6; }
12939if ${ac_cv_path_DF+:} false; then :
12940  $as_echo_n "(cached) " >&6
12941else
12942  case $DF in
12943  [\\/]* | ?:[\\/]*)
12944  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12945  ;;
12946  *)
12947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12948for as_dir in $PATH
12949do
12950  IFS=$as_save_IFS
12951  test -z "$as_dir" && as_dir=.
12952    for ac_exec_ext in '' $ac_executable_extensions; do
12953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12954    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12956    break 2
12957  fi
12958done
12959  done
12960IFS=$as_save_IFS
12961
12962  ;;
12963esac
12964fi
12965DF=$ac_cv_path_DF
12966if test -n "$DF"; then
12967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12968$as_echo "$DF" >&6; }
12969else
12970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12971$as_echo "no" >&6; }
12972fi
12973
12974
12975  test -n "$DF" && break
12976done
12977
12978    else
12979      # If it succeeded, then it was overridden by the user. We will use it
12980      # for the tool.
12981
12982      # First remove it from the list of overridden variables, so we can test
12983      # for unknown variables in the end.
12984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12985
12986      # Check if the provided tool contains a complete path.
12987      tool_specified="$DF"
12988      tool_basename="${tool_specified##*/}"
12989      if test "x$tool_basename" = "x$tool_specified"; then
12990        # A command without a complete path is provided, search $PATH.
12991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12992$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12993        # Extract the first word of "$tool_basename", so it can be a program name with args.
12994set dummy $tool_basename; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_DF+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $DF in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023DF=$ac_cv_path_DF
13024if test -n "$DF"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13026$as_echo "$DF" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033        if test "x$DF" = x; then
13034          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13035        fi
13036      else
13037        # Otherwise we believe it is a complete path. Use it as it is.
13038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13039$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13040        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13041$as_echo_n "checking for DF... " >&6; }
13042        if test ! -x "$tool_specified"; then
13043          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13044$as_echo "not found" >&6; }
13045          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13046        fi
13047        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13048$as_echo "$tool_specified" >&6; }
13049      fi
13050    fi
13051  fi
13052
13053
13054
13055
13056  # Publish this variable in the help.
13057
13058
13059  if test "x$CPIO" = x; then
13060    # The variable is not set by user, try to locate tool using the code snippet
13061    for ac_prog in cpio bsdcpio
13062do
13063  # Extract the first word of "$ac_prog", so it can be a program name with args.
13064set dummy $ac_prog; ac_word=$2
13065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13066$as_echo_n "checking for $ac_word... " >&6; }
13067if ${ac_cv_path_CPIO+:} false; then :
13068  $as_echo_n "(cached) " >&6
13069else
13070  case $CPIO in
13071  [\\/]* | ?:[\\/]*)
13072  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13073  ;;
13074  *)
13075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13076for as_dir in $PATH
13077do
13078  IFS=$as_save_IFS
13079  test -z "$as_dir" && as_dir=.
13080    for ac_exec_ext in '' $ac_executable_extensions; do
13081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13082    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13084    break 2
13085  fi
13086done
13087  done
13088IFS=$as_save_IFS
13089
13090  ;;
13091esac
13092fi
13093CPIO=$ac_cv_path_CPIO
13094if test -n "$CPIO"; then
13095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13096$as_echo "$CPIO" >&6; }
13097else
13098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13099$as_echo "no" >&6; }
13100fi
13101
13102
13103  test -n "$CPIO" && break
13104done
13105
13106  else
13107    # The variable is set, but is it from the command line or the environment?
13108
13109    # Try to remove the string !CPIO! from our list.
13110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13112      # If it failed, the variable was not from the command line. Ignore it,
13113      # but warn the user (except for BASH, which is always set by the calling BASH).
13114      if test "xCPIO" != xBASH; then
13115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13116$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13117      fi
13118      # Try to locate tool using the code snippet
13119      for ac_prog in cpio bsdcpio
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_path_CPIO+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  case $CPIO in
13129  [\\/]* | ?:[\\/]*)
13130  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13131  ;;
13132  *)
13133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_exec_ext in '' $ac_executable_extensions; do
13139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142    break 2
13143  fi
13144done
13145  done
13146IFS=$as_save_IFS
13147
13148  ;;
13149esac
13150fi
13151CPIO=$ac_cv_path_CPIO
13152if test -n "$CPIO"; then
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13154$as_echo "$CPIO" >&6; }
13155else
13156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13157$as_echo "no" >&6; }
13158fi
13159
13160
13161  test -n "$CPIO" && break
13162done
13163
13164    else
13165      # If it succeeded, then it was overridden by the user. We will use it
13166      # for the tool.
13167
13168      # First remove it from the list of overridden variables, so we can test
13169      # for unknown variables in the end.
13170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13171
13172      # Check if the provided tool contains a complete path.
13173      tool_specified="$CPIO"
13174      tool_basename="${tool_specified##*/}"
13175      if test "x$tool_basename" = "x$tool_specified"; then
13176        # A command without a complete path is provided, search $PATH.
13177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13178$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13179        # Extract the first word of "$tool_basename", so it can be a program name with args.
13180set dummy $tool_basename; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_path_CPIO+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  case $CPIO in
13187  [\\/]* | ?:[\\/]*)
13188  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13189  ;;
13190  *)
13191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13192for as_dir in $PATH
13193do
13194  IFS=$as_save_IFS
13195  test -z "$as_dir" && as_dir=.
13196    for ac_exec_ext in '' $ac_executable_extensions; do
13197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13198    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13200    break 2
13201  fi
13202done
13203  done
13204IFS=$as_save_IFS
13205
13206  ;;
13207esac
13208fi
13209CPIO=$ac_cv_path_CPIO
13210if test -n "$CPIO"; then
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13212$as_echo "$CPIO" >&6; }
13213else
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215$as_echo "no" >&6; }
13216fi
13217
13218
13219        if test "x$CPIO" = x; then
13220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13221        fi
13222      else
13223        # Otherwise we believe it is a complete path. Use it as it is.
13224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13225$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13227$as_echo_n "checking for CPIO... " >&6; }
13228        if test ! -x "$tool_specified"; then
13229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13230$as_echo "not found" >&6; }
13231          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13232        fi
13233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13234$as_echo "$tool_specified" >&6; }
13235      fi
13236    fi
13237  fi
13238
13239
13240
13241
13242# Now we can determine OpenJDK build and target platforms. This is required to
13243# have early on.
13244# Make sure we can run config.sub.
13245$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13246  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13247
13248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13249$as_echo_n "checking build system type... " >&6; }
13250if ${ac_cv_build+:} false; then :
13251  $as_echo_n "(cached) " >&6
13252else
13253  ac_build_alias=$build_alias
13254test "x$ac_build_alias" = x &&
13255  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13256test "x$ac_build_alias" = x &&
13257  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13258ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13259  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13260
13261fi
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13263$as_echo "$ac_cv_build" >&6; }
13264case $ac_cv_build in
13265*-*-*) ;;
13266*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13267esac
13268build=$ac_cv_build
13269ac_save_IFS=$IFS; IFS='-'
13270set x $ac_cv_build
13271shift
13272build_cpu=$1
13273build_vendor=$2
13274shift; shift
13275# Remember, the first character of IFS is used to create $*,
13276# except with old shells:
13277build_os=$*
13278IFS=$ac_save_IFS
13279case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13280
13281
13282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13283$as_echo_n "checking host system type... " >&6; }
13284if ${ac_cv_host+:} false; then :
13285  $as_echo_n "(cached) " >&6
13286else
13287  if test "x$host_alias" = x; then
13288  ac_cv_host=$ac_cv_build
13289else
13290  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13291    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13292fi
13293
13294fi
13295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13296$as_echo "$ac_cv_host" >&6; }
13297case $ac_cv_host in
13298*-*-*) ;;
13299*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13300esac
13301host=$ac_cv_host
13302ac_save_IFS=$IFS; IFS='-'
13303set x $ac_cv_host
13304shift
13305host_cpu=$1
13306host_vendor=$2
13307shift; shift
13308# Remember, the first character of IFS is used to create $*,
13309# except with old shells:
13310host_os=$*
13311IFS=$ac_save_IFS
13312case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13313
13314
13315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13316$as_echo_n "checking target system type... " >&6; }
13317if ${ac_cv_target+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  if test "x$target_alias" = x; then
13321  ac_cv_target=$ac_cv_host
13322else
13323  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13324    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13325fi
13326
13327fi
13328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13329$as_echo "$ac_cv_target" >&6; }
13330case $ac_cv_target in
13331*-*-*) ;;
13332*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13333esac
13334target=$ac_cv_target
13335ac_save_IFS=$IFS; IFS='-'
13336set x $ac_cv_target
13337shift
13338target_cpu=$1
13339target_vendor=$2
13340shift; shift
13341# Remember, the first character of IFS is used to create $*,
13342# except with old shells:
13343target_os=$*
13344IFS=$ac_save_IFS
13345case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13346
13347
13348# The aliases save the names the user supplied, while $host etc.
13349# will get canonicalized.
13350test -n "$target_alias" &&
13351  test "$program_prefix$program_suffix$program_transform_name" = \
13352    NONENONEs,x,x, &&
13353  program_prefix=${target_alias}-
13354
13355  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13356  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13357  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13358  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13359  # to use the configure naming style.
13360
13361
13362
13363
13364
13365  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13366  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13367  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13368  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13369  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13370  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13371
13372
13373
13374  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13375
13376  case "$build_os" in
13377    *linux*)
13378      VAR_OS=linux
13379      VAR_OS_TYPE=unix
13380      ;;
13381    *solaris*)
13382      VAR_OS=solaris
13383      VAR_OS_TYPE=unix
13384      ;;
13385    *darwin*)
13386      VAR_OS=macosx
13387      VAR_OS_TYPE=unix
13388      ;;
13389    *bsd*)
13390      VAR_OS=bsd
13391      VAR_OS_TYPE=unix
13392      ;;
13393    *cygwin*)
13394      VAR_OS=windows
13395      VAR_OS_ENV=windows.cygwin
13396      ;;
13397    *mingw*)
13398      VAR_OS=windows
13399      VAR_OS_ENV=windows.msys
13400      ;;
13401    *aix*)
13402      VAR_OS=aix
13403      VAR_OS_TYPE=unix
13404      ;;
13405    *)
13406      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13407      ;;
13408  esac
13409
13410
13411  # First argument is the cpu name from the trip/quad
13412  case "$build_cpu" in
13413    x86_64)
13414      VAR_CPU=x86_64
13415      VAR_CPU_ARCH=x86
13416      VAR_CPU_BITS=64
13417      VAR_CPU_ENDIAN=little
13418      ;;
13419    i?86)
13420      VAR_CPU=x86
13421      VAR_CPU_ARCH=x86
13422      VAR_CPU_BITS=32
13423      VAR_CPU_ENDIAN=little
13424      ;;
13425    arm*)
13426      VAR_CPU=arm
13427      VAR_CPU_ARCH=arm
13428      VAR_CPU_BITS=32
13429      VAR_CPU_ENDIAN=little
13430      ;;
13431    aarch64)
13432      VAR_CPU=aarch64
13433      VAR_CPU_ARCH=aarch64
13434      VAR_CPU_BITS=64
13435      VAR_CPU_ENDIAN=little
13436      ;;
13437    powerpc)
13438      VAR_CPU=ppc
13439      VAR_CPU_ARCH=ppc
13440      VAR_CPU_BITS=32
13441      VAR_CPU_ENDIAN=big
13442      ;;
13443    powerpc64)
13444      VAR_CPU=ppc64
13445      VAR_CPU_ARCH=ppc
13446      VAR_CPU_BITS=64
13447      VAR_CPU_ENDIAN=big
13448      ;;
13449    powerpc64le)
13450      VAR_CPU=ppc64
13451      VAR_CPU_ARCH=ppc
13452      VAR_CPU_BITS=64
13453      VAR_CPU_ENDIAN=little
13454      ;;
13455    s390)
13456      VAR_CPU=s390
13457      VAR_CPU_ARCH=s390
13458      VAR_CPU_BITS=32
13459      VAR_CPU_ENDIAN=big
13460      ;;
13461    s390x)
13462      VAR_CPU=s390x
13463      VAR_CPU_ARCH=s390
13464      VAR_CPU_BITS=64
13465      VAR_CPU_ENDIAN=big
13466      ;;
13467    sparc)
13468      VAR_CPU=sparc
13469      VAR_CPU_ARCH=sparc
13470      VAR_CPU_BITS=32
13471      VAR_CPU_ENDIAN=big
13472      ;;
13473    sparcv9|sparc64)
13474      VAR_CPU=sparcv9
13475      VAR_CPU_ARCH=sparc
13476      VAR_CPU_BITS=64
13477      VAR_CPU_ENDIAN=big
13478      ;;
13479    *)
13480      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13481      ;;
13482  esac
13483
13484  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13485  OPENJDK_BUILD_OS="$VAR_OS"
13486  if test "x$VAR_OS_TYPE" != x; then
13487    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13488  else
13489    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13490  fi
13491  if test "x$VAR_OS_ENV" != x; then
13492    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13493  else
13494    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13495  fi
13496  OPENJDK_BUILD_CPU="$VAR_CPU"
13497  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13498  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13499  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13500
13501
13502
13503
13504
13505
13506
13507
13508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13509$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13511$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13512
13513  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13514
13515  case "$host_os" in
13516    *linux*)
13517      VAR_OS=linux
13518      VAR_OS_TYPE=unix
13519      ;;
13520    *solaris*)
13521      VAR_OS=solaris
13522      VAR_OS_TYPE=unix
13523      ;;
13524    *darwin*)
13525      VAR_OS=macosx
13526      VAR_OS_TYPE=unix
13527      ;;
13528    *bsd*)
13529      VAR_OS=bsd
13530      VAR_OS_TYPE=unix
13531      ;;
13532    *cygwin*)
13533      VAR_OS=windows
13534      VAR_OS_ENV=windows.cygwin
13535      ;;
13536    *mingw*)
13537      VAR_OS=windows
13538      VAR_OS_ENV=windows.msys
13539      ;;
13540    *aix*)
13541      VAR_OS=aix
13542      VAR_OS_TYPE=unix
13543      ;;
13544    *)
13545      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13546      ;;
13547  esac
13548
13549
13550  # First argument is the cpu name from the trip/quad
13551  case "$host_cpu" in
13552    x86_64)
13553      VAR_CPU=x86_64
13554      VAR_CPU_ARCH=x86
13555      VAR_CPU_BITS=64
13556      VAR_CPU_ENDIAN=little
13557      ;;
13558    i?86)
13559      VAR_CPU=x86
13560      VAR_CPU_ARCH=x86
13561      VAR_CPU_BITS=32
13562      VAR_CPU_ENDIAN=little
13563      ;;
13564    arm*)
13565      VAR_CPU=arm
13566      VAR_CPU_ARCH=arm
13567      VAR_CPU_BITS=32
13568      VAR_CPU_ENDIAN=little
13569      ;;
13570    aarch64)
13571      VAR_CPU=aarch64
13572      VAR_CPU_ARCH=aarch64
13573      VAR_CPU_BITS=64
13574      VAR_CPU_ENDIAN=little
13575      ;;
13576    powerpc)
13577      VAR_CPU=ppc
13578      VAR_CPU_ARCH=ppc
13579      VAR_CPU_BITS=32
13580      VAR_CPU_ENDIAN=big
13581      ;;
13582    powerpc64)
13583      VAR_CPU=ppc64
13584      VAR_CPU_ARCH=ppc
13585      VAR_CPU_BITS=64
13586      VAR_CPU_ENDIAN=big
13587      ;;
13588    powerpc64le)
13589      VAR_CPU=ppc64
13590      VAR_CPU_ARCH=ppc
13591      VAR_CPU_BITS=64
13592      VAR_CPU_ENDIAN=little
13593      ;;
13594    s390)
13595      VAR_CPU=s390
13596      VAR_CPU_ARCH=s390
13597      VAR_CPU_BITS=32
13598      VAR_CPU_ENDIAN=big
13599      ;;
13600    s390x)
13601      VAR_CPU=s390x
13602      VAR_CPU_ARCH=s390
13603      VAR_CPU_BITS=64
13604      VAR_CPU_ENDIAN=big
13605      ;;
13606    sparc)
13607      VAR_CPU=sparc
13608      VAR_CPU_ARCH=sparc
13609      VAR_CPU_BITS=32
13610      VAR_CPU_ENDIAN=big
13611      ;;
13612    sparcv9|sparc64)
13613      VAR_CPU=sparcv9
13614      VAR_CPU_ARCH=sparc
13615      VAR_CPU_BITS=64
13616      VAR_CPU_ENDIAN=big
13617      ;;
13618    *)
13619      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13620      ;;
13621  esac
13622
13623  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13624  OPENJDK_TARGET_OS="$VAR_OS"
13625  if test "x$VAR_OS_TYPE" != x; then
13626    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13627  else
13628    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13629  fi
13630  if test "x$VAR_OS_ENV" != x; then
13631    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13632  else
13633    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13634  fi
13635  OPENJDK_TARGET_CPU="$VAR_CPU"
13636  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13637  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13638  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13639
13640
13641
13642
13643
13644
13645
13646
13647  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13648$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13650$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13651
13652
13653
13654# Check whether --with-target-bits was given.
13655if test "${with_target_bits+set}" = set; then :
13656  withval=$with_target_bits;
13657fi
13658
13659
13660  # We have three types of compiles:
13661  # native  == normal compilation, target system == build system
13662  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13663  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13664  #
13665  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13666    # We're doing a proper cross-compilation
13667    COMPILE_TYPE="cross"
13668  else
13669    COMPILE_TYPE="native"
13670  fi
13671
13672  if test "x$with_target_bits" != x; then
13673    if test "x$COMPILE_TYPE" = "xcross"; then
13674      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13675    fi
13676
13677    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13678      # A reduced build is requested
13679      COMPILE_TYPE="reduced"
13680      OPENJDK_TARGET_CPU_BITS=32
13681      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13682        OPENJDK_TARGET_CPU=x86
13683      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13684        OPENJDK_TARGET_CPU=sparc
13685      else
13686        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13687      fi
13688    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13689      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
13690    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13691      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13692$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13693    else
13694      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13695    fi
13696  fi
13697
13698
13699  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13700$as_echo_n "checking compilation type... " >&6; }
13701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13702$as_echo "$COMPILE_TYPE" >&6; }
13703
13704
13705  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13706    REQUIRED_OS_NAME=SunOS
13707    REQUIRED_OS_VERSION=5.10
13708  fi
13709  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13710    REQUIRED_OS_NAME=Linux
13711    REQUIRED_OS_VERSION=2.6
13712  fi
13713  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13714    REQUIRED_OS_NAME=Windows
13715    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13716      REQUIRED_OS_VERSION=5.2
13717    else
13718      REQUIRED_OS_VERSION=5.1
13719    fi
13720  fi
13721  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13722    REQUIRED_OS_NAME=Darwin
13723    REQUIRED_OS_VERSION=11.2
13724  fi
13725
13726
13727
13728
13729
13730  # Also store the legacy naming of the cpu.
13731  # Ie i586 and amd64 instead of x86 and x86_64
13732  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13733  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13734    OPENJDK_TARGET_CPU_LEGACY="i586"
13735  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13736    # On all platforms except MacOSX replace x86_64 with amd64.
13737    OPENJDK_TARGET_CPU_LEGACY="amd64"
13738  fi
13739
13740
13741  # And the second legacy naming of the cpu.
13742  # Ie i386 and amd64 instead of x86 and x86_64.
13743  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13744  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13745    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13746  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13747    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13748  fi
13749
13750
13751  # This is the name of the cpu (but using i386 and amd64 instead of
13752  # x86 and x86_64, respectively), preceeded by a /, to be used when
13753  # locating libraries. On macosx, it's empty, though.
13754  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13755  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13756    OPENJDK_TARGET_CPU_LIBDIR=""
13757  fi
13758
13759
13760  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13761  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13762  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13763  OPENJDK_TARGET_CPU_ISADIR=""
13764  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13765    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13766      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13767    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13768      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13769    fi
13770  fi
13771
13772
13773  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13774  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13775  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13776    # On linux only, we replace x86 with i386.
13777    OPENJDK_TARGET_CPU_OSARCH="i386"
13778  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13779    # On all platforms except macosx, we replace x86_64 with amd64.
13780    OPENJDK_TARGET_CPU_OSARCH="amd64"
13781  fi
13782
13783
13784  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13785  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13786    OPENJDK_TARGET_CPU_JLI="i386"
13787  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13788    # On all platforms except macosx, we replace x86_64 with amd64.
13789    OPENJDK_TARGET_CPU_JLI="amd64"
13790  fi
13791  # Now setup the -D flags for building libjli.
13792  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13793  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13794    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13795      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13796    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13797      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13798    fi
13799  fi
13800
13801
13802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13803      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13804  else
13805      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13806  fi
13807
13808
13809  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13810    A_LP64="LP64:="
13811    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13812    # unpack200.exe
13813    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13814      ADD_LP64="-D_LP64=1"
13815    fi
13816  fi
13817  LP64=$A_LP64
13818
13819
13820  if test "x$COMPILE_TYPE" = "xcross"; then
13821    # FIXME: ... or should this include reduced builds..?
13822    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13823  else
13824    DEFINE_CROSS_COMPILE_ARCH=""
13825  fi
13826
13827
13828  # ZERO_ARCHDEF is used to enable architecture-specific code
13829  case "${OPENJDK_TARGET_CPU}" in
13830    ppc)     ZERO_ARCHDEF=PPC32 ;;
13831    ppc64)   ZERO_ARCHDEF=PPC64 ;;
13832    s390*)   ZERO_ARCHDEF=S390  ;;
13833    sparc*)  ZERO_ARCHDEF=SPARC ;;
13834    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13835    x86)     ZERO_ARCHDEF=IA32  ;;
13836    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13837  esac
13838
13839
13840
13841
13842# Continue setting up basic stuff. Most remaining code require fundamental tools.
13843
13844  # Save the current directory this script was started from
13845  CURDIR="$PWD"
13846
13847  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13848    PATH_SEP=";"
13849
13850  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13851  if test $SRC_ROOT_LENGTH -gt 100; then
13852    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13853  fi
13854
13855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13856    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13857$as_echo_n "checking cygwin release... " >&6; }
13858    CYGWIN_VERSION=`$UNAME -r`
13859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13860$as_echo "$CYGWIN_VERSION" >&6; }
13861    WINDOWS_ENV_VENDOR='cygwin'
13862    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13863
13864    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
13865    if test "x$CYGWIN_VERSION_OLD" != x; then
13866      { $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
13867$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;}
13868      as_fn_error $? "Cannot continue" "$LINENO" 5
13869    fi
13870    if test "x$CYGPATH" = x; then
13871      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13872    fi
13873    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13874$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13875    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13876    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13877    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13878    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13879    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13880$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13881    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13882    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13883    if test "x$test_cygdrive_prefix" = x; then
13884      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13885    fi
13886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13887    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13888$as_echo_n "checking msys release... " >&6; }
13889    MSYS_VERSION=`$UNAME -r`
13890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13891$as_echo "$MSYS_VERSION" >&6; }
13892
13893    WINDOWS_ENV_VENDOR='msys'
13894    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13895
13896    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13897$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13898    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13899    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13900
13901  windows_path="$MSYS_ROOT_PATH"
13902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13903    unix_path=`$CYGPATH -u "$windows_path"`
13904    MSYS_ROOT_PATH="$unix_path"
13905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13907    MSYS_ROOT_PATH="$unix_path"
13908  fi
13909
13910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13911$as_echo "$MSYS_ROOT_PATH" >&6; }
13912    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13913  else
13914    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13915  fi
13916
13917  # Test if windows or unix (cygwin/msys) find is first in path.
13918  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13919$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13920  FIND_BINARY_OUTPUT=`find --version 2>&1`
13921  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13922    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13923$as_echo "unix style" >&6; }
13924  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13926$as_echo "Windows" >&6; }
13927    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13928$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13929    { $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
13930$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13931    as_fn_error $? "Cannot continue" "$LINENO" 5
13932  else
13933    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13934$as_echo "unknown" >&6; }
13935    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13936$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13937  fi
13938
13939  else
13940    PATH_SEP=":"
13941  fi
13942
13943
13944  # We get the top-level directory from the supporting wrappers.
13945  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13946$as_echo_n "checking for top-level directory... " >&6; }
13947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13948$as_echo "$TOPDIR" >&6; }
13949
13950
13951  # Save the original version of TOPDIR for string comparisons
13952  ORIGINAL_TOPDIR="$TOPDIR"
13953
13954
13955  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13956
13957  # Only process if variable expands to non-empty
13958
13959  if test "x$CURDIR" != x; then
13960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13961
13962  # Input might be given as Windows format, start by converting to
13963  # unix format.
13964  path="$CURDIR"
13965  new_path=`$CYGPATH -u "$path"`
13966
13967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13970  # "foo.exe" is OK but "foo" is an error.
13971  #
13972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13973  # It is also a way to make sure we got the proper file name for the real test later on.
13974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13975  if test "x$test_shortpath" = x; then
13976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13977$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13978    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
13979  fi
13980
13981  # Call helper function which possibly converts this using DOS-style short mode.
13982  # If so, the updated path is stored in $new_path.
13983
13984  input_path="$new_path"
13985  # Check if we need to convert this using DOS-style short mode. If the path
13986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
13987  # take no chances and rewrite it.
13988  # Note: m4 eats our [], so we need to use [ and ] instead.
13989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
13990  if test "x$has_forbidden_chars" != x; then
13991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
13992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
13993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
13994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
13995      # Going to short mode and back again did indeed matter. Since short mode is
13996      # case insensitive, let's make it lowercase to improve readability.
13997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
13998      # Now convert it back to Unix-style (cygpath)
13999      input_path=`$CYGPATH -u "$shortmode_path"`
14000      new_path="$input_path"
14001    fi
14002  fi
14003
14004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14005  if test "x$test_cygdrive_prefix" = x; then
14006    # As a simple fix, exclude /usr/bin since it's not a real path.
14007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14009      # a path prefixed by /cygdrive for fixpath to work.
14010      new_path="$CYGWIN_ROOT_PATH$input_path"
14011    fi
14012  fi
14013
14014
14015  if test "x$path" != "x$new_path"; then
14016    CURDIR="$new_path"
14017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14018$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14019  fi
14020
14021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14022
14023  path="$CURDIR"
14024  has_colon=`$ECHO $path | $GREP ^.:`
14025  new_path="$path"
14026  if test "x$has_colon" = x; then
14027    # Not in mixed or Windows style, start by that.
14028    new_path=`cmd //c echo $path`
14029  fi
14030
14031
14032  input_path="$new_path"
14033  # Check if we need to convert this using DOS-style short mode. If the path
14034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14035  # take no chances and rewrite it.
14036  # Note: m4 eats our [], so we need to use [ and ] instead.
14037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14038  if test "x$has_forbidden_chars" != x; then
14039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14041  fi
14042
14043
14044  windows_path="$new_path"
14045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14046    unix_path=`$CYGPATH -u "$windows_path"`
14047    new_path="$unix_path"
14048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14050    new_path="$unix_path"
14051  fi
14052
14053  if test "x$path" != "x$new_path"; then
14054    CURDIR="$new_path"
14055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14056$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14057  fi
14058
14059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14061
14062    else
14063      # We're on a unix platform. Hooray! :)
14064      path="$CURDIR"
14065      has_space=`$ECHO "$path" | $GREP " "`
14066      if test "x$has_space" != x; then
14067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14068$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14070      fi
14071
14072      # Use eval to expand a potential ~
14073      eval path="$path"
14074      if test ! -f "$path" && test ! -d "$path"; then
14075        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14076      fi
14077
14078      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14079    fi
14080  fi
14081
14082
14083  # Only process if variable expands to non-empty
14084
14085  if test "x$TOPDIR" != x; then
14086    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14087
14088  # Input might be given as Windows format, start by converting to
14089  # unix format.
14090  path="$TOPDIR"
14091  new_path=`$CYGPATH -u "$path"`
14092
14093  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14094  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14095  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14096  # "foo.exe" is OK but "foo" is an error.
14097  #
14098  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14099  # It is also a way to make sure we got the proper file name for the real test later on.
14100  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14101  if test "x$test_shortpath" = x; then
14102    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14103$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14104    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14105  fi
14106
14107  # Call helper function which possibly converts this using DOS-style short mode.
14108  # If so, the updated path is stored in $new_path.
14109
14110  input_path="$new_path"
14111  # Check if we need to convert this using DOS-style short mode. If the path
14112  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14113  # take no chances and rewrite it.
14114  # Note: m4 eats our [], so we need to use [ and ] instead.
14115  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14116  if test "x$has_forbidden_chars" != x; then
14117    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14118    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14119    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14120    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14121      # Going to short mode and back again did indeed matter. Since short mode is
14122      # case insensitive, let's make it lowercase to improve readability.
14123      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14124      # Now convert it back to Unix-style (cygpath)
14125      input_path=`$CYGPATH -u "$shortmode_path"`
14126      new_path="$input_path"
14127    fi
14128  fi
14129
14130  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14131  if test "x$test_cygdrive_prefix" = x; then
14132    # As a simple fix, exclude /usr/bin since it's not a real path.
14133    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14134      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14135      # a path prefixed by /cygdrive for fixpath to work.
14136      new_path="$CYGWIN_ROOT_PATH$input_path"
14137    fi
14138  fi
14139
14140
14141  if test "x$path" != "x$new_path"; then
14142    TOPDIR="$new_path"
14143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14144$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14145  fi
14146
14147    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14148
14149  path="$TOPDIR"
14150  has_colon=`$ECHO $path | $GREP ^.:`
14151  new_path="$path"
14152  if test "x$has_colon" = x; then
14153    # Not in mixed or Windows style, start by that.
14154    new_path=`cmd //c echo $path`
14155  fi
14156
14157
14158  input_path="$new_path"
14159  # Check if we need to convert this using DOS-style short mode. If the path
14160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14161  # take no chances and rewrite it.
14162  # Note: m4 eats our [], so we need to use [ and ] instead.
14163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14164  if test "x$has_forbidden_chars" != x; then
14165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14167  fi
14168
14169
14170  windows_path="$new_path"
14171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14172    unix_path=`$CYGPATH -u "$windows_path"`
14173    new_path="$unix_path"
14174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14176    new_path="$unix_path"
14177  fi
14178
14179  if test "x$path" != "x$new_path"; then
14180    TOPDIR="$new_path"
14181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14182$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14183  fi
14184
14185  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14186  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14187
14188    else
14189      # We're on a unix platform. Hooray! :)
14190      path="$TOPDIR"
14191      has_space=`$ECHO "$path" | $GREP " "`
14192      if test "x$has_space" != x; then
14193        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14194$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14195        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14196      fi
14197
14198      # Use eval to expand a potential ~
14199      eval path="$path"
14200      if test ! -f "$path" && test ! -d "$path"; then
14201        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14202      fi
14203
14204      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14205    fi
14206  fi
14207
14208  # SRC_ROOT is a traditional alias for TOPDIR.
14209  SRC_ROOT=$TOPDIR
14210
14211  # Calculate a canonical version of TOPDIR for string comparisons
14212  CANONICAL_TOPDIR=$TOPDIR
14213
14214  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14215    # Follow a chain of symbolic links. Use readlink
14216    # where it exists, else fall back to horribly
14217    # complicated shell code.
14218    if test "x$READLINK_TESTED" != yes; then
14219      # On MacOSX there is a readlink tool with a different
14220      # purpose than the GNU readlink tool. Check the found readlink.
14221      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14222      if test "x$ISGNU" = x; then
14223        # A readlink that we do not know how to use.
14224        # Are there other non-GNU readlinks out there?
14225        READLINK_TESTED=yes
14226        READLINK=
14227      fi
14228    fi
14229
14230    if test "x$READLINK" != x; then
14231      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14232    else
14233      # Save the current directory for restoring afterwards
14234      STARTDIR=$PWD
14235      COUNTER=0
14236      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14237      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14238      cd $sym_link_dir
14239      # Use -P flag to resolve symlinks in directories.
14240      cd `$THEPWDCMD -P`
14241      sym_link_dir=`$THEPWDCMD -P`
14242      # Resolve file symlinks
14243      while test $COUNTER -lt 20; do
14244        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14245        if test "x$ISLINK" == x; then
14246          # This is not a symbolic link! We are done!
14247          break
14248        fi
14249        # Again resolve directory symlinks since the target of the just found
14250        # link could be in a different directory
14251        cd `$DIRNAME $ISLINK`
14252        sym_link_dir=`$THEPWDCMD -P`
14253        sym_link_file=`$BASENAME $ISLINK`
14254        let COUNTER=COUNTER+1
14255      done
14256      cd $STARTDIR
14257      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14258    fi
14259  fi
14260
14261
14262
14263  # Locate the directory of this script.
14264  AUTOCONF_DIR=$TOPDIR/common/autoconf
14265
14266
14267# Check if it's a pure open build or if custom sources are to be used.
14268
14269  # Check whether --enable-openjdk-only was given.
14270if test "${enable_openjdk_only+set}" = set; then :
14271  enableval=$enable_openjdk_only;
14272else
14273  enable_openjdk_only="no"
14274fi
14275
14276
14277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14278$as_echo_n "checking for presence of closed sources... " >&6; }
14279  if test -d "$SRC_ROOT/jdk/src/closed"; then
14280    CLOSED_SOURCE_PRESENT=yes
14281  else
14282    CLOSED_SOURCE_PRESENT=no
14283  fi
14284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14285$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14286
14287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14288$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14289  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14291$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14292
14293  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14294    OPENJDK=true
14295    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14296      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14297$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14298    fi
14299  else
14300    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14301      OPENJDK=true
14302    else
14303      OPENJDK=false
14304    fi
14305  fi
14306
14307  if test "x$OPENJDK" = "xtrue"; then
14308    SET_OPENJDK="OPENJDK=true"
14309  fi
14310
14311
14312
14313  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14314  # the IncludeCustomExtension macro.
14315
14316
14317# Check whether --with-custom-make-dir was given.
14318if test "${with_custom_make_dir+set}" = set; then :
14319  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
14320$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14321fi
14322
14323
14324
14325
14326# These are needed to be able to create a configuration name (and thus the output directory)
14327
14328  ###############################################################################
14329  #
14330  # Check which variant of the JDK that we want to build.
14331  # Currently we have:
14332  #    normal:   standard edition
14333  # but the custom make system may add other variants
14334  #
14335  # Effectively the JDK variant gives a name to a specific set of
14336  # modules to compile into the JDK. In the future, these modules
14337  # might even be Jigsaw modules.
14338  #
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14340$as_echo_n "checking which variant of the JDK to build... " >&6; }
14341
14342# Check whether --with-jdk-variant was given.
14343if test "${with_jdk_variant+set}" = set; then :
14344  withval=$with_jdk_variant;
14345fi
14346
14347
14348  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14349    JDK_VARIANT="normal"
14350  else
14351    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14352  fi
14353
14354
14355
14356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14357$as_echo "$JDK_VARIANT" >&6; }
14358
14359
14360###############################################################################
14361#
14362# Check which interpreter of the JVM we want to build.
14363# Currently we have:
14364#    template: Template interpreter (the default)
14365#    cpp     : C++ interpreter
14366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14367$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14368
14369# Check whether --with-jvm-interpreter was given.
14370if test "${with_jvm_interpreter+set}" = set; then :
14371  withval=$with_jvm_interpreter;
14372fi
14373
14374
14375if test "x$with_jvm_interpreter" = x; then
14376     with_jvm_interpreter="template"
14377fi
14378
14379JVM_INTERPRETER="$with_jvm_interpreter"
14380
14381if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14382   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14383fi
14384
14385
14386
14387{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14388$as_echo "$with_jvm_interpreter" >&6; }
14389
14390
14391
14392  ###############################################################################
14393  #
14394  # Check which variants of the JVM that we want to build.
14395  # Currently we have:
14396  #    server: normal interpreter and a tiered C1/C2 compiler
14397  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14398  #    minimal1: reduced form of client with optional VM services and features stripped out
14399  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14400  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14401  #    zero: no machine code interpreter, no compiler
14402  #    zeroshark: zero interpreter and shark/llvm compiler backend
14403#    core: interpreter only, no compiler (only works on some platforms)
14404  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14405$as_echo_n "checking which variants of the JVM to build... " >&6; }
14406
14407# Check whether --with-jvm-variants was given.
14408if test "${with_jvm_variants+set}" = set; then :
14409  withval=$with_jvm_variants;
14410fi
14411
14412
14413  if test "x$with_jvm_variants" = x; then
14414    with_jvm_variants="server"
14415  fi
14416
14417  JVM_VARIANTS=",$with_jvm_variants,"
14418  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,//'`
14419
14420  if test "x$TEST_VARIANTS" != "x,"; then
14421     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14422  fi
14423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14424$as_echo "$with_jvm_variants" >&6; }
14425
14426  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14427  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14428  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14429  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14430  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14431  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14432  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14433
14434  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14435    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14436      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14437    fi
14438  fi
14439  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14440    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14441      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14442    fi
14443  fi
14444  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14445    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14446      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14447    fi
14448  fi
14449
14450  # Replace the commas with AND for use in the build directory name.
14451  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14452  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/'`
14453  if test "x$COUNT_VARIANTS" != "x,1"; then
14454    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14455  else
14456    BUILDING_MULTIPLE_JVM_VARIANTS=no
14457  fi
14458
14459
14460
14461
14462
14463
14464
14465
14466
14467
14468  INCLUDE_SA=true
14469  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14470    INCLUDE_SA=false
14471  fi
14472  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14473    INCLUDE_SA=false
14474  fi
14475  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14476    INCLUDE_SA=false
14477  fi
14478  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14479    INCLUDE_SA=false
14480  fi
14481
14482
14483  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14484    MACOSX_UNIVERSAL="true"
14485  fi
14486
14487
14488
14489
14490  ###############################################################################
14491  #
14492  # Set the debug level
14493  #    release: no debug information, all optimizations, no asserts.
14494  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14495  #    fastdebug: debug information (-g), all optimizations, all asserts
14496  #    slowdebug: debug information (-g), no optimizations, all asserts
14497  #
14498  DEBUG_LEVEL="release"
14499  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14500$as_echo_n "checking which debug level to use... " >&6; }
14501  # Check whether --enable-debug was given.
14502if test "${enable_debug+set}" = set; then :
14503  enableval=$enable_debug;
14504        ENABLE_DEBUG="${enableval}"
14505        DEBUG_LEVEL="fastdebug"
14506
14507else
14508  ENABLE_DEBUG="no"
14509fi
14510
14511
14512
14513# Check whether --with-debug-level was given.
14514if test "${with_debug_level+set}" = set; then :
14515  withval=$with_debug_level;
14516        DEBUG_LEVEL="${withval}"
14517        if test "x$ENABLE_DEBUG" = xyes; then
14518          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14519        fi
14520
14521fi
14522
14523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14524$as_echo "$DEBUG_LEVEL" >&6; }
14525
14526  if test "x$DEBUG_LEVEL" != xrelease && \
14527      test "x$DEBUG_LEVEL" != xoptimized && \
14528      test "x$DEBUG_LEVEL" != xfastdebug && \
14529      test "x$DEBUG_LEVEL" != xslowdebug; then
14530    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14531  fi
14532
14533
14534  ###############################################################################
14535  #
14536  # Setup legacy vars/targets and new vars to deal with different debug levels.
14537  #
14538
14539  case $DEBUG_LEVEL in
14540    release )
14541      VARIANT="OPT"
14542      FASTDEBUG="false"
14543      DEBUG_CLASSFILES="false"
14544      BUILD_VARIANT_RELEASE=""
14545      HOTSPOT_DEBUG_LEVEL="product"
14546      HOTSPOT_EXPORT="product"
14547      ;;
14548    fastdebug )
14549      VARIANT="DBG"
14550      FASTDEBUG="true"
14551      DEBUG_CLASSFILES="true"
14552      BUILD_VARIANT_RELEASE="-fastdebug"
14553      HOTSPOT_DEBUG_LEVEL="fastdebug"
14554      HOTSPOT_EXPORT="fastdebug"
14555      ;;
14556    slowdebug )
14557      VARIANT="DBG"
14558      FASTDEBUG="false"
14559      DEBUG_CLASSFILES="true"
14560      BUILD_VARIANT_RELEASE="-debug"
14561      HOTSPOT_DEBUG_LEVEL="debug"
14562      HOTSPOT_EXPORT="debug"
14563      ;;
14564    optimized )
14565      VARIANT="OPT"
14566      FASTDEBUG="false"
14567      DEBUG_CLASSFILES="false"
14568      BUILD_VARIANT_RELEASE="-optimized"
14569      HOTSPOT_DEBUG_LEVEL="optimized"
14570      HOTSPOT_EXPORT="optimized"
14571      ;;
14572  esac
14573
14574  # The debug level 'optimized' is a little special because it is currently only
14575  # applicable to the HotSpot build where it means to build a completely
14576  # optimized version of the VM without any debugging code (like for the
14577  # 'release' debug level which is called 'product' in the HotSpot build) but
14578  # with the exception that it can contain additional code which is otherwise
14579  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14580  # test new and/or experimental features which are not intended for customer
14581  # shipment. Because these new features need to be tested and benchmarked in
14582  # real world scenarios, we want to build the containing JDK at the 'release'
14583  # debug level.
14584  if test "x$DEBUG_LEVEL" = xoptimized; then
14585    DEBUG_LEVEL="release"
14586  fi
14587
14588  #####
14589  # Generate the legacy makefile targets for hotspot.
14590  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14591  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14592  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14593  # But until then ...
14594  HOTSPOT_TARGET=""
14595
14596  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14597    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14598  fi
14599
14600  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14601    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14602  fi
14603
14604  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14605    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14606  fi
14607
14608  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14609    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14610  fi
14611
14612  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14613    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14614  fi
14615
14616  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14617    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14618  fi
14619
14620  if test "x$JVM_VARIANT_CORE" = xtrue; then
14621    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14622  fi
14623
14624  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14625
14626  # On Macosx universal binaries are produced, but they only contain
14627  # 64 bit intel. This invalidates control of which jvms are built
14628  # from configure, but only server is valid anyway. Fix this
14629  # when hotspot makefiles are rewritten.
14630  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14631    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14632  fi
14633
14634  #####
14635
14636
14637
14638
14639
14640
14641
14642
14643# With basic setup done, call the custom early hook.
14644
14645
14646# Check if we have devkits, extra paths or sysroot set.
14647
14648
14649# Check whether --with-devkit was given.
14650if test "${with_devkit+set}" = set; then :
14651  withval=$with_devkit;
14652
14653  # Only process if variable expands to non-empty
14654
14655  if test "x$with_devkit" != x; then
14656    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14657
14658  # Input might be given as Windows format, start by converting to
14659  # unix format.
14660  path="$with_devkit"
14661  new_path=`$CYGPATH -u "$path"`
14662
14663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14666  # "foo.exe" is OK but "foo" is an error.
14667  #
14668  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14669  # It is also a way to make sure we got the proper file name for the real test later on.
14670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14671  if test "x$test_shortpath" = x; then
14672    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14673$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14674    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14675  fi
14676
14677  # Call helper function which possibly converts this using DOS-style short mode.
14678  # If so, the updated path is stored in $new_path.
14679
14680  input_path="$new_path"
14681  # Check if we need to convert this using DOS-style short mode. If the path
14682  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14683  # take no chances and rewrite it.
14684  # Note: m4 eats our [], so we need to use [ and ] instead.
14685  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14686  if test "x$has_forbidden_chars" != x; then
14687    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14688    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14689    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14690    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14691      # Going to short mode and back again did indeed matter. Since short mode is
14692      # case insensitive, let's make it lowercase to improve readability.
14693      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14694      # Now convert it back to Unix-style (cygpath)
14695      input_path=`$CYGPATH -u "$shortmode_path"`
14696      new_path="$input_path"
14697    fi
14698  fi
14699
14700  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14701  if test "x$test_cygdrive_prefix" = x; then
14702    # As a simple fix, exclude /usr/bin since it's not a real path.
14703    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14704      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14705      # a path prefixed by /cygdrive for fixpath to work.
14706      new_path="$CYGWIN_ROOT_PATH$input_path"
14707    fi
14708  fi
14709
14710
14711  if test "x$path" != "x$new_path"; then
14712    with_devkit="$new_path"
14713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14714$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14715  fi
14716
14717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14718
14719  path="$with_devkit"
14720  has_colon=`$ECHO $path | $GREP ^.:`
14721  new_path="$path"
14722  if test "x$has_colon" = x; then
14723    # Not in mixed or Windows style, start by that.
14724    new_path=`cmd //c echo $path`
14725  fi
14726
14727
14728  input_path="$new_path"
14729  # Check if we need to convert this using DOS-style short mode. If the path
14730  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14731  # take no chances and rewrite it.
14732  # Note: m4 eats our [], so we need to use [ and ] instead.
14733  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14734  if test "x$has_forbidden_chars" != x; then
14735    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14736    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14737  fi
14738
14739
14740  windows_path="$new_path"
14741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14742    unix_path=`$CYGPATH -u "$windows_path"`
14743    new_path="$unix_path"
14744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14746    new_path="$unix_path"
14747  fi
14748
14749  if test "x$path" != "x$new_path"; then
14750    with_devkit="$new_path"
14751    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14752$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14753  fi
14754
14755  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14756  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14757
14758    else
14759      # We're on a unix platform. Hooray! :)
14760      path="$with_devkit"
14761      has_space=`$ECHO "$path" | $GREP " "`
14762      if test "x$has_space" != x; then
14763        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14764$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14765        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14766      fi
14767
14768      # Use eval to expand a potential ~
14769      eval path="$path"
14770      if test ! -f "$path" && test ! -d "$path"; then
14771        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14772      fi
14773
14774      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14775    fi
14776  fi
14777
14778        DEVKIT_ROOT="$with_devkit"
14779        # Check for a meta data info file in the root of the devkit
14780        if test -f "$DEVKIT_ROOT/devkit.info"; then
14781          . $DEVKIT_ROOT/devkit.info
14782          # This potentially sets the following:
14783          # A descriptive name of the devkit
14784
14785  if test "x$DEVKIT_NAME" = x; then
14786    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14787  fi
14788
14789          # Corresponds to --with-extra-path
14790
14791  if test "x$DEVKIT_EXTRA_PATH" = x; then
14792    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14793  fi
14794
14795          # Corresponds to --with-toolchain-path
14796
14797  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14798    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14799  fi
14800
14801          # Corresponds to --with-sysroot
14802
14803  if test "x$DEVKIT_SYSROOT" = x; then
14804    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14805  fi
14806
14807
14808          # Identifies the Visual Studio version in the devkit
14809
14810  if test "x$DEVKIT_VS_VERSION" = x; then
14811    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14812  fi
14813
14814          # The Visual Studio include environment variable
14815
14816  if test "x$DEVKIT_VS_INCLUDE" = x; then
14817    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
14818  fi
14819
14820          # The Visual Studio lib environment variable
14821
14822  if test "x$DEVKIT_VS_LIB" = x; then
14823    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
14824  fi
14825
14826          # Corresponds to --with-msvcr-dll
14827
14828  if test "x$DEVKIT_MSVCR_DLL" = x; then
14829    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
14830  fi
14831
14832          # Corresponds to --with-msvcp-dll
14833
14834  if test "x$DEVKIT_MSVCP_DLL" = x; then
14835    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
14836  fi
14837
14838        fi
14839
14840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14841$as_echo_n "checking for devkit... " >&6; }
14842        if test "x$DEVKIT_NAME" != x; then
14843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14844$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14845        else
14846          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14847$as_echo "$DEVKIT_ROOT" >&6; }
14848        fi
14849
14850
14851  if test "x$DEVKIT_EXTRA_PATH" != x; then
14852    if test "x$EXTRA_PATH" = x; then
14853      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14854    else
14855      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14856    fi
14857  fi
14858
14859
14860        # Fallback default of just /bin if DEVKIT_PATH is not defined
14861        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14862          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14863        fi
14864
14865  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14866    if test "x$TOOLCHAIN_PATH" = x; then
14867      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14868    else
14869      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14870    fi
14871  fi
14872
14873
14874        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14875        # places for backwards compatiblity.
14876        if test "x$DEVKIT_SYSROOT" != x; then
14877          SYSROOT="$DEVKIT_SYSROOT"
14878        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14879          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14880        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14881          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14882        fi
14883
14884
14885fi
14886
14887
14888  # You can force the sysroot if the sysroot encoded into the compiler tools
14889  # is not correct.
14890
14891# Check whether --with-sys-root was given.
14892if test "${with_sys_root+set}" = set; then :
14893  withval=$with_sys_root; SYSROOT=$with_sys_root
14894
14895fi
14896
14897
14898
14899# Check whether --with-sysroot was given.
14900if test "${with_sysroot+set}" = set; then :
14901  withval=$with_sysroot; SYSROOT=$with_sysroot
14902
14903fi
14904
14905
14906
14907# Check whether --with-tools-dir was given.
14908if test "${with_tools_dir+set}" = set; then :
14909  withval=$with_tools_dir;
14910  if test "x$with_tools_dir" != x; then
14911    if test "x$TOOLCHAIN_PATH" = x; then
14912      TOOLCHAIN_PATH="$with_tools_dir"
14913    else
14914      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14915    fi
14916  fi
14917
14918
14919fi
14920
14921
14922
14923# Check whether --with-toolchain-path was given.
14924if test "${with_toolchain_path+set}" = set; then :
14925  withval=$with_toolchain_path;
14926  if test "x$with_toolchain_path" != x; then
14927    if test "x$TOOLCHAIN_PATH" = x; then
14928      TOOLCHAIN_PATH="$with_toolchain_path"
14929    else
14930      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14931    fi
14932  fi
14933
14934
14935fi
14936
14937
14938
14939# Check whether --with-extra-path was given.
14940if test "${with_extra_path+set}" = set; then :
14941  withval=$with_extra_path;
14942  if test "x$with_extra_path" != x; then
14943    if test "x$EXTRA_PATH" = x; then
14944      EXTRA_PATH="$with_extra_path"
14945    else
14946      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14947    fi
14948  fi
14949
14950
14951fi
14952
14953
14954  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14955    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
14956    # If not, detect if Xcode is installed by running xcodebuild -version
14957    # if no Xcode installed, xcodebuild exits with 1
14958    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14959    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14960      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14961      # fall back on the stub binary in /usr/bin/xcodebuild
14962      # Extract the first word of "xcodebuild", so it can be a program name with args.
14963set dummy xcodebuild; ac_word=$2
14964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14965$as_echo_n "checking for $ac_word... " >&6; }
14966if ${ac_cv_path_XCODEBUILD+:} false; then :
14967  $as_echo_n "(cached) " >&6
14968else
14969  case $XCODEBUILD in
14970  [\\/]* | ?:[\\/]*)
14971  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14972  ;;
14973  *)
14974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14975for as_dir in $TOOLCHAIN_PATH
14976do
14977  IFS=$as_save_IFS
14978  test -z "$as_dir" && as_dir=.
14979    for ac_exec_ext in '' $ac_executable_extensions; do
14980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14981    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
14982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14983    break 2
14984  fi
14985done
14986  done
14987IFS=$as_save_IFS
14988
14989  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
14990  ;;
14991esac
14992fi
14993XCODEBUILD=$ac_cv_path_XCODEBUILD
14994if test -n "$XCODEBUILD"; then
14995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
14996$as_echo "$XCODEBUILD" >&6; }
14997else
14998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14999$as_echo "no" >&6; }
15000fi
15001
15002
15003    else
15004      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15005      # when only the command line tools are installed there are no SDKs, so headers
15006      # are copied into the system frameworks
15007      XCODEBUILD=
15008
15009    fi
15010
15011    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15012$as_echo_n "checking for sdk name... " >&6; }
15013
15014# Check whether --with-sdk-name was given.
15015if test "${with_sdk_name+set}" = set; then :
15016  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15017
15018fi
15019
15020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15021$as_echo "$SDKNAME" >&6; }
15022
15023    # if toolchain path is specified then don't rely on system headers, they may not compile
15024    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15025    test -z "$TOOLCHAIN_PATH" && \
15026      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15027
15028    if test -z "$SYSROOT"; then
15029      if test -n "$XCODEBUILD"; then
15030        # if we don't have system headers, use default SDK name (last resort)
15031        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15032          SDKNAME=${SDKNAME:-macosx}
15033        fi
15034
15035        if test -n "$SDKNAME"; then
15036          # Call xcodebuild to determine SYSROOT
15037          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15038        fi
15039      else
15040        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15041          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
15042        fi
15043      fi
15044    else
15045      # warn user if --with-sdk-name was also set
15046      if test -n "$with_sdk_name"; then
15047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15048$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15049      fi
15050    fi
15051
15052    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15053      # If no system framework headers, then SYSROOT must be set, or we won't build
15054      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
15055    fi
15056
15057    # Perform a basic sanity test
15058    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15059      if test -z "$SYSROOT"; then
15060        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
15061      else
15062        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15063      fi
15064    fi
15065
15066    # set SDKROOT too, Xcode tools will pick it up
15067    SDKROOT=$SYSROOT
15068
15069  fi
15070
15071  # Prepend the extra path to the global path
15072
15073  if test "x$EXTRA_PATH" != x; then
15074    if test "x$PATH" = x; then
15075      PATH="$EXTRA_PATH"
15076    else
15077      PATH="$EXTRA_PATH:$PATH"
15078    fi
15079  fi
15080
15081
15082  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15083    # Add extra search paths on solaris for utilities like ar and as etc...
15084    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15085  fi
15086
15087  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15088$as_echo_n "checking for sysroot... " >&6; }
15089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15090$as_echo "$SYSROOT" >&6; }
15091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15092$as_echo_n "checking for toolchain path... " >&6; }
15093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15094$as_echo "$TOOLCHAIN_PATH" >&6; }
15095  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15096$as_echo_n "checking for extra path... " >&6; }
15097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15098$as_echo "$EXTRA_PATH" >&6; }
15099
15100
15101# To properly create a configuration name, we need to have the OpenJDK target
15102# and options (variants and debug level) parsed.
15103
15104
15105
15106# Check whether --with-conf-name was given.
15107if test "${with_conf_name+set}" = set; then :
15108  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15109fi
15110
15111
15112  # Test from where we are running configure, in or outside of src root.
15113  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15114$as_echo_n "checking where to store configuration... " >&6; }
15115  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15116      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15117      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15118    # We are running configure from the src root.
15119    # Create a default ./build/target-variant-debuglevel output root.
15120    if test "x${CONF_NAME}" = x; then
15121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15122$as_echo "in default location" >&6; }
15123      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15124    else
15125      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15126$as_echo "in build directory with custom name" >&6; }
15127    fi
15128    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15129    $MKDIR -p "$OUTPUT_ROOT"
15130    if test ! -d "$OUTPUT_ROOT"; then
15131      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15132    fi
15133  else
15134    # We are running configure from outside of the src dir.
15135    # Then use the current directory as output dir!
15136    # If configuration is situated in normal build directory, just use the build
15137    # directory name as configuration name, otherwise use the complete path.
15138    if test "x${CONF_NAME}" = x; then
15139      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15140    fi
15141    OUTPUT_ROOT="$CURDIR"
15142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15143$as_echo "in current directory" >&6; }
15144
15145    # WARNING: This might be a bad thing to do. You need to be sure you want to
15146    # have a configuration in this directory. Do some sanity checks!
15147
15148    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15149      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15150      # other files
15151      files_present=`$LS $OUTPUT_ROOT`
15152      # Configure has already touched config.log and confdefs.h in the current dir when this check
15153      # is performed.
15154      filtered_files=`$ECHO "$files_present" \
15155          | $SED -e 's/config.log//g' \
15156              -e 's/configure.log//g' \
15157              -e 's/confdefs.h//g' \
15158              -e 's/ //g' \
15159          | $TR -d '\n'`
15160      if test "x$filtered_files" != x; then
15161        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15162$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15163        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15164$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15165        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15166$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15167        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15168$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15169        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15170$as_echo "$as_me: seriously mess up just about everything." >&6;}
15171        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15172$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15173        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15174$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15175        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15176      fi
15177    fi
15178  fi
15179  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15180$as_echo_n "checking what configuration name to use... " >&6; }
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15182$as_echo "$CONF_NAME" >&6; }
15183
15184
15185  # Only process if variable expands to non-empty
15186
15187  if test "x$OUTPUT_ROOT" != x; then
15188    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15189
15190  # Input might be given as Windows format, start by converting to
15191  # unix format.
15192  path="$OUTPUT_ROOT"
15193  new_path=`$CYGPATH -u "$path"`
15194
15195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15198  # "foo.exe" is OK but "foo" is an error.
15199  #
15200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15201  # It is also a way to make sure we got the proper file name for the real test later on.
15202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15203  if test "x$test_shortpath" = x; then
15204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15205$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15206    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15207  fi
15208
15209  # Call helper function which possibly converts this using DOS-style short mode.
15210  # If so, the updated path is stored in $new_path.
15211
15212  input_path="$new_path"
15213  # Check if we need to convert this using DOS-style short mode. If the path
15214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15215  # take no chances and rewrite it.
15216  # Note: m4 eats our [], so we need to use [ and ] instead.
15217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15218  if test "x$has_forbidden_chars" != x; then
15219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15223      # Going to short mode and back again did indeed matter. Since short mode is
15224      # case insensitive, let's make it lowercase to improve readability.
15225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15226      # Now convert it back to Unix-style (cygpath)
15227      input_path=`$CYGPATH -u "$shortmode_path"`
15228      new_path="$input_path"
15229    fi
15230  fi
15231
15232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15233  if test "x$test_cygdrive_prefix" = x; then
15234    # As a simple fix, exclude /usr/bin since it's not a real path.
15235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15237      # a path prefixed by /cygdrive for fixpath to work.
15238      new_path="$CYGWIN_ROOT_PATH$input_path"
15239    fi
15240  fi
15241
15242
15243  if test "x$path" != "x$new_path"; then
15244    OUTPUT_ROOT="$new_path"
15245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15246$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15247  fi
15248
15249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15250
15251  path="$OUTPUT_ROOT"
15252  has_colon=`$ECHO $path | $GREP ^.:`
15253  new_path="$path"
15254  if test "x$has_colon" = x; then
15255    # Not in mixed or Windows style, start by that.
15256    new_path=`cmd //c echo $path`
15257  fi
15258
15259
15260  input_path="$new_path"
15261  # Check if we need to convert this using DOS-style short mode. If the path
15262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15263  # take no chances and rewrite it.
15264  # Note: m4 eats our [], so we need to use [ and ] instead.
15265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15266  if test "x$has_forbidden_chars" != x; then
15267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15269  fi
15270
15271
15272  windows_path="$new_path"
15273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15274    unix_path=`$CYGPATH -u "$windows_path"`
15275    new_path="$unix_path"
15276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15278    new_path="$unix_path"
15279  fi
15280
15281  if test "x$path" != "x$new_path"; then
15282    OUTPUT_ROOT="$new_path"
15283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15284$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15285  fi
15286
15287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15289
15290    else
15291      # We're on a unix platform. Hooray! :)
15292      path="$OUTPUT_ROOT"
15293      has_space=`$ECHO "$path" | $GREP " "`
15294      if test "x$has_space" != x; then
15295        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15296$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15297        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15298      fi
15299
15300      # Use eval to expand a potential ~
15301      eval path="$path"
15302      if test ! -f "$path" && test ! -d "$path"; then
15303        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15304      fi
15305
15306      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15307    fi
15308  fi
15309
15310
15311  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15312  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15313
15314  SPEC=$OUTPUT_ROOT/spec.gmk
15315
15316  CONF_NAME=$CONF_NAME
15317
15318  OUTPUT_ROOT=$OUTPUT_ROOT
15319
15320
15321
15322  # The spec.gmk file contains all variables for the make system.
15323  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15324
15325  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15326  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15327
15328  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15329  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15330
15331  # The compare.sh is used to compare the build output to other builds.
15332  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15333
15334  # The generated Makefile knows where the spec.gmk is and where the source is.
15335  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15336  # which will look for generated configurations
15337  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15338
15339
15340
15341# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15342
15343  for ac_prog in apt-get yum port pkgutil pkgadd
15344do
15345  # Extract the first word of "$ac_prog", so it can be a program name with args.
15346set dummy $ac_prog; ac_word=$2
15347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15348$as_echo_n "checking for $ac_word... " >&6; }
15349if ${ac_cv_prog_PKGHANDLER+:} false; then :
15350  $as_echo_n "(cached) " >&6
15351else
15352  if test -n "$PKGHANDLER"; then
15353  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15354else
15355as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15356for as_dir in $PATH
15357do
15358  IFS=$as_save_IFS
15359  test -z "$as_dir" && as_dir=.
15360    for ac_exec_ext in '' $ac_executable_extensions; do
15361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15362    ac_cv_prog_PKGHANDLER="$ac_prog"
15363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15364    break 2
15365  fi
15366done
15367  done
15368IFS=$as_save_IFS
15369
15370fi
15371fi
15372PKGHANDLER=$ac_cv_prog_PKGHANDLER
15373if test -n "$PKGHANDLER"; then
15374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15375$as_echo "$PKGHANDLER" >&6; }
15376else
15377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15378$as_echo "no" >&6; }
15379fi
15380
15381
15382  test -n "$PKGHANDLER" && break
15383done
15384
15385
15386
15387# Setup tools that requires more complex handling, or that is not needed by the configure script.
15388
15389
15390  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15391  if test "x$MAKE" != x; then
15392    # User has supplied a make, test it.
15393    if test ! -f "$MAKE"; then
15394      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15395    fi
15396
15397  MAKE_CANDIDATE=""$MAKE""
15398  DESCRIPTION="user supplied MAKE=$MAKE"
15399
15400  # On Cygwin, we require a newer version of make than on other platforms
15401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15402    MAKE_VERSION_EXPR="-e 4\."
15403    MAKE_REQUIRED_VERSION="4.0"
15404   else
15405    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15406    MAKE_REQUIRED_VERSION="3.81"
15407  fi
15408
15409  if test "x$MAKE_CANDIDATE" != x; then
15410    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15411$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15412    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15413    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15414    if test "x$IS_GNU_MAKE" = x; then
15415      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15416$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15417    else
15418      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15419      if test "x$IS_MODERN_MAKE" = x; then
15420        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15421$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15422      else
15423        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15424          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15425            MAKE_EXPECTED_ENV='cygwin'
15426          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15427            MAKE_EXPECTED_ENV='msys'
15428          else
15429            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15430          fi
15431          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15432          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15433        else
15434          # Not relevant for non-Windows
15435          IS_MAKE_CORRECT_ENV=true
15436        fi
15437        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15438          { $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
15439$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;}
15440        else
15441          FOUND_MAKE=$MAKE_CANDIDATE
15442
15443  # Only process if variable expands to non-empty
15444
15445  if test "x$FOUND_MAKE" != x; then
15446    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15447
15448  # First separate the path from the arguments. This will split at the first
15449  # space.
15450  complete="$FOUND_MAKE"
15451  path="${complete%% *}"
15452  tmp="$complete EOL"
15453  arguments="${tmp#* }"
15454
15455  # Input might be given as Windows format, start by converting to
15456  # unix format.
15457  new_path=`$CYGPATH -u "$path"`
15458
15459  # Now try to locate executable using which
15460  new_path=`$WHICH "$new_path" 2> /dev/null`
15461  # bat and cmd files are not always considered executable in cygwin causing which
15462  # to not find them
15463  if test "x$new_path" = x \
15464      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15465      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15466    new_path=`$CYGPATH -u "$path"`
15467  fi
15468  if test "x$new_path" = x; then
15469    # Oops. Which didn't find the executable.
15470    # The splitting of arguments from the executable at a space might have been incorrect,
15471    # since paths with space are more likely in Windows. Give it another try with the whole
15472    # argument.
15473    path="$complete"
15474    arguments="EOL"
15475    new_path=`$CYGPATH -u "$path"`
15476    new_path=`$WHICH "$new_path" 2> /dev/null`
15477    # bat and cmd files are not always considered executable in cygwin causing which
15478    # to not find them
15479    if test "x$new_path" = x \
15480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15482      new_path=`$CYGPATH -u "$path"`
15483    fi
15484    if test "x$new_path" = x; then
15485      # It's still not found. Now this is an unrecoverable error.
15486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15488      has_space=`$ECHO "$complete" | $GREP " "`
15489      if test "x$has_space" != x; then
15490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15492      fi
15493      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15494    fi
15495  fi
15496
15497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15500  # "foo.exe" is OK but "foo" is an error.
15501  #
15502  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15503  # It is also a way to make sure we got the proper file name for the real test later on.
15504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15505  if test "x$test_shortpath" = x; then
15506    # Short path failed, file does not exist as specified.
15507    # Try adding .exe or .cmd
15508    if test -f "${new_path}.exe"; then
15509      input_to_shortpath="${new_path}.exe"
15510    elif test -f "${new_path}.cmd"; then
15511      input_to_shortpath="${new_path}.cmd"
15512    else
15513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15516$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15517      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15518    fi
15519  else
15520    input_to_shortpath="$new_path"
15521  fi
15522
15523  # Call helper function which possibly converts this using DOS-style short mode.
15524  # If so, the updated path is stored in $new_path.
15525  new_path="$input_to_shortpath"
15526
15527  input_path="$input_to_shortpath"
15528  # Check if we need to convert this using DOS-style short mode. If the path
15529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15530  # take no chances and rewrite it.
15531  # Note: m4 eats our [], so we need to use [ and ] instead.
15532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15533  if test "x$has_forbidden_chars" != x; then
15534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15538      # Going to short mode and back again did indeed matter. Since short mode is
15539      # case insensitive, let's make it lowercase to improve readability.
15540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15541      # Now convert it back to Unix-style (cygpath)
15542      input_path=`$CYGPATH -u "$shortmode_path"`
15543      new_path="$input_path"
15544    fi
15545  fi
15546
15547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15548  if test "x$test_cygdrive_prefix" = x; then
15549    # As a simple fix, exclude /usr/bin since it's not a real path.
15550    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15552      # a path prefixed by /cygdrive for fixpath to work.
15553      new_path="$CYGWIN_ROOT_PATH$input_path"
15554    fi
15555  fi
15556
15557  # remove trailing .exe if any
15558  new_path="${new_path/%.exe/}"
15559
15560    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15561
15562  # First separate the path from the arguments. This will split at the first
15563  # space.
15564  complete="$FOUND_MAKE"
15565  path="${complete%% *}"
15566  tmp="$complete EOL"
15567  arguments="${tmp#* }"
15568
15569  # Input might be given as Windows format, start by converting to
15570  # unix format.
15571  new_path="$path"
15572
15573  windows_path="$new_path"
15574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15575    unix_path=`$CYGPATH -u "$windows_path"`
15576    new_path="$unix_path"
15577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15579    new_path="$unix_path"
15580  fi
15581
15582
15583  # Now try to locate executable using which
15584  new_path=`$WHICH "$new_path" 2> /dev/null`
15585
15586  if test "x$new_path" = x; then
15587    # Oops. Which didn't find the executable.
15588    # The splitting of arguments from the executable at a space might have been incorrect,
15589    # since paths with space are more likely in Windows. Give it another try with the whole
15590    # argument.
15591    path="$complete"
15592    arguments="EOL"
15593    new_path="$path"
15594
15595  windows_path="$new_path"
15596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15597    unix_path=`$CYGPATH -u "$windows_path"`
15598    new_path="$unix_path"
15599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15601    new_path="$unix_path"
15602  fi
15603
15604
15605    new_path=`$WHICH "$new_path" 2> /dev/null`
15606    # bat and cmd files are not always considered executable in MSYS causing which
15607    # to not find them
15608    if test "x$new_path" = x \
15609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15611      new_path="$path"
15612
15613  windows_path="$new_path"
15614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15615    unix_path=`$CYGPATH -u "$windows_path"`
15616    new_path="$unix_path"
15617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15619    new_path="$unix_path"
15620  fi
15621
15622    fi
15623
15624    if test "x$new_path" = x; then
15625      # It's still not found. Now this is an unrecoverable error.
15626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15627$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15628      has_space=`$ECHO "$complete" | $GREP " "`
15629      if test "x$has_space" != x; then
15630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15632      fi
15633      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15634    fi
15635  fi
15636
15637  # Now new_path has a complete unix path to the binary
15638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15639    # Keep paths in /bin as-is, but remove trailing .exe if any
15640    new_path="${new_path/%.exe/}"
15641    # Do not save /bin paths to all_fixpath_prefixes!
15642  else
15643    # Not in mixed or Windows style, start by that.
15644    new_path=`cmd //c echo $new_path`
15645
15646  input_path="$new_path"
15647  # Check if we need to convert this using DOS-style short mode. If the path
15648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15649  # take no chances and rewrite it.
15650  # Note: m4 eats our [], so we need to use [ and ] instead.
15651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15652  if test "x$has_forbidden_chars" != x; then
15653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15655  fi
15656
15657    # Output is in $new_path
15658
15659  windows_path="$new_path"
15660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15661    unix_path=`$CYGPATH -u "$windows_path"`
15662    new_path="$unix_path"
15663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15665    new_path="$unix_path"
15666  fi
15667
15668    # remove trailing .exe if any
15669    new_path="${new_path/%.exe/}"
15670
15671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15673  fi
15674
15675    else
15676      # We're on a unix platform. Hooray! :)
15677      # First separate the path from the arguments. This will split at the first
15678      # space.
15679      complete="$FOUND_MAKE"
15680      path="${complete%% *}"
15681      tmp="$complete EOL"
15682      arguments="${tmp#* }"
15683
15684      # Cannot rely on the command "which" here since it doesn't always work.
15685      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15686      if test -z "$is_absolute_path"; then
15687        # Path to executable is not absolute. Find it.
15688        IFS_save="$IFS"
15689        IFS=:
15690        for p in $PATH; do
15691          if test -f "$p/$path" && test -x "$p/$path"; then
15692            new_path="$p/$path"
15693            break
15694          fi
15695        done
15696        IFS="$IFS_save"
15697      else
15698        # This is an absolute path, we can use it without further modifications.
15699        new_path="$path"
15700      fi
15701
15702      if test "x$new_path" = x; then
15703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15705        has_space=`$ECHO "$complete" | $GREP " "`
15706        if test "x$has_space" != x; then
15707          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15709        fi
15710        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15711      fi
15712    fi
15713
15714    # Now join together the path and the arguments once again
15715    if test "x$arguments" != xEOL; then
15716      new_complete="$new_path ${arguments% *}"
15717    else
15718      new_complete="$new_path"
15719    fi
15720
15721    if test "x$complete" != "x$new_complete"; then
15722      FOUND_MAKE="$new_complete"
15723      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15724$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15725    fi
15726  fi
15727
15728        fi
15729      fi
15730    fi
15731  fi
15732
15733    if test "x$FOUND_MAKE" = x; then
15734      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15735    fi
15736  else
15737    # Try our hardest to locate a correct version of GNU make
15738    for ac_prog in gmake
15739do
15740  # Extract the first word of "$ac_prog", so it can be a program name with args.
15741set dummy $ac_prog; ac_word=$2
15742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15743$as_echo_n "checking for $ac_word... " >&6; }
15744if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15745  $as_echo_n "(cached) " >&6
15746else
15747  case $CHECK_GMAKE in
15748  [\\/]* | ?:[\\/]*)
15749  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15750  ;;
15751  *)
15752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15753for as_dir in $PATH
15754do
15755  IFS=$as_save_IFS
15756  test -z "$as_dir" && as_dir=.
15757    for ac_exec_ext in '' $ac_executable_extensions; do
15758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15759    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15761    break 2
15762  fi
15763done
15764  done
15765IFS=$as_save_IFS
15766
15767  ;;
15768esac
15769fi
15770CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15771if test -n "$CHECK_GMAKE"; then
15772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15773$as_echo "$CHECK_GMAKE" >&6; }
15774else
15775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15776$as_echo "no" >&6; }
15777fi
15778
15779
15780  test -n "$CHECK_GMAKE" && break
15781done
15782
15783
15784  MAKE_CANDIDATE=""$CHECK_GMAKE""
15785  DESCRIPTION="gmake in PATH"
15786
15787  # On Cygwin, we require a newer version of make than on other platforms
15788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15789    MAKE_VERSION_EXPR="-e 4\."
15790    MAKE_REQUIRED_VERSION="4.0"
15791   else
15792    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15793    MAKE_REQUIRED_VERSION="3.81"
15794  fi
15795
15796  if test "x$MAKE_CANDIDATE" != x; then
15797    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15798$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15799    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15800    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15801    if test "x$IS_GNU_MAKE" = x; then
15802      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15803$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15804    else
15805      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15806      if test "x$IS_MODERN_MAKE" = x; then
15807        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15808$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15809      else
15810        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15811          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15812            MAKE_EXPECTED_ENV='cygwin'
15813          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15814            MAKE_EXPECTED_ENV='msys'
15815          else
15816            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15817          fi
15818          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15819          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15820        else
15821          # Not relevant for non-Windows
15822          IS_MAKE_CORRECT_ENV=true
15823        fi
15824        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15825          { $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
15826$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;}
15827        else
15828          FOUND_MAKE=$MAKE_CANDIDATE
15829
15830  # Only process if variable expands to non-empty
15831
15832  if test "x$FOUND_MAKE" != x; then
15833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15834
15835  # First separate the path from the arguments. This will split at the first
15836  # space.
15837  complete="$FOUND_MAKE"
15838  path="${complete%% *}"
15839  tmp="$complete EOL"
15840  arguments="${tmp#* }"
15841
15842  # Input might be given as Windows format, start by converting to
15843  # unix format.
15844  new_path=`$CYGPATH -u "$path"`
15845
15846  # Now try to locate executable using which
15847  new_path=`$WHICH "$new_path" 2> /dev/null`
15848  # bat and cmd files are not always considered executable in cygwin causing which
15849  # to not find them
15850  if test "x$new_path" = x \
15851      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15852      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15853    new_path=`$CYGPATH -u "$path"`
15854  fi
15855  if test "x$new_path" = x; then
15856    # Oops. Which didn't find the executable.
15857    # The splitting of arguments from the executable at a space might have been incorrect,
15858    # since paths with space are more likely in Windows. Give it another try with the whole
15859    # argument.
15860    path="$complete"
15861    arguments="EOL"
15862    new_path=`$CYGPATH -u "$path"`
15863    new_path=`$WHICH "$new_path" 2> /dev/null`
15864    # bat and cmd files are not always considered executable in cygwin causing which
15865    # to not find them
15866    if test "x$new_path" = x \
15867        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15868        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15869      new_path=`$CYGPATH -u "$path"`
15870    fi
15871    if test "x$new_path" = x; then
15872      # It's still not found. Now this is an unrecoverable error.
15873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15874$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15875      has_space=`$ECHO "$complete" | $GREP " "`
15876      if test "x$has_space" != x; then
15877        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15878$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15879      fi
15880      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15881    fi
15882  fi
15883
15884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15887  # "foo.exe" is OK but "foo" is an error.
15888  #
15889  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15890  # It is also a way to make sure we got the proper file name for the real test later on.
15891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15892  if test "x$test_shortpath" = x; then
15893    # Short path failed, file does not exist as specified.
15894    # Try adding .exe or .cmd
15895    if test -f "${new_path}.exe"; then
15896      input_to_shortpath="${new_path}.exe"
15897    elif test -f "${new_path}.cmd"; then
15898      input_to_shortpath="${new_path}.cmd"
15899    else
15900      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15901$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15902      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15903$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15904      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15905    fi
15906  else
15907    input_to_shortpath="$new_path"
15908  fi
15909
15910  # Call helper function which possibly converts this using DOS-style short mode.
15911  # If so, the updated path is stored in $new_path.
15912  new_path="$input_to_shortpath"
15913
15914  input_path="$input_to_shortpath"
15915  # Check if we need to convert this using DOS-style short mode. If the path
15916  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15917  # take no chances and rewrite it.
15918  # Note: m4 eats our [], so we need to use [ and ] instead.
15919  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15920  if test "x$has_forbidden_chars" != x; then
15921    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15922    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15923    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15924    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15925      # Going to short mode and back again did indeed matter. Since short mode is
15926      # case insensitive, let's make it lowercase to improve readability.
15927      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15928      # Now convert it back to Unix-style (cygpath)
15929      input_path=`$CYGPATH -u "$shortmode_path"`
15930      new_path="$input_path"
15931    fi
15932  fi
15933
15934  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15935  if test "x$test_cygdrive_prefix" = x; then
15936    # As a simple fix, exclude /usr/bin since it's not a real path.
15937    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15938      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15939      # a path prefixed by /cygdrive for fixpath to work.
15940      new_path="$CYGWIN_ROOT_PATH$input_path"
15941    fi
15942  fi
15943
15944  # remove trailing .exe if any
15945  new_path="${new_path/%.exe/}"
15946
15947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15948
15949  # First separate the path from the arguments. This will split at the first
15950  # space.
15951  complete="$FOUND_MAKE"
15952  path="${complete%% *}"
15953  tmp="$complete EOL"
15954  arguments="${tmp#* }"
15955
15956  # Input might be given as Windows format, start by converting to
15957  # unix format.
15958  new_path="$path"
15959
15960  windows_path="$new_path"
15961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15962    unix_path=`$CYGPATH -u "$windows_path"`
15963    new_path="$unix_path"
15964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15966    new_path="$unix_path"
15967  fi
15968
15969
15970  # Now try to locate executable using which
15971  new_path=`$WHICH "$new_path" 2> /dev/null`
15972
15973  if test "x$new_path" = x; then
15974    # Oops. Which didn't find the executable.
15975    # The splitting of arguments from the executable at a space might have been incorrect,
15976    # since paths with space are more likely in Windows. Give it another try with the whole
15977    # argument.
15978    path="$complete"
15979    arguments="EOL"
15980    new_path="$path"
15981
15982  windows_path="$new_path"
15983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15984    unix_path=`$CYGPATH -u "$windows_path"`
15985    new_path="$unix_path"
15986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15988    new_path="$unix_path"
15989  fi
15990
15991
15992    new_path=`$WHICH "$new_path" 2> /dev/null`
15993    # bat and cmd files are not always considered executable in MSYS causing which
15994    # to not find them
15995    if test "x$new_path" = x \
15996        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15997        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15998      new_path="$path"
15999
16000  windows_path="$new_path"
16001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16002    unix_path=`$CYGPATH -u "$windows_path"`
16003    new_path="$unix_path"
16004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16006    new_path="$unix_path"
16007  fi
16008
16009    fi
16010
16011    if test "x$new_path" = x; then
16012      # It's still not found. Now this is an unrecoverable error.
16013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16014$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16015      has_space=`$ECHO "$complete" | $GREP " "`
16016      if test "x$has_space" != x; then
16017        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16018$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16019      fi
16020      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16021    fi
16022  fi
16023
16024  # Now new_path has a complete unix path to the binary
16025  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16026    # Keep paths in /bin as-is, but remove trailing .exe if any
16027    new_path="${new_path/%.exe/}"
16028    # Do not save /bin paths to all_fixpath_prefixes!
16029  else
16030    # Not in mixed or Windows style, start by that.
16031    new_path=`cmd //c echo $new_path`
16032
16033  input_path="$new_path"
16034  # Check if we need to convert this using DOS-style short mode. If the path
16035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16036  # take no chances and rewrite it.
16037  # Note: m4 eats our [], so we need to use [ and ] instead.
16038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16039  if test "x$has_forbidden_chars" != x; then
16040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16041    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16042  fi
16043
16044    # Output is in $new_path
16045
16046  windows_path="$new_path"
16047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16048    unix_path=`$CYGPATH -u "$windows_path"`
16049    new_path="$unix_path"
16050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16052    new_path="$unix_path"
16053  fi
16054
16055    # remove trailing .exe if any
16056    new_path="${new_path/%.exe/}"
16057
16058    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16059    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16060  fi
16061
16062    else
16063      # We're on a unix platform. Hooray! :)
16064      # First separate the path from the arguments. This will split at the first
16065      # space.
16066      complete="$FOUND_MAKE"
16067      path="${complete%% *}"
16068      tmp="$complete EOL"
16069      arguments="${tmp#* }"
16070
16071      # Cannot rely on the command "which" here since it doesn't always work.
16072      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16073      if test -z "$is_absolute_path"; then
16074        # Path to executable is not absolute. Find it.
16075        IFS_save="$IFS"
16076        IFS=:
16077        for p in $PATH; do
16078          if test -f "$p/$path" && test -x "$p/$path"; then
16079            new_path="$p/$path"
16080            break
16081          fi
16082        done
16083        IFS="$IFS_save"
16084      else
16085        # This is an absolute path, we can use it without further modifications.
16086        new_path="$path"
16087      fi
16088
16089      if test "x$new_path" = x; then
16090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16091$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16092        has_space=`$ECHO "$complete" | $GREP " "`
16093        if test "x$has_space" != x; then
16094          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16095$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16096        fi
16097        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16098      fi
16099    fi
16100
16101    # Now join together the path and the arguments once again
16102    if test "x$arguments" != xEOL; then
16103      new_complete="$new_path ${arguments% *}"
16104    else
16105      new_complete="$new_path"
16106    fi
16107
16108    if test "x$complete" != "x$new_complete"; then
16109      FOUND_MAKE="$new_complete"
16110      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16111$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16112    fi
16113  fi
16114
16115        fi
16116      fi
16117    fi
16118  fi
16119
16120
16121    if test "x$FOUND_MAKE" = x; then
16122      for ac_prog in make
16123do
16124  # Extract the first word of "$ac_prog", so it can be a program name with args.
16125set dummy $ac_prog; ac_word=$2
16126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16127$as_echo_n "checking for $ac_word... " >&6; }
16128if ${ac_cv_path_CHECK_MAKE+:} false; then :
16129  $as_echo_n "(cached) " >&6
16130else
16131  case $CHECK_MAKE in
16132  [\\/]* | ?:[\\/]*)
16133  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16134  ;;
16135  *)
16136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16137for as_dir in $PATH
16138do
16139  IFS=$as_save_IFS
16140  test -z "$as_dir" && as_dir=.
16141    for ac_exec_ext in '' $ac_executable_extensions; do
16142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16143    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16145    break 2
16146  fi
16147done
16148  done
16149IFS=$as_save_IFS
16150
16151  ;;
16152esac
16153fi
16154CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16155if test -n "$CHECK_MAKE"; then
16156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16157$as_echo "$CHECK_MAKE" >&6; }
16158else
16159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16160$as_echo "no" >&6; }
16161fi
16162
16163
16164  test -n "$CHECK_MAKE" && break
16165done
16166
16167
16168  MAKE_CANDIDATE=""$CHECK_MAKE""
16169  DESCRIPTION="make in PATH"
16170
16171  # On Cygwin, we require a newer version of make than on other platforms
16172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16173    MAKE_VERSION_EXPR="-e 4\."
16174    MAKE_REQUIRED_VERSION="4.0"
16175   else
16176    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16177    MAKE_REQUIRED_VERSION="3.81"
16178  fi
16179
16180  if test "x$MAKE_CANDIDATE" != x; then
16181    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16182$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16183    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16184    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16185    if test "x$IS_GNU_MAKE" = x; then
16186      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16187$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16188    else
16189      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16190      if test "x$IS_MODERN_MAKE" = x; then
16191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16192$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16193      else
16194        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16195          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16196            MAKE_EXPECTED_ENV='cygwin'
16197          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16198            MAKE_EXPECTED_ENV='msys'
16199          else
16200            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16201          fi
16202          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16203          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16204        else
16205          # Not relevant for non-Windows
16206          IS_MAKE_CORRECT_ENV=true
16207        fi
16208        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16209          { $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
16210$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;}
16211        else
16212          FOUND_MAKE=$MAKE_CANDIDATE
16213
16214  # Only process if variable expands to non-empty
16215
16216  if test "x$FOUND_MAKE" != x; then
16217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16218
16219  # First separate the path from the arguments. This will split at the first
16220  # space.
16221  complete="$FOUND_MAKE"
16222  path="${complete%% *}"
16223  tmp="$complete EOL"
16224  arguments="${tmp#* }"
16225
16226  # Input might be given as Windows format, start by converting to
16227  # unix format.
16228  new_path=`$CYGPATH -u "$path"`
16229
16230  # Now try to locate executable using which
16231  new_path=`$WHICH "$new_path" 2> /dev/null`
16232  # bat and cmd files are not always considered executable in cygwin causing which
16233  # to not find them
16234  if test "x$new_path" = x \
16235      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16236      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16237    new_path=`$CYGPATH -u "$path"`
16238  fi
16239  if test "x$new_path" = x; then
16240    # Oops. Which didn't find the executable.
16241    # The splitting of arguments from the executable at a space might have been incorrect,
16242    # since paths with space are more likely in Windows. Give it another try with the whole
16243    # argument.
16244    path="$complete"
16245    arguments="EOL"
16246    new_path=`$CYGPATH -u "$path"`
16247    new_path=`$WHICH "$new_path" 2> /dev/null`
16248    # bat and cmd files are not always considered executable in cygwin causing which
16249    # to not find them
16250    if test "x$new_path" = x \
16251        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16252        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16253      new_path=`$CYGPATH -u "$path"`
16254    fi
16255    if test "x$new_path" = x; then
16256      # It's still not found. Now this is an unrecoverable error.
16257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16259      has_space=`$ECHO "$complete" | $GREP " "`
16260      if test "x$has_space" != x; then
16261        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16262$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16263      fi
16264      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16265    fi
16266  fi
16267
16268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16271  # "foo.exe" is OK but "foo" is an error.
16272  #
16273  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16274  # It is also a way to make sure we got the proper file name for the real test later on.
16275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16276  if test "x$test_shortpath" = x; then
16277    # Short path failed, file does not exist as specified.
16278    # Try adding .exe or .cmd
16279    if test -f "${new_path}.exe"; then
16280      input_to_shortpath="${new_path}.exe"
16281    elif test -f "${new_path}.cmd"; then
16282      input_to_shortpath="${new_path}.cmd"
16283    else
16284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16285$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16286      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16287$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16288      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16289    fi
16290  else
16291    input_to_shortpath="$new_path"
16292  fi
16293
16294  # Call helper function which possibly converts this using DOS-style short mode.
16295  # If so, the updated path is stored in $new_path.
16296  new_path="$input_to_shortpath"
16297
16298  input_path="$input_to_shortpath"
16299  # Check if we need to convert this using DOS-style short mode. If the path
16300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16301  # take no chances and rewrite it.
16302  # Note: m4 eats our [], so we need to use [ and ] instead.
16303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16304  if test "x$has_forbidden_chars" != x; then
16305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16309      # Going to short mode and back again did indeed matter. Since short mode is
16310      # case insensitive, let's make it lowercase to improve readability.
16311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16312      # Now convert it back to Unix-style (cygpath)
16313      input_path=`$CYGPATH -u "$shortmode_path"`
16314      new_path="$input_path"
16315    fi
16316  fi
16317
16318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16319  if test "x$test_cygdrive_prefix" = x; then
16320    # As a simple fix, exclude /usr/bin since it's not a real path.
16321    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16323      # a path prefixed by /cygdrive for fixpath to work.
16324      new_path="$CYGWIN_ROOT_PATH$input_path"
16325    fi
16326  fi
16327
16328  # remove trailing .exe if any
16329  new_path="${new_path/%.exe/}"
16330
16331    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16332
16333  # First separate the path from the arguments. This will split at the first
16334  # space.
16335  complete="$FOUND_MAKE"
16336  path="${complete%% *}"
16337  tmp="$complete EOL"
16338  arguments="${tmp#* }"
16339
16340  # Input might be given as Windows format, start by converting to
16341  # unix format.
16342  new_path="$path"
16343
16344  windows_path="$new_path"
16345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16346    unix_path=`$CYGPATH -u "$windows_path"`
16347    new_path="$unix_path"
16348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16350    new_path="$unix_path"
16351  fi
16352
16353
16354  # Now try to locate executable using which
16355  new_path=`$WHICH "$new_path" 2> /dev/null`
16356
16357  if test "x$new_path" = x; then
16358    # Oops. Which didn't find the executable.
16359    # The splitting of arguments from the executable at a space might have been incorrect,
16360    # since paths with space are more likely in Windows. Give it another try with the whole
16361    # argument.
16362    path="$complete"
16363    arguments="EOL"
16364    new_path="$path"
16365
16366  windows_path="$new_path"
16367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16368    unix_path=`$CYGPATH -u "$windows_path"`
16369    new_path="$unix_path"
16370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16372    new_path="$unix_path"
16373  fi
16374
16375
16376    new_path=`$WHICH "$new_path" 2> /dev/null`
16377    # bat and cmd files are not always considered executable in MSYS causing which
16378    # to not find them
16379    if test "x$new_path" = x \
16380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16382      new_path="$path"
16383
16384  windows_path="$new_path"
16385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16386    unix_path=`$CYGPATH -u "$windows_path"`
16387    new_path="$unix_path"
16388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16390    new_path="$unix_path"
16391  fi
16392
16393    fi
16394
16395    if test "x$new_path" = x; then
16396      # It's still not found. Now this is an unrecoverable error.
16397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16398$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16399      has_space=`$ECHO "$complete" | $GREP " "`
16400      if test "x$has_space" != x; then
16401        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16402$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16403      fi
16404      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16405    fi
16406  fi
16407
16408  # Now new_path has a complete unix path to the binary
16409  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16410    # Keep paths in /bin as-is, but remove trailing .exe if any
16411    new_path="${new_path/%.exe/}"
16412    # Do not save /bin paths to all_fixpath_prefixes!
16413  else
16414    # Not in mixed or Windows style, start by that.
16415    new_path=`cmd //c echo $new_path`
16416
16417  input_path="$new_path"
16418  # Check if we need to convert this using DOS-style short mode. If the path
16419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16420  # take no chances and rewrite it.
16421  # Note: m4 eats our [], so we need to use [ and ] instead.
16422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16423  if test "x$has_forbidden_chars" != x; then
16424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16425    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16426  fi
16427
16428    # Output is in $new_path
16429
16430  windows_path="$new_path"
16431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16432    unix_path=`$CYGPATH -u "$windows_path"`
16433    new_path="$unix_path"
16434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16436    new_path="$unix_path"
16437  fi
16438
16439    # remove trailing .exe if any
16440    new_path="${new_path/%.exe/}"
16441
16442    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16443    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16444  fi
16445
16446    else
16447      # We're on a unix platform. Hooray! :)
16448      # First separate the path from the arguments. This will split at the first
16449      # space.
16450      complete="$FOUND_MAKE"
16451      path="${complete%% *}"
16452      tmp="$complete EOL"
16453      arguments="${tmp#* }"
16454
16455      # Cannot rely on the command "which" here since it doesn't always work.
16456      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16457      if test -z "$is_absolute_path"; then
16458        # Path to executable is not absolute. Find it.
16459        IFS_save="$IFS"
16460        IFS=:
16461        for p in $PATH; do
16462          if test -f "$p/$path" && test -x "$p/$path"; then
16463            new_path="$p/$path"
16464            break
16465          fi
16466        done
16467        IFS="$IFS_save"
16468      else
16469        # This is an absolute path, we can use it without further modifications.
16470        new_path="$path"
16471      fi
16472
16473      if test "x$new_path" = x; then
16474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16475$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16476        has_space=`$ECHO "$complete" | $GREP " "`
16477        if test "x$has_space" != x; then
16478          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16479$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16480        fi
16481        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16482      fi
16483    fi
16484
16485    # Now join together the path and the arguments once again
16486    if test "x$arguments" != xEOL; then
16487      new_complete="$new_path ${arguments% *}"
16488    else
16489      new_complete="$new_path"
16490    fi
16491
16492    if test "x$complete" != "x$new_complete"; then
16493      FOUND_MAKE="$new_complete"
16494      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16495$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16496    fi
16497  fi
16498
16499        fi
16500      fi
16501    fi
16502  fi
16503
16504    fi
16505
16506    if test "x$FOUND_MAKE" = x; then
16507      if test "x$TOOLCHAIN_PATH" != x; then
16508        # We have a toolchain path, check that as well before giving up.
16509        OLD_PATH=$PATH
16510        PATH=$TOOLCHAIN_PATH:$PATH
16511        for ac_prog in gmake
16512do
16513  # Extract the first word of "$ac_prog", so it can be a program name with args.
16514set dummy $ac_prog; ac_word=$2
16515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16516$as_echo_n "checking for $ac_word... " >&6; }
16517if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16518  $as_echo_n "(cached) " >&6
16519else
16520  case $CHECK_TOOLSDIR_GMAKE in
16521  [\\/]* | ?:[\\/]*)
16522  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16523  ;;
16524  *)
16525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16526for as_dir in $PATH
16527do
16528  IFS=$as_save_IFS
16529  test -z "$as_dir" && as_dir=.
16530    for ac_exec_ext in '' $ac_executable_extensions; do
16531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16532    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16534    break 2
16535  fi
16536done
16537  done
16538IFS=$as_save_IFS
16539
16540  ;;
16541esac
16542fi
16543CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16544if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16546$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16547else
16548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16549$as_echo "no" >&6; }
16550fi
16551
16552
16553  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16554done
16555
16556
16557  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16558  DESCRIPTION="gmake in tools-dir"
16559
16560  # On Cygwin, we require a newer version of make than on other platforms
16561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16562    MAKE_VERSION_EXPR="-e 4\."
16563    MAKE_REQUIRED_VERSION="4.0"
16564   else
16565    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16566    MAKE_REQUIRED_VERSION="3.81"
16567  fi
16568
16569  if test "x$MAKE_CANDIDATE" != x; then
16570    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16571$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16572    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16573    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16574    if test "x$IS_GNU_MAKE" = x; then
16575      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16576$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16577    else
16578      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16579      if test "x$IS_MODERN_MAKE" = x; then
16580        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16581$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16582      else
16583        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16584          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16585            MAKE_EXPECTED_ENV='cygwin'
16586          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16587            MAKE_EXPECTED_ENV='msys'
16588          else
16589            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16590          fi
16591          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16592          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16593        else
16594          # Not relevant for non-Windows
16595          IS_MAKE_CORRECT_ENV=true
16596        fi
16597        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16598          { $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
16599$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;}
16600        else
16601          FOUND_MAKE=$MAKE_CANDIDATE
16602
16603  # Only process if variable expands to non-empty
16604
16605  if test "x$FOUND_MAKE" != x; then
16606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16607
16608  # First separate the path from the arguments. This will split at the first
16609  # space.
16610  complete="$FOUND_MAKE"
16611  path="${complete%% *}"
16612  tmp="$complete EOL"
16613  arguments="${tmp#* }"
16614
16615  # Input might be given as Windows format, start by converting to
16616  # unix format.
16617  new_path=`$CYGPATH -u "$path"`
16618
16619  # Now try to locate executable using which
16620  new_path=`$WHICH "$new_path" 2> /dev/null`
16621  # bat and cmd files are not always considered executable in cygwin causing which
16622  # to not find them
16623  if test "x$new_path" = x \
16624      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16625      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16626    new_path=`$CYGPATH -u "$path"`
16627  fi
16628  if test "x$new_path" = x; then
16629    # Oops. Which didn't find the executable.
16630    # The splitting of arguments from the executable at a space might have been incorrect,
16631    # since paths with space are more likely in Windows. Give it another try with the whole
16632    # argument.
16633    path="$complete"
16634    arguments="EOL"
16635    new_path=`$CYGPATH -u "$path"`
16636    new_path=`$WHICH "$new_path" 2> /dev/null`
16637    # bat and cmd files are not always considered executable in cygwin causing which
16638    # to not find them
16639    if test "x$new_path" = x \
16640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16642      new_path=`$CYGPATH -u "$path"`
16643    fi
16644    if test "x$new_path" = x; then
16645      # It's still not found. Now this is an unrecoverable error.
16646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16647$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16648      has_space=`$ECHO "$complete" | $GREP " "`
16649      if test "x$has_space" != x; then
16650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16652      fi
16653      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16654    fi
16655  fi
16656
16657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16660  # "foo.exe" is OK but "foo" is an error.
16661  #
16662  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16663  # It is also a way to make sure we got the proper file name for the real test later on.
16664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16665  if test "x$test_shortpath" = x; then
16666    # Short path failed, file does not exist as specified.
16667    # Try adding .exe or .cmd
16668    if test -f "${new_path}.exe"; then
16669      input_to_shortpath="${new_path}.exe"
16670    elif test -f "${new_path}.cmd"; then
16671      input_to_shortpath="${new_path}.cmd"
16672    else
16673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16674$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16677      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16678    fi
16679  else
16680    input_to_shortpath="$new_path"
16681  fi
16682
16683  # Call helper function which possibly converts this using DOS-style short mode.
16684  # If so, the updated path is stored in $new_path.
16685  new_path="$input_to_shortpath"
16686
16687  input_path="$input_to_shortpath"
16688  # Check if we need to convert this using DOS-style short mode. If the path
16689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16690  # take no chances and rewrite it.
16691  # Note: m4 eats our [], so we need to use [ and ] instead.
16692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16693  if test "x$has_forbidden_chars" != x; then
16694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16698      # Going to short mode and back again did indeed matter. Since short mode is
16699      # case insensitive, let's make it lowercase to improve readability.
16700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16701      # Now convert it back to Unix-style (cygpath)
16702      input_path=`$CYGPATH -u "$shortmode_path"`
16703      new_path="$input_path"
16704    fi
16705  fi
16706
16707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16708  if test "x$test_cygdrive_prefix" = x; then
16709    # As a simple fix, exclude /usr/bin since it's not a real path.
16710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16712      # a path prefixed by /cygdrive for fixpath to work.
16713      new_path="$CYGWIN_ROOT_PATH$input_path"
16714    fi
16715  fi
16716
16717  # remove trailing .exe if any
16718  new_path="${new_path/%.exe/}"
16719
16720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16721
16722  # First separate the path from the arguments. This will split at the first
16723  # space.
16724  complete="$FOUND_MAKE"
16725  path="${complete%% *}"
16726  tmp="$complete EOL"
16727  arguments="${tmp#* }"
16728
16729  # Input might be given as Windows format, start by converting to
16730  # unix format.
16731  new_path="$path"
16732
16733  windows_path="$new_path"
16734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16735    unix_path=`$CYGPATH -u "$windows_path"`
16736    new_path="$unix_path"
16737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16739    new_path="$unix_path"
16740  fi
16741
16742
16743  # Now try to locate executable using which
16744  new_path=`$WHICH "$new_path" 2> /dev/null`
16745
16746  if test "x$new_path" = x; then
16747    # Oops. Which didn't find the executable.
16748    # The splitting of arguments from the executable at a space might have been incorrect,
16749    # since paths with space are more likely in Windows. Give it another try with the whole
16750    # argument.
16751    path="$complete"
16752    arguments="EOL"
16753    new_path="$path"
16754
16755  windows_path="$new_path"
16756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16757    unix_path=`$CYGPATH -u "$windows_path"`
16758    new_path="$unix_path"
16759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16761    new_path="$unix_path"
16762  fi
16763
16764
16765    new_path=`$WHICH "$new_path" 2> /dev/null`
16766    # bat and cmd files are not always considered executable in MSYS causing which
16767    # to not find them
16768    if test "x$new_path" = x \
16769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16771      new_path="$path"
16772
16773  windows_path="$new_path"
16774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16775    unix_path=`$CYGPATH -u "$windows_path"`
16776    new_path="$unix_path"
16777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16779    new_path="$unix_path"
16780  fi
16781
16782    fi
16783
16784    if test "x$new_path" = x; then
16785      # It's still not found. Now this is an unrecoverable error.
16786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16787$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16788      has_space=`$ECHO "$complete" | $GREP " "`
16789      if test "x$has_space" != x; then
16790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16792      fi
16793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16794    fi
16795  fi
16796
16797  # Now new_path has a complete unix path to the binary
16798  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16799    # Keep paths in /bin as-is, but remove trailing .exe if any
16800    new_path="${new_path/%.exe/}"
16801    # Do not save /bin paths to all_fixpath_prefixes!
16802  else
16803    # Not in mixed or Windows style, start by that.
16804    new_path=`cmd //c echo $new_path`
16805
16806  input_path="$new_path"
16807  # Check if we need to convert this using DOS-style short mode. If the path
16808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16809  # take no chances and rewrite it.
16810  # Note: m4 eats our [], so we need to use [ and ] instead.
16811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16812  if test "x$has_forbidden_chars" != x; then
16813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16815  fi
16816
16817    # Output is in $new_path
16818
16819  windows_path="$new_path"
16820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16821    unix_path=`$CYGPATH -u "$windows_path"`
16822    new_path="$unix_path"
16823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16825    new_path="$unix_path"
16826  fi
16827
16828    # remove trailing .exe if any
16829    new_path="${new_path/%.exe/}"
16830
16831    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16832    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16833  fi
16834
16835    else
16836      # We're on a unix platform. Hooray! :)
16837      # First separate the path from the arguments. This will split at the first
16838      # space.
16839      complete="$FOUND_MAKE"
16840      path="${complete%% *}"
16841      tmp="$complete EOL"
16842      arguments="${tmp#* }"
16843
16844      # Cannot rely on the command "which" here since it doesn't always work.
16845      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16846      if test -z "$is_absolute_path"; then
16847        # Path to executable is not absolute. Find it.
16848        IFS_save="$IFS"
16849        IFS=:
16850        for p in $PATH; do
16851          if test -f "$p/$path" && test -x "$p/$path"; then
16852            new_path="$p/$path"
16853            break
16854          fi
16855        done
16856        IFS="$IFS_save"
16857      else
16858        # This is an absolute path, we can use it without further modifications.
16859        new_path="$path"
16860      fi
16861
16862      if test "x$new_path" = x; then
16863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16864$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16865        has_space=`$ECHO "$complete" | $GREP " "`
16866        if test "x$has_space" != x; then
16867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16869        fi
16870        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16871      fi
16872    fi
16873
16874    # Now join together the path and the arguments once again
16875    if test "x$arguments" != xEOL; then
16876      new_complete="$new_path ${arguments% *}"
16877    else
16878      new_complete="$new_path"
16879    fi
16880
16881    if test "x$complete" != "x$new_complete"; then
16882      FOUND_MAKE="$new_complete"
16883      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16884$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16885    fi
16886  fi
16887
16888        fi
16889      fi
16890    fi
16891  fi
16892
16893        if test "x$FOUND_MAKE" = x; then
16894          for ac_prog in make
16895do
16896  # Extract the first word of "$ac_prog", so it can be a program name with args.
16897set dummy $ac_prog; ac_word=$2
16898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16899$as_echo_n "checking for $ac_word... " >&6; }
16900if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16901  $as_echo_n "(cached) " >&6
16902else
16903  case $CHECK_TOOLSDIR_MAKE in
16904  [\\/]* | ?:[\\/]*)
16905  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16906  ;;
16907  *)
16908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16909for as_dir in $PATH
16910do
16911  IFS=$as_save_IFS
16912  test -z "$as_dir" && as_dir=.
16913    for ac_exec_ext in '' $ac_executable_extensions; do
16914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16915    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16917    break 2
16918  fi
16919done
16920  done
16921IFS=$as_save_IFS
16922
16923  ;;
16924esac
16925fi
16926CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16927if test -n "$CHECK_TOOLSDIR_MAKE"; then
16928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16929$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16930else
16931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16932$as_echo "no" >&6; }
16933fi
16934
16935
16936  test -n "$CHECK_TOOLSDIR_MAKE" && break
16937done
16938
16939
16940  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16941  DESCRIPTION="make in tools-dir"
16942
16943  # On Cygwin, we require a newer version of make than on other platforms
16944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16945    MAKE_VERSION_EXPR="-e 4\."
16946    MAKE_REQUIRED_VERSION="4.0"
16947   else
16948    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16949    MAKE_REQUIRED_VERSION="3.81"
16950  fi
16951
16952  if test "x$MAKE_CANDIDATE" != x; then
16953    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16954$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16955    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16956    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16957    if test "x$IS_GNU_MAKE" = x; then
16958      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16959$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16960    else
16961      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16962      if test "x$IS_MODERN_MAKE" = x; then
16963        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16964$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16965      else
16966        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16967          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16968            MAKE_EXPECTED_ENV='cygwin'
16969          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16970            MAKE_EXPECTED_ENV='msys'
16971          else
16972            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16973          fi
16974          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16975          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16976        else
16977          # Not relevant for non-Windows
16978          IS_MAKE_CORRECT_ENV=true
16979        fi
16980        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16981          { $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
16982$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;}
16983        else
16984          FOUND_MAKE=$MAKE_CANDIDATE
16985
16986  # Only process if variable expands to non-empty
16987
16988  if test "x$FOUND_MAKE" != x; then
16989    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16990
16991  # First separate the path from the arguments. This will split at the first
16992  # space.
16993  complete="$FOUND_MAKE"
16994  path="${complete%% *}"
16995  tmp="$complete EOL"
16996  arguments="${tmp#* }"
16997
16998  # Input might be given as Windows format, start by converting to
16999  # unix format.
17000  new_path=`$CYGPATH -u "$path"`
17001
17002  # Now try to locate executable using which
17003  new_path=`$WHICH "$new_path" 2> /dev/null`
17004  # bat and cmd files are not always considered executable in cygwin causing which
17005  # to not find them
17006  if test "x$new_path" = x \
17007      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17008      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17009    new_path=`$CYGPATH -u "$path"`
17010  fi
17011  if test "x$new_path" = x; then
17012    # Oops. Which didn't find the executable.
17013    # The splitting of arguments from the executable at a space might have been incorrect,
17014    # since paths with space are more likely in Windows. Give it another try with the whole
17015    # argument.
17016    path="$complete"
17017    arguments="EOL"
17018    new_path=`$CYGPATH -u "$path"`
17019    new_path=`$WHICH "$new_path" 2> /dev/null`
17020    # bat and cmd files are not always considered executable in cygwin causing which
17021    # to not find them
17022    if test "x$new_path" = x \
17023        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17024        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17025      new_path=`$CYGPATH -u "$path"`
17026    fi
17027    if test "x$new_path" = x; then
17028      # It's still not found. Now this is an unrecoverable error.
17029      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17030$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17031      has_space=`$ECHO "$complete" | $GREP " "`
17032      if test "x$has_space" != x; then
17033        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17034$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17035      fi
17036      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17037    fi
17038  fi
17039
17040  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17041  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17042  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17043  # "foo.exe" is OK but "foo" is an error.
17044  #
17045  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17046  # It is also a way to make sure we got the proper file name for the real test later on.
17047  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17048  if test "x$test_shortpath" = x; then
17049    # Short path failed, file does not exist as specified.
17050    # Try adding .exe or .cmd
17051    if test -f "${new_path}.exe"; then
17052      input_to_shortpath="${new_path}.exe"
17053    elif test -f "${new_path}.cmd"; then
17054      input_to_shortpath="${new_path}.cmd"
17055    else
17056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17057$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17058      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17059$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17060      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17061    fi
17062  else
17063    input_to_shortpath="$new_path"
17064  fi
17065
17066  # Call helper function which possibly converts this using DOS-style short mode.
17067  # If so, the updated path is stored in $new_path.
17068  new_path="$input_to_shortpath"
17069
17070  input_path="$input_to_shortpath"
17071  # Check if we need to convert this using DOS-style short mode. If the path
17072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17073  # take no chances and rewrite it.
17074  # Note: m4 eats our [], so we need to use [ and ] instead.
17075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17076  if test "x$has_forbidden_chars" != x; then
17077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17078    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17079    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17080    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17081      # Going to short mode and back again did indeed matter. Since short mode is
17082      # case insensitive, let's make it lowercase to improve readability.
17083      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17084      # Now convert it back to Unix-style (cygpath)
17085      input_path=`$CYGPATH -u "$shortmode_path"`
17086      new_path="$input_path"
17087    fi
17088  fi
17089
17090  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17091  if test "x$test_cygdrive_prefix" = x; then
17092    # As a simple fix, exclude /usr/bin since it's not a real path.
17093    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17094      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17095      # a path prefixed by /cygdrive for fixpath to work.
17096      new_path="$CYGWIN_ROOT_PATH$input_path"
17097    fi
17098  fi
17099
17100  # remove trailing .exe if any
17101  new_path="${new_path/%.exe/}"
17102
17103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17104
17105  # First separate the path from the arguments. This will split at the first
17106  # space.
17107  complete="$FOUND_MAKE"
17108  path="${complete%% *}"
17109  tmp="$complete EOL"
17110  arguments="${tmp#* }"
17111
17112  # Input might be given as Windows format, start by converting to
17113  # unix format.
17114  new_path="$path"
17115
17116  windows_path="$new_path"
17117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17118    unix_path=`$CYGPATH -u "$windows_path"`
17119    new_path="$unix_path"
17120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17122    new_path="$unix_path"
17123  fi
17124
17125
17126  # Now try to locate executable using which
17127  new_path=`$WHICH "$new_path" 2> /dev/null`
17128
17129  if test "x$new_path" = x; then
17130    # Oops. Which didn't find the executable.
17131    # The splitting of arguments from the executable at a space might have been incorrect,
17132    # since paths with space are more likely in Windows. Give it another try with the whole
17133    # argument.
17134    path="$complete"
17135    arguments="EOL"
17136    new_path="$path"
17137
17138  windows_path="$new_path"
17139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17140    unix_path=`$CYGPATH -u "$windows_path"`
17141    new_path="$unix_path"
17142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17144    new_path="$unix_path"
17145  fi
17146
17147
17148    new_path=`$WHICH "$new_path" 2> /dev/null`
17149    # bat and cmd files are not always considered executable in MSYS causing which
17150    # to not find them
17151    if test "x$new_path" = x \
17152        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17153        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17154      new_path="$path"
17155
17156  windows_path="$new_path"
17157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17158    unix_path=`$CYGPATH -u "$windows_path"`
17159    new_path="$unix_path"
17160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17162    new_path="$unix_path"
17163  fi
17164
17165    fi
17166
17167    if test "x$new_path" = x; then
17168      # It's still not found. Now this is an unrecoverable error.
17169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17170$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17171      has_space=`$ECHO "$complete" | $GREP " "`
17172      if test "x$has_space" != x; then
17173        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17174$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17175      fi
17176      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17177    fi
17178  fi
17179
17180  # Now new_path has a complete unix path to the binary
17181  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17182    # Keep paths in /bin as-is, but remove trailing .exe if any
17183    new_path="${new_path/%.exe/}"
17184    # Do not save /bin paths to all_fixpath_prefixes!
17185  else
17186    # Not in mixed or Windows style, start by that.
17187    new_path=`cmd //c echo $new_path`
17188
17189  input_path="$new_path"
17190  # Check if we need to convert this using DOS-style short mode. If the path
17191  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17192  # take no chances and rewrite it.
17193  # Note: m4 eats our [], so we need to use [ and ] instead.
17194  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17195  if test "x$has_forbidden_chars" != x; then
17196    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17197    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17198  fi
17199
17200    # Output is in $new_path
17201
17202  windows_path="$new_path"
17203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17204    unix_path=`$CYGPATH -u "$windows_path"`
17205    new_path="$unix_path"
17206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17208    new_path="$unix_path"
17209  fi
17210
17211    # remove trailing .exe if any
17212    new_path="${new_path/%.exe/}"
17213
17214    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17215    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17216  fi
17217
17218    else
17219      # We're on a unix platform. Hooray! :)
17220      # First separate the path from the arguments. This will split at the first
17221      # space.
17222      complete="$FOUND_MAKE"
17223      path="${complete%% *}"
17224      tmp="$complete EOL"
17225      arguments="${tmp#* }"
17226
17227      # Cannot rely on the command "which" here since it doesn't always work.
17228      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17229      if test -z "$is_absolute_path"; then
17230        # Path to executable is not absolute. Find it.
17231        IFS_save="$IFS"
17232        IFS=:
17233        for p in $PATH; do
17234          if test -f "$p/$path" && test -x "$p/$path"; then
17235            new_path="$p/$path"
17236            break
17237          fi
17238        done
17239        IFS="$IFS_save"
17240      else
17241        # This is an absolute path, we can use it without further modifications.
17242        new_path="$path"
17243      fi
17244
17245      if test "x$new_path" = x; then
17246        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17247$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17248        has_space=`$ECHO "$complete" | $GREP " "`
17249        if test "x$has_space" != x; then
17250          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17251$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17252        fi
17253        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17254      fi
17255    fi
17256
17257    # Now join together the path and the arguments once again
17258    if test "x$arguments" != xEOL; then
17259      new_complete="$new_path ${arguments% *}"
17260    else
17261      new_complete="$new_path"
17262    fi
17263
17264    if test "x$complete" != "x$new_complete"; then
17265      FOUND_MAKE="$new_complete"
17266      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17267$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17268    fi
17269  fi
17270
17271        fi
17272      fi
17273    fi
17274  fi
17275
17276        fi
17277        PATH=$OLD_PATH
17278      fi
17279    fi
17280
17281    if test "x$FOUND_MAKE" = x; then
17282      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17283    fi
17284  fi
17285
17286  MAKE=$FOUND_MAKE
17287
17288  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17289$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17290
17291
17292  # Check if make supports the output sync option and if so, setup using it.
17293  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17294$as_echo_n "checking if make --output-sync is supported... " >&6; }
17295  if $MAKE --version -O > /dev/null 2>&1; then
17296    OUTPUT_SYNC_SUPPORTED=true
17297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17298$as_echo "yes" >&6; }
17299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17300$as_echo_n "checking for output-sync value... " >&6; }
17301
17302# Check whether --with-output-sync was given.
17303if test "${with_output_sync+set}" = set; then :
17304  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17305fi
17306
17307    if test "x$OUTPUT_SYNC" = "x"; then
17308      OUTPUT_SYNC=none
17309    fi
17310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17311$as_echo "$OUTPUT_SYNC" >&6; }
17312    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17313      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17314    fi
17315  else
17316    OUTPUT_SYNC_SUPPORTED=false
17317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17318$as_echo "no" >&6; }
17319  fi
17320
17321
17322
17323
17324
17325
17326  # Test if find supports -delete
17327  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17328$as_echo_n "checking if find supports -delete... " >&6; }
17329  FIND_DELETE="-delete"
17330
17331  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17332
17333  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17334
17335  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17336  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17337    # No, it does not.
17338    rm $DELETEDIR/TestIfFindSupportsDelete
17339    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17340      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17341      FIND_DELETE="-print | xargs rm"
17342    else
17343      FIND_DELETE="-exec rm \{\} \+"
17344    fi
17345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17346$as_echo "no" >&6; }
17347  else
17348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17349$as_echo "yes" >&6; }
17350  fi
17351  rmdir $DELETEDIR
17352
17353
17354
17355  # These tools might not be installed by default,
17356  # need hint on how to install them.
17357
17358
17359
17360  # Publish this variable in the help.
17361
17362
17363  if test "x$UNZIP" = x; then
17364    # The variable is not set by user, try to locate tool using the code snippet
17365    for ac_prog in unzip
17366do
17367  # Extract the first word of "$ac_prog", so it can be a program name with args.
17368set dummy $ac_prog; ac_word=$2
17369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17370$as_echo_n "checking for $ac_word... " >&6; }
17371if ${ac_cv_path_UNZIP+:} false; then :
17372  $as_echo_n "(cached) " >&6
17373else
17374  case $UNZIP in
17375  [\\/]* | ?:[\\/]*)
17376  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17377  ;;
17378  *)
17379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17380for as_dir in $PATH
17381do
17382  IFS=$as_save_IFS
17383  test -z "$as_dir" && as_dir=.
17384    for ac_exec_ext in '' $ac_executable_extensions; do
17385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17386    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17388    break 2
17389  fi
17390done
17391  done
17392IFS=$as_save_IFS
17393
17394  ;;
17395esac
17396fi
17397UNZIP=$ac_cv_path_UNZIP
17398if test -n "$UNZIP"; then
17399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17400$as_echo "$UNZIP" >&6; }
17401else
17402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17403$as_echo "no" >&6; }
17404fi
17405
17406
17407  test -n "$UNZIP" && break
17408done
17409
17410  else
17411    # The variable is set, but is it from the command line or the environment?
17412
17413    # Try to remove the string !UNZIP! from our list.
17414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17416      # If it failed, the variable was not from the command line. Ignore it,
17417      # but warn the user (except for BASH, which is always set by the calling BASH).
17418      if test "xUNZIP" != xBASH; then
17419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17420$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17421      fi
17422      # Try to locate tool using the code snippet
17423      for ac_prog in unzip
17424do
17425  # Extract the first word of "$ac_prog", so it can be a program name with args.
17426set dummy $ac_prog; ac_word=$2
17427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17428$as_echo_n "checking for $ac_word... " >&6; }
17429if ${ac_cv_path_UNZIP+:} false; then :
17430  $as_echo_n "(cached) " >&6
17431else
17432  case $UNZIP in
17433  [\\/]* | ?:[\\/]*)
17434  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17435  ;;
17436  *)
17437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17438for as_dir in $PATH
17439do
17440  IFS=$as_save_IFS
17441  test -z "$as_dir" && as_dir=.
17442    for ac_exec_ext in '' $ac_executable_extensions; do
17443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17444    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17446    break 2
17447  fi
17448done
17449  done
17450IFS=$as_save_IFS
17451
17452  ;;
17453esac
17454fi
17455UNZIP=$ac_cv_path_UNZIP
17456if test -n "$UNZIP"; then
17457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17458$as_echo "$UNZIP" >&6; }
17459else
17460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17461$as_echo "no" >&6; }
17462fi
17463
17464
17465  test -n "$UNZIP" && break
17466done
17467
17468    else
17469      # If it succeeded, then it was overridden by the user. We will use it
17470      # for the tool.
17471
17472      # First remove it from the list of overridden variables, so we can test
17473      # for unknown variables in the end.
17474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17475
17476      # Check if the provided tool contains a complete path.
17477      tool_specified="$UNZIP"
17478      tool_basename="${tool_specified##*/}"
17479      if test "x$tool_basename" = "x$tool_specified"; then
17480        # A command without a complete path is provided, search $PATH.
17481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17482$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17483        # Extract the first word of "$tool_basename", so it can be a program name with args.
17484set dummy $tool_basename; ac_word=$2
17485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17486$as_echo_n "checking for $ac_word... " >&6; }
17487if ${ac_cv_path_UNZIP+:} false; then :
17488  $as_echo_n "(cached) " >&6
17489else
17490  case $UNZIP in
17491  [\\/]* | ?:[\\/]*)
17492  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17493  ;;
17494  *)
17495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17496for as_dir in $PATH
17497do
17498  IFS=$as_save_IFS
17499  test -z "$as_dir" && as_dir=.
17500    for ac_exec_ext in '' $ac_executable_extensions; do
17501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17502    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17504    break 2
17505  fi
17506done
17507  done
17508IFS=$as_save_IFS
17509
17510  ;;
17511esac
17512fi
17513UNZIP=$ac_cv_path_UNZIP
17514if test -n "$UNZIP"; then
17515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17516$as_echo "$UNZIP" >&6; }
17517else
17518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17519$as_echo "no" >&6; }
17520fi
17521
17522
17523        if test "x$UNZIP" = x; then
17524          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17525        fi
17526      else
17527        # Otherwise we believe it is a complete path. Use it as it is.
17528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17529$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17531$as_echo_n "checking for UNZIP... " >&6; }
17532        if test ! -x "$tool_specified"; then
17533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17534$as_echo "not found" >&6; }
17535          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17536        fi
17537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17538$as_echo "$tool_specified" >&6; }
17539      fi
17540    fi
17541  fi
17542
17543
17544
17545  if test "x$UNZIP" = x; then
17546    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17547  fi
17548
17549
17550
17551
17552
17553  # Publish this variable in the help.
17554
17555
17556  if test "x$ZIP" = x; then
17557    # The variable is not set by user, try to locate tool using the code snippet
17558    for ac_prog in zip
17559do
17560  # Extract the first word of "$ac_prog", so it can be a program name with args.
17561set dummy $ac_prog; ac_word=$2
17562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17563$as_echo_n "checking for $ac_word... " >&6; }
17564if ${ac_cv_path_ZIP+:} false; then :
17565  $as_echo_n "(cached) " >&6
17566else
17567  case $ZIP in
17568  [\\/]* | ?:[\\/]*)
17569  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17570  ;;
17571  *)
17572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17573for as_dir in $PATH
17574do
17575  IFS=$as_save_IFS
17576  test -z "$as_dir" && as_dir=.
17577    for ac_exec_ext in '' $ac_executable_extensions; do
17578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17579    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17581    break 2
17582  fi
17583done
17584  done
17585IFS=$as_save_IFS
17586
17587  ;;
17588esac
17589fi
17590ZIP=$ac_cv_path_ZIP
17591if test -n "$ZIP"; then
17592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17593$as_echo "$ZIP" >&6; }
17594else
17595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17596$as_echo "no" >&6; }
17597fi
17598
17599
17600  test -n "$ZIP" && break
17601done
17602
17603  else
17604    # The variable is set, but is it from the command line or the environment?
17605
17606    # Try to remove the string !ZIP! from our list.
17607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17609      # If it failed, the variable was not from the command line. Ignore it,
17610      # but warn the user (except for BASH, which is always set by the calling BASH).
17611      if test "xZIP" != xBASH; then
17612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17613$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17614      fi
17615      # Try to locate tool using the code snippet
17616      for ac_prog in zip
17617do
17618  # Extract the first word of "$ac_prog", so it can be a program name with args.
17619set dummy $ac_prog; ac_word=$2
17620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17621$as_echo_n "checking for $ac_word... " >&6; }
17622if ${ac_cv_path_ZIP+:} false; then :
17623  $as_echo_n "(cached) " >&6
17624else
17625  case $ZIP in
17626  [\\/]* | ?:[\\/]*)
17627  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17628  ;;
17629  *)
17630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17631for as_dir in $PATH
17632do
17633  IFS=$as_save_IFS
17634  test -z "$as_dir" && as_dir=.
17635    for ac_exec_ext in '' $ac_executable_extensions; do
17636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17637    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17639    break 2
17640  fi
17641done
17642  done
17643IFS=$as_save_IFS
17644
17645  ;;
17646esac
17647fi
17648ZIP=$ac_cv_path_ZIP
17649if test -n "$ZIP"; then
17650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17651$as_echo "$ZIP" >&6; }
17652else
17653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17654$as_echo "no" >&6; }
17655fi
17656
17657
17658  test -n "$ZIP" && break
17659done
17660
17661    else
17662      # If it succeeded, then it was overridden by the user. We will use it
17663      # for the tool.
17664
17665      # First remove it from the list of overridden variables, so we can test
17666      # for unknown variables in the end.
17667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17668
17669      # Check if the provided tool contains a complete path.
17670      tool_specified="$ZIP"
17671      tool_basename="${tool_specified##*/}"
17672      if test "x$tool_basename" = "x$tool_specified"; then
17673        # A command without a complete path is provided, search $PATH.
17674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17675$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17676        # Extract the first word of "$tool_basename", so it can be a program name with args.
17677set dummy $tool_basename; ac_word=$2
17678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17679$as_echo_n "checking for $ac_word... " >&6; }
17680if ${ac_cv_path_ZIP+:} false; then :
17681  $as_echo_n "(cached) " >&6
17682else
17683  case $ZIP in
17684  [\\/]* | ?:[\\/]*)
17685  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17686  ;;
17687  *)
17688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17689for as_dir in $PATH
17690do
17691  IFS=$as_save_IFS
17692  test -z "$as_dir" && as_dir=.
17693    for ac_exec_ext in '' $ac_executable_extensions; do
17694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17695    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17697    break 2
17698  fi
17699done
17700  done
17701IFS=$as_save_IFS
17702
17703  ;;
17704esac
17705fi
17706ZIP=$ac_cv_path_ZIP
17707if test -n "$ZIP"; then
17708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17709$as_echo "$ZIP" >&6; }
17710else
17711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17712$as_echo "no" >&6; }
17713fi
17714
17715
17716        if test "x$ZIP" = x; then
17717          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17718        fi
17719      else
17720        # Otherwise we believe it is a complete path. Use it as it is.
17721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17722$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17724$as_echo_n "checking for ZIP... " >&6; }
17725        if test ! -x "$tool_specified"; then
17726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17727$as_echo "not found" >&6; }
17728          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17729        fi
17730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17731$as_echo "$tool_specified" >&6; }
17732      fi
17733    fi
17734  fi
17735
17736
17737
17738  if test "x$ZIP" = x; then
17739    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17740  fi
17741
17742
17743
17744  # Non-required basic tools
17745
17746
17747
17748  # Publish this variable in the help.
17749
17750
17751  if test "x$LDD" = x; then
17752    # The variable is not set by user, try to locate tool using the code snippet
17753    for ac_prog in ldd
17754do
17755  # Extract the first word of "$ac_prog", so it can be a program name with args.
17756set dummy $ac_prog; ac_word=$2
17757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17758$as_echo_n "checking for $ac_word... " >&6; }
17759if ${ac_cv_path_LDD+:} false; then :
17760  $as_echo_n "(cached) " >&6
17761else
17762  case $LDD in
17763  [\\/]* | ?:[\\/]*)
17764  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17765  ;;
17766  *)
17767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17768for as_dir in $PATH
17769do
17770  IFS=$as_save_IFS
17771  test -z "$as_dir" && as_dir=.
17772    for ac_exec_ext in '' $ac_executable_extensions; do
17773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17774    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17776    break 2
17777  fi
17778done
17779  done
17780IFS=$as_save_IFS
17781
17782  ;;
17783esac
17784fi
17785LDD=$ac_cv_path_LDD
17786if test -n "$LDD"; then
17787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17788$as_echo "$LDD" >&6; }
17789else
17790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17791$as_echo "no" >&6; }
17792fi
17793
17794
17795  test -n "$LDD" && break
17796done
17797
17798  else
17799    # The variable is set, but is it from the command line or the environment?
17800
17801    # Try to remove the string !LDD! from our list.
17802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17804      # If it failed, the variable was not from the command line. Ignore it,
17805      # but warn the user (except for BASH, which is always set by the calling BASH).
17806      if test "xLDD" != xBASH; then
17807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17808$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17809      fi
17810      # Try to locate tool using the code snippet
17811      for ac_prog in ldd
17812do
17813  # Extract the first word of "$ac_prog", so it can be a program name with args.
17814set dummy $ac_prog; ac_word=$2
17815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17816$as_echo_n "checking for $ac_word... " >&6; }
17817if ${ac_cv_path_LDD+:} false; then :
17818  $as_echo_n "(cached) " >&6
17819else
17820  case $LDD in
17821  [\\/]* | ?:[\\/]*)
17822  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17823  ;;
17824  *)
17825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17826for as_dir in $PATH
17827do
17828  IFS=$as_save_IFS
17829  test -z "$as_dir" && as_dir=.
17830    for ac_exec_ext in '' $ac_executable_extensions; do
17831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17832    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17834    break 2
17835  fi
17836done
17837  done
17838IFS=$as_save_IFS
17839
17840  ;;
17841esac
17842fi
17843LDD=$ac_cv_path_LDD
17844if test -n "$LDD"; then
17845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17846$as_echo "$LDD" >&6; }
17847else
17848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17849$as_echo "no" >&6; }
17850fi
17851
17852
17853  test -n "$LDD" && break
17854done
17855
17856    else
17857      # If it succeeded, then it was overridden by the user. We will use it
17858      # for the tool.
17859
17860      # First remove it from the list of overridden variables, so we can test
17861      # for unknown variables in the end.
17862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17863
17864      # Check if the provided tool contains a complete path.
17865      tool_specified="$LDD"
17866      tool_basename="${tool_specified##*/}"
17867      if test "x$tool_basename" = "x$tool_specified"; then
17868        # A command without a complete path is provided, search $PATH.
17869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17870$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17871        # Extract the first word of "$tool_basename", so it can be a program name with args.
17872set dummy $tool_basename; ac_word=$2
17873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17874$as_echo_n "checking for $ac_word... " >&6; }
17875if ${ac_cv_path_LDD+:} false; then :
17876  $as_echo_n "(cached) " >&6
17877else
17878  case $LDD in
17879  [\\/]* | ?:[\\/]*)
17880  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17881  ;;
17882  *)
17883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17884for as_dir in $PATH
17885do
17886  IFS=$as_save_IFS
17887  test -z "$as_dir" && as_dir=.
17888    for ac_exec_ext in '' $ac_executable_extensions; do
17889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17890    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17892    break 2
17893  fi
17894done
17895  done
17896IFS=$as_save_IFS
17897
17898  ;;
17899esac
17900fi
17901LDD=$ac_cv_path_LDD
17902if test -n "$LDD"; then
17903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17904$as_echo "$LDD" >&6; }
17905else
17906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17907$as_echo "no" >&6; }
17908fi
17909
17910
17911        if test "x$LDD" = x; then
17912          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17913        fi
17914      else
17915        # Otherwise we believe it is a complete path. Use it as it is.
17916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17917$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17919$as_echo_n "checking for LDD... " >&6; }
17920        if test ! -x "$tool_specified"; then
17921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17922$as_echo "not found" >&6; }
17923          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17924        fi
17925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17926$as_echo "$tool_specified" >&6; }
17927      fi
17928    fi
17929  fi
17930
17931
17932  if test "x$LDD" = "x"; then
17933    # List shared lib dependencies is used for
17934    # debug output and checking for forbidden dependencies.
17935    # We can build without it.
17936    LDD="true"
17937  fi
17938
17939
17940  # Publish this variable in the help.
17941
17942
17943  if test "x$OTOOL" = x; then
17944    # The variable is not set by user, try to locate tool using the code snippet
17945    for ac_prog in otool
17946do
17947  # Extract the first word of "$ac_prog", so it can be a program name with args.
17948set dummy $ac_prog; ac_word=$2
17949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17950$as_echo_n "checking for $ac_word... " >&6; }
17951if ${ac_cv_path_OTOOL+:} false; then :
17952  $as_echo_n "(cached) " >&6
17953else
17954  case $OTOOL in
17955  [\\/]* | ?:[\\/]*)
17956  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17957  ;;
17958  *)
17959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17960for as_dir in $PATH
17961do
17962  IFS=$as_save_IFS
17963  test -z "$as_dir" && as_dir=.
17964    for ac_exec_ext in '' $ac_executable_extensions; do
17965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17966    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17968    break 2
17969  fi
17970done
17971  done
17972IFS=$as_save_IFS
17973
17974  ;;
17975esac
17976fi
17977OTOOL=$ac_cv_path_OTOOL
17978if test -n "$OTOOL"; then
17979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17980$as_echo "$OTOOL" >&6; }
17981else
17982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17983$as_echo "no" >&6; }
17984fi
17985
17986
17987  test -n "$OTOOL" && break
17988done
17989
17990  else
17991    # The variable is set, but is it from the command line or the environment?
17992
17993    # Try to remove the string !OTOOL! from our list.
17994    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17995    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17996      # If it failed, the variable was not from the command line. Ignore it,
17997      # but warn the user (except for BASH, which is always set by the calling BASH).
17998      if test "xOTOOL" != xBASH; then
17999        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18000$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18001      fi
18002      # Try to locate tool using the code snippet
18003      for ac_prog in otool
18004do
18005  # Extract the first word of "$ac_prog", so it can be a program name with args.
18006set dummy $ac_prog; ac_word=$2
18007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18008$as_echo_n "checking for $ac_word... " >&6; }
18009if ${ac_cv_path_OTOOL+:} false; then :
18010  $as_echo_n "(cached) " >&6
18011else
18012  case $OTOOL in
18013  [\\/]* | ?:[\\/]*)
18014  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18015  ;;
18016  *)
18017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18018for as_dir in $PATH
18019do
18020  IFS=$as_save_IFS
18021  test -z "$as_dir" && as_dir=.
18022    for ac_exec_ext in '' $ac_executable_extensions; do
18023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18024    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18026    break 2
18027  fi
18028done
18029  done
18030IFS=$as_save_IFS
18031
18032  ;;
18033esac
18034fi
18035OTOOL=$ac_cv_path_OTOOL
18036if test -n "$OTOOL"; then
18037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18038$as_echo "$OTOOL" >&6; }
18039else
18040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18041$as_echo "no" >&6; }
18042fi
18043
18044
18045  test -n "$OTOOL" && break
18046done
18047
18048    else
18049      # If it succeeded, then it was overridden by the user. We will use it
18050      # for the tool.
18051
18052      # First remove it from the list of overridden variables, so we can test
18053      # for unknown variables in the end.
18054      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18055
18056      # Check if the provided tool contains a complete path.
18057      tool_specified="$OTOOL"
18058      tool_basename="${tool_specified##*/}"
18059      if test "x$tool_basename" = "x$tool_specified"; then
18060        # A command without a complete path is provided, search $PATH.
18061        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18062$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18063        # Extract the first word of "$tool_basename", so it can be a program name with args.
18064set dummy $tool_basename; ac_word=$2
18065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18066$as_echo_n "checking for $ac_word... " >&6; }
18067if ${ac_cv_path_OTOOL+:} false; then :
18068  $as_echo_n "(cached) " >&6
18069else
18070  case $OTOOL in
18071  [\\/]* | ?:[\\/]*)
18072  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18073  ;;
18074  *)
18075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18076for as_dir in $PATH
18077do
18078  IFS=$as_save_IFS
18079  test -z "$as_dir" && as_dir=.
18080    for ac_exec_ext in '' $ac_executable_extensions; do
18081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18082    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18084    break 2
18085  fi
18086done
18087  done
18088IFS=$as_save_IFS
18089
18090  ;;
18091esac
18092fi
18093OTOOL=$ac_cv_path_OTOOL
18094if test -n "$OTOOL"; then
18095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18096$as_echo "$OTOOL" >&6; }
18097else
18098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18099$as_echo "no" >&6; }
18100fi
18101
18102
18103        if test "x$OTOOL" = x; then
18104          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18105        fi
18106      else
18107        # Otherwise we believe it is a complete path. Use it as it is.
18108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18109$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18111$as_echo_n "checking for OTOOL... " >&6; }
18112        if test ! -x "$tool_specified"; then
18113          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18114$as_echo "not found" >&6; }
18115          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18116        fi
18117        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18118$as_echo "$tool_specified" >&6; }
18119      fi
18120    fi
18121  fi
18122
18123
18124  if test "x$OTOOL" = "x"; then
18125    OTOOL="true"
18126  fi
18127
18128
18129  # Publish this variable in the help.
18130
18131
18132  if test "x$READELF" = x; then
18133    # The variable is not set by user, try to locate tool using the code snippet
18134    for ac_prog in greadelf readelf
18135do
18136  # Extract the first word of "$ac_prog", so it can be a program name with args.
18137set dummy $ac_prog; ac_word=$2
18138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18139$as_echo_n "checking for $ac_word... " >&6; }
18140if ${ac_cv_path_READELF+:} false; then :
18141  $as_echo_n "(cached) " >&6
18142else
18143  case $READELF in
18144  [\\/]* | ?:[\\/]*)
18145  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18146  ;;
18147  *)
18148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18149for as_dir in $PATH
18150do
18151  IFS=$as_save_IFS
18152  test -z "$as_dir" && as_dir=.
18153    for ac_exec_ext in '' $ac_executable_extensions; do
18154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18155    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18157    break 2
18158  fi
18159done
18160  done
18161IFS=$as_save_IFS
18162
18163  ;;
18164esac
18165fi
18166READELF=$ac_cv_path_READELF
18167if test -n "$READELF"; then
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18169$as_echo "$READELF" >&6; }
18170else
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18172$as_echo "no" >&6; }
18173fi
18174
18175
18176  test -n "$READELF" && break
18177done
18178
18179  else
18180    # The variable is set, but is it from the command line or the environment?
18181
18182    # Try to remove the string !READELF! from our list.
18183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18185      # If it failed, the variable was not from the command line. Ignore it,
18186      # but warn the user (except for BASH, which is always set by the calling BASH).
18187      if test "xREADELF" != xBASH; then
18188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18189$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18190      fi
18191      # Try to locate tool using the code snippet
18192      for ac_prog in greadelf readelf
18193do
18194  # Extract the first word of "$ac_prog", so it can be a program name with args.
18195set dummy $ac_prog; ac_word=$2
18196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18197$as_echo_n "checking for $ac_word... " >&6; }
18198if ${ac_cv_path_READELF+:} false; then :
18199  $as_echo_n "(cached) " >&6
18200else
18201  case $READELF in
18202  [\\/]* | ?:[\\/]*)
18203  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18204  ;;
18205  *)
18206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18207for as_dir in $PATH
18208do
18209  IFS=$as_save_IFS
18210  test -z "$as_dir" && as_dir=.
18211    for ac_exec_ext in '' $ac_executable_extensions; do
18212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18213    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18215    break 2
18216  fi
18217done
18218  done
18219IFS=$as_save_IFS
18220
18221  ;;
18222esac
18223fi
18224READELF=$ac_cv_path_READELF
18225if test -n "$READELF"; then
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18227$as_echo "$READELF" >&6; }
18228else
18229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18230$as_echo "no" >&6; }
18231fi
18232
18233
18234  test -n "$READELF" && break
18235done
18236
18237    else
18238      # If it succeeded, then it was overridden by the user. We will use it
18239      # for the tool.
18240
18241      # First remove it from the list of overridden variables, so we can test
18242      # for unknown variables in the end.
18243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18244
18245      # Check if the provided tool contains a complete path.
18246      tool_specified="$READELF"
18247      tool_basename="${tool_specified##*/}"
18248      if test "x$tool_basename" = "x$tool_specified"; then
18249        # A command without a complete path is provided, search $PATH.
18250        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18251$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18252        # Extract the first word of "$tool_basename", so it can be a program name with args.
18253set dummy $tool_basename; ac_word=$2
18254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18255$as_echo_n "checking for $ac_word... " >&6; }
18256if ${ac_cv_path_READELF+:} false; then :
18257  $as_echo_n "(cached) " >&6
18258else
18259  case $READELF in
18260  [\\/]* | ?:[\\/]*)
18261  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18262  ;;
18263  *)
18264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18265for as_dir in $PATH
18266do
18267  IFS=$as_save_IFS
18268  test -z "$as_dir" && as_dir=.
18269    for ac_exec_ext in '' $ac_executable_extensions; do
18270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18271    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18273    break 2
18274  fi
18275done
18276  done
18277IFS=$as_save_IFS
18278
18279  ;;
18280esac
18281fi
18282READELF=$ac_cv_path_READELF
18283if test -n "$READELF"; then
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18285$as_echo "$READELF" >&6; }
18286else
18287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18288$as_echo "no" >&6; }
18289fi
18290
18291
18292        if test "x$READELF" = x; then
18293          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18294        fi
18295      else
18296        # Otherwise we believe it is a complete path. Use it as it is.
18297        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18298$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18299        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18300$as_echo_n "checking for READELF... " >&6; }
18301        if test ! -x "$tool_specified"; then
18302          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18303$as_echo "not found" >&6; }
18304          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18305        fi
18306        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18307$as_echo "$tool_specified" >&6; }
18308      fi
18309    fi
18310  fi
18311
18312
18313
18314
18315  # Publish this variable in the help.
18316
18317
18318  if test "x$HG" = x; then
18319    # The variable is not set by user, try to locate tool using the code snippet
18320    for ac_prog in hg
18321do
18322  # Extract the first word of "$ac_prog", so it can be a program name with args.
18323set dummy $ac_prog; ac_word=$2
18324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18325$as_echo_n "checking for $ac_word... " >&6; }
18326if ${ac_cv_path_HG+:} false; then :
18327  $as_echo_n "(cached) " >&6
18328else
18329  case $HG in
18330  [\\/]* | ?:[\\/]*)
18331  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18332  ;;
18333  *)
18334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18335for as_dir in $PATH
18336do
18337  IFS=$as_save_IFS
18338  test -z "$as_dir" && as_dir=.
18339    for ac_exec_ext in '' $ac_executable_extensions; do
18340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18341    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18343    break 2
18344  fi
18345done
18346  done
18347IFS=$as_save_IFS
18348
18349  ;;
18350esac
18351fi
18352HG=$ac_cv_path_HG
18353if test -n "$HG"; then
18354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18355$as_echo "$HG" >&6; }
18356else
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18358$as_echo "no" >&6; }
18359fi
18360
18361
18362  test -n "$HG" && break
18363done
18364
18365  else
18366    # The variable is set, but is it from the command line or the environment?
18367
18368    # Try to remove the string !HG! from our list.
18369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18371      # If it failed, the variable was not from the command line. Ignore it,
18372      # but warn the user (except for BASH, which is always set by the calling BASH).
18373      if test "xHG" != xBASH; then
18374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18375$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18376      fi
18377      # Try to locate tool using the code snippet
18378      for ac_prog in hg
18379do
18380  # Extract the first word of "$ac_prog", so it can be a program name with args.
18381set dummy $ac_prog; ac_word=$2
18382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18383$as_echo_n "checking for $ac_word... " >&6; }
18384if ${ac_cv_path_HG+:} false; then :
18385  $as_echo_n "(cached) " >&6
18386else
18387  case $HG in
18388  [\\/]* | ?:[\\/]*)
18389  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18390  ;;
18391  *)
18392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18393for as_dir in $PATH
18394do
18395  IFS=$as_save_IFS
18396  test -z "$as_dir" && as_dir=.
18397    for ac_exec_ext in '' $ac_executable_extensions; do
18398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18399    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18401    break 2
18402  fi
18403done
18404  done
18405IFS=$as_save_IFS
18406
18407  ;;
18408esac
18409fi
18410HG=$ac_cv_path_HG
18411if test -n "$HG"; then
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18413$as_echo "$HG" >&6; }
18414else
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18416$as_echo "no" >&6; }
18417fi
18418
18419
18420  test -n "$HG" && break
18421done
18422
18423    else
18424      # If it succeeded, then it was overridden by the user. We will use it
18425      # for the tool.
18426
18427      # First remove it from the list of overridden variables, so we can test
18428      # for unknown variables in the end.
18429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18430
18431      # Check if the provided tool contains a complete path.
18432      tool_specified="$HG"
18433      tool_basename="${tool_specified##*/}"
18434      if test "x$tool_basename" = "x$tool_specified"; then
18435        # A command without a complete path is provided, search $PATH.
18436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18437$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18438        # Extract the first word of "$tool_basename", so it can be a program name with args.
18439set dummy $tool_basename; ac_word=$2
18440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18441$as_echo_n "checking for $ac_word... " >&6; }
18442if ${ac_cv_path_HG+:} false; then :
18443  $as_echo_n "(cached) " >&6
18444else
18445  case $HG in
18446  [\\/]* | ?:[\\/]*)
18447  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18448  ;;
18449  *)
18450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18451for as_dir in $PATH
18452do
18453  IFS=$as_save_IFS
18454  test -z "$as_dir" && as_dir=.
18455    for ac_exec_ext in '' $ac_executable_extensions; do
18456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18457    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18459    break 2
18460  fi
18461done
18462  done
18463IFS=$as_save_IFS
18464
18465  ;;
18466esac
18467fi
18468HG=$ac_cv_path_HG
18469if test -n "$HG"; then
18470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18471$as_echo "$HG" >&6; }
18472else
18473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18474$as_echo "no" >&6; }
18475fi
18476
18477
18478        if test "x$HG" = x; then
18479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18480        fi
18481      else
18482        # Otherwise we believe it is a complete path. Use it as it is.
18483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18484$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18486$as_echo_n "checking for HG... " >&6; }
18487        if test ! -x "$tool_specified"; then
18488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18489$as_echo "not found" >&6; }
18490          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18491        fi
18492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18493$as_echo "$tool_specified" >&6; }
18494      fi
18495    fi
18496  fi
18497
18498
18499
18500
18501  # Publish this variable in the help.
18502
18503
18504  if test "x$STAT" = x; then
18505    # The variable is not set by user, try to locate tool using the code snippet
18506    for ac_prog in stat
18507do
18508  # Extract the first word of "$ac_prog", so it can be a program name with args.
18509set dummy $ac_prog; ac_word=$2
18510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18511$as_echo_n "checking for $ac_word... " >&6; }
18512if ${ac_cv_path_STAT+:} false; then :
18513  $as_echo_n "(cached) " >&6
18514else
18515  case $STAT in
18516  [\\/]* | ?:[\\/]*)
18517  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18518  ;;
18519  *)
18520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18521for as_dir in $PATH
18522do
18523  IFS=$as_save_IFS
18524  test -z "$as_dir" && as_dir=.
18525    for ac_exec_ext in '' $ac_executable_extensions; do
18526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18527    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18529    break 2
18530  fi
18531done
18532  done
18533IFS=$as_save_IFS
18534
18535  ;;
18536esac
18537fi
18538STAT=$ac_cv_path_STAT
18539if test -n "$STAT"; then
18540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18541$as_echo "$STAT" >&6; }
18542else
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18544$as_echo "no" >&6; }
18545fi
18546
18547
18548  test -n "$STAT" && break
18549done
18550
18551  else
18552    # The variable is set, but is it from the command line or the environment?
18553
18554    # Try to remove the string !STAT! from our list.
18555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18557      # If it failed, the variable was not from the command line. Ignore it,
18558      # but warn the user (except for BASH, which is always set by the calling BASH).
18559      if test "xSTAT" != xBASH; then
18560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18561$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18562      fi
18563      # Try to locate tool using the code snippet
18564      for ac_prog in stat
18565do
18566  # Extract the first word of "$ac_prog", so it can be a program name with args.
18567set dummy $ac_prog; ac_word=$2
18568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18569$as_echo_n "checking for $ac_word... " >&6; }
18570if ${ac_cv_path_STAT+:} false; then :
18571  $as_echo_n "(cached) " >&6
18572else
18573  case $STAT in
18574  [\\/]* | ?:[\\/]*)
18575  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18576  ;;
18577  *)
18578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18579for as_dir in $PATH
18580do
18581  IFS=$as_save_IFS
18582  test -z "$as_dir" && as_dir=.
18583    for ac_exec_ext in '' $ac_executable_extensions; do
18584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18585    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18587    break 2
18588  fi
18589done
18590  done
18591IFS=$as_save_IFS
18592
18593  ;;
18594esac
18595fi
18596STAT=$ac_cv_path_STAT
18597if test -n "$STAT"; then
18598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18599$as_echo "$STAT" >&6; }
18600else
18601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18602$as_echo "no" >&6; }
18603fi
18604
18605
18606  test -n "$STAT" && break
18607done
18608
18609    else
18610      # If it succeeded, then it was overridden by the user. We will use it
18611      # for the tool.
18612
18613      # First remove it from the list of overridden variables, so we can test
18614      # for unknown variables in the end.
18615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18616
18617      # Check if the provided tool contains a complete path.
18618      tool_specified="$STAT"
18619      tool_basename="${tool_specified##*/}"
18620      if test "x$tool_basename" = "x$tool_specified"; then
18621        # A command without a complete path is provided, search $PATH.
18622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18623$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18624        # Extract the first word of "$tool_basename", so it can be a program name with args.
18625set dummy $tool_basename; ac_word=$2
18626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18627$as_echo_n "checking for $ac_word... " >&6; }
18628if ${ac_cv_path_STAT+:} false; then :
18629  $as_echo_n "(cached) " >&6
18630else
18631  case $STAT in
18632  [\\/]* | ?:[\\/]*)
18633  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18634  ;;
18635  *)
18636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18637for as_dir in $PATH
18638do
18639  IFS=$as_save_IFS
18640  test -z "$as_dir" && as_dir=.
18641    for ac_exec_ext in '' $ac_executable_extensions; do
18642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18643    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18645    break 2
18646  fi
18647done
18648  done
18649IFS=$as_save_IFS
18650
18651  ;;
18652esac
18653fi
18654STAT=$ac_cv_path_STAT
18655if test -n "$STAT"; then
18656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18657$as_echo "$STAT" >&6; }
18658else
18659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18660$as_echo "no" >&6; }
18661fi
18662
18663
18664        if test "x$STAT" = x; then
18665          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18666        fi
18667      else
18668        # Otherwise we believe it is a complete path. Use it as it is.
18669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18670$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18672$as_echo_n "checking for STAT... " >&6; }
18673        if test ! -x "$tool_specified"; then
18674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18675$as_echo "not found" >&6; }
18676          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18677        fi
18678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18679$as_echo "$tool_specified" >&6; }
18680      fi
18681    fi
18682  fi
18683
18684
18685
18686
18687  # Publish this variable in the help.
18688
18689
18690  if test "x$TIME" = x; then
18691    # The variable is not set by user, try to locate tool using the code snippet
18692    for ac_prog in time
18693do
18694  # Extract the first word of "$ac_prog", so it can be a program name with args.
18695set dummy $ac_prog; ac_word=$2
18696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18697$as_echo_n "checking for $ac_word... " >&6; }
18698if ${ac_cv_path_TIME+:} false; then :
18699  $as_echo_n "(cached) " >&6
18700else
18701  case $TIME in
18702  [\\/]* | ?:[\\/]*)
18703  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18704  ;;
18705  *)
18706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18707for as_dir in $PATH
18708do
18709  IFS=$as_save_IFS
18710  test -z "$as_dir" && as_dir=.
18711    for ac_exec_ext in '' $ac_executable_extensions; do
18712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18713    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18715    break 2
18716  fi
18717done
18718  done
18719IFS=$as_save_IFS
18720
18721  ;;
18722esac
18723fi
18724TIME=$ac_cv_path_TIME
18725if test -n "$TIME"; then
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18727$as_echo "$TIME" >&6; }
18728else
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18730$as_echo "no" >&6; }
18731fi
18732
18733
18734  test -n "$TIME" && break
18735done
18736
18737  else
18738    # The variable is set, but is it from the command line or the environment?
18739
18740    # Try to remove the string !TIME! from our list.
18741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18743      # If it failed, the variable was not from the command line. Ignore it,
18744      # but warn the user (except for BASH, which is always set by the calling BASH).
18745      if test "xTIME" != xBASH; then
18746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18747$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18748      fi
18749      # Try to locate tool using the code snippet
18750      for ac_prog in time
18751do
18752  # Extract the first word of "$ac_prog", so it can be a program name with args.
18753set dummy $ac_prog; ac_word=$2
18754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18755$as_echo_n "checking for $ac_word... " >&6; }
18756if ${ac_cv_path_TIME+:} false; then :
18757  $as_echo_n "(cached) " >&6
18758else
18759  case $TIME in
18760  [\\/]* | ?:[\\/]*)
18761  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18762  ;;
18763  *)
18764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18765for as_dir in $PATH
18766do
18767  IFS=$as_save_IFS
18768  test -z "$as_dir" && as_dir=.
18769    for ac_exec_ext in '' $ac_executable_extensions; do
18770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18771    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18773    break 2
18774  fi
18775done
18776  done
18777IFS=$as_save_IFS
18778
18779  ;;
18780esac
18781fi
18782TIME=$ac_cv_path_TIME
18783if test -n "$TIME"; then
18784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18785$as_echo "$TIME" >&6; }
18786else
18787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18788$as_echo "no" >&6; }
18789fi
18790
18791
18792  test -n "$TIME" && break
18793done
18794
18795    else
18796      # If it succeeded, then it was overridden by the user. We will use it
18797      # for the tool.
18798
18799      # First remove it from the list of overridden variables, so we can test
18800      # for unknown variables in the end.
18801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18802
18803      # Check if the provided tool contains a complete path.
18804      tool_specified="$TIME"
18805      tool_basename="${tool_specified##*/}"
18806      if test "x$tool_basename" = "x$tool_specified"; then
18807        # A command without a complete path is provided, search $PATH.
18808        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18809$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18810        # Extract the first word of "$tool_basename", so it can be a program name with args.
18811set dummy $tool_basename; ac_word=$2
18812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18813$as_echo_n "checking for $ac_word... " >&6; }
18814if ${ac_cv_path_TIME+:} false; then :
18815  $as_echo_n "(cached) " >&6
18816else
18817  case $TIME in
18818  [\\/]* | ?:[\\/]*)
18819  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18820  ;;
18821  *)
18822  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18823for as_dir in $PATH
18824do
18825  IFS=$as_save_IFS
18826  test -z "$as_dir" && as_dir=.
18827    for ac_exec_ext in '' $ac_executable_extensions; do
18828  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18829    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18830    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18831    break 2
18832  fi
18833done
18834  done
18835IFS=$as_save_IFS
18836
18837  ;;
18838esac
18839fi
18840TIME=$ac_cv_path_TIME
18841if test -n "$TIME"; then
18842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18843$as_echo "$TIME" >&6; }
18844else
18845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18846$as_echo "no" >&6; }
18847fi
18848
18849
18850        if test "x$TIME" = x; then
18851          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18852        fi
18853      else
18854        # Otherwise we believe it is a complete path. Use it as it is.
18855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18856$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18858$as_echo_n "checking for TIME... " >&6; }
18859        if test ! -x "$tool_specified"; then
18860          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18861$as_echo "not found" >&6; }
18862          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18863        fi
18864        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18865$as_echo "$tool_specified" >&6; }
18866      fi
18867    fi
18868  fi
18869
18870
18871
18872
18873  # Publish this variable in the help.
18874
18875
18876  if test "x$PATCH" = x; then
18877    # The variable is not set by user, try to locate tool using the code snippet
18878    for ac_prog in gpatch patch
18879do
18880  # Extract the first word of "$ac_prog", so it can be a program name with args.
18881set dummy $ac_prog; ac_word=$2
18882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18883$as_echo_n "checking for $ac_word... " >&6; }
18884if ${ac_cv_path_PATCH+:} false; then :
18885  $as_echo_n "(cached) " >&6
18886else
18887  case $PATCH in
18888  [\\/]* | ?:[\\/]*)
18889  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18890  ;;
18891  *)
18892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18893for as_dir in $PATH
18894do
18895  IFS=$as_save_IFS
18896  test -z "$as_dir" && as_dir=.
18897    for ac_exec_ext in '' $ac_executable_extensions; do
18898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18899    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18901    break 2
18902  fi
18903done
18904  done
18905IFS=$as_save_IFS
18906
18907  ;;
18908esac
18909fi
18910PATCH=$ac_cv_path_PATCH
18911if test -n "$PATCH"; then
18912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18913$as_echo "$PATCH" >&6; }
18914else
18915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18916$as_echo "no" >&6; }
18917fi
18918
18919
18920  test -n "$PATCH" && break
18921done
18922
18923  else
18924    # The variable is set, but is it from the command line or the environment?
18925
18926    # Try to remove the string !PATCH! from our list.
18927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
18928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18929      # If it failed, the variable was not from the command line. Ignore it,
18930      # but warn the user (except for BASH, which is always set by the calling BASH).
18931      if test "xPATCH" != xBASH; then
18932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
18933$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
18934      fi
18935      # Try to locate tool using the code snippet
18936      for ac_prog in gpatch patch
18937do
18938  # Extract the first word of "$ac_prog", so it can be a program name with args.
18939set dummy $ac_prog; ac_word=$2
18940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18941$as_echo_n "checking for $ac_word... " >&6; }
18942if ${ac_cv_path_PATCH+:} false; then :
18943  $as_echo_n "(cached) " >&6
18944else
18945  case $PATCH in
18946  [\\/]* | ?:[\\/]*)
18947  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
18948  ;;
18949  *)
18950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18951for as_dir in $PATH
18952do
18953  IFS=$as_save_IFS
18954  test -z "$as_dir" && as_dir=.
18955    for ac_exec_ext in '' $ac_executable_extensions; do
18956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18957    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
18958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18959    break 2
18960  fi
18961done
18962  done
18963IFS=$as_save_IFS
18964
18965  ;;
18966esac
18967fi
18968PATCH=$ac_cv_path_PATCH
18969if test -n "$PATCH"; then
18970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
18971$as_echo "$PATCH" >&6; }
18972else
18973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18974$as_echo "no" >&6; }
18975fi
18976
18977
18978  test -n "$PATCH" && break
18979done
18980
18981    else
18982      # If it succeeded, then it was overridden by the user. We will use it
18983      # for the tool.
18984
18985      # First remove it from the list of overridden variables, so we can test
18986      # for unknown variables in the end.
18987      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18988
18989      # Check if the provided tool contains a complete path.
18990      tool_specified="$PATCH"
18991      tool_basename="${tool_specified##*/}"
18992      if test "x$tool_basename" = "x$tool_specified"; then
18993        # A command without a complete path is provided, search $PATH.
18994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
18995$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
18996        # Extract the first word of "$tool_basename", so it can be a program name with args.
18997set dummy $tool_basename; ac_word=$2
18998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18999$as_echo_n "checking for $ac_word... " >&6; }
19000if ${ac_cv_path_PATCH+:} false; then :
19001  $as_echo_n "(cached) " >&6
19002else
19003  case $PATCH in
19004  [\\/]* | ?:[\\/]*)
19005  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
19006  ;;
19007  *)
19008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19009for as_dir in $PATH
19010do
19011  IFS=$as_save_IFS
19012  test -z "$as_dir" && as_dir=.
19013    for ac_exec_ext in '' $ac_executable_extensions; do
19014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19015    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
19016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19017    break 2
19018  fi
19019done
19020  done
19021IFS=$as_save_IFS
19022
19023  ;;
19024esac
19025fi
19026PATCH=$ac_cv_path_PATCH
19027if test -n "$PATCH"; then
19028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
19029$as_echo "$PATCH" >&6; }
19030else
19031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19032$as_echo "no" >&6; }
19033fi
19034
19035
19036        if test "x$PATCH" = x; then
19037          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19038        fi
19039      else
19040        # Otherwise we believe it is a complete path. Use it as it is.
19041        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
19042$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
19043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
19044$as_echo_n "checking for PATCH... " >&6; }
19045        if test ! -x "$tool_specified"; then
19046          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19047$as_echo "not found" >&6; }
19048          as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
19049        fi
19050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19051$as_echo "$tool_specified" >&6; }
19052      fi
19053    fi
19054  fi
19055
19056
19057  # Check if it's GNU time
19058  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
19059  if test "x$IS_GNU_TIME" != x; then
19060    IS_GNU_TIME=yes
19061  else
19062    IS_GNU_TIME=no
19063  fi
19064
19065
19066  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
19067
19068
19069
19070  # Publish this variable in the help.
19071
19072
19073  if test "x$DSYMUTIL" = x; then
19074    # The variable is not set by user, try to locate tool using the code snippet
19075    for ac_prog in dsymutil
19076do
19077  # Extract the first word of "$ac_prog", so it can be a program name with args.
19078set dummy $ac_prog; ac_word=$2
19079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19080$as_echo_n "checking for $ac_word... " >&6; }
19081if ${ac_cv_path_DSYMUTIL+:} false; then :
19082  $as_echo_n "(cached) " >&6
19083else
19084  case $DSYMUTIL in
19085  [\\/]* | ?:[\\/]*)
19086  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19087  ;;
19088  *)
19089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19090for as_dir in $PATH
19091do
19092  IFS=$as_save_IFS
19093  test -z "$as_dir" && as_dir=.
19094    for ac_exec_ext in '' $ac_executable_extensions; do
19095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19096    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19098    break 2
19099  fi
19100done
19101  done
19102IFS=$as_save_IFS
19103
19104  ;;
19105esac
19106fi
19107DSYMUTIL=$ac_cv_path_DSYMUTIL
19108if test -n "$DSYMUTIL"; then
19109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19110$as_echo "$DSYMUTIL" >&6; }
19111else
19112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19113$as_echo "no" >&6; }
19114fi
19115
19116
19117  test -n "$DSYMUTIL" && break
19118done
19119
19120  else
19121    # The variable is set, but is it from the command line or the environment?
19122
19123    # Try to remove the string !DSYMUTIL! from our list.
19124    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
19125    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19126      # If it failed, the variable was not from the command line. Ignore it,
19127      # but warn the user (except for BASH, which is always set by the calling BASH).
19128      if test "xDSYMUTIL" != xBASH; then
19129        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
19130$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
19131      fi
19132      # Try to locate tool using the code snippet
19133      for ac_prog in dsymutil
19134do
19135  # Extract the first word of "$ac_prog", so it can be a program name with args.
19136set dummy $ac_prog; ac_word=$2
19137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19138$as_echo_n "checking for $ac_word... " >&6; }
19139if ${ac_cv_path_DSYMUTIL+:} false; then :
19140  $as_echo_n "(cached) " >&6
19141else
19142  case $DSYMUTIL in
19143  [\\/]* | ?:[\\/]*)
19144  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19145  ;;
19146  *)
19147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19148for as_dir in $PATH
19149do
19150  IFS=$as_save_IFS
19151  test -z "$as_dir" && as_dir=.
19152    for ac_exec_ext in '' $ac_executable_extensions; do
19153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19154    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19156    break 2
19157  fi
19158done
19159  done
19160IFS=$as_save_IFS
19161
19162  ;;
19163esac
19164fi
19165DSYMUTIL=$ac_cv_path_DSYMUTIL
19166if test -n "$DSYMUTIL"; then
19167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19168$as_echo "$DSYMUTIL" >&6; }
19169else
19170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19171$as_echo "no" >&6; }
19172fi
19173
19174
19175  test -n "$DSYMUTIL" && break
19176done
19177
19178    else
19179      # If it succeeded, then it was overridden by the user. We will use it
19180      # for the tool.
19181
19182      # First remove it from the list of overridden variables, so we can test
19183      # for unknown variables in the end.
19184      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19185
19186      # Check if the provided tool contains a complete path.
19187      tool_specified="$DSYMUTIL"
19188      tool_basename="${tool_specified##*/}"
19189      if test "x$tool_basename" = "x$tool_specified"; then
19190        # A command without a complete path is provided, search $PATH.
19191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19192$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19193        # Extract the first word of "$tool_basename", so it can be a program name with args.
19194set dummy $tool_basename; ac_word=$2
19195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19196$as_echo_n "checking for $ac_word... " >&6; }
19197if ${ac_cv_path_DSYMUTIL+:} false; then :
19198  $as_echo_n "(cached) " >&6
19199else
19200  case $DSYMUTIL in
19201  [\\/]* | ?:[\\/]*)
19202  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19203  ;;
19204  *)
19205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19206for as_dir in $PATH
19207do
19208  IFS=$as_save_IFS
19209  test -z "$as_dir" && as_dir=.
19210    for ac_exec_ext in '' $ac_executable_extensions; do
19211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19212    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19214    break 2
19215  fi
19216done
19217  done
19218IFS=$as_save_IFS
19219
19220  ;;
19221esac
19222fi
19223DSYMUTIL=$ac_cv_path_DSYMUTIL
19224if test -n "$DSYMUTIL"; then
19225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19226$as_echo "$DSYMUTIL" >&6; }
19227else
19228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19229$as_echo "no" >&6; }
19230fi
19231
19232
19233        if test "x$DSYMUTIL" = x; then
19234          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19235        fi
19236      else
19237        # Otherwise we believe it is a complete path. Use it as it is.
19238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19239$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19241$as_echo_n "checking for DSYMUTIL... " >&6; }
19242        if test ! -x "$tool_specified"; then
19243          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19244$as_echo "not found" >&6; }
19245          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19246        fi
19247        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19248$as_echo "$tool_specified" >&6; }
19249      fi
19250    fi
19251  fi
19252
19253
19254
19255  if test "x$DSYMUTIL" = x; then
19256    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19257  fi
19258
19259
19260
19261
19262
19263  # Publish this variable in the help.
19264
19265
19266  if test "x$XATTR" = x; then
19267    # The variable is not set by user, try to locate tool using the code snippet
19268    for ac_prog in xattr
19269do
19270  # Extract the first word of "$ac_prog", so it can be a program name with args.
19271set dummy $ac_prog; ac_word=$2
19272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19273$as_echo_n "checking for $ac_word... " >&6; }
19274if ${ac_cv_path_XATTR+:} false; then :
19275  $as_echo_n "(cached) " >&6
19276else
19277  case $XATTR in
19278  [\\/]* | ?:[\\/]*)
19279  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19280  ;;
19281  *)
19282  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19283for as_dir in $PATH
19284do
19285  IFS=$as_save_IFS
19286  test -z "$as_dir" && as_dir=.
19287    for ac_exec_ext in '' $ac_executable_extensions; do
19288  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19289    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19290    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19291    break 2
19292  fi
19293done
19294  done
19295IFS=$as_save_IFS
19296
19297  ;;
19298esac
19299fi
19300XATTR=$ac_cv_path_XATTR
19301if test -n "$XATTR"; then
19302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19303$as_echo "$XATTR" >&6; }
19304else
19305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19306$as_echo "no" >&6; }
19307fi
19308
19309
19310  test -n "$XATTR" && break
19311done
19312
19313  else
19314    # The variable is set, but is it from the command line or the environment?
19315
19316    # Try to remove the string !XATTR! from our list.
19317    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19318    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19319      # If it failed, the variable was not from the command line. Ignore it,
19320      # but warn the user (except for BASH, which is always set by the calling BASH).
19321      if test "xXATTR" != xBASH; then
19322        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19323$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19324      fi
19325      # Try to locate tool using the code snippet
19326      for ac_prog in xattr
19327do
19328  # Extract the first word of "$ac_prog", so it can be a program name with args.
19329set dummy $ac_prog; ac_word=$2
19330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19331$as_echo_n "checking for $ac_word... " >&6; }
19332if ${ac_cv_path_XATTR+:} false; then :
19333  $as_echo_n "(cached) " >&6
19334else
19335  case $XATTR in
19336  [\\/]* | ?:[\\/]*)
19337  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19338  ;;
19339  *)
19340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19341for as_dir in $PATH
19342do
19343  IFS=$as_save_IFS
19344  test -z "$as_dir" && as_dir=.
19345    for ac_exec_ext in '' $ac_executable_extensions; do
19346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19347    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19349    break 2
19350  fi
19351done
19352  done
19353IFS=$as_save_IFS
19354
19355  ;;
19356esac
19357fi
19358XATTR=$ac_cv_path_XATTR
19359if test -n "$XATTR"; then
19360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19361$as_echo "$XATTR" >&6; }
19362else
19363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19364$as_echo "no" >&6; }
19365fi
19366
19367
19368  test -n "$XATTR" && break
19369done
19370
19371    else
19372      # If it succeeded, then it was overridden by the user. We will use it
19373      # for the tool.
19374
19375      # First remove it from the list of overridden variables, so we can test
19376      # for unknown variables in the end.
19377      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19378
19379      # Check if the provided tool contains a complete path.
19380      tool_specified="$XATTR"
19381      tool_basename="${tool_specified##*/}"
19382      if test "x$tool_basename" = "x$tool_specified"; then
19383        # A command without a complete path is provided, search $PATH.
19384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19385$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19386        # Extract the first word of "$tool_basename", so it can be a program name with args.
19387set dummy $tool_basename; ac_word=$2
19388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19389$as_echo_n "checking for $ac_word... " >&6; }
19390if ${ac_cv_path_XATTR+:} false; then :
19391  $as_echo_n "(cached) " >&6
19392else
19393  case $XATTR in
19394  [\\/]* | ?:[\\/]*)
19395  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19396  ;;
19397  *)
19398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19399for as_dir in $PATH
19400do
19401  IFS=$as_save_IFS
19402  test -z "$as_dir" && as_dir=.
19403    for ac_exec_ext in '' $ac_executable_extensions; do
19404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19405    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19407    break 2
19408  fi
19409done
19410  done
19411IFS=$as_save_IFS
19412
19413  ;;
19414esac
19415fi
19416XATTR=$ac_cv_path_XATTR
19417if test -n "$XATTR"; then
19418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19419$as_echo "$XATTR" >&6; }
19420else
19421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19422$as_echo "no" >&6; }
19423fi
19424
19425
19426        if test "x$XATTR" = x; then
19427          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19428        fi
19429      else
19430        # Otherwise we believe it is a complete path. Use it as it is.
19431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19432$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19433        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19434$as_echo_n "checking for XATTR... " >&6; }
19435        if test ! -x "$tool_specified"; then
19436          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19437$as_echo "not found" >&6; }
19438          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19439        fi
19440        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19441$as_echo "$tool_specified" >&6; }
19442      fi
19443    fi
19444  fi
19445
19446
19447
19448  if test "x$XATTR" = x; then
19449    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19450  fi
19451
19452
19453
19454
19455  # Publish this variable in the help.
19456
19457
19458  if test "x$CODESIGN" = x; then
19459    # The variable is not set by user, try to locate tool using the code snippet
19460    for ac_prog in codesign
19461do
19462  # Extract the first word of "$ac_prog", so it can be a program name with args.
19463set dummy $ac_prog; ac_word=$2
19464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19465$as_echo_n "checking for $ac_word... " >&6; }
19466if ${ac_cv_path_CODESIGN+:} false; then :
19467  $as_echo_n "(cached) " >&6
19468else
19469  case $CODESIGN in
19470  [\\/]* | ?:[\\/]*)
19471  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19472  ;;
19473  *)
19474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19475for as_dir in $PATH
19476do
19477  IFS=$as_save_IFS
19478  test -z "$as_dir" && as_dir=.
19479    for ac_exec_ext in '' $ac_executable_extensions; do
19480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19481    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19483    break 2
19484  fi
19485done
19486  done
19487IFS=$as_save_IFS
19488
19489  ;;
19490esac
19491fi
19492CODESIGN=$ac_cv_path_CODESIGN
19493if test -n "$CODESIGN"; then
19494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19495$as_echo "$CODESIGN" >&6; }
19496else
19497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19498$as_echo "no" >&6; }
19499fi
19500
19501
19502  test -n "$CODESIGN" && break
19503done
19504
19505  else
19506    # The variable is set, but is it from the command line or the environment?
19507
19508    # Try to remove the string !CODESIGN! from our list.
19509    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19510    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19511      # If it failed, the variable was not from the command line. Ignore it,
19512      # but warn the user (except for BASH, which is always set by the calling BASH).
19513      if test "xCODESIGN" != xBASH; then
19514        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19515$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19516      fi
19517      # Try to locate tool using the code snippet
19518      for ac_prog in codesign
19519do
19520  # Extract the first word of "$ac_prog", so it can be a program name with args.
19521set dummy $ac_prog; ac_word=$2
19522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19523$as_echo_n "checking for $ac_word... " >&6; }
19524if ${ac_cv_path_CODESIGN+:} false; then :
19525  $as_echo_n "(cached) " >&6
19526else
19527  case $CODESIGN in
19528  [\\/]* | ?:[\\/]*)
19529  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19530  ;;
19531  *)
19532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19533for as_dir in $PATH
19534do
19535  IFS=$as_save_IFS
19536  test -z "$as_dir" && as_dir=.
19537    for ac_exec_ext in '' $ac_executable_extensions; do
19538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19539    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19541    break 2
19542  fi
19543done
19544  done
19545IFS=$as_save_IFS
19546
19547  ;;
19548esac
19549fi
19550CODESIGN=$ac_cv_path_CODESIGN
19551if test -n "$CODESIGN"; then
19552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19553$as_echo "$CODESIGN" >&6; }
19554else
19555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19556$as_echo "no" >&6; }
19557fi
19558
19559
19560  test -n "$CODESIGN" && break
19561done
19562
19563    else
19564      # If it succeeded, then it was overridden by the user. We will use it
19565      # for the tool.
19566
19567      # First remove it from the list of overridden variables, so we can test
19568      # for unknown variables in the end.
19569      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19570
19571      # Check if the provided tool contains a complete path.
19572      tool_specified="$CODESIGN"
19573      tool_basename="${tool_specified##*/}"
19574      if test "x$tool_basename" = "x$tool_specified"; then
19575        # A command without a complete path is provided, search $PATH.
19576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19577$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19578        # Extract the first word of "$tool_basename", so it can be a program name with args.
19579set dummy $tool_basename; ac_word=$2
19580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19581$as_echo_n "checking for $ac_word... " >&6; }
19582if ${ac_cv_path_CODESIGN+:} false; then :
19583  $as_echo_n "(cached) " >&6
19584else
19585  case $CODESIGN in
19586  [\\/]* | ?:[\\/]*)
19587  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19588  ;;
19589  *)
19590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19591for as_dir in $PATH
19592do
19593  IFS=$as_save_IFS
19594  test -z "$as_dir" && as_dir=.
19595    for ac_exec_ext in '' $ac_executable_extensions; do
19596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19597    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19599    break 2
19600  fi
19601done
19602  done
19603IFS=$as_save_IFS
19604
19605  ;;
19606esac
19607fi
19608CODESIGN=$ac_cv_path_CODESIGN
19609if test -n "$CODESIGN"; then
19610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19611$as_echo "$CODESIGN" >&6; }
19612else
19613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19614$as_echo "no" >&6; }
19615fi
19616
19617
19618        if test "x$CODESIGN" = x; then
19619          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19620        fi
19621      else
19622        # Otherwise we believe it is a complete path. Use it as it is.
19623        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19624$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19626$as_echo_n "checking for CODESIGN... " >&6; }
19627        if test ! -x "$tool_specified"; then
19628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19629$as_echo "not found" >&6; }
19630          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19631        fi
19632        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19633$as_echo "$tool_specified" >&6; }
19634      fi
19635    fi
19636  fi
19637
19638
19639    if test "x$CODESIGN" != "x"; then
19640      # Verify that the openjdk_codesign certificate is present
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19642$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19643      rm -f codesign-testfile
19644      touch codesign-testfile
19645      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19646      rm -f codesign-testfile
19647      if test "x$CODESIGN" = x; then
19648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19649$as_echo "no" >&6; }
19650      else
19651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19652$as_echo "yes" >&6; }
19653      fi
19654    fi
19655
19656
19657
19658  # Publish this variable in the help.
19659
19660
19661  if test "x$SETFILE" = x; then
19662    # The variable is not set by user, try to locate tool using the code snippet
19663    for ac_prog in SetFile
19664do
19665  # Extract the first word of "$ac_prog", so it can be a program name with args.
19666set dummy $ac_prog; ac_word=$2
19667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19668$as_echo_n "checking for $ac_word... " >&6; }
19669if ${ac_cv_path_SETFILE+:} false; then :
19670  $as_echo_n "(cached) " >&6
19671else
19672  case $SETFILE in
19673  [\\/]* | ?:[\\/]*)
19674  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19675  ;;
19676  *)
19677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19678for as_dir in $PATH
19679do
19680  IFS=$as_save_IFS
19681  test -z "$as_dir" && as_dir=.
19682    for ac_exec_ext in '' $ac_executable_extensions; do
19683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19684    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19686    break 2
19687  fi
19688done
19689  done
19690IFS=$as_save_IFS
19691
19692  ;;
19693esac
19694fi
19695SETFILE=$ac_cv_path_SETFILE
19696if test -n "$SETFILE"; then
19697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19698$as_echo "$SETFILE" >&6; }
19699else
19700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19701$as_echo "no" >&6; }
19702fi
19703
19704
19705  test -n "$SETFILE" && break
19706done
19707
19708  else
19709    # The variable is set, but is it from the command line or the environment?
19710
19711    # Try to remove the string !SETFILE! from our list.
19712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
19713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19714      # If it failed, the variable was not from the command line. Ignore it,
19715      # but warn the user (except for BASH, which is always set by the calling BASH).
19716      if test "xSETFILE" != xBASH; then
19717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
19718$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
19719      fi
19720      # Try to locate tool using the code snippet
19721      for ac_prog in SetFile
19722do
19723  # Extract the first word of "$ac_prog", so it can be a program name with args.
19724set dummy $ac_prog; ac_word=$2
19725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19726$as_echo_n "checking for $ac_word... " >&6; }
19727if ${ac_cv_path_SETFILE+:} false; then :
19728  $as_echo_n "(cached) " >&6
19729else
19730  case $SETFILE in
19731  [\\/]* | ?:[\\/]*)
19732  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19733  ;;
19734  *)
19735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19736for as_dir in $PATH
19737do
19738  IFS=$as_save_IFS
19739  test -z "$as_dir" && as_dir=.
19740    for ac_exec_ext in '' $ac_executable_extensions; do
19741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19742    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19744    break 2
19745  fi
19746done
19747  done
19748IFS=$as_save_IFS
19749
19750  ;;
19751esac
19752fi
19753SETFILE=$ac_cv_path_SETFILE
19754if test -n "$SETFILE"; then
19755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19756$as_echo "$SETFILE" >&6; }
19757else
19758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19759$as_echo "no" >&6; }
19760fi
19761
19762
19763  test -n "$SETFILE" && break
19764done
19765
19766    else
19767      # If it succeeded, then it was overridden by the user. We will use it
19768      # for the tool.
19769
19770      # First remove it from the list of overridden variables, so we can test
19771      # for unknown variables in the end.
19772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19773
19774      # Check if the provided tool contains a complete path.
19775      tool_specified="$SETFILE"
19776      tool_basename="${tool_specified##*/}"
19777      if test "x$tool_basename" = "x$tool_specified"; then
19778        # A command without a complete path is provided, search $PATH.
19779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
19780$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
19781        # Extract the first word of "$tool_basename", so it can be a program name with args.
19782set dummy $tool_basename; ac_word=$2
19783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19784$as_echo_n "checking for $ac_word... " >&6; }
19785if ${ac_cv_path_SETFILE+:} false; then :
19786  $as_echo_n "(cached) " >&6
19787else
19788  case $SETFILE in
19789  [\\/]* | ?:[\\/]*)
19790  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
19791  ;;
19792  *)
19793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19794for as_dir in $PATH
19795do
19796  IFS=$as_save_IFS
19797  test -z "$as_dir" && as_dir=.
19798    for ac_exec_ext in '' $ac_executable_extensions; do
19799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19800    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
19801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19802    break 2
19803  fi
19804done
19805  done
19806IFS=$as_save_IFS
19807
19808  ;;
19809esac
19810fi
19811SETFILE=$ac_cv_path_SETFILE
19812if test -n "$SETFILE"; then
19813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
19814$as_echo "$SETFILE" >&6; }
19815else
19816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19817$as_echo "no" >&6; }
19818fi
19819
19820
19821        if test "x$SETFILE" = x; then
19822          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19823        fi
19824      else
19825        # Otherwise we believe it is a complete path. Use it as it is.
19826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
19827$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
19828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
19829$as_echo_n "checking for SETFILE... " >&6; }
19830        if test ! -x "$tool_specified"; then
19831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19832$as_echo "not found" >&6; }
19833          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
19834        fi
19835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19836$as_echo "$tool_specified" >&6; }
19837      fi
19838    fi
19839  fi
19840
19841
19842
19843  if test "x$SETFILE" = x; then
19844    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
19845  fi
19846
19847
19848  fi
19849
19850
19851  # Test if bash supports pipefail.
19852  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19853$as_echo_n "checking if bash supports pipefail... " >&6; }
19854  if ${BASH} -c 'set -o pipefail'; then
19855    BASH_ARGS="$BASH_ARGS -o pipefail"
19856    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19857$as_echo "yes" >&6; }
19858  else
19859    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19860$as_echo "no" >&6; }
19861  fi
19862
19863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19864$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19865  if ${BASH} -e -c 'true'; then
19866    BASH_ARGS="$BASH_ARGS -e"
19867    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19868$as_echo "yes" >&6; }
19869  else
19870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19871$as_echo "no" >&6; }
19872  fi
19873
19874
19875
19876
19877# Check if pkg-config is available.
19878
19879
19880if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19881	if test -n "$ac_tool_prefix"; then
19882  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19883set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19885$as_echo_n "checking for $ac_word... " >&6; }
19886if ${ac_cv_path_PKG_CONFIG+:} false; then :
19887  $as_echo_n "(cached) " >&6
19888else
19889  case $PKG_CONFIG in
19890  [\\/]* | ?:[\\/]*)
19891  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19892  ;;
19893  *)
19894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19895for as_dir in $PATH
19896do
19897  IFS=$as_save_IFS
19898  test -z "$as_dir" && as_dir=.
19899    for ac_exec_ext in '' $ac_executable_extensions; do
19900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19901    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19903    break 2
19904  fi
19905done
19906  done
19907IFS=$as_save_IFS
19908
19909  ;;
19910esac
19911fi
19912PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19913if test -n "$PKG_CONFIG"; then
19914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19915$as_echo "$PKG_CONFIG" >&6; }
19916else
19917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19918$as_echo "no" >&6; }
19919fi
19920
19921
19922fi
19923if test -z "$ac_cv_path_PKG_CONFIG"; then
19924  ac_pt_PKG_CONFIG=$PKG_CONFIG
19925  # Extract the first word of "pkg-config", so it can be a program name with args.
19926set dummy pkg-config; ac_word=$2
19927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19928$as_echo_n "checking for $ac_word... " >&6; }
19929if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19930  $as_echo_n "(cached) " >&6
19931else
19932  case $ac_pt_PKG_CONFIG in
19933  [\\/]* | ?:[\\/]*)
19934  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19935  ;;
19936  *)
19937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19938for as_dir in $PATH
19939do
19940  IFS=$as_save_IFS
19941  test -z "$as_dir" && as_dir=.
19942    for ac_exec_ext in '' $ac_executable_extensions; do
19943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19944    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19946    break 2
19947  fi
19948done
19949  done
19950IFS=$as_save_IFS
19951
19952  ;;
19953esac
19954fi
19955ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19956if test -n "$ac_pt_PKG_CONFIG"; then
19957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19958$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19959else
19960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19961$as_echo "no" >&6; }
19962fi
19963
19964  if test "x$ac_pt_PKG_CONFIG" = x; then
19965    PKG_CONFIG=""
19966  else
19967    case $cross_compiling:$ac_tool_warned in
19968yes:)
19969{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19970$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19971ac_tool_warned=yes ;;
19972esac
19973    PKG_CONFIG=$ac_pt_PKG_CONFIG
19974  fi
19975else
19976  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19977fi
19978
19979fi
19980if test -n "$PKG_CONFIG"; then
19981	_pkg_min_version=0.9.0
19982	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19983$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19984	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19985		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19986$as_echo "yes" >&6; }
19987	else
19988		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19989$as_echo "no" >&6; }
19990		PKG_CONFIG=""
19991	fi
19992
19993fi
19994
19995# After basic tools have been setup, we can check build os specific details.
19996
19997  ###############################################################################
19998
19999  # Note that this is the build platform OS version!
20000
20001  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
20002  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
20003  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
20004  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
20005
20006
20007
20008
20009
20010# Setup builddeps, for automatic downloading of tools we need.
20011# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
20012# boot-jdk setup, but we need to have basic tools setup first.
20013
20014
20015# Check whether --with-builddeps-conf was given.
20016if test "${with_builddeps_conf+set}" = set; then :
20017  withval=$with_builddeps_conf;
20018fi
20019
20020
20021
20022# Check whether --with-builddeps-server was given.
20023if test "${with_builddeps_server+set}" = set; then :
20024  withval=$with_builddeps_server;
20025fi
20026
20027
20028
20029# Check whether --with-builddeps-dir was given.
20030if test "${with_builddeps_dir+set}" = set; then :
20031  withval=$with_builddeps_dir;
20032else
20033  with_builddeps_dir=/localhome/builddeps
20034fi
20035
20036
20037
20038# Check whether --with-builddeps-group was given.
20039if test "${with_builddeps_group+set}" = set; then :
20040  withval=$with_builddeps_group;
20041fi
20042
20043
20044
20045
20046  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20047    if test "x$with_builddeps_conf" != x; then
20048      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
20049$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
20050      builddepsfile=$with_builddeps_conf
20051      if test -s $builddepsfile; then
20052        . $builddepsfile
20053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
20054$as_echo "loaded!" >&6; }
20055      else
20056        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
20057      fi
20058    else
20059      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
20060$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
20061      builddepsfile=`mktemp`
20062      touch $builddepsfile
20063      # Put all found confs into a single file.
20064      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
20065      # Source the file to acquire the variables
20066      if test -s $builddepsfile; then
20067        . $builddepsfile
20068        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
20069$as_echo "found at least one!" >&6; }
20070      else
20071        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
20072      fi
20073    fi
20074    # Create build and target names that use _ instead of "-" and ".".
20075    # This is necessary to use them in variable names.
20076    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20077    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
20078    # Extract rewrite information for build and target
20079    eval rewritten_build=\${REWRITE_${build_var}}
20080    if test "x$rewritten_build" = x; then
20081      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
20082      echo Build stays the same $rewritten_build
20083    else
20084      echo Rewriting build for builddeps into $rewritten_build
20085    fi
20086    eval rewritten_target=\${REWRITE_${target_var}}
20087    if test "x$rewritten_target" = x; then
20088      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
20089      echo Target stays the same $rewritten_target
20090    else
20091      echo Rewriting target for builddeps into $rewritten_target
20092    fi
20093    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
20094    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
20095  fi
20096  for ac_prog in 7z unzip
20097do
20098  # Extract the first word of "$ac_prog", so it can be a program name with args.
20099set dummy $ac_prog; ac_word=$2
20100{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20101$as_echo_n "checking for $ac_word... " >&6; }
20102if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
20103  $as_echo_n "(cached) " >&6
20104else
20105  if test -n "$BDEPS_UNZIP"; then
20106  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
20107else
20108as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20109for as_dir in $PATH
20110do
20111  IFS=$as_save_IFS
20112  test -z "$as_dir" && as_dir=.
20113    for ac_exec_ext in '' $ac_executable_extensions; do
20114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20115    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
20116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20117    break 2
20118  fi
20119done
20120  done
20121IFS=$as_save_IFS
20122
20123fi
20124fi
20125BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
20126if test -n "$BDEPS_UNZIP"; then
20127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
20128$as_echo "$BDEPS_UNZIP" >&6; }
20129else
20130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20131$as_echo "no" >&6; }
20132fi
20133
20134
20135  test -n "$BDEPS_UNZIP" && break
20136done
20137
20138  if test "x$BDEPS_UNZIP" = x7z; then
20139    BDEPS_UNZIP="7z x"
20140  fi
20141
20142  for ac_prog in wget lftp ftp
20143do
20144  # Extract the first word of "$ac_prog", so it can be a program name with args.
20145set dummy $ac_prog; ac_word=$2
20146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20147$as_echo_n "checking for $ac_word... " >&6; }
20148if ${ac_cv_prog_BDEPS_FTP+:} false; then :
20149  $as_echo_n "(cached) " >&6
20150else
20151  if test -n "$BDEPS_FTP"; then
20152  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
20153else
20154as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20155for as_dir in $PATH
20156do
20157  IFS=$as_save_IFS
20158  test -z "$as_dir" && as_dir=.
20159    for ac_exec_ext in '' $ac_executable_extensions; do
20160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20161    ac_cv_prog_BDEPS_FTP="$ac_prog"
20162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20163    break 2
20164  fi
20165done
20166  done
20167IFS=$as_save_IFS
20168
20169fi
20170fi
20171BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
20172if test -n "$BDEPS_FTP"; then
20173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
20174$as_echo "$BDEPS_FTP" >&6; }
20175else
20176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20177$as_echo "no" >&6; }
20178fi
20179
20180
20181  test -n "$BDEPS_FTP" && break
20182done
20183
20184
20185
20186###############################################################################
20187#
20188# Determine OpenJDK variants, options and version numbers.
20189#
20190###############################################################################
20191
20192# We need build & target for this.
20193
20194
20195  ###############################################################################
20196  #
20197  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20198  # We always build headless support.
20199  #
20200  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20201$as_echo_n "checking headful support... " >&6; }
20202  # Check whether --enable-headful was given.
20203if test "${enable_headful+set}" = set; then :
20204  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20205else
20206  SUPPORT_HEADFUL=yes
20207fi
20208
20209
20210  SUPPORT_HEADLESS=yes
20211  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20212
20213  if test "x$SUPPORT_HEADFUL" = xyes; then
20214    # We are building both headful and headless.
20215    headful_msg="include support for both headful and headless"
20216  fi
20217
20218  if test "x$SUPPORT_HEADFUL" = xno; then
20219    # Thus we are building headless only.
20220    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20221    headful_msg="headless only"
20222  fi
20223
20224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20225$as_echo "$headful_msg" >&6; }
20226
20227
20228
20229
20230
20231  # Control wether Hotspot runs Queens test after build.
20232  # Check whether --enable-hotspot-test-in-build was given.
20233if test "${enable_hotspot_test_in_build+set}" = set; then :
20234  enableval=$enable_hotspot_test_in_build;
20235else
20236  enable_hotspot_test_in_build=no
20237fi
20238
20239  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20240    TEST_IN_BUILD=true
20241  else
20242    TEST_IN_BUILD=false
20243  fi
20244
20245
20246  ###############################################################################
20247  #
20248  # Choose cacerts source file
20249  #
20250
20251# Check whether --with-cacerts-file was given.
20252if test "${with_cacerts_file+set}" = set; then :
20253  withval=$with_cacerts_file;
20254fi
20255
20256  if test "x$with_cacerts_file" != x; then
20257    CACERTS_FILE=$with_cacerts_file
20258  fi
20259
20260
20261  ###############################################################################
20262  #
20263  # Enable or disable unlimited crypto
20264  #
20265  # Check whether --enable-unlimited-crypto was given.
20266if test "${enable_unlimited_crypto+set}" = set; then :
20267  enableval=$enable_unlimited_crypto;
20268else
20269  enable_unlimited_crypto=no
20270fi
20271
20272  if test "x$enable_unlimited_crypto" = "xyes"; then
20273    UNLIMITED_CRYPTO=true
20274  else
20275    UNLIMITED_CRYPTO=false
20276  fi
20277
20278
20279  ###############################################################################
20280  #
20281  # Enable or disable the elliptic curve crypto implementation
20282  #
20283
20284
20285  ###############################################################################
20286  #
20287  # Compress jars
20288  #
20289  COMPRESS_JARS=false
20290
20291
20292
20293
20294  # Source the version numbers
20295  . $AUTOCONF_DIR/version-numbers
20296
20297  # Get the settings from parameters
20298
20299# Check whether --with-milestone was given.
20300if test "${with_milestone+set}" = set; then :
20301  withval=$with_milestone;
20302fi
20303
20304  if test "x$with_milestone" = xyes; then
20305    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20306  elif test "x$with_milestone" != x; then
20307    MILESTONE="$with_milestone"
20308  fi
20309  if test "x$MILESTONE" = x; then
20310    MILESTONE=internal
20311  fi
20312
20313
20314# Check whether --with-update-version was given.
20315if test "${with_update_version+set}" = set; then :
20316  withval=$with_update_version;
20317fi
20318
20319  if test "x$with_update_version" = xyes; then
20320    as_fn_error $? "Update version must have a value" "$LINENO" 5
20321  elif test "x$with_update_version" != x; then
20322    JDK_UPDATE_VERSION="$with_update_version"
20323    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20324    # to a bug in expr (which reduces it to just X). To work around this, we
20325    # always add a 0 to one digit update versions.
20326    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20327      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20328    fi
20329  fi
20330
20331
20332# Check whether --with-user-release-suffix was given.
20333if test "${with_user_release_suffix+set}" = set; then :
20334  withval=$with_user_release_suffix;
20335fi
20336
20337  if test "x$with_user_release_suffix" = xyes; then
20338    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20339  elif test "x$with_user_release_suffix" != x; then
20340    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20341  fi
20342
20343
20344# Check whether --with-build-number was given.
20345if test "${with_build_number+set}" = set; then :
20346  withval=$with_build_number;
20347fi
20348
20349  if test "x$with_build_number" = xyes; then
20350    as_fn_error $? "Build number must have a value" "$LINENO" 5
20351  elif test "x$with_build_number" != x; then
20352    JDK_BUILD_NUMBER="$with_build_number"
20353  fi
20354  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20355  if test "x$JDK_BUILD_NUMBER" = x; then
20356    JDK_BUILD_NUMBER=b00
20357    if test "x$USER_RELEASE_SUFFIX" = x; then
20358      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20359      # Avoid [:alnum:] since it depends on the locale.
20360      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20361      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20362    fi
20363  fi
20364
20365  # Now set the JDK version, milestone, build number etc.
20366
20367
20368
20369
20370
20371
20372
20373
20374
20375
20376
20377
20378
20379
20380
20381
20382# Check whether --with-copyright-year was given.
20383if test "${with_copyright_year+set}" = set; then :
20384  withval=$with_copyright_year;
20385fi
20386
20387  if test "x$with_copyright_year" = xyes; then
20388    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20389  elif test "x$with_copyright_year" != x; then
20390    COPYRIGHT_YEAR="$with_copyright_year"
20391  else
20392    COPYRIGHT_YEAR=`date +'%Y'`
20393  fi
20394
20395
20396  if test "x$JDK_UPDATE_VERSION" != x; then
20397    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20398  else
20399    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20400  fi
20401
20402
20403  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20404
20405
20406
20407###############################################################################
20408#
20409# Setup BootJDK, used to bootstrap the build.
20410#
20411###############################################################################
20412
20413
20414  BOOT_JDK_FOUND=no
20415
20416# Check whether --with-boot-jdk was given.
20417if test "${with_boot_jdk+set}" = set; then :
20418  withval=$with_boot_jdk;
20419fi
20420
20421
20422  # We look for the Boot JDK through various means, going from more certain to
20423  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20424  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20425  # must check if this is indeed valid; otherwise we'll continue looking.
20426
20427  # Test: Is bootjdk explicitely set by command line arguments?
20428
20429  if test "x$BOOT_JDK_FOUND" = xno; then
20430    # Now execute the test
20431
20432  if test "x$with_boot_jdk" != x; then
20433    BOOT_JDK=$with_boot_jdk
20434    BOOT_JDK_FOUND=maybe
20435    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20436$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20437  fi
20438
20439
20440    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20441    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20442      # Do we have a bin/java?
20443      if test ! -x "$BOOT_JDK/bin/java"; then
20444        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20446        BOOT_JDK_FOUND=no
20447      else
20448        # Do we have a bin/javac?
20449        if test ! -x "$BOOT_JDK/bin/javac"; then
20450          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20451$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20452          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20453$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20454          BOOT_JDK_FOUND=no
20455        else
20456          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20457          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20458
20459          # Extra M4 quote needed to protect [] in grep expression.
20460          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20461          if test "x$FOUND_CORRECT_VERSION" = x; then
20462            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20463$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20464            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20465$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20466            BOOT_JDK_FOUND=no
20467          else
20468            # We're done! :-)
20469            BOOT_JDK_FOUND=yes
20470
20471  # Only process if variable expands to non-empty
20472
20473  if test "x$BOOT_JDK" != x; then
20474    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20475
20476  # Input might be given as Windows format, start by converting to
20477  # unix format.
20478  path="$BOOT_JDK"
20479  new_path=`$CYGPATH -u "$path"`
20480
20481  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20482  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20483  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20484  # "foo.exe" is OK but "foo" is an error.
20485  #
20486  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20487  # It is also a way to make sure we got the proper file name for the real test later on.
20488  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20489  if test "x$test_shortpath" = x; then
20490    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20491$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20492    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20493  fi
20494
20495  # Call helper function which possibly converts this using DOS-style short mode.
20496  # If so, the updated path is stored in $new_path.
20497
20498  input_path="$new_path"
20499  # Check if we need to convert this using DOS-style short mode. If the path
20500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20501  # take no chances and rewrite it.
20502  # Note: m4 eats our [], so we need to use [ and ] instead.
20503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20504  if test "x$has_forbidden_chars" != x; then
20505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20509      # Going to short mode and back again did indeed matter. Since short mode is
20510      # case insensitive, let's make it lowercase to improve readability.
20511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20512      # Now convert it back to Unix-style (cygpath)
20513      input_path=`$CYGPATH -u "$shortmode_path"`
20514      new_path="$input_path"
20515    fi
20516  fi
20517
20518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20519  if test "x$test_cygdrive_prefix" = x; then
20520    # As a simple fix, exclude /usr/bin since it's not a real path.
20521    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20523      # a path prefixed by /cygdrive for fixpath to work.
20524      new_path="$CYGWIN_ROOT_PATH$input_path"
20525    fi
20526  fi
20527
20528
20529  if test "x$path" != "x$new_path"; then
20530    BOOT_JDK="$new_path"
20531    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20532$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20533  fi
20534
20535    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20536
20537  path="$BOOT_JDK"
20538  has_colon=`$ECHO $path | $GREP ^.:`
20539  new_path="$path"
20540  if test "x$has_colon" = x; then
20541    # Not in mixed or Windows style, start by that.
20542    new_path=`cmd //c echo $path`
20543  fi
20544
20545
20546  input_path="$new_path"
20547  # Check if we need to convert this using DOS-style short mode. If the path
20548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20549  # take no chances and rewrite it.
20550  # Note: m4 eats our [], so we need to use [ and ] instead.
20551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20552  if test "x$has_forbidden_chars" != x; then
20553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20555  fi
20556
20557
20558  windows_path="$new_path"
20559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20560    unix_path=`$CYGPATH -u "$windows_path"`
20561    new_path="$unix_path"
20562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20564    new_path="$unix_path"
20565  fi
20566
20567  if test "x$path" != "x$new_path"; then
20568    BOOT_JDK="$new_path"
20569    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20570$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20571  fi
20572
20573  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20574  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20575
20576    else
20577      # We're on a unix platform. Hooray! :)
20578      path="$BOOT_JDK"
20579      has_space=`$ECHO "$path" | $GREP " "`
20580      if test "x$has_space" != x; then
20581        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20582$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20583        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20584      fi
20585
20586      # Use eval to expand a potential ~
20587      eval path="$path"
20588      if test ! -f "$path" && test ! -d "$path"; then
20589        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20590      fi
20591
20592      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20593    fi
20594  fi
20595
20596            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20597$as_echo_n "checking for Boot JDK... " >&6; }
20598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20599$as_echo "$BOOT_JDK" >&6; }
20600            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20601$as_echo_n "checking Boot JDK version... " >&6; }
20602            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20603            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20604$as_echo "$BOOT_JDK_VERSION" >&6; }
20605          fi # end check jdk version
20606        fi # end check javac
20607      fi # end check java
20608    fi # end check boot jdk found
20609  fi
20610
20611  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20612    # Having specified an argument which is incorrect will produce an instant failure;
20613    # we should not go on looking
20614    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20615  fi
20616
20617  # Test: Is bootjdk available from builddeps?
20618
20619  if test "x$BOOT_JDK_FOUND" = xno; then
20620    # Now execute the test
20621
20622
20623
20624  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20625    # Source the builddeps file again, to make sure it uses the latest variables!
20626    . $builddepsfile
20627    # Look for a target and build machine specific resource!
20628    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20629    if test "x$resource" = x; then
20630      # Ok, lets instead look for a target specific resource
20631      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20632    fi
20633    if test "x$resource" = x; then
20634      # Ok, lets instead look for a build specific resource
20635      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20636    fi
20637    if test "x$resource" = x; then
20638      # Ok, lets instead look for a generic resource
20639      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20640      resource=${builddep_bootjdk}
20641    fi
20642    if test "x$resource" != x; then
20643      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20644$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20645      # If the resource in the builddeps.conf file is an existing directory,
20646      # for example /java/linux/cups
20647      if test -d ${resource}; then
20648        depdir=${resource}
20649      else
20650
20651  # bootjdk is for example mymodule
20652  # $resource is for example libs/general/libmymod_1_2_3.zip
20653  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20654  # $with_builddeps_dir is for example /localhome/builddeps
20655  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20656  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20657  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20658  filename=`basename $resource`
20659  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20660  filebase=${filename%%.*}
20661  extension=${filename#*.}
20662  installdir=$with_builddeps_dir/$filebase
20663  if test ! -f $installdir/$filename.unpacked; then
20664    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20665$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20666    if test ! -d $installdir; then
20667      mkdir -p $installdir
20668    fi
20669    if test ! -d $installdir; then
20670      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20671    fi
20672    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20673    touch $tmpfile
20674    if test ! -f $tmpfile; then
20675      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20676    fi
20677
20678  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20679  # $tmpfile is the local file name for the downloaded file.
20680  VALID_TOOL=no
20681  if test "x$BDEPS_FTP" = xwget; then
20682    VALID_TOOL=yes
20683    wget -O $tmpfile $with_builddeps_server/$resource
20684  fi
20685  if test "x$BDEPS_FTP" = xlftp; then
20686    VALID_TOOL=yes
20687    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20688  fi
20689  if test "x$BDEPS_FTP" = xftp; then
20690    VALID_TOOL=yes
20691    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20692    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20693    FTPUSERPWD=${FTPSERVER%%@*}
20694    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20695      FTPUSER=${userpwd%%:*}
20696      FTPPWD=${userpwd#*@}
20697      FTPSERVER=${FTPSERVER#*@}
20698    else
20699      FTPUSER=ftp
20700      FTPPWD=ftp
20701    fi
20702    # the "pass" command does not work on some
20703    # ftp clients (read ftp.exe) but if it works,
20704    # passive mode is better!
20705    ( \
20706        echo "user $FTPUSER $FTPPWD"        ; \
20707        echo "pass"                         ; \
20708        echo "bin"                          ; \
20709        echo "get $FTPPATH $tmpfile"              ; \
20710    ) | ftp -in $FTPSERVER
20711  fi
20712  if test "x$VALID_TOOL" != xyes; then
20713    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20714  fi
20715
20716    mv $tmpfile $installdir/$filename
20717    if test ! -s $installdir/$filename; then
20718      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20719    fi
20720    case "$extension" in
20721      zip)  echo "Unzipping $installdir/$filename..."
20722        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20723        ;;
20724      tar.gz) echo "Untaring $installdir/$filename..."
20725        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20726        ;;
20727      tgz) echo "Untaring $installdir/$filename..."
20728        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20729        ;;
20730      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20731        ;;
20732    esac
20733  fi
20734  if test -f $installdir/$filename.unpacked; then
20735    depdir=$installdir
20736  fi
20737
20738      fi
20739      # Source the builddeps file again, because in the previous command, the depdir
20740      # was updated to point at the current build dependency install directory.
20741      . $builddepsfile
20742      # Now extract variables from the builddeps.conf files.
20743      theroot=${builddep_bootjdk_ROOT}
20744      thecflags=${builddep_bootjdk_CFLAGS}
20745      thelibs=${builddep_bootjdk_LIBS}
20746      if test "x$depdir" = x; then
20747        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20748      fi
20749      BOOT_JDK=$depdir
20750      if test "x$theroot" != x; then
20751        BOOT_JDK="$theroot"
20752      fi
20753      if test "x$thecflags" != x; then
20754        BOOT_JDK_CFLAGS="$thecflags"
20755      fi
20756      if test "x$thelibs" != x; then
20757        BOOT_JDK_LIBS="$thelibs"
20758      fi
20759      BOOT_JDK_FOUND=maybe
20760      else BOOT_JDK_FOUND=no
20761
20762    fi
20763    else BOOT_JDK_FOUND=no
20764
20765  fi
20766
20767
20768
20769    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20770    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20771      # Do we have a bin/java?
20772      if test ! -x "$BOOT_JDK/bin/java"; then
20773        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20774$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20775        BOOT_JDK_FOUND=no
20776      else
20777        # Do we have a bin/javac?
20778        if test ! -x "$BOOT_JDK/bin/javac"; then
20779          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20780$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20781          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20782$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20783          BOOT_JDK_FOUND=no
20784        else
20785          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20786          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20787
20788          # Extra M4 quote needed to protect [] in grep expression.
20789          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20790          if test "x$FOUND_CORRECT_VERSION" = x; then
20791            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20793            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20794$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20795            BOOT_JDK_FOUND=no
20796          else
20797            # We're done! :-)
20798            BOOT_JDK_FOUND=yes
20799
20800  # Only process if variable expands to non-empty
20801
20802  if test "x$BOOT_JDK" != x; then
20803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20804
20805  # Input might be given as Windows format, start by converting to
20806  # unix format.
20807  path="$BOOT_JDK"
20808  new_path=`$CYGPATH -u "$path"`
20809
20810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20813  # "foo.exe" is OK but "foo" is an error.
20814  #
20815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20816  # It is also a way to make sure we got the proper file name for the real test later on.
20817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20818  if test "x$test_shortpath" = x; then
20819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20821    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20822  fi
20823
20824  # Call helper function which possibly converts this using DOS-style short mode.
20825  # If so, the updated path is stored in $new_path.
20826
20827  input_path="$new_path"
20828  # Check if we need to convert this using DOS-style short mode. If the path
20829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20830  # take no chances and rewrite it.
20831  # Note: m4 eats our [], so we need to use [ and ] instead.
20832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20833  if test "x$has_forbidden_chars" != x; then
20834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20838      # Going to short mode and back again did indeed matter. Since short mode is
20839      # case insensitive, let's make it lowercase to improve readability.
20840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20841      # Now convert it back to Unix-style (cygpath)
20842      input_path=`$CYGPATH -u "$shortmode_path"`
20843      new_path="$input_path"
20844    fi
20845  fi
20846
20847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20848  if test "x$test_cygdrive_prefix" = x; then
20849    # As a simple fix, exclude /usr/bin since it's not a real path.
20850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20852      # a path prefixed by /cygdrive for fixpath to work.
20853      new_path="$CYGWIN_ROOT_PATH$input_path"
20854    fi
20855  fi
20856
20857
20858  if test "x$path" != "x$new_path"; then
20859    BOOT_JDK="$new_path"
20860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20861$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20862  fi
20863
20864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20865
20866  path="$BOOT_JDK"
20867  has_colon=`$ECHO $path | $GREP ^.:`
20868  new_path="$path"
20869  if test "x$has_colon" = x; then
20870    # Not in mixed or Windows style, start by that.
20871    new_path=`cmd //c echo $path`
20872  fi
20873
20874
20875  input_path="$new_path"
20876  # Check if we need to convert this using DOS-style short mode. If the path
20877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20878  # take no chances and rewrite it.
20879  # Note: m4 eats our [], so we need to use [ and ] instead.
20880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20881  if test "x$has_forbidden_chars" != x; then
20882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20884  fi
20885
20886
20887  windows_path="$new_path"
20888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20889    unix_path=`$CYGPATH -u "$windows_path"`
20890    new_path="$unix_path"
20891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20893    new_path="$unix_path"
20894  fi
20895
20896  if test "x$path" != "x$new_path"; then
20897    BOOT_JDK="$new_path"
20898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20899$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20900  fi
20901
20902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20904
20905    else
20906      # We're on a unix platform. Hooray! :)
20907      path="$BOOT_JDK"
20908      has_space=`$ECHO "$path" | $GREP " "`
20909      if test "x$has_space" != x; then
20910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20911$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20913      fi
20914
20915      # Use eval to expand a potential ~
20916      eval path="$path"
20917      if test ! -f "$path" && test ! -d "$path"; then
20918        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20919      fi
20920
20921      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20922    fi
20923  fi
20924
20925            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20926$as_echo_n "checking for Boot JDK... " >&6; }
20927            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20928$as_echo "$BOOT_JDK" >&6; }
20929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20930$as_echo_n "checking Boot JDK version... " >&6; }
20931            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20933$as_echo "$BOOT_JDK_VERSION" >&6; }
20934          fi # end check jdk version
20935        fi # end check javac
20936      fi # end check java
20937    fi # end check boot jdk found
20938  fi
20939
20940
20941  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20942
20943  if test "x$BOOT_JDK_FOUND" = xno; then
20944    # Now execute the test
20945
20946  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20947    # First check at user selected default
20948
20949  if test "x$BOOT_JDK_FOUND" = xno; then
20950    # Now execute the test
20951
20952  if test -x /usr/libexec/java_home; then
20953    BOOT_JDK=`/usr/libexec/java_home `
20954    BOOT_JDK_FOUND=maybe
20955    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20956$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20957  fi
20958
20959
20960    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20961    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20962      # Do we have a bin/java?
20963      if test ! -x "$BOOT_JDK/bin/java"; then
20964        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20965$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20966        BOOT_JDK_FOUND=no
20967      else
20968        # Do we have a bin/javac?
20969        if test ! -x "$BOOT_JDK/bin/javac"; then
20970          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20971$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20972          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20973$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20974          BOOT_JDK_FOUND=no
20975        else
20976          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20977          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20978
20979          # Extra M4 quote needed to protect [] in grep expression.
20980          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20981          if test "x$FOUND_CORRECT_VERSION" = x; then
20982            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20984            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20985$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20986            BOOT_JDK_FOUND=no
20987          else
20988            # We're done! :-)
20989            BOOT_JDK_FOUND=yes
20990
20991  # Only process if variable expands to non-empty
20992
20993  if test "x$BOOT_JDK" != x; then
20994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20995
20996  # Input might be given as Windows format, start by converting to
20997  # unix format.
20998  path="$BOOT_JDK"
20999  new_path=`$CYGPATH -u "$path"`
21000
21001  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21002  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21003  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21004  # "foo.exe" is OK but "foo" is an error.
21005  #
21006  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21007  # It is also a way to make sure we got the proper file name for the real test later on.
21008  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21009  if test "x$test_shortpath" = x; then
21010    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21011$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21012    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21013  fi
21014
21015  # Call helper function which possibly converts this using DOS-style short mode.
21016  # If so, the updated path is stored in $new_path.
21017
21018  input_path="$new_path"
21019  # Check if we need to convert this using DOS-style short mode. If the path
21020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21021  # take no chances and rewrite it.
21022  # Note: m4 eats our [], so we need to use [ and ] instead.
21023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21024  if test "x$has_forbidden_chars" != x; then
21025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21026    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21027    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21028    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21029      # Going to short mode and back again did indeed matter. Since short mode is
21030      # case insensitive, let's make it lowercase to improve readability.
21031      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21032      # Now convert it back to Unix-style (cygpath)
21033      input_path=`$CYGPATH -u "$shortmode_path"`
21034      new_path="$input_path"
21035    fi
21036  fi
21037
21038  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21039  if test "x$test_cygdrive_prefix" = x; then
21040    # As a simple fix, exclude /usr/bin since it's not a real path.
21041    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21042      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21043      # a path prefixed by /cygdrive for fixpath to work.
21044      new_path="$CYGWIN_ROOT_PATH$input_path"
21045    fi
21046  fi
21047
21048
21049  if test "x$path" != "x$new_path"; then
21050    BOOT_JDK="$new_path"
21051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21053  fi
21054
21055    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21056
21057  path="$BOOT_JDK"
21058  has_colon=`$ECHO $path | $GREP ^.:`
21059  new_path="$path"
21060  if test "x$has_colon" = x; then
21061    # Not in mixed or Windows style, start by that.
21062    new_path=`cmd //c echo $path`
21063  fi
21064
21065
21066  input_path="$new_path"
21067  # Check if we need to convert this using DOS-style short mode. If the path
21068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21069  # take no chances and rewrite it.
21070  # Note: m4 eats our [], so we need to use [ and ] instead.
21071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21072  if test "x$has_forbidden_chars" != x; then
21073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21075  fi
21076
21077
21078  windows_path="$new_path"
21079  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21080    unix_path=`$CYGPATH -u "$windows_path"`
21081    new_path="$unix_path"
21082  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21083    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21084    new_path="$unix_path"
21085  fi
21086
21087  if test "x$path" != "x$new_path"; then
21088    BOOT_JDK="$new_path"
21089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21090$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21091  fi
21092
21093  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21094  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21095
21096    else
21097      # We're on a unix platform. Hooray! :)
21098      path="$BOOT_JDK"
21099      has_space=`$ECHO "$path" | $GREP " "`
21100      if test "x$has_space" != x; then
21101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21102$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21103        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21104      fi
21105
21106      # Use eval to expand a potential ~
21107      eval path="$path"
21108      if test ! -f "$path" && test ! -d "$path"; then
21109        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21110      fi
21111
21112      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21113    fi
21114  fi
21115
21116            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21117$as_echo_n "checking for Boot JDK... " >&6; }
21118            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21119$as_echo "$BOOT_JDK" >&6; }
21120            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21121$as_echo_n "checking Boot JDK version... " >&6; }
21122            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21124$as_echo "$BOOT_JDK_VERSION" >&6; }
21125          fi # end check jdk version
21126        fi # end check javac
21127      fi # end check java
21128    fi # end check boot jdk found
21129  fi
21130
21131    # If that did not work out (e.g. too old), try explicit versions instead
21132
21133  if test "x$BOOT_JDK_FOUND" = xno; then
21134    # Now execute the test
21135
21136  if test -x /usr/libexec/java_home; then
21137    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
21138    BOOT_JDK_FOUND=maybe
21139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
21140$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
21141  fi
21142
21143
21144    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21145    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21146      # Do we have a bin/java?
21147      if test ! -x "$BOOT_JDK/bin/java"; then
21148        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21150        BOOT_JDK_FOUND=no
21151      else
21152        # Do we have a bin/javac?
21153        if test ! -x "$BOOT_JDK/bin/javac"; then
21154          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21156          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21157$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21158          BOOT_JDK_FOUND=no
21159        else
21160          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21161          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21162
21163          # Extra M4 quote needed to protect [] in grep expression.
21164          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21165          if test "x$FOUND_CORRECT_VERSION" = x; then
21166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21168            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21169$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21170            BOOT_JDK_FOUND=no
21171          else
21172            # We're done! :-)
21173            BOOT_JDK_FOUND=yes
21174
21175  # Only process if variable expands to non-empty
21176
21177  if test "x$BOOT_JDK" != x; then
21178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21179
21180  # Input might be given as Windows format, start by converting to
21181  # unix format.
21182  path="$BOOT_JDK"
21183  new_path=`$CYGPATH -u "$path"`
21184
21185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21188  # "foo.exe" is OK but "foo" is an error.
21189  #
21190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21191  # It is also a way to make sure we got the proper file name for the real test later on.
21192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21193  if test "x$test_shortpath" = x; then
21194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21196    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21197  fi
21198
21199  # Call helper function which possibly converts this using DOS-style short mode.
21200  # If so, the updated path is stored in $new_path.
21201
21202  input_path="$new_path"
21203  # Check if we need to convert this using DOS-style short mode. If the path
21204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21205  # take no chances and rewrite it.
21206  # Note: m4 eats our [], so we need to use [ and ] instead.
21207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21208  if test "x$has_forbidden_chars" != x; then
21209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21213      # Going to short mode and back again did indeed matter. Since short mode is
21214      # case insensitive, let's make it lowercase to improve readability.
21215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21216      # Now convert it back to Unix-style (cygpath)
21217      input_path=`$CYGPATH -u "$shortmode_path"`
21218      new_path="$input_path"
21219    fi
21220  fi
21221
21222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21223  if test "x$test_cygdrive_prefix" = x; then
21224    # As a simple fix, exclude /usr/bin since it's not a real path.
21225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21227      # a path prefixed by /cygdrive for fixpath to work.
21228      new_path="$CYGWIN_ROOT_PATH$input_path"
21229    fi
21230  fi
21231
21232
21233  if test "x$path" != "x$new_path"; then
21234    BOOT_JDK="$new_path"
21235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21237  fi
21238
21239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21240
21241  path="$BOOT_JDK"
21242  has_colon=`$ECHO $path | $GREP ^.:`
21243  new_path="$path"
21244  if test "x$has_colon" = x; then
21245    # Not in mixed or Windows style, start by that.
21246    new_path=`cmd //c echo $path`
21247  fi
21248
21249
21250  input_path="$new_path"
21251  # Check if we need to convert this using DOS-style short mode. If the path
21252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21253  # take no chances and rewrite it.
21254  # Note: m4 eats our [], so we need to use [ and ] instead.
21255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21256  if test "x$has_forbidden_chars" != x; then
21257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21259  fi
21260
21261
21262  windows_path="$new_path"
21263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21264    unix_path=`$CYGPATH -u "$windows_path"`
21265    new_path="$unix_path"
21266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21268    new_path="$unix_path"
21269  fi
21270
21271  if test "x$path" != "x$new_path"; then
21272    BOOT_JDK="$new_path"
21273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21275  fi
21276
21277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21279
21280    else
21281      # We're on a unix platform. Hooray! :)
21282      path="$BOOT_JDK"
21283      has_space=`$ECHO "$path" | $GREP " "`
21284      if test "x$has_space" != x; then
21285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21288      fi
21289
21290      # Use eval to expand a potential ~
21291      eval path="$path"
21292      if test ! -f "$path" && test ! -d "$path"; then
21293        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21294      fi
21295
21296      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21297    fi
21298  fi
21299
21300            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21301$as_echo_n "checking for Boot JDK... " >&6; }
21302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21303$as_echo "$BOOT_JDK" >&6; }
21304            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21305$as_echo_n "checking Boot JDK version... " >&6; }
21306            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21307            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21308$as_echo "$BOOT_JDK_VERSION" >&6; }
21309          fi # end check jdk version
21310        fi # end check javac
21311      fi # end check java
21312    fi # end check boot jdk found
21313  fi
21314
21315
21316  if test "x$BOOT_JDK_FOUND" = xno; then
21317    # Now execute the test
21318
21319  if test -x /usr/libexec/java_home; then
21320    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21321    BOOT_JDK_FOUND=maybe
21322    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21323$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21324  fi
21325
21326
21327    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21328    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21329      # Do we have a bin/java?
21330      if test ! -x "$BOOT_JDK/bin/java"; then
21331        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21332$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21333        BOOT_JDK_FOUND=no
21334      else
21335        # Do we have a bin/javac?
21336        if test ! -x "$BOOT_JDK/bin/javac"; then
21337          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21339          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21340$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21341          BOOT_JDK_FOUND=no
21342        else
21343          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21344          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21345
21346          # Extra M4 quote needed to protect [] in grep expression.
21347          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21348          if test "x$FOUND_CORRECT_VERSION" = x; then
21349            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21350$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21351            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21352$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21353            BOOT_JDK_FOUND=no
21354          else
21355            # We're done! :-)
21356            BOOT_JDK_FOUND=yes
21357
21358  # Only process if variable expands to non-empty
21359
21360  if test "x$BOOT_JDK" != x; then
21361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21362
21363  # Input might be given as Windows format, start by converting to
21364  # unix format.
21365  path="$BOOT_JDK"
21366  new_path=`$CYGPATH -u "$path"`
21367
21368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21371  # "foo.exe" is OK but "foo" is an error.
21372  #
21373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21374  # It is also a way to make sure we got the proper file name for the real test later on.
21375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21376  if test "x$test_shortpath" = x; then
21377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21378$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21379    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21380  fi
21381
21382  # Call helper function which possibly converts this using DOS-style short mode.
21383  # If so, the updated path is stored in $new_path.
21384
21385  input_path="$new_path"
21386  # Check if we need to convert this using DOS-style short mode. If the path
21387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21388  # take no chances and rewrite it.
21389  # Note: m4 eats our [], so we need to use [ and ] instead.
21390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21391  if test "x$has_forbidden_chars" != x; then
21392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21396      # Going to short mode and back again did indeed matter. Since short mode is
21397      # case insensitive, let's make it lowercase to improve readability.
21398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21399      # Now convert it back to Unix-style (cygpath)
21400      input_path=`$CYGPATH -u "$shortmode_path"`
21401      new_path="$input_path"
21402    fi
21403  fi
21404
21405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21406  if test "x$test_cygdrive_prefix" = x; then
21407    # As a simple fix, exclude /usr/bin since it's not a real path.
21408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21410      # a path prefixed by /cygdrive for fixpath to work.
21411      new_path="$CYGWIN_ROOT_PATH$input_path"
21412    fi
21413  fi
21414
21415
21416  if test "x$path" != "x$new_path"; then
21417    BOOT_JDK="$new_path"
21418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21419$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21420  fi
21421
21422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21423
21424  path="$BOOT_JDK"
21425  has_colon=`$ECHO $path | $GREP ^.:`
21426  new_path="$path"
21427  if test "x$has_colon" = x; then
21428    # Not in mixed or Windows style, start by that.
21429    new_path=`cmd //c echo $path`
21430  fi
21431
21432
21433  input_path="$new_path"
21434  # Check if we need to convert this using DOS-style short mode. If the path
21435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21436  # take no chances and rewrite it.
21437  # Note: m4 eats our [], so we need to use [ and ] instead.
21438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21439  if test "x$has_forbidden_chars" != x; then
21440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21442  fi
21443
21444
21445  windows_path="$new_path"
21446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21447    unix_path=`$CYGPATH -u "$windows_path"`
21448    new_path="$unix_path"
21449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21451    new_path="$unix_path"
21452  fi
21453
21454  if test "x$path" != "x$new_path"; then
21455    BOOT_JDK="$new_path"
21456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21457$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21458  fi
21459
21460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21462
21463    else
21464      # We're on a unix platform. Hooray! :)
21465      path="$BOOT_JDK"
21466      has_space=`$ECHO "$path" | $GREP " "`
21467      if test "x$has_space" != x; then
21468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21469$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21471      fi
21472
21473      # Use eval to expand a potential ~
21474      eval path="$path"
21475      if test ! -f "$path" && test ! -d "$path"; then
21476        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21477      fi
21478
21479      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21480    fi
21481  fi
21482
21483            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21484$as_echo_n "checking for Boot JDK... " >&6; }
21485            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21486$as_echo "$BOOT_JDK" >&6; }
21487            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21488$as_echo_n "checking Boot JDK version... " >&6; }
21489            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21491$as_echo "$BOOT_JDK_VERSION" >&6; }
21492          fi # end check jdk version
21493        fi # end check javac
21494      fi # end check java
21495    fi # end check boot jdk found
21496  fi
21497
21498
21499  if test "x$BOOT_JDK_FOUND" = xno; then
21500    # Now execute the test
21501
21502  if test -x /usr/libexec/java_home; then
21503    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21504    BOOT_JDK_FOUND=maybe
21505    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21506$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21507  fi
21508
21509
21510    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21511    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21512      # Do we have a bin/java?
21513      if test ! -x "$BOOT_JDK/bin/java"; then
21514        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21516        BOOT_JDK_FOUND=no
21517      else
21518        # Do we have a bin/javac?
21519        if test ! -x "$BOOT_JDK/bin/javac"; then
21520          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21521$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21522          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21523$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21524          BOOT_JDK_FOUND=no
21525        else
21526          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21527          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21528
21529          # Extra M4 quote needed to protect [] in grep expression.
21530          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21531          if test "x$FOUND_CORRECT_VERSION" = x; then
21532            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21534            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21535$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21536            BOOT_JDK_FOUND=no
21537          else
21538            # We're done! :-)
21539            BOOT_JDK_FOUND=yes
21540
21541  # Only process if variable expands to non-empty
21542
21543  if test "x$BOOT_JDK" != x; then
21544    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21545
21546  # Input might be given as Windows format, start by converting to
21547  # unix format.
21548  path="$BOOT_JDK"
21549  new_path=`$CYGPATH -u "$path"`
21550
21551  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21552  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21553  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21554  # "foo.exe" is OK but "foo" is an error.
21555  #
21556  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21557  # It is also a way to make sure we got the proper file name for the real test later on.
21558  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21559  if test "x$test_shortpath" = x; then
21560    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21562    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21563  fi
21564
21565  # Call helper function which possibly converts this using DOS-style short mode.
21566  # If so, the updated path is stored in $new_path.
21567
21568  input_path="$new_path"
21569  # Check if we need to convert this using DOS-style short mode. If the path
21570  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21571  # take no chances and rewrite it.
21572  # Note: m4 eats our [], so we need to use [ and ] instead.
21573  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21574  if test "x$has_forbidden_chars" != x; then
21575    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21576    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21577    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21578    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21579      # Going to short mode and back again did indeed matter. Since short mode is
21580      # case insensitive, let's make it lowercase to improve readability.
21581      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21582      # Now convert it back to Unix-style (cygpath)
21583      input_path=`$CYGPATH -u "$shortmode_path"`
21584      new_path="$input_path"
21585    fi
21586  fi
21587
21588  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21589  if test "x$test_cygdrive_prefix" = x; then
21590    # As a simple fix, exclude /usr/bin since it's not a real path.
21591    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21592      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21593      # a path prefixed by /cygdrive for fixpath to work.
21594      new_path="$CYGWIN_ROOT_PATH$input_path"
21595    fi
21596  fi
21597
21598
21599  if test "x$path" != "x$new_path"; then
21600    BOOT_JDK="$new_path"
21601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21603  fi
21604
21605    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21606
21607  path="$BOOT_JDK"
21608  has_colon=`$ECHO $path | $GREP ^.:`
21609  new_path="$path"
21610  if test "x$has_colon" = x; then
21611    # Not in mixed or Windows style, start by that.
21612    new_path=`cmd //c echo $path`
21613  fi
21614
21615
21616  input_path="$new_path"
21617  # Check if we need to convert this using DOS-style short mode. If the path
21618  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21619  # take no chances and rewrite it.
21620  # Note: m4 eats our [], so we need to use [ and ] instead.
21621  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21622  if test "x$has_forbidden_chars" != x; then
21623    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21624    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21625  fi
21626
21627
21628  windows_path="$new_path"
21629  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21630    unix_path=`$CYGPATH -u "$windows_path"`
21631    new_path="$unix_path"
21632  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21633    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21634    new_path="$unix_path"
21635  fi
21636
21637  if test "x$path" != "x$new_path"; then
21638    BOOT_JDK="$new_path"
21639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21640$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21641  fi
21642
21643  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21644  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21645
21646    else
21647      # We're on a unix platform. Hooray! :)
21648      path="$BOOT_JDK"
21649      has_space=`$ECHO "$path" | $GREP " "`
21650      if test "x$has_space" != x; then
21651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21653        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21654      fi
21655
21656      # Use eval to expand a potential ~
21657      eval path="$path"
21658      if test ! -f "$path" && test ! -d "$path"; then
21659        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21660      fi
21661
21662      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21663    fi
21664  fi
21665
21666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21667$as_echo_n "checking for Boot JDK... " >&6; }
21668            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21669$as_echo "$BOOT_JDK" >&6; }
21670            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21671$as_echo_n "checking Boot JDK version... " >&6; }
21672            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21673            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21674$as_echo "$BOOT_JDK_VERSION" >&6; }
21675          fi # end check jdk version
21676        fi # end check javac
21677      fi # end check java
21678    fi # end check boot jdk found
21679  fi
21680
21681  fi
21682
21683
21684    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21685    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21686      # Do we have a bin/java?
21687      if test ! -x "$BOOT_JDK/bin/java"; then
21688        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21690        BOOT_JDK_FOUND=no
21691      else
21692        # Do we have a bin/javac?
21693        if test ! -x "$BOOT_JDK/bin/javac"; then
21694          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21695$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21696          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21697$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21698          BOOT_JDK_FOUND=no
21699        else
21700          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21701          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21702
21703          # Extra M4 quote needed to protect [] in grep expression.
21704          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21705          if test "x$FOUND_CORRECT_VERSION" = x; then
21706            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21707$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21708            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21709$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21710            BOOT_JDK_FOUND=no
21711          else
21712            # We're done! :-)
21713            BOOT_JDK_FOUND=yes
21714
21715  # Only process if variable expands to non-empty
21716
21717  if test "x$BOOT_JDK" != x; then
21718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21719
21720  # Input might be given as Windows format, start by converting to
21721  # unix format.
21722  path="$BOOT_JDK"
21723  new_path=`$CYGPATH -u "$path"`
21724
21725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21728  # "foo.exe" is OK but "foo" is an error.
21729  #
21730  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21731  # It is also a way to make sure we got the proper file name for the real test later on.
21732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21733  if test "x$test_shortpath" = x; then
21734    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21735$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21736    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21737  fi
21738
21739  # Call helper function which possibly converts this using DOS-style short mode.
21740  # If so, the updated path is stored in $new_path.
21741
21742  input_path="$new_path"
21743  # Check if we need to convert this using DOS-style short mode. If the path
21744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21745  # take no chances and rewrite it.
21746  # Note: m4 eats our [], so we need to use [ and ] instead.
21747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21748  if test "x$has_forbidden_chars" != x; then
21749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21750    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21751    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21752    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21753      # Going to short mode and back again did indeed matter. Since short mode is
21754      # case insensitive, let's make it lowercase to improve readability.
21755      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21756      # Now convert it back to Unix-style (cygpath)
21757      input_path=`$CYGPATH -u "$shortmode_path"`
21758      new_path="$input_path"
21759    fi
21760  fi
21761
21762  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21763  if test "x$test_cygdrive_prefix" = x; then
21764    # As a simple fix, exclude /usr/bin since it's not a real path.
21765    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21766      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21767      # a path prefixed by /cygdrive for fixpath to work.
21768      new_path="$CYGWIN_ROOT_PATH$input_path"
21769    fi
21770  fi
21771
21772
21773  if test "x$path" != "x$new_path"; then
21774    BOOT_JDK="$new_path"
21775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21776$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21777  fi
21778
21779    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21780
21781  path="$BOOT_JDK"
21782  has_colon=`$ECHO $path | $GREP ^.:`
21783  new_path="$path"
21784  if test "x$has_colon" = x; then
21785    # Not in mixed or Windows style, start by that.
21786    new_path=`cmd //c echo $path`
21787  fi
21788
21789
21790  input_path="$new_path"
21791  # Check if we need to convert this using DOS-style short mode. If the path
21792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21793  # take no chances and rewrite it.
21794  # Note: m4 eats our [], so we need to use [ and ] instead.
21795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21796  if test "x$has_forbidden_chars" != x; then
21797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21798    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21799  fi
21800
21801
21802  windows_path="$new_path"
21803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21804    unix_path=`$CYGPATH -u "$windows_path"`
21805    new_path="$unix_path"
21806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21808    new_path="$unix_path"
21809  fi
21810
21811  if test "x$path" != "x$new_path"; then
21812    BOOT_JDK="$new_path"
21813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21815  fi
21816
21817  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21818  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21819
21820    else
21821      # We're on a unix platform. Hooray! :)
21822      path="$BOOT_JDK"
21823      has_space=`$ECHO "$path" | $GREP " "`
21824      if test "x$has_space" != x; then
21825        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21826$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21827        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21828      fi
21829
21830      # Use eval to expand a potential ~
21831      eval path="$path"
21832      if test ! -f "$path" && test ! -d "$path"; then
21833        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21834      fi
21835
21836      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21837    fi
21838  fi
21839
21840            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21841$as_echo_n "checking for Boot JDK... " >&6; }
21842            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21843$as_echo "$BOOT_JDK" >&6; }
21844            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21845$as_echo_n "checking Boot JDK version... " >&6; }
21846            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21848$as_echo "$BOOT_JDK_VERSION" >&6; }
21849          fi # end check jdk version
21850        fi # end check javac
21851      fi # end check java
21852    fi # end check boot jdk found
21853  fi
21854
21855
21856  # Test: Is $JAVA_HOME set?
21857
21858  if test "x$BOOT_JDK_FOUND" = xno; then
21859    # Now execute the test
21860
21861  if test "x$JAVA_HOME" != x; then
21862    JAVA_HOME_PROCESSED="$JAVA_HOME"
21863
21864  # Only process if variable expands to non-empty
21865
21866  if test "x$JAVA_HOME_PROCESSED" != x; then
21867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21868
21869  # Input might be given as Windows format, start by converting to
21870  # unix format.
21871  path="$JAVA_HOME_PROCESSED"
21872  new_path=`$CYGPATH -u "$path"`
21873
21874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21877  # "foo.exe" is OK but "foo" is an error.
21878  #
21879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21880  # It is also a way to make sure we got the proper file name for the real test later on.
21881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21882  if test "x$test_shortpath" = x; then
21883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21884$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21885    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21886  fi
21887
21888  # Call helper function which possibly converts this using DOS-style short mode.
21889  # If so, the updated path is stored in $new_path.
21890
21891  input_path="$new_path"
21892  # Check if we need to convert this using DOS-style short mode. If the path
21893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21894  # take no chances and rewrite it.
21895  # Note: m4 eats our [], so we need to use [ and ] instead.
21896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21897  if test "x$has_forbidden_chars" != x; then
21898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21902      # Going to short mode and back again did indeed matter. Since short mode is
21903      # case insensitive, let's make it lowercase to improve readability.
21904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21905      # Now convert it back to Unix-style (cygpath)
21906      input_path=`$CYGPATH -u "$shortmode_path"`
21907      new_path="$input_path"
21908    fi
21909  fi
21910
21911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21912  if test "x$test_cygdrive_prefix" = x; then
21913    # As a simple fix, exclude /usr/bin since it's not a real path.
21914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21916      # a path prefixed by /cygdrive for fixpath to work.
21917      new_path="$CYGWIN_ROOT_PATH$input_path"
21918    fi
21919  fi
21920
21921
21922  if test "x$path" != "x$new_path"; then
21923    JAVA_HOME_PROCESSED="$new_path"
21924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21925$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21926  fi
21927
21928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21929
21930  path="$JAVA_HOME_PROCESSED"
21931  has_colon=`$ECHO $path | $GREP ^.:`
21932  new_path="$path"
21933  if test "x$has_colon" = x; then
21934    # Not in mixed or Windows style, start by that.
21935    new_path=`cmd //c echo $path`
21936  fi
21937
21938
21939  input_path="$new_path"
21940  # Check if we need to convert this using DOS-style short mode. If the path
21941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21942  # take no chances and rewrite it.
21943  # Note: m4 eats our [], so we need to use [ and ] instead.
21944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21945  if test "x$has_forbidden_chars" != x; then
21946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21948  fi
21949
21950
21951  windows_path="$new_path"
21952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21953    unix_path=`$CYGPATH -u "$windows_path"`
21954    new_path="$unix_path"
21955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21957    new_path="$unix_path"
21958  fi
21959
21960  if test "x$path" != "x$new_path"; then
21961    JAVA_HOME_PROCESSED="$new_path"
21962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21963$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21964  fi
21965
21966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21968
21969    else
21970      # We're on a unix platform. Hooray! :)
21971      path="$JAVA_HOME_PROCESSED"
21972      has_space=`$ECHO "$path" | $GREP " "`
21973      if test "x$has_space" != x; then
21974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21975$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21977      fi
21978
21979      # Use eval to expand a potential ~
21980      eval path="$path"
21981      if test ! -f "$path" && test ! -d "$path"; then
21982        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21983      fi
21984
21985      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21986    fi
21987  fi
21988
21989    if test ! -d "$JAVA_HOME_PROCESSED"; then
21990      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21991$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21992    else
21993      # Aha, the user has set a JAVA_HOME
21994      # let us use that as the Boot JDK.
21995      BOOT_JDK="$JAVA_HOME_PROCESSED"
21996      BOOT_JDK_FOUND=maybe
21997      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21998$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21999    fi
22000  fi
22001
22002
22003    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22004    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22005      # Do we have a bin/java?
22006      if test ! -x "$BOOT_JDK/bin/java"; then
22007        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22009        BOOT_JDK_FOUND=no
22010      else
22011        # Do we have a bin/javac?
22012        if test ! -x "$BOOT_JDK/bin/javac"; then
22013          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22015          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22016$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22017          BOOT_JDK_FOUND=no
22018        else
22019          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22020          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22021
22022          # Extra M4 quote needed to protect [] in grep expression.
22023          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22024          if test "x$FOUND_CORRECT_VERSION" = x; then
22025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22027            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22028$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22029            BOOT_JDK_FOUND=no
22030          else
22031            # We're done! :-)
22032            BOOT_JDK_FOUND=yes
22033
22034  # Only process if variable expands to non-empty
22035
22036  if test "x$BOOT_JDK" != x; then
22037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22038
22039  # Input might be given as Windows format, start by converting to
22040  # unix format.
22041  path="$BOOT_JDK"
22042  new_path=`$CYGPATH -u "$path"`
22043
22044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22047  # "foo.exe" is OK but "foo" is an error.
22048  #
22049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22050  # It is also a way to make sure we got the proper file name for the real test later on.
22051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22052  if test "x$test_shortpath" = x; then
22053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22055    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22056  fi
22057
22058  # Call helper function which possibly converts this using DOS-style short mode.
22059  # If so, the updated path is stored in $new_path.
22060
22061  input_path="$new_path"
22062  # Check if we need to convert this using DOS-style short mode. If the path
22063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22064  # take no chances and rewrite it.
22065  # Note: m4 eats our [], so we need to use [ and ] instead.
22066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22067  if test "x$has_forbidden_chars" != x; then
22068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22072      # Going to short mode and back again did indeed matter. Since short mode is
22073      # case insensitive, let's make it lowercase to improve readability.
22074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22075      # Now convert it back to Unix-style (cygpath)
22076      input_path=`$CYGPATH -u "$shortmode_path"`
22077      new_path="$input_path"
22078    fi
22079  fi
22080
22081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22082  if test "x$test_cygdrive_prefix" = x; then
22083    # As a simple fix, exclude /usr/bin since it's not a real path.
22084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22086      # a path prefixed by /cygdrive for fixpath to work.
22087      new_path="$CYGWIN_ROOT_PATH$input_path"
22088    fi
22089  fi
22090
22091
22092  if test "x$path" != "x$new_path"; then
22093    BOOT_JDK="$new_path"
22094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22096  fi
22097
22098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22099
22100  path="$BOOT_JDK"
22101  has_colon=`$ECHO $path | $GREP ^.:`
22102  new_path="$path"
22103  if test "x$has_colon" = x; then
22104    # Not in mixed or Windows style, start by that.
22105    new_path=`cmd //c echo $path`
22106  fi
22107
22108
22109  input_path="$new_path"
22110  # Check if we need to convert this using DOS-style short mode. If the path
22111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22112  # take no chances and rewrite it.
22113  # Note: m4 eats our [], so we need to use [ and ] instead.
22114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22115  if test "x$has_forbidden_chars" != x; then
22116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22118  fi
22119
22120
22121  windows_path="$new_path"
22122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22123    unix_path=`$CYGPATH -u "$windows_path"`
22124    new_path="$unix_path"
22125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22127    new_path="$unix_path"
22128  fi
22129
22130  if test "x$path" != "x$new_path"; then
22131    BOOT_JDK="$new_path"
22132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22134  fi
22135
22136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22138
22139    else
22140      # We're on a unix platform. Hooray! :)
22141      path="$BOOT_JDK"
22142      has_space=`$ECHO "$path" | $GREP " "`
22143      if test "x$has_space" != x; then
22144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22147      fi
22148
22149      # Use eval to expand a potential ~
22150      eval path="$path"
22151      if test ! -f "$path" && test ! -d "$path"; then
22152        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22153      fi
22154
22155      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22156    fi
22157  fi
22158
22159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22160$as_echo_n "checking for Boot JDK... " >&6; }
22161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22162$as_echo "$BOOT_JDK" >&6; }
22163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22164$as_echo_n "checking Boot JDK version... " >&6; }
22165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22167$as_echo "$BOOT_JDK_VERSION" >&6; }
22168          fi # end check jdk version
22169        fi # end check javac
22170      fi # end check java
22171    fi # end check boot jdk found
22172  fi
22173
22174
22175  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
22176
22177  if test "x$BOOT_JDK_FOUND" = xno; then
22178    # Now execute the test
22179
22180  # Extract the first word of "javac", so it can be a program name with args.
22181set dummy javac; ac_word=$2
22182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22183$as_echo_n "checking for $ac_word... " >&6; }
22184if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22185  $as_echo_n "(cached) " >&6
22186else
22187  case $JAVAC_CHECK in
22188  [\\/]* | ?:[\\/]*)
22189  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22190  ;;
22191  *)
22192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22193for as_dir in $PATH
22194do
22195  IFS=$as_save_IFS
22196  test -z "$as_dir" && as_dir=.
22197    for ac_exec_ext in '' $ac_executable_extensions; do
22198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22199    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22201    break 2
22202  fi
22203done
22204  done
22205IFS=$as_save_IFS
22206
22207  ;;
22208esac
22209fi
22210JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22211if test -n "$JAVAC_CHECK"; then
22212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22213$as_echo "$JAVAC_CHECK" >&6; }
22214else
22215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22216$as_echo "no" >&6; }
22217fi
22218
22219
22220  # Extract the first word of "java", so it can be a program name with args.
22221set dummy java; ac_word=$2
22222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22223$as_echo_n "checking for $ac_word... " >&6; }
22224if ${ac_cv_path_JAVA_CHECK+:} false; then :
22225  $as_echo_n "(cached) " >&6
22226else
22227  case $JAVA_CHECK in
22228  [\\/]* | ?:[\\/]*)
22229  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22230  ;;
22231  *)
22232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22233for as_dir in $PATH
22234do
22235  IFS=$as_save_IFS
22236  test -z "$as_dir" && as_dir=.
22237    for ac_exec_ext in '' $ac_executable_extensions; do
22238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22239    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22241    break 2
22242  fi
22243done
22244  done
22245IFS=$as_save_IFS
22246
22247  ;;
22248esac
22249fi
22250JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22251if test -n "$JAVA_CHECK"; then
22252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22253$as_echo "$JAVA_CHECK" >&6; }
22254else
22255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22256$as_echo "no" >&6; }
22257fi
22258
22259
22260  BINARY="$JAVAC_CHECK"
22261  if test "x$JAVAC_CHECK" = x; then
22262    BINARY="$JAVA_CHECK"
22263  fi
22264  if test "x$BINARY" != x; then
22265    # So there is a java(c) binary, it might be part of a JDK.
22266    # Lets find the JDK/JRE directory by following symbolic links.
22267    # Linux/GNU systems often have links from /usr/bin/java to
22268    # /etc/alternatives/java to the real JDK binary.
22269
22270  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22271    # Follow a chain of symbolic links. Use readlink
22272    # where it exists, else fall back to horribly
22273    # complicated shell code.
22274    if test "x$READLINK_TESTED" != yes; then
22275      # On MacOSX there is a readlink tool with a different
22276      # purpose than the GNU readlink tool. Check the found readlink.
22277      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22278      if test "x$ISGNU" = x; then
22279        # A readlink that we do not know how to use.
22280        # Are there other non-GNU readlinks out there?
22281        READLINK_TESTED=yes
22282        READLINK=
22283      fi
22284    fi
22285
22286    if test "x$READLINK" != x; then
22287      BINARY=`$READLINK -f $BINARY`
22288    else
22289      # Save the current directory for restoring afterwards
22290      STARTDIR=$PWD
22291      COUNTER=0
22292      sym_link_dir=`$DIRNAME $BINARY`
22293      sym_link_file=`$BASENAME $BINARY`
22294      cd $sym_link_dir
22295      # Use -P flag to resolve symlinks in directories.
22296      cd `$THEPWDCMD -P`
22297      sym_link_dir=`$THEPWDCMD -P`
22298      # Resolve file symlinks
22299      while test $COUNTER -lt 20; do
22300        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22301        if test "x$ISLINK" == x; then
22302          # This is not a symbolic link! We are done!
22303          break
22304        fi
22305        # Again resolve directory symlinks since the target of the just found
22306        # link could be in a different directory
22307        cd `$DIRNAME $ISLINK`
22308        sym_link_dir=`$THEPWDCMD -P`
22309        sym_link_file=`$BASENAME $ISLINK`
22310        let COUNTER=COUNTER+1
22311      done
22312      cd $STARTDIR
22313      BINARY=$sym_link_dir/$sym_link_file
22314    fi
22315  fi
22316
22317    BOOT_JDK=`dirname "$BINARY"`
22318    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22319    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22320      # Looks like we found ourselves an JDK
22321      BOOT_JDK_FOUND=maybe
22322      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22323$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22324    fi
22325  fi
22326
22327
22328    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22329    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22330      # Do we have a bin/java?
22331      if test ! -x "$BOOT_JDK/bin/java"; then
22332        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22333$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22334        BOOT_JDK_FOUND=no
22335      else
22336        # Do we have a bin/javac?
22337        if test ! -x "$BOOT_JDK/bin/javac"; then
22338          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22339$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22340          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22341$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22342          BOOT_JDK_FOUND=no
22343        else
22344          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22345          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22346
22347          # Extra M4 quote needed to protect [] in grep expression.
22348          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22349          if test "x$FOUND_CORRECT_VERSION" = x; then
22350            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22351$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22352            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22353$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22354            BOOT_JDK_FOUND=no
22355          else
22356            # We're done! :-)
22357            BOOT_JDK_FOUND=yes
22358
22359  # Only process if variable expands to non-empty
22360
22361  if test "x$BOOT_JDK" != x; then
22362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22363
22364  # Input might be given as Windows format, start by converting to
22365  # unix format.
22366  path="$BOOT_JDK"
22367  new_path=`$CYGPATH -u "$path"`
22368
22369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22372  # "foo.exe" is OK but "foo" is an error.
22373  #
22374  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22375  # It is also a way to make sure we got the proper file name for the real test later on.
22376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22377  if test "x$test_shortpath" = x; then
22378    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22379$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22380    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22381  fi
22382
22383  # Call helper function which possibly converts this using DOS-style short mode.
22384  # If so, the updated path is stored in $new_path.
22385
22386  input_path="$new_path"
22387  # Check if we need to convert this using DOS-style short mode. If the path
22388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22389  # take no chances and rewrite it.
22390  # Note: m4 eats our [], so we need to use [ and ] instead.
22391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22392  if test "x$has_forbidden_chars" != x; then
22393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22394    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22395    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22396    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22397      # Going to short mode and back again did indeed matter. Since short mode is
22398      # case insensitive, let's make it lowercase to improve readability.
22399      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22400      # Now convert it back to Unix-style (cygpath)
22401      input_path=`$CYGPATH -u "$shortmode_path"`
22402      new_path="$input_path"
22403    fi
22404  fi
22405
22406  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22407  if test "x$test_cygdrive_prefix" = x; then
22408    # As a simple fix, exclude /usr/bin since it's not a real path.
22409    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22410      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22411      # a path prefixed by /cygdrive for fixpath to work.
22412      new_path="$CYGWIN_ROOT_PATH$input_path"
22413    fi
22414  fi
22415
22416
22417  if test "x$path" != "x$new_path"; then
22418    BOOT_JDK="$new_path"
22419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22420$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22421  fi
22422
22423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22424
22425  path="$BOOT_JDK"
22426  has_colon=`$ECHO $path | $GREP ^.:`
22427  new_path="$path"
22428  if test "x$has_colon" = x; then
22429    # Not in mixed or Windows style, start by that.
22430    new_path=`cmd //c echo $path`
22431  fi
22432
22433
22434  input_path="$new_path"
22435  # Check if we need to convert this using DOS-style short mode. If the path
22436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22437  # take no chances and rewrite it.
22438  # Note: m4 eats our [], so we need to use [ and ] instead.
22439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22440  if test "x$has_forbidden_chars" != x; then
22441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22443  fi
22444
22445
22446  windows_path="$new_path"
22447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22448    unix_path=`$CYGPATH -u "$windows_path"`
22449    new_path="$unix_path"
22450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22452    new_path="$unix_path"
22453  fi
22454
22455  if test "x$path" != "x$new_path"; then
22456    BOOT_JDK="$new_path"
22457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22458$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22459  fi
22460
22461  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22462  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22463
22464    else
22465      # We're on a unix platform. Hooray! :)
22466      path="$BOOT_JDK"
22467      has_space=`$ECHO "$path" | $GREP " "`
22468      if test "x$has_space" != x; then
22469        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22471        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22472      fi
22473
22474      # Use eval to expand a potential ~
22475      eval path="$path"
22476      if test ! -f "$path" && test ! -d "$path"; then
22477        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22478      fi
22479
22480      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22481    fi
22482  fi
22483
22484            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22485$as_echo_n "checking for Boot JDK... " >&6; }
22486            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22487$as_echo "$BOOT_JDK" >&6; }
22488            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22489$as_echo_n "checking Boot JDK version... " >&6; }
22490            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22492$as_echo "$BOOT_JDK_VERSION" >&6; }
22493          fi # end check jdk version
22494        fi # end check javac
22495      fi # end check java
22496    fi # end check boot jdk found
22497  fi
22498
22499
22500  # Test: Is there a JDK installed in default, well-known locations?
22501
22502  if test "x$BOOT_JDK_FOUND" = xno; then
22503    # Now execute the test
22504
22505  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22506
22507  if test "x$BOOT_JDK_FOUND" = xno; then
22508    # Now execute the test
22509
22510  if test "x$ProgramW6432" != x; then
22511    VIRTUAL_DIR="$ProgramW6432/Java"
22512
22513  windows_path="$VIRTUAL_DIR"
22514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22515    unix_path=`$CYGPATH -u "$windows_path"`
22516    VIRTUAL_DIR="$unix_path"
22517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22519    VIRTUAL_DIR="$unix_path"
22520  fi
22521
22522
22523  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22524  BOOT_JDK_SUFFIX=""
22525  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22526  if test "x$ALL_JDKS_FOUND" != x; then
22527    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22528
22529  if test "x$BOOT_JDK_FOUND" = xno; then
22530    # Now execute the test
22531
22532        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22533        if test -d "$BOOT_JDK"; then
22534          BOOT_JDK_FOUND=maybe
22535          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22536$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22537        fi
22538
22539
22540    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22541    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22542      # Do we have a bin/java?
22543      if test ! -x "$BOOT_JDK/bin/java"; then
22544        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22546        BOOT_JDK_FOUND=no
22547      else
22548        # Do we have a bin/javac?
22549        if test ! -x "$BOOT_JDK/bin/javac"; then
22550          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22551$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22552          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22553$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22554          BOOT_JDK_FOUND=no
22555        else
22556          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22557          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22558
22559          # Extra M4 quote needed to protect [] in grep expression.
22560          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22561          if test "x$FOUND_CORRECT_VERSION" = x; then
22562            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22563$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22564            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22565$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22566            BOOT_JDK_FOUND=no
22567          else
22568            # We're done! :-)
22569            BOOT_JDK_FOUND=yes
22570
22571  # Only process if variable expands to non-empty
22572
22573  if test "x$BOOT_JDK" != x; then
22574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22575
22576  # Input might be given as Windows format, start by converting to
22577  # unix format.
22578  path="$BOOT_JDK"
22579  new_path=`$CYGPATH -u "$path"`
22580
22581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22584  # "foo.exe" is OK but "foo" is an error.
22585  #
22586  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22587  # It is also a way to make sure we got the proper file name for the real test later on.
22588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22589  if test "x$test_shortpath" = x; then
22590    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22591$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22592    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22593  fi
22594
22595  # Call helper function which possibly converts this using DOS-style short mode.
22596  # If so, the updated path is stored in $new_path.
22597
22598  input_path="$new_path"
22599  # Check if we need to convert this using DOS-style short mode. If the path
22600  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22601  # take no chances and rewrite it.
22602  # Note: m4 eats our [], so we need to use [ and ] instead.
22603  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22604  if test "x$has_forbidden_chars" != x; then
22605    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22606    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22607    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22608    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22609      # Going to short mode and back again did indeed matter. Since short mode is
22610      # case insensitive, let's make it lowercase to improve readability.
22611      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22612      # Now convert it back to Unix-style (cygpath)
22613      input_path=`$CYGPATH -u "$shortmode_path"`
22614      new_path="$input_path"
22615    fi
22616  fi
22617
22618  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22619  if test "x$test_cygdrive_prefix" = x; then
22620    # As a simple fix, exclude /usr/bin since it's not a real path.
22621    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22622      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22623      # a path prefixed by /cygdrive for fixpath to work.
22624      new_path="$CYGWIN_ROOT_PATH$input_path"
22625    fi
22626  fi
22627
22628
22629  if test "x$path" != "x$new_path"; then
22630    BOOT_JDK="$new_path"
22631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22632$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22633  fi
22634
22635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22636
22637  path="$BOOT_JDK"
22638  has_colon=`$ECHO $path | $GREP ^.:`
22639  new_path="$path"
22640  if test "x$has_colon" = x; then
22641    # Not in mixed or Windows style, start by that.
22642    new_path=`cmd //c echo $path`
22643  fi
22644
22645
22646  input_path="$new_path"
22647  # Check if we need to convert this using DOS-style short mode. If the path
22648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22649  # take no chances and rewrite it.
22650  # Note: m4 eats our [], so we need to use [ and ] instead.
22651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22652  if test "x$has_forbidden_chars" != x; then
22653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22655  fi
22656
22657
22658  windows_path="$new_path"
22659  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22660    unix_path=`$CYGPATH -u "$windows_path"`
22661    new_path="$unix_path"
22662  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22663    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22664    new_path="$unix_path"
22665  fi
22666
22667  if test "x$path" != "x$new_path"; then
22668    BOOT_JDK="$new_path"
22669    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22670$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22671  fi
22672
22673  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22674  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22675
22676    else
22677      # We're on a unix platform. Hooray! :)
22678      path="$BOOT_JDK"
22679      has_space=`$ECHO "$path" | $GREP " "`
22680      if test "x$has_space" != x; then
22681        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22682$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22683        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22684      fi
22685
22686      # Use eval to expand a potential ~
22687      eval path="$path"
22688      if test ! -f "$path" && test ! -d "$path"; then
22689        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22690      fi
22691
22692      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22693    fi
22694  fi
22695
22696            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22697$as_echo_n "checking for Boot JDK... " >&6; }
22698            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22699$as_echo "$BOOT_JDK" >&6; }
22700            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22701$as_echo_n "checking Boot JDK version... " >&6; }
22702            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22703            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22704$as_echo "$BOOT_JDK_VERSION" >&6; }
22705          fi # end check jdk version
22706        fi # end check javac
22707      fi # end check java
22708    fi # end check boot jdk found
22709  fi
22710
22711    done
22712  fi
22713
22714  fi
22715
22716
22717    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22718    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22719      # Do we have a bin/java?
22720      if test ! -x "$BOOT_JDK/bin/java"; then
22721        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22723        BOOT_JDK_FOUND=no
22724      else
22725        # Do we have a bin/javac?
22726        if test ! -x "$BOOT_JDK/bin/javac"; then
22727          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22728$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22729          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22730$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22731          BOOT_JDK_FOUND=no
22732        else
22733          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22734          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22735
22736          # Extra M4 quote needed to protect [] in grep expression.
22737          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22738          if test "x$FOUND_CORRECT_VERSION" = x; then
22739            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22741            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22742$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22743            BOOT_JDK_FOUND=no
22744          else
22745            # We're done! :-)
22746            BOOT_JDK_FOUND=yes
22747
22748  # Only process if variable expands to non-empty
22749
22750  if test "x$BOOT_JDK" != x; then
22751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22752
22753  # Input might be given as Windows format, start by converting to
22754  # unix format.
22755  path="$BOOT_JDK"
22756  new_path=`$CYGPATH -u "$path"`
22757
22758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22761  # "foo.exe" is OK but "foo" is an error.
22762  #
22763  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22764  # It is also a way to make sure we got the proper file name for the real test later on.
22765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22766  if test "x$test_shortpath" = x; then
22767    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22768$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22769    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22770  fi
22771
22772  # Call helper function which possibly converts this using DOS-style short mode.
22773  # If so, the updated path is stored in $new_path.
22774
22775  input_path="$new_path"
22776  # Check if we need to convert this using DOS-style short mode. If the path
22777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22778  # take no chances and rewrite it.
22779  # Note: m4 eats our [], so we need to use [ and ] instead.
22780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22781  if test "x$has_forbidden_chars" != x; then
22782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22783    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22784    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22785    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22786      # Going to short mode and back again did indeed matter. Since short mode is
22787      # case insensitive, let's make it lowercase to improve readability.
22788      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22789      # Now convert it back to Unix-style (cygpath)
22790      input_path=`$CYGPATH -u "$shortmode_path"`
22791      new_path="$input_path"
22792    fi
22793  fi
22794
22795  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22796  if test "x$test_cygdrive_prefix" = x; then
22797    # As a simple fix, exclude /usr/bin since it's not a real path.
22798    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22799      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22800      # a path prefixed by /cygdrive for fixpath to work.
22801      new_path="$CYGWIN_ROOT_PATH$input_path"
22802    fi
22803  fi
22804
22805
22806  if test "x$path" != "x$new_path"; then
22807    BOOT_JDK="$new_path"
22808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22809$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22810  fi
22811
22812    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22813
22814  path="$BOOT_JDK"
22815  has_colon=`$ECHO $path | $GREP ^.:`
22816  new_path="$path"
22817  if test "x$has_colon" = x; then
22818    # Not in mixed or Windows style, start by that.
22819    new_path=`cmd //c echo $path`
22820  fi
22821
22822
22823  input_path="$new_path"
22824  # Check if we need to convert this using DOS-style short mode. If the path
22825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22826  # take no chances and rewrite it.
22827  # Note: m4 eats our [], so we need to use [ and ] instead.
22828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22829  if test "x$has_forbidden_chars" != x; then
22830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22832  fi
22833
22834
22835  windows_path="$new_path"
22836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22837    unix_path=`$CYGPATH -u "$windows_path"`
22838    new_path="$unix_path"
22839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22841    new_path="$unix_path"
22842  fi
22843
22844  if test "x$path" != "x$new_path"; then
22845    BOOT_JDK="$new_path"
22846    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22847$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22848  fi
22849
22850  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22851  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22852
22853    else
22854      # We're on a unix platform. Hooray! :)
22855      path="$BOOT_JDK"
22856      has_space=`$ECHO "$path" | $GREP " "`
22857      if test "x$has_space" != x; then
22858        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22859$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22860        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22861      fi
22862
22863      # Use eval to expand a potential ~
22864      eval path="$path"
22865      if test ! -f "$path" && test ! -d "$path"; then
22866        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22867      fi
22868
22869      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22870    fi
22871  fi
22872
22873            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22874$as_echo_n "checking for Boot JDK... " >&6; }
22875            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22876$as_echo "$BOOT_JDK" >&6; }
22877            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22878$as_echo_n "checking Boot JDK version... " >&6; }
22879            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22880            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22881$as_echo "$BOOT_JDK_VERSION" >&6; }
22882          fi # end check jdk version
22883        fi # end check javac
22884      fi # end check java
22885    fi # end check boot jdk found
22886  fi
22887
22888
22889  if test "x$BOOT_JDK_FOUND" = xno; then
22890    # Now execute the test
22891
22892  if test "x$PROGRAMW6432" != x; then
22893    VIRTUAL_DIR="$PROGRAMW6432/Java"
22894
22895  windows_path="$VIRTUAL_DIR"
22896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22897    unix_path=`$CYGPATH -u "$windows_path"`
22898    VIRTUAL_DIR="$unix_path"
22899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22901    VIRTUAL_DIR="$unix_path"
22902  fi
22903
22904
22905  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22906  BOOT_JDK_SUFFIX=""
22907  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22908  if test "x$ALL_JDKS_FOUND" != x; then
22909    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22910
22911  if test "x$BOOT_JDK_FOUND" = xno; then
22912    # Now execute the test
22913
22914        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22915        if test -d "$BOOT_JDK"; then
22916          BOOT_JDK_FOUND=maybe
22917          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22918$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22919        fi
22920
22921
22922    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22923    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22924      # Do we have a bin/java?
22925      if test ! -x "$BOOT_JDK/bin/java"; then
22926        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22928        BOOT_JDK_FOUND=no
22929      else
22930        # Do we have a bin/javac?
22931        if test ! -x "$BOOT_JDK/bin/javac"; then
22932          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22933$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22934          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22935$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22936          BOOT_JDK_FOUND=no
22937        else
22938          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22939          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22940
22941          # Extra M4 quote needed to protect [] in grep expression.
22942          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22943          if test "x$FOUND_CORRECT_VERSION" = x; then
22944            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22945$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22946            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22947$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22948            BOOT_JDK_FOUND=no
22949          else
22950            # We're done! :-)
22951            BOOT_JDK_FOUND=yes
22952
22953  # Only process if variable expands to non-empty
22954
22955  if test "x$BOOT_JDK" != x; then
22956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22957
22958  # Input might be given as Windows format, start by converting to
22959  # unix format.
22960  path="$BOOT_JDK"
22961  new_path=`$CYGPATH -u "$path"`
22962
22963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22966  # "foo.exe" is OK but "foo" is an error.
22967  #
22968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22969  # It is also a way to make sure we got the proper file name for the real test later on.
22970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22971  if test "x$test_shortpath" = x; then
22972    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22973$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22974    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22975  fi
22976
22977  # Call helper function which possibly converts this using DOS-style short mode.
22978  # If so, the updated path is stored in $new_path.
22979
22980  input_path="$new_path"
22981  # Check if we need to convert this using DOS-style short mode. If the path
22982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22983  # take no chances and rewrite it.
22984  # Note: m4 eats our [], so we need to use [ and ] instead.
22985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22986  if test "x$has_forbidden_chars" != x; then
22987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22991      # Going to short mode and back again did indeed matter. Since short mode is
22992      # case insensitive, let's make it lowercase to improve readability.
22993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22994      # Now convert it back to Unix-style (cygpath)
22995      input_path=`$CYGPATH -u "$shortmode_path"`
22996      new_path="$input_path"
22997    fi
22998  fi
22999
23000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23001  if test "x$test_cygdrive_prefix" = x; then
23002    # As a simple fix, exclude /usr/bin since it's not a real path.
23003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23005      # a path prefixed by /cygdrive for fixpath to work.
23006      new_path="$CYGWIN_ROOT_PATH$input_path"
23007    fi
23008  fi
23009
23010
23011  if test "x$path" != "x$new_path"; then
23012    BOOT_JDK="$new_path"
23013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23014$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23015  fi
23016
23017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23018
23019  path="$BOOT_JDK"
23020  has_colon=`$ECHO $path | $GREP ^.:`
23021  new_path="$path"
23022  if test "x$has_colon" = x; then
23023    # Not in mixed or Windows style, start by that.
23024    new_path=`cmd //c echo $path`
23025  fi
23026
23027
23028  input_path="$new_path"
23029  # Check if we need to convert this using DOS-style short mode. If the path
23030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23031  # take no chances and rewrite it.
23032  # Note: m4 eats our [], so we need to use [ and ] instead.
23033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23034  if test "x$has_forbidden_chars" != x; then
23035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23037  fi
23038
23039
23040  windows_path="$new_path"
23041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23042    unix_path=`$CYGPATH -u "$windows_path"`
23043    new_path="$unix_path"
23044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23046    new_path="$unix_path"
23047  fi
23048
23049  if test "x$path" != "x$new_path"; then
23050    BOOT_JDK="$new_path"
23051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23052$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23053  fi
23054
23055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23057
23058    else
23059      # We're on a unix platform. Hooray! :)
23060      path="$BOOT_JDK"
23061      has_space=`$ECHO "$path" | $GREP " "`
23062      if test "x$has_space" != x; then
23063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23066      fi
23067
23068      # Use eval to expand a potential ~
23069      eval path="$path"
23070      if test ! -f "$path" && test ! -d "$path"; then
23071        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23072      fi
23073
23074      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23075    fi
23076  fi
23077
23078            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23079$as_echo_n "checking for Boot JDK... " >&6; }
23080            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23081$as_echo "$BOOT_JDK" >&6; }
23082            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23083$as_echo_n "checking Boot JDK version... " >&6; }
23084            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23085            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23086$as_echo "$BOOT_JDK_VERSION" >&6; }
23087          fi # end check jdk version
23088        fi # end check javac
23089      fi # end check java
23090    fi # end check boot jdk found
23091  fi
23092
23093    done
23094  fi
23095
23096  fi
23097
23098
23099    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23100    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23101      # Do we have a bin/java?
23102      if test ! -x "$BOOT_JDK/bin/java"; then
23103        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23105        BOOT_JDK_FOUND=no
23106      else
23107        # Do we have a bin/javac?
23108        if test ! -x "$BOOT_JDK/bin/javac"; then
23109          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23110$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23111          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23112$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23113          BOOT_JDK_FOUND=no
23114        else
23115          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23116          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23117
23118          # Extra M4 quote needed to protect [] in grep expression.
23119          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23120          if test "x$FOUND_CORRECT_VERSION" = x; then
23121            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23123            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23124$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23125            BOOT_JDK_FOUND=no
23126          else
23127            # We're done! :-)
23128            BOOT_JDK_FOUND=yes
23129
23130  # Only process if variable expands to non-empty
23131
23132  if test "x$BOOT_JDK" != x; then
23133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23134
23135  # Input might be given as Windows format, start by converting to
23136  # unix format.
23137  path="$BOOT_JDK"
23138  new_path=`$CYGPATH -u "$path"`
23139
23140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23143  # "foo.exe" is OK but "foo" is an error.
23144  #
23145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23146  # It is also a way to make sure we got the proper file name for the real test later on.
23147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23148  if test "x$test_shortpath" = x; then
23149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23151    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23152  fi
23153
23154  # Call helper function which possibly converts this using DOS-style short mode.
23155  # If so, the updated path is stored in $new_path.
23156
23157  input_path="$new_path"
23158  # Check if we need to convert this using DOS-style short mode. If the path
23159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23160  # take no chances and rewrite it.
23161  # Note: m4 eats our [], so we need to use [ and ] instead.
23162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23163  if test "x$has_forbidden_chars" != x; then
23164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23168      # Going to short mode and back again did indeed matter. Since short mode is
23169      # case insensitive, let's make it lowercase to improve readability.
23170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23171      # Now convert it back to Unix-style (cygpath)
23172      input_path=`$CYGPATH -u "$shortmode_path"`
23173      new_path="$input_path"
23174    fi
23175  fi
23176
23177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23178  if test "x$test_cygdrive_prefix" = x; then
23179    # As a simple fix, exclude /usr/bin since it's not a real path.
23180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23182      # a path prefixed by /cygdrive for fixpath to work.
23183      new_path="$CYGWIN_ROOT_PATH$input_path"
23184    fi
23185  fi
23186
23187
23188  if test "x$path" != "x$new_path"; then
23189    BOOT_JDK="$new_path"
23190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23191$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23192  fi
23193
23194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23195
23196  path="$BOOT_JDK"
23197  has_colon=`$ECHO $path | $GREP ^.:`
23198  new_path="$path"
23199  if test "x$has_colon" = x; then
23200    # Not in mixed or Windows style, start by that.
23201    new_path=`cmd //c echo $path`
23202  fi
23203
23204
23205  input_path="$new_path"
23206  # Check if we need to convert this using DOS-style short mode. If the path
23207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23208  # take no chances and rewrite it.
23209  # Note: m4 eats our [], so we need to use [ and ] instead.
23210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23211  if test "x$has_forbidden_chars" != x; then
23212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23214  fi
23215
23216
23217  windows_path="$new_path"
23218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23219    unix_path=`$CYGPATH -u "$windows_path"`
23220    new_path="$unix_path"
23221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23223    new_path="$unix_path"
23224  fi
23225
23226  if test "x$path" != "x$new_path"; then
23227    BOOT_JDK="$new_path"
23228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23229$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23230  fi
23231
23232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23234
23235    else
23236      # We're on a unix platform. Hooray! :)
23237      path="$BOOT_JDK"
23238      has_space=`$ECHO "$path" | $GREP " "`
23239      if test "x$has_space" != x; then
23240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23241$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23243      fi
23244
23245      # Use eval to expand a potential ~
23246      eval path="$path"
23247      if test ! -f "$path" && test ! -d "$path"; then
23248        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23249      fi
23250
23251      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23252    fi
23253  fi
23254
23255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23256$as_echo_n "checking for Boot JDK... " >&6; }
23257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23258$as_echo "$BOOT_JDK" >&6; }
23259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23260$as_echo_n "checking Boot JDK version... " >&6; }
23261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23263$as_echo "$BOOT_JDK_VERSION" >&6; }
23264          fi # end check jdk version
23265        fi # end check javac
23266      fi # end check java
23267    fi # end check boot jdk found
23268  fi
23269
23270
23271  if test "x$BOOT_JDK_FOUND" = xno; then
23272    # Now execute the test
23273
23274  if test "x$PROGRAMFILES" != x; then
23275    VIRTUAL_DIR="$PROGRAMFILES/Java"
23276
23277  windows_path="$VIRTUAL_DIR"
23278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23279    unix_path=`$CYGPATH -u "$windows_path"`
23280    VIRTUAL_DIR="$unix_path"
23281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23283    VIRTUAL_DIR="$unix_path"
23284  fi
23285
23286
23287  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23288  BOOT_JDK_SUFFIX=""
23289  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23290  if test "x$ALL_JDKS_FOUND" != x; then
23291    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23292
23293  if test "x$BOOT_JDK_FOUND" = xno; then
23294    # Now execute the test
23295
23296        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23297        if test -d "$BOOT_JDK"; then
23298          BOOT_JDK_FOUND=maybe
23299          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23300$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23301        fi
23302
23303
23304    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23305    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23306      # Do we have a bin/java?
23307      if test ! -x "$BOOT_JDK/bin/java"; then
23308        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23310        BOOT_JDK_FOUND=no
23311      else
23312        # Do we have a bin/javac?
23313        if test ! -x "$BOOT_JDK/bin/javac"; then
23314          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23315$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23316          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23317$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23318          BOOT_JDK_FOUND=no
23319        else
23320          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23321          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23322
23323          # Extra M4 quote needed to protect [] in grep expression.
23324          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23325          if test "x$FOUND_CORRECT_VERSION" = x; then
23326            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23327$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23328            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23329$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23330            BOOT_JDK_FOUND=no
23331          else
23332            # We're done! :-)
23333            BOOT_JDK_FOUND=yes
23334
23335  # Only process if variable expands to non-empty
23336
23337  if test "x$BOOT_JDK" != x; then
23338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23339
23340  # Input might be given as Windows format, start by converting to
23341  # unix format.
23342  path="$BOOT_JDK"
23343  new_path=`$CYGPATH -u "$path"`
23344
23345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23348  # "foo.exe" is OK but "foo" is an error.
23349  #
23350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23351  # It is also a way to make sure we got the proper file name for the real test later on.
23352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23353  if test "x$test_shortpath" = x; then
23354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23356    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23357  fi
23358
23359  # Call helper function which possibly converts this using DOS-style short mode.
23360  # If so, the updated path is stored in $new_path.
23361
23362  input_path="$new_path"
23363  # Check if we need to convert this using DOS-style short mode. If the path
23364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23365  # take no chances and rewrite it.
23366  # Note: m4 eats our [], so we need to use [ and ] instead.
23367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23368  if test "x$has_forbidden_chars" != x; then
23369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23373      # Going to short mode and back again did indeed matter. Since short mode is
23374      # case insensitive, let's make it lowercase to improve readability.
23375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23376      # Now convert it back to Unix-style (cygpath)
23377      input_path=`$CYGPATH -u "$shortmode_path"`
23378      new_path="$input_path"
23379    fi
23380  fi
23381
23382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23383  if test "x$test_cygdrive_prefix" = x; then
23384    # As a simple fix, exclude /usr/bin since it's not a real path.
23385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23387      # a path prefixed by /cygdrive for fixpath to work.
23388      new_path="$CYGWIN_ROOT_PATH$input_path"
23389    fi
23390  fi
23391
23392
23393  if test "x$path" != "x$new_path"; then
23394    BOOT_JDK="$new_path"
23395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23396$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23397  fi
23398
23399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23400
23401  path="$BOOT_JDK"
23402  has_colon=`$ECHO $path | $GREP ^.:`
23403  new_path="$path"
23404  if test "x$has_colon" = x; then
23405    # Not in mixed or Windows style, start by that.
23406    new_path=`cmd //c echo $path`
23407  fi
23408
23409
23410  input_path="$new_path"
23411  # Check if we need to convert this using DOS-style short mode. If the path
23412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23413  # take no chances and rewrite it.
23414  # Note: m4 eats our [], so we need to use [ and ] instead.
23415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23416  if test "x$has_forbidden_chars" != x; then
23417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23419  fi
23420
23421
23422  windows_path="$new_path"
23423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23424    unix_path=`$CYGPATH -u "$windows_path"`
23425    new_path="$unix_path"
23426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23428    new_path="$unix_path"
23429  fi
23430
23431  if test "x$path" != "x$new_path"; then
23432    BOOT_JDK="$new_path"
23433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23434$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23435  fi
23436
23437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23439
23440    else
23441      # We're on a unix platform. Hooray! :)
23442      path="$BOOT_JDK"
23443      has_space=`$ECHO "$path" | $GREP " "`
23444      if test "x$has_space" != x; then
23445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23446$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23448      fi
23449
23450      # Use eval to expand a potential ~
23451      eval path="$path"
23452      if test ! -f "$path" && test ! -d "$path"; then
23453        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23454      fi
23455
23456      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23457    fi
23458  fi
23459
23460            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23461$as_echo_n "checking for Boot JDK... " >&6; }
23462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23463$as_echo "$BOOT_JDK" >&6; }
23464            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23465$as_echo_n "checking Boot JDK version... " >&6; }
23466            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23467            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23468$as_echo "$BOOT_JDK_VERSION" >&6; }
23469          fi # end check jdk version
23470        fi # end check javac
23471      fi # end check java
23472    fi # end check boot jdk found
23473  fi
23474
23475    done
23476  fi
23477
23478  fi
23479
23480
23481    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23482    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23483      # Do we have a bin/java?
23484      if test ! -x "$BOOT_JDK/bin/java"; then
23485        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23486$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23487        BOOT_JDK_FOUND=no
23488      else
23489        # Do we have a bin/javac?
23490        if test ! -x "$BOOT_JDK/bin/javac"; then
23491          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23492$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23493          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23494$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23495          BOOT_JDK_FOUND=no
23496        else
23497          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23498          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23499
23500          # Extra M4 quote needed to protect [] in grep expression.
23501          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23502          if test "x$FOUND_CORRECT_VERSION" = x; then
23503            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23504$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23505            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23506$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23507            BOOT_JDK_FOUND=no
23508          else
23509            # We're done! :-)
23510            BOOT_JDK_FOUND=yes
23511
23512  # Only process if variable expands to non-empty
23513
23514  if test "x$BOOT_JDK" != x; then
23515    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23516
23517  # Input might be given as Windows format, start by converting to
23518  # unix format.
23519  path="$BOOT_JDK"
23520  new_path=`$CYGPATH -u "$path"`
23521
23522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23525  # "foo.exe" is OK but "foo" is an error.
23526  #
23527  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23528  # It is also a way to make sure we got the proper file name for the real test later on.
23529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23530  if test "x$test_shortpath" = x; then
23531    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23532$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23533    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23534  fi
23535
23536  # Call helper function which possibly converts this using DOS-style short mode.
23537  # If so, the updated path is stored in $new_path.
23538
23539  input_path="$new_path"
23540  # Check if we need to convert this using DOS-style short mode. If the path
23541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23542  # take no chances and rewrite it.
23543  # Note: m4 eats our [], so we need to use [ and ] instead.
23544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23545  if test "x$has_forbidden_chars" != x; then
23546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23550      # Going to short mode and back again did indeed matter. Since short mode is
23551      # case insensitive, let's make it lowercase to improve readability.
23552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23553      # Now convert it back to Unix-style (cygpath)
23554      input_path=`$CYGPATH -u "$shortmode_path"`
23555      new_path="$input_path"
23556    fi
23557  fi
23558
23559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23560  if test "x$test_cygdrive_prefix" = x; then
23561    # As a simple fix, exclude /usr/bin since it's not a real path.
23562    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23564      # a path prefixed by /cygdrive for fixpath to work.
23565      new_path="$CYGWIN_ROOT_PATH$input_path"
23566    fi
23567  fi
23568
23569
23570  if test "x$path" != "x$new_path"; then
23571    BOOT_JDK="$new_path"
23572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23574  fi
23575
23576    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23577
23578  path="$BOOT_JDK"
23579  has_colon=`$ECHO $path | $GREP ^.:`
23580  new_path="$path"
23581  if test "x$has_colon" = x; then
23582    # Not in mixed or Windows style, start by that.
23583    new_path=`cmd //c echo $path`
23584  fi
23585
23586
23587  input_path="$new_path"
23588  # Check if we need to convert this using DOS-style short mode. If the path
23589  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23590  # take no chances and rewrite it.
23591  # Note: m4 eats our [], so we need to use [ and ] instead.
23592  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23593  if test "x$has_forbidden_chars" != x; then
23594    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23595    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23596  fi
23597
23598
23599  windows_path="$new_path"
23600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23601    unix_path=`$CYGPATH -u "$windows_path"`
23602    new_path="$unix_path"
23603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23604    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23605    new_path="$unix_path"
23606  fi
23607
23608  if test "x$path" != "x$new_path"; then
23609    BOOT_JDK="$new_path"
23610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23611$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23612  fi
23613
23614  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23615  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23616
23617    else
23618      # We're on a unix platform. Hooray! :)
23619      path="$BOOT_JDK"
23620      has_space=`$ECHO "$path" | $GREP " "`
23621      if test "x$has_space" != x; then
23622        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23623$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23624        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23625      fi
23626
23627      # Use eval to expand a potential ~
23628      eval path="$path"
23629      if test ! -f "$path" && test ! -d "$path"; then
23630        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23631      fi
23632
23633      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23634    fi
23635  fi
23636
23637            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23638$as_echo_n "checking for Boot JDK... " >&6; }
23639            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23640$as_echo "$BOOT_JDK" >&6; }
23641            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23642$as_echo_n "checking Boot JDK version... " >&6; }
23643            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23645$as_echo "$BOOT_JDK_VERSION" >&6; }
23646          fi # end check jdk version
23647        fi # end check javac
23648      fi # end check java
23649    fi # end check boot jdk found
23650  fi
23651
23652
23653  if test "x$BOOT_JDK_FOUND" = xno; then
23654    # Now execute the test
23655
23656  if test "x$ProgramFiles" != x; then
23657    VIRTUAL_DIR="$ProgramFiles/Java"
23658
23659  windows_path="$VIRTUAL_DIR"
23660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23661    unix_path=`$CYGPATH -u "$windows_path"`
23662    VIRTUAL_DIR="$unix_path"
23663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23665    VIRTUAL_DIR="$unix_path"
23666  fi
23667
23668
23669  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23670  BOOT_JDK_SUFFIX=""
23671  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23672  if test "x$ALL_JDKS_FOUND" != x; then
23673    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23674
23675  if test "x$BOOT_JDK_FOUND" = xno; then
23676    # Now execute the test
23677
23678        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23679        if test -d "$BOOT_JDK"; then
23680          BOOT_JDK_FOUND=maybe
23681          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23682$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23683        fi
23684
23685
23686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23687    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23688      # Do we have a bin/java?
23689      if test ! -x "$BOOT_JDK/bin/java"; then
23690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23692        BOOT_JDK_FOUND=no
23693      else
23694        # Do we have a bin/javac?
23695        if test ! -x "$BOOT_JDK/bin/javac"; then
23696          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23697$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23698          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23699$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23700          BOOT_JDK_FOUND=no
23701        else
23702          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23703          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23704
23705          # Extra M4 quote needed to protect [] in grep expression.
23706          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23707          if test "x$FOUND_CORRECT_VERSION" = x; then
23708            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23710            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23711$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23712            BOOT_JDK_FOUND=no
23713          else
23714            # We're done! :-)
23715            BOOT_JDK_FOUND=yes
23716
23717  # Only process if variable expands to non-empty
23718
23719  if test "x$BOOT_JDK" != x; then
23720    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23721
23722  # Input might be given as Windows format, start by converting to
23723  # unix format.
23724  path="$BOOT_JDK"
23725  new_path=`$CYGPATH -u "$path"`
23726
23727  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23728  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23729  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23730  # "foo.exe" is OK but "foo" is an error.
23731  #
23732  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23733  # It is also a way to make sure we got the proper file name for the real test later on.
23734  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23735  if test "x$test_shortpath" = x; then
23736    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23737$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23738    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23739  fi
23740
23741  # Call helper function which possibly converts this using DOS-style short mode.
23742  # If so, the updated path is stored in $new_path.
23743
23744  input_path="$new_path"
23745  # Check if we need to convert this using DOS-style short mode. If the path
23746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23747  # take no chances and rewrite it.
23748  # Note: m4 eats our [], so we need to use [ and ] instead.
23749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23750  if test "x$has_forbidden_chars" != x; then
23751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23752    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23753    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23754    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23755      # Going to short mode and back again did indeed matter. Since short mode is
23756      # case insensitive, let's make it lowercase to improve readability.
23757      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23758      # Now convert it back to Unix-style (cygpath)
23759      input_path=`$CYGPATH -u "$shortmode_path"`
23760      new_path="$input_path"
23761    fi
23762  fi
23763
23764  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23765  if test "x$test_cygdrive_prefix" = x; then
23766    # As a simple fix, exclude /usr/bin since it's not a real path.
23767    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23768      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23769      # a path prefixed by /cygdrive for fixpath to work.
23770      new_path="$CYGWIN_ROOT_PATH$input_path"
23771    fi
23772  fi
23773
23774
23775  if test "x$path" != "x$new_path"; then
23776    BOOT_JDK="$new_path"
23777    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23778$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23779  fi
23780
23781    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23782
23783  path="$BOOT_JDK"
23784  has_colon=`$ECHO $path | $GREP ^.:`
23785  new_path="$path"
23786  if test "x$has_colon" = x; then
23787    # Not in mixed or Windows style, start by that.
23788    new_path=`cmd //c echo $path`
23789  fi
23790
23791
23792  input_path="$new_path"
23793  # Check if we need to convert this using DOS-style short mode. If the path
23794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23795  # take no chances and rewrite it.
23796  # Note: m4 eats our [], so we need to use [ and ] instead.
23797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23798  if test "x$has_forbidden_chars" != x; then
23799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23800    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23801  fi
23802
23803
23804  windows_path="$new_path"
23805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23806    unix_path=`$CYGPATH -u "$windows_path"`
23807    new_path="$unix_path"
23808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23810    new_path="$unix_path"
23811  fi
23812
23813  if test "x$path" != "x$new_path"; then
23814    BOOT_JDK="$new_path"
23815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23817  fi
23818
23819  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23820  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23821
23822    else
23823      # We're on a unix platform. Hooray! :)
23824      path="$BOOT_JDK"
23825      has_space=`$ECHO "$path" | $GREP " "`
23826      if test "x$has_space" != x; then
23827        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23828$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23829        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23830      fi
23831
23832      # Use eval to expand a potential ~
23833      eval path="$path"
23834      if test ! -f "$path" && test ! -d "$path"; then
23835        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23836      fi
23837
23838      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23839    fi
23840  fi
23841
23842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23843$as_echo_n "checking for Boot JDK... " >&6; }
23844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23845$as_echo "$BOOT_JDK" >&6; }
23846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23847$as_echo_n "checking Boot JDK version... " >&6; }
23848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23850$as_echo "$BOOT_JDK_VERSION" >&6; }
23851          fi # end check jdk version
23852        fi # end check javac
23853      fi # end check java
23854    fi # end check boot jdk found
23855  fi
23856
23857    done
23858  fi
23859
23860  fi
23861
23862
23863    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23864    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23865      # Do we have a bin/java?
23866      if test ! -x "$BOOT_JDK/bin/java"; then
23867        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23868$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23869        BOOT_JDK_FOUND=no
23870      else
23871        # Do we have a bin/javac?
23872        if test ! -x "$BOOT_JDK/bin/javac"; then
23873          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23874$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23875          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23876$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23877          BOOT_JDK_FOUND=no
23878        else
23879          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23880          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23881
23882          # Extra M4 quote needed to protect [] in grep expression.
23883          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23884          if test "x$FOUND_CORRECT_VERSION" = x; then
23885            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23886$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23887            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23888$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23889            BOOT_JDK_FOUND=no
23890          else
23891            # We're done! :-)
23892            BOOT_JDK_FOUND=yes
23893
23894  # Only process if variable expands to non-empty
23895
23896  if test "x$BOOT_JDK" != x; then
23897    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23898
23899  # Input might be given as Windows format, start by converting to
23900  # unix format.
23901  path="$BOOT_JDK"
23902  new_path=`$CYGPATH -u "$path"`
23903
23904  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23905  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23906  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23907  # "foo.exe" is OK but "foo" is an error.
23908  #
23909  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23910  # It is also a way to make sure we got the proper file name for the real test later on.
23911  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23912  if test "x$test_shortpath" = x; then
23913    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23914$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23915    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23916  fi
23917
23918  # Call helper function which possibly converts this using DOS-style short mode.
23919  # If so, the updated path is stored in $new_path.
23920
23921  input_path="$new_path"
23922  # Check if we need to convert this using DOS-style short mode. If the path
23923  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23924  # take no chances and rewrite it.
23925  # Note: m4 eats our [], so we need to use [ and ] instead.
23926  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23927  if test "x$has_forbidden_chars" != x; then
23928    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23929    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23930    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23931    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23932      # Going to short mode and back again did indeed matter. Since short mode is
23933      # case insensitive, let's make it lowercase to improve readability.
23934      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23935      # Now convert it back to Unix-style (cygpath)
23936      input_path=`$CYGPATH -u "$shortmode_path"`
23937      new_path="$input_path"
23938    fi
23939  fi
23940
23941  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23942  if test "x$test_cygdrive_prefix" = x; then
23943    # As a simple fix, exclude /usr/bin since it's not a real path.
23944    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23945      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23946      # a path prefixed by /cygdrive for fixpath to work.
23947      new_path="$CYGWIN_ROOT_PATH$input_path"
23948    fi
23949  fi
23950
23951
23952  if test "x$path" != "x$new_path"; then
23953    BOOT_JDK="$new_path"
23954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23955$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23956  fi
23957
23958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23959
23960  path="$BOOT_JDK"
23961  has_colon=`$ECHO $path | $GREP ^.:`
23962  new_path="$path"
23963  if test "x$has_colon" = x; then
23964    # Not in mixed or Windows style, start by that.
23965    new_path=`cmd //c echo $path`
23966  fi
23967
23968
23969  input_path="$new_path"
23970  # Check if we need to convert this using DOS-style short mode. If the path
23971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23972  # take no chances and rewrite it.
23973  # Note: m4 eats our [], so we need to use [ and ] instead.
23974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23975  if test "x$has_forbidden_chars" != x; then
23976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23978  fi
23979
23980
23981  windows_path="$new_path"
23982  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23983    unix_path=`$CYGPATH -u "$windows_path"`
23984    new_path="$unix_path"
23985  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23986    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23987    new_path="$unix_path"
23988  fi
23989
23990  if test "x$path" != "x$new_path"; then
23991    BOOT_JDK="$new_path"
23992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23993$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23994  fi
23995
23996  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23997  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23998
23999    else
24000      # We're on a unix platform. Hooray! :)
24001      path="$BOOT_JDK"
24002      has_space=`$ECHO "$path" | $GREP " "`
24003      if test "x$has_space" != x; then
24004        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24005$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24006        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24007      fi
24008
24009      # Use eval to expand a potential ~
24010      eval path="$path"
24011      if test ! -f "$path" && test ! -d "$path"; then
24012        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24013      fi
24014
24015      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24016    fi
24017  fi
24018
24019            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24020$as_echo_n "checking for Boot JDK... " >&6; }
24021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24022$as_echo "$BOOT_JDK" >&6; }
24023            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24024$as_echo_n "checking Boot JDK version... " >&6; }
24025            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24027$as_echo "$BOOT_JDK_VERSION" >&6; }
24028          fi # end check jdk version
24029        fi # end check javac
24030      fi # end check java
24031    fi # end check boot jdk found
24032  fi
24033
24034
24035  if test "x$BOOT_JDK_FOUND" = xno; then
24036    # Now execute the test
24037
24038  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
24039  BOOT_JDK_SUFFIX=""
24040  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24041  if test "x$ALL_JDKS_FOUND" != x; then
24042    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24043
24044  if test "x$BOOT_JDK_FOUND" = xno; then
24045    # Now execute the test
24046
24047        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24048        if test -d "$BOOT_JDK"; then
24049          BOOT_JDK_FOUND=maybe
24050          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24051$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24052        fi
24053
24054
24055    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24056    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24057      # Do we have a bin/java?
24058      if test ! -x "$BOOT_JDK/bin/java"; then
24059        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24061        BOOT_JDK_FOUND=no
24062      else
24063        # Do we have a bin/javac?
24064        if test ! -x "$BOOT_JDK/bin/javac"; then
24065          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24067          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24068$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24069          BOOT_JDK_FOUND=no
24070        else
24071          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24072          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24073
24074          # Extra M4 quote needed to protect [] in grep expression.
24075          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24076          if test "x$FOUND_CORRECT_VERSION" = x; then
24077            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24079            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24080$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24081            BOOT_JDK_FOUND=no
24082          else
24083            # We're done! :-)
24084            BOOT_JDK_FOUND=yes
24085
24086  # Only process if variable expands to non-empty
24087
24088  if test "x$BOOT_JDK" != x; then
24089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24090
24091  # Input might be given as Windows format, start by converting to
24092  # unix format.
24093  path="$BOOT_JDK"
24094  new_path=`$CYGPATH -u "$path"`
24095
24096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24099  # "foo.exe" is OK but "foo" is an error.
24100  #
24101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24102  # It is also a way to make sure we got the proper file name for the real test later on.
24103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24104  if test "x$test_shortpath" = x; then
24105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24108  fi
24109
24110  # Call helper function which possibly converts this using DOS-style short mode.
24111  # If so, the updated path is stored in $new_path.
24112
24113  input_path="$new_path"
24114  # Check if we need to convert this using DOS-style short mode. If the path
24115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24116  # take no chances and rewrite it.
24117  # Note: m4 eats our [], so we need to use [ and ] instead.
24118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24119  if test "x$has_forbidden_chars" != x; then
24120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24124      # Going to short mode and back again did indeed matter. Since short mode is
24125      # case insensitive, let's make it lowercase to improve readability.
24126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24127      # Now convert it back to Unix-style (cygpath)
24128      input_path=`$CYGPATH -u "$shortmode_path"`
24129      new_path="$input_path"
24130    fi
24131  fi
24132
24133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24134  if test "x$test_cygdrive_prefix" = x; then
24135    # As a simple fix, exclude /usr/bin since it's not a real path.
24136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24138      # a path prefixed by /cygdrive for fixpath to work.
24139      new_path="$CYGWIN_ROOT_PATH$input_path"
24140    fi
24141  fi
24142
24143
24144  if test "x$path" != "x$new_path"; then
24145    BOOT_JDK="$new_path"
24146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24148  fi
24149
24150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24151
24152  path="$BOOT_JDK"
24153  has_colon=`$ECHO $path | $GREP ^.:`
24154  new_path="$path"
24155  if test "x$has_colon" = x; then
24156    # Not in mixed or Windows style, start by that.
24157    new_path=`cmd //c echo $path`
24158  fi
24159
24160
24161  input_path="$new_path"
24162  # Check if we need to convert this using DOS-style short mode. If the path
24163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24164  # take no chances and rewrite it.
24165  # Note: m4 eats our [], so we need to use [ and ] instead.
24166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24167  if test "x$has_forbidden_chars" != x; then
24168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24170  fi
24171
24172
24173  windows_path="$new_path"
24174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24175    unix_path=`$CYGPATH -u "$windows_path"`
24176    new_path="$unix_path"
24177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24179    new_path="$unix_path"
24180  fi
24181
24182  if test "x$path" != "x$new_path"; then
24183    BOOT_JDK="$new_path"
24184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24186  fi
24187
24188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24190
24191    else
24192      # We're on a unix platform. Hooray! :)
24193      path="$BOOT_JDK"
24194      has_space=`$ECHO "$path" | $GREP " "`
24195      if test "x$has_space" != x; then
24196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24199      fi
24200
24201      # Use eval to expand a potential ~
24202      eval path="$path"
24203      if test ! -f "$path" && test ! -d "$path"; then
24204        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24205      fi
24206
24207      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24208    fi
24209  fi
24210
24211            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24212$as_echo_n "checking for Boot JDK... " >&6; }
24213            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24214$as_echo "$BOOT_JDK" >&6; }
24215            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24216$as_echo_n "checking Boot JDK version... " >&6; }
24217            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24219$as_echo "$BOOT_JDK_VERSION" >&6; }
24220          fi # end check jdk version
24221        fi # end check javac
24222      fi # end check java
24223    fi # end check boot jdk found
24224  fi
24225
24226    done
24227  fi
24228
24229
24230    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24231    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24232      # Do we have a bin/java?
24233      if test ! -x "$BOOT_JDK/bin/java"; then
24234        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24236        BOOT_JDK_FOUND=no
24237      else
24238        # Do we have a bin/javac?
24239        if test ! -x "$BOOT_JDK/bin/javac"; then
24240          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24242          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24243$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24244          BOOT_JDK_FOUND=no
24245        else
24246          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24247          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24248
24249          # Extra M4 quote needed to protect [] in grep expression.
24250          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24251          if test "x$FOUND_CORRECT_VERSION" = x; then
24252            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24254            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24255$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24256            BOOT_JDK_FOUND=no
24257          else
24258            # We're done! :-)
24259            BOOT_JDK_FOUND=yes
24260
24261  # Only process if variable expands to non-empty
24262
24263  if test "x$BOOT_JDK" != x; then
24264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24265
24266  # Input might be given as Windows format, start by converting to
24267  # unix format.
24268  path="$BOOT_JDK"
24269  new_path=`$CYGPATH -u "$path"`
24270
24271  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24272  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24273  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24274  # "foo.exe" is OK but "foo" is an error.
24275  #
24276  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24277  # It is also a way to make sure we got the proper file name for the real test later on.
24278  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24279  if test "x$test_shortpath" = x; then
24280    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24282    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24283  fi
24284
24285  # Call helper function which possibly converts this using DOS-style short mode.
24286  # If so, the updated path is stored in $new_path.
24287
24288  input_path="$new_path"
24289  # Check if we need to convert this using DOS-style short mode. If the path
24290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24291  # take no chances and rewrite it.
24292  # Note: m4 eats our [], so we need to use [ and ] instead.
24293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24294  if test "x$has_forbidden_chars" != x; then
24295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24296    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24297    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24298    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24299      # Going to short mode and back again did indeed matter. Since short mode is
24300      # case insensitive, let's make it lowercase to improve readability.
24301      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24302      # Now convert it back to Unix-style (cygpath)
24303      input_path=`$CYGPATH -u "$shortmode_path"`
24304      new_path="$input_path"
24305    fi
24306  fi
24307
24308  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24309  if test "x$test_cygdrive_prefix" = x; then
24310    # As a simple fix, exclude /usr/bin since it's not a real path.
24311    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24312      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24313      # a path prefixed by /cygdrive for fixpath to work.
24314      new_path="$CYGWIN_ROOT_PATH$input_path"
24315    fi
24316  fi
24317
24318
24319  if test "x$path" != "x$new_path"; then
24320    BOOT_JDK="$new_path"
24321    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24322$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24323  fi
24324
24325    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24326
24327  path="$BOOT_JDK"
24328  has_colon=`$ECHO $path | $GREP ^.:`
24329  new_path="$path"
24330  if test "x$has_colon" = x; then
24331    # Not in mixed or Windows style, start by that.
24332    new_path=`cmd //c echo $path`
24333  fi
24334
24335
24336  input_path="$new_path"
24337  # Check if we need to convert this using DOS-style short mode. If the path
24338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24339  # take no chances and rewrite it.
24340  # Note: m4 eats our [], so we need to use [ and ] instead.
24341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24342  if test "x$has_forbidden_chars" != x; then
24343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24345  fi
24346
24347
24348  windows_path="$new_path"
24349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24350    unix_path=`$CYGPATH -u "$windows_path"`
24351    new_path="$unix_path"
24352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24354    new_path="$unix_path"
24355  fi
24356
24357  if test "x$path" != "x$new_path"; then
24358    BOOT_JDK="$new_path"
24359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24360$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24361  fi
24362
24363  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24364  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24365
24366    else
24367      # We're on a unix platform. Hooray! :)
24368      path="$BOOT_JDK"
24369      has_space=`$ECHO "$path" | $GREP " "`
24370      if test "x$has_space" != x; then
24371        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24372$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24373        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24374      fi
24375
24376      # Use eval to expand a potential ~
24377      eval path="$path"
24378      if test ! -f "$path" && test ! -d "$path"; then
24379        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24380      fi
24381
24382      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24383    fi
24384  fi
24385
24386            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24387$as_echo_n "checking for Boot JDK... " >&6; }
24388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24389$as_echo "$BOOT_JDK" >&6; }
24390            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24391$as_echo_n "checking Boot JDK version... " >&6; }
24392            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24393            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24394$as_echo "$BOOT_JDK_VERSION" >&6; }
24395          fi # end check jdk version
24396        fi # end check javac
24397      fi # end check java
24398    fi # end check boot jdk found
24399  fi
24400
24401  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24402
24403  if test "x$BOOT_JDK_FOUND" = xno; then
24404    # Now execute the test
24405
24406  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24407  BOOT_JDK_SUFFIX="/Contents/Home"
24408  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24409  if test "x$ALL_JDKS_FOUND" != x; then
24410    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24411
24412  if test "x$BOOT_JDK_FOUND" = xno; then
24413    # Now execute the test
24414
24415        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24416        if test -d "$BOOT_JDK"; then
24417          BOOT_JDK_FOUND=maybe
24418          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24419$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24420        fi
24421
24422
24423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24425      # Do we have a bin/java?
24426      if test ! -x "$BOOT_JDK/bin/java"; then
24427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24429        BOOT_JDK_FOUND=no
24430      else
24431        # Do we have a bin/javac?
24432        if test ! -x "$BOOT_JDK/bin/javac"; then
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24437          BOOT_JDK_FOUND=no
24438        else
24439          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24440          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24441
24442          # Extra M4 quote needed to protect [] in grep expression.
24443          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24444          if test "x$FOUND_CORRECT_VERSION" = x; then
24445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24447            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24448$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24449            BOOT_JDK_FOUND=no
24450          else
24451            # We're done! :-)
24452            BOOT_JDK_FOUND=yes
24453
24454  # Only process if variable expands to non-empty
24455
24456  if test "x$BOOT_JDK" != x; then
24457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24458
24459  # Input might be given as Windows format, start by converting to
24460  # unix format.
24461  path="$BOOT_JDK"
24462  new_path=`$CYGPATH -u "$path"`
24463
24464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24467  # "foo.exe" is OK but "foo" is an error.
24468  #
24469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24470  # It is also a way to make sure we got the proper file name for the real test later on.
24471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24472  if test "x$test_shortpath" = x; then
24473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24476  fi
24477
24478  # Call helper function which possibly converts this using DOS-style short mode.
24479  # If so, the updated path is stored in $new_path.
24480
24481  input_path="$new_path"
24482  # Check if we need to convert this using DOS-style short mode. If the path
24483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24484  # take no chances and rewrite it.
24485  # Note: m4 eats our [], so we need to use [ and ] instead.
24486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24487  if test "x$has_forbidden_chars" != x; then
24488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24492      # Going to short mode and back again did indeed matter. Since short mode is
24493      # case insensitive, let's make it lowercase to improve readability.
24494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24495      # Now convert it back to Unix-style (cygpath)
24496      input_path=`$CYGPATH -u "$shortmode_path"`
24497      new_path="$input_path"
24498    fi
24499  fi
24500
24501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24502  if test "x$test_cygdrive_prefix" = x; then
24503    # As a simple fix, exclude /usr/bin since it's not a real path.
24504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24506      # a path prefixed by /cygdrive for fixpath to work.
24507      new_path="$CYGWIN_ROOT_PATH$input_path"
24508    fi
24509  fi
24510
24511
24512  if test "x$path" != "x$new_path"; then
24513    BOOT_JDK="$new_path"
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24516  fi
24517
24518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24519
24520  path="$BOOT_JDK"
24521  has_colon=`$ECHO $path | $GREP ^.:`
24522  new_path="$path"
24523  if test "x$has_colon" = x; then
24524    # Not in mixed or Windows style, start by that.
24525    new_path=`cmd //c echo $path`
24526  fi
24527
24528
24529  input_path="$new_path"
24530  # Check if we need to convert this using DOS-style short mode. If the path
24531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24532  # take no chances and rewrite it.
24533  # Note: m4 eats our [], so we need to use [ and ] instead.
24534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24535  if test "x$has_forbidden_chars" != x; then
24536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24538  fi
24539
24540
24541  windows_path="$new_path"
24542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24543    unix_path=`$CYGPATH -u "$windows_path"`
24544    new_path="$unix_path"
24545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24547    new_path="$unix_path"
24548  fi
24549
24550  if test "x$path" != "x$new_path"; then
24551    BOOT_JDK="$new_path"
24552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24554  fi
24555
24556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24558
24559    else
24560      # We're on a unix platform. Hooray! :)
24561      path="$BOOT_JDK"
24562      has_space=`$ECHO "$path" | $GREP " "`
24563      if test "x$has_space" != x; then
24564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24567      fi
24568
24569      # Use eval to expand a potential ~
24570      eval path="$path"
24571      if test ! -f "$path" && test ! -d "$path"; then
24572        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24573      fi
24574
24575      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24576    fi
24577  fi
24578
24579            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24580$as_echo_n "checking for Boot JDK... " >&6; }
24581            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24582$as_echo "$BOOT_JDK" >&6; }
24583            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24584$as_echo_n "checking Boot JDK version... " >&6; }
24585            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24587$as_echo "$BOOT_JDK_VERSION" >&6; }
24588          fi # end check jdk version
24589        fi # end check javac
24590      fi # end check java
24591    fi # end check boot jdk found
24592  fi
24593
24594    done
24595  fi
24596
24597
24598    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24599    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24600      # Do we have a bin/java?
24601      if test ! -x "$BOOT_JDK/bin/java"; then
24602        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24604        BOOT_JDK_FOUND=no
24605      else
24606        # Do we have a bin/javac?
24607        if test ! -x "$BOOT_JDK/bin/javac"; then
24608          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24609$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24610          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24611$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24612          BOOT_JDK_FOUND=no
24613        else
24614          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24615          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24616
24617          # Extra M4 quote needed to protect [] in grep expression.
24618          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24619          if test "x$FOUND_CORRECT_VERSION" = x; then
24620            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24622            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24623$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24624            BOOT_JDK_FOUND=no
24625          else
24626            # We're done! :-)
24627            BOOT_JDK_FOUND=yes
24628
24629  # Only process if variable expands to non-empty
24630
24631  if test "x$BOOT_JDK" != x; then
24632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24633
24634  # Input might be given as Windows format, start by converting to
24635  # unix format.
24636  path="$BOOT_JDK"
24637  new_path=`$CYGPATH -u "$path"`
24638
24639  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24640  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24641  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24642  # "foo.exe" is OK but "foo" is an error.
24643  #
24644  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24645  # It is also a way to make sure we got the proper file name for the real test later on.
24646  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24647  if test "x$test_shortpath" = x; then
24648    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24650    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24651  fi
24652
24653  # Call helper function which possibly converts this using DOS-style short mode.
24654  # If so, the updated path is stored in $new_path.
24655
24656  input_path="$new_path"
24657  # Check if we need to convert this using DOS-style short mode. If the path
24658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24659  # take no chances and rewrite it.
24660  # Note: m4 eats our [], so we need to use [ and ] instead.
24661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24662  if test "x$has_forbidden_chars" != x; then
24663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24667      # Going to short mode and back again did indeed matter. Since short mode is
24668      # case insensitive, let's make it lowercase to improve readability.
24669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24670      # Now convert it back to Unix-style (cygpath)
24671      input_path=`$CYGPATH -u "$shortmode_path"`
24672      new_path="$input_path"
24673    fi
24674  fi
24675
24676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24677  if test "x$test_cygdrive_prefix" = x; then
24678    # As a simple fix, exclude /usr/bin since it's not a real path.
24679    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24681      # a path prefixed by /cygdrive for fixpath to work.
24682      new_path="$CYGWIN_ROOT_PATH$input_path"
24683    fi
24684  fi
24685
24686
24687  if test "x$path" != "x$new_path"; then
24688    BOOT_JDK="$new_path"
24689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24691  fi
24692
24693    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24694
24695  path="$BOOT_JDK"
24696  has_colon=`$ECHO $path | $GREP ^.:`
24697  new_path="$path"
24698  if test "x$has_colon" = x; then
24699    # Not in mixed or Windows style, start by that.
24700    new_path=`cmd //c echo $path`
24701  fi
24702
24703
24704  input_path="$new_path"
24705  # Check if we need to convert this using DOS-style short mode. If the path
24706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24707  # take no chances and rewrite it.
24708  # Note: m4 eats our [], so we need to use [ and ] instead.
24709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24710  if test "x$has_forbidden_chars" != x; then
24711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24713  fi
24714
24715
24716  windows_path="$new_path"
24717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24718    unix_path=`$CYGPATH -u "$windows_path"`
24719    new_path="$unix_path"
24720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24722    new_path="$unix_path"
24723  fi
24724
24725  if test "x$path" != "x$new_path"; then
24726    BOOT_JDK="$new_path"
24727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24728$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24729  fi
24730
24731  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24732  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24733
24734    else
24735      # We're on a unix platform. Hooray! :)
24736      path="$BOOT_JDK"
24737      has_space=`$ECHO "$path" | $GREP " "`
24738      if test "x$has_space" != x; then
24739        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24740$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24741        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24742      fi
24743
24744      # Use eval to expand a potential ~
24745      eval path="$path"
24746      if test ! -f "$path" && test ! -d "$path"; then
24747        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24748      fi
24749
24750      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24751    fi
24752  fi
24753
24754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24755$as_echo_n "checking for Boot JDK... " >&6; }
24756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24757$as_echo "$BOOT_JDK" >&6; }
24758            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24759$as_echo_n "checking Boot JDK version... " >&6; }
24760            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24762$as_echo "$BOOT_JDK_VERSION" >&6; }
24763          fi # end check jdk version
24764        fi # end check javac
24765      fi # end check java
24766    fi # end check boot jdk found
24767  fi
24768
24769
24770  if test "x$BOOT_JDK_FOUND" = xno; then
24771    # Now execute the test
24772
24773  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24774  BOOT_JDK_SUFFIX="/Contents/Home"
24775  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24776  if test "x$ALL_JDKS_FOUND" != x; then
24777    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24778
24779  if test "x$BOOT_JDK_FOUND" = xno; then
24780    # Now execute the test
24781
24782        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24783        if test -d "$BOOT_JDK"; then
24784          BOOT_JDK_FOUND=maybe
24785          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24786$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24787        fi
24788
24789
24790    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24791    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24792      # Do we have a bin/java?
24793      if test ! -x "$BOOT_JDK/bin/java"; then
24794        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24795$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24796        BOOT_JDK_FOUND=no
24797      else
24798        # Do we have a bin/javac?
24799        if test ! -x "$BOOT_JDK/bin/javac"; then
24800          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24802          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24803$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24804          BOOT_JDK_FOUND=no
24805        else
24806          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24807          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24808
24809          # Extra M4 quote needed to protect [] in grep expression.
24810          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24811          if test "x$FOUND_CORRECT_VERSION" = x; then
24812            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24813$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24814            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24815$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24816            BOOT_JDK_FOUND=no
24817          else
24818            # We're done! :-)
24819            BOOT_JDK_FOUND=yes
24820
24821  # Only process if variable expands to non-empty
24822
24823  if test "x$BOOT_JDK" != x; then
24824    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24825
24826  # Input might be given as Windows format, start by converting to
24827  # unix format.
24828  path="$BOOT_JDK"
24829  new_path=`$CYGPATH -u "$path"`
24830
24831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24834  # "foo.exe" is OK but "foo" is an error.
24835  #
24836  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24837  # It is also a way to make sure we got the proper file name for the real test later on.
24838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24839  if test "x$test_shortpath" = x; then
24840    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24841$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24842    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24843  fi
24844
24845  # Call helper function which possibly converts this using DOS-style short mode.
24846  # If so, the updated path is stored in $new_path.
24847
24848  input_path="$new_path"
24849  # Check if we need to convert this using DOS-style short mode. If the path
24850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24851  # take no chances and rewrite it.
24852  # Note: m4 eats our [], so we need to use [ and ] instead.
24853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24854  if test "x$has_forbidden_chars" != x; then
24855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24856    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24857    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24858    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24859      # Going to short mode and back again did indeed matter. Since short mode is
24860      # case insensitive, let's make it lowercase to improve readability.
24861      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24862      # Now convert it back to Unix-style (cygpath)
24863      input_path=`$CYGPATH -u "$shortmode_path"`
24864      new_path="$input_path"
24865    fi
24866  fi
24867
24868  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24869  if test "x$test_cygdrive_prefix" = x; then
24870    # As a simple fix, exclude /usr/bin since it's not a real path.
24871    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24872      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24873      # a path prefixed by /cygdrive for fixpath to work.
24874      new_path="$CYGWIN_ROOT_PATH$input_path"
24875    fi
24876  fi
24877
24878
24879  if test "x$path" != "x$new_path"; then
24880    BOOT_JDK="$new_path"
24881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24883  fi
24884
24885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24886
24887  path="$BOOT_JDK"
24888  has_colon=`$ECHO $path | $GREP ^.:`
24889  new_path="$path"
24890  if test "x$has_colon" = x; then
24891    # Not in mixed or Windows style, start by that.
24892    new_path=`cmd //c echo $path`
24893  fi
24894
24895
24896  input_path="$new_path"
24897  # Check if we need to convert this using DOS-style short mode. If the path
24898  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24899  # take no chances and rewrite it.
24900  # Note: m4 eats our [], so we need to use [ and ] instead.
24901  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24902  if test "x$has_forbidden_chars" != x; then
24903    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24904    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24905  fi
24906
24907
24908  windows_path="$new_path"
24909  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24910    unix_path=`$CYGPATH -u "$windows_path"`
24911    new_path="$unix_path"
24912  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24913    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24914    new_path="$unix_path"
24915  fi
24916
24917  if test "x$path" != "x$new_path"; then
24918    BOOT_JDK="$new_path"
24919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24920$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24921  fi
24922
24923  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24924  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24925
24926    else
24927      # We're on a unix platform. Hooray! :)
24928      path="$BOOT_JDK"
24929      has_space=`$ECHO "$path" | $GREP " "`
24930      if test "x$has_space" != x; then
24931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24932$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24933        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24934      fi
24935
24936      # Use eval to expand a potential ~
24937      eval path="$path"
24938      if test ! -f "$path" && test ! -d "$path"; then
24939        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24940      fi
24941
24942      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24943    fi
24944  fi
24945
24946            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24947$as_echo_n "checking for Boot JDK... " >&6; }
24948            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24949$as_echo "$BOOT_JDK" >&6; }
24950            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24951$as_echo_n "checking Boot JDK version... " >&6; }
24952            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24953            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24954$as_echo "$BOOT_JDK_VERSION" >&6; }
24955          fi # end check jdk version
24956        fi # end check javac
24957      fi # end check java
24958    fi # end check boot jdk found
24959  fi
24960
24961    done
24962  fi
24963
24964
24965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24967      # Do we have a bin/java?
24968      if test ! -x "$BOOT_JDK/bin/java"; then
24969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24971        BOOT_JDK_FOUND=no
24972      else
24973        # Do we have a bin/javac?
24974        if test ! -x "$BOOT_JDK/bin/javac"; then
24975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24979          BOOT_JDK_FOUND=no
24980        else
24981          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24982          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24983
24984          # Extra M4 quote needed to protect [] in grep expression.
24985          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24986          if test "x$FOUND_CORRECT_VERSION" = x; then
24987            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24988$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24989            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24990$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24991            BOOT_JDK_FOUND=no
24992          else
24993            # We're done! :-)
24994            BOOT_JDK_FOUND=yes
24995
24996  # Only process if variable expands to non-empty
24997
24998  if test "x$BOOT_JDK" != x; then
24999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25000
25001  # Input might be given as Windows format, start by converting to
25002  # unix format.
25003  path="$BOOT_JDK"
25004  new_path=`$CYGPATH -u "$path"`
25005
25006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25009  # "foo.exe" is OK but "foo" is an error.
25010  #
25011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25012  # It is also a way to make sure we got the proper file name for the real test later on.
25013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25014  if test "x$test_shortpath" = x; then
25015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25016$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25017    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25018  fi
25019
25020  # Call helper function which possibly converts this using DOS-style short mode.
25021  # If so, the updated path is stored in $new_path.
25022
25023  input_path="$new_path"
25024  # Check if we need to convert this using DOS-style short mode. If the path
25025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25026  # take no chances and rewrite it.
25027  # Note: m4 eats our [], so we need to use [ and ] instead.
25028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25029  if test "x$has_forbidden_chars" != x; then
25030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25034      # Going to short mode and back again did indeed matter. Since short mode is
25035      # case insensitive, let's make it lowercase to improve readability.
25036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25037      # Now convert it back to Unix-style (cygpath)
25038      input_path=`$CYGPATH -u "$shortmode_path"`
25039      new_path="$input_path"
25040    fi
25041  fi
25042
25043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25044  if test "x$test_cygdrive_prefix" = x; then
25045    # As a simple fix, exclude /usr/bin since it's not a real path.
25046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25048      # a path prefixed by /cygdrive for fixpath to work.
25049      new_path="$CYGWIN_ROOT_PATH$input_path"
25050    fi
25051  fi
25052
25053
25054  if test "x$path" != "x$new_path"; then
25055    BOOT_JDK="$new_path"
25056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25057$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25058  fi
25059
25060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25061
25062  path="$BOOT_JDK"
25063  has_colon=`$ECHO $path | $GREP ^.:`
25064  new_path="$path"
25065  if test "x$has_colon" = x; then
25066    # Not in mixed or Windows style, start by that.
25067    new_path=`cmd //c echo $path`
25068  fi
25069
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25080  fi
25081
25082
25083  windows_path="$new_path"
25084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25085    unix_path=`$CYGPATH -u "$windows_path"`
25086    new_path="$unix_path"
25087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25089    new_path="$unix_path"
25090  fi
25091
25092  if test "x$path" != "x$new_path"; then
25093    BOOT_JDK="$new_path"
25094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25096  fi
25097
25098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25100
25101    else
25102      # We're on a unix platform. Hooray! :)
25103      path="$BOOT_JDK"
25104      has_space=`$ECHO "$path" | $GREP " "`
25105      if test "x$has_space" != x; then
25106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25109      fi
25110
25111      # Use eval to expand a potential ~
25112      eval path="$path"
25113      if test ! -f "$path" && test ! -d "$path"; then
25114        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25115      fi
25116
25117      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25118    fi
25119  fi
25120
25121            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25122$as_echo_n "checking for Boot JDK... " >&6; }
25123            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25124$as_echo "$BOOT_JDK" >&6; }
25125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25126$as_echo_n "checking Boot JDK version... " >&6; }
25127            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25128            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25129$as_echo "$BOOT_JDK_VERSION" >&6; }
25130          fi # end check jdk version
25131        fi # end check javac
25132      fi # end check java
25133    fi # end check boot jdk found
25134  fi
25135
25136  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
25137
25138  if test "x$BOOT_JDK_FOUND" = xno; then
25139    # Now execute the test
25140
25141  BOOT_JDK_PREFIX="/usr/lib/jvm"
25142  BOOT_JDK_SUFFIX=""
25143  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
25144  if test "x$ALL_JDKS_FOUND" != x; then
25145    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
25146
25147  if test "x$BOOT_JDK_FOUND" = xno; then
25148    # Now execute the test
25149
25150        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
25151        if test -d "$BOOT_JDK"; then
25152          BOOT_JDK_FOUND=maybe
25153          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
25154$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
25155        fi
25156
25157
25158    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25159    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25160      # Do we have a bin/java?
25161      if test ! -x "$BOOT_JDK/bin/java"; then
25162        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25164        BOOT_JDK_FOUND=no
25165      else
25166        # Do we have a bin/javac?
25167        if test ! -x "$BOOT_JDK/bin/javac"; then
25168          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25169$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25170          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25171$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25172          BOOT_JDK_FOUND=no
25173        else
25174          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25175          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25176
25177          # Extra M4 quote needed to protect [] in grep expression.
25178          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25179          if test "x$FOUND_CORRECT_VERSION" = x; then
25180            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25182            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25183$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25184            BOOT_JDK_FOUND=no
25185          else
25186            # We're done! :-)
25187            BOOT_JDK_FOUND=yes
25188
25189  # Only process if variable expands to non-empty
25190
25191  if test "x$BOOT_JDK" != x; then
25192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25193
25194  # Input might be given as Windows format, start by converting to
25195  # unix format.
25196  path="$BOOT_JDK"
25197  new_path=`$CYGPATH -u "$path"`
25198
25199  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25200  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25201  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25202  # "foo.exe" is OK but "foo" is an error.
25203  #
25204  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25205  # It is also a way to make sure we got the proper file name for the real test later on.
25206  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25207  if test "x$test_shortpath" = x; then
25208    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25209$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25210    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25211  fi
25212
25213  # Call helper function which possibly converts this using DOS-style short mode.
25214  # If so, the updated path is stored in $new_path.
25215
25216  input_path="$new_path"
25217  # Check if we need to convert this using DOS-style short mode. If the path
25218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25219  # take no chances and rewrite it.
25220  # Note: m4 eats our [], so we need to use [ and ] instead.
25221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25222  if test "x$has_forbidden_chars" != x; then
25223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25227      # Going to short mode and back again did indeed matter. Since short mode is
25228      # case insensitive, let's make it lowercase to improve readability.
25229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25230      # Now convert it back to Unix-style (cygpath)
25231      input_path=`$CYGPATH -u "$shortmode_path"`
25232      new_path="$input_path"
25233    fi
25234  fi
25235
25236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25237  if test "x$test_cygdrive_prefix" = x; then
25238    # As a simple fix, exclude /usr/bin since it's not a real path.
25239    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25241      # a path prefixed by /cygdrive for fixpath to work.
25242      new_path="$CYGWIN_ROOT_PATH$input_path"
25243    fi
25244  fi
25245
25246
25247  if test "x$path" != "x$new_path"; then
25248    BOOT_JDK="$new_path"
25249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25251  fi
25252
25253    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25254
25255  path="$BOOT_JDK"
25256  has_colon=`$ECHO $path | $GREP ^.:`
25257  new_path="$path"
25258  if test "x$has_colon" = x; then
25259    # Not in mixed or Windows style, start by that.
25260    new_path=`cmd //c echo $path`
25261  fi
25262
25263
25264  input_path="$new_path"
25265  # Check if we need to convert this using DOS-style short mode. If the path
25266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25267  # take no chances and rewrite it.
25268  # Note: m4 eats our [], so we need to use [ and ] instead.
25269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25270  if test "x$has_forbidden_chars" != x; then
25271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25272    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25273  fi
25274
25275
25276  windows_path="$new_path"
25277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25278    unix_path=`$CYGPATH -u "$windows_path"`
25279    new_path="$unix_path"
25280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25282    new_path="$unix_path"
25283  fi
25284
25285  if test "x$path" != "x$new_path"; then
25286    BOOT_JDK="$new_path"
25287    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25288$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25289  fi
25290
25291  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25292  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25293
25294    else
25295      # We're on a unix platform. Hooray! :)
25296      path="$BOOT_JDK"
25297      has_space=`$ECHO "$path" | $GREP " "`
25298      if test "x$has_space" != x; then
25299        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25300$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25301        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25302      fi
25303
25304      # Use eval to expand a potential ~
25305      eval path="$path"
25306      if test ! -f "$path" && test ! -d "$path"; then
25307        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25308      fi
25309
25310      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25311    fi
25312  fi
25313
25314            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25315$as_echo_n "checking for Boot JDK... " >&6; }
25316            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25317$as_echo "$BOOT_JDK" >&6; }
25318            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25319$as_echo_n "checking Boot JDK version... " >&6; }
25320            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25321            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25322$as_echo "$BOOT_JDK_VERSION" >&6; }
25323          fi # end check jdk version
25324        fi # end check javac
25325      fi # end check java
25326    fi # end check boot jdk found
25327  fi
25328
25329    done
25330  fi
25331
25332
25333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25335      # Do we have a bin/java?
25336      if test ! -x "$BOOT_JDK/bin/java"; then
25337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25339        BOOT_JDK_FOUND=no
25340      else
25341        # Do we have a bin/javac?
25342        if test ! -x "$BOOT_JDK/bin/javac"; then
25343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25347          BOOT_JDK_FOUND=no
25348        else
25349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25351
25352          # Extra M4 quote needed to protect [] in grep expression.
25353          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25354          if test "x$FOUND_CORRECT_VERSION" = x; then
25355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25359            BOOT_JDK_FOUND=no
25360          else
25361            # We're done! :-)
25362            BOOT_JDK_FOUND=yes
25363
25364  # Only process if variable expands to non-empty
25365
25366  if test "x$BOOT_JDK" != x; then
25367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25368
25369  # Input might be given as Windows format, start by converting to
25370  # unix format.
25371  path="$BOOT_JDK"
25372  new_path=`$CYGPATH -u "$path"`
25373
25374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25377  # "foo.exe" is OK but "foo" is an error.
25378  #
25379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25380  # It is also a way to make sure we got the proper file name for the real test later on.
25381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25382  if test "x$test_shortpath" = x; then
25383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25386  fi
25387
25388  # Call helper function which possibly converts this using DOS-style short mode.
25389  # If so, the updated path is stored in $new_path.
25390
25391  input_path="$new_path"
25392  # Check if we need to convert this using DOS-style short mode. If the path
25393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25394  # take no chances and rewrite it.
25395  # Note: m4 eats our [], so we need to use [ and ] instead.
25396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25397  if test "x$has_forbidden_chars" != x; then
25398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25402      # Going to short mode and back again did indeed matter. Since short mode is
25403      # case insensitive, let's make it lowercase to improve readability.
25404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25405      # Now convert it back to Unix-style (cygpath)
25406      input_path=`$CYGPATH -u "$shortmode_path"`
25407      new_path="$input_path"
25408    fi
25409  fi
25410
25411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25412  if test "x$test_cygdrive_prefix" = x; then
25413    # As a simple fix, exclude /usr/bin since it's not a real path.
25414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25416      # a path prefixed by /cygdrive for fixpath to work.
25417      new_path="$CYGWIN_ROOT_PATH$input_path"
25418    fi
25419  fi
25420
25421
25422  if test "x$path" != "x$new_path"; then
25423    BOOT_JDK="$new_path"
25424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25426  fi
25427
25428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25429
25430  path="$BOOT_JDK"
25431  has_colon=`$ECHO $path | $GREP ^.:`
25432  new_path="$path"
25433  if test "x$has_colon" = x; then
25434    # Not in mixed or Windows style, start by that.
25435    new_path=`cmd //c echo $path`
25436  fi
25437
25438
25439  input_path="$new_path"
25440  # Check if we need to convert this using DOS-style short mode. If the path
25441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25442  # take no chances and rewrite it.
25443  # Note: m4 eats our [], so we need to use [ and ] instead.
25444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25445  if test "x$has_forbidden_chars" != x; then
25446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25448  fi
25449
25450
25451  windows_path="$new_path"
25452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25453    unix_path=`$CYGPATH -u "$windows_path"`
25454    new_path="$unix_path"
25455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25457    new_path="$unix_path"
25458  fi
25459
25460  if test "x$path" != "x$new_path"; then
25461    BOOT_JDK="$new_path"
25462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25464  fi
25465
25466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25468
25469    else
25470      # We're on a unix platform. Hooray! :)
25471      path="$BOOT_JDK"
25472      has_space=`$ECHO "$path" | $GREP " "`
25473      if test "x$has_space" != x; then
25474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25477      fi
25478
25479      # Use eval to expand a potential ~
25480      eval path="$path"
25481      if test ! -f "$path" && test ! -d "$path"; then
25482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25483      fi
25484
25485      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25486    fi
25487  fi
25488
25489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25490$as_echo_n "checking for Boot JDK... " >&6; }
25491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25492$as_echo "$BOOT_JDK" >&6; }
25493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25494$as_echo_n "checking Boot JDK version... " >&6; }
25495            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25497$as_echo "$BOOT_JDK_VERSION" >&6; }
25498          fi # end check jdk version
25499        fi # end check javac
25500      fi # end check java
25501    fi # end check boot jdk found
25502  fi
25503
25504  fi
25505
25506
25507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25509      # Do we have a bin/java?
25510      if test ! -x "$BOOT_JDK/bin/java"; then
25511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25513        BOOT_JDK_FOUND=no
25514      else
25515        # Do we have a bin/javac?
25516        if test ! -x "$BOOT_JDK/bin/javac"; then
25517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25521          BOOT_JDK_FOUND=no
25522        else
25523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25525
25526          # Extra M4 quote needed to protect [] in grep expression.
25527          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25528          if test "x$FOUND_CORRECT_VERSION" = x; then
25529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25533            BOOT_JDK_FOUND=no
25534          else
25535            # We're done! :-)
25536            BOOT_JDK_FOUND=yes
25537
25538  # Only process if variable expands to non-empty
25539
25540  if test "x$BOOT_JDK" != x; then
25541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25542
25543  # Input might be given as Windows format, start by converting to
25544  # unix format.
25545  path="$BOOT_JDK"
25546  new_path=`$CYGPATH -u "$path"`
25547
25548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25551  # "foo.exe" is OK but "foo" is an error.
25552  #
25553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25554  # It is also a way to make sure we got the proper file name for the real test later on.
25555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25556  if test "x$test_shortpath" = x; then
25557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25560  fi
25561
25562  # Call helper function which possibly converts this using DOS-style short mode.
25563  # If so, the updated path is stored in $new_path.
25564
25565  input_path="$new_path"
25566  # Check if we need to convert this using DOS-style short mode. If the path
25567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25568  # take no chances and rewrite it.
25569  # Note: m4 eats our [], so we need to use [ and ] instead.
25570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25571  if test "x$has_forbidden_chars" != x; then
25572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25576      # Going to short mode and back again did indeed matter. Since short mode is
25577      # case insensitive, let's make it lowercase to improve readability.
25578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25579      # Now convert it back to Unix-style (cygpath)
25580      input_path=`$CYGPATH -u "$shortmode_path"`
25581      new_path="$input_path"
25582    fi
25583  fi
25584
25585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25586  if test "x$test_cygdrive_prefix" = x; then
25587    # As a simple fix, exclude /usr/bin since it's not a real path.
25588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25590      # a path prefixed by /cygdrive for fixpath to work.
25591      new_path="$CYGWIN_ROOT_PATH$input_path"
25592    fi
25593  fi
25594
25595
25596  if test "x$path" != "x$new_path"; then
25597    BOOT_JDK="$new_path"
25598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25600  fi
25601
25602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25603
25604  path="$BOOT_JDK"
25605  has_colon=`$ECHO $path | $GREP ^.:`
25606  new_path="$path"
25607  if test "x$has_colon" = x; then
25608    # Not in mixed or Windows style, start by that.
25609    new_path=`cmd //c echo $path`
25610  fi
25611
25612
25613  input_path="$new_path"
25614  # Check if we need to convert this using DOS-style short mode. If the path
25615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25616  # take no chances and rewrite it.
25617  # Note: m4 eats our [], so we need to use [ and ] instead.
25618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25619  if test "x$has_forbidden_chars" != x; then
25620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25622  fi
25623
25624
25625  windows_path="$new_path"
25626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25627    unix_path=`$CYGPATH -u "$windows_path"`
25628    new_path="$unix_path"
25629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25631    new_path="$unix_path"
25632  fi
25633
25634  if test "x$path" != "x$new_path"; then
25635    BOOT_JDK="$new_path"
25636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25638  fi
25639
25640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25642
25643    else
25644      # We're on a unix platform. Hooray! :)
25645      path="$BOOT_JDK"
25646      has_space=`$ECHO "$path" | $GREP " "`
25647      if test "x$has_space" != x; then
25648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25651      fi
25652
25653      # Use eval to expand a potential ~
25654      eval path="$path"
25655      if test ! -f "$path" && test ! -d "$path"; then
25656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25657      fi
25658
25659      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25660    fi
25661  fi
25662
25663            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25664$as_echo_n "checking for Boot JDK... " >&6; }
25665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25666$as_echo "$BOOT_JDK" >&6; }
25667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25668$as_echo_n "checking Boot JDK version... " >&6; }
25669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25671$as_echo "$BOOT_JDK_VERSION" >&6; }
25672          fi # end check jdk version
25673        fi # end check javac
25674      fi # end check java
25675    fi # end check boot jdk found
25676  fi
25677
25678
25679  # If we haven't found anything yet, we've truly lost. Give up.
25680  if test "x$BOOT_JDK_FOUND" = xno; then
25681
25682  # Print a helpful message on how to acquire the necessary build dependency.
25683  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25684  MISSING_DEPENDENCY=openjdk
25685
25686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25687    cygwin_help $MISSING_DEPENDENCY
25688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25689    msys_help $MISSING_DEPENDENCY
25690  else
25691    PKGHANDLER_COMMAND=
25692
25693    case $PKGHANDLER in
25694      apt-get)
25695        apt_help     $MISSING_DEPENDENCY ;;
25696      yum)
25697        yum_help     $MISSING_DEPENDENCY ;;
25698      port)
25699        port_help    $MISSING_DEPENDENCY ;;
25700      pkgutil)
25701        pkgutil_help $MISSING_DEPENDENCY ;;
25702      pkgadd)
25703        pkgadd_help  $MISSING_DEPENDENCY ;;
25704    esac
25705
25706    if test "x$PKGHANDLER_COMMAND" != x; then
25707      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25708    fi
25709  fi
25710
25711    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25712$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25713    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25714$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25715    as_fn_error $? "Cannot continue" "$LINENO" 5
25716  fi
25717
25718
25719
25720  # Setup tools from the Boot JDK.
25721
25722  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25723
25724  # Publish this variable in the help.
25725
25726
25727  if test "x$JAVA" = x; then
25728    # The variable is not set by user, try to locate tool using the code snippet
25729
25730      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25731$as_echo_n "checking for java in Boot JDK... " >&6; }
25732      JAVA=$BOOT_JDK/bin/java
25733      if test ! -x $JAVA; then
25734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25735$as_echo "not found" >&6; }
25736        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25737$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25738        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25739      fi
25740      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25741$as_echo "ok" >&6; }
25742
25743
25744  else
25745    # The variable is set, but is it from the command line or the environment?
25746
25747    # Try to remove the string !JAVA! from our list.
25748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25750      # If it failed, the variable was not from the command line. Ignore it,
25751      # but warn the user (except for BASH, which is always set by the calling BASH).
25752      if test "xJAVA" != xBASH; then
25753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25754$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25755      fi
25756      # Try to locate tool using the code snippet
25757
25758      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25759$as_echo_n "checking for java in Boot JDK... " >&6; }
25760      JAVA=$BOOT_JDK/bin/java
25761      if test ! -x $JAVA; then
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25763$as_echo "not found" >&6; }
25764        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25765$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25766        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25767      fi
25768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25769$as_echo "ok" >&6; }
25770
25771
25772    else
25773      # If it succeeded, then it was overridden by the user. We will use it
25774      # for the tool.
25775
25776      # First remove it from the list of overridden variables, so we can test
25777      # for unknown variables in the end.
25778      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25779
25780      # Check if the provided tool contains a complete path.
25781      tool_specified="$JAVA"
25782      tool_basename="${tool_specified##*/}"
25783      if test "x$tool_basename" = "x$tool_specified"; then
25784        # A command without a complete path is provided, search $PATH.
25785        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25786$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25787        # Extract the first word of "$tool_basename", so it can be a program name with args.
25788set dummy $tool_basename; ac_word=$2
25789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25790$as_echo_n "checking for $ac_word... " >&6; }
25791if ${ac_cv_path_JAVA+:} false; then :
25792  $as_echo_n "(cached) " >&6
25793else
25794  case $JAVA in
25795  [\\/]* | ?:[\\/]*)
25796  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25797  ;;
25798  *)
25799  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25800for as_dir in $PATH
25801do
25802  IFS=$as_save_IFS
25803  test -z "$as_dir" && as_dir=.
25804    for ac_exec_ext in '' $ac_executable_extensions; do
25805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25806    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25808    break 2
25809  fi
25810done
25811  done
25812IFS=$as_save_IFS
25813
25814  ;;
25815esac
25816fi
25817JAVA=$ac_cv_path_JAVA
25818if test -n "$JAVA"; then
25819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25820$as_echo "$JAVA" >&6; }
25821else
25822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25823$as_echo "no" >&6; }
25824fi
25825
25826
25827        if test "x$JAVA" = x; then
25828          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25829        fi
25830      else
25831        # Otherwise we believe it is a complete path. Use it as it is.
25832        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25833$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25834        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25835$as_echo_n "checking for JAVA... " >&6; }
25836        if test ! -x "$tool_specified"; then
25837          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25838$as_echo "not found" >&6; }
25839          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25840        fi
25841        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25842$as_echo "$tool_specified" >&6; }
25843      fi
25844    fi
25845  fi
25846
25847
25848
25849  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25850
25851  # Publish this variable in the help.
25852
25853
25854  if test "x$JAVAC" = x; then
25855    # The variable is not set by user, try to locate tool using the code snippet
25856
25857      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25858$as_echo_n "checking for javac in Boot JDK... " >&6; }
25859      JAVAC=$BOOT_JDK/bin/javac
25860      if test ! -x $JAVAC; then
25861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25862$as_echo "not found" >&6; }
25863        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25864$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25865        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25866      fi
25867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25868$as_echo "ok" >&6; }
25869
25870
25871  else
25872    # The variable is set, but is it from the command line or the environment?
25873
25874    # Try to remove the string !JAVAC! from our list.
25875    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25876    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25877      # If it failed, the variable was not from the command line. Ignore it,
25878      # but warn the user (except for BASH, which is always set by the calling BASH).
25879      if test "xJAVAC" != xBASH; then
25880        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25881$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25882      fi
25883      # Try to locate tool using the code snippet
25884
25885      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25886$as_echo_n "checking for javac in Boot JDK... " >&6; }
25887      JAVAC=$BOOT_JDK/bin/javac
25888      if test ! -x $JAVAC; then
25889        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25890$as_echo "not found" >&6; }
25891        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25892$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25893        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25894      fi
25895      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25896$as_echo "ok" >&6; }
25897
25898
25899    else
25900      # If it succeeded, then it was overridden by the user. We will use it
25901      # for the tool.
25902
25903      # First remove it from the list of overridden variables, so we can test
25904      # for unknown variables in the end.
25905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25906
25907      # Check if the provided tool contains a complete path.
25908      tool_specified="$JAVAC"
25909      tool_basename="${tool_specified##*/}"
25910      if test "x$tool_basename" = "x$tool_specified"; then
25911        # A command without a complete path is provided, search $PATH.
25912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25913$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25914        # Extract the first word of "$tool_basename", so it can be a program name with args.
25915set dummy $tool_basename; ac_word=$2
25916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25917$as_echo_n "checking for $ac_word... " >&6; }
25918if ${ac_cv_path_JAVAC+:} false; then :
25919  $as_echo_n "(cached) " >&6
25920else
25921  case $JAVAC in
25922  [\\/]* | ?:[\\/]*)
25923  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25924  ;;
25925  *)
25926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25927for as_dir in $PATH
25928do
25929  IFS=$as_save_IFS
25930  test -z "$as_dir" && as_dir=.
25931    for ac_exec_ext in '' $ac_executable_extensions; do
25932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25933    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25935    break 2
25936  fi
25937done
25938  done
25939IFS=$as_save_IFS
25940
25941  ;;
25942esac
25943fi
25944JAVAC=$ac_cv_path_JAVAC
25945if test -n "$JAVAC"; then
25946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25947$as_echo "$JAVAC" >&6; }
25948else
25949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25950$as_echo "no" >&6; }
25951fi
25952
25953
25954        if test "x$JAVAC" = x; then
25955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25956        fi
25957      else
25958        # Otherwise we believe it is a complete path. Use it as it is.
25959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25960$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25962$as_echo_n "checking for JAVAC... " >&6; }
25963        if test ! -x "$tool_specified"; then
25964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25965$as_echo "not found" >&6; }
25966          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25967        fi
25968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25969$as_echo "$tool_specified" >&6; }
25970      fi
25971    fi
25972  fi
25973
25974
25975
25976  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25977
25978  # Publish this variable in the help.
25979
25980
25981  if test "x$JAVAH" = x; then
25982    # The variable is not set by user, try to locate tool using the code snippet
25983
25984      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25985$as_echo_n "checking for javah in Boot JDK... " >&6; }
25986      JAVAH=$BOOT_JDK/bin/javah
25987      if test ! -x $JAVAH; then
25988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25989$as_echo "not found" >&6; }
25990        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25991$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25992        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25993      fi
25994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25995$as_echo "ok" >&6; }
25996
25997
25998  else
25999    # The variable is set, but is it from the command line or the environment?
26000
26001    # Try to remove the string !JAVAH! from our list.
26002    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
26003    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26004      # If it failed, the variable was not from the command line. Ignore it,
26005      # but warn the user (except for BASH, which is always set by the calling BASH).
26006      if test "xJAVAH" != xBASH; then
26007        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
26008$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
26009      fi
26010      # Try to locate tool using the code snippet
26011
26012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
26013$as_echo_n "checking for javah in Boot JDK... " >&6; }
26014      JAVAH=$BOOT_JDK/bin/javah
26015      if test ! -x $JAVAH; then
26016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26017$as_echo "not found" >&6; }
26018        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26019$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26020        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
26021      fi
26022      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26023$as_echo "ok" >&6; }
26024
26025
26026    else
26027      # If it succeeded, then it was overridden by the user. We will use it
26028      # for the tool.
26029
26030      # First remove it from the list of overridden variables, so we can test
26031      # for unknown variables in the end.
26032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26033
26034      # Check if the provided tool contains a complete path.
26035      tool_specified="$JAVAH"
26036      tool_basename="${tool_specified##*/}"
26037      if test "x$tool_basename" = "x$tool_specified"; then
26038        # A command without a complete path is provided, search $PATH.
26039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
26040$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
26041        # Extract the first word of "$tool_basename", so it can be a program name with args.
26042set dummy $tool_basename; ac_word=$2
26043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26044$as_echo_n "checking for $ac_word... " >&6; }
26045if ${ac_cv_path_JAVAH+:} false; then :
26046  $as_echo_n "(cached) " >&6
26047else
26048  case $JAVAH in
26049  [\\/]* | ?:[\\/]*)
26050  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
26051  ;;
26052  *)
26053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26054for as_dir in $PATH
26055do
26056  IFS=$as_save_IFS
26057  test -z "$as_dir" && as_dir=.
26058    for ac_exec_ext in '' $ac_executable_extensions; do
26059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26060    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
26061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26062    break 2
26063  fi
26064done
26065  done
26066IFS=$as_save_IFS
26067
26068  ;;
26069esac
26070fi
26071JAVAH=$ac_cv_path_JAVAH
26072if test -n "$JAVAH"; then
26073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
26074$as_echo "$JAVAH" >&6; }
26075else
26076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26077$as_echo "no" >&6; }
26078fi
26079
26080
26081        if test "x$JAVAH" = x; then
26082          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26083        fi
26084      else
26085        # Otherwise we believe it is a complete path. Use it as it is.
26086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
26087$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
26088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
26089$as_echo_n "checking for JAVAH... " >&6; }
26090        if test ! -x "$tool_specified"; then
26091          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26092$as_echo "not found" >&6; }
26093          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
26094        fi
26095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26096$as_echo "$tool_specified" >&6; }
26097      fi
26098    fi
26099  fi
26100
26101
26102
26103  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26104
26105  # Publish this variable in the help.
26106
26107
26108  if test "x$JAR" = x; then
26109    # The variable is not set by user, try to locate tool using the code snippet
26110
26111      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26112$as_echo_n "checking for jar in Boot JDK... " >&6; }
26113      JAR=$BOOT_JDK/bin/jar
26114      if test ! -x $JAR; then
26115        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26116$as_echo "not found" >&6; }
26117        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26118$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26119        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26120      fi
26121      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26122$as_echo "ok" >&6; }
26123
26124
26125  else
26126    # The variable is set, but is it from the command line or the environment?
26127
26128    # Try to remove the string !JAR! from our list.
26129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
26130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26131      # If it failed, the variable was not from the command line. Ignore it,
26132      # but warn the user (except for BASH, which is always set by the calling BASH).
26133      if test "xJAR" != xBASH; then
26134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
26135$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
26136      fi
26137      # Try to locate tool using the code snippet
26138
26139      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
26140$as_echo_n "checking for jar in Boot JDK... " >&6; }
26141      JAR=$BOOT_JDK/bin/jar
26142      if test ! -x $JAR; then
26143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26144$as_echo "not found" >&6; }
26145        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26146$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26147        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
26148      fi
26149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26150$as_echo "ok" >&6; }
26151
26152
26153    else
26154      # If it succeeded, then it was overridden by the user. We will use it
26155      # for the tool.
26156
26157      # First remove it from the list of overridden variables, so we can test
26158      # for unknown variables in the end.
26159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26160
26161      # Check if the provided tool contains a complete path.
26162      tool_specified="$JAR"
26163      tool_basename="${tool_specified##*/}"
26164      if test "x$tool_basename" = "x$tool_specified"; then
26165        # A command without a complete path is provided, search $PATH.
26166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
26167$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
26168        # Extract the first word of "$tool_basename", so it can be a program name with args.
26169set dummy $tool_basename; ac_word=$2
26170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26171$as_echo_n "checking for $ac_word... " >&6; }
26172if ${ac_cv_path_JAR+:} false; then :
26173  $as_echo_n "(cached) " >&6
26174else
26175  case $JAR in
26176  [\\/]* | ?:[\\/]*)
26177  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26178  ;;
26179  *)
26180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26181for as_dir in $PATH
26182do
26183  IFS=$as_save_IFS
26184  test -z "$as_dir" && as_dir=.
26185    for ac_exec_ext in '' $ac_executable_extensions; do
26186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26187    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26189    break 2
26190  fi
26191done
26192  done
26193IFS=$as_save_IFS
26194
26195  ;;
26196esac
26197fi
26198JAR=$ac_cv_path_JAR
26199if test -n "$JAR"; then
26200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26201$as_echo "$JAR" >&6; }
26202else
26203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26204$as_echo "no" >&6; }
26205fi
26206
26207
26208        if test "x$JAR" = x; then
26209          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26210        fi
26211      else
26212        # Otherwise we believe it is a complete path. Use it as it is.
26213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26214$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26216$as_echo_n "checking for JAR... " >&6; }
26217        if test ! -x "$tool_specified"; then
26218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26219$as_echo "not found" >&6; }
26220          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26221        fi
26222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26223$as_echo "$tool_specified" >&6; }
26224      fi
26225    fi
26226  fi
26227
26228
26229
26230  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26231
26232  # Publish this variable in the help.
26233
26234
26235  if test "x$JARSIGNER" = x; then
26236    # The variable is not set by user, try to locate tool using the code snippet
26237
26238      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26239$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26240      JARSIGNER=$BOOT_JDK/bin/jarsigner
26241      if test ! -x $JARSIGNER; then
26242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26243$as_echo "not found" >&6; }
26244        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26245$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26246        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26247      fi
26248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26249$as_echo "ok" >&6; }
26250
26251
26252  else
26253    # The variable is set, but is it from the command line or the environment?
26254
26255    # Try to remove the string !JARSIGNER! from our list.
26256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26258      # If it failed, the variable was not from the command line. Ignore it,
26259      # but warn the user (except for BASH, which is always set by the calling BASH).
26260      if test "xJARSIGNER" != xBASH; then
26261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26262$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26263      fi
26264      # Try to locate tool using the code snippet
26265
26266      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26267$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26268      JARSIGNER=$BOOT_JDK/bin/jarsigner
26269      if test ! -x $JARSIGNER; then
26270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26271$as_echo "not found" >&6; }
26272        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26273$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26274        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26275      fi
26276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26277$as_echo "ok" >&6; }
26278
26279
26280    else
26281      # If it succeeded, then it was overridden by the user. We will use it
26282      # for the tool.
26283
26284      # First remove it from the list of overridden variables, so we can test
26285      # for unknown variables in the end.
26286      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26287
26288      # Check if the provided tool contains a complete path.
26289      tool_specified="$JARSIGNER"
26290      tool_basename="${tool_specified##*/}"
26291      if test "x$tool_basename" = "x$tool_specified"; then
26292        # A command without a complete path is provided, search $PATH.
26293        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26294$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26295        # Extract the first word of "$tool_basename", so it can be a program name with args.
26296set dummy $tool_basename; ac_word=$2
26297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26298$as_echo_n "checking for $ac_word... " >&6; }
26299if ${ac_cv_path_JARSIGNER+:} false; then :
26300  $as_echo_n "(cached) " >&6
26301else
26302  case $JARSIGNER in
26303  [\\/]* | ?:[\\/]*)
26304  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26305  ;;
26306  *)
26307  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26308for as_dir in $PATH
26309do
26310  IFS=$as_save_IFS
26311  test -z "$as_dir" && as_dir=.
26312    for ac_exec_ext in '' $ac_executable_extensions; do
26313  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26314    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26315    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26316    break 2
26317  fi
26318done
26319  done
26320IFS=$as_save_IFS
26321
26322  ;;
26323esac
26324fi
26325JARSIGNER=$ac_cv_path_JARSIGNER
26326if test -n "$JARSIGNER"; then
26327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26328$as_echo "$JARSIGNER" >&6; }
26329else
26330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26331$as_echo "no" >&6; }
26332fi
26333
26334
26335        if test "x$JARSIGNER" = x; then
26336          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26337        fi
26338      else
26339        # Otherwise we believe it is a complete path. Use it as it is.
26340        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26341$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26342        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26343$as_echo_n "checking for JARSIGNER... " >&6; }
26344        if test ! -x "$tool_specified"; then
26345          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26346$as_echo "not found" >&6; }
26347          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26348        fi
26349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26350$as_echo "$tool_specified" >&6; }
26351      fi
26352    fi
26353  fi
26354
26355
26356
26357  # Finally, set some other options...
26358
26359  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26360  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26361
26362
26363
26364
26365###############################################################################
26366#
26367# Configure the sources to use. We can add or override individual directories.
26368#
26369###############################################################################
26370
26371
26372  # Where are the sources. Any of these can be overridden
26373  # using --with-override-corba and the likes.
26374  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26375  CORBA_TOPDIR="$SRC_ROOT/corba"
26376  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26377  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26378  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26379  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26380  JDK_TOPDIR="$SRC_ROOT/jdk"
26381
26382
26383
26384
26385
26386
26387
26388
26389
26390
26391  ###############################################################################
26392  #
26393  # Pickup additional source for a component from outside of the source root
26394  # or override source for a component.
26395  #
26396
26397# Check whether --with-add-source-root was given.
26398if test "${with_add_source_root+set}" = set; then :
26399  withval=$with_add_source_root;
26400fi
26401
26402
26403
26404# Check whether --with-override-source-root was given.
26405if test "${with_override_source_root+set}" = set; then :
26406  withval=$with_override_source_root;
26407fi
26408
26409
26410
26411# Check whether --with-adds-and-overrides was given.
26412if test "${with_adds_and_overrides+set}" = set; then :
26413  withval=$with_adds_and_overrides;
26414fi
26415
26416
26417  if test "x$with_adds_and_overrides" != x; then
26418    with_add_source_root="$with_adds_and_overrides/adds"
26419    with_override_source_root="$with_adds_and_overrides/overrides"
26420  fi
26421
26422  if test "x$with_add_source_root" != x; then
26423    if ! test -d $with_add_source_root; then
26424      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26425    fi
26426    CURDIR="$PWD"
26427    cd "$with_add_source_root"
26428    ADD_SRC_ROOT="`pwd`"
26429    cd "$CURDIR"
26430    # Verify that the addon source root does not have any root makefiles.
26431    # If it does, then it is usually an error, prevent this.
26432    if test -f $with_add_source_root/langtools/make/Makefile; then
26433      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
26434    fi
26435    if test -f $with_add_source_root/corba/make/Makefile; then
26436      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
26437    fi
26438    if test -f $with_add_source_root/jaxp/make/Makefile; then
26439      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
26440    fi
26441    if test -f $with_add_source_root/jaxws/make/Makefile; then
26442      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
26443    fi
26444    if test -f $with_add_source_root/hotspot/make/Makefile; then
26445      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
26446    fi
26447    if test -f $with_add_source_root/nashorn/make/Makefile; then
26448      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
26449    fi
26450    if test -f $with_add_source_root/jdk/make/Makefile; then
26451      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
26452    fi
26453  fi
26454
26455
26456  if test "x$with_override_source_root" != x; then
26457    if ! test -d $with_override_source_root; then
26458      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26459    fi
26460    CURDIR="$PWD"
26461    cd "$with_override_source_root"
26462    OVERRIDE_SRC_ROOT="`pwd`"
26463    cd "$CURDIR"
26464    if test -f $with_override_source_root/langtools/make/Makefile; then
26465      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
26466    fi
26467    if test -f $with_override_source_root/corba/make/Makefile; then
26468      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
26469    fi
26470    if test -f $with_override_source_root/jaxp/make/Makefile; then
26471      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
26472    fi
26473    if test -f $with_override_source_root/jaxws/make/Makefile; then
26474      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
26475    fi
26476    if test -f $with_override_source_root/hotspot/make/Makefile; then
26477      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
26478    fi
26479    if test -f $with_override_source_root/nashorn/make/Makefile; then
26480      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
26481    fi
26482    if test -f $with_override_source_root/jdk/make/Makefile; then
26483      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
26484    fi
26485  fi
26486
26487
26488  ###############################################################################
26489  #
26490  # Override a repo completely, this is used for example when you have 3 small
26491  # development sandboxes of the langtools sources and want to avoid having 3 full
26492  # OpenJDK sources checked out on disk.
26493  #
26494  # Assuming that the 3 langtools sandboxes are located here:
26495  # /home/fredrik/sandbox1/langtools
26496  # /home/fredrik/sandbox2/langtools
26497  # /home/fredrik/sandbox3/langtools
26498  #
26499  # From the source root you create build subdirs manually:
26500  #     mkdir -p build1 build2 build3
26501  # in each build directory run:
26502  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26503  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26504  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26505  #
26506
26507
26508# Check whether --with-override-langtools was given.
26509if test "${with_override_langtools+set}" = set; then :
26510  withval=$with_override_langtools;
26511fi
26512
26513
26514
26515# Check whether --with-override-corba was given.
26516if test "${with_override_corba+set}" = set; then :
26517  withval=$with_override_corba;
26518fi
26519
26520
26521
26522# Check whether --with-override-jaxp was given.
26523if test "${with_override_jaxp+set}" = set; then :
26524  withval=$with_override_jaxp;
26525fi
26526
26527
26528
26529# Check whether --with-override-jaxws was given.
26530if test "${with_override_jaxws+set}" = set; then :
26531  withval=$with_override_jaxws;
26532fi
26533
26534
26535
26536# Check whether --with-override-hotspot was given.
26537if test "${with_override_hotspot+set}" = set; then :
26538  withval=$with_override_hotspot;
26539fi
26540
26541
26542
26543# Check whether --with-override-nashorn was given.
26544if test "${with_override_nashorn+set}" = set; then :
26545  withval=$with_override_nashorn;
26546fi
26547
26548
26549
26550# Check whether --with-override-jdk was given.
26551if test "${with_override_jdk+set}" = set; then :
26552  withval=$with_override_jdk;
26553fi
26554
26555
26556  if test "x$with_override_langtools" != x; then
26557    CURDIR="$PWD"
26558    cd "$with_override_langtools"
26559    LANGTOOLS_TOPDIR="`pwd`"
26560    cd "$CURDIR"
26561    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26562      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26563    fi
26564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26565$as_echo_n "checking if langtools should be overridden... " >&6; }
26566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26567$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26568  fi
26569  if test "x$with_override_corba" != x; then
26570    CURDIR="$PWD"
26571    cd "$with_override_corba"
26572    CORBA_TOPDIR="`pwd`"
26573    cd "$CURDIR"
26574    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26575      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26576    fi
26577    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26578$as_echo_n "checking if corba should be overridden... " >&6; }
26579    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26580$as_echo "yes with $CORBA_TOPDIR" >&6; }
26581  fi
26582  if test "x$with_override_jaxp" != x; then
26583    CURDIR="$PWD"
26584    cd "$with_override_jaxp"
26585    JAXP_TOPDIR="`pwd`"
26586    cd "$CURDIR"
26587    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26588      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26589    fi
26590    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26591$as_echo_n "checking if jaxp should be overridden... " >&6; }
26592    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26593$as_echo "yes with $JAXP_TOPDIR" >&6; }
26594  fi
26595  if test "x$with_override_jaxws" != x; then
26596    CURDIR="$PWD"
26597    cd "$with_override_jaxws"
26598    JAXWS_TOPDIR="`pwd`"
26599    cd "$CURDIR"
26600    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26601      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26602    fi
26603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26604$as_echo_n "checking if jaxws should be overridden... " >&6; }
26605    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26606$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26607  fi
26608  if test "x$with_override_hotspot" != x; then
26609    CURDIR="$PWD"
26610    cd "$with_override_hotspot"
26611    HOTSPOT_TOPDIR="`pwd`"
26612    cd "$CURDIR"
26613    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26614      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26615    fi
26616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26617$as_echo_n "checking if hotspot should be overridden... " >&6; }
26618    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26619$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26620  fi
26621  if test "x$with_override_nashorn" != x; then
26622    CURDIR="$PWD"
26623    cd "$with_override_nashorn"
26624    NASHORN_TOPDIR="`pwd`"
26625    cd "$CURDIR"
26626    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26627      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26628    fi
26629    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26630$as_echo_n "checking if nashorn should be overridden... " >&6; }
26631    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26632$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26633  fi
26634  if test "x$with_override_jdk" != x; then
26635    CURDIR="$PWD"
26636    cd "$with_override_jdk"
26637    JDK_TOPDIR="`pwd`"
26638    cd "$CURDIR"
26639    if ! test -f $JDK_TOPDIR/make/Makefile; then
26640      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26641    fi
26642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26643$as_echo_n "checking if JDK should be overridden... " >&6; }
26644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26645$as_echo "yes with $JDK_TOPDIR" >&6; }
26646  fi
26647
26648
26649  BUILD_OUTPUT="$OUTPUT_ROOT"
26650
26651
26652  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26653  BUILD_HOTSPOT=true
26654
26655
26656
26657# Check whether --with-import-hotspot was given.
26658if test "${with_import_hotspot+set}" = set; then :
26659  withval=$with_import_hotspot;
26660fi
26661
26662  if test "x$with_import_hotspot" != x; then
26663    CURDIR="$PWD"
26664    cd "$with_import_hotspot"
26665    HOTSPOT_DIST="`pwd`"
26666    cd "$CURDIR"
26667    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26668      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26669    fi
26670    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26671$as_echo_n "checking if hotspot should be imported... " >&6; }
26672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26673$as_echo "yes from $HOTSPOT_DIST" >&6; }
26674    BUILD_HOTSPOT=false
26675  fi
26676
26677  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26678
26679
26680###############################################################################
26681#
26682# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26683# native code.
26684#
26685###############################################################################
26686
26687# First determine the toolchain type (compiler family)
26688
26689
26690# Check whether --with-toolchain-type was given.
26691if test "${with_toolchain_type+set}" = set; then :
26692  withval=$with_toolchain_type;
26693fi
26694
26695
26696  # Use indirect variable referencing
26697  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26698  VALID_TOOLCHAINS=${!toolchain_var_name}
26699
26700  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26701    if test -n "$XCODEBUILD"; then
26702      # On Mac OS X, default toolchain to clang after Xcode 5
26703      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26704      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26705      if test $? -ne 0; then
26706        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26707      fi
26708      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26709          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26710          $CUT -f 1 -d .`
26711      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26712$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26713      if test $XCODE_MAJOR_VERSION -ge 5; then
26714          DEFAULT_TOOLCHAIN="clang"
26715      else
26716          DEFAULT_TOOLCHAIN="gcc"
26717      fi
26718    else
26719      # If Xcode is not installed, but the command line tools are
26720      # then we can't run xcodebuild. On these systems we should
26721      # default to clang
26722      DEFAULT_TOOLCHAIN="clang"
26723    fi
26724  else
26725    # First toolchain type in the list is the default
26726    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26727  fi
26728
26729  if test "x$with_toolchain_type" = xlist; then
26730    # List all toolchains
26731    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26732$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26733    for toolchain in $VALID_TOOLCHAINS; do
26734      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26735      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26736      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26737    done
26738
26739    exit 0
26740  elif test "x$with_toolchain_type" != x; then
26741    # User override; check that it is valid
26742    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26743      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26744$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26745      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26746$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26747      as_fn_error $? "Cannot continue." "$LINENO" 5
26748    fi
26749    TOOLCHAIN_TYPE=$with_toolchain_type
26750  else
26751    # No flag given, use default
26752    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26753  fi
26754
26755
26756  TOOLCHAIN_CC_BINARY_clang="clang"
26757  TOOLCHAIN_CC_BINARY_gcc="gcc"
26758  TOOLCHAIN_CC_BINARY_microsoft="cl"
26759  TOOLCHAIN_CC_BINARY_solstudio="cc"
26760  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26761
26762  TOOLCHAIN_CXX_BINARY_clang="clang++"
26763  TOOLCHAIN_CXX_BINARY_gcc="g++"
26764  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26765  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26766  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26767
26768  # Use indirect variable referencing
26769  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26770  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26771  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26772  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26773  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26774  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26775
26776
26777  # Define filename patterns
26778  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26779    LIBRARY_PREFIX=
26780    SHARED_LIBRARY_SUFFIX='.dll'
26781    STATIC_LIBRARY_SUFFIX='.lib'
26782    SHARED_LIBRARY='$1.dll'
26783    STATIC_LIBRARY='$1.lib'
26784    OBJ_SUFFIX='.obj'
26785    EXE_SUFFIX='.exe'
26786  else
26787    LIBRARY_PREFIX=lib
26788    SHARED_LIBRARY_SUFFIX='.so'
26789    STATIC_LIBRARY_SUFFIX='.a'
26790    SHARED_LIBRARY='lib$1.so'
26791    STATIC_LIBRARY='lib$1.a'
26792    OBJ_SUFFIX='.o'
26793    EXE_SUFFIX=''
26794    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26795      SHARED_LIBRARY='lib$1.dylib'
26796      SHARED_LIBRARY_SUFFIX='.dylib'
26797    fi
26798  fi
26799
26800
26801
26802
26803
26804
26805
26806
26807
26808
26809  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26810    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26811$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26812  else
26813    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26814$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26815  fi
26816
26817
26818# Then detect the actual binaries needed
26819
26820  # FIXME: Is this needed?
26821  ac_ext=cpp
26822ac_cpp='$CXXCPP $CPPFLAGS'
26823ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26824ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26825ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26826
26827
26828  # Store the CFLAGS etc passed to the configure script.
26829  ORG_CFLAGS="$CFLAGS"
26830  ORG_CXXFLAGS="$CXXFLAGS"
26831
26832  # autoconf magic only relies on PATH, so update it if tools dir is specified
26833  OLD_PATH="$PATH"
26834
26835  # On Windows, we need to detect the visual studio installation first.
26836  # This will change the PATH, but we need to keep that new PATH even
26837  # after toolchain detection is done, since the compiler (on x86) uses
26838  # it for DLL resolution in runtime.
26839  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26840      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26841
26842  # Store path to cygwin link.exe to help excluding it when searching for
26843  # VS linker. This must be done before changing the PATH when looking for VS.
26844  # Extract the first word of "link", so it can be a program name with args.
26845set dummy link; ac_word=$2
26846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26847$as_echo_n "checking for $ac_word... " >&6; }
26848if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26849  $as_echo_n "(cached) " >&6
26850else
26851  case $CYGWIN_LINK in
26852  [\\/]* | ?:[\\/]*)
26853  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26854  ;;
26855  *)
26856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26857for as_dir in $PATH
26858do
26859  IFS=$as_save_IFS
26860  test -z "$as_dir" && as_dir=.
26861    for ac_exec_ext in '' $ac_executable_extensions; do
26862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26863    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26865    break 2
26866  fi
26867done
26868  done
26869IFS=$as_save_IFS
26870
26871  ;;
26872esac
26873fi
26874CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26875if test -n "$CYGWIN_LINK"; then
26876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26877$as_echo "$CYGWIN_LINK" >&6; }
26878else
26879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26880$as_echo "no" >&6; }
26881fi
26882
26883
26884  if test "x$CYGWIN_LINK" != x; then
26885    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26886$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26887    "$CYGWIN_LINK" --version > /dev/null
26888    if test $? -eq 0 ; then
26889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26890$as_echo "yes" >&6; }
26891    else
26892      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26893$as_echo "no" >&6; }
26894      # This might be the VS linker. Don't exclude it later on.
26895      CYGWIN_LINK=""
26896    fi
26897  fi
26898
26899  # First-hand choice is to locate and run the vsvars bat file.
26900
26901
26902# Check whether --with-toolchain-version was given.
26903if test "${with_toolchain_version+set}" = set; then :
26904  withval=$with_toolchain_version;
26905fi
26906
26907
26908  if test "x$with_toolchain_version" = xlist; then
26909    # List all toolchains
26910    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26911$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26912    for version in $VALID_VS_VERSIONS; do
26913      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26914      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26915    done
26916
26917    exit 0
26918  elif test "x$DEVKIT_VS_VERSION" != x; then
26919    VS_VERSION=$DEVKIT_VS_VERSION
26920    TOOLCHAIN_VERSION=$VS_VERSION
26921    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26922    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26923    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26924    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26925    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26926    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26927
26928    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26929    # can still be exported as INCLUDE for compiler invocations without
26930    # SYSROOT_CFLAGS
26931    OLDIFS="$IFS"
26932    IFS=";"
26933    for i in $DEVKIT_VS_INCLUDE; do
26934      ipath=$i
26935
26936  unix_path="$ipath"
26937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26938    windows_path=`$CYGPATH -m "$unix_path"`
26939    ipath="$windows_path"
26940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26941    windows_path=`cmd //c echo $unix_path`
26942    ipath="$windows_path"
26943  fi
26944
26945      VS_INCLUDE="$VS_INCLUDE;$ipath"
26946    done
26947    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26948    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26949    for i in $DEVKIT_VS_LIB; do
26950      libpath=$i
26951
26952  unix_path="$libpath"
26953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26954    windows_path=`$CYGPATH -m "$unix_path"`
26955    libpath="$windows_path"
26956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26957    windows_path=`cmd //c echo $unix_path`
26958    libpath="$windows_path"
26959  fi
26960
26961      VS_LIB="$VS_LIB;$libpath"
26962    done
26963    IFS="$OLDIFS"
26964
26965    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26966$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26967
26968  elif test "x$with_toolchain_version" != x; then
26969    # User override; check that it is valid
26970    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26971      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26972$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26973      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26974$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26975      as_fn_error $? "Cannot continue." "$LINENO" 5
26976    fi
26977    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26978  else
26979    # No flag given, use default
26980    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26981  fi
26982
26983  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26984
26985  VS_VERSION="$VS_VERSION"
26986  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26987  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26988  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26989  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26990
26991  # When using --with-tools-dir, assume it points to the correct and default
26992  # version of Visual Studio or that --with-toolchain-version was also set.
26993  if test "x$with_tools_dir" != x; then
26994
26995  if test "x$VS_ENV_CMD" = x; then
26996    VS_VERSION="${VS_VERSION}"
26997    VS_BASE="$with_tools_dir/../.."
26998    METHOD="--with-tools-dir"
26999
27000    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27001      VCVARSFILE="vc/bin/vcvars32.bat"
27002    else
27003      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27004    fi
27005
27006
27007  windows_path="$VS_BASE"
27008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27009    unix_path=`$CYGPATH -u "$windows_path"`
27010    VS_BASE="$unix_path"
27011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27013    VS_BASE="$unix_path"
27014  fi
27015
27016    if test -d "$VS_BASE"; then
27017      if test -f "$VS_BASE/$VCVARSFILE"; then
27018        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27019$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27020        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27021        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27022        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27023        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27024      else
27025        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27026$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27027        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27028$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27029      fi
27030    fi
27031  fi
27032
27033
27034  if test "x$VS_ENV_CMD" = x; then
27035    VS_VERSION="${VS_VERSION}"
27036    VS_BASE="$with_tools_dir/../../.."
27037    METHOD="--with-tools-dir"
27038
27039    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27040      VCVARSFILE="vc/bin/vcvars32.bat"
27041    else
27042      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27043    fi
27044
27045
27046  windows_path="$VS_BASE"
27047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27048    unix_path=`$CYGPATH -u "$windows_path"`
27049    VS_BASE="$unix_path"
27050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27052    VS_BASE="$unix_path"
27053  fi
27054
27055    if test -d "$VS_BASE"; then
27056      if test -f "$VS_BASE/$VCVARSFILE"; then
27057        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27058$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27059        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27060        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27061        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27062        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27063      else
27064        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27065$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27066        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27067$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27068      fi
27069    fi
27070  fi
27071
27072    if test "x$VS_ENV_CMD" = x; then
27073      # Having specified an argument which is incorrect will produce an instant failure;
27074      # we should not go on looking
27075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
27076$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
27077      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
27078$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
27079      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
27080$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
27081      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
27082    fi
27083  fi
27084
27085  VS_ENV_CMD=""
27086  VS_ENV_ARGS=""
27087
27088  if test "x$VS_COMNTOOLS" != x; then
27089
27090  if test "x$VS_ENV_CMD" = x; then
27091    VS_VERSION="${VS_VERSION}"
27092    VS_BASE="$VS_COMNTOOLS/../.."
27093    METHOD="$VS_COMNTOOLS_VAR variable"
27094
27095    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27096      VCVARSFILE="vc/bin/vcvars32.bat"
27097    else
27098      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27099    fi
27100
27101
27102  windows_path="$VS_BASE"
27103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27104    unix_path=`$CYGPATH -u "$windows_path"`
27105    VS_BASE="$unix_path"
27106  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27107    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27108    VS_BASE="$unix_path"
27109  fi
27110
27111    if test -d "$VS_BASE"; then
27112      if test -f "$VS_BASE/$VCVARSFILE"; then
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27114$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27115        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27116        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27117        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27118        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27119      else
27120        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27121$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27122        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27123$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27124      fi
27125    fi
27126  fi
27127
27128  fi
27129  if test "x$PROGRAMFILES" != x; then
27130
27131  if test "x$VS_ENV_CMD" = x; then
27132    VS_VERSION="${VS_VERSION}"
27133    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
27134    METHOD="well-known name"
27135
27136    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27137      VCVARSFILE="vc/bin/vcvars32.bat"
27138    else
27139      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27140    fi
27141
27142
27143  windows_path="$VS_BASE"
27144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27145    unix_path=`$CYGPATH -u "$windows_path"`
27146    VS_BASE="$unix_path"
27147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27149    VS_BASE="$unix_path"
27150  fi
27151
27152    if test -d "$VS_BASE"; then
27153      if test -f "$VS_BASE/$VCVARSFILE"; then
27154        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27155$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27156        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27157        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27158        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27159        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27160      else
27161        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27162$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27163        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27164$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27165      fi
27166    fi
27167  fi
27168
27169  fi
27170  # Work around the insanely named ProgramFiles(x86) env variable
27171  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
27172  if test "x$PROGRAMFILES_X86" != x; then
27173
27174  if test "x$VS_ENV_CMD" = x; then
27175    VS_VERSION="${VS_VERSION}"
27176    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27177    METHOD="well-known name"
27178
27179    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27180      VCVARSFILE="vc/bin/vcvars32.bat"
27181    else
27182      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27183    fi
27184
27185
27186  windows_path="$VS_BASE"
27187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27188    unix_path=`$CYGPATH -u "$windows_path"`
27189    VS_BASE="$unix_path"
27190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27192    VS_BASE="$unix_path"
27193  fi
27194
27195    if test -d "$VS_BASE"; then
27196      if test -f "$VS_BASE/$VCVARSFILE"; then
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27198$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27199        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27200        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27201        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27202        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27203      else
27204        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27205$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27206        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27207$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27208      fi
27209    fi
27210  fi
27211
27212  fi
27213
27214  if test "x$VS_ENV_CMD" = x; then
27215    VS_VERSION="${VS_VERSION}"
27216    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27217    METHOD="well-known name"
27218
27219    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27220      VCVARSFILE="vc/bin/vcvars32.bat"
27221    else
27222      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27223    fi
27224
27225
27226  windows_path="$VS_BASE"
27227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27228    unix_path=`$CYGPATH -u "$windows_path"`
27229    VS_BASE="$unix_path"
27230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27232    VS_BASE="$unix_path"
27233  fi
27234
27235    if test -d "$VS_BASE"; then
27236      if test -f "$VS_BASE/$VCVARSFILE"; then
27237        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27238$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27239        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27240        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27241        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27242        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27243      else
27244        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27245$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27246        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27247$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27248      fi
27249    fi
27250  fi
27251
27252
27253  if test "x$VS_ENV_CMD" = x; then
27254    VS_VERSION="${VS_VERSION}"
27255    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27256    METHOD="well-known name"
27257
27258    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27259      VCVARSFILE="vc/bin/vcvars32.bat"
27260    else
27261      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27262    fi
27263
27264
27265  windows_path="$VS_BASE"
27266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27267    unix_path=`$CYGPATH -u "$windows_path"`
27268    VS_BASE="$unix_path"
27269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27271    VS_BASE="$unix_path"
27272  fi
27273
27274    if test -d "$VS_BASE"; then
27275      if test -f "$VS_BASE/$VCVARSFILE"; then
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27277$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27278        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27279        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27280        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27281        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27282      else
27283        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27284$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27285        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27286$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27287      fi
27288    fi
27289  fi
27290
27291
27292  if test "x$SDK_INSTALL_DIR" != x; then
27293    if test "x$ProgramW6432" != x; then
27294
27295  if test "x$VS_ENV_CMD" = x; then
27296    VS_VERSION="${VS_VERSION}"
27297    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27298    METHOD="well-known name"
27299
27300  windows_path="$WIN_SDK_BASE"
27301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27302    unix_path=`$CYGPATH -u "$windows_path"`
27303    WIN_SDK_BASE="$unix_path"
27304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27306    WIN_SDK_BASE="$unix_path"
27307  fi
27308
27309    if test -d "$WIN_SDK_BASE"; then
27310      # There have been cases of partial or broken SDK installations. A missing
27311      # lib dir is not going to work.
27312      if test ! -d "$WIN_SDK_BASE/lib"; then
27313        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27314$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27315        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27316$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27317      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27318        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27319$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27320        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27321        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27322          VS_ENV_ARGS="/x86"
27323        else
27324          VS_ENV_ARGS="/x64"
27325        fi
27326        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27327        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27328        # TODO: improve detection for other versions of SDK
27329        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27330      else
27331        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27332$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27333        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27334$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27335      fi
27336    fi
27337  fi
27338
27339    fi
27340    if test "x$PROGRAMW6432" != x; then
27341
27342  if test "x$VS_ENV_CMD" = x; then
27343    VS_VERSION="${VS_VERSION}"
27344    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27345    METHOD="well-known name"
27346
27347  windows_path="$WIN_SDK_BASE"
27348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27349    unix_path=`$CYGPATH -u "$windows_path"`
27350    WIN_SDK_BASE="$unix_path"
27351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27353    WIN_SDK_BASE="$unix_path"
27354  fi
27355
27356    if test -d "$WIN_SDK_BASE"; then
27357      # There have been cases of partial or broken SDK installations. A missing
27358      # lib dir is not going to work.
27359      if test ! -d "$WIN_SDK_BASE/lib"; then
27360        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27361$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27362        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27363$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27364      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27365        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27366$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27367        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27368        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27369          VS_ENV_ARGS="/x86"
27370        else
27371          VS_ENV_ARGS="/x64"
27372        fi
27373        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27374        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27375        # TODO: improve detection for other versions of SDK
27376        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27377      else
27378        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27379$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27380        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27381$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27382      fi
27383    fi
27384  fi
27385
27386    fi
27387    if test "x$PROGRAMFILES" != x; then
27388
27389  if test "x$VS_ENV_CMD" = x; then
27390    VS_VERSION="${VS_VERSION}"
27391    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27392    METHOD="well-known name"
27393
27394  windows_path="$WIN_SDK_BASE"
27395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27396    unix_path=`$CYGPATH -u "$windows_path"`
27397    WIN_SDK_BASE="$unix_path"
27398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27400    WIN_SDK_BASE="$unix_path"
27401  fi
27402
27403    if test -d "$WIN_SDK_BASE"; then
27404      # There have been cases of partial or broken SDK installations. A missing
27405      # lib dir is not going to work.
27406      if test ! -d "$WIN_SDK_BASE/lib"; then
27407        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27408$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27409        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27410$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27411      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27412        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27413$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27414        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27415        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27416          VS_ENV_ARGS="/x86"
27417        else
27418          VS_ENV_ARGS="/x64"
27419        fi
27420        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27421        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27422        # TODO: improve detection for other versions of SDK
27423        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27424      else
27425        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27426$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27427        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27428$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27429      fi
27430    fi
27431  fi
27432
27433    fi
27434
27435  if test "x$VS_ENV_CMD" = x; then
27436    VS_VERSION="${VS_VERSION}"
27437    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27438    METHOD="well-known name"
27439
27440  windows_path="$WIN_SDK_BASE"
27441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27442    unix_path=`$CYGPATH -u "$windows_path"`
27443    WIN_SDK_BASE="$unix_path"
27444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27446    WIN_SDK_BASE="$unix_path"
27447  fi
27448
27449    if test -d "$WIN_SDK_BASE"; then
27450      # There have been cases of partial or broken SDK installations. A missing
27451      # lib dir is not going to work.
27452      if test ! -d "$WIN_SDK_BASE/lib"; then
27453        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27454$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27455        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27456$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27457      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27458        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27459$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27460        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27461        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27462          VS_ENV_ARGS="/x86"
27463        else
27464          VS_ENV_ARGS="/x64"
27465        fi
27466        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27467        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27468        # TODO: improve detection for other versions of SDK
27469        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27470      else
27471        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27472$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27473        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27474$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27475      fi
27476    fi
27477  fi
27478
27479
27480  if test "x$VS_ENV_CMD" = x; then
27481    VS_VERSION="${VS_VERSION}"
27482    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27483    METHOD="well-known name"
27484
27485  windows_path="$WIN_SDK_BASE"
27486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27487    unix_path=`$CYGPATH -u "$windows_path"`
27488    WIN_SDK_BASE="$unix_path"
27489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27491    WIN_SDK_BASE="$unix_path"
27492  fi
27493
27494    if test -d "$WIN_SDK_BASE"; then
27495      # There have been cases of partial or broken SDK installations. A missing
27496      # lib dir is not going to work.
27497      if test ! -d "$WIN_SDK_BASE/lib"; then
27498        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27499$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27500        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27501$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27502      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27503        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27504$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27505        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27506        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27507          VS_ENV_ARGS="/x86"
27508        else
27509          VS_ENV_ARGS="/x64"
27510        fi
27511        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27512        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27513        # TODO: improve detection for other versions of SDK
27514        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27515      else
27516        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27517$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27518        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27519$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27520      fi
27521    fi
27522  fi
27523
27524  fi
27525
27526    if test "x$VS_ENV_CMD" != x; then
27527      TOOLCHAIN_VERSION=$VS_VERSION
27528      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27529      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27530      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27531      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27532      # The rest of the variables are already evaled while probing
27533      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27534$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27535      break
27536    fi
27537  done
27538
27539
27540  # If we have a devkit, skip all of the below.
27541  if test "x$DEVKIT_VS_VERSION" = x; then
27542    if test "x$VS_ENV_CMD" != x; then
27543      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27544
27545  # Only process if variable expands to non-empty
27546
27547  if test "x$VS_ENV_CMD" != x; then
27548    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27549
27550  # First separate the path from the arguments. This will split at the first
27551  # space.
27552  complete="$VS_ENV_CMD"
27553  path="${complete%% *}"
27554  tmp="$complete EOL"
27555  arguments="${tmp#* }"
27556
27557  # Input might be given as Windows format, start by converting to
27558  # unix format.
27559  new_path=`$CYGPATH -u "$path"`
27560
27561  # Now try to locate executable using which
27562  new_path=`$WHICH "$new_path" 2> /dev/null`
27563  # bat and cmd files are not always considered executable in cygwin causing which
27564  # to not find them
27565  if test "x$new_path" = x \
27566      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27567      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27568    new_path=`$CYGPATH -u "$path"`
27569  fi
27570  if test "x$new_path" = x; then
27571    # Oops. Which didn't find the executable.
27572    # The splitting of arguments from the executable at a space might have been incorrect,
27573    # since paths with space are more likely in Windows. Give it another try with the whole
27574    # argument.
27575    path="$complete"
27576    arguments="EOL"
27577    new_path=`$CYGPATH -u "$path"`
27578    new_path=`$WHICH "$new_path" 2> /dev/null`
27579    # bat and cmd files are not always considered executable in cygwin causing which
27580    # to not find them
27581    if test "x$new_path" = x \
27582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27584      new_path=`$CYGPATH -u "$path"`
27585    fi
27586    if test "x$new_path" = x; then
27587      # It's still not found. Now this is an unrecoverable error.
27588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27589$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27590      has_space=`$ECHO "$complete" | $GREP " "`
27591      if test "x$has_space" != x; then
27592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27594      fi
27595      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27596    fi
27597  fi
27598
27599  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27600  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27601  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27602  # "foo.exe" is OK but "foo" is an error.
27603  #
27604  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27605  # It is also a way to make sure we got the proper file name for the real test later on.
27606  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27607  if test "x$test_shortpath" = x; then
27608    # Short path failed, file does not exist as specified.
27609    # Try adding .exe or .cmd
27610    if test -f "${new_path}.exe"; then
27611      input_to_shortpath="${new_path}.exe"
27612    elif test -f "${new_path}.cmd"; then
27613      input_to_shortpath="${new_path}.cmd"
27614    else
27615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27616$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27617      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27618$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27619      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27620    fi
27621  else
27622    input_to_shortpath="$new_path"
27623  fi
27624
27625  # Call helper function which possibly converts this using DOS-style short mode.
27626  # If so, the updated path is stored in $new_path.
27627  new_path="$input_to_shortpath"
27628
27629  input_path="$input_to_shortpath"
27630  # Check if we need to convert this using DOS-style short mode. If the path
27631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27632  # take no chances and rewrite it.
27633  # Note: m4 eats our [], so we need to use [ and ] instead.
27634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27635  if test "x$has_forbidden_chars" != x; then
27636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27640      # Going to short mode and back again did indeed matter. Since short mode is
27641      # case insensitive, let's make it lowercase to improve readability.
27642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27643      # Now convert it back to Unix-style (cygpath)
27644      input_path=`$CYGPATH -u "$shortmode_path"`
27645      new_path="$input_path"
27646    fi
27647  fi
27648
27649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27650  if test "x$test_cygdrive_prefix" = x; then
27651    # As a simple fix, exclude /usr/bin since it's not a real path.
27652    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27654      # a path prefixed by /cygdrive for fixpath to work.
27655      new_path="$CYGWIN_ROOT_PATH$input_path"
27656    fi
27657  fi
27658
27659  # remove trailing .exe if any
27660  new_path="${new_path/%.exe/}"
27661
27662    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27663
27664  # First separate the path from the arguments. This will split at the first
27665  # space.
27666  complete="$VS_ENV_CMD"
27667  path="${complete%% *}"
27668  tmp="$complete EOL"
27669  arguments="${tmp#* }"
27670
27671  # Input might be given as Windows format, start by converting to
27672  # unix format.
27673  new_path="$path"
27674
27675  windows_path="$new_path"
27676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27677    unix_path=`$CYGPATH -u "$windows_path"`
27678    new_path="$unix_path"
27679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27681    new_path="$unix_path"
27682  fi
27683
27684
27685  # Now try to locate executable using which
27686  new_path=`$WHICH "$new_path" 2> /dev/null`
27687
27688  if test "x$new_path" = x; then
27689    # Oops. Which didn't find the executable.
27690    # The splitting of arguments from the executable at a space might have been incorrect,
27691    # since paths with space are more likely in Windows. Give it another try with the whole
27692    # argument.
27693    path="$complete"
27694    arguments="EOL"
27695    new_path="$path"
27696
27697  windows_path="$new_path"
27698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27699    unix_path=`$CYGPATH -u "$windows_path"`
27700    new_path="$unix_path"
27701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27703    new_path="$unix_path"
27704  fi
27705
27706
27707    new_path=`$WHICH "$new_path" 2> /dev/null`
27708    # bat and cmd files are not always considered executable in MSYS causing which
27709    # to not find them
27710    if test "x$new_path" = x \
27711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27713      new_path="$path"
27714
27715  windows_path="$new_path"
27716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27717    unix_path=`$CYGPATH -u "$windows_path"`
27718    new_path="$unix_path"
27719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27721    new_path="$unix_path"
27722  fi
27723
27724    fi
27725
27726    if test "x$new_path" = x; then
27727      # It's still not found. Now this is an unrecoverable error.
27728      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27729$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27730      has_space=`$ECHO "$complete" | $GREP " "`
27731      if test "x$has_space" != x; then
27732        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27733$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27734      fi
27735      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27736    fi
27737  fi
27738
27739  # Now new_path has a complete unix path to the binary
27740  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27741    # Keep paths in /bin as-is, but remove trailing .exe if any
27742    new_path="${new_path/%.exe/}"
27743    # Do not save /bin paths to all_fixpath_prefixes!
27744  else
27745    # Not in mixed or Windows style, start by that.
27746    new_path=`cmd //c echo $new_path`
27747
27748  input_path="$new_path"
27749  # Check if we need to convert this using DOS-style short mode. If the path
27750  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27751  # take no chances and rewrite it.
27752  # Note: m4 eats our [], so we need to use [ and ] instead.
27753  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27754  if test "x$has_forbidden_chars" != x; then
27755    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27756    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27757  fi
27758
27759    # Output is in $new_path
27760
27761  windows_path="$new_path"
27762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27763    unix_path=`$CYGPATH -u "$windows_path"`
27764    new_path="$unix_path"
27765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27767    new_path="$unix_path"
27768  fi
27769
27770    # remove trailing .exe if any
27771    new_path="${new_path/%.exe/}"
27772
27773    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27774    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27775  fi
27776
27777    else
27778      # We're on a unix platform. Hooray! :)
27779      # First separate the path from the arguments. This will split at the first
27780      # space.
27781      complete="$VS_ENV_CMD"
27782      path="${complete%% *}"
27783      tmp="$complete EOL"
27784      arguments="${tmp#* }"
27785
27786      # Cannot rely on the command "which" here since it doesn't always work.
27787      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27788      if test -z "$is_absolute_path"; then
27789        # Path to executable is not absolute. Find it.
27790        IFS_save="$IFS"
27791        IFS=:
27792        for p in $PATH; do
27793          if test -f "$p/$path" && test -x "$p/$path"; then
27794            new_path="$p/$path"
27795            break
27796          fi
27797        done
27798        IFS="$IFS_save"
27799      else
27800        # This is an absolute path, we can use it without further modifications.
27801        new_path="$path"
27802      fi
27803
27804      if test "x$new_path" = x; then
27805        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27806$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27807        has_space=`$ECHO "$complete" | $GREP " "`
27808        if test "x$has_space" != x; then
27809          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27810$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27811        fi
27812        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27813      fi
27814    fi
27815
27816    # Now join together the path and the arguments once again
27817    if test "x$arguments" != xEOL; then
27818      new_complete="$new_path ${arguments% *}"
27819    else
27820      new_complete="$new_path"
27821    fi
27822
27823    if test "x$complete" != "x$new_complete"; then
27824      VS_ENV_CMD="$new_complete"
27825      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27826$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27827    fi
27828  fi
27829
27830
27831      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27832      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27833$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27834
27835      # We need to create a couple of temporary files.
27836      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27837      $MKDIR -p $VS_ENV_TMP_DIR
27838
27839      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27840      # Instead create a shell script which will set the relevant variables when run.
27841      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27842
27843  unix_path="$WINPATH_VS_ENV_CMD"
27844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27845    windows_path=`$CYGPATH -m "$unix_path"`
27846    WINPATH_VS_ENV_CMD="$windows_path"
27847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27848    windows_path=`cmd //c echo $unix_path`
27849    WINPATH_VS_ENV_CMD="$windows_path"
27850  fi
27851
27852      WINPATH_BASH="$BASH"
27853
27854  unix_path="$WINPATH_BASH"
27855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27856    windows_path=`$CYGPATH -m "$unix_path"`
27857    WINPATH_BASH="$windows_path"
27858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27859    windows_path=`cmd //c echo $unix_path`
27860    WINPATH_BASH="$windows_path"
27861  fi
27862
27863
27864      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27865      # script (executable by bash) that will setup the important variables.
27866      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27867      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27868      # This will end up something like:
27869      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27870      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27871      # These will end up something like:
27872      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27873      # The trailing space for everyone except PATH is no typo, but is needed due
27874      # to trailing \ in the Windows paths. These will be stripped later.
27875      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27876          >> $EXTRACT_VC_ENV_BAT_FILE
27877      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27878          >> $EXTRACT_VC_ENV_BAT_FILE
27879      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27880          >> $EXTRACT_VC_ENV_BAT_FILE
27881      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27882          >> $EXTRACT_VC_ENV_BAT_FILE
27883      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27884          >> $EXTRACT_VC_ENV_BAT_FILE
27885      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27886          >> $EXTRACT_VC_ENV_BAT_FILE
27887
27888      # Now execute the newly created bat file.
27889      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27890      # Change directory so we don't need to mess with Windows paths in redirects.
27891      cd $VS_ENV_TMP_DIR
27892      cmd /c extract-vs-env.bat | $CAT
27893      cd $CURDIR
27894
27895      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27896        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27897$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27898        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27899$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27900        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27901$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27902        as_fn_error $? "Cannot continue" "$LINENO" 5
27903      fi
27904
27905      # Now set all paths and other env variables. This will allow the rest of
27906      # the configure script to find and run the compiler in the proper way.
27907      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27908$as_echo "$as_me: Setting extracted environment variables" >&6;}
27909      . $VS_ENV_TMP_DIR/set-vs-env.sh
27910      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27911      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27912    else
27913      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27914      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27915$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27916    fi
27917  fi
27918
27919  # At this point, we should have correct variables in the environment, or we can't continue.
27920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27921$as_echo_n "checking for Visual Studio variables... " >&6; }
27922
27923  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27924      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27925    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27927$as_echo "present but broken" >&6; }
27928      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27929    else
27930      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27931$as_echo "ok" >&6; }
27932      # Remove any trailing "\" ";" and " " from the variables.
27933      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27934      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27935      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27936      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27937      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27938      # Remove any paths containing # (typically F#) as that messes up make. This
27939      # is needed if visual studio was installed with F# support.
27940      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27941
27942
27943
27944
27945
27946      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27947      OLDIFS="$IFS"
27948      IFS=";"
27949      for i in $VS_INCLUDE; do
27950        ipath=$i
27951        # Only process non-empty elements
27952        if test "x$ipath" != x; then
27953          IFS="$OLDIFS"
27954          # Check that directory exists before calling fixup_path
27955          testpath=$ipath
27956
27957  windows_path="$testpath"
27958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27959    unix_path=`$CYGPATH -u "$windows_path"`
27960    testpath="$unix_path"
27961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27963    testpath="$unix_path"
27964  fi
27965
27966          if test -d "$testpath"; then
27967
27968  # Only process if variable expands to non-empty
27969
27970  if test "x$ipath" != x; then
27971    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27972
27973  # Input might be given as Windows format, start by converting to
27974  # unix format.
27975  path="$ipath"
27976  new_path=`$CYGPATH -u "$path"`
27977
27978  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27979  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27980  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27981  # "foo.exe" is OK but "foo" is an error.
27982  #
27983  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27984  # It is also a way to make sure we got the proper file name for the real test later on.
27985  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27986  if test "x$test_shortpath" = x; then
27987    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27988$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27989    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27990  fi
27991
27992  # Call helper function which possibly converts this using DOS-style short mode.
27993  # If so, the updated path is stored in $new_path.
27994
27995  input_path="$new_path"
27996  # Check if we need to convert this using DOS-style short mode. If the path
27997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27998  # take no chances and rewrite it.
27999  # Note: m4 eats our [], so we need to use [ and ] instead.
28000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28001  if test "x$has_forbidden_chars" != x; then
28002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28003    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28004    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28005    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28006      # Going to short mode and back again did indeed matter. Since short mode is
28007      # case insensitive, let's make it lowercase to improve readability.
28008      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28009      # Now convert it back to Unix-style (cygpath)
28010      input_path=`$CYGPATH -u "$shortmode_path"`
28011      new_path="$input_path"
28012    fi
28013  fi
28014
28015  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28016  if test "x$test_cygdrive_prefix" = x; then
28017    # As a simple fix, exclude /usr/bin since it's not a real path.
28018    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28019      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28020      # a path prefixed by /cygdrive for fixpath to work.
28021      new_path="$CYGWIN_ROOT_PATH$input_path"
28022    fi
28023  fi
28024
28025
28026  if test "x$path" != "x$new_path"; then
28027    ipath="$new_path"
28028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28029$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28030  fi
28031
28032    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28033
28034  path="$ipath"
28035  has_colon=`$ECHO $path | $GREP ^.:`
28036  new_path="$path"
28037  if test "x$has_colon" = x; then
28038    # Not in mixed or Windows style, start by that.
28039    new_path=`cmd //c echo $path`
28040  fi
28041
28042
28043  input_path="$new_path"
28044  # Check if we need to convert this using DOS-style short mode. If the path
28045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28046  # take no chances and rewrite it.
28047  # Note: m4 eats our [], so we need to use [ and ] instead.
28048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28049  if test "x$has_forbidden_chars" != x; then
28050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28051    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28052  fi
28053
28054
28055  windows_path="$new_path"
28056  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28057    unix_path=`$CYGPATH -u "$windows_path"`
28058    new_path="$unix_path"
28059  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28060    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28061    new_path="$unix_path"
28062  fi
28063
28064  if test "x$path" != "x$new_path"; then
28065    ipath="$new_path"
28066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
28067$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
28068  fi
28069
28070  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28071  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28072
28073    else
28074      # We're on a unix platform. Hooray! :)
28075      path="$ipath"
28076      has_space=`$ECHO "$path" | $GREP " "`
28077      if test "x$has_space" != x; then
28078        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
28079$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
28080        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28081      fi
28082
28083      # Use eval to expand a potential ~
28084      eval path="$path"
28085      if test ! -f "$path" && test ! -d "$path"; then
28086        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
28087      fi
28088
28089      ipath="`cd "$path"; $THEPWDCMD -L`"
28090    fi
28091  fi
28092
28093            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
28094          fi
28095          IFS=";"
28096        fi
28097      done
28098      # Convert VS_LIB into SYSROOT_LDFLAGS
28099      for i in $VS_LIB; do
28100        libpath=$i
28101        # Only process non-empty elements
28102        if test "x$libpath" != x; then
28103          IFS="$OLDIFS"
28104          # Check that directory exists before calling fixup_path
28105          testpath=$libpath
28106
28107  windows_path="$testpath"
28108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28109    unix_path=`$CYGPATH -u "$windows_path"`
28110    testpath="$unix_path"
28111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28113    testpath="$unix_path"
28114  fi
28115
28116          if test -d "$testpath"; then
28117
28118  # Only process if variable expands to non-empty
28119
28120  if test "x$libpath" != x; then
28121    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28122
28123  # Input might be given as Windows format, start by converting to
28124  # unix format.
28125  path="$libpath"
28126  new_path=`$CYGPATH -u "$path"`
28127
28128  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28129  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28130  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28131  # "foo.exe" is OK but "foo" is an error.
28132  #
28133  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28134  # It is also a way to make sure we got the proper file name for the real test later on.
28135  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28136  if test "x$test_shortpath" = x; then
28137    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28138$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28139    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
28140  fi
28141
28142  # Call helper function which possibly converts this using DOS-style short mode.
28143  # If so, the updated path is stored in $new_path.
28144
28145  input_path="$new_path"
28146  # Check if we need to convert this using DOS-style short mode. If the path
28147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28148  # take no chances and rewrite it.
28149  # Note: m4 eats our [], so we need to use [ and ] instead.
28150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28151  if test "x$has_forbidden_chars" != x; then
28152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28153    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28154    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28155    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28156      # Going to short mode and back again did indeed matter. Since short mode is
28157      # case insensitive, let's make it lowercase to improve readability.
28158      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28159      # Now convert it back to Unix-style (cygpath)
28160      input_path=`$CYGPATH -u "$shortmode_path"`
28161      new_path="$input_path"
28162    fi
28163  fi
28164
28165  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28166  if test "x$test_cygdrive_prefix" = x; then
28167    # As a simple fix, exclude /usr/bin since it's not a real path.
28168    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28169      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28170      # a path prefixed by /cygdrive for fixpath to work.
28171      new_path="$CYGWIN_ROOT_PATH$input_path"
28172    fi
28173  fi
28174
28175
28176  if test "x$path" != "x$new_path"; then
28177    libpath="$new_path"
28178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28179$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28180  fi
28181
28182    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28183
28184  path="$libpath"
28185  has_colon=`$ECHO $path | $GREP ^.:`
28186  new_path="$path"
28187  if test "x$has_colon" = x; then
28188    # Not in mixed or Windows style, start by that.
28189    new_path=`cmd //c echo $path`
28190  fi
28191
28192
28193  input_path="$new_path"
28194  # Check if we need to convert this using DOS-style short mode. If the path
28195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28196  # take no chances and rewrite it.
28197  # Note: m4 eats our [], so we need to use [ and ] instead.
28198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28199  if test "x$has_forbidden_chars" != x; then
28200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28201    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28202  fi
28203
28204
28205  windows_path="$new_path"
28206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28207    unix_path=`$CYGPATH -u "$windows_path"`
28208    new_path="$unix_path"
28209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28210    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28211    new_path="$unix_path"
28212  fi
28213
28214  if test "x$path" != "x$new_path"; then
28215    libpath="$new_path"
28216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28217$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28218  fi
28219
28220  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28221  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28222
28223    else
28224      # We're on a unix platform. Hooray! :)
28225      path="$libpath"
28226      has_space=`$ECHO "$path" | $GREP " "`
28227      if test "x$has_space" != x; then
28228        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28229$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28230        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28231      fi
28232
28233      # Use eval to expand a potential ~
28234      eval path="$path"
28235      if test ! -f "$path" && test ! -d "$path"; then
28236        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28237      fi
28238
28239      libpath="`cd "$path"; $THEPWDCMD -L`"
28240    fi
28241  fi
28242
28243            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28244          fi
28245          IFS=";"
28246        fi
28247      done
28248      IFS="$OLDIFS"
28249    fi
28250  else
28251    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28252$as_echo "not found" >&6; }
28253
28254    if test "x$VS_ENV_CMD" = x; then
28255      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28256$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28257      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28258$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28259    else
28260      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28261$as_echo "$as_me: Running the extraction script failed." >&6;}
28262    fi
28263    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28264$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28265    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28266$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28267    as_fn_error $? "Cannot continue" "$LINENO" 5
28268  fi
28269
28270    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28271    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28272    PATH="$VS_PATH"
28273    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28274    export INCLUDE="$VS_INCLUDE"
28275    export LIB="$VS_LIB"
28276  fi
28277
28278  # For solaris we really need solaris tools, and not the GNU equivalent.
28279  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28280  # so add that to path before starting to probe.
28281  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28282  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28283    PATH="/usr/ccs/bin:$PATH"
28284  fi
28285
28286  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28287  # override all other locations.
28288  if test "x$TOOLCHAIN_PATH" != x; then
28289    PATH=$TOOLCHAIN_PATH:$PATH
28290  fi
28291
28292
28293  #
28294  # Setup the compilers (CC and CXX)
28295  #
28296
28297  COMPILER_NAME=C
28298  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28299
28300  if test "x$CC" != x; then
28301    # User has supplied compiler name already, always let that override.
28302    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28303$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28304    if test "x`basename $CC`" = "x$CC"; then
28305      # A command without a complete path is provided, search $PATH.
28306
28307      for ac_prog in $CC
28308do
28309  # Extract the first word of "$ac_prog", so it can be a program name with args.
28310set dummy $ac_prog; ac_word=$2
28311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28312$as_echo_n "checking for $ac_word... " >&6; }
28313if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28314  $as_echo_n "(cached) " >&6
28315else
28316  case $POTENTIAL_CC in
28317  [\\/]* | ?:[\\/]*)
28318  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28319  ;;
28320  *)
28321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28322for as_dir in $PATH
28323do
28324  IFS=$as_save_IFS
28325  test -z "$as_dir" && as_dir=.
28326    for ac_exec_ext in '' $ac_executable_extensions; do
28327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28328    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28330    break 2
28331  fi
28332done
28333  done
28334IFS=$as_save_IFS
28335
28336  ;;
28337esac
28338fi
28339POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28340if test -n "$POTENTIAL_CC"; then
28341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28342$as_echo "$POTENTIAL_CC" >&6; }
28343else
28344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28345$as_echo "no" >&6; }
28346fi
28347
28348
28349  test -n "$POTENTIAL_CC" && break
28350done
28351
28352      if test "x$POTENTIAL_CC" != x; then
28353        CC=$POTENTIAL_CC
28354      else
28355        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28356      fi
28357    else
28358      # Otherwise it might already be a complete path
28359      if test ! -x "$CC"; then
28360        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28361      fi
28362    fi
28363  else
28364    # No user supplied value. Locate compiler ourselves.
28365
28366    # If we are cross compiling, assume cross compilation tools follows the
28367    # cross compilation standard where they are prefixed with the autoconf
28368    # standard name for the target. For example the binary
28369    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28370    # If we are not cross compiling, then the default compiler name will be
28371    # used.
28372
28373    CC=
28374    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28375    # before checking the rest of the PATH.
28376    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28377    # step, this should not be necessary.
28378    if test -n "$TOOLCHAIN_PATH"; then
28379      PATH_save="$PATH"
28380      PATH="$TOOLCHAIN_PATH"
28381      for ac_prog in $SEARCH_LIST
28382do
28383  # Extract the first word of "$ac_prog", so it can be a program name with args.
28384set dummy $ac_prog; ac_word=$2
28385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28386$as_echo_n "checking for $ac_word... " >&6; }
28387if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28388  $as_echo_n "(cached) " >&6
28389else
28390  case $TOOLCHAIN_PATH_CC in
28391  [\\/]* | ?:[\\/]*)
28392  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28393  ;;
28394  *)
28395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28396for as_dir in $PATH
28397do
28398  IFS=$as_save_IFS
28399  test -z "$as_dir" && as_dir=.
28400    for ac_exec_ext in '' $ac_executable_extensions; do
28401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28402    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28404    break 2
28405  fi
28406done
28407  done
28408IFS=$as_save_IFS
28409
28410  ;;
28411esac
28412fi
28413TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28414if test -n "$TOOLCHAIN_PATH_CC"; then
28415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28416$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28417else
28418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28419$as_echo "no" >&6; }
28420fi
28421
28422
28423  test -n "$TOOLCHAIN_PATH_CC" && break
28424done
28425
28426      CC=$TOOLCHAIN_PATH_CC
28427      PATH="$PATH_save"
28428    fi
28429
28430    # AC_PATH_PROGS can't be run multiple times with the same variable,
28431    # so create a new name for this run.
28432    if test "x$CC" = x; then
28433      for ac_prog in $SEARCH_LIST
28434do
28435  # Extract the first word of "$ac_prog", so it can be a program name with args.
28436set dummy $ac_prog; ac_word=$2
28437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28438$as_echo_n "checking for $ac_word... " >&6; }
28439if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28440  $as_echo_n "(cached) " >&6
28441else
28442  case $POTENTIAL_CC in
28443  [\\/]* | ?:[\\/]*)
28444  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28445  ;;
28446  *)
28447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28448for as_dir in $PATH
28449do
28450  IFS=$as_save_IFS
28451  test -z "$as_dir" && as_dir=.
28452    for ac_exec_ext in '' $ac_executable_extensions; do
28453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28454    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28456    break 2
28457  fi
28458done
28459  done
28460IFS=$as_save_IFS
28461
28462  ;;
28463esac
28464fi
28465POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28466if test -n "$POTENTIAL_CC"; then
28467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28468$as_echo "$POTENTIAL_CC" >&6; }
28469else
28470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28471$as_echo "no" >&6; }
28472fi
28473
28474
28475  test -n "$POTENTIAL_CC" && break
28476done
28477
28478      CC=$POTENTIAL_CC
28479    fi
28480
28481    if test "x$CC" = x; then
28482
28483  # Print a helpful message on how to acquire the necessary build dependency.
28484  # devkit is the help tag: freetype, cups, pulse, alsa etc
28485  MISSING_DEPENDENCY=devkit
28486
28487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28488    cygwin_help $MISSING_DEPENDENCY
28489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28490    msys_help $MISSING_DEPENDENCY
28491  else
28492    PKGHANDLER_COMMAND=
28493
28494    case $PKGHANDLER in
28495      apt-get)
28496        apt_help     $MISSING_DEPENDENCY ;;
28497      yum)
28498        yum_help     $MISSING_DEPENDENCY ;;
28499      port)
28500        port_help    $MISSING_DEPENDENCY ;;
28501      pkgutil)
28502        pkgutil_help $MISSING_DEPENDENCY ;;
28503      pkgadd)
28504        pkgadd_help  $MISSING_DEPENDENCY ;;
28505    esac
28506
28507    if test "x$PKGHANDLER_COMMAND" != x; then
28508      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28509    fi
28510  fi
28511
28512      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28513    fi
28514  fi
28515
28516  # Now we have a compiler binary in CC. Make sure it's okay.
28517
28518  # Only process if variable expands to non-empty
28519
28520  if test "x$CC" != x; then
28521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28522
28523  # First separate the path from the arguments. This will split at the first
28524  # space.
28525  complete="$CC"
28526  path="${complete%% *}"
28527  tmp="$complete EOL"
28528  arguments="${tmp#* }"
28529
28530  # Input might be given as Windows format, start by converting to
28531  # unix format.
28532  new_path=`$CYGPATH -u "$path"`
28533
28534  # Now try to locate executable using which
28535  new_path=`$WHICH "$new_path" 2> /dev/null`
28536  # bat and cmd files are not always considered executable in cygwin causing which
28537  # to not find them
28538  if test "x$new_path" = x \
28539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28541    new_path=`$CYGPATH -u "$path"`
28542  fi
28543  if test "x$new_path" = x; then
28544    # Oops. Which didn't find the executable.
28545    # The splitting of arguments from the executable at a space might have been incorrect,
28546    # since paths with space are more likely in Windows. Give it another try with the whole
28547    # argument.
28548    path="$complete"
28549    arguments="EOL"
28550    new_path=`$CYGPATH -u "$path"`
28551    new_path=`$WHICH "$new_path" 2> /dev/null`
28552    # bat and cmd files are not always considered executable in cygwin causing which
28553    # to not find them
28554    if test "x$new_path" = x \
28555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28557      new_path=`$CYGPATH -u "$path"`
28558    fi
28559    if test "x$new_path" = x; then
28560      # It's still not found. Now this is an unrecoverable error.
28561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28562$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28563      has_space=`$ECHO "$complete" | $GREP " "`
28564      if test "x$has_space" != x; then
28565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28567      fi
28568      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28569    fi
28570  fi
28571
28572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28575  # "foo.exe" is OK but "foo" is an error.
28576  #
28577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28578  # It is also a way to make sure we got the proper file name for the real test later on.
28579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28580  if test "x$test_shortpath" = x; then
28581    # Short path failed, file does not exist as specified.
28582    # Try adding .exe or .cmd
28583    if test -f "${new_path}.exe"; then
28584      input_to_shortpath="${new_path}.exe"
28585    elif test -f "${new_path}.cmd"; then
28586      input_to_shortpath="${new_path}.cmd"
28587    else
28588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28589$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28592      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28593    fi
28594  else
28595    input_to_shortpath="$new_path"
28596  fi
28597
28598  # Call helper function which possibly converts this using DOS-style short mode.
28599  # If so, the updated path is stored in $new_path.
28600  new_path="$input_to_shortpath"
28601
28602  input_path="$input_to_shortpath"
28603  # Check if we need to convert this using DOS-style short mode. If the path
28604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28605  # take no chances and rewrite it.
28606  # Note: m4 eats our [], so we need to use [ and ] instead.
28607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28608  if test "x$has_forbidden_chars" != x; then
28609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28613      # Going to short mode and back again did indeed matter. Since short mode is
28614      # case insensitive, let's make it lowercase to improve readability.
28615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28616      # Now convert it back to Unix-style (cygpath)
28617      input_path=`$CYGPATH -u "$shortmode_path"`
28618      new_path="$input_path"
28619    fi
28620  fi
28621
28622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28623  if test "x$test_cygdrive_prefix" = x; then
28624    # As a simple fix, exclude /usr/bin since it's not a real path.
28625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28627      # a path prefixed by /cygdrive for fixpath to work.
28628      new_path="$CYGWIN_ROOT_PATH$input_path"
28629    fi
28630  fi
28631
28632  # remove trailing .exe if any
28633  new_path="${new_path/%.exe/}"
28634
28635    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28636
28637  # First separate the path from the arguments. This will split at the first
28638  # space.
28639  complete="$CC"
28640  path="${complete%% *}"
28641  tmp="$complete EOL"
28642  arguments="${tmp#* }"
28643
28644  # Input might be given as Windows format, start by converting to
28645  # unix format.
28646  new_path="$path"
28647
28648  windows_path="$new_path"
28649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28650    unix_path=`$CYGPATH -u "$windows_path"`
28651    new_path="$unix_path"
28652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28654    new_path="$unix_path"
28655  fi
28656
28657
28658  # Now try to locate executable using which
28659  new_path=`$WHICH "$new_path" 2> /dev/null`
28660
28661  if test "x$new_path" = x; then
28662    # Oops. Which didn't find the executable.
28663    # The splitting of arguments from the executable at a space might have been incorrect,
28664    # since paths with space are more likely in Windows. Give it another try with the whole
28665    # argument.
28666    path="$complete"
28667    arguments="EOL"
28668    new_path="$path"
28669
28670  windows_path="$new_path"
28671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28672    unix_path=`$CYGPATH -u "$windows_path"`
28673    new_path="$unix_path"
28674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28676    new_path="$unix_path"
28677  fi
28678
28679
28680    new_path=`$WHICH "$new_path" 2> /dev/null`
28681    # bat and cmd files are not always considered executable in MSYS causing which
28682    # to not find them
28683    if test "x$new_path" = x \
28684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28686      new_path="$path"
28687
28688  windows_path="$new_path"
28689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28690    unix_path=`$CYGPATH -u "$windows_path"`
28691    new_path="$unix_path"
28692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28694    new_path="$unix_path"
28695  fi
28696
28697    fi
28698
28699    if test "x$new_path" = x; then
28700      # It's still not found. Now this is an unrecoverable error.
28701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28702$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28703      has_space=`$ECHO "$complete" | $GREP " "`
28704      if test "x$has_space" != x; then
28705        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28706$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28707      fi
28708      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28709    fi
28710  fi
28711
28712  # Now new_path has a complete unix path to the binary
28713  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28714    # Keep paths in /bin as-is, but remove trailing .exe if any
28715    new_path="${new_path/%.exe/}"
28716    # Do not save /bin paths to all_fixpath_prefixes!
28717  else
28718    # Not in mixed or Windows style, start by that.
28719    new_path=`cmd //c echo $new_path`
28720
28721  input_path="$new_path"
28722  # Check if we need to convert this using DOS-style short mode. If the path
28723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28724  # take no chances and rewrite it.
28725  # Note: m4 eats our [], so we need to use [ and ] instead.
28726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28727  if test "x$has_forbidden_chars" != x; then
28728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28730  fi
28731
28732    # Output is in $new_path
28733
28734  windows_path="$new_path"
28735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28736    unix_path=`$CYGPATH -u "$windows_path"`
28737    new_path="$unix_path"
28738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28740    new_path="$unix_path"
28741  fi
28742
28743    # remove trailing .exe if any
28744    new_path="${new_path/%.exe/}"
28745
28746    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28747    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28748  fi
28749
28750    else
28751      # We're on a unix platform. Hooray! :)
28752      # First separate the path from the arguments. This will split at the first
28753      # space.
28754      complete="$CC"
28755      path="${complete%% *}"
28756      tmp="$complete EOL"
28757      arguments="${tmp#* }"
28758
28759      # Cannot rely on the command "which" here since it doesn't always work.
28760      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28761      if test -z "$is_absolute_path"; then
28762        # Path to executable is not absolute. Find it.
28763        IFS_save="$IFS"
28764        IFS=:
28765        for p in $PATH; do
28766          if test -f "$p/$path" && test -x "$p/$path"; then
28767            new_path="$p/$path"
28768            break
28769          fi
28770        done
28771        IFS="$IFS_save"
28772      else
28773        # This is an absolute path, we can use it without further modifications.
28774        new_path="$path"
28775      fi
28776
28777      if test "x$new_path" = x; then
28778        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28779$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28780        has_space=`$ECHO "$complete" | $GREP " "`
28781        if test "x$has_space" != x; then
28782          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28783$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28784        fi
28785        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28786      fi
28787    fi
28788
28789    # Now join together the path and the arguments once again
28790    if test "x$arguments" != xEOL; then
28791      new_complete="$new_path ${arguments% *}"
28792    else
28793      new_complete="$new_path"
28794    fi
28795
28796    if test "x$complete" != "x$new_complete"; then
28797      CC="$new_complete"
28798      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28799$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28800    fi
28801  fi
28802
28803  TEST_COMPILER="$CC"
28804  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28805  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28806  if test "x$OPENJDK_BUILD_OS" != xaix; then
28807    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28809$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28810
28811  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28812    # Follow a chain of symbolic links. Use readlink
28813    # where it exists, else fall back to horribly
28814    # complicated shell code.
28815    if test "x$READLINK_TESTED" != yes; then
28816      # On MacOSX there is a readlink tool with a different
28817      # purpose than the GNU readlink tool. Check the found readlink.
28818      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28819      if test "x$ISGNU" = x; then
28820        # A readlink that we do not know how to use.
28821        # Are there other non-GNU readlinks out there?
28822        READLINK_TESTED=yes
28823        READLINK=
28824      fi
28825    fi
28826
28827    if test "x$READLINK" != x; then
28828      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28829    else
28830      # Save the current directory for restoring afterwards
28831      STARTDIR=$PWD
28832      COUNTER=0
28833      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28834      sym_link_file=`$BASENAME $TEST_COMPILER`
28835      cd $sym_link_dir
28836      # Use -P flag to resolve symlinks in directories.
28837      cd `$THEPWDCMD -P`
28838      sym_link_dir=`$THEPWDCMD -P`
28839      # Resolve file symlinks
28840      while test $COUNTER -lt 20; do
28841        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28842        if test "x$ISLINK" == x; then
28843          # This is not a symbolic link! We are done!
28844          break
28845        fi
28846        # Again resolve directory symlinks since the target of the just found
28847        # link could be in a different directory
28848        cd `$DIRNAME $ISLINK`
28849        sym_link_dir=`$THEPWDCMD -P`
28850        sym_link_file=`$BASENAME $ISLINK`
28851        let COUNTER=COUNTER+1
28852      done
28853      cd $STARTDIR
28854      TEST_COMPILER=$sym_link_dir/$sym_link_file
28855    fi
28856  fi
28857
28858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28859$as_echo "$TEST_COMPILER" >&6; }
28860  fi
28861  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28862$as_echo_n "checking if CC is disguised ccache... " >&6; }
28863
28864  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28865  if test "x$COMPILER_BASENAME" = "xccache"; then
28866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28867$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28868    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28869    # We want to control ccache invocation ourselves, so ignore this cc and try
28870    # searching again.
28871
28872    # Remove the path to the fake ccache cc from the PATH
28873    RETRY_COMPILER_SAVED_PATH="$PATH"
28874    COMPILER_DIRNAME=`$DIRNAME $CC`
28875    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28876
28877    # Try again looking for our compiler
28878    if test -n "$ac_tool_prefix"; then
28879  for ac_prog in $TOOLCHAIN_CC_BINARY
28880  do
28881    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28882set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28884$as_echo_n "checking for $ac_word... " >&6; }
28885if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28886  $as_echo_n "(cached) " >&6
28887else
28888  if test -n "$PROPER_COMPILER_CC"; then
28889  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28890else
28891as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28892for as_dir in $PATH
28893do
28894  IFS=$as_save_IFS
28895  test -z "$as_dir" && as_dir=.
28896    for ac_exec_ext in '' $ac_executable_extensions; do
28897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28898    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28900    break 2
28901  fi
28902done
28903  done
28904IFS=$as_save_IFS
28905
28906fi
28907fi
28908PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28909if test -n "$PROPER_COMPILER_CC"; then
28910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28911$as_echo "$PROPER_COMPILER_CC" >&6; }
28912else
28913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28914$as_echo "no" >&6; }
28915fi
28916
28917
28918    test -n "$PROPER_COMPILER_CC" && break
28919  done
28920fi
28921if test -z "$PROPER_COMPILER_CC"; then
28922  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28923  for ac_prog in $TOOLCHAIN_CC_BINARY
28924do
28925  # Extract the first word of "$ac_prog", so it can be a program name with args.
28926set dummy $ac_prog; ac_word=$2
28927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28928$as_echo_n "checking for $ac_word... " >&6; }
28929if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28930  $as_echo_n "(cached) " >&6
28931else
28932  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28933  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28934else
28935as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28936for as_dir in $PATH
28937do
28938  IFS=$as_save_IFS
28939  test -z "$as_dir" && as_dir=.
28940    for ac_exec_ext in '' $ac_executable_extensions; do
28941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28942    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28944    break 2
28945  fi
28946done
28947  done
28948IFS=$as_save_IFS
28949
28950fi
28951fi
28952ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28953if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28955$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28956else
28957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28958$as_echo "no" >&6; }
28959fi
28960
28961
28962  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28963done
28964
28965  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28966    PROPER_COMPILER_CC=""
28967  else
28968    case $cross_compiling:$ac_tool_warned in
28969yes:)
28970{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28971$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28972ac_tool_warned=yes ;;
28973esac
28974    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28975  fi
28976fi
28977
28978
28979  # Only process if variable expands to non-empty
28980
28981  if test "x$PROPER_COMPILER_CC" != x; then
28982    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28983
28984  # First separate the path from the arguments. This will split at the first
28985  # space.
28986  complete="$PROPER_COMPILER_CC"
28987  path="${complete%% *}"
28988  tmp="$complete EOL"
28989  arguments="${tmp#* }"
28990
28991  # Input might be given as Windows format, start by converting to
28992  # unix format.
28993  new_path=`$CYGPATH -u "$path"`
28994
28995  # Now try to locate executable using which
28996  new_path=`$WHICH "$new_path" 2> /dev/null`
28997  # bat and cmd files are not always considered executable in cygwin causing which
28998  # to not find them
28999  if test "x$new_path" = x \
29000      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29001      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29002    new_path=`$CYGPATH -u "$path"`
29003  fi
29004  if test "x$new_path" = x; then
29005    # Oops. Which didn't find the executable.
29006    # The splitting of arguments from the executable at a space might have been incorrect,
29007    # since paths with space are more likely in Windows. Give it another try with the whole
29008    # argument.
29009    path="$complete"
29010    arguments="EOL"
29011    new_path=`$CYGPATH -u "$path"`
29012    new_path=`$WHICH "$new_path" 2> /dev/null`
29013    # bat and cmd files are not always considered executable in cygwin causing which
29014    # to not find them
29015    if test "x$new_path" = x \
29016        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29017        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29018      new_path=`$CYGPATH -u "$path"`
29019    fi
29020    if test "x$new_path" = x; then
29021      # It's still not found. Now this is an unrecoverable error.
29022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29023$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29024      has_space=`$ECHO "$complete" | $GREP " "`
29025      if test "x$has_space" != x; then
29026        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29027$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29028      fi
29029      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29030    fi
29031  fi
29032
29033  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29034  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29035  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29036  # "foo.exe" is OK but "foo" is an error.
29037  #
29038  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29039  # It is also a way to make sure we got the proper file name for the real test later on.
29040  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29041  if test "x$test_shortpath" = x; then
29042    # Short path failed, file does not exist as specified.
29043    # Try adding .exe or .cmd
29044    if test -f "${new_path}.exe"; then
29045      input_to_shortpath="${new_path}.exe"
29046    elif test -f "${new_path}.cmd"; then
29047      input_to_shortpath="${new_path}.cmd"
29048    else
29049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
29050$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
29051      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29052$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29053      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29054    fi
29055  else
29056    input_to_shortpath="$new_path"
29057  fi
29058
29059  # Call helper function which possibly converts this using DOS-style short mode.
29060  # If so, the updated path is stored in $new_path.
29061  new_path="$input_to_shortpath"
29062
29063  input_path="$input_to_shortpath"
29064  # Check if we need to convert this using DOS-style short mode. If the path
29065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29066  # take no chances and rewrite it.
29067  # Note: m4 eats our [], so we need to use [ and ] instead.
29068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29069  if test "x$has_forbidden_chars" != x; then
29070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29071    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29072    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29073    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29074      # Going to short mode and back again did indeed matter. Since short mode is
29075      # case insensitive, let's make it lowercase to improve readability.
29076      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29077      # Now convert it back to Unix-style (cygpath)
29078      input_path=`$CYGPATH -u "$shortmode_path"`
29079      new_path="$input_path"
29080    fi
29081  fi
29082
29083  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29084  if test "x$test_cygdrive_prefix" = x; then
29085    # As a simple fix, exclude /usr/bin since it's not a real path.
29086    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29087      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29088      # a path prefixed by /cygdrive for fixpath to work.
29089      new_path="$CYGWIN_ROOT_PATH$input_path"
29090    fi
29091  fi
29092
29093  # remove trailing .exe if any
29094  new_path="${new_path/%.exe/}"
29095
29096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29097
29098  # First separate the path from the arguments. This will split at the first
29099  # space.
29100  complete="$PROPER_COMPILER_CC"
29101  path="${complete%% *}"
29102  tmp="$complete EOL"
29103  arguments="${tmp#* }"
29104
29105  # Input might be given as Windows format, start by converting to
29106  # unix format.
29107  new_path="$path"
29108
29109  windows_path="$new_path"
29110  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29111    unix_path=`$CYGPATH -u "$windows_path"`
29112    new_path="$unix_path"
29113  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29114    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29115    new_path="$unix_path"
29116  fi
29117
29118
29119  # Now try to locate executable using which
29120  new_path=`$WHICH "$new_path" 2> /dev/null`
29121
29122  if test "x$new_path" = x; then
29123    # Oops. Which didn't find the executable.
29124    # The splitting of arguments from the executable at a space might have been incorrect,
29125    # since paths with space are more likely in Windows. Give it another try with the whole
29126    # argument.
29127    path="$complete"
29128    arguments="EOL"
29129    new_path="$path"
29130
29131  windows_path="$new_path"
29132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29133    unix_path=`$CYGPATH -u "$windows_path"`
29134    new_path="$unix_path"
29135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29137    new_path="$unix_path"
29138  fi
29139
29140
29141    new_path=`$WHICH "$new_path" 2> /dev/null`
29142    # bat and cmd files are not always considered executable in MSYS causing which
29143    # to not find them
29144    if test "x$new_path" = x \
29145        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29146        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29147      new_path="$path"
29148
29149  windows_path="$new_path"
29150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29151    unix_path=`$CYGPATH -u "$windows_path"`
29152    new_path="$unix_path"
29153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29155    new_path="$unix_path"
29156  fi
29157
29158    fi
29159
29160    if test "x$new_path" = x; then
29161      # It's still not found. Now this is an unrecoverable error.
29162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29163$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29164      has_space=`$ECHO "$complete" | $GREP " "`
29165      if test "x$has_space" != x; then
29166        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29167$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29168      fi
29169      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29170    fi
29171  fi
29172
29173  # Now new_path has a complete unix path to the binary
29174  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29175    # Keep paths in /bin as-is, but remove trailing .exe if any
29176    new_path="${new_path/%.exe/}"
29177    # Do not save /bin paths to all_fixpath_prefixes!
29178  else
29179    # Not in mixed or Windows style, start by that.
29180    new_path=`cmd //c echo $new_path`
29181
29182  input_path="$new_path"
29183  # Check if we need to convert this using DOS-style short mode. If the path
29184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29185  # take no chances and rewrite it.
29186  # Note: m4 eats our [], so we need to use [ and ] instead.
29187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29188  if test "x$has_forbidden_chars" != x; then
29189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29190    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29191  fi
29192
29193    # Output is in $new_path
29194
29195  windows_path="$new_path"
29196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29197    unix_path=`$CYGPATH -u "$windows_path"`
29198    new_path="$unix_path"
29199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29201    new_path="$unix_path"
29202  fi
29203
29204    # remove trailing .exe if any
29205    new_path="${new_path/%.exe/}"
29206
29207    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29208    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29209  fi
29210
29211    else
29212      # We're on a unix platform. Hooray! :)
29213      # First separate the path from the arguments. This will split at the first
29214      # space.
29215      complete="$PROPER_COMPILER_CC"
29216      path="${complete%% *}"
29217      tmp="$complete EOL"
29218      arguments="${tmp#* }"
29219
29220      # Cannot rely on the command "which" here since it doesn't always work.
29221      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29222      if test -z "$is_absolute_path"; then
29223        # Path to executable is not absolute. Find it.
29224        IFS_save="$IFS"
29225        IFS=:
29226        for p in $PATH; do
29227          if test -f "$p/$path" && test -x "$p/$path"; then
29228            new_path="$p/$path"
29229            break
29230          fi
29231        done
29232        IFS="$IFS_save"
29233      else
29234        # This is an absolute path, we can use it without further modifications.
29235        new_path="$path"
29236      fi
29237
29238      if test "x$new_path" = x; then
29239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29240$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29241        has_space=`$ECHO "$complete" | $GREP " "`
29242        if test "x$has_space" != x; then
29243          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29244$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29245        fi
29246        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29247      fi
29248    fi
29249
29250    # Now join together the path and the arguments once again
29251    if test "x$arguments" != xEOL; then
29252      new_complete="$new_path ${arguments% *}"
29253    else
29254      new_complete="$new_path"
29255    fi
29256
29257    if test "x$complete" != "x$new_complete"; then
29258      PROPER_COMPILER_CC="$new_complete"
29259      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29260$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29261    fi
29262  fi
29263
29264    PATH="$RETRY_COMPILER_SAVED_PATH"
29265
29266    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29267$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29268
29269  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29270    # Follow a chain of symbolic links. Use readlink
29271    # where it exists, else fall back to horribly
29272    # complicated shell code.
29273    if test "x$READLINK_TESTED" != yes; then
29274      # On MacOSX there is a readlink tool with a different
29275      # purpose than the GNU readlink tool. Check the found readlink.
29276      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29277      if test "x$ISGNU" = x; then
29278        # A readlink that we do not know how to use.
29279        # Are there other non-GNU readlinks out there?
29280        READLINK_TESTED=yes
29281        READLINK=
29282      fi
29283    fi
29284
29285    if test "x$READLINK" != x; then
29286      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29287    else
29288      # Save the current directory for restoring afterwards
29289      STARTDIR=$PWD
29290      COUNTER=0
29291      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29292      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29293      cd $sym_link_dir
29294      # Use -P flag to resolve symlinks in directories.
29295      cd `$THEPWDCMD -P`
29296      sym_link_dir=`$THEPWDCMD -P`
29297      # Resolve file symlinks
29298      while test $COUNTER -lt 20; do
29299        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29300        if test "x$ISLINK" == x; then
29301          # This is not a symbolic link! We are done!
29302          break
29303        fi
29304        # Again resolve directory symlinks since the target of the just found
29305        # link could be in a different directory
29306        cd `$DIRNAME $ISLINK`
29307        sym_link_dir=`$THEPWDCMD -P`
29308        sym_link_file=`$BASENAME $ISLINK`
29309        let COUNTER=COUNTER+1
29310      done
29311      cd $STARTDIR
29312      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29313    fi
29314  fi
29315
29316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29317$as_echo "$PROPER_COMPILER_CC" >&6; }
29318    CC="$PROPER_COMPILER_CC"
29319  else
29320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29321$as_echo "no, keeping CC" >&6; }
29322  fi
29323
29324
29325  COMPILER=$CC
29326  COMPILER_NAME=$COMPILER_NAME
29327
29328  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29329    # cc -V output typically looks like
29330    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29331    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29332    # Check that this is likely to be the Solaris Studio cc.
29333    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29334    if test $? -ne 0; then
29335      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29336      { $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
29337$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29338      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29339$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29340      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29341$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29342      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29343    fi
29344    # Remove usage instructions (if present), and
29345    # collapse compiler output into a single line
29346    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29347        $SED -e 's/ *[Uu]sage:.*//'`
29348    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29349        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29350  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29351    # xlc -qversion output typically looks like
29352    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29353    #     Version: 11.01.0000.0015
29354    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29355    # Check that this is likely to be the IBM XL C compiler.
29356    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29357    if test $? -ne 0; then
29358      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29359      { $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
29360$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29361      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29362$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29363      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29364$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29365      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29366    fi
29367    # Collapse compiler output into a single line
29368    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29369    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29370        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29371  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29372    # There is no specific version flag, but all output starts with a version string.
29373    # First line typically looks something like:
29374    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29375    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29376    # Check that this is likely to be Microsoft CL.EXE.
29377    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29378    if test $? -ne 0; then
29379      { $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
29380$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29381      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29382$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29383      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29384    fi
29385    # Collapse compiler output into a single line
29386    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29387    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29388        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29389  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29390    # gcc --version output typically looks like
29391    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29392    #     Copyright (C) 2013 Free Software Foundation, Inc.
29393    #     This is free software; see the source for copying conditions.  There is NO
29394    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29395    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29396    # Check that this is likely to be GCC.
29397    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29398    if test $? -ne 0; then
29399      { $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
29400$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29401      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29402$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29403      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29404    fi
29405    # Remove Copyright and legalese from version string, and
29406    # collapse into a single line
29407    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29408        $SED -e 's/ *Copyright .*//'`
29409    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29410        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29411  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29412    # clang --version output typically looks like
29413    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29414    #    clang version 3.3 (tags/RELEASE_33/final)
29415    # or
29416    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29417    #    Target: x86_64-pc-linux-gnu
29418    #    Thread model: posix
29419    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29420    # Check that this is likely to be clang
29421    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29422    if test $? -ne 0; then
29423      { $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
29424$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29425      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29426$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29427      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29428    fi
29429    # Collapse compiler output into a single line
29430    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29431    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29432        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29433  else
29434      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29435  fi
29436  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29437  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29438  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29439  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29440
29441  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29442$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29443
29444
29445  # Now that we have resolved CC ourself, let autoconf have its go at it
29446  ac_ext=c
29447ac_cpp='$CPP $CPPFLAGS'
29448ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29449ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29450ac_compiler_gnu=$ac_cv_c_compiler_gnu
29451if test -n "$ac_tool_prefix"; then
29452  for ac_prog in $CC
29453  do
29454    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29455set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29457$as_echo_n "checking for $ac_word... " >&6; }
29458if ${ac_cv_prog_CC+:} false; then :
29459  $as_echo_n "(cached) " >&6
29460else
29461  if test -n "$CC"; then
29462  ac_cv_prog_CC="$CC" # Let the user override the test.
29463else
29464as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29465for as_dir in $PATH
29466do
29467  IFS=$as_save_IFS
29468  test -z "$as_dir" && as_dir=.
29469    for ac_exec_ext in '' $ac_executable_extensions; do
29470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29471    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29473    break 2
29474  fi
29475done
29476  done
29477IFS=$as_save_IFS
29478
29479fi
29480fi
29481CC=$ac_cv_prog_CC
29482if test -n "$CC"; then
29483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29484$as_echo "$CC" >&6; }
29485else
29486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29487$as_echo "no" >&6; }
29488fi
29489
29490
29491    test -n "$CC" && break
29492  done
29493fi
29494if test -z "$CC"; then
29495  ac_ct_CC=$CC
29496  for ac_prog in $CC
29497do
29498  # Extract the first word of "$ac_prog", so it can be a program name with args.
29499set dummy $ac_prog; ac_word=$2
29500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29501$as_echo_n "checking for $ac_word... " >&6; }
29502if ${ac_cv_prog_ac_ct_CC+:} false; then :
29503  $as_echo_n "(cached) " >&6
29504else
29505  if test -n "$ac_ct_CC"; then
29506  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29507else
29508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29509for as_dir in $PATH
29510do
29511  IFS=$as_save_IFS
29512  test -z "$as_dir" && as_dir=.
29513    for ac_exec_ext in '' $ac_executable_extensions; do
29514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29515    ac_cv_prog_ac_ct_CC="$ac_prog"
29516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29517    break 2
29518  fi
29519done
29520  done
29521IFS=$as_save_IFS
29522
29523fi
29524fi
29525ac_ct_CC=$ac_cv_prog_ac_ct_CC
29526if test -n "$ac_ct_CC"; then
29527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29528$as_echo "$ac_ct_CC" >&6; }
29529else
29530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29531$as_echo "no" >&6; }
29532fi
29533
29534
29535  test -n "$ac_ct_CC" && break
29536done
29537
29538  if test "x$ac_ct_CC" = x; then
29539    CC=""
29540  else
29541    case $cross_compiling:$ac_tool_warned in
29542yes:)
29543{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29544$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29545ac_tool_warned=yes ;;
29546esac
29547    CC=$ac_ct_CC
29548  fi
29549fi
29550
29551
29552test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29553$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29554as_fn_error $? "no acceptable C compiler found in \$PATH
29555See \`config.log' for more details" "$LINENO" 5; }
29556
29557# Provide some information about the compiler.
29558$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29559set X $ac_compile
29560ac_compiler=$2
29561for ac_option in --version -v -V -qversion; do
29562  { { ac_try="$ac_compiler $ac_option >&5"
29563case "(($ac_try" in
29564  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29565  *) ac_try_echo=$ac_try;;
29566esac
29567eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29568$as_echo "$ac_try_echo"; } >&5
29569  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29570  ac_status=$?
29571  if test -s conftest.err; then
29572    sed '10a\
29573... rest of stderr output deleted ...
29574         10q' conftest.err >conftest.er1
29575    cat conftest.er1 >&5
29576  fi
29577  rm -f conftest.er1 conftest.err
29578  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29579  test $ac_status = 0; }
29580done
29581
29582cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29583/* end confdefs.h.  */
29584
29585int
29586main ()
29587{
29588
29589  ;
29590  return 0;
29591}
29592_ACEOF
29593ac_clean_files_save=$ac_clean_files
29594ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29595# Try to create an executable without -o first, disregard a.out.
29596# It will help us diagnose broken compilers, and finding out an intuition
29597# of exeext.
29598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29599$as_echo_n "checking whether the C compiler works... " >&6; }
29600ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29601
29602# The possible output files:
29603ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29604
29605ac_rmfiles=
29606for ac_file in $ac_files
29607do
29608  case $ac_file in
29609    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29610    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29611  esac
29612done
29613rm -f $ac_rmfiles
29614
29615if { { ac_try="$ac_link_default"
29616case "(($ac_try" in
29617  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29618  *) ac_try_echo=$ac_try;;
29619esac
29620eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29621$as_echo "$ac_try_echo"; } >&5
29622  (eval "$ac_link_default") 2>&5
29623  ac_status=$?
29624  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29625  test $ac_status = 0; }; then :
29626  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29627# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29628# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29629# so that the user can short-circuit this test for compilers unknown to
29630# Autoconf.
29631for ac_file in $ac_files ''
29632do
29633  test -f "$ac_file" || continue
29634  case $ac_file in
29635    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29636	;;
29637    [ab].out )
29638	# We found the default executable, but exeext='' is most
29639	# certainly right.
29640	break;;
29641    *.* )
29642	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29643	then :; else
29644	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29645	fi
29646	# We set ac_cv_exeext here because the later test for it is not
29647	# safe: cross compilers may not add the suffix if given an `-o'
29648	# argument, so we may need to know it at that point already.
29649	# Even if this section looks crufty: it has the advantage of
29650	# actually working.
29651	break;;
29652    * )
29653	break;;
29654  esac
29655done
29656test "$ac_cv_exeext" = no && ac_cv_exeext=
29657
29658else
29659  ac_file=''
29660fi
29661if test -z "$ac_file"; then :
29662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29663$as_echo "no" >&6; }
29664$as_echo "$as_me: failed program was:" >&5
29665sed 's/^/| /' conftest.$ac_ext >&5
29666
29667{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29668$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29669as_fn_error 77 "C compiler cannot create executables
29670See \`config.log' for more details" "$LINENO" 5; }
29671else
29672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29673$as_echo "yes" >&6; }
29674fi
29675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29676$as_echo_n "checking for C compiler default output file name... " >&6; }
29677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29678$as_echo "$ac_file" >&6; }
29679ac_exeext=$ac_cv_exeext
29680
29681rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29682ac_clean_files=$ac_clean_files_save
29683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29684$as_echo_n "checking for suffix of executables... " >&6; }
29685if { { ac_try="$ac_link"
29686case "(($ac_try" in
29687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29688  *) ac_try_echo=$ac_try;;
29689esac
29690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29691$as_echo "$ac_try_echo"; } >&5
29692  (eval "$ac_link") 2>&5
29693  ac_status=$?
29694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29695  test $ac_status = 0; }; then :
29696  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29697# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29698# work properly (i.e., refer to `conftest.exe'), while it won't with
29699# `rm'.
29700for ac_file in conftest.exe conftest conftest.*; do
29701  test -f "$ac_file" || continue
29702  case $ac_file in
29703    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29704    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29705	  break;;
29706    * ) break;;
29707  esac
29708done
29709else
29710  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29712as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29713See \`config.log' for more details" "$LINENO" 5; }
29714fi
29715rm -f conftest conftest$ac_cv_exeext
29716{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29717$as_echo "$ac_cv_exeext" >&6; }
29718
29719rm -f conftest.$ac_ext
29720EXEEXT=$ac_cv_exeext
29721ac_exeext=$EXEEXT
29722cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29723/* end confdefs.h.  */
29724#include <stdio.h>
29725int
29726main ()
29727{
29728FILE *f = fopen ("conftest.out", "w");
29729 return ferror (f) || fclose (f) != 0;
29730
29731  ;
29732  return 0;
29733}
29734_ACEOF
29735ac_clean_files="$ac_clean_files conftest.out"
29736# Check that the compiler produces executables we can run.  If not, either
29737# the compiler is broken, or we cross compile.
29738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29739$as_echo_n "checking whether we are cross compiling... " >&6; }
29740if test "$cross_compiling" != yes; then
29741  { { ac_try="$ac_link"
29742case "(($ac_try" in
29743  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29744  *) ac_try_echo=$ac_try;;
29745esac
29746eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29747$as_echo "$ac_try_echo"; } >&5
29748  (eval "$ac_link") 2>&5
29749  ac_status=$?
29750  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29751  test $ac_status = 0; }
29752  if { ac_try='./conftest$ac_cv_exeext'
29753  { { case "(($ac_try" in
29754  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29755  *) ac_try_echo=$ac_try;;
29756esac
29757eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29758$as_echo "$ac_try_echo"; } >&5
29759  (eval "$ac_try") 2>&5
29760  ac_status=$?
29761  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29762  test $ac_status = 0; }; }; then
29763    cross_compiling=no
29764  else
29765    if test "$cross_compiling" = maybe; then
29766	cross_compiling=yes
29767    else
29768	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29769$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29770as_fn_error $? "cannot run C compiled programs.
29771If you meant to cross compile, use \`--host'.
29772See \`config.log' for more details" "$LINENO" 5; }
29773    fi
29774  fi
29775fi
29776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29777$as_echo "$cross_compiling" >&6; }
29778
29779rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29780ac_clean_files=$ac_clean_files_save
29781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29782$as_echo_n "checking for suffix of object files... " >&6; }
29783if ${ac_cv_objext+:} false; then :
29784  $as_echo_n "(cached) " >&6
29785else
29786  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29787/* end confdefs.h.  */
29788
29789int
29790main ()
29791{
29792
29793  ;
29794  return 0;
29795}
29796_ACEOF
29797rm -f conftest.o conftest.obj
29798if { { ac_try="$ac_compile"
29799case "(($ac_try" in
29800  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29801  *) ac_try_echo=$ac_try;;
29802esac
29803eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29804$as_echo "$ac_try_echo"; } >&5
29805  (eval "$ac_compile") 2>&5
29806  ac_status=$?
29807  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29808  test $ac_status = 0; }; then :
29809  for ac_file in conftest.o conftest.obj conftest.*; do
29810  test -f "$ac_file" || continue;
29811  case $ac_file in
29812    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29813    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29814       break;;
29815  esac
29816done
29817else
29818  $as_echo "$as_me: failed program was:" >&5
29819sed 's/^/| /' conftest.$ac_ext >&5
29820
29821{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29823as_fn_error $? "cannot compute suffix of object files: cannot compile
29824See \`config.log' for more details" "$LINENO" 5; }
29825fi
29826rm -f conftest.$ac_cv_objext conftest.$ac_ext
29827fi
29828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29829$as_echo "$ac_cv_objext" >&6; }
29830OBJEXT=$ac_cv_objext
29831ac_objext=$OBJEXT
29832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29833$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29834if ${ac_cv_c_compiler_gnu+:} false; then :
29835  $as_echo_n "(cached) " >&6
29836else
29837  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29838/* end confdefs.h.  */
29839
29840int
29841main ()
29842{
29843#ifndef __GNUC__
29844       choke me
29845#endif
29846
29847  ;
29848  return 0;
29849}
29850_ACEOF
29851if ac_fn_c_try_compile "$LINENO"; then :
29852  ac_compiler_gnu=yes
29853else
29854  ac_compiler_gnu=no
29855fi
29856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29857ac_cv_c_compiler_gnu=$ac_compiler_gnu
29858
29859fi
29860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29861$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29862if test $ac_compiler_gnu = yes; then
29863  GCC=yes
29864else
29865  GCC=
29866fi
29867ac_test_CFLAGS=${CFLAGS+set}
29868ac_save_CFLAGS=$CFLAGS
29869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29870$as_echo_n "checking whether $CC accepts -g... " >&6; }
29871if ${ac_cv_prog_cc_g+:} false; then :
29872  $as_echo_n "(cached) " >&6
29873else
29874  ac_save_c_werror_flag=$ac_c_werror_flag
29875   ac_c_werror_flag=yes
29876   ac_cv_prog_cc_g=no
29877   CFLAGS="-g"
29878   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29879/* end confdefs.h.  */
29880
29881int
29882main ()
29883{
29884
29885  ;
29886  return 0;
29887}
29888_ACEOF
29889if ac_fn_c_try_compile "$LINENO"; then :
29890  ac_cv_prog_cc_g=yes
29891else
29892  CFLAGS=""
29893      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29894/* end confdefs.h.  */
29895
29896int
29897main ()
29898{
29899
29900  ;
29901  return 0;
29902}
29903_ACEOF
29904if ac_fn_c_try_compile "$LINENO"; then :
29905
29906else
29907  ac_c_werror_flag=$ac_save_c_werror_flag
29908	 CFLAGS="-g"
29909	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29910/* end confdefs.h.  */
29911
29912int
29913main ()
29914{
29915
29916  ;
29917  return 0;
29918}
29919_ACEOF
29920if ac_fn_c_try_compile "$LINENO"; then :
29921  ac_cv_prog_cc_g=yes
29922fi
29923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29924fi
29925rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29926fi
29927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29928   ac_c_werror_flag=$ac_save_c_werror_flag
29929fi
29930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29931$as_echo "$ac_cv_prog_cc_g" >&6; }
29932if test "$ac_test_CFLAGS" = set; then
29933  CFLAGS=$ac_save_CFLAGS
29934elif test $ac_cv_prog_cc_g = yes; then
29935  if test "$GCC" = yes; then
29936    CFLAGS="-g -O2"
29937  else
29938    CFLAGS="-g"
29939  fi
29940else
29941  if test "$GCC" = yes; then
29942    CFLAGS="-O2"
29943  else
29944    CFLAGS=
29945  fi
29946fi
29947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29948$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29949if ${ac_cv_prog_cc_c89+:} false; then :
29950  $as_echo_n "(cached) " >&6
29951else
29952  ac_cv_prog_cc_c89=no
29953ac_save_CC=$CC
29954cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29955/* end confdefs.h.  */
29956#include <stdarg.h>
29957#include <stdio.h>
29958struct stat;
29959/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29960struct buf { int x; };
29961FILE * (*rcsopen) (struct buf *, struct stat *, int);
29962static char *e (p, i)
29963     char **p;
29964     int i;
29965{
29966  return p[i];
29967}
29968static char *f (char * (*g) (char **, int), char **p, ...)
29969{
29970  char *s;
29971  va_list v;
29972  va_start (v,p);
29973  s = g (p, va_arg (v,int));
29974  va_end (v);
29975  return s;
29976}
29977
29978/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29979   function prototypes and stuff, but not '\xHH' hex character constants.
29980   These don't provoke an error unfortunately, instead are silently treated
29981   as 'x'.  The following induces an error, until -std is added to get
29982   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29983   array size at least.  It's necessary to write '\x00'==0 to get something
29984   that's true only with -std.  */
29985int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29986
29987/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29988   inside strings and character constants.  */
29989#define FOO(x) 'x'
29990int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29991
29992int test (int i, double x);
29993struct s1 {int (*f) (int a);};
29994struct s2 {int (*f) (double a);};
29995int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29996int argc;
29997char **argv;
29998int
29999main ()
30000{
30001return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
30002  ;
30003  return 0;
30004}
30005_ACEOF
30006for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
30007	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
30008do
30009  CC="$ac_save_CC $ac_arg"
30010  if ac_fn_c_try_compile "$LINENO"; then :
30011  ac_cv_prog_cc_c89=$ac_arg
30012fi
30013rm -f core conftest.err conftest.$ac_objext
30014  test "x$ac_cv_prog_cc_c89" != "xno" && break
30015done
30016rm -f conftest.$ac_ext
30017CC=$ac_save_CC
30018
30019fi
30020# AC_CACHE_VAL
30021case "x$ac_cv_prog_cc_c89" in
30022  x)
30023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
30024$as_echo "none needed" >&6; } ;;
30025  xno)
30026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
30027$as_echo "unsupported" >&6; } ;;
30028  *)
30029    CC="$CC $ac_cv_prog_cc_c89"
30030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
30031$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
30032esac
30033if test "x$ac_cv_prog_cc_c89" != xno; then :
30034
30035fi
30036
30037ac_ext=cpp
30038ac_cpp='$CXXCPP $CPPFLAGS'
30039ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30040ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30041ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30042
30043
30044
30045  COMPILER_NAME=C++
30046  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
30047
30048  if test "x$CXX" != x; then
30049    # User has supplied compiler name already, always let that override.
30050    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
30051$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
30052    if test "x`basename $CXX`" = "x$CXX"; then
30053      # A command without a complete path is provided, search $PATH.
30054
30055      for ac_prog in $CXX
30056do
30057  # Extract the first word of "$ac_prog", so it can be a program name with args.
30058set dummy $ac_prog; ac_word=$2
30059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30060$as_echo_n "checking for $ac_word... " >&6; }
30061if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30062  $as_echo_n "(cached) " >&6
30063else
30064  case $POTENTIAL_CXX in
30065  [\\/]* | ?:[\\/]*)
30066  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30067  ;;
30068  *)
30069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30070for as_dir in $PATH
30071do
30072  IFS=$as_save_IFS
30073  test -z "$as_dir" && as_dir=.
30074    for ac_exec_ext in '' $ac_executable_extensions; do
30075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30076    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30078    break 2
30079  fi
30080done
30081  done
30082IFS=$as_save_IFS
30083
30084  ;;
30085esac
30086fi
30087POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30088if test -n "$POTENTIAL_CXX"; then
30089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30090$as_echo "$POTENTIAL_CXX" >&6; }
30091else
30092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30093$as_echo "no" >&6; }
30094fi
30095
30096
30097  test -n "$POTENTIAL_CXX" && break
30098done
30099
30100      if test "x$POTENTIAL_CXX" != x; then
30101        CXX=$POTENTIAL_CXX
30102      else
30103        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
30104      fi
30105    else
30106      # Otherwise it might already be a complete path
30107      if test ! -x "$CXX"; then
30108        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
30109      fi
30110    fi
30111  else
30112    # No user supplied value. Locate compiler ourselves.
30113
30114    # If we are cross compiling, assume cross compilation tools follows the
30115    # cross compilation standard where they are prefixed with the autoconf
30116    # standard name for the target. For example the binary
30117    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
30118    # If we are not cross compiling, then the default compiler name will be
30119    # used.
30120
30121    CXX=
30122    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
30123    # before checking the rest of the PATH.
30124    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
30125    # step, this should not be necessary.
30126    if test -n "$TOOLCHAIN_PATH"; then
30127      PATH_save="$PATH"
30128      PATH="$TOOLCHAIN_PATH"
30129      for ac_prog in $SEARCH_LIST
30130do
30131  # Extract the first word of "$ac_prog", so it can be a program name with args.
30132set dummy $ac_prog; ac_word=$2
30133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30134$as_echo_n "checking for $ac_word... " >&6; }
30135if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
30136  $as_echo_n "(cached) " >&6
30137else
30138  case $TOOLCHAIN_PATH_CXX in
30139  [\\/]* | ?:[\\/]*)
30140  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
30141  ;;
30142  *)
30143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30144for as_dir in $PATH
30145do
30146  IFS=$as_save_IFS
30147  test -z "$as_dir" && as_dir=.
30148    for ac_exec_ext in '' $ac_executable_extensions; do
30149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30150    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
30151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30152    break 2
30153  fi
30154done
30155  done
30156IFS=$as_save_IFS
30157
30158  ;;
30159esac
30160fi
30161TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
30162if test -n "$TOOLCHAIN_PATH_CXX"; then
30163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
30164$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
30165else
30166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30167$as_echo "no" >&6; }
30168fi
30169
30170
30171  test -n "$TOOLCHAIN_PATH_CXX" && break
30172done
30173
30174      CXX=$TOOLCHAIN_PATH_CXX
30175      PATH="$PATH_save"
30176    fi
30177
30178    # AC_PATH_PROGS can't be run multiple times with the same variable,
30179    # so create a new name for this run.
30180    if test "x$CXX" = x; then
30181      for ac_prog in $SEARCH_LIST
30182do
30183  # Extract the first word of "$ac_prog", so it can be a program name with args.
30184set dummy $ac_prog; ac_word=$2
30185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30186$as_echo_n "checking for $ac_word... " >&6; }
30187if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30188  $as_echo_n "(cached) " >&6
30189else
30190  case $POTENTIAL_CXX in
30191  [\\/]* | ?:[\\/]*)
30192  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30193  ;;
30194  *)
30195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30196for as_dir in $PATH
30197do
30198  IFS=$as_save_IFS
30199  test -z "$as_dir" && as_dir=.
30200    for ac_exec_ext in '' $ac_executable_extensions; do
30201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30202    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30204    break 2
30205  fi
30206done
30207  done
30208IFS=$as_save_IFS
30209
30210  ;;
30211esac
30212fi
30213POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30214if test -n "$POTENTIAL_CXX"; then
30215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30216$as_echo "$POTENTIAL_CXX" >&6; }
30217else
30218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30219$as_echo "no" >&6; }
30220fi
30221
30222
30223  test -n "$POTENTIAL_CXX" && break
30224done
30225
30226      CXX=$POTENTIAL_CXX
30227    fi
30228
30229    if test "x$CXX" = x; then
30230
30231  # Print a helpful message on how to acquire the necessary build dependency.
30232  # devkit is the help tag: freetype, cups, pulse, alsa etc
30233  MISSING_DEPENDENCY=devkit
30234
30235  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30236    cygwin_help $MISSING_DEPENDENCY
30237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30238    msys_help $MISSING_DEPENDENCY
30239  else
30240    PKGHANDLER_COMMAND=
30241
30242    case $PKGHANDLER in
30243      apt-get)
30244        apt_help     $MISSING_DEPENDENCY ;;
30245      yum)
30246        yum_help     $MISSING_DEPENDENCY ;;
30247      port)
30248        port_help    $MISSING_DEPENDENCY ;;
30249      pkgutil)
30250        pkgutil_help $MISSING_DEPENDENCY ;;
30251      pkgadd)
30252        pkgadd_help  $MISSING_DEPENDENCY ;;
30253    esac
30254
30255    if test "x$PKGHANDLER_COMMAND" != x; then
30256      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30257    fi
30258  fi
30259
30260      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30261    fi
30262  fi
30263
30264  # Now we have a compiler binary in CXX. Make sure it's okay.
30265
30266  # Only process if variable expands to non-empty
30267
30268  if test "x$CXX" != x; then
30269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30270
30271  # First separate the path from the arguments. This will split at the first
30272  # space.
30273  complete="$CXX"
30274  path="${complete%% *}"
30275  tmp="$complete EOL"
30276  arguments="${tmp#* }"
30277
30278  # Input might be given as Windows format, start by converting to
30279  # unix format.
30280  new_path=`$CYGPATH -u "$path"`
30281
30282  # Now try to locate executable using which
30283  new_path=`$WHICH "$new_path" 2> /dev/null`
30284  # bat and cmd files are not always considered executable in cygwin causing which
30285  # to not find them
30286  if test "x$new_path" = x \
30287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30289    new_path=`$CYGPATH -u "$path"`
30290  fi
30291  if test "x$new_path" = x; then
30292    # Oops. Which didn't find the executable.
30293    # The splitting of arguments from the executable at a space might have been incorrect,
30294    # since paths with space are more likely in Windows. Give it another try with the whole
30295    # argument.
30296    path="$complete"
30297    arguments="EOL"
30298    new_path=`$CYGPATH -u "$path"`
30299    new_path=`$WHICH "$new_path" 2> /dev/null`
30300    # bat and cmd files are not always considered executable in cygwin causing which
30301    # to not find them
30302    if test "x$new_path" = x \
30303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30305      new_path=`$CYGPATH -u "$path"`
30306    fi
30307    if test "x$new_path" = x; then
30308      # It's still not found. Now this is an unrecoverable error.
30309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30310$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30311      has_space=`$ECHO "$complete" | $GREP " "`
30312      if test "x$has_space" != x; then
30313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30315      fi
30316      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30317    fi
30318  fi
30319
30320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30323  # "foo.exe" is OK but "foo" is an error.
30324  #
30325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30326  # It is also a way to make sure we got the proper file name for the real test later on.
30327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30328  if test "x$test_shortpath" = x; then
30329    # Short path failed, file does not exist as specified.
30330    # Try adding .exe or .cmd
30331    if test -f "${new_path}.exe"; then
30332      input_to_shortpath="${new_path}.exe"
30333    elif test -f "${new_path}.cmd"; then
30334      input_to_shortpath="${new_path}.cmd"
30335    else
30336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30337$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30340      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30341    fi
30342  else
30343    input_to_shortpath="$new_path"
30344  fi
30345
30346  # Call helper function which possibly converts this using DOS-style short mode.
30347  # If so, the updated path is stored in $new_path.
30348  new_path="$input_to_shortpath"
30349
30350  input_path="$input_to_shortpath"
30351  # Check if we need to convert this using DOS-style short mode. If the path
30352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30353  # take no chances and rewrite it.
30354  # Note: m4 eats our [], so we need to use [ and ] instead.
30355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30356  if test "x$has_forbidden_chars" != x; then
30357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30361      # Going to short mode and back again did indeed matter. Since short mode is
30362      # case insensitive, let's make it lowercase to improve readability.
30363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30364      # Now convert it back to Unix-style (cygpath)
30365      input_path=`$CYGPATH -u "$shortmode_path"`
30366      new_path="$input_path"
30367    fi
30368  fi
30369
30370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30371  if test "x$test_cygdrive_prefix" = x; then
30372    # As a simple fix, exclude /usr/bin since it's not a real path.
30373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30375      # a path prefixed by /cygdrive for fixpath to work.
30376      new_path="$CYGWIN_ROOT_PATH$input_path"
30377    fi
30378  fi
30379
30380  # remove trailing .exe if any
30381  new_path="${new_path/%.exe/}"
30382
30383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30384
30385  # First separate the path from the arguments. This will split at the first
30386  # space.
30387  complete="$CXX"
30388  path="${complete%% *}"
30389  tmp="$complete EOL"
30390  arguments="${tmp#* }"
30391
30392  # Input might be given as Windows format, start by converting to
30393  # unix format.
30394  new_path="$path"
30395
30396  windows_path="$new_path"
30397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30398    unix_path=`$CYGPATH -u "$windows_path"`
30399    new_path="$unix_path"
30400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30402    new_path="$unix_path"
30403  fi
30404
30405
30406  # Now try to locate executable using which
30407  new_path=`$WHICH "$new_path" 2> /dev/null`
30408
30409  if test "x$new_path" = x; then
30410    # Oops. Which didn't find the executable.
30411    # The splitting of arguments from the executable at a space might have been incorrect,
30412    # since paths with space are more likely in Windows. Give it another try with the whole
30413    # argument.
30414    path="$complete"
30415    arguments="EOL"
30416    new_path="$path"
30417
30418  windows_path="$new_path"
30419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30420    unix_path=`$CYGPATH -u "$windows_path"`
30421    new_path="$unix_path"
30422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30424    new_path="$unix_path"
30425  fi
30426
30427
30428    new_path=`$WHICH "$new_path" 2> /dev/null`
30429    # bat and cmd files are not always considered executable in MSYS causing which
30430    # to not find them
30431    if test "x$new_path" = x \
30432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30434      new_path="$path"
30435
30436  windows_path="$new_path"
30437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30438    unix_path=`$CYGPATH -u "$windows_path"`
30439    new_path="$unix_path"
30440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30442    new_path="$unix_path"
30443  fi
30444
30445    fi
30446
30447    if test "x$new_path" = x; then
30448      # It's still not found. Now this is an unrecoverable error.
30449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30450$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30451      has_space=`$ECHO "$complete" | $GREP " "`
30452      if test "x$has_space" != x; then
30453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30455      fi
30456      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30457    fi
30458  fi
30459
30460  # Now new_path has a complete unix path to the binary
30461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30462    # Keep paths in /bin as-is, but remove trailing .exe if any
30463    new_path="${new_path/%.exe/}"
30464    # Do not save /bin paths to all_fixpath_prefixes!
30465  else
30466    # Not in mixed or Windows style, start by that.
30467    new_path=`cmd //c echo $new_path`
30468
30469  input_path="$new_path"
30470  # Check if we need to convert this using DOS-style short mode. If the path
30471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30472  # take no chances and rewrite it.
30473  # Note: m4 eats our [], so we need to use [ and ] instead.
30474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30475  if test "x$has_forbidden_chars" != x; then
30476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30478  fi
30479
30480    # Output is in $new_path
30481
30482  windows_path="$new_path"
30483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30484    unix_path=`$CYGPATH -u "$windows_path"`
30485    new_path="$unix_path"
30486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30488    new_path="$unix_path"
30489  fi
30490
30491    # remove trailing .exe if any
30492    new_path="${new_path/%.exe/}"
30493
30494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30496  fi
30497
30498    else
30499      # We're on a unix platform. Hooray! :)
30500      # First separate the path from the arguments. This will split at the first
30501      # space.
30502      complete="$CXX"
30503      path="${complete%% *}"
30504      tmp="$complete EOL"
30505      arguments="${tmp#* }"
30506
30507      # Cannot rely on the command "which" here since it doesn't always work.
30508      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30509      if test -z "$is_absolute_path"; then
30510        # Path to executable is not absolute. Find it.
30511        IFS_save="$IFS"
30512        IFS=:
30513        for p in $PATH; do
30514          if test -f "$p/$path" && test -x "$p/$path"; then
30515            new_path="$p/$path"
30516            break
30517          fi
30518        done
30519        IFS="$IFS_save"
30520      else
30521        # This is an absolute path, we can use it without further modifications.
30522        new_path="$path"
30523      fi
30524
30525      if test "x$new_path" = x; then
30526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30527$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30528        has_space=`$ECHO "$complete" | $GREP " "`
30529        if test "x$has_space" != x; then
30530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30532        fi
30533        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30534      fi
30535    fi
30536
30537    # Now join together the path and the arguments once again
30538    if test "x$arguments" != xEOL; then
30539      new_complete="$new_path ${arguments% *}"
30540    else
30541      new_complete="$new_path"
30542    fi
30543
30544    if test "x$complete" != "x$new_complete"; then
30545      CXX="$new_complete"
30546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30547$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30548    fi
30549  fi
30550
30551  TEST_COMPILER="$CXX"
30552  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30553  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30554  if test "x$OPENJDK_BUILD_OS" != xaix; then
30555    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30556    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30557$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30558
30559  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30560    # Follow a chain of symbolic links. Use readlink
30561    # where it exists, else fall back to horribly
30562    # complicated shell code.
30563    if test "x$READLINK_TESTED" != yes; then
30564      # On MacOSX there is a readlink tool with a different
30565      # purpose than the GNU readlink tool. Check the found readlink.
30566      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30567      if test "x$ISGNU" = x; then
30568        # A readlink that we do not know how to use.
30569        # Are there other non-GNU readlinks out there?
30570        READLINK_TESTED=yes
30571        READLINK=
30572      fi
30573    fi
30574
30575    if test "x$READLINK" != x; then
30576      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30577    else
30578      # Save the current directory for restoring afterwards
30579      STARTDIR=$PWD
30580      COUNTER=0
30581      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30582      sym_link_file=`$BASENAME $TEST_COMPILER`
30583      cd $sym_link_dir
30584      # Use -P flag to resolve symlinks in directories.
30585      cd `$THEPWDCMD -P`
30586      sym_link_dir=`$THEPWDCMD -P`
30587      # Resolve file symlinks
30588      while test $COUNTER -lt 20; do
30589        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30590        if test "x$ISLINK" == x; then
30591          # This is not a symbolic link! We are done!
30592          break
30593        fi
30594        # Again resolve directory symlinks since the target of the just found
30595        # link could be in a different directory
30596        cd `$DIRNAME $ISLINK`
30597        sym_link_dir=`$THEPWDCMD -P`
30598        sym_link_file=`$BASENAME $ISLINK`
30599        let COUNTER=COUNTER+1
30600      done
30601      cd $STARTDIR
30602      TEST_COMPILER=$sym_link_dir/$sym_link_file
30603    fi
30604  fi
30605
30606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30607$as_echo "$TEST_COMPILER" >&6; }
30608  fi
30609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30610$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30611
30612  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30613  if test "x$COMPILER_BASENAME" = "xccache"; then
30614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30615$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30616    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30617    # We want to control ccache invocation ourselves, so ignore this cc and try
30618    # searching again.
30619
30620    # Remove the path to the fake ccache cc from the PATH
30621    RETRY_COMPILER_SAVED_PATH="$PATH"
30622    COMPILER_DIRNAME=`$DIRNAME $CXX`
30623    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30624
30625    # Try again looking for our compiler
30626    if test -n "$ac_tool_prefix"; then
30627  for ac_prog in $TOOLCHAIN_CXX_BINARY
30628  do
30629    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30630set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30632$as_echo_n "checking for $ac_word... " >&6; }
30633if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30634  $as_echo_n "(cached) " >&6
30635else
30636  if test -n "$PROPER_COMPILER_CXX"; then
30637  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30638else
30639as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30640for as_dir in $PATH
30641do
30642  IFS=$as_save_IFS
30643  test -z "$as_dir" && as_dir=.
30644    for ac_exec_ext in '' $ac_executable_extensions; do
30645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30646    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30648    break 2
30649  fi
30650done
30651  done
30652IFS=$as_save_IFS
30653
30654fi
30655fi
30656PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30657if test -n "$PROPER_COMPILER_CXX"; then
30658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30659$as_echo "$PROPER_COMPILER_CXX" >&6; }
30660else
30661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30662$as_echo "no" >&6; }
30663fi
30664
30665
30666    test -n "$PROPER_COMPILER_CXX" && break
30667  done
30668fi
30669if test -z "$PROPER_COMPILER_CXX"; then
30670  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30671  for ac_prog in $TOOLCHAIN_CXX_BINARY
30672do
30673  # Extract the first word of "$ac_prog", so it can be a program name with args.
30674set dummy $ac_prog; ac_word=$2
30675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30676$as_echo_n "checking for $ac_word... " >&6; }
30677if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30678  $as_echo_n "(cached) " >&6
30679else
30680  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30681  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30682else
30683as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30684for as_dir in $PATH
30685do
30686  IFS=$as_save_IFS
30687  test -z "$as_dir" && as_dir=.
30688    for ac_exec_ext in '' $ac_executable_extensions; do
30689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30690    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30692    break 2
30693  fi
30694done
30695  done
30696IFS=$as_save_IFS
30697
30698fi
30699fi
30700ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30701if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30703$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30704else
30705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30706$as_echo "no" >&6; }
30707fi
30708
30709
30710  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30711done
30712
30713  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30714    PROPER_COMPILER_CXX=""
30715  else
30716    case $cross_compiling:$ac_tool_warned in
30717yes:)
30718{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30719$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30720ac_tool_warned=yes ;;
30721esac
30722    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30723  fi
30724fi
30725
30726
30727  # Only process if variable expands to non-empty
30728
30729  if test "x$PROPER_COMPILER_CXX" != x; then
30730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30731
30732  # First separate the path from the arguments. This will split at the first
30733  # space.
30734  complete="$PROPER_COMPILER_CXX"
30735  path="${complete%% *}"
30736  tmp="$complete EOL"
30737  arguments="${tmp#* }"
30738
30739  # Input might be given as Windows format, start by converting to
30740  # unix format.
30741  new_path=`$CYGPATH -u "$path"`
30742
30743  # Now try to locate executable using which
30744  new_path=`$WHICH "$new_path" 2> /dev/null`
30745  # bat and cmd files are not always considered executable in cygwin causing which
30746  # to not find them
30747  if test "x$new_path" = x \
30748      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30749      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30750    new_path=`$CYGPATH -u "$path"`
30751  fi
30752  if test "x$new_path" = x; then
30753    # Oops. Which didn't find the executable.
30754    # The splitting of arguments from the executable at a space might have been incorrect,
30755    # since paths with space are more likely in Windows. Give it another try with the whole
30756    # argument.
30757    path="$complete"
30758    arguments="EOL"
30759    new_path=`$CYGPATH -u "$path"`
30760    new_path=`$WHICH "$new_path" 2> /dev/null`
30761    # bat and cmd files are not always considered executable in cygwin causing which
30762    # to not find them
30763    if test "x$new_path" = x \
30764        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30765        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30766      new_path=`$CYGPATH -u "$path"`
30767    fi
30768    if test "x$new_path" = x; then
30769      # It's still not found. Now this is an unrecoverable error.
30770      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30771$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30772      has_space=`$ECHO "$complete" | $GREP " "`
30773      if test "x$has_space" != x; then
30774        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30775$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30776      fi
30777      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30778    fi
30779  fi
30780
30781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30784  # "foo.exe" is OK but "foo" is an error.
30785  #
30786  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30787  # It is also a way to make sure we got the proper file name for the real test later on.
30788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30789  if test "x$test_shortpath" = x; then
30790    # Short path failed, file does not exist as specified.
30791    # Try adding .exe or .cmd
30792    if test -f "${new_path}.exe"; then
30793      input_to_shortpath="${new_path}.exe"
30794    elif test -f "${new_path}.cmd"; then
30795      input_to_shortpath="${new_path}.cmd"
30796    else
30797      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30798$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30799      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30800$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30801      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30802    fi
30803  else
30804    input_to_shortpath="$new_path"
30805  fi
30806
30807  # Call helper function which possibly converts this using DOS-style short mode.
30808  # If so, the updated path is stored in $new_path.
30809  new_path="$input_to_shortpath"
30810
30811  input_path="$input_to_shortpath"
30812  # Check if we need to convert this using DOS-style short mode. If the path
30813  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30814  # take no chances and rewrite it.
30815  # Note: m4 eats our [], so we need to use [ and ] instead.
30816  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30817  if test "x$has_forbidden_chars" != x; then
30818    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30819    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30820    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30821    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30822      # Going to short mode and back again did indeed matter. Since short mode is
30823      # case insensitive, let's make it lowercase to improve readability.
30824      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30825      # Now convert it back to Unix-style (cygpath)
30826      input_path=`$CYGPATH -u "$shortmode_path"`
30827      new_path="$input_path"
30828    fi
30829  fi
30830
30831  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30832  if test "x$test_cygdrive_prefix" = x; then
30833    # As a simple fix, exclude /usr/bin since it's not a real path.
30834    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30835      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30836      # a path prefixed by /cygdrive for fixpath to work.
30837      new_path="$CYGWIN_ROOT_PATH$input_path"
30838    fi
30839  fi
30840
30841  # remove trailing .exe if any
30842  new_path="${new_path/%.exe/}"
30843
30844    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30845
30846  # First separate the path from the arguments. This will split at the first
30847  # space.
30848  complete="$PROPER_COMPILER_CXX"
30849  path="${complete%% *}"
30850  tmp="$complete EOL"
30851  arguments="${tmp#* }"
30852
30853  # Input might be given as Windows format, start by converting to
30854  # unix format.
30855  new_path="$path"
30856
30857  windows_path="$new_path"
30858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30859    unix_path=`$CYGPATH -u "$windows_path"`
30860    new_path="$unix_path"
30861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30863    new_path="$unix_path"
30864  fi
30865
30866
30867  # Now try to locate executable using which
30868  new_path=`$WHICH "$new_path" 2> /dev/null`
30869
30870  if test "x$new_path" = x; then
30871    # Oops. Which didn't find the executable.
30872    # The splitting of arguments from the executable at a space might have been incorrect,
30873    # since paths with space are more likely in Windows. Give it another try with the whole
30874    # argument.
30875    path="$complete"
30876    arguments="EOL"
30877    new_path="$path"
30878
30879  windows_path="$new_path"
30880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30881    unix_path=`$CYGPATH -u "$windows_path"`
30882    new_path="$unix_path"
30883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30885    new_path="$unix_path"
30886  fi
30887
30888
30889    new_path=`$WHICH "$new_path" 2> /dev/null`
30890    # bat and cmd files are not always considered executable in MSYS causing which
30891    # to not find them
30892    if test "x$new_path" = x \
30893        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30894        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30895      new_path="$path"
30896
30897  windows_path="$new_path"
30898  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30899    unix_path=`$CYGPATH -u "$windows_path"`
30900    new_path="$unix_path"
30901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30902    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30903    new_path="$unix_path"
30904  fi
30905
30906    fi
30907
30908    if test "x$new_path" = x; then
30909      # It's still not found. Now this is an unrecoverable error.
30910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30911$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30912      has_space=`$ECHO "$complete" | $GREP " "`
30913      if test "x$has_space" != x; then
30914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30916      fi
30917      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30918    fi
30919  fi
30920
30921  # Now new_path has a complete unix path to the binary
30922  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30923    # Keep paths in /bin as-is, but remove trailing .exe if any
30924    new_path="${new_path/%.exe/}"
30925    # Do not save /bin paths to all_fixpath_prefixes!
30926  else
30927    # Not in mixed or Windows style, start by that.
30928    new_path=`cmd //c echo $new_path`
30929
30930  input_path="$new_path"
30931  # Check if we need to convert this using DOS-style short mode. If the path
30932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30933  # take no chances and rewrite it.
30934  # Note: m4 eats our [], so we need to use [ and ] instead.
30935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30936  if test "x$has_forbidden_chars" != x; then
30937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30939  fi
30940
30941    # Output is in $new_path
30942
30943  windows_path="$new_path"
30944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30945    unix_path=`$CYGPATH -u "$windows_path"`
30946    new_path="$unix_path"
30947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30949    new_path="$unix_path"
30950  fi
30951
30952    # remove trailing .exe if any
30953    new_path="${new_path/%.exe/}"
30954
30955    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30956    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30957  fi
30958
30959    else
30960      # We're on a unix platform. Hooray! :)
30961      # First separate the path from the arguments. This will split at the first
30962      # space.
30963      complete="$PROPER_COMPILER_CXX"
30964      path="${complete%% *}"
30965      tmp="$complete EOL"
30966      arguments="${tmp#* }"
30967
30968      # Cannot rely on the command "which" here since it doesn't always work.
30969      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30970      if test -z "$is_absolute_path"; then
30971        # Path to executable is not absolute. Find it.
30972        IFS_save="$IFS"
30973        IFS=:
30974        for p in $PATH; do
30975          if test -f "$p/$path" && test -x "$p/$path"; then
30976            new_path="$p/$path"
30977            break
30978          fi
30979        done
30980        IFS="$IFS_save"
30981      else
30982        # This is an absolute path, we can use it without further modifications.
30983        new_path="$path"
30984      fi
30985
30986      if test "x$new_path" = x; then
30987        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30988$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30989        has_space=`$ECHO "$complete" | $GREP " "`
30990        if test "x$has_space" != x; then
30991          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30992$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30993        fi
30994        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30995      fi
30996    fi
30997
30998    # Now join together the path and the arguments once again
30999    if test "x$arguments" != xEOL; then
31000      new_complete="$new_path ${arguments% *}"
31001    else
31002      new_complete="$new_path"
31003    fi
31004
31005    if test "x$complete" != "x$new_complete"; then
31006      PROPER_COMPILER_CXX="$new_complete"
31007      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
31008$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
31009    fi
31010  fi
31011
31012    PATH="$RETRY_COMPILER_SAVED_PATH"
31013
31014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
31015$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
31016
31017  if test "x$OPENJDK_BUILD_OS" != xwindows; then
31018    # Follow a chain of symbolic links. Use readlink
31019    # where it exists, else fall back to horribly
31020    # complicated shell code.
31021    if test "x$READLINK_TESTED" != yes; then
31022      # On MacOSX there is a readlink tool with a different
31023      # purpose than the GNU readlink tool. Check the found readlink.
31024      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
31025      if test "x$ISGNU" = x; then
31026        # A readlink that we do not know how to use.
31027        # Are there other non-GNU readlinks out there?
31028        READLINK_TESTED=yes
31029        READLINK=
31030      fi
31031    fi
31032
31033    if test "x$READLINK" != x; then
31034      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
31035    else
31036      # Save the current directory for restoring afterwards
31037      STARTDIR=$PWD
31038      COUNTER=0
31039      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
31040      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
31041      cd $sym_link_dir
31042      # Use -P flag to resolve symlinks in directories.
31043      cd `$THEPWDCMD -P`
31044      sym_link_dir=`$THEPWDCMD -P`
31045      # Resolve file symlinks
31046      while test $COUNTER -lt 20; do
31047        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
31048        if test "x$ISLINK" == x; then
31049          # This is not a symbolic link! We are done!
31050          break
31051        fi
31052        # Again resolve directory symlinks since the target of the just found
31053        # link could be in a different directory
31054        cd `$DIRNAME $ISLINK`
31055        sym_link_dir=`$THEPWDCMD -P`
31056        sym_link_file=`$BASENAME $ISLINK`
31057        let COUNTER=COUNTER+1
31058      done
31059      cd $STARTDIR
31060      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
31061    fi
31062  fi
31063
31064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
31065$as_echo "$PROPER_COMPILER_CXX" >&6; }
31066    CXX="$PROPER_COMPILER_CXX"
31067  else
31068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
31069$as_echo "no, keeping CXX" >&6; }
31070  fi
31071
31072
31073  COMPILER=$CXX
31074  COMPILER_NAME=$COMPILER_NAME
31075
31076  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31077    # cc -V output typically looks like
31078    #     cc: Sun C 5.12 Linux_i386 2011/11/16
31079    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
31080    # Check that this is likely to be the Solaris Studio cc.
31081    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
31082    if test $? -ne 0; then
31083      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31084      { $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
31085$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31086      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31087$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31088      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31089$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31090      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31091    fi
31092    # Remove usage instructions (if present), and
31093    # collapse compiler output into a single line
31094    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31095        $SED -e 's/ *[Uu]sage:.*//'`
31096    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31097        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
31098  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
31099    # xlc -qversion output typically looks like
31100    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
31101    #     Version: 11.01.0000.0015
31102    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
31103    # Check that this is likely to be the IBM XL C compiler.
31104    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
31105    if test $? -ne 0; then
31106      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31107      { $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
31108$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31109      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31110$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31111      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
31112$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
31113      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31114    fi
31115    # Collapse compiler output into a single line
31116    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31117    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31118        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
31119  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31120    # There is no specific version flag, but all output starts with a version string.
31121    # First line typically looks something like:
31122    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
31123    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
31124    # Check that this is likely to be Microsoft CL.EXE.
31125    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
31126    if test $? -ne 0; then
31127      { $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
31128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31130$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31131      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31132    fi
31133    # Collapse compiler output into a single line
31134    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31135    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31136        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
31137  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
31138    # gcc --version output typically looks like
31139    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
31140    #     Copyright (C) 2013 Free Software Foundation, Inc.
31141    #     This is free software; see the source for copying conditions.  There is NO
31142    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
31143    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31144    # Check that this is likely to be GCC.
31145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
31146    if test $? -ne 0; then
31147      { $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
31148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
31150$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
31151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31152    fi
31153    # Remove Copyright and legalese from version string, and
31154    # collapse into a single line
31155    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
31156        $SED -e 's/ *Copyright .*//'`
31157    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31158        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
31159  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
31160    # clang --version output typically looks like
31161    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
31162    #    clang version 3.3 (tags/RELEASE_33/final)
31163    # or
31164    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
31165    #    Target: x86_64-pc-linux-gnu
31166    #    Thread model: posix
31167    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
31168    # Check that this is likely to be clang
31169    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
31170    if test $? -ne 0; then
31171      { $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
31172$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
31173      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
31174$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
31175      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
31176    fi
31177    # Collapse compiler output into a single line
31178    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31179    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31180        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31181  else
31182      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31183  fi
31184  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31185  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31186  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31187  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31188
31189  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31190$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31191
31192
31193  # Now that we have resolved CXX ourself, let autoconf have its go at it
31194  ac_ext=cpp
31195ac_cpp='$CXXCPP $CPPFLAGS'
31196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31199if test -z "$CXX"; then
31200  if test -n "$CCC"; then
31201    CXX=$CCC
31202  else
31203    if test -n "$ac_tool_prefix"; then
31204  for ac_prog in $CXX
31205  do
31206    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31207set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31209$as_echo_n "checking for $ac_word... " >&6; }
31210if ${ac_cv_prog_CXX+:} false; then :
31211  $as_echo_n "(cached) " >&6
31212else
31213  if test -n "$CXX"; then
31214  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31215else
31216as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31217for as_dir in $PATH
31218do
31219  IFS=$as_save_IFS
31220  test -z "$as_dir" && as_dir=.
31221    for ac_exec_ext in '' $ac_executable_extensions; do
31222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31223    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31225    break 2
31226  fi
31227done
31228  done
31229IFS=$as_save_IFS
31230
31231fi
31232fi
31233CXX=$ac_cv_prog_CXX
31234if test -n "$CXX"; then
31235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31236$as_echo "$CXX" >&6; }
31237else
31238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31239$as_echo "no" >&6; }
31240fi
31241
31242
31243    test -n "$CXX" && break
31244  done
31245fi
31246if test -z "$CXX"; then
31247  ac_ct_CXX=$CXX
31248  for ac_prog in $CXX
31249do
31250  # Extract the first word of "$ac_prog", so it can be a program name with args.
31251set dummy $ac_prog; ac_word=$2
31252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31253$as_echo_n "checking for $ac_word... " >&6; }
31254if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31255  $as_echo_n "(cached) " >&6
31256else
31257  if test -n "$ac_ct_CXX"; then
31258  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31259else
31260as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31261for as_dir in $PATH
31262do
31263  IFS=$as_save_IFS
31264  test -z "$as_dir" && as_dir=.
31265    for ac_exec_ext in '' $ac_executable_extensions; do
31266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31267    ac_cv_prog_ac_ct_CXX="$ac_prog"
31268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31269    break 2
31270  fi
31271done
31272  done
31273IFS=$as_save_IFS
31274
31275fi
31276fi
31277ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31278if test -n "$ac_ct_CXX"; then
31279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31280$as_echo "$ac_ct_CXX" >&6; }
31281else
31282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31283$as_echo "no" >&6; }
31284fi
31285
31286
31287  test -n "$ac_ct_CXX" && break
31288done
31289
31290  if test "x$ac_ct_CXX" = x; then
31291    CXX="g++"
31292  else
31293    case $cross_compiling:$ac_tool_warned in
31294yes:)
31295{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31296$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31297ac_tool_warned=yes ;;
31298esac
31299    CXX=$ac_ct_CXX
31300  fi
31301fi
31302
31303  fi
31304fi
31305# Provide some information about the compiler.
31306$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31307set X $ac_compile
31308ac_compiler=$2
31309for ac_option in --version -v -V -qversion; do
31310  { { ac_try="$ac_compiler $ac_option >&5"
31311case "(($ac_try" in
31312  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31313  *) ac_try_echo=$ac_try;;
31314esac
31315eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31316$as_echo "$ac_try_echo"; } >&5
31317  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31318  ac_status=$?
31319  if test -s conftest.err; then
31320    sed '10a\
31321... rest of stderr output deleted ...
31322         10q' conftest.err >conftest.er1
31323    cat conftest.er1 >&5
31324  fi
31325  rm -f conftest.er1 conftest.err
31326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31327  test $ac_status = 0; }
31328done
31329
31330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31331$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31332if ${ac_cv_cxx_compiler_gnu+:} false; then :
31333  $as_echo_n "(cached) " >&6
31334else
31335  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31336/* end confdefs.h.  */
31337
31338int
31339main ()
31340{
31341#ifndef __GNUC__
31342       choke me
31343#endif
31344
31345  ;
31346  return 0;
31347}
31348_ACEOF
31349if ac_fn_cxx_try_compile "$LINENO"; then :
31350  ac_compiler_gnu=yes
31351else
31352  ac_compiler_gnu=no
31353fi
31354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31355ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31356
31357fi
31358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31359$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31360if test $ac_compiler_gnu = yes; then
31361  GXX=yes
31362else
31363  GXX=
31364fi
31365ac_test_CXXFLAGS=${CXXFLAGS+set}
31366ac_save_CXXFLAGS=$CXXFLAGS
31367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31368$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31369if ${ac_cv_prog_cxx_g+:} false; then :
31370  $as_echo_n "(cached) " >&6
31371else
31372  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31373   ac_cxx_werror_flag=yes
31374   ac_cv_prog_cxx_g=no
31375   CXXFLAGS="-g"
31376   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31377/* end confdefs.h.  */
31378
31379int
31380main ()
31381{
31382
31383  ;
31384  return 0;
31385}
31386_ACEOF
31387if ac_fn_cxx_try_compile "$LINENO"; then :
31388  ac_cv_prog_cxx_g=yes
31389else
31390  CXXFLAGS=""
31391      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31392/* end confdefs.h.  */
31393
31394int
31395main ()
31396{
31397
31398  ;
31399  return 0;
31400}
31401_ACEOF
31402if ac_fn_cxx_try_compile "$LINENO"; then :
31403
31404else
31405  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31406	 CXXFLAGS="-g"
31407	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31408/* end confdefs.h.  */
31409
31410int
31411main ()
31412{
31413
31414  ;
31415  return 0;
31416}
31417_ACEOF
31418if ac_fn_cxx_try_compile "$LINENO"; then :
31419  ac_cv_prog_cxx_g=yes
31420fi
31421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31422fi
31423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31424fi
31425rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31426   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31427fi
31428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31429$as_echo "$ac_cv_prog_cxx_g" >&6; }
31430if test "$ac_test_CXXFLAGS" = set; then
31431  CXXFLAGS=$ac_save_CXXFLAGS
31432elif test $ac_cv_prog_cxx_g = yes; then
31433  if test "$GXX" = yes; then
31434    CXXFLAGS="-g -O2"
31435  else
31436    CXXFLAGS="-g"
31437  fi
31438else
31439  if test "$GXX" = yes; then
31440    CXXFLAGS="-O2"
31441  else
31442    CXXFLAGS=
31443  fi
31444fi
31445ac_ext=cpp
31446ac_cpp='$CXXCPP $CPPFLAGS'
31447ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31448ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31449ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31450
31451
31452  #
31453  # Setup the preprocessor (CPP and CXXCPP)
31454  #
31455  ac_ext=c
31456ac_cpp='$CPP $CPPFLAGS'
31457ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31458ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31459ac_compiler_gnu=$ac_cv_c_compiler_gnu
31460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31461$as_echo_n "checking how to run the C preprocessor... " >&6; }
31462# On Suns, sometimes $CPP names a directory.
31463if test -n "$CPP" && test -d "$CPP"; then
31464  CPP=
31465fi
31466if test -z "$CPP"; then
31467  if ${ac_cv_prog_CPP+:} false; then :
31468  $as_echo_n "(cached) " >&6
31469else
31470      # Double quotes because CPP needs to be expanded
31471    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31472    do
31473      ac_preproc_ok=false
31474for ac_c_preproc_warn_flag in '' yes
31475do
31476  # Use a header file that comes with gcc, so configuring glibc
31477  # with a fresh cross-compiler works.
31478  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31479  # <limits.h> exists even on freestanding compilers.
31480  # On the NeXT, cc -E runs the code through the compiler's parser,
31481  # not just through cpp. "Syntax error" is here to catch this case.
31482  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31483/* end confdefs.h.  */
31484#ifdef __STDC__
31485# include <limits.h>
31486#else
31487# include <assert.h>
31488#endif
31489		     Syntax error
31490_ACEOF
31491if ac_fn_c_try_cpp "$LINENO"; then :
31492
31493else
31494  # Broken: fails on valid input.
31495continue
31496fi
31497rm -f conftest.err conftest.i conftest.$ac_ext
31498
31499  # OK, works on sane cases.  Now check whether nonexistent headers
31500  # can be detected and how.
31501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31502/* end confdefs.h.  */
31503#include <ac_nonexistent.h>
31504_ACEOF
31505if ac_fn_c_try_cpp "$LINENO"; then :
31506  # Broken: success on invalid input.
31507continue
31508else
31509  # Passes both tests.
31510ac_preproc_ok=:
31511break
31512fi
31513rm -f conftest.err conftest.i conftest.$ac_ext
31514
31515done
31516# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31517rm -f conftest.i conftest.err conftest.$ac_ext
31518if $ac_preproc_ok; then :
31519  break
31520fi
31521
31522    done
31523    ac_cv_prog_CPP=$CPP
31524
31525fi
31526  CPP=$ac_cv_prog_CPP
31527else
31528  ac_cv_prog_CPP=$CPP
31529fi
31530{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31531$as_echo "$CPP" >&6; }
31532ac_preproc_ok=false
31533for ac_c_preproc_warn_flag in '' yes
31534do
31535  # Use a header file that comes with gcc, so configuring glibc
31536  # with a fresh cross-compiler works.
31537  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31538  # <limits.h> exists even on freestanding compilers.
31539  # On the NeXT, cc -E runs the code through the compiler's parser,
31540  # not just through cpp. "Syntax error" is here to catch this case.
31541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31542/* end confdefs.h.  */
31543#ifdef __STDC__
31544# include <limits.h>
31545#else
31546# include <assert.h>
31547#endif
31548		     Syntax error
31549_ACEOF
31550if ac_fn_c_try_cpp "$LINENO"; then :
31551
31552else
31553  # Broken: fails on valid input.
31554continue
31555fi
31556rm -f conftest.err conftest.i conftest.$ac_ext
31557
31558  # OK, works on sane cases.  Now check whether nonexistent headers
31559  # can be detected and how.
31560  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31561/* end confdefs.h.  */
31562#include <ac_nonexistent.h>
31563_ACEOF
31564if ac_fn_c_try_cpp "$LINENO"; then :
31565  # Broken: success on invalid input.
31566continue
31567else
31568  # Passes both tests.
31569ac_preproc_ok=:
31570break
31571fi
31572rm -f conftest.err conftest.i conftest.$ac_ext
31573
31574done
31575# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31576rm -f conftest.i conftest.err conftest.$ac_ext
31577if $ac_preproc_ok; then :
31578
31579else
31580  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31581$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31582as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31583See \`config.log' for more details" "$LINENO" 5; }
31584fi
31585
31586ac_ext=cpp
31587ac_cpp='$CXXCPP $CPPFLAGS'
31588ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31589ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31590ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31591
31592
31593  # Only process if variable expands to non-empty
31594
31595  if test "x$CPP" != x; then
31596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31597
31598  # First separate the path from the arguments. This will split at the first
31599  # space.
31600  complete="$CPP"
31601  path="${complete%% *}"
31602  tmp="$complete EOL"
31603  arguments="${tmp#* }"
31604
31605  # Input might be given as Windows format, start by converting to
31606  # unix format.
31607  new_path=`$CYGPATH -u "$path"`
31608
31609  # Now try to locate executable using which
31610  new_path=`$WHICH "$new_path" 2> /dev/null`
31611  # bat and cmd files are not always considered executable in cygwin causing which
31612  # to not find them
31613  if test "x$new_path" = x \
31614      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31615      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31616    new_path=`$CYGPATH -u "$path"`
31617  fi
31618  if test "x$new_path" = x; then
31619    # Oops. Which didn't find the executable.
31620    # The splitting of arguments from the executable at a space might have been incorrect,
31621    # since paths with space are more likely in Windows. Give it another try with the whole
31622    # argument.
31623    path="$complete"
31624    arguments="EOL"
31625    new_path=`$CYGPATH -u "$path"`
31626    new_path=`$WHICH "$new_path" 2> /dev/null`
31627    # bat and cmd files are not always considered executable in cygwin causing which
31628    # to not find them
31629    if test "x$new_path" = x \
31630        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31631        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31632      new_path=`$CYGPATH -u "$path"`
31633    fi
31634    if test "x$new_path" = x; then
31635      # It's still not found. Now this is an unrecoverable error.
31636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31637$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31638      has_space=`$ECHO "$complete" | $GREP " "`
31639      if test "x$has_space" != x; then
31640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31642      fi
31643      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31644    fi
31645  fi
31646
31647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31650  # "foo.exe" is OK but "foo" is an error.
31651  #
31652  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31653  # It is also a way to make sure we got the proper file name for the real test later on.
31654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31655  if test "x$test_shortpath" = x; then
31656    # Short path failed, file does not exist as specified.
31657    # Try adding .exe or .cmd
31658    if test -f "${new_path}.exe"; then
31659      input_to_shortpath="${new_path}.exe"
31660    elif test -f "${new_path}.cmd"; then
31661      input_to_shortpath="${new_path}.cmd"
31662    else
31663      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31664$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31665      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31666$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31667      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31668    fi
31669  else
31670    input_to_shortpath="$new_path"
31671  fi
31672
31673  # Call helper function which possibly converts this using DOS-style short mode.
31674  # If so, the updated path is stored in $new_path.
31675  new_path="$input_to_shortpath"
31676
31677  input_path="$input_to_shortpath"
31678  # Check if we need to convert this using DOS-style short mode. If the path
31679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31680  # take no chances and rewrite it.
31681  # Note: m4 eats our [], so we need to use [ and ] instead.
31682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31683  if test "x$has_forbidden_chars" != x; then
31684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31685    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31686    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31687    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31688      # Going to short mode and back again did indeed matter. Since short mode is
31689      # case insensitive, let's make it lowercase to improve readability.
31690      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31691      # Now convert it back to Unix-style (cygpath)
31692      input_path=`$CYGPATH -u "$shortmode_path"`
31693      new_path="$input_path"
31694    fi
31695  fi
31696
31697  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31698  if test "x$test_cygdrive_prefix" = x; then
31699    # As a simple fix, exclude /usr/bin since it's not a real path.
31700    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31701      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31702      # a path prefixed by /cygdrive for fixpath to work.
31703      new_path="$CYGWIN_ROOT_PATH$input_path"
31704    fi
31705  fi
31706
31707  # remove trailing .exe if any
31708  new_path="${new_path/%.exe/}"
31709
31710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31711
31712  # First separate the path from the arguments. This will split at the first
31713  # space.
31714  complete="$CPP"
31715  path="${complete%% *}"
31716  tmp="$complete EOL"
31717  arguments="${tmp#* }"
31718
31719  # Input might be given as Windows format, start by converting to
31720  # unix format.
31721  new_path="$path"
31722
31723  windows_path="$new_path"
31724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31725    unix_path=`$CYGPATH -u "$windows_path"`
31726    new_path="$unix_path"
31727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31729    new_path="$unix_path"
31730  fi
31731
31732
31733  # Now try to locate executable using which
31734  new_path=`$WHICH "$new_path" 2> /dev/null`
31735
31736  if test "x$new_path" = x; then
31737    # Oops. Which didn't find the executable.
31738    # The splitting of arguments from the executable at a space might have been incorrect,
31739    # since paths with space are more likely in Windows. Give it another try with the whole
31740    # argument.
31741    path="$complete"
31742    arguments="EOL"
31743    new_path="$path"
31744
31745  windows_path="$new_path"
31746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31747    unix_path=`$CYGPATH -u "$windows_path"`
31748    new_path="$unix_path"
31749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31751    new_path="$unix_path"
31752  fi
31753
31754
31755    new_path=`$WHICH "$new_path" 2> /dev/null`
31756    # bat and cmd files are not always considered executable in MSYS causing which
31757    # to not find them
31758    if test "x$new_path" = x \
31759        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31760        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31761      new_path="$path"
31762
31763  windows_path="$new_path"
31764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31765    unix_path=`$CYGPATH -u "$windows_path"`
31766    new_path="$unix_path"
31767  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31768    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31769    new_path="$unix_path"
31770  fi
31771
31772    fi
31773
31774    if test "x$new_path" = x; then
31775      # It's still not found. Now this is an unrecoverable error.
31776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31777$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31778      has_space=`$ECHO "$complete" | $GREP " "`
31779      if test "x$has_space" != x; then
31780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31782      fi
31783      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31784    fi
31785  fi
31786
31787  # Now new_path has a complete unix path to the binary
31788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31789    # Keep paths in /bin as-is, but remove trailing .exe if any
31790    new_path="${new_path/%.exe/}"
31791    # Do not save /bin paths to all_fixpath_prefixes!
31792  else
31793    # Not in mixed or Windows style, start by that.
31794    new_path=`cmd //c echo $new_path`
31795
31796  input_path="$new_path"
31797  # Check if we need to convert this using DOS-style short mode. If the path
31798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31799  # take no chances and rewrite it.
31800  # Note: m4 eats our [], so we need to use [ and ] instead.
31801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31802  if test "x$has_forbidden_chars" != x; then
31803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31805  fi
31806
31807    # Output is in $new_path
31808
31809  windows_path="$new_path"
31810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31811    unix_path=`$CYGPATH -u "$windows_path"`
31812    new_path="$unix_path"
31813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31815    new_path="$unix_path"
31816  fi
31817
31818    # remove trailing .exe if any
31819    new_path="${new_path/%.exe/}"
31820
31821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31823  fi
31824
31825    else
31826      # We're on a unix platform. Hooray! :)
31827      # First separate the path from the arguments. This will split at the first
31828      # space.
31829      complete="$CPP"
31830      path="${complete%% *}"
31831      tmp="$complete EOL"
31832      arguments="${tmp#* }"
31833
31834      # Cannot rely on the command "which" here since it doesn't always work.
31835      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31836      if test -z "$is_absolute_path"; then
31837        # Path to executable is not absolute. Find it.
31838        IFS_save="$IFS"
31839        IFS=:
31840        for p in $PATH; do
31841          if test -f "$p/$path" && test -x "$p/$path"; then
31842            new_path="$p/$path"
31843            break
31844          fi
31845        done
31846        IFS="$IFS_save"
31847      else
31848        # This is an absolute path, we can use it without further modifications.
31849        new_path="$path"
31850      fi
31851
31852      if test "x$new_path" = x; then
31853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31854$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31855        has_space=`$ECHO "$complete" | $GREP " "`
31856        if test "x$has_space" != x; then
31857          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31859        fi
31860        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31861      fi
31862    fi
31863
31864    # Now join together the path and the arguments once again
31865    if test "x$arguments" != xEOL; then
31866      new_complete="$new_path ${arguments% *}"
31867    else
31868      new_complete="$new_path"
31869    fi
31870
31871    if test "x$complete" != "x$new_complete"; then
31872      CPP="$new_complete"
31873      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31874$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31875    fi
31876  fi
31877
31878  ac_ext=cpp
31879ac_cpp='$CXXCPP $CPPFLAGS'
31880ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31881ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31882ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31884$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31885if test -z "$CXXCPP"; then
31886  if ${ac_cv_prog_CXXCPP+:} false; then :
31887  $as_echo_n "(cached) " >&6
31888else
31889      # Double quotes because CXXCPP needs to be expanded
31890    for CXXCPP in "$CXX -E" "/lib/cpp"
31891    do
31892      ac_preproc_ok=false
31893for ac_cxx_preproc_warn_flag in '' yes
31894do
31895  # Use a header file that comes with gcc, so configuring glibc
31896  # with a fresh cross-compiler works.
31897  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31898  # <limits.h> exists even on freestanding compilers.
31899  # On the NeXT, cc -E runs the code through the compiler's parser,
31900  # not just through cpp. "Syntax error" is here to catch this case.
31901  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31902/* end confdefs.h.  */
31903#ifdef __STDC__
31904# include <limits.h>
31905#else
31906# include <assert.h>
31907#endif
31908		     Syntax error
31909_ACEOF
31910if ac_fn_cxx_try_cpp "$LINENO"; then :
31911
31912else
31913  # Broken: fails on valid input.
31914continue
31915fi
31916rm -f conftest.err conftest.i conftest.$ac_ext
31917
31918  # OK, works on sane cases.  Now check whether nonexistent headers
31919  # can be detected and how.
31920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31921/* end confdefs.h.  */
31922#include <ac_nonexistent.h>
31923_ACEOF
31924if ac_fn_cxx_try_cpp "$LINENO"; then :
31925  # Broken: success on invalid input.
31926continue
31927else
31928  # Passes both tests.
31929ac_preproc_ok=:
31930break
31931fi
31932rm -f conftest.err conftest.i conftest.$ac_ext
31933
31934done
31935# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31936rm -f conftest.i conftest.err conftest.$ac_ext
31937if $ac_preproc_ok; then :
31938  break
31939fi
31940
31941    done
31942    ac_cv_prog_CXXCPP=$CXXCPP
31943
31944fi
31945  CXXCPP=$ac_cv_prog_CXXCPP
31946else
31947  ac_cv_prog_CXXCPP=$CXXCPP
31948fi
31949{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31950$as_echo "$CXXCPP" >&6; }
31951ac_preproc_ok=false
31952for ac_cxx_preproc_warn_flag in '' yes
31953do
31954  # Use a header file that comes with gcc, so configuring glibc
31955  # with a fresh cross-compiler works.
31956  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31957  # <limits.h> exists even on freestanding compilers.
31958  # On the NeXT, cc -E runs the code through the compiler's parser,
31959  # not just through cpp. "Syntax error" is here to catch this case.
31960  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31961/* end confdefs.h.  */
31962#ifdef __STDC__
31963# include <limits.h>
31964#else
31965# include <assert.h>
31966#endif
31967		     Syntax error
31968_ACEOF
31969if ac_fn_cxx_try_cpp "$LINENO"; then :
31970
31971else
31972  # Broken: fails on valid input.
31973continue
31974fi
31975rm -f conftest.err conftest.i conftest.$ac_ext
31976
31977  # OK, works on sane cases.  Now check whether nonexistent headers
31978  # can be detected and how.
31979  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31980/* end confdefs.h.  */
31981#include <ac_nonexistent.h>
31982_ACEOF
31983if ac_fn_cxx_try_cpp "$LINENO"; then :
31984  # Broken: success on invalid input.
31985continue
31986else
31987  # Passes both tests.
31988ac_preproc_ok=:
31989break
31990fi
31991rm -f conftest.err conftest.i conftest.$ac_ext
31992
31993done
31994# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31995rm -f conftest.i conftest.err conftest.$ac_ext
31996if $ac_preproc_ok; then :
31997
31998else
31999  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
32000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
32001as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
32002See \`config.log' for more details" "$LINENO" 5; }
32003fi
32004
32005ac_ext=cpp
32006ac_cpp='$CXXCPP $CPPFLAGS'
32007ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32008ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32009ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32010
32011
32012  # Only process if variable expands to non-empty
32013
32014  if test "x$CXXCPP" != x; then
32015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32016
32017  # First separate the path from the arguments. This will split at the first
32018  # space.
32019  complete="$CXXCPP"
32020  path="${complete%% *}"
32021  tmp="$complete EOL"
32022  arguments="${tmp#* }"
32023
32024  # Input might be given as Windows format, start by converting to
32025  # unix format.
32026  new_path=`$CYGPATH -u "$path"`
32027
32028  # Now try to locate executable using which
32029  new_path=`$WHICH "$new_path" 2> /dev/null`
32030  # bat and cmd files are not always considered executable in cygwin causing which
32031  # to not find them
32032  if test "x$new_path" = x \
32033      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32034      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32035    new_path=`$CYGPATH -u "$path"`
32036  fi
32037  if test "x$new_path" = x; then
32038    # Oops. Which didn't find the executable.
32039    # The splitting of arguments from the executable at a space might have been incorrect,
32040    # since paths with space are more likely in Windows. Give it another try with the whole
32041    # argument.
32042    path="$complete"
32043    arguments="EOL"
32044    new_path=`$CYGPATH -u "$path"`
32045    new_path=`$WHICH "$new_path" 2> /dev/null`
32046    # bat and cmd files are not always considered executable in cygwin causing which
32047    # to not find them
32048    if test "x$new_path" = x \
32049        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32050        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32051      new_path=`$CYGPATH -u "$path"`
32052    fi
32053    if test "x$new_path" = x; then
32054      # It's still not found. Now this is an unrecoverable error.
32055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32056$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32057      has_space=`$ECHO "$complete" | $GREP " "`
32058      if test "x$has_space" != x; then
32059        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32060$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32061      fi
32062      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32063    fi
32064  fi
32065
32066  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32067  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32068  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32069  # "foo.exe" is OK but "foo" is an error.
32070  #
32071  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32072  # It is also a way to make sure we got the proper file name for the real test later on.
32073  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32074  if test "x$test_shortpath" = x; then
32075    # Short path failed, file does not exist as specified.
32076    # Try adding .exe or .cmd
32077    if test -f "${new_path}.exe"; then
32078      input_to_shortpath="${new_path}.exe"
32079    elif test -f "${new_path}.cmd"; then
32080      input_to_shortpath="${new_path}.cmd"
32081    else
32082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
32083$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
32084      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32085$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32086      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32087    fi
32088  else
32089    input_to_shortpath="$new_path"
32090  fi
32091
32092  # Call helper function which possibly converts this using DOS-style short mode.
32093  # If so, the updated path is stored in $new_path.
32094  new_path="$input_to_shortpath"
32095
32096  input_path="$input_to_shortpath"
32097  # Check if we need to convert this using DOS-style short mode. If the path
32098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32099  # take no chances and rewrite it.
32100  # Note: m4 eats our [], so we need to use [ and ] instead.
32101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32102  if test "x$has_forbidden_chars" != x; then
32103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32107      # Going to short mode and back again did indeed matter. Since short mode is
32108      # case insensitive, let's make it lowercase to improve readability.
32109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32110      # Now convert it back to Unix-style (cygpath)
32111      input_path=`$CYGPATH -u "$shortmode_path"`
32112      new_path="$input_path"
32113    fi
32114  fi
32115
32116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32117  if test "x$test_cygdrive_prefix" = x; then
32118    # As a simple fix, exclude /usr/bin since it's not a real path.
32119    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32121      # a path prefixed by /cygdrive for fixpath to work.
32122      new_path="$CYGWIN_ROOT_PATH$input_path"
32123    fi
32124  fi
32125
32126  # remove trailing .exe if any
32127  new_path="${new_path/%.exe/}"
32128
32129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32130
32131  # First separate the path from the arguments. This will split at the first
32132  # space.
32133  complete="$CXXCPP"
32134  path="${complete%% *}"
32135  tmp="$complete EOL"
32136  arguments="${tmp#* }"
32137
32138  # Input might be given as Windows format, start by converting to
32139  # unix format.
32140  new_path="$path"
32141
32142  windows_path="$new_path"
32143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32144    unix_path=`$CYGPATH -u "$windows_path"`
32145    new_path="$unix_path"
32146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32148    new_path="$unix_path"
32149  fi
32150
32151
32152  # Now try to locate executable using which
32153  new_path=`$WHICH "$new_path" 2> /dev/null`
32154
32155  if test "x$new_path" = x; then
32156    # Oops. Which didn't find the executable.
32157    # The splitting of arguments from the executable at a space might have been incorrect,
32158    # since paths with space are more likely in Windows. Give it another try with the whole
32159    # argument.
32160    path="$complete"
32161    arguments="EOL"
32162    new_path="$path"
32163
32164  windows_path="$new_path"
32165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32166    unix_path=`$CYGPATH -u "$windows_path"`
32167    new_path="$unix_path"
32168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32170    new_path="$unix_path"
32171  fi
32172
32173
32174    new_path=`$WHICH "$new_path" 2> /dev/null`
32175    # bat and cmd files are not always considered executable in MSYS causing which
32176    # to not find them
32177    if test "x$new_path" = x \
32178        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32179        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32180      new_path="$path"
32181
32182  windows_path="$new_path"
32183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32184    unix_path=`$CYGPATH -u "$windows_path"`
32185    new_path="$unix_path"
32186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32188    new_path="$unix_path"
32189  fi
32190
32191    fi
32192
32193    if test "x$new_path" = x; then
32194      # It's still not found. Now this is an unrecoverable error.
32195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32196$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32197      has_space=`$ECHO "$complete" | $GREP " "`
32198      if test "x$has_space" != x; then
32199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32201      fi
32202      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32203    fi
32204  fi
32205
32206  # Now new_path has a complete unix path to the binary
32207  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32208    # Keep paths in /bin as-is, but remove trailing .exe if any
32209    new_path="${new_path/%.exe/}"
32210    # Do not save /bin paths to all_fixpath_prefixes!
32211  else
32212    # Not in mixed or Windows style, start by that.
32213    new_path=`cmd //c echo $new_path`
32214
32215  input_path="$new_path"
32216  # Check if we need to convert this using DOS-style short mode. If the path
32217  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32218  # take no chances and rewrite it.
32219  # Note: m4 eats our [], so we need to use [ and ] instead.
32220  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32221  if test "x$has_forbidden_chars" != x; then
32222    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32223    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32224  fi
32225
32226    # Output is in $new_path
32227
32228  windows_path="$new_path"
32229  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32230    unix_path=`$CYGPATH -u "$windows_path"`
32231    new_path="$unix_path"
32232  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32233    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32234    new_path="$unix_path"
32235  fi
32236
32237    # remove trailing .exe if any
32238    new_path="${new_path/%.exe/}"
32239
32240    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32241    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32242  fi
32243
32244    else
32245      # We're on a unix platform. Hooray! :)
32246      # First separate the path from the arguments. This will split at the first
32247      # space.
32248      complete="$CXXCPP"
32249      path="${complete%% *}"
32250      tmp="$complete EOL"
32251      arguments="${tmp#* }"
32252
32253      # Cannot rely on the command "which" here since it doesn't always work.
32254      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32255      if test -z "$is_absolute_path"; then
32256        # Path to executable is not absolute. Find it.
32257        IFS_save="$IFS"
32258        IFS=:
32259        for p in $PATH; do
32260          if test -f "$p/$path" && test -x "$p/$path"; then
32261            new_path="$p/$path"
32262            break
32263          fi
32264        done
32265        IFS="$IFS_save"
32266      else
32267        # This is an absolute path, we can use it without further modifications.
32268        new_path="$path"
32269      fi
32270
32271      if test "x$new_path" = x; then
32272        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32273$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32274        has_space=`$ECHO "$complete" | $GREP " "`
32275        if test "x$has_space" != x; then
32276          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32277$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32278        fi
32279        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32280      fi
32281    fi
32282
32283    # Now join together the path and the arguments once again
32284    if test "x$arguments" != xEOL; then
32285      new_complete="$new_path ${arguments% *}"
32286    else
32287      new_complete="$new_path"
32288    fi
32289
32290    if test "x$complete" != "x$new_complete"; then
32291      CXXCPP="$new_complete"
32292      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32293$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32294    fi
32295  fi
32296
32297
32298  #
32299  # Setup the linker (LD)
32300  #
32301  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32302    # In the Microsoft toolchain we have a separate LD command "link".
32303    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32304    # a cygwin program for something completely different.
32305    # Extract the first word of "link", so it can be a program name with args.
32306set dummy link; ac_word=$2
32307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32308$as_echo_n "checking for $ac_word... " >&6; }
32309if ${ac_cv_prog_LD+:} false; then :
32310  $as_echo_n "(cached) " >&6
32311else
32312  if test -n "$LD"; then
32313  ac_cv_prog_LD="$LD" # Let the user override the test.
32314else
32315  ac_prog_rejected=no
32316as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32317for as_dir in $PATH
32318do
32319  IFS=$as_save_IFS
32320  test -z "$as_dir" && as_dir=.
32321    for ac_exec_ext in '' $ac_executable_extensions; do
32322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32323    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32324       ac_prog_rejected=yes
32325       continue
32326     fi
32327    ac_cv_prog_LD="link"
32328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32329    break 2
32330  fi
32331done
32332  done
32333IFS=$as_save_IFS
32334
32335if test $ac_prog_rejected = yes; then
32336  # We found a bogon in the path, so make sure we never use it.
32337  set dummy $ac_cv_prog_LD
32338  shift
32339  if test $# != 0; then
32340    # We chose a different compiler from the bogus one.
32341    # However, it has the same basename, so the bogon will be chosen
32342    # first if we set LD to just the basename; use the full file name.
32343    shift
32344    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32345  fi
32346fi
32347fi
32348fi
32349LD=$ac_cv_prog_LD
32350if test -n "$LD"; then
32351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32352$as_echo "$LD" >&6; }
32353else
32354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32355$as_echo "no" >&6; }
32356fi
32357
32358
32359
32360  # Only process if variable expands to non-empty
32361
32362  if test "x$LD" != x; then
32363    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32364
32365  # First separate the path from the arguments. This will split at the first
32366  # space.
32367  complete="$LD"
32368  path="${complete%% *}"
32369  tmp="$complete EOL"
32370  arguments="${tmp#* }"
32371
32372  # Input might be given as Windows format, start by converting to
32373  # unix format.
32374  new_path=`$CYGPATH -u "$path"`
32375
32376  # Now try to locate executable using which
32377  new_path=`$WHICH "$new_path" 2> /dev/null`
32378  # bat and cmd files are not always considered executable in cygwin causing which
32379  # to not find them
32380  if test "x$new_path" = x \
32381      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32382      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32383    new_path=`$CYGPATH -u "$path"`
32384  fi
32385  if test "x$new_path" = x; then
32386    # Oops. Which didn't find the executable.
32387    # The splitting of arguments from the executable at a space might have been incorrect,
32388    # since paths with space are more likely in Windows. Give it another try with the whole
32389    # argument.
32390    path="$complete"
32391    arguments="EOL"
32392    new_path=`$CYGPATH -u "$path"`
32393    new_path=`$WHICH "$new_path" 2> /dev/null`
32394    # bat and cmd files are not always considered executable in cygwin causing which
32395    # to not find them
32396    if test "x$new_path" = x \
32397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32399      new_path=`$CYGPATH -u "$path"`
32400    fi
32401    if test "x$new_path" = x; then
32402      # It's still not found. Now this is an unrecoverable error.
32403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32404$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32405      has_space=`$ECHO "$complete" | $GREP " "`
32406      if test "x$has_space" != x; then
32407        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32408$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32409      fi
32410      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32411    fi
32412  fi
32413
32414  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32415  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32416  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32417  # "foo.exe" is OK but "foo" is an error.
32418  #
32419  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32420  # It is also a way to make sure we got the proper file name for the real test later on.
32421  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32422  if test "x$test_shortpath" = x; then
32423    # Short path failed, file does not exist as specified.
32424    # Try adding .exe or .cmd
32425    if test -f "${new_path}.exe"; then
32426      input_to_shortpath="${new_path}.exe"
32427    elif test -f "${new_path}.cmd"; then
32428      input_to_shortpath="${new_path}.cmd"
32429    else
32430      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32431$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32432      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32433$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32434      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32435    fi
32436  else
32437    input_to_shortpath="$new_path"
32438  fi
32439
32440  # Call helper function which possibly converts this using DOS-style short mode.
32441  # If so, the updated path is stored in $new_path.
32442  new_path="$input_to_shortpath"
32443
32444  input_path="$input_to_shortpath"
32445  # Check if we need to convert this using DOS-style short mode. If the path
32446  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32447  # take no chances and rewrite it.
32448  # Note: m4 eats our [], so we need to use [ and ] instead.
32449  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32450  if test "x$has_forbidden_chars" != x; then
32451    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32452    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32453    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32454    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32455      # Going to short mode and back again did indeed matter. Since short mode is
32456      # case insensitive, let's make it lowercase to improve readability.
32457      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32458      # Now convert it back to Unix-style (cygpath)
32459      input_path=`$CYGPATH -u "$shortmode_path"`
32460      new_path="$input_path"
32461    fi
32462  fi
32463
32464  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32465  if test "x$test_cygdrive_prefix" = x; then
32466    # As a simple fix, exclude /usr/bin since it's not a real path.
32467    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32468      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32469      # a path prefixed by /cygdrive for fixpath to work.
32470      new_path="$CYGWIN_ROOT_PATH$input_path"
32471    fi
32472  fi
32473
32474  # remove trailing .exe if any
32475  new_path="${new_path/%.exe/}"
32476
32477    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32478
32479  # First separate the path from the arguments. This will split at the first
32480  # space.
32481  complete="$LD"
32482  path="${complete%% *}"
32483  tmp="$complete EOL"
32484  arguments="${tmp#* }"
32485
32486  # Input might be given as Windows format, start by converting to
32487  # unix format.
32488  new_path="$path"
32489
32490  windows_path="$new_path"
32491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32492    unix_path=`$CYGPATH -u "$windows_path"`
32493    new_path="$unix_path"
32494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32496    new_path="$unix_path"
32497  fi
32498
32499
32500  # Now try to locate executable using which
32501  new_path=`$WHICH "$new_path" 2> /dev/null`
32502
32503  if test "x$new_path" = x; then
32504    # Oops. Which didn't find the executable.
32505    # The splitting of arguments from the executable at a space might have been incorrect,
32506    # since paths with space are more likely in Windows. Give it another try with the whole
32507    # argument.
32508    path="$complete"
32509    arguments="EOL"
32510    new_path="$path"
32511
32512  windows_path="$new_path"
32513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32514    unix_path=`$CYGPATH -u "$windows_path"`
32515    new_path="$unix_path"
32516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32517    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32518    new_path="$unix_path"
32519  fi
32520
32521
32522    new_path=`$WHICH "$new_path" 2> /dev/null`
32523    # bat and cmd files are not always considered executable in MSYS causing which
32524    # to not find them
32525    if test "x$new_path" = x \
32526        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32527        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32528      new_path="$path"
32529
32530  windows_path="$new_path"
32531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32532    unix_path=`$CYGPATH -u "$windows_path"`
32533    new_path="$unix_path"
32534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32536    new_path="$unix_path"
32537  fi
32538
32539    fi
32540
32541    if test "x$new_path" = x; then
32542      # It's still not found. Now this is an unrecoverable error.
32543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32544$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32545      has_space=`$ECHO "$complete" | $GREP " "`
32546      if test "x$has_space" != x; then
32547        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32548$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32549      fi
32550      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32551    fi
32552  fi
32553
32554  # Now new_path has a complete unix path to the binary
32555  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32556    # Keep paths in /bin as-is, but remove trailing .exe if any
32557    new_path="${new_path/%.exe/}"
32558    # Do not save /bin paths to all_fixpath_prefixes!
32559  else
32560    # Not in mixed or Windows style, start by that.
32561    new_path=`cmd //c echo $new_path`
32562
32563  input_path="$new_path"
32564  # Check if we need to convert this using DOS-style short mode. If the path
32565  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32566  # take no chances and rewrite it.
32567  # Note: m4 eats our [], so we need to use [ and ] instead.
32568  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32569  if test "x$has_forbidden_chars" != x; then
32570    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32571    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32572  fi
32573
32574    # Output is in $new_path
32575
32576  windows_path="$new_path"
32577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32578    unix_path=`$CYGPATH -u "$windows_path"`
32579    new_path="$unix_path"
32580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32582    new_path="$unix_path"
32583  fi
32584
32585    # remove trailing .exe if any
32586    new_path="${new_path/%.exe/}"
32587
32588    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32589    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32590  fi
32591
32592    else
32593      # We're on a unix platform. Hooray! :)
32594      # First separate the path from the arguments. This will split at the first
32595      # space.
32596      complete="$LD"
32597      path="${complete%% *}"
32598      tmp="$complete EOL"
32599      arguments="${tmp#* }"
32600
32601      # Cannot rely on the command "which" here since it doesn't always work.
32602      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32603      if test -z "$is_absolute_path"; then
32604        # Path to executable is not absolute. Find it.
32605        IFS_save="$IFS"
32606        IFS=:
32607        for p in $PATH; do
32608          if test -f "$p/$path" && test -x "$p/$path"; then
32609            new_path="$p/$path"
32610            break
32611          fi
32612        done
32613        IFS="$IFS_save"
32614      else
32615        # This is an absolute path, we can use it without further modifications.
32616        new_path="$path"
32617      fi
32618
32619      if test "x$new_path" = x; then
32620        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32621$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32622        has_space=`$ECHO "$complete" | $GREP " "`
32623        if test "x$has_space" != x; then
32624          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32625$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32626        fi
32627        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32628      fi
32629    fi
32630
32631    # Now join together the path and the arguments once again
32632    if test "x$arguments" != xEOL; then
32633      new_complete="$new_path ${arguments% *}"
32634    else
32635      new_complete="$new_path"
32636    fi
32637
32638    if test "x$complete" != "x$new_complete"; then
32639      LD="$new_complete"
32640      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32641$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32642    fi
32643  fi
32644
32645    # Verify that we indeed succeeded with this trick.
32646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32647$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32648    "$LD" --version > /dev/null
32649    if test $? -eq 0 ; then
32650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32651$as_echo "no" >&6; }
32652      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32653    else
32654      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32655$as_echo "yes" >&6; }
32656    fi
32657    LDCXX="$LD"
32658  else
32659    # All other toolchains use the compiler to link.
32660    LD="$CC"
32661    LDCXX="$CXX"
32662  fi
32663
32664  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32665
32666
32667  #
32668  # Setup the assembler (AS)
32669  #
32670  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32671    # FIXME: should this really be solaris, or solstudio?
32672
32673
32674  # Publish this variable in the help.
32675
32676
32677  if test "x$AS" = x; then
32678    # The variable is not set by user, try to locate tool using the code snippet
32679    for ac_prog in as
32680do
32681  # Extract the first word of "$ac_prog", so it can be a program name with args.
32682set dummy $ac_prog; ac_word=$2
32683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32684$as_echo_n "checking for $ac_word... " >&6; }
32685if ${ac_cv_path_AS+:} false; then :
32686  $as_echo_n "(cached) " >&6
32687else
32688  case $AS in
32689  [\\/]* | ?:[\\/]*)
32690  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32691  ;;
32692  *)
32693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32694for as_dir in $PATH
32695do
32696  IFS=$as_save_IFS
32697  test -z "$as_dir" && as_dir=.
32698    for ac_exec_ext in '' $ac_executable_extensions; do
32699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32700    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32702    break 2
32703  fi
32704done
32705  done
32706IFS=$as_save_IFS
32707
32708  ;;
32709esac
32710fi
32711AS=$ac_cv_path_AS
32712if test -n "$AS"; then
32713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32714$as_echo "$AS" >&6; }
32715else
32716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32717$as_echo "no" >&6; }
32718fi
32719
32720
32721  test -n "$AS" && break
32722done
32723
32724  else
32725    # The variable is set, but is it from the command line or the environment?
32726
32727    # Try to remove the string !AS! from our list.
32728    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32729    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32730      # If it failed, the variable was not from the command line. Ignore it,
32731      # but warn the user (except for BASH, which is always set by the calling BASH).
32732      if test "xAS" != xBASH; then
32733        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32734$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32735      fi
32736      # Try to locate tool using the code snippet
32737      for ac_prog in as
32738do
32739  # Extract the first word of "$ac_prog", so it can be a program name with args.
32740set dummy $ac_prog; ac_word=$2
32741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32742$as_echo_n "checking for $ac_word... " >&6; }
32743if ${ac_cv_path_AS+:} false; then :
32744  $as_echo_n "(cached) " >&6
32745else
32746  case $AS in
32747  [\\/]* | ?:[\\/]*)
32748  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32749  ;;
32750  *)
32751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32752for as_dir in $PATH
32753do
32754  IFS=$as_save_IFS
32755  test -z "$as_dir" && as_dir=.
32756    for ac_exec_ext in '' $ac_executable_extensions; do
32757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32758    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32760    break 2
32761  fi
32762done
32763  done
32764IFS=$as_save_IFS
32765
32766  ;;
32767esac
32768fi
32769AS=$ac_cv_path_AS
32770if test -n "$AS"; then
32771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32772$as_echo "$AS" >&6; }
32773else
32774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32775$as_echo "no" >&6; }
32776fi
32777
32778
32779  test -n "$AS" && break
32780done
32781
32782    else
32783      # If it succeeded, then it was overridden by the user. We will use it
32784      # for the tool.
32785
32786      # First remove it from the list of overridden variables, so we can test
32787      # for unknown variables in the end.
32788      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32789
32790      # Check if the provided tool contains a complete path.
32791      tool_specified="$AS"
32792      tool_basename="${tool_specified##*/}"
32793      if test "x$tool_basename" = "x$tool_specified"; then
32794        # A command without a complete path is provided, search $PATH.
32795        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32796$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32797        # Extract the first word of "$tool_basename", so it can be a program name with args.
32798set dummy $tool_basename; ac_word=$2
32799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32800$as_echo_n "checking for $ac_word... " >&6; }
32801if ${ac_cv_path_AS+:} false; then :
32802  $as_echo_n "(cached) " >&6
32803else
32804  case $AS in
32805  [\\/]* | ?:[\\/]*)
32806  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32807  ;;
32808  *)
32809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32810for as_dir in $PATH
32811do
32812  IFS=$as_save_IFS
32813  test -z "$as_dir" && as_dir=.
32814    for ac_exec_ext in '' $ac_executable_extensions; do
32815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32816    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32818    break 2
32819  fi
32820done
32821  done
32822IFS=$as_save_IFS
32823
32824  ;;
32825esac
32826fi
32827AS=$ac_cv_path_AS
32828if test -n "$AS"; then
32829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32830$as_echo "$AS" >&6; }
32831else
32832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32833$as_echo "no" >&6; }
32834fi
32835
32836
32837        if test "x$AS" = x; then
32838          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32839        fi
32840      else
32841        # Otherwise we believe it is a complete path. Use it as it is.
32842        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32843$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32844        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32845$as_echo_n "checking for AS... " >&6; }
32846        if test ! -x "$tool_specified"; then
32847          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32848$as_echo "not found" >&6; }
32849          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32850        fi
32851        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32852$as_echo "$tool_specified" >&6; }
32853      fi
32854    fi
32855  fi
32856
32857
32858
32859  # Only process if variable expands to non-empty
32860
32861  if test "x$AS" != x; then
32862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32863
32864  # First separate the path from the arguments. This will split at the first
32865  # space.
32866  complete="$AS"
32867  path="${complete%% *}"
32868  tmp="$complete EOL"
32869  arguments="${tmp#* }"
32870
32871  # Input might be given as Windows format, start by converting to
32872  # unix format.
32873  new_path=`$CYGPATH -u "$path"`
32874
32875  # Now try to locate executable using which
32876  new_path=`$WHICH "$new_path" 2> /dev/null`
32877  # bat and cmd files are not always considered executable in cygwin causing which
32878  # to not find them
32879  if test "x$new_path" = x \
32880      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32881      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32882    new_path=`$CYGPATH -u "$path"`
32883  fi
32884  if test "x$new_path" = x; then
32885    # Oops. Which didn't find the executable.
32886    # The splitting of arguments from the executable at a space might have been incorrect,
32887    # since paths with space are more likely in Windows. Give it another try with the whole
32888    # argument.
32889    path="$complete"
32890    arguments="EOL"
32891    new_path=`$CYGPATH -u "$path"`
32892    new_path=`$WHICH "$new_path" 2> /dev/null`
32893    # bat and cmd files are not always considered executable in cygwin causing which
32894    # to not find them
32895    if test "x$new_path" = x \
32896        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32897        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32898      new_path=`$CYGPATH -u "$path"`
32899    fi
32900    if test "x$new_path" = x; then
32901      # It's still not found. Now this is an unrecoverable error.
32902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32903$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32904      has_space=`$ECHO "$complete" | $GREP " "`
32905      if test "x$has_space" != x; then
32906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32908      fi
32909      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32910    fi
32911  fi
32912
32913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32916  # "foo.exe" is OK but "foo" is an error.
32917  #
32918  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32919  # It is also a way to make sure we got the proper file name for the real test later on.
32920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32921  if test "x$test_shortpath" = x; then
32922    # Short path failed, file does not exist as specified.
32923    # Try adding .exe or .cmd
32924    if test -f "${new_path}.exe"; then
32925      input_to_shortpath="${new_path}.exe"
32926    elif test -f "${new_path}.cmd"; then
32927      input_to_shortpath="${new_path}.cmd"
32928    else
32929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32930$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32931      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32932$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32933      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32934    fi
32935  else
32936    input_to_shortpath="$new_path"
32937  fi
32938
32939  # Call helper function which possibly converts this using DOS-style short mode.
32940  # If so, the updated path is stored in $new_path.
32941  new_path="$input_to_shortpath"
32942
32943  input_path="$input_to_shortpath"
32944  # Check if we need to convert this using DOS-style short mode. If the path
32945  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32946  # take no chances and rewrite it.
32947  # Note: m4 eats our [], so we need to use [ and ] instead.
32948  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32949  if test "x$has_forbidden_chars" != x; then
32950    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32951    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32952    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32953    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32954      # Going to short mode and back again did indeed matter. Since short mode is
32955      # case insensitive, let's make it lowercase to improve readability.
32956      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32957      # Now convert it back to Unix-style (cygpath)
32958      input_path=`$CYGPATH -u "$shortmode_path"`
32959      new_path="$input_path"
32960    fi
32961  fi
32962
32963  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32964  if test "x$test_cygdrive_prefix" = x; then
32965    # As a simple fix, exclude /usr/bin since it's not a real path.
32966    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32967      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32968      # a path prefixed by /cygdrive for fixpath to work.
32969      new_path="$CYGWIN_ROOT_PATH$input_path"
32970    fi
32971  fi
32972
32973  # remove trailing .exe if any
32974  new_path="${new_path/%.exe/}"
32975
32976    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32977
32978  # First separate the path from the arguments. This will split at the first
32979  # space.
32980  complete="$AS"
32981  path="${complete%% *}"
32982  tmp="$complete EOL"
32983  arguments="${tmp#* }"
32984
32985  # Input might be given as Windows format, start by converting to
32986  # unix format.
32987  new_path="$path"
32988
32989  windows_path="$new_path"
32990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32991    unix_path=`$CYGPATH -u "$windows_path"`
32992    new_path="$unix_path"
32993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32995    new_path="$unix_path"
32996  fi
32997
32998
32999  # Now try to locate executable using which
33000  new_path=`$WHICH "$new_path" 2> /dev/null`
33001
33002  if test "x$new_path" = x; then
33003    # Oops. Which didn't find the executable.
33004    # The splitting of arguments from the executable at a space might have been incorrect,
33005    # since paths with space are more likely in Windows. Give it another try with the whole
33006    # argument.
33007    path="$complete"
33008    arguments="EOL"
33009    new_path="$path"
33010
33011  windows_path="$new_path"
33012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33013    unix_path=`$CYGPATH -u "$windows_path"`
33014    new_path="$unix_path"
33015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33017    new_path="$unix_path"
33018  fi
33019
33020
33021    new_path=`$WHICH "$new_path" 2> /dev/null`
33022    # bat and cmd files are not always considered executable in MSYS causing which
33023    # to not find them
33024    if test "x$new_path" = x \
33025        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33026        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33027      new_path="$path"
33028
33029  windows_path="$new_path"
33030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33031    unix_path=`$CYGPATH -u "$windows_path"`
33032    new_path="$unix_path"
33033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33035    new_path="$unix_path"
33036  fi
33037
33038    fi
33039
33040    if test "x$new_path" = x; then
33041      # It's still not found. Now this is an unrecoverable error.
33042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33043$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33044      has_space=`$ECHO "$complete" | $GREP " "`
33045      if test "x$has_space" != x; then
33046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33048      fi
33049      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33050    fi
33051  fi
33052
33053  # Now new_path has a complete unix path to the binary
33054  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33055    # Keep paths in /bin as-is, but remove trailing .exe if any
33056    new_path="${new_path/%.exe/}"
33057    # Do not save /bin paths to all_fixpath_prefixes!
33058  else
33059    # Not in mixed or Windows style, start by that.
33060    new_path=`cmd //c echo $new_path`
33061
33062  input_path="$new_path"
33063  # Check if we need to convert this using DOS-style short mode. If the path
33064  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33065  # take no chances and rewrite it.
33066  # Note: m4 eats our [], so we need to use [ and ] instead.
33067  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33068  if test "x$has_forbidden_chars" != x; then
33069    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33070    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33071  fi
33072
33073    # Output is in $new_path
33074
33075  windows_path="$new_path"
33076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33077    unix_path=`$CYGPATH -u "$windows_path"`
33078    new_path="$unix_path"
33079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33081    new_path="$unix_path"
33082  fi
33083
33084    # remove trailing .exe if any
33085    new_path="${new_path/%.exe/}"
33086
33087    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33088    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33089  fi
33090
33091    else
33092      # We're on a unix platform. Hooray! :)
33093      # First separate the path from the arguments. This will split at the first
33094      # space.
33095      complete="$AS"
33096      path="${complete%% *}"
33097      tmp="$complete EOL"
33098      arguments="${tmp#* }"
33099
33100      # Cannot rely on the command "which" here since it doesn't always work.
33101      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33102      if test -z "$is_absolute_path"; then
33103        # Path to executable is not absolute. Find it.
33104        IFS_save="$IFS"
33105        IFS=:
33106        for p in $PATH; do
33107          if test -f "$p/$path" && test -x "$p/$path"; then
33108            new_path="$p/$path"
33109            break
33110          fi
33111        done
33112        IFS="$IFS_save"
33113      else
33114        # This is an absolute path, we can use it without further modifications.
33115        new_path="$path"
33116      fi
33117
33118      if test "x$new_path" = x; then
33119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
33120$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
33121        has_space=`$ECHO "$complete" | $GREP " "`
33122        if test "x$has_space" != x; then
33123          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33124$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33125        fi
33126        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
33127      fi
33128    fi
33129
33130    # Now join together the path and the arguments once again
33131    if test "x$arguments" != xEOL; then
33132      new_complete="$new_path ${arguments% *}"
33133    else
33134      new_complete="$new_path"
33135    fi
33136
33137    if test "x$complete" != "x$new_complete"; then
33138      AS="$new_complete"
33139      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
33140$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
33141    fi
33142  fi
33143
33144  else
33145    # FIXME: is this correct for microsoft?
33146    AS="$CC -c"
33147  fi
33148
33149
33150  #
33151  # Setup the archiver (AR)
33152  #
33153  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33154    # The corresponding ar tool is lib.exe (used to create static libraries)
33155    # Extract the first word of "lib", so it can be a program name with args.
33156set dummy lib; ac_word=$2
33157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33158$as_echo_n "checking for $ac_word... " >&6; }
33159if ${ac_cv_prog_AR+:} false; then :
33160  $as_echo_n "(cached) " >&6
33161else
33162  if test -n "$AR"; then
33163  ac_cv_prog_AR="$AR" # Let the user override the test.
33164else
33165as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33166for as_dir in $PATH
33167do
33168  IFS=$as_save_IFS
33169  test -z "$as_dir" && as_dir=.
33170    for ac_exec_ext in '' $ac_executable_extensions; do
33171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33172    ac_cv_prog_AR="lib"
33173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33174    break 2
33175  fi
33176done
33177  done
33178IFS=$as_save_IFS
33179
33180fi
33181fi
33182AR=$ac_cv_prog_AR
33183if test -n "$AR"; then
33184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33185$as_echo "$AR" >&6; }
33186else
33187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33188$as_echo "no" >&6; }
33189fi
33190
33191
33192  else
33193
33194
33195  # Publish this variable in the help.
33196
33197
33198  if test "x$AR" = x; then
33199    # The variable is not set by user, try to locate tool using the code snippet
33200    if test -n "$ac_tool_prefix"; then
33201  for ac_prog in ar
33202  do
33203    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33204set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33206$as_echo_n "checking for $ac_word... " >&6; }
33207if ${ac_cv_prog_AR+:} false; then :
33208  $as_echo_n "(cached) " >&6
33209else
33210  if test -n "$AR"; then
33211  ac_cv_prog_AR="$AR" # Let the user override the test.
33212else
33213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33214for as_dir in $PATH
33215do
33216  IFS=$as_save_IFS
33217  test -z "$as_dir" && as_dir=.
33218    for ac_exec_ext in '' $ac_executable_extensions; do
33219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33220    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33222    break 2
33223  fi
33224done
33225  done
33226IFS=$as_save_IFS
33227
33228fi
33229fi
33230AR=$ac_cv_prog_AR
33231if test -n "$AR"; then
33232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33233$as_echo "$AR" >&6; }
33234else
33235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33236$as_echo "no" >&6; }
33237fi
33238
33239
33240    test -n "$AR" && break
33241  done
33242fi
33243if test -z "$AR"; then
33244  ac_ct_AR=$AR
33245  for ac_prog in ar
33246do
33247  # Extract the first word of "$ac_prog", so it can be a program name with args.
33248set dummy $ac_prog; ac_word=$2
33249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33250$as_echo_n "checking for $ac_word... " >&6; }
33251if ${ac_cv_prog_ac_ct_AR+:} false; then :
33252  $as_echo_n "(cached) " >&6
33253else
33254  if test -n "$ac_ct_AR"; then
33255  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33256else
33257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33258for as_dir in $PATH
33259do
33260  IFS=$as_save_IFS
33261  test -z "$as_dir" && as_dir=.
33262    for ac_exec_ext in '' $ac_executable_extensions; do
33263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33264    ac_cv_prog_ac_ct_AR="$ac_prog"
33265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33266    break 2
33267  fi
33268done
33269  done
33270IFS=$as_save_IFS
33271
33272fi
33273fi
33274ac_ct_AR=$ac_cv_prog_ac_ct_AR
33275if test -n "$ac_ct_AR"; then
33276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33277$as_echo "$ac_ct_AR" >&6; }
33278else
33279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33280$as_echo "no" >&6; }
33281fi
33282
33283
33284  test -n "$ac_ct_AR" && break
33285done
33286
33287  if test "x$ac_ct_AR" = x; then
33288    AR=""
33289  else
33290    case $cross_compiling:$ac_tool_warned in
33291yes:)
33292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33294ac_tool_warned=yes ;;
33295esac
33296    AR=$ac_ct_AR
33297  fi
33298fi
33299
33300  else
33301    # The variable is set, but is it from the command line or the environment?
33302
33303    # Try to remove the string !AR! from our list.
33304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33306      # If it failed, the variable was not from the command line. Ignore it,
33307      # but warn the user (except for BASH, which is always set by the calling BASH).
33308      if test "xAR" != xBASH; then
33309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33310$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33311      fi
33312      # Try to locate tool using the code snippet
33313      if test -n "$ac_tool_prefix"; then
33314  for ac_prog in ar
33315  do
33316    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33317set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33319$as_echo_n "checking for $ac_word... " >&6; }
33320if ${ac_cv_prog_AR+:} false; then :
33321  $as_echo_n "(cached) " >&6
33322else
33323  if test -n "$AR"; then
33324  ac_cv_prog_AR="$AR" # Let the user override the test.
33325else
33326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33327for as_dir in $PATH
33328do
33329  IFS=$as_save_IFS
33330  test -z "$as_dir" && as_dir=.
33331    for ac_exec_ext in '' $ac_executable_extensions; do
33332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33333    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33335    break 2
33336  fi
33337done
33338  done
33339IFS=$as_save_IFS
33340
33341fi
33342fi
33343AR=$ac_cv_prog_AR
33344if test -n "$AR"; then
33345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33346$as_echo "$AR" >&6; }
33347else
33348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33349$as_echo "no" >&6; }
33350fi
33351
33352
33353    test -n "$AR" && break
33354  done
33355fi
33356if test -z "$AR"; then
33357  ac_ct_AR=$AR
33358  for ac_prog in ar
33359do
33360  # Extract the first word of "$ac_prog", so it can be a program name with args.
33361set dummy $ac_prog; ac_word=$2
33362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33363$as_echo_n "checking for $ac_word... " >&6; }
33364if ${ac_cv_prog_ac_ct_AR+:} false; then :
33365  $as_echo_n "(cached) " >&6
33366else
33367  if test -n "$ac_ct_AR"; then
33368  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33369else
33370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33371for as_dir in $PATH
33372do
33373  IFS=$as_save_IFS
33374  test -z "$as_dir" && as_dir=.
33375    for ac_exec_ext in '' $ac_executable_extensions; do
33376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33377    ac_cv_prog_ac_ct_AR="$ac_prog"
33378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33379    break 2
33380  fi
33381done
33382  done
33383IFS=$as_save_IFS
33384
33385fi
33386fi
33387ac_ct_AR=$ac_cv_prog_ac_ct_AR
33388if test -n "$ac_ct_AR"; then
33389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33390$as_echo "$ac_ct_AR" >&6; }
33391else
33392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33393$as_echo "no" >&6; }
33394fi
33395
33396
33397  test -n "$ac_ct_AR" && break
33398done
33399
33400  if test "x$ac_ct_AR" = x; then
33401    AR=""
33402  else
33403    case $cross_compiling:$ac_tool_warned in
33404yes:)
33405{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33406$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33407ac_tool_warned=yes ;;
33408esac
33409    AR=$ac_ct_AR
33410  fi
33411fi
33412
33413    else
33414      # If it succeeded, then it was overridden by the user. We will use it
33415      # for the tool.
33416
33417      # First remove it from the list of overridden variables, so we can test
33418      # for unknown variables in the end.
33419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33420
33421      # Check if the provided tool contains a complete path.
33422      tool_specified="$AR"
33423      tool_basename="${tool_specified##*/}"
33424      if test "x$tool_basename" = "x$tool_specified"; then
33425        # A command without a complete path is provided, search $PATH.
33426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33427$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33428        # Extract the first word of "$tool_basename", so it can be a program name with args.
33429set dummy $tool_basename; ac_word=$2
33430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33431$as_echo_n "checking for $ac_word... " >&6; }
33432if ${ac_cv_path_AR+:} false; then :
33433  $as_echo_n "(cached) " >&6
33434else
33435  case $AR in
33436  [\\/]* | ?:[\\/]*)
33437  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33438  ;;
33439  *)
33440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33441for as_dir in $PATH
33442do
33443  IFS=$as_save_IFS
33444  test -z "$as_dir" && as_dir=.
33445    for ac_exec_ext in '' $ac_executable_extensions; do
33446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33447    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33449    break 2
33450  fi
33451done
33452  done
33453IFS=$as_save_IFS
33454
33455  ;;
33456esac
33457fi
33458AR=$ac_cv_path_AR
33459if test -n "$AR"; then
33460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33461$as_echo "$AR" >&6; }
33462else
33463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33464$as_echo "no" >&6; }
33465fi
33466
33467
33468        if test "x$AR" = x; then
33469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33470        fi
33471      else
33472        # Otherwise we believe it is a complete path. Use it as it is.
33473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33474$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33476$as_echo_n "checking for AR... " >&6; }
33477        if test ! -x "$tool_specified"; then
33478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33479$as_echo "not found" >&6; }
33480          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33481        fi
33482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33483$as_echo "$tool_specified" >&6; }
33484      fi
33485    fi
33486  fi
33487
33488
33489  fi
33490
33491  # Only process if variable expands to non-empty
33492
33493  if test "x$AR" != x; then
33494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33495
33496  # First separate the path from the arguments. This will split at the first
33497  # space.
33498  complete="$AR"
33499  path="${complete%% *}"
33500  tmp="$complete EOL"
33501  arguments="${tmp#* }"
33502
33503  # Input might be given as Windows format, start by converting to
33504  # unix format.
33505  new_path=`$CYGPATH -u "$path"`
33506
33507  # Now try to locate executable using which
33508  new_path=`$WHICH "$new_path" 2> /dev/null`
33509  # bat and cmd files are not always considered executable in cygwin causing which
33510  # to not find them
33511  if test "x$new_path" = x \
33512      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33513      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33514    new_path=`$CYGPATH -u "$path"`
33515  fi
33516  if test "x$new_path" = x; then
33517    # Oops. Which didn't find the executable.
33518    # The splitting of arguments from the executable at a space might have been incorrect,
33519    # since paths with space are more likely in Windows. Give it another try with the whole
33520    # argument.
33521    path="$complete"
33522    arguments="EOL"
33523    new_path=`$CYGPATH -u "$path"`
33524    new_path=`$WHICH "$new_path" 2> /dev/null`
33525    # bat and cmd files are not always considered executable in cygwin causing which
33526    # to not find them
33527    if test "x$new_path" = x \
33528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33530      new_path=`$CYGPATH -u "$path"`
33531    fi
33532    if test "x$new_path" = x; then
33533      # It's still not found. Now this is an unrecoverable error.
33534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33535$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33536      has_space=`$ECHO "$complete" | $GREP " "`
33537      if test "x$has_space" != x; then
33538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33540      fi
33541      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33542    fi
33543  fi
33544
33545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33548  # "foo.exe" is OK but "foo" is an error.
33549  #
33550  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33551  # It is also a way to make sure we got the proper file name for the real test later on.
33552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33553  if test "x$test_shortpath" = x; then
33554    # Short path failed, file does not exist as specified.
33555    # Try adding .exe or .cmd
33556    if test -f "${new_path}.exe"; then
33557      input_to_shortpath="${new_path}.exe"
33558    elif test -f "${new_path}.cmd"; then
33559      input_to_shortpath="${new_path}.cmd"
33560    else
33561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33562$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33565      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33566    fi
33567  else
33568    input_to_shortpath="$new_path"
33569  fi
33570
33571  # Call helper function which possibly converts this using DOS-style short mode.
33572  # If so, the updated path is stored in $new_path.
33573  new_path="$input_to_shortpath"
33574
33575  input_path="$input_to_shortpath"
33576  # Check if we need to convert this using DOS-style short mode. If the path
33577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33578  # take no chances and rewrite it.
33579  # Note: m4 eats our [], so we need to use [ and ] instead.
33580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33581  if test "x$has_forbidden_chars" != x; then
33582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33586      # Going to short mode and back again did indeed matter. Since short mode is
33587      # case insensitive, let's make it lowercase to improve readability.
33588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33589      # Now convert it back to Unix-style (cygpath)
33590      input_path=`$CYGPATH -u "$shortmode_path"`
33591      new_path="$input_path"
33592    fi
33593  fi
33594
33595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33596  if test "x$test_cygdrive_prefix" = x; then
33597    # As a simple fix, exclude /usr/bin since it's not a real path.
33598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33600      # a path prefixed by /cygdrive for fixpath to work.
33601      new_path="$CYGWIN_ROOT_PATH$input_path"
33602    fi
33603  fi
33604
33605  # remove trailing .exe if any
33606  new_path="${new_path/%.exe/}"
33607
33608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33609
33610  # First separate the path from the arguments. This will split at the first
33611  # space.
33612  complete="$AR"
33613  path="${complete%% *}"
33614  tmp="$complete EOL"
33615  arguments="${tmp#* }"
33616
33617  # Input might be given as Windows format, start by converting to
33618  # unix format.
33619  new_path="$path"
33620
33621  windows_path="$new_path"
33622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33623    unix_path=`$CYGPATH -u "$windows_path"`
33624    new_path="$unix_path"
33625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33627    new_path="$unix_path"
33628  fi
33629
33630
33631  # Now try to locate executable using which
33632  new_path=`$WHICH "$new_path" 2> /dev/null`
33633
33634  if test "x$new_path" = x; then
33635    # Oops. Which didn't find the executable.
33636    # The splitting of arguments from the executable at a space might have been incorrect,
33637    # since paths with space are more likely in Windows. Give it another try with the whole
33638    # argument.
33639    path="$complete"
33640    arguments="EOL"
33641    new_path="$path"
33642
33643  windows_path="$new_path"
33644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33645    unix_path=`$CYGPATH -u "$windows_path"`
33646    new_path="$unix_path"
33647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33649    new_path="$unix_path"
33650  fi
33651
33652
33653    new_path=`$WHICH "$new_path" 2> /dev/null`
33654    # bat and cmd files are not always considered executable in MSYS causing which
33655    # to not find them
33656    if test "x$new_path" = x \
33657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33659      new_path="$path"
33660
33661  windows_path="$new_path"
33662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33663    unix_path=`$CYGPATH -u "$windows_path"`
33664    new_path="$unix_path"
33665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33667    new_path="$unix_path"
33668  fi
33669
33670    fi
33671
33672    if test "x$new_path" = x; then
33673      # It's still not found. Now this is an unrecoverable error.
33674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33675$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33676      has_space=`$ECHO "$complete" | $GREP " "`
33677      if test "x$has_space" != x; then
33678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33680      fi
33681      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33682    fi
33683  fi
33684
33685  # Now new_path has a complete unix path to the binary
33686  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33687    # Keep paths in /bin as-is, but remove trailing .exe if any
33688    new_path="${new_path/%.exe/}"
33689    # Do not save /bin paths to all_fixpath_prefixes!
33690  else
33691    # Not in mixed or Windows style, start by that.
33692    new_path=`cmd //c echo $new_path`
33693
33694  input_path="$new_path"
33695  # Check if we need to convert this using DOS-style short mode. If the path
33696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33697  # take no chances and rewrite it.
33698  # Note: m4 eats our [], so we need to use [ and ] instead.
33699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33700  if test "x$has_forbidden_chars" != x; then
33701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33703  fi
33704
33705    # Output is in $new_path
33706
33707  windows_path="$new_path"
33708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33709    unix_path=`$CYGPATH -u "$windows_path"`
33710    new_path="$unix_path"
33711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33713    new_path="$unix_path"
33714  fi
33715
33716    # remove trailing .exe if any
33717    new_path="${new_path/%.exe/}"
33718
33719    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33720    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33721  fi
33722
33723    else
33724      # We're on a unix platform. Hooray! :)
33725      # First separate the path from the arguments. This will split at the first
33726      # space.
33727      complete="$AR"
33728      path="${complete%% *}"
33729      tmp="$complete EOL"
33730      arguments="${tmp#* }"
33731
33732      # Cannot rely on the command "which" here since it doesn't always work.
33733      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33734      if test -z "$is_absolute_path"; then
33735        # Path to executable is not absolute. Find it.
33736        IFS_save="$IFS"
33737        IFS=:
33738        for p in $PATH; do
33739          if test -f "$p/$path" && test -x "$p/$path"; then
33740            new_path="$p/$path"
33741            break
33742          fi
33743        done
33744        IFS="$IFS_save"
33745      else
33746        # This is an absolute path, we can use it without further modifications.
33747        new_path="$path"
33748      fi
33749
33750      if test "x$new_path" = x; then
33751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33752$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33753        has_space=`$ECHO "$complete" | $GREP " "`
33754        if test "x$has_space" != x; then
33755          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33756$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33757        fi
33758        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33759      fi
33760    fi
33761
33762    # Now join together the path and the arguments once again
33763    if test "x$arguments" != xEOL; then
33764      new_complete="$new_path ${arguments% *}"
33765    else
33766      new_complete="$new_path"
33767    fi
33768
33769    if test "x$complete" != "x$new_complete"; then
33770      AR="$new_complete"
33771      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33772$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33773    fi
33774  fi
33775
33776
33777
33778  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33779
33780
33781  # Publish this variable in the help.
33782
33783
33784  if test "x$LIPO" = x; then
33785    # The variable is not set by user, try to locate tool using the code snippet
33786    for ac_prog in lipo
33787do
33788  # Extract the first word of "$ac_prog", so it can be a program name with args.
33789set dummy $ac_prog; ac_word=$2
33790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33791$as_echo_n "checking for $ac_word... " >&6; }
33792if ${ac_cv_path_LIPO+:} false; then :
33793  $as_echo_n "(cached) " >&6
33794else
33795  case $LIPO in
33796  [\\/]* | ?:[\\/]*)
33797  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33798  ;;
33799  *)
33800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33801for as_dir in $PATH
33802do
33803  IFS=$as_save_IFS
33804  test -z "$as_dir" && as_dir=.
33805    for ac_exec_ext in '' $ac_executable_extensions; do
33806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33807    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33809    break 2
33810  fi
33811done
33812  done
33813IFS=$as_save_IFS
33814
33815  ;;
33816esac
33817fi
33818LIPO=$ac_cv_path_LIPO
33819if test -n "$LIPO"; then
33820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33821$as_echo "$LIPO" >&6; }
33822else
33823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33824$as_echo "no" >&6; }
33825fi
33826
33827
33828  test -n "$LIPO" && break
33829done
33830
33831  else
33832    # The variable is set, but is it from the command line or the environment?
33833
33834    # Try to remove the string !LIPO! from our list.
33835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33837      # If it failed, the variable was not from the command line. Ignore it,
33838      # but warn the user (except for BASH, which is always set by the calling BASH).
33839      if test "xLIPO" != xBASH; then
33840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33841$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33842      fi
33843      # Try to locate tool using the code snippet
33844      for ac_prog in lipo
33845do
33846  # Extract the first word of "$ac_prog", so it can be a program name with args.
33847set dummy $ac_prog; ac_word=$2
33848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33849$as_echo_n "checking for $ac_word... " >&6; }
33850if ${ac_cv_path_LIPO+:} false; then :
33851  $as_echo_n "(cached) " >&6
33852else
33853  case $LIPO in
33854  [\\/]* | ?:[\\/]*)
33855  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33856  ;;
33857  *)
33858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33859for as_dir in $PATH
33860do
33861  IFS=$as_save_IFS
33862  test -z "$as_dir" && as_dir=.
33863    for ac_exec_ext in '' $ac_executable_extensions; do
33864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33865    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33867    break 2
33868  fi
33869done
33870  done
33871IFS=$as_save_IFS
33872
33873  ;;
33874esac
33875fi
33876LIPO=$ac_cv_path_LIPO
33877if test -n "$LIPO"; then
33878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33879$as_echo "$LIPO" >&6; }
33880else
33881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33882$as_echo "no" >&6; }
33883fi
33884
33885
33886  test -n "$LIPO" && break
33887done
33888
33889    else
33890      # If it succeeded, then it was overridden by the user. We will use it
33891      # for the tool.
33892
33893      # First remove it from the list of overridden variables, so we can test
33894      # for unknown variables in the end.
33895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33896
33897      # Check if the provided tool contains a complete path.
33898      tool_specified="$LIPO"
33899      tool_basename="${tool_specified##*/}"
33900      if test "x$tool_basename" = "x$tool_specified"; then
33901        # A command without a complete path is provided, search $PATH.
33902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33903$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33904        # Extract the first word of "$tool_basename", so it can be a program name with args.
33905set dummy $tool_basename; ac_word=$2
33906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33907$as_echo_n "checking for $ac_word... " >&6; }
33908if ${ac_cv_path_LIPO+:} false; then :
33909  $as_echo_n "(cached) " >&6
33910else
33911  case $LIPO in
33912  [\\/]* | ?:[\\/]*)
33913  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33914  ;;
33915  *)
33916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33917for as_dir in $PATH
33918do
33919  IFS=$as_save_IFS
33920  test -z "$as_dir" && as_dir=.
33921    for ac_exec_ext in '' $ac_executable_extensions; do
33922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33923    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33925    break 2
33926  fi
33927done
33928  done
33929IFS=$as_save_IFS
33930
33931  ;;
33932esac
33933fi
33934LIPO=$ac_cv_path_LIPO
33935if test -n "$LIPO"; then
33936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33937$as_echo "$LIPO" >&6; }
33938else
33939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33940$as_echo "no" >&6; }
33941fi
33942
33943
33944        if test "x$LIPO" = x; then
33945          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33946        fi
33947      else
33948        # Otherwise we believe it is a complete path. Use it as it is.
33949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33950$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33952$as_echo_n "checking for LIPO... " >&6; }
33953        if test ! -x "$tool_specified"; then
33954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33955$as_echo "not found" >&6; }
33956          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33957        fi
33958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33959$as_echo "$tool_specified" >&6; }
33960      fi
33961    fi
33962  fi
33963
33964
33965
33966  # Only process if variable expands to non-empty
33967
33968  if test "x$LIPO" != x; then
33969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33970
33971  # First separate the path from the arguments. This will split at the first
33972  # space.
33973  complete="$LIPO"
33974  path="${complete%% *}"
33975  tmp="$complete EOL"
33976  arguments="${tmp#* }"
33977
33978  # Input might be given as Windows format, start by converting to
33979  # unix format.
33980  new_path=`$CYGPATH -u "$path"`
33981
33982  # Now try to locate executable using which
33983  new_path=`$WHICH "$new_path" 2> /dev/null`
33984  # bat and cmd files are not always considered executable in cygwin causing which
33985  # to not find them
33986  if test "x$new_path" = x \
33987      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33988      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33989    new_path=`$CYGPATH -u "$path"`
33990  fi
33991  if test "x$new_path" = x; then
33992    # Oops. Which didn't find the executable.
33993    # The splitting of arguments from the executable at a space might have been incorrect,
33994    # since paths with space are more likely in Windows. Give it another try with the whole
33995    # argument.
33996    path="$complete"
33997    arguments="EOL"
33998    new_path=`$CYGPATH -u "$path"`
33999    new_path=`$WHICH "$new_path" 2> /dev/null`
34000    # bat and cmd files are not always considered executable in cygwin causing which
34001    # to not find them
34002    if test "x$new_path" = x \
34003        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34004        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34005      new_path=`$CYGPATH -u "$path"`
34006    fi
34007    if test "x$new_path" = x; then
34008      # It's still not found. Now this is an unrecoverable error.
34009      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34010$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34011      has_space=`$ECHO "$complete" | $GREP " "`
34012      if test "x$has_space" != x; then
34013        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34014$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34015      fi
34016      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34017    fi
34018  fi
34019
34020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34023  # "foo.exe" is OK but "foo" is an error.
34024  #
34025  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34026  # It is also a way to make sure we got the proper file name for the real test later on.
34027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34028  if test "x$test_shortpath" = x; then
34029    # Short path failed, file does not exist as specified.
34030    # Try adding .exe or .cmd
34031    if test -f "${new_path}.exe"; then
34032      input_to_shortpath="${new_path}.exe"
34033    elif test -f "${new_path}.cmd"; then
34034      input_to_shortpath="${new_path}.cmd"
34035    else
34036      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
34037$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
34038      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34039$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34040      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34041    fi
34042  else
34043    input_to_shortpath="$new_path"
34044  fi
34045
34046  # Call helper function which possibly converts this using DOS-style short mode.
34047  # If so, the updated path is stored in $new_path.
34048  new_path="$input_to_shortpath"
34049
34050  input_path="$input_to_shortpath"
34051  # Check if we need to convert this using DOS-style short mode. If the path
34052  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34053  # take no chances and rewrite it.
34054  # Note: m4 eats our [], so we need to use [ and ] instead.
34055  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34056  if test "x$has_forbidden_chars" != x; then
34057    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34058    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34059    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34060    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34061      # Going to short mode and back again did indeed matter. Since short mode is
34062      # case insensitive, let's make it lowercase to improve readability.
34063      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34064      # Now convert it back to Unix-style (cygpath)
34065      input_path=`$CYGPATH -u "$shortmode_path"`
34066      new_path="$input_path"
34067    fi
34068  fi
34069
34070  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34071  if test "x$test_cygdrive_prefix" = x; then
34072    # As a simple fix, exclude /usr/bin since it's not a real path.
34073    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34074      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34075      # a path prefixed by /cygdrive for fixpath to work.
34076      new_path="$CYGWIN_ROOT_PATH$input_path"
34077    fi
34078  fi
34079
34080  # remove trailing .exe if any
34081  new_path="${new_path/%.exe/}"
34082
34083    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34084
34085  # First separate the path from the arguments. This will split at the first
34086  # space.
34087  complete="$LIPO"
34088  path="${complete%% *}"
34089  tmp="$complete EOL"
34090  arguments="${tmp#* }"
34091
34092  # Input might be given as Windows format, start by converting to
34093  # unix format.
34094  new_path="$path"
34095
34096  windows_path="$new_path"
34097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34098    unix_path=`$CYGPATH -u "$windows_path"`
34099    new_path="$unix_path"
34100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34102    new_path="$unix_path"
34103  fi
34104
34105
34106  # Now try to locate executable using which
34107  new_path=`$WHICH "$new_path" 2> /dev/null`
34108
34109  if test "x$new_path" = x; then
34110    # Oops. Which didn't find the executable.
34111    # The splitting of arguments from the executable at a space might have been incorrect,
34112    # since paths with space are more likely in Windows. Give it another try with the whole
34113    # argument.
34114    path="$complete"
34115    arguments="EOL"
34116    new_path="$path"
34117
34118  windows_path="$new_path"
34119  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34120    unix_path=`$CYGPATH -u "$windows_path"`
34121    new_path="$unix_path"
34122  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34123    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34124    new_path="$unix_path"
34125  fi
34126
34127
34128    new_path=`$WHICH "$new_path" 2> /dev/null`
34129    # bat and cmd files are not always considered executable in MSYS causing which
34130    # to not find them
34131    if test "x$new_path" = x \
34132        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34133        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34134      new_path="$path"
34135
34136  windows_path="$new_path"
34137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34138    unix_path=`$CYGPATH -u "$windows_path"`
34139    new_path="$unix_path"
34140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34142    new_path="$unix_path"
34143  fi
34144
34145    fi
34146
34147    if test "x$new_path" = x; then
34148      # It's still not found. Now this is an unrecoverable error.
34149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34150$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34151      has_space=`$ECHO "$complete" | $GREP " "`
34152      if test "x$has_space" != x; then
34153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34155      fi
34156      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34157    fi
34158  fi
34159
34160  # Now new_path has a complete unix path to the binary
34161  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34162    # Keep paths in /bin as-is, but remove trailing .exe if any
34163    new_path="${new_path/%.exe/}"
34164    # Do not save /bin paths to all_fixpath_prefixes!
34165  else
34166    # Not in mixed or Windows style, start by that.
34167    new_path=`cmd //c echo $new_path`
34168
34169  input_path="$new_path"
34170  # Check if we need to convert this using DOS-style short mode. If the path
34171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34172  # take no chances and rewrite it.
34173  # Note: m4 eats our [], so we need to use [ and ] instead.
34174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34175  if test "x$has_forbidden_chars" != x; then
34176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34177    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34178  fi
34179
34180    # Output is in $new_path
34181
34182  windows_path="$new_path"
34183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34184    unix_path=`$CYGPATH -u "$windows_path"`
34185    new_path="$unix_path"
34186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34188    new_path="$unix_path"
34189  fi
34190
34191    # remove trailing .exe if any
34192    new_path="${new_path/%.exe/}"
34193
34194    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34195    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34196  fi
34197
34198    else
34199      # We're on a unix platform. Hooray! :)
34200      # First separate the path from the arguments. This will split at the first
34201      # space.
34202      complete="$LIPO"
34203      path="${complete%% *}"
34204      tmp="$complete EOL"
34205      arguments="${tmp#* }"
34206
34207      # Cannot rely on the command "which" here since it doesn't always work.
34208      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34209      if test -z "$is_absolute_path"; then
34210        # Path to executable is not absolute. Find it.
34211        IFS_save="$IFS"
34212        IFS=:
34213        for p in $PATH; do
34214          if test -f "$p/$path" && test -x "$p/$path"; then
34215            new_path="$p/$path"
34216            break
34217          fi
34218        done
34219        IFS="$IFS_save"
34220      else
34221        # This is an absolute path, we can use it without further modifications.
34222        new_path="$path"
34223      fi
34224
34225      if test "x$new_path" = x; then
34226        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34227$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34228        has_space=`$ECHO "$complete" | $GREP " "`
34229        if test "x$has_space" != x; then
34230          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34231$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34232        fi
34233        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34234      fi
34235    fi
34236
34237    # Now join together the path and the arguments once again
34238    if test "x$arguments" != xEOL; then
34239      new_complete="$new_path ${arguments% *}"
34240    else
34241      new_complete="$new_path"
34242    fi
34243
34244    if test "x$complete" != "x$new_complete"; then
34245      LIPO="$new_complete"
34246      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34247$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34248    fi
34249  fi
34250
34251  fi
34252
34253  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34254    # Extract the first word of "mt", so it can be a program name with args.
34255set dummy mt; ac_word=$2
34256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34257$as_echo_n "checking for $ac_word... " >&6; }
34258if ${ac_cv_prog_MT+:} false; then :
34259  $as_echo_n "(cached) " >&6
34260else
34261  if test -n "$MT"; then
34262  ac_cv_prog_MT="$MT" # Let the user override the test.
34263else
34264  ac_prog_rejected=no
34265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34266for as_dir in $PATH
34267do
34268  IFS=$as_save_IFS
34269  test -z "$as_dir" && as_dir=.
34270    for ac_exec_ext in '' $ac_executable_extensions; do
34271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34272    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34273       ac_prog_rejected=yes
34274       continue
34275     fi
34276    ac_cv_prog_MT="mt"
34277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34278    break 2
34279  fi
34280done
34281  done
34282IFS=$as_save_IFS
34283
34284if test $ac_prog_rejected = yes; then
34285  # We found a bogon in the path, so make sure we never use it.
34286  set dummy $ac_cv_prog_MT
34287  shift
34288  if test $# != 0; then
34289    # We chose a different compiler from the bogus one.
34290    # However, it has the same basename, so the bogon will be chosen
34291    # first if we set MT to just the basename; use the full file name.
34292    shift
34293    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34294  fi
34295fi
34296fi
34297fi
34298MT=$ac_cv_prog_MT
34299if test -n "$MT"; then
34300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34301$as_echo "$MT" >&6; }
34302else
34303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34304$as_echo "no" >&6; }
34305fi
34306
34307
34308
34309  # Only process if variable expands to non-empty
34310
34311  if test "x$MT" != x; then
34312    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34313
34314  # First separate the path from the arguments. This will split at the first
34315  # space.
34316  complete="$MT"
34317  path="${complete%% *}"
34318  tmp="$complete EOL"
34319  arguments="${tmp#* }"
34320
34321  # Input might be given as Windows format, start by converting to
34322  # unix format.
34323  new_path=`$CYGPATH -u "$path"`
34324
34325  # Now try to locate executable using which
34326  new_path=`$WHICH "$new_path" 2> /dev/null`
34327  # bat and cmd files are not always considered executable in cygwin causing which
34328  # to not find them
34329  if test "x$new_path" = x \
34330      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34331      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34332    new_path=`$CYGPATH -u "$path"`
34333  fi
34334  if test "x$new_path" = x; then
34335    # Oops. Which didn't find the executable.
34336    # The splitting of arguments from the executable at a space might have been incorrect,
34337    # since paths with space are more likely in Windows. Give it another try with the whole
34338    # argument.
34339    path="$complete"
34340    arguments="EOL"
34341    new_path=`$CYGPATH -u "$path"`
34342    new_path=`$WHICH "$new_path" 2> /dev/null`
34343    # bat and cmd files are not always considered executable in cygwin causing which
34344    # to not find them
34345    if test "x$new_path" = x \
34346        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34347        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34348      new_path=`$CYGPATH -u "$path"`
34349    fi
34350    if test "x$new_path" = x; then
34351      # It's still not found. Now this is an unrecoverable error.
34352      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34353$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34354      has_space=`$ECHO "$complete" | $GREP " "`
34355      if test "x$has_space" != x; then
34356        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34357$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34358      fi
34359      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34360    fi
34361  fi
34362
34363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34366  # "foo.exe" is OK but "foo" is an error.
34367  #
34368  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34369  # It is also a way to make sure we got the proper file name for the real test later on.
34370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34371  if test "x$test_shortpath" = x; then
34372    # Short path failed, file does not exist as specified.
34373    # Try adding .exe or .cmd
34374    if test -f "${new_path}.exe"; then
34375      input_to_shortpath="${new_path}.exe"
34376    elif test -f "${new_path}.cmd"; then
34377      input_to_shortpath="${new_path}.cmd"
34378    else
34379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34380$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34381      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34382$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34383      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34384    fi
34385  else
34386    input_to_shortpath="$new_path"
34387  fi
34388
34389  # Call helper function which possibly converts this using DOS-style short mode.
34390  # If so, the updated path is stored in $new_path.
34391  new_path="$input_to_shortpath"
34392
34393  input_path="$input_to_shortpath"
34394  # Check if we need to convert this using DOS-style short mode. If the path
34395  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34396  # take no chances and rewrite it.
34397  # Note: m4 eats our [], so we need to use [ and ] instead.
34398  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34399  if test "x$has_forbidden_chars" != x; then
34400    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34401    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34402    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34403    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34404      # Going to short mode and back again did indeed matter. Since short mode is
34405      # case insensitive, let's make it lowercase to improve readability.
34406      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34407      # Now convert it back to Unix-style (cygpath)
34408      input_path=`$CYGPATH -u "$shortmode_path"`
34409      new_path="$input_path"
34410    fi
34411  fi
34412
34413  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34414  if test "x$test_cygdrive_prefix" = x; then
34415    # As a simple fix, exclude /usr/bin since it's not a real path.
34416    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34417      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34418      # a path prefixed by /cygdrive for fixpath to work.
34419      new_path="$CYGWIN_ROOT_PATH$input_path"
34420    fi
34421  fi
34422
34423  # remove trailing .exe if any
34424  new_path="${new_path/%.exe/}"
34425
34426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34427
34428  # First separate the path from the arguments. This will split at the first
34429  # space.
34430  complete="$MT"
34431  path="${complete%% *}"
34432  tmp="$complete EOL"
34433  arguments="${tmp#* }"
34434
34435  # Input might be given as Windows format, start by converting to
34436  # unix format.
34437  new_path="$path"
34438
34439  windows_path="$new_path"
34440  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34441    unix_path=`$CYGPATH -u "$windows_path"`
34442    new_path="$unix_path"
34443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34444    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34445    new_path="$unix_path"
34446  fi
34447
34448
34449  # Now try to locate executable using which
34450  new_path=`$WHICH "$new_path" 2> /dev/null`
34451
34452  if test "x$new_path" = x; then
34453    # Oops. Which didn't find the executable.
34454    # The splitting of arguments from the executable at a space might have been incorrect,
34455    # since paths with space are more likely in Windows. Give it another try with the whole
34456    # argument.
34457    path="$complete"
34458    arguments="EOL"
34459    new_path="$path"
34460
34461  windows_path="$new_path"
34462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34463    unix_path=`$CYGPATH -u "$windows_path"`
34464    new_path="$unix_path"
34465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34467    new_path="$unix_path"
34468  fi
34469
34470
34471    new_path=`$WHICH "$new_path" 2> /dev/null`
34472    # bat and cmd files are not always considered executable in MSYS causing which
34473    # to not find them
34474    if test "x$new_path" = x \
34475        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34476        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34477      new_path="$path"
34478
34479  windows_path="$new_path"
34480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34481    unix_path=`$CYGPATH -u "$windows_path"`
34482    new_path="$unix_path"
34483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34485    new_path="$unix_path"
34486  fi
34487
34488    fi
34489
34490    if test "x$new_path" = x; then
34491      # It's still not found. Now this is an unrecoverable error.
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34493$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34494      has_space=`$ECHO "$complete" | $GREP " "`
34495      if test "x$has_space" != x; then
34496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34498      fi
34499      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34500    fi
34501  fi
34502
34503  # Now new_path has a complete unix path to the binary
34504  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34505    # Keep paths in /bin as-is, but remove trailing .exe if any
34506    new_path="${new_path/%.exe/}"
34507    # Do not save /bin paths to all_fixpath_prefixes!
34508  else
34509    # Not in mixed or Windows style, start by that.
34510    new_path=`cmd //c echo $new_path`
34511
34512  input_path="$new_path"
34513  # Check if we need to convert this using DOS-style short mode. If the path
34514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34515  # take no chances and rewrite it.
34516  # Note: m4 eats our [], so we need to use [ and ] instead.
34517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34518  if test "x$has_forbidden_chars" != x; then
34519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34521  fi
34522
34523    # Output is in $new_path
34524
34525  windows_path="$new_path"
34526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34527    unix_path=`$CYGPATH -u "$windows_path"`
34528    new_path="$unix_path"
34529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34531    new_path="$unix_path"
34532  fi
34533
34534    # remove trailing .exe if any
34535    new_path="${new_path/%.exe/}"
34536
34537    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34538    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34539  fi
34540
34541    else
34542      # We're on a unix platform. Hooray! :)
34543      # First separate the path from the arguments. This will split at the first
34544      # space.
34545      complete="$MT"
34546      path="${complete%% *}"
34547      tmp="$complete EOL"
34548      arguments="${tmp#* }"
34549
34550      # Cannot rely on the command "which" here since it doesn't always work.
34551      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34552      if test -z "$is_absolute_path"; then
34553        # Path to executable is not absolute. Find it.
34554        IFS_save="$IFS"
34555        IFS=:
34556        for p in $PATH; do
34557          if test -f "$p/$path" && test -x "$p/$path"; then
34558            new_path="$p/$path"
34559            break
34560          fi
34561        done
34562        IFS="$IFS_save"
34563      else
34564        # This is an absolute path, we can use it without further modifications.
34565        new_path="$path"
34566      fi
34567
34568      if test "x$new_path" = x; then
34569        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34570$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34571        has_space=`$ECHO "$complete" | $GREP " "`
34572        if test "x$has_space" != x; then
34573          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34575        fi
34576        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34577      fi
34578    fi
34579
34580    # Now join together the path and the arguments once again
34581    if test "x$arguments" != xEOL; then
34582      new_complete="$new_path ${arguments% *}"
34583    else
34584      new_complete="$new_path"
34585    fi
34586
34587    if test "x$complete" != "x$new_complete"; then
34588      MT="$new_complete"
34589      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34590$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34591    fi
34592  fi
34593
34594    # Setup the resource compiler (RC)
34595    # Extract the first word of "rc", so it can be a program name with args.
34596set dummy rc; ac_word=$2
34597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34598$as_echo_n "checking for $ac_word... " >&6; }
34599if ${ac_cv_prog_RC+:} false; then :
34600  $as_echo_n "(cached) " >&6
34601else
34602  if test -n "$RC"; then
34603  ac_cv_prog_RC="$RC" # Let the user override the test.
34604else
34605  ac_prog_rejected=no
34606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34607for as_dir in $PATH
34608do
34609  IFS=$as_save_IFS
34610  test -z "$as_dir" && as_dir=.
34611    for ac_exec_ext in '' $ac_executable_extensions; do
34612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34613    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34614       ac_prog_rejected=yes
34615       continue
34616     fi
34617    ac_cv_prog_RC="rc"
34618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34619    break 2
34620  fi
34621done
34622  done
34623IFS=$as_save_IFS
34624
34625if test $ac_prog_rejected = yes; then
34626  # We found a bogon in the path, so make sure we never use it.
34627  set dummy $ac_cv_prog_RC
34628  shift
34629  if test $# != 0; then
34630    # We chose a different compiler from the bogus one.
34631    # However, it has the same basename, so the bogon will be chosen
34632    # first if we set RC to just the basename; use the full file name.
34633    shift
34634    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34635  fi
34636fi
34637fi
34638fi
34639RC=$ac_cv_prog_RC
34640if test -n "$RC"; then
34641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34642$as_echo "$RC" >&6; }
34643else
34644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34645$as_echo "no" >&6; }
34646fi
34647
34648
34649
34650  # Only process if variable expands to non-empty
34651
34652  if test "x$RC" != x; then
34653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34654
34655  # First separate the path from the arguments. This will split at the first
34656  # space.
34657  complete="$RC"
34658  path="${complete%% *}"
34659  tmp="$complete EOL"
34660  arguments="${tmp#* }"
34661
34662  # Input might be given as Windows format, start by converting to
34663  # unix format.
34664  new_path=`$CYGPATH -u "$path"`
34665
34666  # Now try to locate executable using which
34667  new_path=`$WHICH "$new_path" 2> /dev/null`
34668  # bat and cmd files are not always considered executable in cygwin causing which
34669  # to not find them
34670  if test "x$new_path" = x \
34671      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34672      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34673    new_path=`$CYGPATH -u "$path"`
34674  fi
34675  if test "x$new_path" = x; then
34676    # Oops. Which didn't find the executable.
34677    # The splitting of arguments from the executable at a space might have been incorrect,
34678    # since paths with space are more likely in Windows. Give it another try with the whole
34679    # argument.
34680    path="$complete"
34681    arguments="EOL"
34682    new_path=`$CYGPATH -u "$path"`
34683    new_path=`$WHICH "$new_path" 2> /dev/null`
34684    # bat and cmd files are not always considered executable in cygwin causing which
34685    # to not find them
34686    if test "x$new_path" = x \
34687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34689      new_path=`$CYGPATH -u "$path"`
34690    fi
34691    if test "x$new_path" = x; then
34692      # It's still not found. Now this is an unrecoverable error.
34693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34694$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34695      has_space=`$ECHO "$complete" | $GREP " "`
34696      if test "x$has_space" != x; then
34697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34699      fi
34700      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34701    fi
34702  fi
34703
34704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34707  # "foo.exe" is OK but "foo" is an error.
34708  #
34709  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34710  # It is also a way to make sure we got the proper file name for the real test later on.
34711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34712  if test "x$test_shortpath" = x; then
34713    # Short path failed, file does not exist as specified.
34714    # Try adding .exe or .cmd
34715    if test -f "${new_path}.exe"; then
34716      input_to_shortpath="${new_path}.exe"
34717    elif test -f "${new_path}.cmd"; then
34718      input_to_shortpath="${new_path}.cmd"
34719    else
34720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34721$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34722      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34723$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34724      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34725    fi
34726  else
34727    input_to_shortpath="$new_path"
34728  fi
34729
34730  # Call helper function which possibly converts this using DOS-style short mode.
34731  # If so, the updated path is stored in $new_path.
34732  new_path="$input_to_shortpath"
34733
34734  input_path="$input_to_shortpath"
34735  # Check if we need to convert this using DOS-style short mode. If the path
34736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34737  # take no chances and rewrite it.
34738  # Note: m4 eats our [], so we need to use [ and ] instead.
34739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34740  if test "x$has_forbidden_chars" != x; then
34741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34745      # Going to short mode and back again did indeed matter. Since short mode is
34746      # case insensitive, let's make it lowercase to improve readability.
34747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34748      # Now convert it back to Unix-style (cygpath)
34749      input_path=`$CYGPATH -u "$shortmode_path"`
34750      new_path="$input_path"
34751    fi
34752  fi
34753
34754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34755  if test "x$test_cygdrive_prefix" = x; then
34756    # As a simple fix, exclude /usr/bin since it's not a real path.
34757    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34759      # a path prefixed by /cygdrive for fixpath to work.
34760      new_path="$CYGWIN_ROOT_PATH$input_path"
34761    fi
34762  fi
34763
34764  # remove trailing .exe if any
34765  new_path="${new_path/%.exe/}"
34766
34767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34768
34769  # First separate the path from the arguments. This will split at the first
34770  # space.
34771  complete="$RC"
34772  path="${complete%% *}"
34773  tmp="$complete EOL"
34774  arguments="${tmp#* }"
34775
34776  # Input might be given as Windows format, start by converting to
34777  # unix format.
34778  new_path="$path"
34779
34780  windows_path="$new_path"
34781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34782    unix_path=`$CYGPATH -u "$windows_path"`
34783    new_path="$unix_path"
34784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34786    new_path="$unix_path"
34787  fi
34788
34789
34790  # Now try to locate executable using which
34791  new_path=`$WHICH "$new_path" 2> /dev/null`
34792
34793  if test "x$new_path" = x; then
34794    # Oops. Which didn't find the executable.
34795    # The splitting of arguments from the executable at a space might have been incorrect,
34796    # since paths with space are more likely in Windows. Give it another try with the whole
34797    # argument.
34798    path="$complete"
34799    arguments="EOL"
34800    new_path="$path"
34801
34802  windows_path="$new_path"
34803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34804    unix_path=`$CYGPATH -u "$windows_path"`
34805    new_path="$unix_path"
34806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34808    new_path="$unix_path"
34809  fi
34810
34811
34812    new_path=`$WHICH "$new_path" 2> /dev/null`
34813    # bat and cmd files are not always considered executable in MSYS causing which
34814    # to not find them
34815    if test "x$new_path" = x \
34816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34818      new_path="$path"
34819
34820  windows_path="$new_path"
34821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34822    unix_path=`$CYGPATH -u "$windows_path"`
34823    new_path="$unix_path"
34824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34826    new_path="$unix_path"
34827  fi
34828
34829    fi
34830
34831    if test "x$new_path" = x; then
34832      # It's still not found. Now this is an unrecoverable error.
34833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34834$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34835      has_space=`$ECHO "$complete" | $GREP " "`
34836      if test "x$has_space" != x; then
34837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34839      fi
34840      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34841    fi
34842  fi
34843
34844  # Now new_path has a complete unix path to the binary
34845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34846    # Keep paths in /bin as-is, but remove trailing .exe if any
34847    new_path="${new_path/%.exe/}"
34848    # Do not save /bin paths to all_fixpath_prefixes!
34849  else
34850    # Not in mixed or Windows style, start by that.
34851    new_path=`cmd //c echo $new_path`
34852
34853  input_path="$new_path"
34854  # Check if we need to convert this using DOS-style short mode. If the path
34855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34856  # take no chances and rewrite it.
34857  # Note: m4 eats our [], so we need to use [ and ] instead.
34858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34859  if test "x$has_forbidden_chars" != x; then
34860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34862  fi
34863
34864    # Output is in $new_path
34865
34866  windows_path="$new_path"
34867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34868    unix_path=`$CYGPATH -u "$windows_path"`
34869    new_path="$unix_path"
34870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34872    new_path="$unix_path"
34873  fi
34874
34875    # remove trailing .exe if any
34876    new_path="${new_path/%.exe/}"
34877
34878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34880  fi
34881
34882    else
34883      # We're on a unix platform. Hooray! :)
34884      # First separate the path from the arguments. This will split at the first
34885      # space.
34886      complete="$RC"
34887      path="${complete%% *}"
34888      tmp="$complete EOL"
34889      arguments="${tmp#* }"
34890
34891      # Cannot rely on the command "which" here since it doesn't always work.
34892      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34893      if test -z "$is_absolute_path"; then
34894        # Path to executable is not absolute. Find it.
34895        IFS_save="$IFS"
34896        IFS=:
34897        for p in $PATH; do
34898          if test -f "$p/$path" && test -x "$p/$path"; then
34899            new_path="$p/$path"
34900            break
34901          fi
34902        done
34903        IFS="$IFS_save"
34904      else
34905        # This is an absolute path, we can use it without further modifications.
34906        new_path="$path"
34907      fi
34908
34909      if test "x$new_path" = x; then
34910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34911$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34912        has_space=`$ECHO "$complete" | $GREP " "`
34913        if test "x$has_space" != x; then
34914          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34916        fi
34917        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34918      fi
34919    fi
34920
34921    # Now join together the path and the arguments once again
34922    if test "x$arguments" != xEOL; then
34923      new_complete="$new_path ${arguments% *}"
34924    else
34925      new_complete="$new_path"
34926    fi
34927
34928    if test "x$complete" != "x$new_complete"; then
34929      RC="$new_complete"
34930      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34931$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34932    fi
34933  fi
34934
34935    # Extract the first word of "dumpbin", so it can be a program name with args.
34936set dummy dumpbin; ac_word=$2
34937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34938$as_echo_n "checking for $ac_word... " >&6; }
34939if ${ac_cv_prog_DUMPBIN+:} false; then :
34940  $as_echo_n "(cached) " >&6
34941else
34942  if test -n "$DUMPBIN"; then
34943  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34944else
34945as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34946for as_dir in $PATH
34947do
34948  IFS=$as_save_IFS
34949  test -z "$as_dir" && as_dir=.
34950    for ac_exec_ext in '' $ac_executable_extensions; do
34951  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34952    ac_cv_prog_DUMPBIN="dumpbin"
34953    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34954    break 2
34955  fi
34956done
34957  done
34958IFS=$as_save_IFS
34959
34960fi
34961fi
34962DUMPBIN=$ac_cv_prog_DUMPBIN
34963if test -n "$DUMPBIN"; then
34964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34965$as_echo "$DUMPBIN" >&6; }
34966else
34967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34968$as_echo "no" >&6; }
34969fi
34970
34971
34972
34973  # Only process if variable expands to non-empty
34974
34975  if test "x$DUMPBIN" != x; then
34976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34977
34978  # First separate the path from the arguments. This will split at the first
34979  # space.
34980  complete="$DUMPBIN"
34981  path="${complete%% *}"
34982  tmp="$complete EOL"
34983  arguments="${tmp#* }"
34984
34985  # Input might be given as Windows format, start by converting to
34986  # unix format.
34987  new_path=`$CYGPATH -u "$path"`
34988
34989  # Now try to locate executable using which
34990  new_path=`$WHICH "$new_path" 2> /dev/null`
34991  # bat and cmd files are not always considered executable in cygwin causing which
34992  # to not find them
34993  if test "x$new_path" = x \
34994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34996    new_path=`$CYGPATH -u "$path"`
34997  fi
34998  if test "x$new_path" = x; then
34999    # Oops. Which didn't find the executable.
35000    # The splitting of arguments from the executable at a space might have been incorrect,
35001    # since paths with space are more likely in Windows. Give it another try with the whole
35002    # argument.
35003    path="$complete"
35004    arguments="EOL"
35005    new_path=`$CYGPATH -u "$path"`
35006    new_path=`$WHICH "$new_path" 2> /dev/null`
35007    # bat and cmd files are not always considered executable in cygwin causing which
35008    # to not find them
35009    if test "x$new_path" = x \
35010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35012      new_path=`$CYGPATH -u "$path"`
35013    fi
35014    if test "x$new_path" = x; then
35015      # It's still not found. Now this is an unrecoverable error.
35016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35017$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35018      has_space=`$ECHO "$complete" | $GREP " "`
35019      if test "x$has_space" != x; then
35020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35022      fi
35023      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35024    fi
35025  fi
35026
35027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35030  # "foo.exe" is OK but "foo" is an error.
35031  #
35032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35033  # It is also a way to make sure we got the proper file name for the real test later on.
35034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35035  if test "x$test_shortpath" = x; then
35036    # Short path failed, file does not exist as specified.
35037    # Try adding .exe or .cmd
35038    if test -f "${new_path}.exe"; then
35039      input_to_shortpath="${new_path}.exe"
35040    elif test -f "${new_path}.cmd"; then
35041      input_to_shortpath="${new_path}.cmd"
35042    else
35043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
35044$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
35045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35047      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35048    fi
35049  else
35050    input_to_shortpath="$new_path"
35051  fi
35052
35053  # Call helper function which possibly converts this using DOS-style short mode.
35054  # If so, the updated path is stored in $new_path.
35055  new_path="$input_to_shortpath"
35056
35057  input_path="$input_to_shortpath"
35058  # Check if we need to convert this using DOS-style short mode. If the path
35059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35060  # take no chances and rewrite it.
35061  # Note: m4 eats our [], so we need to use [ and ] instead.
35062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35063  if test "x$has_forbidden_chars" != x; then
35064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35068      # Going to short mode and back again did indeed matter. Since short mode is
35069      # case insensitive, let's make it lowercase to improve readability.
35070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35071      # Now convert it back to Unix-style (cygpath)
35072      input_path=`$CYGPATH -u "$shortmode_path"`
35073      new_path="$input_path"
35074    fi
35075  fi
35076
35077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35078  if test "x$test_cygdrive_prefix" = x; then
35079    # As a simple fix, exclude /usr/bin since it's not a real path.
35080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35082      # a path prefixed by /cygdrive for fixpath to work.
35083      new_path="$CYGWIN_ROOT_PATH$input_path"
35084    fi
35085  fi
35086
35087  # remove trailing .exe if any
35088  new_path="${new_path/%.exe/}"
35089
35090    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35091
35092  # First separate the path from the arguments. This will split at the first
35093  # space.
35094  complete="$DUMPBIN"
35095  path="${complete%% *}"
35096  tmp="$complete EOL"
35097  arguments="${tmp#* }"
35098
35099  # Input might be given as Windows format, start by converting to
35100  # unix format.
35101  new_path="$path"
35102
35103  windows_path="$new_path"
35104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35105    unix_path=`$CYGPATH -u "$windows_path"`
35106    new_path="$unix_path"
35107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35109    new_path="$unix_path"
35110  fi
35111
35112
35113  # Now try to locate executable using which
35114  new_path=`$WHICH "$new_path" 2> /dev/null`
35115
35116  if test "x$new_path" = x; then
35117    # Oops. Which didn't find the executable.
35118    # The splitting of arguments from the executable at a space might have been incorrect,
35119    # since paths with space are more likely in Windows. Give it another try with the whole
35120    # argument.
35121    path="$complete"
35122    arguments="EOL"
35123    new_path="$path"
35124
35125  windows_path="$new_path"
35126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35127    unix_path=`$CYGPATH -u "$windows_path"`
35128    new_path="$unix_path"
35129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35131    new_path="$unix_path"
35132  fi
35133
35134
35135    new_path=`$WHICH "$new_path" 2> /dev/null`
35136    # bat and cmd files are not always considered executable in MSYS causing which
35137    # to not find them
35138    if test "x$new_path" = x \
35139        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35140        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35141      new_path="$path"
35142
35143  windows_path="$new_path"
35144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35145    unix_path=`$CYGPATH -u "$windows_path"`
35146    new_path="$unix_path"
35147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35149    new_path="$unix_path"
35150  fi
35151
35152    fi
35153
35154    if test "x$new_path" = x; then
35155      # It's still not found. Now this is an unrecoverable error.
35156      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35157$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35158      has_space=`$ECHO "$complete" | $GREP " "`
35159      if test "x$has_space" != x; then
35160        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35161$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35162      fi
35163      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35164    fi
35165  fi
35166
35167  # Now new_path has a complete unix path to the binary
35168  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35169    # Keep paths in /bin as-is, but remove trailing .exe if any
35170    new_path="${new_path/%.exe/}"
35171    # Do not save /bin paths to all_fixpath_prefixes!
35172  else
35173    # Not in mixed or Windows style, start by that.
35174    new_path=`cmd //c echo $new_path`
35175
35176  input_path="$new_path"
35177  # Check if we need to convert this using DOS-style short mode. If the path
35178  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35179  # take no chances and rewrite it.
35180  # Note: m4 eats our [], so we need to use [ and ] instead.
35181  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35182  if test "x$has_forbidden_chars" != x; then
35183    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35184    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35185  fi
35186
35187    # Output is in $new_path
35188
35189  windows_path="$new_path"
35190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35191    unix_path=`$CYGPATH -u "$windows_path"`
35192    new_path="$unix_path"
35193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35195    new_path="$unix_path"
35196  fi
35197
35198    # remove trailing .exe if any
35199    new_path="${new_path/%.exe/}"
35200
35201    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35202    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35203  fi
35204
35205    else
35206      # We're on a unix platform. Hooray! :)
35207      # First separate the path from the arguments. This will split at the first
35208      # space.
35209      complete="$DUMPBIN"
35210      path="${complete%% *}"
35211      tmp="$complete EOL"
35212      arguments="${tmp#* }"
35213
35214      # Cannot rely on the command "which" here since it doesn't always work.
35215      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35216      if test -z "$is_absolute_path"; then
35217        # Path to executable is not absolute. Find it.
35218        IFS_save="$IFS"
35219        IFS=:
35220        for p in $PATH; do
35221          if test -f "$p/$path" && test -x "$p/$path"; then
35222            new_path="$p/$path"
35223            break
35224          fi
35225        done
35226        IFS="$IFS_save"
35227      else
35228        # This is an absolute path, we can use it without further modifications.
35229        new_path="$path"
35230      fi
35231
35232      if test "x$new_path" = x; then
35233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35234$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35235        has_space=`$ECHO "$complete" | $GREP " "`
35236        if test "x$has_space" != x; then
35237          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35238$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35239        fi
35240        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35241      fi
35242    fi
35243
35244    # Now join together the path and the arguments once again
35245    if test "x$arguments" != xEOL; then
35246      new_complete="$new_path ${arguments% *}"
35247    else
35248      new_complete="$new_path"
35249    fi
35250
35251    if test "x$complete" != "x$new_complete"; then
35252      DUMPBIN="$new_complete"
35253      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35254$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35255    fi
35256  fi
35257
35258    # We need to check for 'msbuild.exe' because at the place where we expect to
35259    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35260    # won't find the 'msbuild.exe' executable in that case (and the
35261    # 'ac_executable_extensions' is unusable due to performance reasons).
35262    # Notice that we intentionally don't fix up the path to MSBUILD because we
35263    # will call it in a DOS shell during freetype detection on Windows (see
35264    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35265    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35266set dummy msbuild.exe; ac_word=$2
35267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35268$as_echo_n "checking for $ac_word... " >&6; }
35269if ${ac_cv_prog_MSBUILD+:} false; then :
35270  $as_echo_n "(cached) " >&6
35271else
35272  if test -n "$MSBUILD"; then
35273  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35274else
35275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35276for as_dir in $PATH
35277do
35278  IFS=$as_save_IFS
35279  test -z "$as_dir" && as_dir=.
35280    for ac_exec_ext in '' $ac_executable_extensions; do
35281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35282    ac_cv_prog_MSBUILD="msbuild.exe"
35283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35284    break 2
35285  fi
35286done
35287  done
35288IFS=$as_save_IFS
35289
35290fi
35291fi
35292MSBUILD=$ac_cv_prog_MSBUILD
35293if test -n "$MSBUILD"; then
35294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35295$as_echo "$MSBUILD" >&6; }
35296else
35297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35298$as_echo "no" >&6; }
35299fi
35300
35301
35302  fi
35303
35304  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35305
35306
35307  # Publish this variable in the help.
35308
35309
35310  if test "x$STRIP" = x; then
35311    # The variable is not set by user, try to locate tool using the code snippet
35312    for ac_prog in strip
35313do
35314  # Extract the first word of "$ac_prog", so it can be a program name with args.
35315set dummy $ac_prog; ac_word=$2
35316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35317$as_echo_n "checking for $ac_word... " >&6; }
35318if ${ac_cv_path_STRIP+:} false; then :
35319  $as_echo_n "(cached) " >&6
35320else
35321  case $STRIP in
35322  [\\/]* | ?:[\\/]*)
35323  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35324  ;;
35325  *)
35326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35327for as_dir in $PATH
35328do
35329  IFS=$as_save_IFS
35330  test -z "$as_dir" && as_dir=.
35331    for ac_exec_ext in '' $ac_executable_extensions; do
35332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35333    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35335    break 2
35336  fi
35337done
35338  done
35339IFS=$as_save_IFS
35340
35341  ;;
35342esac
35343fi
35344STRIP=$ac_cv_path_STRIP
35345if test -n "$STRIP"; then
35346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35347$as_echo "$STRIP" >&6; }
35348else
35349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35350$as_echo "no" >&6; }
35351fi
35352
35353
35354  test -n "$STRIP" && break
35355done
35356
35357  else
35358    # The variable is set, but is it from the command line or the environment?
35359
35360    # Try to remove the string !STRIP! from our list.
35361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35363      # If it failed, the variable was not from the command line. Ignore it,
35364      # but warn the user (except for BASH, which is always set by the calling BASH).
35365      if test "xSTRIP" != xBASH; then
35366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35367$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35368      fi
35369      # Try to locate tool using the code snippet
35370      for ac_prog in strip
35371do
35372  # Extract the first word of "$ac_prog", so it can be a program name with args.
35373set dummy $ac_prog; ac_word=$2
35374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35375$as_echo_n "checking for $ac_word... " >&6; }
35376if ${ac_cv_path_STRIP+:} false; then :
35377  $as_echo_n "(cached) " >&6
35378else
35379  case $STRIP in
35380  [\\/]* | ?:[\\/]*)
35381  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35382  ;;
35383  *)
35384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35385for as_dir in $PATH
35386do
35387  IFS=$as_save_IFS
35388  test -z "$as_dir" && as_dir=.
35389    for ac_exec_ext in '' $ac_executable_extensions; do
35390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35391    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35393    break 2
35394  fi
35395done
35396  done
35397IFS=$as_save_IFS
35398
35399  ;;
35400esac
35401fi
35402STRIP=$ac_cv_path_STRIP
35403if test -n "$STRIP"; then
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35405$as_echo "$STRIP" >&6; }
35406else
35407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35408$as_echo "no" >&6; }
35409fi
35410
35411
35412  test -n "$STRIP" && break
35413done
35414
35415    else
35416      # If it succeeded, then it was overridden by the user. We will use it
35417      # for the tool.
35418
35419      # First remove it from the list of overridden variables, so we can test
35420      # for unknown variables in the end.
35421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35422
35423      # Check if the provided tool contains a complete path.
35424      tool_specified="$STRIP"
35425      tool_basename="${tool_specified##*/}"
35426      if test "x$tool_basename" = "x$tool_specified"; then
35427        # A command without a complete path is provided, search $PATH.
35428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35429$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35430        # Extract the first word of "$tool_basename", so it can be a program name with args.
35431set dummy $tool_basename; ac_word=$2
35432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35433$as_echo_n "checking for $ac_word... " >&6; }
35434if ${ac_cv_path_STRIP+:} false; then :
35435  $as_echo_n "(cached) " >&6
35436else
35437  case $STRIP in
35438  [\\/]* | ?:[\\/]*)
35439  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35440  ;;
35441  *)
35442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35443for as_dir in $PATH
35444do
35445  IFS=$as_save_IFS
35446  test -z "$as_dir" && as_dir=.
35447    for ac_exec_ext in '' $ac_executable_extensions; do
35448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35449    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35451    break 2
35452  fi
35453done
35454  done
35455IFS=$as_save_IFS
35456
35457  ;;
35458esac
35459fi
35460STRIP=$ac_cv_path_STRIP
35461if test -n "$STRIP"; then
35462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35463$as_echo "$STRIP" >&6; }
35464else
35465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35466$as_echo "no" >&6; }
35467fi
35468
35469
35470        if test "x$STRIP" = x; then
35471          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35472        fi
35473      else
35474        # Otherwise we believe it is a complete path. Use it as it is.
35475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35476$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35478$as_echo_n "checking for STRIP... " >&6; }
35479        if test ! -x "$tool_specified"; then
35480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35481$as_echo "not found" >&6; }
35482          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35483        fi
35484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35485$as_echo "$tool_specified" >&6; }
35486      fi
35487    fi
35488  fi
35489
35490
35491
35492  # Only process if variable expands to non-empty
35493
35494  if test "x$STRIP" != x; then
35495    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35496
35497  # First separate the path from the arguments. This will split at the first
35498  # space.
35499  complete="$STRIP"
35500  path="${complete%% *}"
35501  tmp="$complete EOL"
35502  arguments="${tmp#* }"
35503
35504  # Input might be given as Windows format, start by converting to
35505  # unix format.
35506  new_path=`$CYGPATH -u "$path"`
35507
35508  # Now try to locate executable using which
35509  new_path=`$WHICH "$new_path" 2> /dev/null`
35510  # bat and cmd files are not always considered executable in cygwin causing which
35511  # to not find them
35512  if test "x$new_path" = x \
35513      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35514      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35515    new_path=`$CYGPATH -u "$path"`
35516  fi
35517  if test "x$new_path" = x; then
35518    # Oops. Which didn't find the executable.
35519    # The splitting of arguments from the executable at a space might have been incorrect,
35520    # since paths with space are more likely in Windows. Give it another try with the whole
35521    # argument.
35522    path="$complete"
35523    arguments="EOL"
35524    new_path=`$CYGPATH -u "$path"`
35525    new_path=`$WHICH "$new_path" 2> /dev/null`
35526    # bat and cmd files are not always considered executable in cygwin causing which
35527    # to not find them
35528    if test "x$new_path" = x \
35529        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35530        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35531      new_path=`$CYGPATH -u "$path"`
35532    fi
35533    if test "x$new_path" = x; then
35534      # It's still not found. Now this is an unrecoverable error.
35535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35536$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35537      has_space=`$ECHO "$complete" | $GREP " "`
35538      if test "x$has_space" != x; then
35539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35541      fi
35542      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35543    fi
35544  fi
35545
35546  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35547  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35548  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35549  # "foo.exe" is OK but "foo" is an error.
35550  #
35551  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35552  # It is also a way to make sure we got the proper file name for the real test later on.
35553  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35554  if test "x$test_shortpath" = x; then
35555    # Short path failed, file does not exist as specified.
35556    # Try adding .exe or .cmd
35557    if test -f "${new_path}.exe"; then
35558      input_to_shortpath="${new_path}.exe"
35559    elif test -f "${new_path}.cmd"; then
35560      input_to_shortpath="${new_path}.cmd"
35561    else
35562      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35563$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35564      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35565$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35566      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35567    fi
35568  else
35569    input_to_shortpath="$new_path"
35570  fi
35571
35572  # Call helper function which possibly converts this using DOS-style short mode.
35573  # If so, the updated path is stored in $new_path.
35574  new_path="$input_to_shortpath"
35575
35576  input_path="$input_to_shortpath"
35577  # Check if we need to convert this using DOS-style short mode. If the path
35578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35579  # take no chances and rewrite it.
35580  # Note: m4 eats our [], so we need to use [ and ] instead.
35581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35582  if test "x$has_forbidden_chars" != x; then
35583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35587      # Going to short mode and back again did indeed matter. Since short mode is
35588      # case insensitive, let's make it lowercase to improve readability.
35589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35590      # Now convert it back to Unix-style (cygpath)
35591      input_path=`$CYGPATH -u "$shortmode_path"`
35592      new_path="$input_path"
35593    fi
35594  fi
35595
35596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35597  if test "x$test_cygdrive_prefix" = x; then
35598    # As a simple fix, exclude /usr/bin since it's not a real path.
35599    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35601      # a path prefixed by /cygdrive for fixpath to work.
35602      new_path="$CYGWIN_ROOT_PATH$input_path"
35603    fi
35604  fi
35605
35606  # remove trailing .exe if any
35607  new_path="${new_path/%.exe/}"
35608
35609    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35610
35611  # First separate the path from the arguments. This will split at the first
35612  # space.
35613  complete="$STRIP"
35614  path="${complete%% *}"
35615  tmp="$complete EOL"
35616  arguments="${tmp#* }"
35617
35618  # Input might be given as Windows format, start by converting to
35619  # unix format.
35620  new_path="$path"
35621
35622  windows_path="$new_path"
35623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35624    unix_path=`$CYGPATH -u "$windows_path"`
35625    new_path="$unix_path"
35626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35628    new_path="$unix_path"
35629  fi
35630
35631
35632  # Now try to locate executable using which
35633  new_path=`$WHICH "$new_path" 2> /dev/null`
35634
35635  if test "x$new_path" = x; then
35636    # Oops. Which didn't find the executable.
35637    # The splitting of arguments from the executable at a space might have been incorrect,
35638    # since paths with space are more likely in Windows. Give it another try with the whole
35639    # argument.
35640    path="$complete"
35641    arguments="EOL"
35642    new_path="$path"
35643
35644  windows_path="$new_path"
35645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35646    unix_path=`$CYGPATH -u "$windows_path"`
35647    new_path="$unix_path"
35648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35650    new_path="$unix_path"
35651  fi
35652
35653
35654    new_path=`$WHICH "$new_path" 2> /dev/null`
35655    # bat and cmd files are not always considered executable in MSYS causing which
35656    # to not find them
35657    if test "x$new_path" = x \
35658        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35659        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35660      new_path="$path"
35661
35662  windows_path="$new_path"
35663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35664    unix_path=`$CYGPATH -u "$windows_path"`
35665    new_path="$unix_path"
35666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35668    new_path="$unix_path"
35669  fi
35670
35671    fi
35672
35673    if test "x$new_path" = x; then
35674      # It's still not found. Now this is an unrecoverable error.
35675      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35676$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35677      has_space=`$ECHO "$complete" | $GREP " "`
35678      if test "x$has_space" != x; then
35679        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35680$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35681      fi
35682      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35683    fi
35684  fi
35685
35686  # Now new_path has a complete unix path to the binary
35687  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35688    # Keep paths in /bin as-is, but remove trailing .exe if any
35689    new_path="${new_path/%.exe/}"
35690    # Do not save /bin paths to all_fixpath_prefixes!
35691  else
35692    # Not in mixed or Windows style, start by that.
35693    new_path=`cmd //c echo $new_path`
35694
35695  input_path="$new_path"
35696  # Check if we need to convert this using DOS-style short mode. If the path
35697  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35698  # take no chances and rewrite it.
35699  # Note: m4 eats our [], so we need to use [ and ] instead.
35700  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35701  if test "x$has_forbidden_chars" != x; then
35702    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35703    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35704  fi
35705
35706    # Output is in $new_path
35707
35708  windows_path="$new_path"
35709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35710    unix_path=`$CYGPATH -u "$windows_path"`
35711    new_path="$unix_path"
35712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35714    new_path="$unix_path"
35715  fi
35716
35717    # remove trailing .exe if any
35718    new_path="${new_path/%.exe/}"
35719
35720    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35721    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35722  fi
35723
35724    else
35725      # We're on a unix platform. Hooray! :)
35726      # First separate the path from the arguments. This will split at the first
35727      # space.
35728      complete="$STRIP"
35729      path="${complete%% *}"
35730      tmp="$complete EOL"
35731      arguments="${tmp#* }"
35732
35733      # Cannot rely on the command "which" here since it doesn't always work.
35734      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35735      if test -z "$is_absolute_path"; then
35736        # Path to executable is not absolute. Find it.
35737        IFS_save="$IFS"
35738        IFS=:
35739        for p in $PATH; do
35740          if test -f "$p/$path" && test -x "$p/$path"; then
35741            new_path="$p/$path"
35742            break
35743          fi
35744        done
35745        IFS="$IFS_save"
35746      else
35747        # This is an absolute path, we can use it without further modifications.
35748        new_path="$path"
35749      fi
35750
35751      if test "x$new_path" = x; then
35752        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35753$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35754        has_space=`$ECHO "$complete" | $GREP " "`
35755        if test "x$has_space" != x; then
35756          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35757$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35758        fi
35759        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35760      fi
35761    fi
35762
35763    # Now join together the path and the arguments once again
35764    if test "x$arguments" != xEOL; then
35765      new_complete="$new_path ${arguments% *}"
35766    else
35767      new_complete="$new_path"
35768    fi
35769
35770    if test "x$complete" != "x$new_complete"; then
35771      STRIP="$new_complete"
35772      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35773$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35774    fi
35775  fi
35776
35777
35778
35779  # Publish this variable in the help.
35780
35781
35782  if test "x$NM" = x; then
35783    # The variable is not set by user, try to locate tool using the code snippet
35784    for ac_prog in nm
35785do
35786  # Extract the first word of "$ac_prog", so it can be a program name with args.
35787set dummy $ac_prog; ac_word=$2
35788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35789$as_echo_n "checking for $ac_word... " >&6; }
35790if ${ac_cv_path_NM+:} false; then :
35791  $as_echo_n "(cached) " >&6
35792else
35793  case $NM in
35794  [\\/]* | ?:[\\/]*)
35795  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35796  ;;
35797  *)
35798  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35799for as_dir in $PATH
35800do
35801  IFS=$as_save_IFS
35802  test -z "$as_dir" && as_dir=.
35803    for ac_exec_ext in '' $ac_executable_extensions; do
35804  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35805    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35806    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35807    break 2
35808  fi
35809done
35810  done
35811IFS=$as_save_IFS
35812
35813  ;;
35814esac
35815fi
35816NM=$ac_cv_path_NM
35817if test -n "$NM"; then
35818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35819$as_echo "$NM" >&6; }
35820else
35821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35822$as_echo "no" >&6; }
35823fi
35824
35825
35826  test -n "$NM" && break
35827done
35828
35829  else
35830    # The variable is set, but is it from the command line or the environment?
35831
35832    # Try to remove the string !NM! from our list.
35833    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35834    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35835      # If it failed, the variable was not from the command line. Ignore it,
35836      # but warn the user (except for BASH, which is always set by the calling BASH).
35837      if test "xNM" != xBASH; then
35838        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35839$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35840      fi
35841      # Try to locate tool using the code snippet
35842      for ac_prog in nm
35843do
35844  # Extract the first word of "$ac_prog", so it can be a program name with args.
35845set dummy $ac_prog; ac_word=$2
35846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35847$as_echo_n "checking for $ac_word... " >&6; }
35848if ${ac_cv_path_NM+:} false; then :
35849  $as_echo_n "(cached) " >&6
35850else
35851  case $NM in
35852  [\\/]* | ?:[\\/]*)
35853  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35854  ;;
35855  *)
35856  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35857for as_dir in $PATH
35858do
35859  IFS=$as_save_IFS
35860  test -z "$as_dir" && as_dir=.
35861    for ac_exec_ext in '' $ac_executable_extensions; do
35862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35863    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35865    break 2
35866  fi
35867done
35868  done
35869IFS=$as_save_IFS
35870
35871  ;;
35872esac
35873fi
35874NM=$ac_cv_path_NM
35875if test -n "$NM"; then
35876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35877$as_echo "$NM" >&6; }
35878else
35879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35880$as_echo "no" >&6; }
35881fi
35882
35883
35884  test -n "$NM" && break
35885done
35886
35887    else
35888      # If it succeeded, then it was overridden by the user. We will use it
35889      # for the tool.
35890
35891      # First remove it from the list of overridden variables, so we can test
35892      # for unknown variables in the end.
35893      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35894
35895      # Check if the provided tool contains a complete path.
35896      tool_specified="$NM"
35897      tool_basename="${tool_specified##*/}"
35898      if test "x$tool_basename" = "x$tool_specified"; then
35899        # A command without a complete path is provided, search $PATH.
35900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35901$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35902        # Extract the first word of "$tool_basename", so it can be a program name with args.
35903set dummy $tool_basename; ac_word=$2
35904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35905$as_echo_n "checking for $ac_word... " >&6; }
35906if ${ac_cv_path_NM+:} false; then :
35907  $as_echo_n "(cached) " >&6
35908else
35909  case $NM in
35910  [\\/]* | ?:[\\/]*)
35911  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35912  ;;
35913  *)
35914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35915for as_dir in $PATH
35916do
35917  IFS=$as_save_IFS
35918  test -z "$as_dir" && as_dir=.
35919    for ac_exec_ext in '' $ac_executable_extensions; do
35920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35921    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35923    break 2
35924  fi
35925done
35926  done
35927IFS=$as_save_IFS
35928
35929  ;;
35930esac
35931fi
35932NM=$ac_cv_path_NM
35933if test -n "$NM"; then
35934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35935$as_echo "$NM" >&6; }
35936else
35937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35938$as_echo "no" >&6; }
35939fi
35940
35941
35942        if test "x$NM" = x; then
35943          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35944        fi
35945      else
35946        # Otherwise we believe it is a complete path. Use it as it is.
35947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35948$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35950$as_echo_n "checking for NM... " >&6; }
35951        if test ! -x "$tool_specified"; then
35952          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35953$as_echo "not found" >&6; }
35954          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35955        fi
35956        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35957$as_echo "$tool_specified" >&6; }
35958      fi
35959    fi
35960  fi
35961
35962
35963
35964  # Only process if variable expands to non-empty
35965
35966  if test "x$NM" != x; then
35967    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35968
35969  # First separate the path from the arguments. This will split at the first
35970  # space.
35971  complete="$NM"
35972  path="${complete%% *}"
35973  tmp="$complete EOL"
35974  arguments="${tmp#* }"
35975
35976  # Input might be given as Windows format, start by converting to
35977  # unix format.
35978  new_path=`$CYGPATH -u "$path"`
35979
35980  # Now try to locate executable using which
35981  new_path=`$WHICH "$new_path" 2> /dev/null`
35982  # bat and cmd files are not always considered executable in cygwin causing which
35983  # to not find them
35984  if test "x$new_path" = x \
35985      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35986      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35987    new_path=`$CYGPATH -u "$path"`
35988  fi
35989  if test "x$new_path" = x; then
35990    # Oops. Which didn't find the executable.
35991    # The splitting of arguments from the executable at a space might have been incorrect,
35992    # since paths with space are more likely in Windows. Give it another try with the whole
35993    # argument.
35994    path="$complete"
35995    arguments="EOL"
35996    new_path=`$CYGPATH -u "$path"`
35997    new_path=`$WHICH "$new_path" 2> /dev/null`
35998    # bat and cmd files are not always considered executable in cygwin causing which
35999    # to not find them
36000    if test "x$new_path" = x \
36001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36003      new_path=`$CYGPATH -u "$path"`
36004    fi
36005    if test "x$new_path" = x; then
36006      # It's still not found. Now this is an unrecoverable error.
36007      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36008$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36009      has_space=`$ECHO "$complete" | $GREP " "`
36010      if test "x$has_space" != x; then
36011        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36012$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36013      fi
36014      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36015    fi
36016  fi
36017
36018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36021  # "foo.exe" is OK but "foo" is an error.
36022  #
36023  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36024  # It is also a way to make sure we got the proper file name for the real test later on.
36025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36026  if test "x$test_shortpath" = x; then
36027    # Short path failed, file does not exist as specified.
36028    # Try adding .exe or .cmd
36029    if test -f "${new_path}.exe"; then
36030      input_to_shortpath="${new_path}.exe"
36031    elif test -f "${new_path}.cmd"; then
36032      input_to_shortpath="${new_path}.cmd"
36033    else
36034      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
36035$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
36036      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36037$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36038      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36039    fi
36040  else
36041    input_to_shortpath="$new_path"
36042  fi
36043
36044  # Call helper function which possibly converts this using DOS-style short mode.
36045  # If so, the updated path is stored in $new_path.
36046  new_path="$input_to_shortpath"
36047
36048  input_path="$input_to_shortpath"
36049  # Check if we need to convert this using DOS-style short mode. If the path
36050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36051  # take no chances and rewrite it.
36052  # Note: m4 eats our [], so we need to use [ and ] instead.
36053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36054  if test "x$has_forbidden_chars" != x; then
36055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36056    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36057    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36058    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36059      # Going to short mode and back again did indeed matter. Since short mode is
36060      # case insensitive, let's make it lowercase to improve readability.
36061      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36062      # Now convert it back to Unix-style (cygpath)
36063      input_path=`$CYGPATH -u "$shortmode_path"`
36064      new_path="$input_path"
36065    fi
36066  fi
36067
36068  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36069  if test "x$test_cygdrive_prefix" = x; then
36070    # As a simple fix, exclude /usr/bin since it's not a real path.
36071    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36072      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36073      # a path prefixed by /cygdrive for fixpath to work.
36074      new_path="$CYGWIN_ROOT_PATH$input_path"
36075    fi
36076  fi
36077
36078  # remove trailing .exe if any
36079  new_path="${new_path/%.exe/}"
36080
36081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36082
36083  # First separate the path from the arguments. This will split at the first
36084  # space.
36085  complete="$NM"
36086  path="${complete%% *}"
36087  tmp="$complete EOL"
36088  arguments="${tmp#* }"
36089
36090  # Input might be given as Windows format, start by converting to
36091  # unix format.
36092  new_path="$path"
36093
36094  windows_path="$new_path"
36095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36096    unix_path=`$CYGPATH -u "$windows_path"`
36097    new_path="$unix_path"
36098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36100    new_path="$unix_path"
36101  fi
36102
36103
36104  # Now try to locate executable using which
36105  new_path=`$WHICH "$new_path" 2> /dev/null`
36106
36107  if test "x$new_path" = x; then
36108    # Oops. Which didn't find the executable.
36109    # The splitting of arguments from the executable at a space might have been incorrect,
36110    # since paths with space are more likely in Windows. Give it another try with the whole
36111    # argument.
36112    path="$complete"
36113    arguments="EOL"
36114    new_path="$path"
36115
36116  windows_path="$new_path"
36117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36118    unix_path=`$CYGPATH -u "$windows_path"`
36119    new_path="$unix_path"
36120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36122    new_path="$unix_path"
36123  fi
36124
36125
36126    new_path=`$WHICH "$new_path" 2> /dev/null`
36127    # bat and cmd files are not always considered executable in MSYS causing which
36128    # to not find them
36129    if test "x$new_path" = x \
36130        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36131        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36132      new_path="$path"
36133
36134  windows_path="$new_path"
36135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36136    unix_path=`$CYGPATH -u "$windows_path"`
36137    new_path="$unix_path"
36138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36140    new_path="$unix_path"
36141  fi
36142
36143    fi
36144
36145    if test "x$new_path" = x; then
36146      # It's still not found. Now this is an unrecoverable error.
36147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36148$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36149      has_space=`$ECHO "$complete" | $GREP " "`
36150      if test "x$has_space" != x; then
36151        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36152$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36153      fi
36154      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36155    fi
36156  fi
36157
36158  # Now new_path has a complete unix path to the binary
36159  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36160    # Keep paths in /bin as-is, but remove trailing .exe if any
36161    new_path="${new_path/%.exe/}"
36162    # Do not save /bin paths to all_fixpath_prefixes!
36163  else
36164    # Not in mixed or Windows style, start by that.
36165    new_path=`cmd //c echo $new_path`
36166
36167  input_path="$new_path"
36168  # Check if we need to convert this using DOS-style short mode. If the path
36169  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36170  # take no chances and rewrite it.
36171  # Note: m4 eats our [], so we need to use [ and ] instead.
36172  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36173  if test "x$has_forbidden_chars" != x; then
36174    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36175    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36176  fi
36177
36178    # Output is in $new_path
36179
36180  windows_path="$new_path"
36181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36182    unix_path=`$CYGPATH -u "$windows_path"`
36183    new_path="$unix_path"
36184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36186    new_path="$unix_path"
36187  fi
36188
36189    # remove trailing .exe if any
36190    new_path="${new_path/%.exe/}"
36191
36192    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36193    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36194  fi
36195
36196    else
36197      # We're on a unix platform. Hooray! :)
36198      # First separate the path from the arguments. This will split at the first
36199      # space.
36200      complete="$NM"
36201      path="${complete%% *}"
36202      tmp="$complete EOL"
36203      arguments="${tmp#* }"
36204
36205      # Cannot rely on the command "which" here since it doesn't always work.
36206      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36207      if test -z "$is_absolute_path"; then
36208        # Path to executable is not absolute. Find it.
36209        IFS_save="$IFS"
36210        IFS=:
36211        for p in $PATH; do
36212          if test -f "$p/$path" && test -x "$p/$path"; then
36213            new_path="$p/$path"
36214            break
36215          fi
36216        done
36217        IFS="$IFS_save"
36218      else
36219        # This is an absolute path, we can use it without further modifications.
36220        new_path="$path"
36221      fi
36222
36223      if test "x$new_path" = x; then
36224        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36225$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36226        has_space=`$ECHO "$complete" | $GREP " "`
36227        if test "x$has_space" != x; then
36228          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36229$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36230        fi
36231        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36232      fi
36233    fi
36234
36235    # Now join together the path and the arguments once again
36236    if test "x$arguments" != xEOL; then
36237      new_complete="$new_path ${arguments% *}"
36238    else
36239      new_complete="$new_path"
36240    fi
36241
36242    if test "x$complete" != "x$new_complete"; then
36243      NM="$new_complete"
36244      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36245$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36246    fi
36247  fi
36248
36249
36250
36251  # Publish this variable in the help.
36252
36253
36254  if test "x$GNM" = x; then
36255    # The variable is not set by user, try to locate tool using the code snippet
36256    for ac_prog in gnm
36257do
36258  # Extract the first word of "$ac_prog", so it can be a program name with args.
36259set dummy $ac_prog; ac_word=$2
36260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36261$as_echo_n "checking for $ac_word... " >&6; }
36262if ${ac_cv_path_GNM+:} false; then :
36263  $as_echo_n "(cached) " >&6
36264else
36265  case $GNM in
36266  [\\/]* | ?:[\\/]*)
36267  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36268  ;;
36269  *)
36270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36271for as_dir in $PATH
36272do
36273  IFS=$as_save_IFS
36274  test -z "$as_dir" && as_dir=.
36275    for ac_exec_ext in '' $ac_executable_extensions; do
36276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36277    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36279    break 2
36280  fi
36281done
36282  done
36283IFS=$as_save_IFS
36284
36285  ;;
36286esac
36287fi
36288GNM=$ac_cv_path_GNM
36289if test -n "$GNM"; then
36290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36291$as_echo "$GNM" >&6; }
36292else
36293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36294$as_echo "no" >&6; }
36295fi
36296
36297
36298  test -n "$GNM" && break
36299done
36300
36301  else
36302    # The variable is set, but is it from the command line or the environment?
36303
36304    # Try to remove the string !GNM! from our list.
36305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36307      # If it failed, the variable was not from the command line. Ignore it,
36308      # but warn the user (except for BASH, which is always set by the calling BASH).
36309      if test "xGNM" != xBASH; then
36310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36311$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36312      fi
36313      # Try to locate tool using the code snippet
36314      for ac_prog in gnm
36315do
36316  # Extract the first word of "$ac_prog", so it can be a program name with args.
36317set dummy $ac_prog; ac_word=$2
36318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36319$as_echo_n "checking for $ac_word... " >&6; }
36320if ${ac_cv_path_GNM+:} false; then :
36321  $as_echo_n "(cached) " >&6
36322else
36323  case $GNM in
36324  [\\/]* | ?:[\\/]*)
36325  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36326  ;;
36327  *)
36328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36329for as_dir in $PATH
36330do
36331  IFS=$as_save_IFS
36332  test -z "$as_dir" && as_dir=.
36333    for ac_exec_ext in '' $ac_executable_extensions; do
36334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36335    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36337    break 2
36338  fi
36339done
36340  done
36341IFS=$as_save_IFS
36342
36343  ;;
36344esac
36345fi
36346GNM=$ac_cv_path_GNM
36347if test -n "$GNM"; then
36348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36349$as_echo "$GNM" >&6; }
36350else
36351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36352$as_echo "no" >&6; }
36353fi
36354
36355
36356  test -n "$GNM" && break
36357done
36358
36359    else
36360      # If it succeeded, then it was overridden by the user. We will use it
36361      # for the tool.
36362
36363      # First remove it from the list of overridden variables, so we can test
36364      # for unknown variables in the end.
36365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36366
36367      # Check if the provided tool contains a complete path.
36368      tool_specified="$GNM"
36369      tool_basename="${tool_specified##*/}"
36370      if test "x$tool_basename" = "x$tool_specified"; then
36371        # A command without a complete path is provided, search $PATH.
36372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36373$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36374        # Extract the first word of "$tool_basename", so it can be a program name with args.
36375set dummy $tool_basename; ac_word=$2
36376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36377$as_echo_n "checking for $ac_word... " >&6; }
36378if ${ac_cv_path_GNM+:} false; then :
36379  $as_echo_n "(cached) " >&6
36380else
36381  case $GNM in
36382  [\\/]* | ?:[\\/]*)
36383  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36384  ;;
36385  *)
36386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36387for as_dir in $PATH
36388do
36389  IFS=$as_save_IFS
36390  test -z "$as_dir" && as_dir=.
36391    for ac_exec_ext in '' $ac_executable_extensions; do
36392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36393    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36395    break 2
36396  fi
36397done
36398  done
36399IFS=$as_save_IFS
36400
36401  ;;
36402esac
36403fi
36404GNM=$ac_cv_path_GNM
36405if test -n "$GNM"; then
36406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36407$as_echo "$GNM" >&6; }
36408else
36409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36410$as_echo "no" >&6; }
36411fi
36412
36413
36414        if test "x$GNM" = x; then
36415          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36416        fi
36417      else
36418        # Otherwise we believe it is a complete path. Use it as it is.
36419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36420$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36422$as_echo_n "checking for GNM... " >&6; }
36423        if test ! -x "$tool_specified"; then
36424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36425$as_echo "not found" >&6; }
36426          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36427        fi
36428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36429$as_echo "$tool_specified" >&6; }
36430      fi
36431    fi
36432  fi
36433
36434
36435
36436  # Only process if variable expands to non-empty
36437
36438  if test "x$GNM" != x; then
36439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36440
36441  # First separate the path from the arguments. This will split at the first
36442  # space.
36443  complete="$GNM"
36444  path="${complete%% *}"
36445  tmp="$complete EOL"
36446  arguments="${tmp#* }"
36447
36448  # Input might be given as Windows format, start by converting to
36449  # unix format.
36450  new_path=`$CYGPATH -u "$path"`
36451
36452  # Now try to locate executable using which
36453  new_path=`$WHICH "$new_path" 2> /dev/null`
36454  # bat and cmd files are not always considered executable in cygwin causing which
36455  # to not find them
36456  if test "x$new_path" = x \
36457      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36458      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36459    new_path=`$CYGPATH -u "$path"`
36460  fi
36461  if test "x$new_path" = x; then
36462    # Oops. Which didn't find the executable.
36463    # The splitting of arguments from the executable at a space might have been incorrect,
36464    # since paths with space are more likely in Windows. Give it another try with the whole
36465    # argument.
36466    path="$complete"
36467    arguments="EOL"
36468    new_path=`$CYGPATH -u "$path"`
36469    new_path=`$WHICH "$new_path" 2> /dev/null`
36470    # bat and cmd files are not always considered executable in cygwin causing which
36471    # to not find them
36472    if test "x$new_path" = x \
36473        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36474        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36475      new_path=`$CYGPATH -u "$path"`
36476    fi
36477    if test "x$new_path" = x; then
36478      # It's still not found. Now this is an unrecoverable error.
36479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36480$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36481      has_space=`$ECHO "$complete" | $GREP " "`
36482      if test "x$has_space" != x; then
36483        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36484$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36485      fi
36486      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36487    fi
36488  fi
36489
36490  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36491  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36492  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36493  # "foo.exe" is OK but "foo" is an error.
36494  #
36495  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36496  # It is also a way to make sure we got the proper file name for the real test later on.
36497  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36498  if test "x$test_shortpath" = x; then
36499    # Short path failed, file does not exist as specified.
36500    # Try adding .exe or .cmd
36501    if test -f "${new_path}.exe"; then
36502      input_to_shortpath="${new_path}.exe"
36503    elif test -f "${new_path}.cmd"; then
36504      input_to_shortpath="${new_path}.cmd"
36505    else
36506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36507$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36508      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36509$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36510      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36511    fi
36512  else
36513    input_to_shortpath="$new_path"
36514  fi
36515
36516  # Call helper function which possibly converts this using DOS-style short mode.
36517  # If so, the updated path is stored in $new_path.
36518  new_path="$input_to_shortpath"
36519
36520  input_path="$input_to_shortpath"
36521  # Check if we need to convert this using DOS-style short mode. If the path
36522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36523  # take no chances and rewrite it.
36524  # Note: m4 eats our [], so we need to use [ and ] instead.
36525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36526  if test "x$has_forbidden_chars" != x; then
36527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36528    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36529    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36530    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36531      # Going to short mode and back again did indeed matter. Since short mode is
36532      # case insensitive, let's make it lowercase to improve readability.
36533      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36534      # Now convert it back to Unix-style (cygpath)
36535      input_path=`$CYGPATH -u "$shortmode_path"`
36536      new_path="$input_path"
36537    fi
36538  fi
36539
36540  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36541  if test "x$test_cygdrive_prefix" = x; then
36542    # As a simple fix, exclude /usr/bin since it's not a real path.
36543    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36544      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36545      # a path prefixed by /cygdrive for fixpath to work.
36546      new_path="$CYGWIN_ROOT_PATH$input_path"
36547    fi
36548  fi
36549
36550  # remove trailing .exe if any
36551  new_path="${new_path/%.exe/}"
36552
36553    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36554
36555  # First separate the path from the arguments. This will split at the first
36556  # space.
36557  complete="$GNM"
36558  path="${complete%% *}"
36559  tmp="$complete EOL"
36560  arguments="${tmp#* }"
36561
36562  # Input might be given as Windows format, start by converting to
36563  # unix format.
36564  new_path="$path"
36565
36566  windows_path="$new_path"
36567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36568    unix_path=`$CYGPATH -u "$windows_path"`
36569    new_path="$unix_path"
36570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36572    new_path="$unix_path"
36573  fi
36574
36575
36576  # Now try to locate executable using which
36577  new_path=`$WHICH "$new_path" 2> /dev/null`
36578
36579  if test "x$new_path" = x; then
36580    # Oops. Which didn't find the executable.
36581    # The splitting of arguments from the executable at a space might have been incorrect,
36582    # since paths with space are more likely in Windows. Give it another try with the whole
36583    # argument.
36584    path="$complete"
36585    arguments="EOL"
36586    new_path="$path"
36587
36588  windows_path="$new_path"
36589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36590    unix_path=`$CYGPATH -u "$windows_path"`
36591    new_path="$unix_path"
36592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36594    new_path="$unix_path"
36595  fi
36596
36597
36598    new_path=`$WHICH "$new_path" 2> /dev/null`
36599    # bat and cmd files are not always considered executable in MSYS causing which
36600    # to not find them
36601    if test "x$new_path" = x \
36602        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36603        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36604      new_path="$path"
36605
36606  windows_path="$new_path"
36607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36608    unix_path=`$CYGPATH -u "$windows_path"`
36609    new_path="$unix_path"
36610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36612    new_path="$unix_path"
36613  fi
36614
36615    fi
36616
36617    if test "x$new_path" = x; then
36618      # It's still not found. Now this is an unrecoverable error.
36619      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36620$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36621      has_space=`$ECHO "$complete" | $GREP " "`
36622      if test "x$has_space" != x; then
36623        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36624$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36625      fi
36626      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36627    fi
36628  fi
36629
36630  # Now new_path has a complete unix path to the binary
36631  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36632    # Keep paths in /bin as-is, but remove trailing .exe if any
36633    new_path="${new_path/%.exe/}"
36634    # Do not save /bin paths to all_fixpath_prefixes!
36635  else
36636    # Not in mixed or Windows style, start by that.
36637    new_path=`cmd //c echo $new_path`
36638
36639  input_path="$new_path"
36640  # Check if we need to convert this using DOS-style short mode. If the path
36641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36642  # take no chances and rewrite it.
36643  # Note: m4 eats our [], so we need to use [ and ] instead.
36644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36645  if test "x$has_forbidden_chars" != x; then
36646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36647    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36648  fi
36649
36650    # Output is in $new_path
36651
36652  windows_path="$new_path"
36653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36654    unix_path=`$CYGPATH -u "$windows_path"`
36655    new_path="$unix_path"
36656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36658    new_path="$unix_path"
36659  fi
36660
36661    # remove trailing .exe if any
36662    new_path="${new_path/%.exe/}"
36663
36664    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36665    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36666  fi
36667
36668    else
36669      # We're on a unix platform. Hooray! :)
36670      # First separate the path from the arguments. This will split at the first
36671      # space.
36672      complete="$GNM"
36673      path="${complete%% *}"
36674      tmp="$complete EOL"
36675      arguments="${tmp#* }"
36676
36677      # Cannot rely on the command "which" here since it doesn't always work.
36678      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36679      if test -z "$is_absolute_path"; then
36680        # Path to executable is not absolute. Find it.
36681        IFS_save="$IFS"
36682        IFS=:
36683        for p in $PATH; do
36684          if test -f "$p/$path" && test -x "$p/$path"; then
36685            new_path="$p/$path"
36686            break
36687          fi
36688        done
36689        IFS="$IFS_save"
36690      else
36691        # This is an absolute path, we can use it without further modifications.
36692        new_path="$path"
36693      fi
36694
36695      if test "x$new_path" = x; then
36696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36697$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36698        has_space=`$ECHO "$complete" | $GREP " "`
36699        if test "x$has_space" != x; then
36700          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36701$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36702        fi
36703        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36704      fi
36705    fi
36706
36707    # Now join together the path and the arguments once again
36708    if test "x$arguments" != xEOL; then
36709      new_complete="$new_path ${arguments% *}"
36710    else
36711      new_complete="$new_path"
36712    fi
36713
36714    if test "x$complete" != "x$new_complete"; then
36715      GNM="$new_complete"
36716      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36717$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36718    fi
36719  fi
36720
36721  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36722    # FIXME: we should unify this with the solaris case above.
36723
36724
36725  # Publish this variable in the help.
36726
36727
36728  if test "x$STRIP" = x; then
36729    # The variable is not set by user, try to locate tool using the code snippet
36730    if test -n "$ac_tool_prefix"; then
36731  for ac_prog in strip
36732  do
36733    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36734set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36736$as_echo_n "checking for $ac_word... " >&6; }
36737if ${ac_cv_prog_STRIP+:} false; then :
36738  $as_echo_n "(cached) " >&6
36739else
36740  if test -n "$STRIP"; then
36741  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36742else
36743as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36744for as_dir in $PATH
36745do
36746  IFS=$as_save_IFS
36747  test -z "$as_dir" && as_dir=.
36748    for ac_exec_ext in '' $ac_executable_extensions; do
36749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36750    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36752    break 2
36753  fi
36754done
36755  done
36756IFS=$as_save_IFS
36757
36758fi
36759fi
36760STRIP=$ac_cv_prog_STRIP
36761if test -n "$STRIP"; then
36762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36763$as_echo "$STRIP" >&6; }
36764else
36765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36766$as_echo "no" >&6; }
36767fi
36768
36769
36770    test -n "$STRIP" && break
36771  done
36772fi
36773if test -z "$STRIP"; then
36774  ac_ct_STRIP=$STRIP
36775  for ac_prog in strip
36776do
36777  # Extract the first word of "$ac_prog", so it can be a program name with args.
36778set dummy $ac_prog; ac_word=$2
36779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36780$as_echo_n "checking for $ac_word... " >&6; }
36781if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36782  $as_echo_n "(cached) " >&6
36783else
36784  if test -n "$ac_ct_STRIP"; then
36785  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36786else
36787as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36788for as_dir in $PATH
36789do
36790  IFS=$as_save_IFS
36791  test -z "$as_dir" && as_dir=.
36792    for ac_exec_ext in '' $ac_executable_extensions; do
36793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36794    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36796    break 2
36797  fi
36798done
36799  done
36800IFS=$as_save_IFS
36801
36802fi
36803fi
36804ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36805if test -n "$ac_ct_STRIP"; then
36806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36807$as_echo "$ac_ct_STRIP" >&6; }
36808else
36809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36810$as_echo "no" >&6; }
36811fi
36812
36813
36814  test -n "$ac_ct_STRIP" && break
36815done
36816
36817  if test "x$ac_ct_STRIP" = x; then
36818    STRIP=""
36819  else
36820    case $cross_compiling:$ac_tool_warned in
36821yes:)
36822{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36823$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36824ac_tool_warned=yes ;;
36825esac
36826    STRIP=$ac_ct_STRIP
36827  fi
36828fi
36829
36830  else
36831    # The variable is set, but is it from the command line or the environment?
36832
36833    # Try to remove the string !STRIP! from our list.
36834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36836      # If it failed, the variable was not from the command line. Ignore it,
36837      # but warn the user (except for BASH, which is always set by the calling BASH).
36838      if test "xSTRIP" != xBASH; then
36839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36840$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36841      fi
36842      # Try to locate tool using the code snippet
36843      if test -n "$ac_tool_prefix"; then
36844  for ac_prog in strip
36845  do
36846    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36847set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36849$as_echo_n "checking for $ac_word... " >&6; }
36850if ${ac_cv_prog_STRIP+:} false; then :
36851  $as_echo_n "(cached) " >&6
36852else
36853  if test -n "$STRIP"; then
36854  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36855else
36856as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36857for as_dir in $PATH
36858do
36859  IFS=$as_save_IFS
36860  test -z "$as_dir" && as_dir=.
36861    for ac_exec_ext in '' $ac_executable_extensions; do
36862  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36863    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36864    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36865    break 2
36866  fi
36867done
36868  done
36869IFS=$as_save_IFS
36870
36871fi
36872fi
36873STRIP=$ac_cv_prog_STRIP
36874if test -n "$STRIP"; then
36875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36876$as_echo "$STRIP" >&6; }
36877else
36878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36879$as_echo "no" >&6; }
36880fi
36881
36882
36883    test -n "$STRIP" && break
36884  done
36885fi
36886if test -z "$STRIP"; then
36887  ac_ct_STRIP=$STRIP
36888  for ac_prog in strip
36889do
36890  # Extract the first word of "$ac_prog", so it can be a program name with args.
36891set dummy $ac_prog; ac_word=$2
36892{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36893$as_echo_n "checking for $ac_word... " >&6; }
36894if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36895  $as_echo_n "(cached) " >&6
36896else
36897  if test -n "$ac_ct_STRIP"; then
36898  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36899else
36900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36901for as_dir in $PATH
36902do
36903  IFS=$as_save_IFS
36904  test -z "$as_dir" && as_dir=.
36905    for ac_exec_ext in '' $ac_executable_extensions; do
36906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36907    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36909    break 2
36910  fi
36911done
36912  done
36913IFS=$as_save_IFS
36914
36915fi
36916fi
36917ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36918if test -n "$ac_ct_STRIP"; then
36919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36920$as_echo "$ac_ct_STRIP" >&6; }
36921else
36922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36923$as_echo "no" >&6; }
36924fi
36925
36926
36927  test -n "$ac_ct_STRIP" && break
36928done
36929
36930  if test "x$ac_ct_STRIP" = x; then
36931    STRIP=""
36932  else
36933    case $cross_compiling:$ac_tool_warned in
36934yes:)
36935{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36936$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36937ac_tool_warned=yes ;;
36938esac
36939    STRIP=$ac_ct_STRIP
36940  fi
36941fi
36942
36943    else
36944      # If it succeeded, then it was overridden by the user. We will use it
36945      # for the tool.
36946
36947      # First remove it from the list of overridden variables, so we can test
36948      # for unknown variables in the end.
36949      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36950
36951      # Check if the provided tool contains a complete path.
36952      tool_specified="$STRIP"
36953      tool_basename="${tool_specified##*/}"
36954      if test "x$tool_basename" = "x$tool_specified"; then
36955        # A command without a complete path is provided, search $PATH.
36956        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36957$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36958        # Extract the first word of "$tool_basename", so it can be a program name with args.
36959set dummy $tool_basename; ac_word=$2
36960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36961$as_echo_n "checking for $ac_word... " >&6; }
36962if ${ac_cv_path_STRIP+:} false; then :
36963  $as_echo_n "(cached) " >&6
36964else
36965  case $STRIP in
36966  [\\/]* | ?:[\\/]*)
36967  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36968  ;;
36969  *)
36970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36971for as_dir in $PATH
36972do
36973  IFS=$as_save_IFS
36974  test -z "$as_dir" && as_dir=.
36975    for ac_exec_ext in '' $ac_executable_extensions; do
36976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36977    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36979    break 2
36980  fi
36981done
36982  done
36983IFS=$as_save_IFS
36984
36985  ;;
36986esac
36987fi
36988STRIP=$ac_cv_path_STRIP
36989if test -n "$STRIP"; then
36990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36991$as_echo "$STRIP" >&6; }
36992else
36993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36994$as_echo "no" >&6; }
36995fi
36996
36997
36998        if test "x$STRIP" = x; then
36999          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37000        fi
37001      else
37002        # Otherwise we believe it is a complete path. Use it as it is.
37003        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37004$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37005        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37006$as_echo_n "checking for STRIP... " >&6; }
37007        if test ! -x "$tool_specified"; then
37008          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37009$as_echo "not found" >&6; }
37010          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37011        fi
37012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37013$as_echo "$tool_specified" >&6; }
37014      fi
37015    fi
37016  fi
37017
37018
37019
37020  # Only process if variable expands to non-empty
37021
37022  if test "x$STRIP" != x; then
37023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37024
37025  # First separate the path from the arguments. This will split at the first
37026  # space.
37027  complete="$STRIP"
37028  path="${complete%% *}"
37029  tmp="$complete EOL"
37030  arguments="${tmp#* }"
37031
37032  # Input might be given as Windows format, start by converting to
37033  # unix format.
37034  new_path=`$CYGPATH -u "$path"`
37035
37036  # Now try to locate executable using which
37037  new_path=`$WHICH "$new_path" 2> /dev/null`
37038  # bat and cmd files are not always considered executable in cygwin causing which
37039  # to not find them
37040  if test "x$new_path" = x \
37041      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37042      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37043    new_path=`$CYGPATH -u "$path"`
37044  fi
37045  if test "x$new_path" = x; then
37046    # Oops. Which didn't find the executable.
37047    # The splitting of arguments from the executable at a space might have been incorrect,
37048    # since paths with space are more likely in Windows. Give it another try with the whole
37049    # argument.
37050    path="$complete"
37051    arguments="EOL"
37052    new_path=`$CYGPATH -u "$path"`
37053    new_path=`$WHICH "$new_path" 2> /dev/null`
37054    # bat and cmd files are not always considered executable in cygwin causing which
37055    # to not find them
37056    if test "x$new_path" = x \
37057        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37058        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37059      new_path=`$CYGPATH -u "$path"`
37060    fi
37061    if test "x$new_path" = x; then
37062      # It's still not found. Now this is an unrecoverable error.
37063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37064$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37065      has_space=`$ECHO "$complete" | $GREP " "`
37066      if test "x$has_space" != x; then
37067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37069      fi
37070      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37071    fi
37072  fi
37073
37074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37077  # "foo.exe" is OK but "foo" is an error.
37078  #
37079  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37080  # It is also a way to make sure we got the proper file name for the real test later on.
37081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37082  if test "x$test_shortpath" = x; then
37083    # Short path failed, file does not exist as specified.
37084    # Try adding .exe or .cmd
37085    if test -f "${new_path}.exe"; then
37086      input_to_shortpath="${new_path}.exe"
37087    elif test -f "${new_path}.cmd"; then
37088      input_to_shortpath="${new_path}.cmd"
37089    else
37090      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37091$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37092      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37093$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37094      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37095    fi
37096  else
37097    input_to_shortpath="$new_path"
37098  fi
37099
37100  # Call helper function which possibly converts this using DOS-style short mode.
37101  # If so, the updated path is stored in $new_path.
37102  new_path="$input_to_shortpath"
37103
37104  input_path="$input_to_shortpath"
37105  # Check if we need to convert this using DOS-style short mode. If the path
37106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37107  # take no chances and rewrite it.
37108  # Note: m4 eats our [], so we need to use [ and ] instead.
37109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37110  if test "x$has_forbidden_chars" != x; then
37111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37112    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37113    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37114    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37115      # Going to short mode and back again did indeed matter. Since short mode is
37116      # case insensitive, let's make it lowercase to improve readability.
37117      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37118      # Now convert it back to Unix-style (cygpath)
37119      input_path=`$CYGPATH -u "$shortmode_path"`
37120      new_path="$input_path"
37121    fi
37122  fi
37123
37124  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37125  if test "x$test_cygdrive_prefix" = x; then
37126    # As a simple fix, exclude /usr/bin since it's not a real path.
37127    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37128      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37129      # a path prefixed by /cygdrive for fixpath to work.
37130      new_path="$CYGWIN_ROOT_PATH$input_path"
37131    fi
37132  fi
37133
37134  # remove trailing .exe if any
37135  new_path="${new_path/%.exe/}"
37136
37137    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37138
37139  # First separate the path from the arguments. This will split at the first
37140  # space.
37141  complete="$STRIP"
37142  path="${complete%% *}"
37143  tmp="$complete EOL"
37144  arguments="${tmp#* }"
37145
37146  # Input might be given as Windows format, start by converting to
37147  # unix format.
37148  new_path="$path"
37149
37150  windows_path="$new_path"
37151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37152    unix_path=`$CYGPATH -u "$windows_path"`
37153    new_path="$unix_path"
37154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37156    new_path="$unix_path"
37157  fi
37158
37159
37160  # Now try to locate executable using which
37161  new_path=`$WHICH "$new_path" 2> /dev/null`
37162
37163  if test "x$new_path" = x; then
37164    # Oops. Which didn't find the executable.
37165    # The splitting of arguments from the executable at a space might have been incorrect,
37166    # since paths with space are more likely in Windows. Give it another try with the whole
37167    # argument.
37168    path="$complete"
37169    arguments="EOL"
37170    new_path="$path"
37171
37172  windows_path="$new_path"
37173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37174    unix_path=`$CYGPATH -u "$windows_path"`
37175    new_path="$unix_path"
37176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37178    new_path="$unix_path"
37179  fi
37180
37181
37182    new_path=`$WHICH "$new_path" 2> /dev/null`
37183    # bat and cmd files are not always considered executable in MSYS causing which
37184    # to not find them
37185    if test "x$new_path" = x \
37186        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37187        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37188      new_path="$path"
37189
37190  windows_path="$new_path"
37191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37192    unix_path=`$CYGPATH -u "$windows_path"`
37193    new_path="$unix_path"
37194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37196    new_path="$unix_path"
37197  fi
37198
37199    fi
37200
37201    if test "x$new_path" = x; then
37202      # It's still not found. Now this is an unrecoverable error.
37203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37204$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37205      has_space=`$ECHO "$complete" | $GREP " "`
37206      if test "x$has_space" != x; then
37207        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37208$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37209      fi
37210      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37211    fi
37212  fi
37213
37214  # Now new_path has a complete unix path to the binary
37215  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37216    # Keep paths in /bin as-is, but remove trailing .exe if any
37217    new_path="${new_path/%.exe/}"
37218    # Do not save /bin paths to all_fixpath_prefixes!
37219  else
37220    # Not in mixed or Windows style, start by that.
37221    new_path=`cmd //c echo $new_path`
37222
37223  input_path="$new_path"
37224  # Check if we need to convert this using DOS-style short mode. If the path
37225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37226  # take no chances and rewrite it.
37227  # Note: m4 eats our [], so we need to use [ and ] instead.
37228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37229  if test "x$has_forbidden_chars" != x; then
37230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37232  fi
37233
37234    # Output is in $new_path
37235
37236  windows_path="$new_path"
37237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37238    unix_path=`$CYGPATH -u "$windows_path"`
37239    new_path="$unix_path"
37240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37242    new_path="$unix_path"
37243  fi
37244
37245    # remove trailing .exe if any
37246    new_path="${new_path/%.exe/}"
37247
37248    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37249    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37250  fi
37251
37252    else
37253      # We're on a unix platform. Hooray! :)
37254      # First separate the path from the arguments. This will split at the first
37255      # space.
37256      complete="$STRIP"
37257      path="${complete%% *}"
37258      tmp="$complete EOL"
37259      arguments="${tmp#* }"
37260
37261      # Cannot rely on the command "which" here since it doesn't always work.
37262      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37263      if test -z "$is_absolute_path"; then
37264        # Path to executable is not absolute. Find it.
37265        IFS_save="$IFS"
37266        IFS=:
37267        for p in $PATH; do
37268          if test -f "$p/$path" && test -x "$p/$path"; then
37269            new_path="$p/$path"
37270            break
37271          fi
37272        done
37273        IFS="$IFS_save"
37274      else
37275        # This is an absolute path, we can use it without further modifications.
37276        new_path="$path"
37277      fi
37278
37279      if test "x$new_path" = x; then
37280        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37281$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37282        has_space=`$ECHO "$complete" | $GREP " "`
37283        if test "x$has_space" != x; then
37284          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37285$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37286        fi
37287        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37288      fi
37289    fi
37290
37291    # Now join together the path and the arguments once again
37292    if test "x$arguments" != xEOL; then
37293      new_complete="$new_path ${arguments% *}"
37294    else
37295      new_complete="$new_path"
37296    fi
37297
37298    if test "x$complete" != "x$new_complete"; then
37299      STRIP="$new_complete"
37300      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37301$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37302    fi
37303  fi
37304
37305
37306
37307  # Publish this variable in the help.
37308
37309
37310  if test "x$NM" = x; then
37311    # The variable is not set by user, try to locate tool using the code snippet
37312    if test -n "$ac_tool_prefix"; then
37313  for ac_prog in nm
37314  do
37315    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37316set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37318$as_echo_n "checking for $ac_word... " >&6; }
37319if ${ac_cv_prog_NM+:} false; then :
37320  $as_echo_n "(cached) " >&6
37321else
37322  if test -n "$NM"; then
37323  ac_cv_prog_NM="$NM" # Let the user override the test.
37324else
37325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37326for as_dir in $PATH
37327do
37328  IFS=$as_save_IFS
37329  test -z "$as_dir" && as_dir=.
37330    for ac_exec_ext in '' $ac_executable_extensions; do
37331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37332    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37334    break 2
37335  fi
37336done
37337  done
37338IFS=$as_save_IFS
37339
37340fi
37341fi
37342NM=$ac_cv_prog_NM
37343if test -n "$NM"; then
37344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37345$as_echo "$NM" >&6; }
37346else
37347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37348$as_echo "no" >&6; }
37349fi
37350
37351
37352    test -n "$NM" && break
37353  done
37354fi
37355if test -z "$NM"; then
37356  ac_ct_NM=$NM
37357  for ac_prog in nm
37358do
37359  # Extract the first word of "$ac_prog", so it can be a program name with args.
37360set dummy $ac_prog; ac_word=$2
37361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37362$as_echo_n "checking for $ac_word... " >&6; }
37363if ${ac_cv_prog_ac_ct_NM+:} false; then :
37364  $as_echo_n "(cached) " >&6
37365else
37366  if test -n "$ac_ct_NM"; then
37367  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37368else
37369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37370for as_dir in $PATH
37371do
37372  IFS=$as_save_IFS
37373  test -z "$as_dir" && as_dir=.
37374    for ac_exec_ext in '' $ac_executable_extensions; do
37375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37376    ac_cv_prog_ac_ct_NM="$ac_prog"
37377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37378    break 2
37379  fi
37380done
37381  done
37382IFS=$as_save_IFS
37383
37384fi
37385fi
37386ac_ct_NM=$ac_cv_prog_ac_ct_NM
37387if test -n "$ac_ct_NM"; then
37388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37389$as_echo "$ac_ct_NM" >&6; }
37390else
37391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37392$as_echo "no" >&6; }
37393fi
37394
37395
37396  test -n "$ac_ct_NM" && break
37397done
37398
37399  if test "x$ac_ct_NM" = x; then
37400    NM=""
37401  else
37402    case $cross_compiling:$ac_tool_warned in
37403yes:)
37404{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37405$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37406ac_tool_warned=yes ;;
37407esac
37408    NM=$ac_ct_NM
37409  fi
37410fi
37411
37412  else
37413    # The variable is set, but is it from the command line or the environment?
37414
37415    # Try to remove the string !NM! from our list.
37416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37418      # If it failed, the variable was not from the command line. Ignore it,
37419      # but warn the user (except for BASH, which is always set by the calling BASH).
37420      if test "xNM" != xBASH; then
37421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37422$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37423      fi
37424      # Try to locate tool using the code snippet
37425      if test -n "$ac_tool_prefix"; then
37426  for ac_prog in nm
37427  do
37428    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37429set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37431$as_echo_n "checking for $ac_word... " >&6; }
37432if ${ac_cv_prog_NM+:} false; then :
37433  $as_echo_n "(cached) " >&6
37434else
37435  if test -n "$NM"; then
37436  ac_cv_prog_NM="$NM" # Let the user override the test.
37437else
37438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37439for as_dir in $PATH
37440do
37441  IFS=$as_save_IFS
37442  test -z "$as_dir" && as_dir=.
37443    for ac_exec_ext in '' $ac_executable_extensions; do
37444  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37445    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37446    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37447    break 2
37448  fi
37449done
37450  done
37451IFS=$as_save_IFS
37452
37453fi
37454fi
37455NM=$ac_cv_prog_NM
37456if test -n "$NM"; then
37457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37458$as_echo "$NM" >&6; }
37459else
37460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37461$as_echo "no" >&6; }
37462fi
37463
37464
37465    test -n "$NM" && break
37466  done
37467fi
37468if test -z "$NM"; then
37469  ac_ct_NM=$NM
37470  for ac_prog in nm
37471do
37472  # Extract the first word of "$ac_prog", so it can be a program name with args.
37473set dummy $ac_prog; ac_word=$2
37474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37475$as_echo_n "checking for $ac_word... " >&6; }
37476if ${ac_cv_prog_ac_ct_NM+:} false; then :
37477  $as_echo_n "(cached) " >&6
37478else
37479  if test -n "$ac_ct_NM"; then
37480  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37481else
37482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37483for as_dir in $PATH
37484do
37485  IFS=$as_save_IFS
37486  test -z "$as_dir" && as_dir=.
37487    for ac_exec_ext in '' $ac_executable_extensions; do
37488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37489    ac_cv_prog_ac_ct_NM="$ac_prog"
37490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37491    break 2
37492  fi
37493done
37494  done
37495IFS=$as_save_IFS
37496
37497fi
37498fi
37499ac_ct_NM=$ac_cv_prog_ac_ct_NM
37500if test -n "$ac_ct_NM"; then
37501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37502$as_echo "$ac_ct_NM" >&6; }
37503else
37504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37505$as_echo "no" >&6; }
37506fi
37507
37508
37509  test -n "$ac_ct_NM" && break
37510done
37511
37512  if test "x$ac_ct_NM" = x; then
37513    NM=""
37514  else
37515    case $cross_compiling:$ac_tool_warned in
37516yes:)
37517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37519ac_tool_warned=yes ;;
37520esac
37521    NM=$ac_ct_NM
37522  fi
37523fi
37524
37525    else
37526      # If it succeeded, then it was overridden by the user. We will use it
37527      # for the tool.
37528
37529      # First remove it from the list of overridden variables, so we can test
37530      # for unknown variables in the end.
37531      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37532
37533      # Check if the provided tool contains a complete path.
37534      tool_specified="$NM"
37535      tool_basename="${tool_specified##*/}"
37536      if test "x$tool_basename" = "x$tool_specified"; then
37537        # A command without a complete path is provided, search $PATH.
37538        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37539$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37540        # Extract the first word of "$tool_basename", so it can be a program name with args.
37541set dummy $tool_basename; ac_word=$2
37542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37543$as_echo_n "checking for $ac_word... " >&6; }
37544if ${ac_cv_path_NM+:} false; then :
37545  $as_echo_n "(cached) " >&6
37546else
37547  case $NM in
37548  [\\/]* | ?:[\\/]*)
37549  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37550  ;;
37551  *)
37552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37553for as_dir in $PATH
37554do
37555  IFS=$as_save_IFS
37556  test -z "$as_dir" && as_dir=.
37557    for ac_exec_ext in '' $ac_executable_extensions; do
37558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37559    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37561    break 2
37562  fi
37563done
37564  done
37565IFS=$as_save_IFS
37566
37567  ;;
37568esac
37569fi
37570NM=$ac_cv_path_NM
37571if test -n "$NM"; then
37572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37573$as_echo "$NM" >&6; }
37574else
37575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37576$as_echo "no" >&6; }
37577fi
37578
37579
37580        if test "x$NM" = x; then
37581          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37582        fi
37583      else
37584        # Otherwise we believe it is a complete path. Use it as it is.
37585        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37586$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37587        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37588$as_echo_n "checking for NM... " >&6; }
37589        if test ! -x "$tool_specified"; then
37590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37591$as_echo "not found" >&6; }
37592          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37593        fi
37594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37595$as_echo "$tool_specified" >&6; }
37596      fi
37597    fi
37598  fi
37599
37600
37601
37602  # Only process if variable expands to non-empty
37603
37604  if test "x$NM" != x; then
37605    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37606
37607  # First separate the path from the arguments. This will split at the first
37608  # space.
37609  complete="$NM"
37610  path="${complete%% *}"
37611  tmp="$complete EOL"
37612  arguments="${tmp#* }"
37613
37614  # Input might be given as Windows format, start by converting to
37615  # unix format.
37616  new_path=`$CYGPATH -u "$path"`
37617
37618  # Now try to locate executable using which
37619  new_path=`$WHICH "$new_path" 2> /dev/null`
37620  # bat and cmd files are not always considered executable in cygwin causing which
37621  # to not find them
37622  if test "x$new_path" = x \
37623      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37624      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37625    new_path=`$CYGPATH -u "$path"`
37626  fi
37627  if test "x$new_path" = x; then
37628    # Oops. Which didn't find the executable.
37629    # The splitting of arguments from the executable at a space might have been incorrect,
37630    # since paths with space are more likely in Windows. Give it another try with the whole
37631    # argument.
37632    path="$complete"
37633    arguments="EOL"
37634    new_path=`$CYGPATH -u "$path"`
37635    new_path=`$WHICH "$new_path" 2> /dev/null`
37636    # bat and cmd files are not always considered executable in cygwin causing which
37637    # to not find them
37638    if test "x$new_path" = x \
37639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37641      new_path=`$CYGPATH -u "$path"`
37642    fi
37643    if test "x$new_path" = x; then
37644      # It's still not found. Now this is an unrecoverable error.
37645      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37646$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37647      has_space=`$ECHO "$complete" | $GREP " "`
37648      if test "x$has_space" != x; then
37649        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37650$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37651      fi
37652      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37653    fi
37654  fi
37655
37656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37659  # "foo.exe" is OK but "foo" is an error.
37660  #
37661  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37662  # It is also a way to make sure we got the proper file name for the real test later on.
37663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37664  if test "x$test_shortpath" = x; then
37665    # Short path failed, file does not exist as specified.
37666    # Try adding .exe or .cmd
37667    if test -f "${new_path}.exe"; then
37668      input_to_shortpath="${new_path}.exe"
37669    elif test -f "${new_path}.cmd"; then
37670      input_to_shortpath="${new_path}.cmd"
37671    else
37672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37673$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37674      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37675$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37676      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37677    fi
37678  else
37679    input_to_shortpath="$new_path"
37680  fi
37681
37682  # Call helper function which possibly converts this using DOS-style short mode.
37683  # If so, the updated path is stored in $new_path.
37684  new_path="$input_to_shortpath"
37685
37686  input_path="$input_to_shortpath"
37687  # Check if we need to convert this using DOS-style short mode. If the path
37688  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37689  # take no chances and rewrite it.
37690  # Note: m4 eats our [], so we need to use [ and ] instead.
37691  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37692  if test "x$has_forbidden_chars" != x; then
37693    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37694    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37695    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37696    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37697      # Going to short mode and back again did indeed matter. Since short mode is
37698      # case insensitive, let's make it lowercase to improve readability.
37699      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37700      # Now convert it back to Unix-style (cygpath)
37701      input_path=`$CYGPATH -u "$shortmode_path"`
37702      new_path="$input_path"
37703    fi
37704  fi
37705
37706  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37707  if test "x$test_cygdrive_prefix" = x; then
37708    # As a simple fix, exclude /usr/bin since it's not a real path.
37709    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37710      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37711      # a path prefixed by /cygdrive for fixpath to work.
37712      new_path="$CYGWIN_ROOT_PATH$input_path"
37713    fi
37714  fi
37715
37716  # remove trailing .exe if any
37717  new_path="${new_path/%.exe/}"
37718
37719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37720
37721  # First separate the path from the arguments. This will split at the first
37722  # space.
37723  complete="$NM"
37724  path="${complete%% *}"
37725  tmp="$complete EOL"
37726  arguments="${tmp#* }"
37727
37728  # Input might be given as Windows format, start by converting to
37729  # unix format.
37730  new_path="$path"
37731
37732  windows_path="$new_path"
37733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37734    unix_path=`$CYGPATH -u "$windows_path"`
37735    new_path="$unix_path"
37736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37738    new_path="$unix_path"
37739  fi
37740
37741
37742  # Now try to locate executable using which
37743  new_path=`$WHICH "$new_path" 2> /dev/null`
37744
37745  if test "x$new_path" = x; then
37746    # Oops. Which didn't find the executable.
37747    # The splitting of arguments from the executable at a space might have been incorrect,
37748    # since paths with space are more likely in Windows. Give it another try with the whole
37749    # argument.
37750    path="$complete"
37751    arguments="EOL"
37752    new_path="$path"
37753
37754  windows_path="$new_path"
37755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37756    unix_path=`$CYGPATH -u "$windows_path"`
37757    new_path="$unix_path"
37758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37760    new_path="$unix_path"
37761  fi
37762
37763
37764    new_path=`$WHICH "$new_path" 2> /dev/null`
37765    # bat and cmd files are not always considered executable in MSYS causing which
37766    # to not find them
37767    if test "x$new_path" = x \
37768        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37769        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37770      new_path="$path"
37771
37772  windows_path="$new_path"
37773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37774    unix_path=`$CYGPATH -u "$windows_path"`
37775    new_path="$unix_path"
37776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37778    new_path="$unix_path"
37779  fi
37780
37781    fi
37782
37783    if test "x$new_path" = x; then
37784      # It's still not found. Now this is an unrecoverable error.
37785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37786$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37787      has_space=`$ECHO "$complete" | $GREP " "`
37788      if test "x$has_space" != x; then
37789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37791      fi
37792      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37793    fi
37794  fi
37795
37796  # Now new_path has a complete unix path to the binary
37797  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37798    # Keep paths in /bin as-is, but remove trailing .exe if any
37799    new_path="${new_path/%.exe/}"
37800    # Do not save /bin paths to all_fixpath_prefixes!
37801  else
37802    # Not in mixed or Windows style, start by that.
37803    new_path=`cmd //c echo $new_path`
37804
37805  input_path="$new_path"
37806  # Check if we need to convert this using DOS-style short mode. If the path
37807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37808  # take no chances and rewrite it.
37809  # Note: m4 eats our [], so we need to use [ and ] instead.
37810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37811  if test "x$has_forbidden_chars" != x; then
37812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37814  fi
37815
37816    # Output is in $new_path
37817
37818  windows_path="$new_path"
37819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37820    unix_path=`$CYGPATH -u "$windows_path"`
37821    new_path="$unix_path"
37822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37824    new_path="$unix_path"
37825  fi
37826
37827    # remove trailing .exe if any
37828    new_path="${new_path/%.exe/}"
37829
37830    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37831    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37832  fi
37833
37834    else
37835      # We're on a unix platform. Hooray! :)
37836      # First separate the path from the arguments. This will split at the first
37837      # space.
37838      complete="$NM"
37839      path="${complete%% *}"
37840      tmp="$complete EOL"
37841      arguments="${tmp#* }"
37842
37843      # Cannot rely on the command "which" here since it doesn't always work.
37844      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37845      if test -z "$is_absolute_path"; then
37846        # Path to executable is not absolute. Find it.
37847        IFS_save="$IFS"
37848        IFS=:
37849        for p in $PATH; do
37850          if test -f "$p/$path" && test -x "$p/$path"; then
37851            new_path="$p/$path"
37852            break
37853          fi
37854        done
37855        IFS="$IFS_save"
37856      else
37857        # This is an absolute path, we can use it without further modifications.
37858        new_path="$path"
37859      fi
37860
37861      if test "x$new_path" = x; then
37862        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37863$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37864        has_space=`$ECHO "$complete" | $GREP " "`
37865        if test "x$has_space" != x; then
37866          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37867$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37868        fi
37869        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37870      fi
37871    fi
37872
37873    # Now join together the path and the arguments once again
37874    if test "x$arguments" != xEOL; then
37875      new_complete="$new_path ${arguments% *}"
37876    else
37877      new_complete="$new_path"
37878    fi
37879
37880    if test "x$complete" != "x$new_complete"; then
37881      NM="$new_complete"
37882      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37883$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37884    fi
37885  fi
37886
37887    GNM="$NM"
37888
37889  fi
37890
37891  # objcopy is used for moving debug symbols to separate files when
37892  # full debug symbols are enabled.
37893  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37894
37895
37896  # Publish this variable in the help.
37897
37898
37899  if test "x$OBJCOPY" = x; then
37900    # The variable is not set by user, try to locate tool using the code snippet
37901    if test -n "$ac_tool_prefix"; then
37902  for ac_prog in gobjcopy objcopy
37903  do
37904    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37905set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37907$as_echo_n "checking for $ac_word... " >&6; }
37908if ${ac_cv_prog_OBJCOPY+:} false; then :
37909  $as_echo_n "(cached) " >&6
37910else
37911  if test -n "$OBJCOPY"; then
37912  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37913else
37914as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37915for as_dir in $PATH
37916do
37917  IFS=$as_save_IFS
37918  test -z "$as_dir" && as_dir=.
37919    for ac_exec_ext in '' $ac_executable_extensions; do
37920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37921    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37923    break 2
37924  fi
37925done
37926  done
37927IFS=$as_save_IFS
37928
37929fi
37930fi
37931OBJCOPY=$ac_cv_prog_OBJCOPY
37932if test -n "$OBJCOPY"; then
37933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37934$as_echo "$OBJCOPY" >&6; }
37935else
37936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37937$as_echo "no" >&6; }
37938fi
37939
37940
37941    test -n "$OBJCOPY" && break
37942  done
37943fi
37944if test -z "$OBJCOPY"; then
37945  ac_ct_OBJCOPY=$OBJCOPY
37946  for ac_prog in gobjcopy objcopy
37947do
37948  # Extract the first word of "$ac_prog", so it can be a program name with args.
37949set dummy $ac_prog; ac_word=$2
37950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37951$as_echo_n "checking for $ac_word... " >&6; }
37952if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37953  $as_echo_n "(cached) " >&6
37954else
37955  if test -n "$ac_ct_OBJCOPY"; then
37956  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37957else
37958as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37959for as_dir in $PATH
37960do
37961  IFS=$as_save_IFS
37962  test -z "$as_dir" && as_dir=.
37963    for ac_exec_ext in '' $ac_executable_extensions; do
37964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37965    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37967    break 2
37968  fi
37969done
37970  done
37971IFS=$as_save_IFS
37972
37973fi
37974fi
37975ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37976if test -n "$ac_ct_OBJCOPY"; then
37977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37978$as_echo "$ac_ct_OBJCOPY" >&6; }
37979else
37980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37981$as_echo "no" >&6; }
37982fi
37983
37984
37985  test -n "$ac_ct_OBJCOPY" && break
37986done
37987
37988  if test "x$ac_ct_OBJCOPY" = x; then
37989    OBJCOPY=""
37990  else
37991    case $cross_compiling:$ac_tool_warned in
37992yes:)
37993{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37994$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37995ac_tool_warned=yes ;;
37996esac
37997    OBJCOPY=$ac_ct_OBJCOPY
37998  fi
37999fi
38000
38001  else
38002    # The variable is set, but is it from the command line or the environment?
38003
38004    # Try to remove the string !OBJCOPY! from our list.
38005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38007      # If it failed, the variable was not from the command line. Ignore it,
38008      # but warn the user (except for BASH, which is always set by the calling BASH).
38009      if test "xOBJCOPY" != xBASH; then
38010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38011$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38012      fi
38013      # Try to locate tool using the code snippet
38014      if test -n "$ac_tool_prefix"; then
38015  for ac_prog in gobjcopy objcopy
38016  do
38017    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38018set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38020$as_echo_n "checking for $ac_word... " >&6; }
38021if ${ac_cv_prog_OBJCOPY+:} false; then :
38022  $as_echo_n "(cached) " >&6
38023else
38024  if test -n "$OBJCOPY"; then
38025  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38026else
38027as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38028for as_dir in $PATH
38029do
38030  IFS=$as_save_IFS
38031  test -z "$as_dir" && as_dir=.
38032    for ac_exec_ext in '' $ac_executable_extensions; do
38033  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38034    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38035    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38036    break 2
38037  fi
38038done
38039  done
38040IFS=$as_save_IFS
38041
38042fi
38043fi
38044OBJCOPY=$ac_cv_prog_OBJCOPY
38045if test -n "$OBJCOPY"; then
38046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38047$as_echo "$OBJCOPY" >&6; }
38048else
38049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38050$as_echo "no" >&6; }
38051fi
38052
38053
38054    test -n "$OBJCOPY" && break
38055  done
38056fi
38057if test -z "$OBJCOPY"; then
38058  ac_ct_OBJCOPY=$OBJCOPY
38059  for ac_prog in gobjcopy objcopy
38060do
38061  # Extract the first word of "$ac_prog", so it can be a program name with args.
38062set dummy $ac_prog; ac_word=$2
38063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38064$as_echo_n "checking for $ac_word... " >&6; }
38065if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38066  $as_echo_n "(cached) " >&6
38067else
38068  if test -n "$ac_ct_OBJCOPY"; then
38069  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38070else
38071as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38072for as_dir in $PATH
38073do
38074  IFS=$as_save_IFS
38075  test -z "$as_dir" && as_dir=.
38076    for ac_exec_ext in '' $ac_executable_extensions; do
38077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38078    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38080    break 2
38081  fi
38082done
38083  done
38084IFS=$as_save_IFS
38085
38086fi
38087fi
38088ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38089if test -n "$ac_ct_OBJCOPY"; then
38090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38091$as_echo "$ac_ct_OBJCOPY" >&6; }
38092else
38093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38094$as_echo "no" >&6; }
38095fi
38096
38097
38098  test -n "$ac_ct_OBJCOPY" && break
38099done
38100
38101  if test "x$ac_ct_OBJCOPY" = x; then
38102    OBJCOPY=""
38103  else
38104    case $cross_compiling:$ac_tool_warned in
38105yes:)
38106{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38107$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38108ac_tool_warned=yes ;;
38109esac
38110    OBJCOPY=$ac_ct_OBJCOPY
38111  fi
38112fi
38113
38114    else
38115      # If it succeeded, then it was overridden by the user. We will use it
38116      # for the tool.
38117
38118      # First remove it from the list of overridden variables, so we can test
38119      # for unknown variables in the end.
38120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38121
38122      # Check if the provided tool contains a complete path.
38123      tool_specified="$OBJCOPY"
38124      tool_basename="${tool_specified##*/}"
38125      if test "x$tool_basename" = "x$tool_specified"; then
38126        # A command without a complete path is provided, search $PATH.
38127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38128$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38129        # Extract the first word of "$tool_basename", so it can be a program name with args.
38130set dummy $tool_basename; ac_word=$2
38131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38132$as_echo_n "checking for $ac_word... " >&6; }
38133if ${ac_cv_path_OBJCOPY+:} false; then :
38134  $as_echo_n "(cached) " >&6
38135else
38136  case $OBJCOPY in
38137  [\\/]* | ?:[\\/]*)
38138  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38139  ;;
38140  *)
38141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38142for as_dir in $PATH
38143do
38144  IFS=$as_save_IFS
38145  test -z "$as_dir" && as_dir=.
38146    for ac_exec_ext in '' $ac_executable_extensions; do
38147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38148    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38150    break 2
38151  fi
38152done
38153  done
38154IFS=$as_save_IFS
38155
38156  ;;
38157esac
38158fi
38159OBJCOPY=$ac_cv_path_OBJCOPY
38160if test -n "$OBJCOPY"; then
38161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38162$as_echo "$OBJCOPY" >&6; }
38163else
38164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38165$as_echo "no" >&6; }
38166fi
38167
38168
38169        if test "x$OBJCOPY" = x; then
38170          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38171        fi
38172      else
38173        # Otherwise we believe it is a complete path. Use it as it is.
38174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38175$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38177$as_echo_n "checking for OBJCOPY... " >&6; }
38178        if test ! -x "$tool_specified"; then
38179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38180$as_echo "not found" >&6; }
38181          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38182        fi
38183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38184$as_echo "$tool_specified" >&6; }
38185      fi
38186    fi
38187  fi
38188
38189
38190    # Only call fixup if objcopy was found.
38191    if test -n "$OBJCOPY"; then
38192
38193  # Only process if variable expands to non-empty
38194
38195  if test "x$OBJCOPY" != x; then
38196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38197
38198  # First separate the path from the arguments. This will split at the first
38199  # space.
38200  complete="$OBJCOPY"
38201  path="${complete%% *}"
38202  tmp="$complete EOL"
38203  arguments="${tmp#* }"
38204
38205  # Input might be given as Windows format, start by converting to
38206  # unix format.
38207  new_path=`$CYGPATH -u "$path"`
38208
38209  # Now try to locate executable using which
38210  new_path=`$WHICH "$new_path" 2> /dev/null`
38211  # bat and cmd files are not always considered executable in cygwin causing which
38212  # to not find them
38213  if test "x$new_path" = x \
38214      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38215      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38216    new_path=`$CYGPATH -u "$path"`
38217  fi
38218  if test "x$new_path" = x; then
38219    # Oops. Which didn't find the executable.
38220    # The splitting of arguments from the executable at a space might have been incorrect,
38221    # since paths with space are more likely in Windows. Give it another try with the whole
38222    # argument.
38223    path="$complete"
38224    arguments="EOL"
38225    new_path=`$CYGPATH -u "$path"`
38226    new_path=`$WHICH "$new_path" 2> /dev/null`
38227    # bat and cmd files are not always considered executable in cygwin causing which
38228    # to not find them
38229    if test "x$new_path" = x \
38230        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38231        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38232      new_path=`$CYGPATH -u "$path"`
38233    fi
38234    if test "x$new_path" = x; then
38235      # It's still not found. Now this is an unrecoverable error.
38236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38237$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38238      has_space=`$ECHO "$complete" | $GREP " "`
38239      if test "x$has_space" != x; then
38240        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38241$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38242      fi
38243      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38244    fi
38245  fi
38246
38247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38250  # "foo.exe" is OK but "foo" is an error.
38251  #
38252  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38253  # It is also a way to make sure we got the proper file name for the real test later on.
38254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38255  if test "x$test_shortpath" = x; then
38256    # Short path failed, file does not exist as specified.
38257    # Try adding .exe or .cmd
38258    if test -f "${new_path}.exe"; then
38259      input_to_shortpath="${new_path}.exe"
38260    elif test -f "${new_path}.cmd"; then
38261      input_to_shortpath="${new_path}.cmd"
38262    else
38263      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38264$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38265      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38266$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38267      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38268    fi
38269  else
38270    input_to_shortpath="$new_path"
38271  fi
38272
38273  # Call helper function which possibly converts this using DOS-style short mode.
38274  # If so, the updated path is stored in $new_path.
38275  new_path="$input_to_shortpath"
38276
38277  input_path="$input_to_shortpath"
38278  # Check if we need to convert this using DOS-style short mode. If the path
38279  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38280  # take no chances and rewrite it.
38281  # Note: m4 eats our [], so we need to use [ and ] instead.
38282  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38283  if test "x$has_forbidden_chars" != x; then
38284    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38285    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38286    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38287    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38288      # Going to short mode and back again did indeed matter. Since short mode is
38289      # case insensitive, let's make it lowercase to improve readability.
38290      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38291      # Now convert it back to Unix-style (cygpath)
38292      input_path=`$CYGPATH -u "$shortmode_path"`
38293      new_path="$input_path"
38294    fi
38295  fi
38296
38297  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38298  if test "x$test_cygdrive_prefix" = x; then
38299    # As a simple fix, exclude /usr/bin since it's not a real path.
38300    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38301      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38302      # a path prefixed by /cygdrive for fixpath to work.
38303      new_path="$CYGWIN_ROOT_PATH$input_path"
38304    fi
38305  fi
38306
38307  # remove trailing .exe if any
38308  new_path="${new_path/%.exe/}"
38309
38310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38311
38312  # First separate the path from the arguments. This will split at the first
38313  # space.
38314  complete="$OBJCOPY"
38315  path="${complete%% *}"
38316  tmp="$complete EOL"
38317  arguments="${tmp#* }"
38318
38319  # Input might be given as Windows format, start by converting to
38320  # unix format.
38321  new_path="$path"
38322
38323  windows_path="$new_path"
38324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38325    unix_path=`$CYGPATH -u "$windows_path"`
38326    new_path="$unix_path"
38327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38329    new_path="$unix_path"
38330  fi
38331
38332
38333  # Now try to locate executable using which
38334  new_path=`$WHICH "$new_path" 2> /dev/null`
38335
38336  if test "x$new_path" = x; then
38337    # Oops. Which didn't find the executable.
38338    # The splitting of arguments from the executable at a space might have been incorrect,
38339    # since paths with space are more likely in Windows. Give it another try with the whole
38340    # argument.
38341    path="$complete"
38342    arguments="EOL"
38343    new_path="$path"
38344
38345  windows_path="$new_path"
38346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38347    unix_path=`$CYGPATH -u "$windows_path"`
38348    new_path="$unix_path"
38349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38351    new_path="$unix_path"
38352  fi
38353
38354
38355    new_path=`$WHICH "$new_path" 2> /dev/null`
38356    # bat and cmd files are not always considered executable in MSYS causing which
38357    # to not find them
38358    if test "x$new_path" = x \
38359        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38360        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38361      new_path="$path"
38362
38363  windows_path="$new_path"
38364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38365    unix_path=`$CYGPATH -u "$windows_path"`
38366    new_path="$unix_path"
38367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38369    new_path="$unix_path"
38370  fi
38371
38372    fi
38373
38374    if test "x$new_path" = x; then
38375      # It's still not found. Now this is an unrecoverable error.
38376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38377$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38378      has_space=`$ECHO "$complete" | $GREP " "`
38379      if test "x$has_space" != x; then
38380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38382      fi
38383      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38384    fi
38385  fi
38386
38387  # Now new_path has a complete unix path to the binary
38388  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38389    # Keep paths in /bin as-is, but remove trailing .exe if any
38390    new_path="${new_path/%.exe/}"
38391    # Do not save /bin paths to all_fixpath_prefixes!
38392  else
38393    # Not in mixed or Windows style, start by that.
38394    new_path=`cmd //c echo $new_path`
38395
38396  input_path="$new_path"
38397  # Check if we need to convert this using DOS-style short mode. If the path
38398  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38399  # take no chances and rewrite it.
38400  # Note: m4 eats our [], so we need to use [ and ] instead.
38401  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38402  if test "x$has_forbidden_chars" != x; then
38403    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38404    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38405  fi
38406
38407    # Output is in $new_path
38408
38409  windows_path="$new_path"
38410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38411    unix_path=`$CYGPATH -u "$windows_path"`
38412    new_path="$unix_path"
38413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38415    new_path="$unix_path"
38416  fi
38417
38418    # remove trailing .exe if any
38419    new_path="${new_path/%.exe/}"
38420
38421    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38422    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38423  fi
38424
38425    else
38426      # We're on a unix platform. Hooray! :)
38427      # First separate the path from the arguments. This will split at the first
38428      # space.
38429      complete="$OBJCOPY"
38430      path="${complete%% *}"
38431      tmp="$complete EOL"
38432      arguments="${tmp#* }"
38433
38434      # Cannot rely on the command "which" here since it doesn't always work.
38435      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38436      if test -z "$is_absolute_path"; then
38437        # Path to executable is not absolute. Find it.
38438        IFS_save="$IFS"
38439        IFS=:
38440        for p in $PATH; do
38441          if test -f "$p/$path" && test -x "$p/$path"; then
38442            new_path="$p/$path"
38443            break
38444          fi
38445        done
38446        IFS="$IFS_save"
38447      else
38448        # This is an absolute path, we can use it without further modifications.
38449        new_path="$path"
38450      fi
38451
38452      if test "x$new_path" = x; then
38453        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38454$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38455        has_space=`$ECHO "$complete" | $GREP " "`
38456        if test "x$has_space" != x; then
38457          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38458$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38459        fi
38460        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38461      fi
38462    fi
38463
38464    # Now join together the path and the arguments once again
38465    if test "x$arguments" != xEOL; then
38466      new_complete="$new_path ${arguments% *}"
38467    else
38468      new_complete="$new_path"
38469    fi
38470
38471    if test "x$complete" != "x$new_complete"; then
38472      OBJCOPY="$new_complete"
38473      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38474$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38475    fi
38476  fi
38477
38478      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
38479        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
38480        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
38481        # - version number is last blank separate word on first line
38482        # - version number formats that have been seen:
38483        #   - <major>.<minor>
38484        #   - <major>.<minor>.<micro>
38485        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
38486        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
38487         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
38488              -e 's/.* //' \
38489              -e '/^[01]\./b bad' \
38490              -e '/^2\./{' \
38491              -e '  s/^2\.//' \
38492              -e '  /^[0-9]$/b bad' \
38493              -e '  /^[0-9]\./b bad' \
38494              -e '  /^1[0-9]$/b bad' \
38495              -e '  /^1[0-9]\./b bad' \
38496              -e '  /^20\./b bad' \
38497              -e '  /^21\.0$/b bad' \
38498              -e '  /^21\.0\./b bad' \
38499              -e '}' \
38500              -e ':good' \
38501              -e 's/.*/VALID_VERSION/p' \
38502              -e 'q' \
38503              -e ':bad' \
38504              -e 's/.*/BAD_VERSION/p' \
38505              -e 'q'`
38506        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
38507          OBJCOPY=
38508          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
38509$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
38510          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
38511$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
38512          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
38513$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
38514          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
38515$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
38516          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
38517$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
38518        fi
38519      fi
38520    fi
38521  fi
38522
38523
38524
38525  # Publish this variable in the help.
38526
38527
38528  if test "x$OBJDUMP" = x; then
38529    # The variable is not set by user, try to locate tool using the code snippet
38530    if test -n "$ac_tool_prefix"; then
38531  for ac_prog in gobjdump objdump
38532  do
38533    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38534set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38536$as_echo_n "checking for $ac_word... " >&6; }
38537if ${ac_cv_prog_OBJDUMP+:} false; then :
38538  $as_echo_n "(cached) " >&6
38539else
38540  if test -n "$OBJDUMP"; then
38541  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38542else
38543as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38544for as_dir in $PATH
38545do
38546  IFS=$as_save_IFS
38547  test -z "$as_dir" && as_dir=.
38548    for ac_exec_ext in '' $ac_executable_extensions; do
38549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38550    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38552    break 2
38553  fi
38554done
38555  done
38556IFS=$as_save_IFS
38557
38558fi
38559fi
38560OBJDUMP=$ac_cv_prog_OBJDUMP
38561if test -n "$OBJDUMP"; then
38562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38563$as_echo "$OBJDUMP" >&6; }
38564else
38565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38566$as_echo "no" >&6; }
38567fi
38568
38569
38570    test -n "$OBJDUMP" && break
38571  done
38572fi
38573if test -z "$OBJDUMP"; then
38574  ac_ct_OBJDUMP=$OBJDUMP
38575  for ac_prog in gobjdump objdump
38576do
38577  # Extract the first word of "$ac_prog", so it can be a program name with args.
38578set dummy $ac_prog; ac_word=$2
38579{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38580$as_echo_n "checking for $ac_word... " >&6; }
38581if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38582  $as_echo_n "(cached) " >&6
38583else
38584  if test -n "$ac_ct_OBJDUMP"; then
38585  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38586else
38587as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38588for as_dir in $PATH
38589do
38590  IFS=$as_save_IFS
38591  test -z "$as_dir" && as_dir=.
38592    for ac_exec_ext in '' $ac_executable_extensions; do
38593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38594    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38596    break 2
38597  fi
38598done
38599  done
38600IFS=$as_save_IFS
38601
38602fi
38603fi
38604ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38605if test -n "$ac_ct_OBJDUMP"; then
38606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38607$as_echo "$ac_ct_OBJDUMP" >&6; }
38608else
38609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38610$as_echo "no" >&6; }
38611fi
38612
38613
38614  test -n "$ac_ct_OBJDUMP" && break
38615done
38616
38617  if test "x$ac_ct_OBJDUMP" = x; then
38618    OBJDUMP=""
38619  else
38620    case $cross_compiling:$ac_tool_warned in
38621yes:)
38622{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38623$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38624ac_tool_warned=yes ;;
38625esac
38626    OBJDUMP=$ac_ct_OBJDUMP
38627  fi
38628fi
38629
38630  else
38631    # The variable is set, but is it from the command line or the environment?
38632
38633    # Try to remove the string !OBJDUMP! from our list.
38634    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38635    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38636      # If it failed, the variable was not from the command line. Ignore it,
38637      # but warn the user (except for BASH, which is always set by the calling BASH).
38638      if test "xOBJDUMP" != xBASH; then
38639        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38640$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38641      fi
38642      # Try to locate tool using the code snippet
38643      if test -n "$ac_tool_prefix"; then
38644  for ac_prog in gobjdump objdump
38645  do
38646    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38647set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38649$as_echo_n "checking for $ac_word... " >&6; }
38650if ${ac_cv_prog_OBJDUMP+:} false; then :
38651  $as_echo_n "(cached) " >&6
38652else
38653  if test -n "$OBJDUMP"; then
38654  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38655else
38656as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38657for as_dir in $PATH
38658do
38659  IFS=$as_save_IFS
38660  test -z "$as_dir" && as_dir=.
38661    for ac_exec_ext in '' $ac_executable_extensions; do
38662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38663    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38665    break 2
38666  fi
38667done
38668  done
38669IFS=$as_save_IFS
38670
38671fi
38672fi
38673OBJDUMP=$ac_cv_prog_OBJDUMP
38674if test -n "$OBJDUMP"; then
38675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38676$as_echo "$OBJDUMP" >&6; }
38677else
38678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38679$as_echo "no" >&6; }
38680fi
38681
38682
38683    test -n "$OBJDUMP" && break
38684  done
38685fi
38686if test -z "$OBJDUMP"; then
38687  ac_ct_OBJDUMP=$OBJDUMP
38688  for ac_prog in gobjdump objdump
38689do
38690  # Extract the first word of "$ac_prog", so it can be a program name with args.
38691set dummy $ac_prog; ac_word=$2
38692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38693$as_echo_n "checking for $ac_word... " >&6; }
38694if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38695  $as_echo_n "(cached) " >&6
38696else
38697  if test -n "$ac_ct_OBJDUMP"; then
38698  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38699else
38700as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38701for as_dir in $PATH
38702do
38703  IFS=$as_save_IFS
38704  test -z "$as_dir" && as_dir=.
38705    for ac_exec_ext in '' $ac_executable_extensions; do
38706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38707    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38709    break 2
38710  fi
38711done
38712  done
38713IFS=$as_save_IFS
38714
38715fi
38716fi
38717ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38718if test -n "$ac_ct_OBJDUMP"; then
38719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38720$as_echo "$ac_ct_OBJDUMP" >&6; }
38721else
38722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38723$as_echo "no" >&6; }
38724fi
38725
38726
38727  test -n "$ac_ct_OBJDUMP" && break
38728done
38729
38730  if test "x$ac_ct_OBJDUMP" = x; then
38731    OBJDUMP=""
38732  else
38733    case $cross_compiling:$ac_tool_warned in
38734yes:)
38735{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38736$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38737ac_tool_warned=yes ;;
38738esac
38739    OBJDUMP=$ac_ct_OBJDUMP
38740  fi
38741fi
38742
38743    else
38744      # If it succeeded, then it was overridden by the user. We will use it
38745      # for the tool.
38746
38747      # First remove it from the list of overridden variables, so we can test
38748      # for unknown variables in the end.
38749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38750
38751      # Check if the provided tool contains a complete path.
38752      tool_specified="$OBJDUMP"
38753      tool_basename="${tool_specified##*/}"
38754      if test "x$tool_basename" = "x$tool_specified"; then
38755        # A command without a complete path is provided, search $PATH.
38756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38757$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38758        # Extract the first word of "$tool_basename", so it can be a program name with args.
38759set dummy $tool_basename; ac_word=$2
38760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38761$as_echo_n "checking for $ac_word... " >&6; }
38762if ${ac_cv_path_OBJDUMP+:} false; then :
38763  $as_echo_n "(cached) " >&6
38764else
38765  case $OBJDUMP in
38766  [\\/]* | ?:[\\/]*)
38767  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38768  ;;
38769  *)
38770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38771for as_dir in $PATH
38772do
38773  IFS=$as_save_IFS
38774  test -z "$as_dir" && as_dir=.
38775    for ac_exec_ext in '' $ac_executable_extensions; do
38776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38777    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38779    break 2
38780  fi
38781done
38782  done
38783IFS=$as_save_IFS
38784
38785  ;;
38786esac
38787fi
38788OBJDUMP=$ac_cv_path_OBJDUMP
38789if test -n "$OBJDUMP"; then
38790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38791$as_echo "$OBJDUMP" >&6; }
38792else
38793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38794$as_echo "no" >&6; }
38795fi
38796
38797
38798        if test "x$OBJDUMP" = x; then
38799          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38800        fi
38801      else
38802        # Otherwise we believe it is a complete path. Use it as it is.
38803        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38804$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38806$as_echo_n "checking for OBJDUMP... " >&6; }
38807        if test ! -x "$tool_specified"; then
38808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38809$as_echo "not found" >&6; }
38810          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38811        fi
38812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38813$as_echo "$tool_specified" >&6; }
38814      fi
38815    fi
38816  fi
38817
38818
38819  if test "x$OBJDUMP" != x; then
38820    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38821    # bails if argument is missing.
38822
38823  # Only process if variable expands to non-empty
38824
38825  if test "x$OBJDUMP" != x; then
38826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38827
38828  # First separate the path from the arguments. This will split at the first
38829  # space.
38830  complete="$OBJDUMP"
38831  path="${complete%% *}"
38832  tmp="$complete EOL"
38833  arguments="${tmp#* }"
38834
38835  # Input might be given as Windows format, start by converting to
38836  # unix format.
38837  new_path=`$CYGPATH -u "$path"`
38838
38839  # Now try to locate executable using which
38840  new_path=`$WHICH "$new_path" 2> /dev/null`
38841  # bat and cmd files are not always considered executable in cygwin causing which
38842  # to not find them
38843  if test "x$new_path" = x \
38844      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38845      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38846    new_path=`$CYGPATH -u "$path"`
38847  fi
38848  if test "x$new_path" = x; then
38849    # Oops. Which didn't find the executable.
38850    # The splitting of arguments from the executable at a space might have been incorrect,
38851    # since paths with space are more likely in Windows. Give it another try with the whole
38852    # argument.
38853    path="$complete"
38854    arguments="EOL"
38855    new_path=`$CYGPATH -u "$path"`
38856    new_path=`$WHICH "$new_path" 2> /dev/null`
38857    # bat and cmd files are not always considered executable in cygwin causing which
38858    # to not find them
38859    if test "x$new_path" = x \
38860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38862      new_path=`$CYGPATH -u "$path"`
38863    fi
38864    if test "x$new_path" = x; then
38865      # It's still not found. Now this is an unrecoverable error.
38866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38867$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38868      has_space=`$ECHO "$complete" | $GREP " "`
38869      if test "x$has_space" != x; then
38870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38872      fi
38873      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38874    fi
38875  fi
38876
38877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38880  # "foo.exe" is OK but "foo" is an error.
38881  #
38882  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38883  # It is also a way to make sure we got the proper file name for the real test later on.
38884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38885  if test "x$test_shortpath" = x; then
38886    # Short path failed, file does not exist as specified.
38887    # Try adding .exe or .cmd
38888    if test -f "${new_path}.exe"; then
38889      input_to_shortpath="${new_path}.exe"
38890    elif test -f "${new_path}.cmd"; then
38891      input_to_shortpath="${new_path}.cmd"
38892    else
38893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38894$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38895      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38896$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38897      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38898    fi
38899  else
38900    input_to_shortpath="$new_path"
38901  fi
38902
38903  # Call helper function which possibly converts this using DOS-style short mode.
38904  # If so, the updated path is stored in $new_path.
38905  new_path="$input_to_shortpath"
38906
38907  input_path="$input_to_shortpath"
38908  # Check if we need to convert this using DOS-style short mode. If the path
38909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38910  # take no chances and rewrite it.
38911  # Note: m4 eats our [], so we need to use [ and ] instead.
38912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38913  if test "x$has_forbidden_chars" != x; then
38914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38918      # Going to short mode and back again did indeed matter. Since short mode is
38919      # case insensitive, let's make it lowercase to improve readability.
38920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38921      # Now convert it back to Unix-style (cygpath)
38922      input_path=`$CYGPATH -u "$shortmode_path"`
38923      new_path="$input_path"
38924    fi
38925  fi
38926
38927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38928  if test "x$test_cygdrive_prefix" = x; then
38929    # As a simple fix, exclude /usr/bin since it's not a real path.
38930    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38932      # a path prefixed by /cygdrive for fixpath to work.
38933      new_path="$CYGWIN_ROOT_PATH$input_path"
38934    fi
38935  fi
38936
38937  # remove trailing .exe if any
38938  new_path="${new_path/%.exe/}"
38939
38940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38941
38942  # First separate the path from the arguments. This will split at the first
38943  # space.
38944  complete="$OBJDUMP"
38945  path="${complete%% *}"
38946  tmp="$complete EOL"
38947  arguments="${tmp#* }"
38948
38949  # Input might be given as Windows format, start by converting to
38950  # unix format.
38951  new_path="$path"
38952
38953  windows_path="$new_path"
38954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38955    unix_path=`$CYGPATH -u "$windows_path"`
38956    new_path="$unix_path"
38957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38959    new_path="$unix_path"
38960  fi
38961
38962
38963  # Now try to locate executable using which
38964  new_path=`$WHICH "$new_path" 2> /dev/null`
38965
38966  if test "x$new_path" = x; then
38967    # Oops. Which didn't find the executable.
38968    # The splitting of arguments from the executable at a space might have been incorrect,
38969    # since paths with space are more likely in Windows. Give it another try with the whole
38970    # argument.
38971    path="$complete"
38972    arguments="EOL"
38973    new_path="$path"
38974
38975  windows_path="$new_path"
38976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38977    unix_path=`$CYGPATH -u "$windows_path"`
38978    new_path="$unix_path"
38979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38981    new_path="$unix_path"
38982  fi
38983
38984
38985    new_path=`$WHICH "$new_path" 2> /dev/null`
38986    # bat and cmd files are not always considered executable in MSYS causing which
38987    # to not find them
38988    if test "x$new_path" = x \
38989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38991      new_path="$path"
38992
38993  windows_path="$new_path"
38994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38995    unix_path=`$CYGPATH -u "$windows_path"`
38996    new_path="$unix_path"
38997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38999    new_path="$unix_path"
39000  fi
39001
39002    fi
39003
39004    if test "x$new_path" = x; then
39005      # It's still not found. Now this is an unrecoverable error.
39006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39007$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39008      has_space=`$ECHO "$complete" | $GREP " "`
39009      if test "x$has_space" != x; then
39010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39012      fi
39013      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39014    fi
39015  fi
39016
39017  # Now new_path has a complete unix path to the binary
39018  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39019    # Keep paths in /bin as-is, but remove trailing .exe if any
39020    new_path="${new_path/%.exe/}"
39021    # Do not save /bin paths to all_fixpath_prefixes!
39022  else
39023    # Not in mixed or Windows style, start by that.
39024    new_path=`cmd //c echo $new_path`
39025
39026  input_path="$new_path"
39027  # Check if we need to convert this using DOS-style short mode. If the path
39028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39029  # take no chances and rewrite it.
39030  # Note: m4 eats our [], so we need to use [ and ] instead.
39031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39032  if test "x$has_forbidden_chars" != x; then
39033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39035  fi
39036
39037    # Output is in $new_path
39038
39039  windows_path="$new_path"
39040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39041    unix_path=`$CYGPATH -u "$windows_path"`
39042    new_path="$unix_path"
39043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39045    new_path="$unix_path"
39046  fi
39047
39048    # remove trailing .exe if any
39049    new_path="${new_path/%.exe/}"
39050
39051    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39052    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39053  fi
39054
39055    else
39056      # We're on a unix platform. Hooray! :)
39057      # First separate the path from the arguments. This will split at the first
39058      # space.
39059      complete="$OBJDUMP"
39060      path="${complete%% *}"
39061      tmp="$complete EOL"
39062      arguments="${tmp#* }"
39063
39064      # Cannot rely on the command "which" here since it doesn't always work.
39065      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39066      if test -z "$is_absolute_path"; then
39067        # Path to executable is not absolute. Find it.
39068        IFS_save="$IFS"
39069        IFS=:
39070        for p in $PATH; do
39071          if test -f "$p/$path" && test -x "$p/$path"; then
39072            new_path="$p/$path"
39073            break
39074          fi
39075        done
39076        IFS="$IFS_save"
39077      else
39078        # This is an absolute path, we can use it without further modifications.
39079        new_path="$path"
39080      fi
39081
39082      if test "x$new_path" = x; then
39083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39084$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39085        has_space=`$ECHO "$complete" | $GREP " "`
39086        if test "x$has_space" != x; then
39087          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39088$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39089        fi
39090        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39091      fi
39092    fi
39093
39094    # Now join together the path and the arguments once again
39095    if test "x$arguments" != xEOL; then
39096      new_complete="$new_path ${arguments% *}"
39097    else
39098      new_complete="$new_path"
39099    fi
39100
39101    if test "x$complete" != "x$new_complete"; then
39102      OBJDUMP="$new_complete"
39103      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39104$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39105    fi
39106  fi
39107
39108  fi
39109
39110
39111  # Restore old path.
39112  PATH="$OLD_PATH"
39113
39114  # Restore the flags to the user specified values.
39115  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39116  CFLAGS="$ORG_CFLAGS"
39117  CXXFLAGS="$ORG_CXXFLAGS"
39118
39119
39120# Finally do some processing after the detection phase
39121
39122  if test "x$COMPILE_TYPE" = "xcross"; then
39123    # Now we need to find a C/C++ compiler that can build executables for the
39124    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39125    # used once. Also, we need to do this without adding a tools dir to the
39126    # path, otherwise we might pick up cross-compilers which don't use standard
39127    # naming.
39128
39129    # FIXME: we should list the discovered compilers as an exclude pattern!
39130    # If we do that, we can do this detection before POST_DETECTION, and still
39131    # find the build compilers in the tools dir, if needed.
39132
39133
39134  # Publish this variable in the help.
39135
39136
39137  if test "x$BUILD_CC" = x; then
39138    # The variable is not set by user, try to locate tool using the code snippet
39139    for ac_prog in cl cc gcc
39140do
39141  # Extract the first word of "$ac_prog", so it can be a program name with args.
39142set dummy $ac_prog; ac_word=$2
39143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39144$as_echo_n "checking for $ac_word... " >&6; }
39145if ${ac_cv_path_BUILD_CC+:} false; then :
39146  $as_echo_n "(cached) " >&6
39147else
39148  case $BUILD_CC in
39149  [\\/]* | ?:[\\/]*)
39150  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39151  ;;
39152  *)
39153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39154for as_dir in $PATH
39155do
39156  IFS=$as_save_IFS
39157  test -z "$as_dir" && as_dir=.
39158    for ac_exec_ext in '' $ac_executable_extensions; do
39159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39160    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39162    break 2
39163  fi
39164done
39165  done
39166IFS=$as_save_IFS
39167
39168  ;;
39169esac
39170fi
39171BUILD_CC=$ac_cv_path_BUILD_CC
39172if test -n "$BUILD_CC"; then
39173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39174$as_echo "$BUILD_CC" >&6; }
39175else
39176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39177$as_echo "no" >&6; }
39178fi
39179
39180
39181  test -n "$BUILD_CC" && break
39182done
39183
39184  else
39185    # The variable is set, but is it from the command line or the environment?
39186
39187    # Try to remove the string !BUILD_CC! from our list.
39188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39190      # If it failed, the variable was not from the command line. Ignore it,
39191      # but warn the user (except for BASH, which is always set by the calling BASH).
39192      if test "xBUILD_CC" != xBASH; then
39193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39194$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39195      fi
39196      # Try to locate tool using the code snippet
39197      for ac_prog in cl cc gcc
39198do
39199  # Extract the first word of "$ac_prog", so it can be a program name with args.
39200set dummy $ac_prog; ac_word=$2
39201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39202$as_echo_n "checking for $ac_word... " >&6; }
39203if ${ac_cv_path_BUILD_CC+:} false; then :
39204  $as_echo_n "(cached) " >&6
39205else
39206  case $BUILD_CC in
39207  [\\/]* | ?:[\\/]*)
39208  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39209  ;;
39210  *)
39211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39212for as_dir in $PATH
39213do
39214  IFS=$as_save_IFS
39215  test -z "$as_dir" && as_dir=.
39216    for ac_exec_ext in '' $ac_executable_extensions; do
39217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39218    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39220    break 2
39221  fi
39222done
39223  done
39224IFS=$as_save_IFS
39225
39226  ;;
39227esac
39228fi
39229BUILD_CC=$ac_cv_path_BUILD_CC
39230if test -n "$BUILD_CC"; then
39231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39232$as_echo "$BUILD_CC" >&6; }
39233else
39234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39235$as_echo "no" >&6; }
39236fi
39237
39238
39239  test -n "$BUILD_CC" && break
39240done
39241
39242    else
39243      # If it succeeded, then it was overridden by the user. We will use it
39244      # for the tool.
39245
39246      # First remove it from the list of overridden variables, so we can test
39247      # for unknown variables in the end.
39248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39249
39250      # Check if the provided tool contains a complete path.
39251      tool_specified="$BUILD_CC"
39252      tool_basename="${tool_specified##*/}"
39253      if test "x$tool_basename" = "x$tool_specified"; then
39254        # A command without a complete path is provided, search $PATH.
39255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39256$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39257        # Extract the first word of "$tool_basename", so it can be a program name with args.
39258set dummy $tool_basename; ac_word=$2
39259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39260$as_echo_n "checking for $ac_word... " >&6; }
39261if ${ac_cv_path_BUILD_CC+:} false; then :
39262  $as_echo_n "(cached) " >&6
39263else
39264  case $BUILD_CC in
39265  [\\/]* | ?:[\\/]*)
39266  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39267  ;;
39268  *)
39269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39270for as_dir in $PATH
39271do
39272  IFS=$as_save_IFS
39273  test -z "$as_dir" && as_dir=.
39274    for ac_exec_ext in '' $ac_executable_extensions; do
39275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39276    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39278    break 2
39279  fi
39280done
39281  done
39282IFS=$as_save_IFS
39283
39284  ;;
39285esac
39286fi
39287BUILD_CC=$ac_cv_path_BUILD_CC
39288if test -n "$BUILD_CC"; then
39289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39290$as_echo "$BUILD_CC" >&6; }
39291else
39292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39293$as_echo "no" >&6; }
39294fi
39295
39296
39297        if test "x$BUILD_CC" = x; then
39298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39299        fi
39300      else
39301        # Otherwise we believe it is a complete path. Use it as it is.
39302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39303$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39305$as_echo_n "checking for BUILD_CC... " >&6; }
39306        if test ! -x "$tool_specified"; then
39307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39308$as_echo "not found" >&6; }
39309          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39310        fi
39311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39312$as_echo "$tool_specified" >&6; }
39313      fi
39314    fi
39315  fi
39316
39317
39318
39319  # Only process if variable expands to non-empty
39320
39321  if test "x$BUILD_CC" != x; then
39322    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39323
39324  # First separate the path from the arguments. This will split at the first
39325  # space.
39326  complete="$BUILD_CC"
39327  path="${complete%% *}"
39328  tmp="$complete EOL"
39329  arguments="${tmp#* }"
39330
39331  # Input might be given as Windows format, start by converting to
39332  # unix format.
39333  new_path=`$CYGPATH -u "$path"`
39334
39335  # Now try to locate executable using which
39336  new_path=`$WHICH "$new_path" 2> /dev/null`
39337  # bat and cmd files are not always considered executable in cygwin causing which
39338  # to not find them
39339  if test "x$new_path" = x \
39340      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39341      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39342    new_path=`$CYGPATH -u "$path"`
39343  fi
39344  if test "x$new_path" = x; then
39345    # Oops. Which didn't find the executable.
39346    # The splitting of arguments from the executable at a space might have been incorrect,
39347    # since paths with space are more likely in Windows. Give it another try with the whole
39348    # argument.
39349    path="$complete"
39350    arguments="EOL"
39351    new_path=`$CYGPATH -u "$path"`
39352    new_path=`$WHICH "$new_path" 2> /dev/null`
39353    # bat and cmd files are not always considered executable in cygwin causing which
39354    # to not find them
39355    if test "x$new_path" = x \
39356        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39357        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39358      new_path=`$CYGPATH -u "$path"`
39359    fi
39360    if test "x$new_path" = x; then
39361      # It's still not found. Now this is an unrecoverable error.
39362      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39363$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39364      has_space=`$ECHO "$complete" | $GREP " "`
39365      if test "x$has_space" != x; then
39366        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39367$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39368      fi
39369      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39370    fi
39371  fi
39372
39373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39376  # "foo.exe" is OK but "foo" is an error.
39377  #
39378  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39379  # It is also a way to make sure we got the proper file name for the real test later on.
39380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39381  if test "x$test_shortpath" = x; then
39382    # Short path failed, file does not exist as specified.
39383    # Try adding .exe or .cmd
39384    if test -f "${new_path}.exe"; then
39385      input_to_shortpath="${new_path}.exe"
39386    elif test -f "${new_path}.cmd"; then
39387      input_to_shortpath="${new_path}.cmd"
39388    else
39389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39390$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39391      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39392$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39393      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39394    fi
39395  else
39396    input_to_shortpath="$new_path"
39397  fi
39398
39399  # Call helper function which possibly converts this using DOS-style short mode.
39400  # If so, the updated path is stored in $new_path.
39401  new_path="$input_to_shortpath"
39402
39403  input_path="$input_to_shortpath"
39404  # Check if we need to convert this using DOS-style short mode. If the path
39405  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39406  # take no chances and rewrite it.
39407  # Note: m4 eats our [], so we need to use [ and ] instead.
39408  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39409  if test "x$has_forbidden_chars" != x; then
39410    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39411    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39412    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39413    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39414      # Going to short mode and back again did indeed matter. Since short mode is
39415      # case insensitive, let's make it lowercase to improve readability.
39416      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39417      # Now convert it back to Unix-style (cygpath)
39418      input_path=`$CYGPATH -u "$shortmode_path"`
39419      new_path="$input_path"
39420    fi
39421  fi
39422
39423  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39424  if test "x$test_cygdrive_prefix" = x; then
39425    # As a simple fix, exclude /usr/bin since it's not a real path.
39426    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39427      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39428      # a path prefixed by /cygdrive for fixpath to work.
39429      new_path="$CYGWIN_ROOT_PATH$input_path"
39430    fi
39431  fi
39432
39433  # remove trailing .exe if any
39434  new_path="${new_path/%.exe/}"
39435
39436    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39437
39438  # First separate the path from the arguments. This will split at the first
39439  # space.
39440  complete="$BUILD_CC"
39441  path="${complete%% *}"
39442  tmp="$complete EOL"
39443  arguments="${tmp#* }"
39444
39445  # Input might be given as Windows format, start by converting to
39446  # unix format.
39447  new_path="$path"
39448
39449  windows_path="$new_path"
39450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39451    unix_path=`$CYGPATH -u "$windows_path"`
39452    new_path="$unix_path"
39453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39455    new_path="$unix_path"
39456  fi
39457
39458
39459  # Now try to locate executable using which
39460  new_path=`$WHICH "$new_path" 2> /dev/null`
39461
39462  if test "x$new_path" = x; then
39463    # Oops. Which didn't find the executable.
39464    # The splitting of arguments from the executable at a space might have been incorrect,
39465    # since paths with space are more likely in Windows. Give it another try with the whole
39466    # argument.
39467    path="$complete"
39468    arguments="EOL"
39469    new_path="$path"
39470
39471  windows_path="$new_path"
39472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39473    unix_path=`$CYGPATH -u "$windows_path"`
39474    new_path="$unix_path"
39475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39477    new_path="$unix_path"
39478  fi
39479
39480
39481    new_path=`$WHICH "$new_path" 2> /dev/null`
39482    # bat and cmd files are not always considered executable in MSYS causing which
39483    # to not find them
39484    if test "x$new_path" = x \
39485        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39486        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39487      new_path="$path"
39488
39489  windows_path="$new_path"
39490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39491    unix_path=`$CYGPATH -u "$windows_path"`
39492    new_path="$unix_path"
39493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39495    new_path="$unix_path"
39496  fi
39497
39498    fi
39499
39500    if test "x$new_path" = x; then
39501      # It's still not found. Now this is an unrecoverable error.
39502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39503$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39504      has_space=`$ECHO "$complete" | $GREP " "`
39505      if test "x$has_space" != x; then
39506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39508      fi
39509      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39510    fi
39511  fi
39512
39513  # Now new_path has a complete unix path to the binary
39514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39515    # Keep paths in /bin as-is, but remove trailing .exe if any
39516    new_path="${new_path/%.exe/}"
39517    # Do not save /bin paths to all_fixpath_prefixes!
39518  else
39519    # Not in mixed or Windows style, start by that.
39520    new_path=`cmd //c echo $new_path`
39521
39522  input_path="$new_path"
39523  # Check if we need to convert this using DOS-style short mode. If the path
39524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39525  # take no chances and rewrite it.
39526  # Note: m4 eats our [], so we need to use [ and ] instead.
39527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39528  if test "x$has_forbidden_chars" != x; then
39529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39531  fi
39532
39533    # Output is in $new_path
39534
39535  windows_path="$new_path"
39536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39537    unix_path=`$CYGPATH -u "$windows_path"`
39538    new_path="$unix_path"
39539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39541    new_path="$unix_path"
39542  fi
39543
39544    # remove trailing .exe if any
39545    new_path="${new_path/%.exe/}"
39546
39547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39549  fi
39550
39551    else
39552      # We're on a unix platform. Hooray! :)
39553      # First separate the path from the arguments. This will split at the first
39554      # space.
39555      complete="$BUILD_CC"
39556      path="${complete%% *}"
39557      tmp="$complete EOL"
39558      arguments="${tmp#* }"
39559
39560      # Cannot rely on the command "which" here since it doesn't always work.
39561      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39562      if test -z "$is_absolute_path"; then
39563        # Path to executable is not absolute. Find it.
39564        IFS_save="$IFS"
39565        IFS=:
39566        for p in $PATH; do
39567          if test -f "$p/$path" && test -x "$p/$path"; then
39568            new_path="$p/$path"
39569            break
39570          fi
39571        done
39572        IFS="$IFS_save"
39573      else
39574        # This is an absolute path, we can use it without further modifications.
39575        new_path="$path"
39576      fi
39577
39578      if test "x$new_path" = x; then
39579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39580$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39581        has_space=`$ECHO "$complete" | $GREP " "`
39582        if test "x$has_space" != x; then
39583          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39585        fi
39586        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39587      fi
39588    fi
39589
39590    # Now join together the path and the arguments once again
39591    if test "x$arguments" != xEOL; then
39592      new_complete="$new_path ${arguments% *}"
39593    else
39594      new_complete="$new_path"
39595    fi
39596
39597    if test "x$complete" != "x$new_complete"; then
39598      BUILD_CC="$new_complete"
39599      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39600$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39601    fi
39602  fi
39603
39604
39605
39606  # Publish this variable in the help.
39607
39608
39609  if test "x$BUILD_CXX" = x; then
39610    # The variable is not set by user, try to locate tool using the code snippet
39611    for ac_prog in cl CC g++
39612do
39613  # Extract the first word of "$ac_prog", so it can be a program name with args.
39614set dummy $ac_prog; ac_word=$2
39615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39616$as_echo_n "checking for $ac_word... " >&6; }
39617if ${ac_cv_path_BUILD_CXX+:} false; then :
39618  $as_echo_n "(cached) " >&6
39619else
39620  case $BUILD_CXX in
39621  [\\/]* | ?:[\\/]*)
39622  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39623  ;;
39624  *)
39625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39626for as_dir in $PATH
39627do
39628  IFS=$as_save_IFS
39629  test -z "$as_dir" && as_dir=.
39630    for ac_exec_ext in '' $ac_executable_extensions; do
39631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39632    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39634    break 2
39635  fi
39636done
39637  done
39638IFS=$as_save_IFS
39639
39640  ;;
39641esac
39642fi
39643BUILD_CXX=$ac_cv_path_BUILD_CXX
39644if test -n "$BUILD_CXX"; then
39645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39646$as_echo "$BUILD_CXX" >&6; }
39647else
39648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39649$as_echo "no" >&6; }
39650fi
39651
39652
39653  test -n "$BUILD_CXX" && break
39654done
39655
39656  else
39657    # The variable is set, but is it from the command line or the environment?
39658
39659    # Try to remove the string !BUILD_CXX! from our list.
39660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39662      # If it failed, the variable was not from the command line. Ignore it,
39663      # but warn the user (except for BASH, which is always set by the calling BASH).
39664      if test "xBUILD_CXX" != xBASH; then
39665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39666$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39667      fi
39668      # Try to locate tool using the code snippet
39669      for ac_prog in cl CC g++
39670do
39671  # Extract the first word of "$ac_prog", so it can be a program name with args.
39672set dummy $ac_prog; ac_word=$2
39673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39674$as_echo_n "checking for $ac_word... " >&6; }
39675if ${ac_cv_path_BUILD_CXX+:} false; then :
39676  $as_echo_n "(cached) " >&6
39677else
39678  case $BUILD_CXX in
39679  [\\/]* | ?:[\\/]*)
39680  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39681  ;;
39682  *)
39683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39684for as_dir in $PATH
39685do
39686  IFS=$as_save_IFS
39687  test -z "$as_dir" && as_dir=.
39688    for ac_exec_ext in '' $ac_executable_extensions; do
39689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39690    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39692    break 2
39693  fi
39694done
39695  done
39696IFS=$as_save_IFS
39697
39698  ;;
39699esac
39700fi
39701BUILD_CXX=$ac_cv_path_BUILD_CXX
39702if test -n "$BUILD_CXX"; then
39703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39704$as_echo "$BUILD_CXX" >&6; }
39705else
39706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39707$as_echo "no" >&6; }
39708fi
39709
39710
39711  test -n "$BUILD_CXX" && break
39712done
39713
39714    else
39715      # If it succeeded, then it was overridden by the user. We will use it
39716      # for the tool.
39717
39718      # First remove it from the list of overridden variables, so we can test
39719      # for unknown variables in the end.
39720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39721
39722      # Check if the provided tool contains a complete path.
39723      tool_specified="$BUILD_CXX"
39724      tool_basename="${tool_specified##*/}"
39725      if test "x$tool_basename" = "x$tool_specified"; then
39726        # A command without a complete path is provided, search $PATH.
39727        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39728$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39729        # Extract the first word of "$tool_basename", so it can be a program name with args.
39730set dummy $tool_basename; ac_word=$2
39731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39732$as_echo_n "checking for $ac_word... " >&6; }
39733if ${ac_cv_path_BUILD_CXX+:} false; then :
39734  $as_echo_n "(cached) " >&6
39735else
39736  case $BUILD_CXX in
39737  [\\/]* | ?:[\\/]*)
39738  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39739  ;;
39740  *)
39741  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39742for as_dir in $PATH
39743do
39744  IFS=$as_save_IFS
39745  test -z "$as_dir" && as_dir=.
39746    for ac_exec_ext in '' $ac_executable_extensions; do
39747  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39748    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39749    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39750    break 2
39751  fi
39752done
39753  done
39754IFS=$as_save_IFS
39755
39756  ;;
39757esac
39758fi
39759BUILD_CXX=$ac_cv_path_BUILD_CXX
39760if test -n "$BUILD_CXX"; then
39761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39762$as_echo "$BUILD_CXX" >&6; }
39763else
39764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39765$as_echo "no" >&6; }
39766fi
39767
39768
39769        if test "x$BUILD_CXX" = x; then
39770          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39771        fi
39772      else
39773        # Otherwise we believe it is a complete path. Use it as it is.
39774        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39775$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39776        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39777$as_echo_n "checking for BUILD_CXX... " >&6; }
39778        if test ! -x "$tool_specified"; then
39779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39780$as_echo "not found" >&6; }
39781          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39782        fi
39783        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39784$as_echo "$tool_specified" >&6; }
39785      fi
39786    fi
39787  fi
39788
39789
39790
39791  # Only process if variable expands to non-empty
39792
39793  if test "x$BUILD_CXX" != x; then
39794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39795
39796  # First separate the path from the arguments. This will split at the first
39797  # space.
39798  complete="$BUILD_CXX"
39799  path="${complete%% *}"
39800  tmp="$complete EOL"
39801  arguments="${tmp#* }"
39802
39803  # Input might be given as Windows format, start by converting to
39804  # unix format.
39805  new_path=`$CYGPATH -u "$path"`
39806
39807  # Now try to locate executable using which
39808  new_path=`$WHICH "$new_path" 2> /dev/null`
39809  # bat and cmd files are not always considered executable in cygwin causing which
39810  # to not find them
39811  if test "x$new_path" = x \
39812      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39813      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39814    new_path=`$CYGPATH -u "$path"`
39815  fi
39816  if test "x$new_path" = x; then
39817    # Oops. Which didn't find the executable.
39818    # The splitting of arguments from the executable at a space might have been incorrect,
39819    # since paths with space are more likely in Windows. Give it another try with the whole
39820    # argument.
39821    path="$complete"
39822    arguments="EOL"
39823    new_path=`$CYGPATH -u "$path"`
39824    new_path=`$WHICH "$new_path" 2> /dev/null`
39825    # bat and cmd files are not always considered executable in cygwin causing which
39826    # to not find them
39827    if test "x$new_path" = x \
39828        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39829        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39830      new_path=`$CYGPATH -u "$path"`
39831    fi
39832    if test "x$new_path" = x; then
39833      # It's still not found. Now this is an unrecoverable error.
39834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39835$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39836      has_space=`$ECHO "$complete" | $GREP " "`
39837      if test "x$has_space" != x; then
39838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39840      fi
39841      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39842    fi
39843  fi
39844
39845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39848  # "foo.exe" is OK but "foo" is an error.
39849  #
39850  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39851  # It is also a way to make sure we got the proper file name for the real test later on.
39852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39853  if test "x$test_shortpath" = x; then
39854    # Short path failed, file does not exist as specified.
39855    # Try adding .exe or .cmd
39856    if test -f "${new_path}.exe"; then
39857      input_to_shortpath="${new_path}.exe"
39858    elif test -f "${new_path}.cmd"; then
39859      input_to_shortpath="${new_path}.cmd"
39860    else
39861      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39862$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39863      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39864$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39865      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39866    fi
39867  else
39868    input_to_shortpath="$new_path"
39869  fi
39870
39871  # Call helper function which possibly converts this using DOS-style short mode.
39872  # If so, the updated path is stored in $new_path.
39873  new_path="$input_to_shortpath"
39874
39875  input_path="$input_to_shortpath"
39876  # Check if we need to convert this using DOS-style short mode. If the path
39877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39878  # take no chances and rewrite it.
39879  # Note: m4 eats our [], so we need to use [ and ] instead.
39880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39881  if test "x$has_forbidden_chars" != x; then
39882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39886      # Going to short mode and back again did indeed matter. Since short mode is
39887      # case insensitive, let's make it lowercase to improve readability.
39888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39889      # Now convert it back to Unix-style (cygpath)
39890      input_path=`$CYGPATH -u "$shortmode_path"`
39891      new_path="$input_path"
39892    fi
39893  fi
39894
39895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39896  if test "x$test_cygdrive_prefix" = x; then
39897    # As a simple fix, exclude /usr/bin since it's not a real path.
39898    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39900      # a path prefixed by /cygdrive for fixpath to work.
39901      new_path="$CYGWIN_ROOT_PATH$input_path"
39902    fi
39903  fi
39904
39905  # remove trailing .exe if any
39906  new_path="${new_path/%.exe/}"
39907
39908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39909
39910  # First separate the path from the arguments. This will split at the first
39911  # space.
39912  complete="$BUILD_CXX"
39913  path="${complete%% *}"
39914  tmp="$complete EOL"
39915  arguments="${tmp#* }"
39916
39917  # Input might be given as Windows format, start by converting to
39918  # unix format.
39919  new_path="$path"
39920
39921  windows_path="$new_path"
39922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39923    unix_path=`$CYGPATH -u "$windows_path"`
39924    new_path="$unix_path"
39925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39927    new_path="$unix_path"
39928  fi
39929
39930
39931  # Now try to locate executable using which
39932  new_path=`$WHICH "$new_path" 2> /dev/null`
39933
39934  if test "x$new_path" = x; then
39935    # Oops. Which didn't find the executable.
39936    # The splitting of arguments from the executable at a space might have been incorrect,
39937    # since paths with space are more likely in Windows. Give it another try with the whole
39938    # argument.
39939    path="$complete"
39940    arguments="EOL"
39941    new_path="$path"
39942
39943  windows_path="$new_path"
39944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39945    unix_path=`$CYGPATH -u "$windows_path"`
39946    new_path="$unix_path"
39947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39949    new_path="$unix_path"
39950  fi
39951
39952
39953    new_path=`$WHICH "$new_path" 2> /dev/null`
39954    # bat and cmd files are not always considered executable in MSYS causing which
39955    # to not find them
39956    if test "x$new_path" = x \
39957        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39958        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39959      new_path="$path"
39960
39961  windows_path="$new_path"
39962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39963    unix_path=`$CYGPATH -u "$windows_path"`
39964    new_path="$unix_path"
39965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39967    new_path="$unix_path"
39968  fi
39969
39970    fi
39971
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  # Now new_path has a complete unix path to the binary
39986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39987    # Keep paths in /bin as-is, but remove trailing .exe if any
39988    new_path="${new_path/%.exe/}"
39989    # Do not save /bin paths to all_fixpath_prefixes!
39990  else
39991    # Not in mixed or Windows style, start by that.
39992    new_path=`cmd //c echo $new_path`
39993
39994  input_path="$new_path"
39995  # Check if we need to convert this using DOS-style short mode. If the path
39996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39997  # take no chances and rewrite it.
39998  # Note: m4 eats our [], so we need to use [ and ] instead.
39999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40000  if test "x$has_forbidden_chars" != x; then
40001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40003  fi
40004
40005    # Output is in $new_path
40006
40007  windows_path="$new_path"
40008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40009    unix_path=`$CYGPATH -u "$windows_path"`
40010    new_path="$unix_path"
40011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40013    new_path="$unix_path"
40014  fi
40015
40016    # remove trailing .exe if any
40017    new_path="${new_path/%.exe/}"
40018
40019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40021  fi
40022
40023    else
40024      # We're on a unix platform. Hooray! :)
40025      # First separate the path from the arguments. This will split at the first
40026      # space.
40027      complete="$BUILD_CXX"
40028      path="${complete%% *}"
40029      tmp="$complete EOL"
40030      arguments="${tmp#* }"
40031
40032      # Cannot rely on the command "which" here since it doesn't always work.
40033      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40034      if test -z "$is_absolute_path"; then
40035        # Path to executable is not absolute. Find it.
40036        IFS_save="$IFS"
40037        IFS=:
40038        for p in $PATH; do
40039          if test -f "$p/$path" && test -x "$p/$path"; then
40040            new_path="$p/$path"
40041            break
40042          fi
40043        done
40044        IFS="$IFS_save"
40045      else
40046        # This is an absolute path, we can use it without further modifications.
40047        new_path="$path"
40048      fi
40049
40050      if test "x$new_path" = x; then
40051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40052$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40053        has_space=`$ECHO "$complete" | $GREP " "`
40054        if test "x$has_space" != x; then
40055          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40057        fi
40058        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40059      fi
40060    fi
40061
40062    # Now join together the path and the arguments once again
40063    if test "x$arguments" != xEOL; then
40064      new_complete="$new_path ${arguments% *}"
40065    else
40066      new_complete="$new_path"
40067    fi
40068
40069    if test "x$complete" != "x$new_complete"; then
40070      BUILD_CXX="$new_complete"
40071      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40072$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40073    fi
40074  fi
40075
40076
40077
40078  # Publish this variable in the help.
40079
40080
40081  if test "x$BUILD_LD" = x; then
40082    # The variable is not set by user, try to locate tool using the code snippet
40083    for ac_prog in ld
40084do
40085  # Extract the first word of "$ac_prog", so it can be a program name with args.
40086set dummy $ac_prog; ac_word=$2
40087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40088$as_echo_n "checking for $ac_word... " >&6; }
40089if ${ac_cv_path_BUILD_LD+:} false; then :
40090  $as_echo_n "(cached) " >&6
40091else
40092  case $BUILD_LD in
40093  [\\/]* | ?:[\\/]*)
40094  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40095  ;;
40096  *)
40097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40098for as_dir in $PATH
40099do
40100  IFS=$as_save_IFS
40101  test -z "$as_dir" && as_dir=.
40102    for ac_exec_ext in '' $ac_executable_extensions; do
40103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40104    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40106    break 2
40107  fi
40108done
40109  done
40110IFS=$as_save_IFS
40111
40112  ;;
40113esac
40114fi
40115BUILD_LD=$ac_cv_path_BUILD_LD
40116if test -n "$BUILD_LD"; then
40117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40118$as_echo "$BUILD_LD" >&6; }
40119else
40120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40121$as_echo "no" >&6; }
40122fi
40123
40124
40125  test -n "$BUILD_LD" && break
40126done
40127
40128  else
40129    # The variable is set, but is it from the command line or the environment?
40130
40131    # Try to remove the string !BUILD_LD! from our list.
40132    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40133    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40134      # If it failed, the variable was not from the command line. Ignore it,
40135      # but warn the user (except for BASH, which is always set by the calling BASH).
40136      if test "xBUILD_LD" != xBASH; then
40137        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40138$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40139      fi
40140      # Try to locate tool using the code snippet
40141      for ac_prog in ld
40142do
40143  # Extract the first word of "$ac_prog", so it can be a program name with args.
40144set dummy $ac_prog; ac_word=$2
40145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40146$as_echo_n "checking for $ac_word... " >&6; }
40147if ${ac_cv_path_BUILD_LD+:} false; then :
40148  $as_echo_n "(cached) " >&6
40149else
40150  case $BUILD_LD in
40151  [\\/]* | ?:[\\/]*)
40152  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40153  ;;
40154  *)
40155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40156for as_dir in $PATH
40157do
40158  IFS=$as_save_IFS
40159  test -z "$as_dir" && as_dir=.
40160    for ac_exec_ext in '' $ac_executable_extensions; do
40161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40162    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40164    break 2
40165  fi
40166done
40167  done
40168IFS=$as_save_IFS
40169
40170  ;;
40171esac
40172fi
40173BUILD_LD=$ac_cv_path_BUILD_LD
40174if test -n "$BUILD_LD"; then
40175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40176$as_echo "$BUILD_LD" >&6; }
40177else
40178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40179$as_echo "no" >&6; }
40180fi
40181
40182
40183  test -n "$BUILD_LD" && break
40184done
40185
40186    else
40187      # If it succeeded, then it was overridden by the user. We will use it
40188      # for the tool.
40189
40190      # First remove it from the list of overridden variables, so we can test
40191      # for unknown variables in the end.
40192      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40193
40194      # Check if the provided tool contains a complete path.
40195      tool_specified="$BUILD_LD"
40196      tool_basename="${tool_specified##*/}"
40197      if test "x$tool_basename" = "x$tool_specified"; then
40198        # A command without a complete path is provided, search $PATH.
40199        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40200$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40201        # Extract the first word of "$tool_basename", so it can be a program name with args.
40202set dummy $tool_basename; ac_word=$2
40203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40204$as_echo_n "checking for $ac_word... " >&6; }
40205if ${ac_cv_path_BUILD_LD+:} false; then :
40206  $as_echo_n "(cached) " >&6
40207else
40208  case $BUILD_LD in
40209  [\\/]* | ?:[\\/]*)
40210  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40211  ;;
40212  *)
40213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40214for as_dir in $PATH
40215do
40216  IFS=$as_save_IFS
40217  test -z "$as_dir" && as_dir=.
40218    for ac_exec_ext in '' $ac_executable_extensions; do
40219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40220    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40222    break 2
40223  fi
40224done
40225  done
40226IFS=$as_save_IFS
40227
40228  ;;
40229esac
40230fi
40231BUILD_LD=$ac_cv_path_BUILD_LD
40232if test -n "$BUILD_LD"; then
40233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40234$as_echo "$BUILD_LD" >&6; }
40235else
40236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40237$as_echo "no" >&6; }
40238fi
40239
40240
40241        if test "x$BUILD_LD" = x; then
40242          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40243        fi
40244      else
40245        # Otherwise we believe it is a complete path. Use it as it is.
40246        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40247$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40248        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40249$as_echo_n "checking for BUILD_LD... " >&6; }
40250        if test ! -x "$tool_specified"; then
40251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40252$as_echo "not found" >&6; }
40253          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40254        fi
40255        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40256$as_echo "$tool_specified" >&6; }
40257      fi
40258    fi
40259  fi
40260
40261
40262
40263  # Only process if variable expands to non-empty
40264
40265  if test "x$BUILD_LD" != x; then
40266    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40267
40268  # First separate the path from the arguments. This will split at the first
40269  # space.
40270  complete="$BUILD_LD"
40271  path="${complete%% *}"
40272  tmp="$complete EOL"
40273  arguments="${tmp#* }"
40274
40275  # Input might be given as Windows format, start by converting to
40276  # unix format.
40277  new_path=`$CYGPATH -u "$path"`
40278
40279  # Now try to locate executable using which
40280  new_path=`$WHICH "$new_path" 2> /dev/null`
40281  # bat and cmd files are not always considered executable in cygwin causing which
40282  # to not find them
40283  if test "x$new_path" = x \
40284      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40285      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40286    new_path=`$CYGPATH -u "$path"`
40287  fi
40288  if test "x$new_path" = x; then
40289    # Oops. Which didn't find the executable.
40290    # The splitting of arguments from the executable at a space might have been incorrect,
40291    # since paths with space are more likely in Windows. Give it another try with the whole
40292    # argument.
40293    path="$complete"
40294    arguments="EOL"
40295    new_path=`$CYGPATH -u "$path"`
40296    new_path=`$WHICH "$new_path" 2> /dev/null`
40297    # bat and cmd files are not always considered executable in cygwin causing which
40298    # to not find them
40299    if test "x$new_path" = x \
40300        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40301        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40302      new_path=`$CYGPATH -u "$path"`
40303    fi
40304    if test "x$new_path" = x; then
40305      # It's still not found. Now this is an unrecoverable error.
40306      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40307$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40308      has_space=`$ECHO "$complete" | $GREP " "`
40309      if test "x$has_space" != x; then
40310        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40311$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40312      fi
40313      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40314    fi
40315  fi
40316
40317  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40318  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40319  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40320  # "foo.exe" is OK but "foo" is an error.
40321  #
40322  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40323  # It is also a way to make sure we got the proper file name for the real test later on.
40324  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40325  if test "x$test_shortpath" = x; then
40326    # Short path failed, file does not exist as specified.
40327    # Try adding .exe or .cmd
40328    if test -f "${new_path}.exe"; then
40329      input_to_shortpath="${new_path}.exe"
40330    elif test -f "${new_path}.cmd"; then
40331      input_to_shortpath="${new_path}.cmd"
40332    else
40333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40334$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40335      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40336$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40337      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40338    fi
40339  else
40340    input_to_shortpath="$new_path"
40341  fi
40342
40343  # Call helper function which possibly converts this using DOS-style short mode.
40344  # If so, the updated path is stored in $new_path.
40345  new_path="$input_to_shortpath"
40346
40347  input_path="$input_to_shortpath"
40348  # Check if we need to convert this using DOS-style short mode. If the path
40349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40350  # take no chances and rewrite it.
40351  # Note: m4 eats our [], so we need to use [ and ] instead.
40352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40353  if test "x$has_forbidden_chars" != x; then
40354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40355    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40356    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40357    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40358      # Going to short mode and back again did indeed matter. Since short mode is
40359      # case insensitive, let's make it lowercase to improve readability.
40360      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40361      # Now convert it back to Unix-style (cygpath)
40362      input_path=`$CYGPATH -u "$shortmode_path"`
40363      new_path="$input_path"
40364    fi
40365  fi
40366
40367  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40368  if test "x$test_cygdrive_prefix" = x; then
40369    # As a simple fix, exclude /usr/bin since it's not a real path.
40370    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40371      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40372      # a path prefixed by /cygdrive for fixpath to work.
40373      new_path="$CYGWIN_ROOT_PATH$input_path"
40374    fi
40375  fi
40376
40377  # remove trailing .exe if any
40378  new_path="${new_path/%.exe/}"
40379
40380    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40381
40382  # First separate the path from the arguments. This will split at the first
40383  # space.
40384  complete="$BUILD_LD"
40385  path="${complete%% *}"
40386  tmp="$complete EOL"
40387  arguments="${tmp#* }"
40388
40389  # Input might be given as Windows format, start by converting to
40390  # unix format.
40391  new_path="$path"
40392
40393  windows_path="$new_path"
40394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40395    unix_path=`$CYGPATH -u "$windows_path"`
40396    new_path="$unix_path"
40397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40399    new_path="$unix_path"
40400  fi
40401
40402
40403  # Now try to locate executable using which
40404  new_path=`$WHICH "$new_path" 2> /dev/null`
40405
40406  if test "x$new_path" = x; then
40407    # Oops. Which didn't find the executable.
40408    # The splitting of arguments from the executable at a space might have been incorrect,
40409    # since paths with space are more likely in Windows. Give it another try with the whole
40410    # argument.
40411    path="$complete"
40412    arguments="EOL"
40413    new_path="$path"
40414
40415  windows_path="$new_path"
40416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40417    unix_path=`$CYGPATH -u "$windows_path"`
40418    new_path="$unix_path"
40419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40421    new_path="$unix_path"
40422  fi
40423
40424
40425    new_path=`$WHICH "$new_path" 2> /dev/null`
40426    # bat and cmd files are not always considered executable in MSYS causing which
40427    # to not find them
40428    if test "x$new_path" = x \
40429        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40430        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40431      new_path="$path"
40432
40433  windows_path="$new_path"
40434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40435    unix_path=`$CYGPATH -u "$windows_path"`
40436    new_path="$unix_path"
40437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40439    new_path="$unix_path"
40440  fi
40441
40442    fi
40443
40444    if test "x$new_path" = x; then
40445      # It's still not found. Now this is an unrecoverable error.
40446      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40447$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40448      has_space=`$ECHO "$complete" | $GREP " "`
40449      if test "x$has_space" != x; then
40450        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40451$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40452      fi
40453      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40454    fi
40455  fi
40456
40457  # Now new_path has a complete unix path to the binary
40458  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40459    # Keep paths in /bin as-is, but remove trailing .exe if any
40460    new_path="${new_path/%.exe/}"
40461    # Do not save /bin paths to all_fixpath_prefixes!
40462  else
40463    # Not in mixed or Windows style, start by that.
40464    new_path=`cmd //c echo $new_path`
40465
40466  input_path="$new_path"
40467  # Check if we need to convert this using DOS-style short mode. If the path
40468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40469  # take no chances and rewrite it.
40470  # Note: m4 eats our [], so we need to use [ and ] instead.
40471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40472  if test "x$has_forbidden_chars" != x; then
40473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40475  fi
40476
40477    # Output is in $new_path
40478
40479  windows_path="$new_path"
40480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40481    unix_path=`$CYGPATH -u "$windows_path"`
40482    new_path="$unix_path"
40483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40485    new_path="$unix_path"
40486  fi
40487
40488    # remove trailing .exe if any
40489    new_path="${new_path/%.exe/}"
40490
40491    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40492    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40493  fi
40494
40495    else
40496      # We're on a unix platform. Hooray! :)
40497      # First separate the path from the arguments. This will split at the first
40498      # space.
40499      complete="$BUILD_LD"
40500      path="${complete%% *}"
40501      tmp="$complete EOL"
40502      arguments="${tmp#* }"
40503
40504      # Cannot rely on the command "which" here since it doesn't always work.
40505      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40506      if test -z "$is_absolute_path"; then
40507        # Path to executable is not absolute. Find it.
40508        IFS_save="$IFS"
40509        IFS=:
40510        for p in $PATH; do
40511          if test -f "$p/$path" && test -x "$p/$path"; then
40512            new_path="$p/$path"
40513            break
40514          fi
40515        done
40516        IFS="$IFS_save"
40517      else
40518        # This is an absolute path, we can use it without further modifications.
40519        new_path="$path"
40520      fi
40521
40522      if test "x$new_path" = x; then
40523        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40524$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40525        has_space=`$ECHO "$complete" | $GREP " "`
40526        if test "x$has_space" != x; then
40527          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40528$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40529        fi
40530        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40531      fi
40532    fi
40533
40534    # Now join together the path and the arguments once again
40535    if test "x$arguments" != xEOL; then
40536      new_complete="$new_path ${arguments% *}"
40537    else
40538      new_complete="$new_path"
40539    fi
40540
40541    if test "x$complete" != "x$new_complete"; then
40542      BUILD_LD="$new_complete"
40543      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40544$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40545    fi
40546  fi
40547
40548  else
40549    # If we are not cross compiling, use the normal target compilers for
40550    # building the build platform executables.
40551    BUILD_CC="$CC"
40552    BUILD_CXX="$CXX"
40553    BUILD_LD="$LD"
40554  fi
40555
40556
40557
40558
40559
40560
40561  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40562    # For hotspot, we need these in Windows mixed path,
40563    # so rewrite them all. Need added .exe suffix.
40564    HOTSPOT_CXX="$CXX.exe"
40565    HOTSPOT_LD="$LD.exe"
40566    HOTSPOT_MT="$MT.exe"
40567    HOTSPOT_RC="$RC.exe"
40568
40569  unix_path="$HOTSPOT_CXX"
40570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40571    windows_path=`$CYGPATH -m "$unix_path"`
40572    HOTSPOT_CXX="$windows_path"
40573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40574    windows_path=`cmd //c echo $unix_path`
40575    HOTSPOT_CXX="$windows_path"
40576  fi
40577
40578
40579  unix_path="$HOTSPOT_LD"
40580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40581    windows_path=`$CYGPATH -m "$unix_path"`
40582    HOTSPOT_LD="$windows_path"
40583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40584    windows_path=`cmd //c echo $unix_path`
40585    HOTSPOT_LD="$windows_path"
40586  fi
40587
40588
40589  unix_path="$HOTSPOT_MT"
40590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40591    windows_path=`$CYGPATH -m "$unix_path"`
40592    HOTSPOT_MT="$windows_path"
40593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40594    windows_path=`cmd //c echo $unix_path`
40595    HOTSPOT_MT="$windows_path"
40596  fi
40597
40598
40599  unix_path="$HOTSPOT_RC"
40600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40601    windows_path=`$CYGPATH -m "$unix_path"`
40602    HOTSPOT_RC="$windows_path"
40603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40604    windows_path=`cmd //c echo $unix_path`
40605    HOTSPOT_RC="$windows_path"
40606  fi
40607
40608
40609
40610  else
40611    HOTSPOT_CXX="$CXX"
40612    HOTSPOT_LD="$LD"
40613  fi
40614
40615
40616
40617  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40618    USE_CLANG=true
40619  fi
40620
40621
40622
40623
40624
40625  # The package path is used only on macosx?
40626  # FIXME: clean this up, and/or move it elsewhere.
40627  PACKAGE_PATH=/opt/local
40628
40629
40630  # Check for extra potential brokenness.
40631  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40632    # On Windows, double-check that we got the right compiler.
40633    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40634    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40635    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40636      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40637        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
40638      fi
40639    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40640      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40641        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40642      fi
40643    fi
40644  fi
40645
40646  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40647    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40648    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40649    # This is later checked when setting flags.
40650
40651    # "-Og" suppported for GCC 4.8 and later
40652    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40653
40654  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40655$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40656  supports=yes
40657
40658  saved_cflags="$CFLAGS"
40659  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40660  ac_ext=c
40661ac_cpp='$CPP $CPPFLAGS'
40662ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40663ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40664ac_compiler_gnu=$ac_cv_c_compiler_gnu
40665
40666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40667/* end confdefs.h.  */
40668int i;
40669_ACEOF
40670if ac_fn_c_try_compile "$LINENO"; then :
40671
40672else
40673  supports=no
40674fi
40675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40676  ac_ext=cpp
40677ac_cpp='$CXXCPP $CPPFLAGS'
40678ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40679ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40680ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40681
40682  CFLAGS="$saved_cflags"
40683
40684  saved_cxxflags="$CXXFLAGS"
40685  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40686  ac_ext=cpp
40687ac_cpp='$CXXCPP $CPPFLAGS'
40688ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40689ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40690ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40691
40692  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40693/* end confdefs.h.  */
40694int i;
40695_ACEOF
40696if ac_fn_cxx_try_compile "$LINENO"; then :
40697
40698else
40699  supports=no
40700fi
40701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40702  ac_ext=cpp
40703ac_cpp='$CXXCPP $CPPFLAGS'
40704ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40705ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40706ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40707
40708  CXXFLAGS="$saved_cxxflags"
40709
40710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40711$as_echo "$supports" >&6; }
40712  if test "x$supports" = "xyes" ; then
40713    HAS_CFLAG_OPTIMIZE_DEBUG=true
40714  else
40715    HAS_CFLAG_OPTIMIZE_DEBUG=false
40716  fi
40717
40718
40719    # "-z relro" supported in GNU binutils 2.17 and later
40720    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40721
40722  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40723$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40724  supports=yes
40725
40726  saved_ldflags="$LDFLAGS"
40727  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40728  ac_ext=c
40729ac_cpp='$CPP $CPPFLAGS'
40730ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40731ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40732ac_compiler_gnu=$ac_cv_c_compiler_gnu
40733
40734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40735/* end confdefs.h.  */
40736
40737int
40738main ()
40739{
40740
40741  ;
40742  return 0;
40743}
40744_ACEOF
40745if ac_fn_c_try_link "$LINENO"; then :
40746
40747else
40748  supports=no
40749fi
40750rm -f core conftest.err conftest.$ac_objext \
40751    conftest$ac_exeext conftest.$ac_ext
40752  ac_ext=cpp
40753ac_cpp='$CXXCPP $CPPFLAGS'
40754ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40755ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40756ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40757
40758  LDFLAGS="$saved_ldflags"
40759
40760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40761$as_echo "$supports" >&6; }
40762  if test "x$supports" = "xyes" ; then
40763    HAS_LINKER_RELRO=true
40764  else
40765    HAS_LINKER_RELRO=false
40766  fi
40767
40768
40769    # "-z now" supported in GNU binutils 2.11 and later
40770    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40771
40772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40773$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40774  supports=yes
40775
40776  saved_ldflags="$LDFLAGS"
40777  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40778  ac_ext=c
40779ac_cpp='$CPP $CPPFLAGS'
40780ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40781ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40782ac_compiler_gnu=$ac_cv_c_compiler_gnu
40783
40784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40785/* end confdefs.h.  */
40786
40787int
40788main ()
40789{
40790
40791  ;
40792  return 0;
40793}
40794_ACEOF
40795if ac_fn_c_try_link "$LINENO"; then :
40796
40797else
40798  supports=no
40799fi
40800rm -f core conftest.err conftest.$ac_objext \
40801    conftest$ac_exeext conftest.$ac_ext
40802  ac_ext=cpp
40803ac_cpp='$CXXCPP $CPPFLAGS'
40804ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40805ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40806ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40807
40808  LDFLAGS="$saved_ldflags"
40809
40810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40811$as_echo "$supports" >&6; }
40812  if test "x$supports" = "xyes" ; then
40813    HAS_LINKER_NOW=true
40814  else
40815    HAS_LINKER_NOW=false
40816  fi
40817
40818  fi
40819
40820  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40821  # in executable.'
40822  USING_BROKEN_SUSE_LD=no
40823  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40825$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40826    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40827    $ECHO "int main() { }" > main.c
40828    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40830$as_echo "no" >&6; }
40831      USING_BROKEN_SUSE_LD=no
40832    else
40833      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40834$as_echo "yes" >&6; }
40835      USING_BROKEN_SUSE_LD=yes
40836    fi
40837    rm -rf version-script.map main.c a.out
40838  fi
40839
40840
40841
40842# Setup the JTReg Regression Test Harness.
40843
40844
40845# Check whether --with-jtreg was given.
40846if test "${with_jtreg+set}" = set; then :
40847  withval=$with_jtreg;
40848else
40849  with_jtreg=no
40850fi
40851
40852
40853  if test "x$with_jtreg" = xno; then
40854    # jtreg disabled
40855    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40856$as_echo_n "checking for jtreg... " >&6; }
40857    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40858$as_echo "no" >&6; }
40859  else
40860    if test "x$with_jtreg" != xyes; then
40861      # with path specified.
40862      JT_HOME="$with_jtreg"
40863    fi
40864
40865    if test "x$JT_HOME" != x; then
40866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40867$as_echo_n "checking for jtreg... " >&6; }
40868
40869      # use JT_HOME enviroment var.
40870
40871  # Only process if variable expands to non-empty
40872
40873  if test "x$JT_HOME" != x; then
40874    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40875
40876  # Input might be given as Windows format, start by converting to
40877  # unix format.
40878  path="$JT_HOME"
40879  new_path=`$CYGPATH -u "$path"`
40880
40881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40884  # "foo.exe" is OK but "foo" is an error.
40885  #
40886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40887  # It is also a way to make sure we got the proper file name for the real test later on.
40888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40889  if test "x$test_shortpath" = x; then
40890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40891$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40892    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40893  fi
40894
40895  # Call helper function which possibly converts this using DOS-style short mode.
40896  # If so, the updated path is stored in $new_path.
40897
40898  input_path="$new_path"
40899  # Check if we need to convert this using DOS-style short mode. If the path
40900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40901  # take no chances and rewrite it.
40902  # Note: m4 eats our [], so we need to use [ and ] instead.
40903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40904  if test "x$has_forbidden_chars" != x; then
40905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40909      # Going to short mode and back again did indeed matter. Since short mode is
40910      # case insensitive, let's make it lowercase to improve readability.
40911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40912      # Now convert it back to Unix-style (cygpath)
40913      input_path=`$CYGPATH -u "$shortmode_path"`
40914      new_path="$input_path"
40915    fi
40916  fi
40917
40918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40919  if test "x$test_cygdrive_prefix" = x; then
40920    # As a simple fix, exclude /usr/bin since it's not a real path.
40921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40923      # a path prefixed by /cygdrive for fixpath to work.
40924      new_path="$CYGWIN_ROOT_PATH$input_path"
40925    fi
40926  fi
40927
40928
40929  if test "x$path" != "x$new_path"; then
40930    JT_HOME="$new_path"
40931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40932$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40933  fi
40934
40935    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40936
40937  path="$JT_HOME"
40938  has_colon=`$ECHO $path | $GREP ^.:`
40939  new_path="$path"
40940  if test "x$has_colon" = x; then
40941    # Not in mixed or Windows style, start by that.
40942    new_path=`cmd //c echo $path`
40943  fi
40944
40945
40946  input_path="$new_path"
40947  # Check if we need to convert this using DOS-style short mode. If the path
40948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40949  # take no chances and rewrite it.
40950  # Note: m4 eats our [], so we need to use [ and ] instead.
40951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40952  if test "x$has_forbidden_chars" != x; then
40953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40955  fi
40956
40957
40958  windows_path="$new_path"
40959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40960    unix_path=`$CYGPATH -u "$windows_path"`
40961    new_path="$unix_path"
40962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40964    new_path="$unix_path"
40965  fi
40966
40967  if test "x$path" != "x$new_path"; then
40968    JT_HOME="$new_path"
40969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40970$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40971  fi
40972
40973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40975
40976    else
40977      # We're on a unix platform. Hooray! :)
40978      path="$JT_HOME"
40979      has_space=`$ECHO "$path" | $GREP " "`
40980      if test "x$has_space" != x; then
40981        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40982$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40983        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40984      fi
40985
40986      # Use eval to expand a potential ~
40987      eval path="$path"
40988      if test ! -f "$path" && test ! -d "$path"; then
40989        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40990      fi
40991
40992      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40993    fi
40994  fi
40995
40996
40997      # jtreg win32 script works for everybody
40998      JTREGEXE="$JT_HOME/bin/jtreg"
40999
41000      if test ! -f "$JTREGEXE"; then
41001        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41002      fi
41003
41004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41005$as_echo "$JTREGEXE" >&6; }
41006    else
41007      # try to find jtreg on path
41008
41009
41010
41011  # Publish this variable in the help.
41012
41013
41014  if test "x$JTREGEXE" = x; then
41015    # The variable is not set by user, try to locate tool using the code snippet
41016    for ac_prog in jtreg
41017do
41018  # Extract the first word of "$ac_prog", so it can be a program name with args.
41019set dummy $ac_prog; ac_word=$2
41020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41021$as_echo_n "checking for $ac_word... " >&6; }
41022if ${ac_cv_path_JTREGEXE+:} false; then :
41023  $as_echo_n "(cached) " >&6
41024else
41025  case $JTREGEXE in
41026  [\\/]* | ?:[\\/]*)
41027  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41028  ;;
41029  *)
41030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41031for as_dir in $PATH
41032do
41033  IFS=$as_save_IFS
41034  test -z "$as_dir" && as_dir=.
41035    for ac_exec_ext in '' $ac_executable_extensions; do
41036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41037    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41039    break 2
41040  fi
41041done
41042  done
41043IFS=$as_save_IFS
41044
41045  ;;
41046esac
41047fi
41048JTREGEXE=$ac_cv_path_JTREGEXE
41049if test -n "$JTREGEXE"; then
41050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41051$as_echo "$JTREGEXE" >&6; }
41052else
41053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41054$as_echo "no" >&6; }
41055fi
41056
41057
41058  test -n "$JTREGEXE" && break
41059done
41060
41061  else
41062    # The variable is set, but is it from the command line or the environment?
41063
41064    # Try to remove the string !JTREGEXE! from our list.
41065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41067      # If it failed, the variable was not from the command line. Ignore it,
41068      # but warn the user (except for BASH, which is always set by the calling BASH).
41069      if test "xJTREGEXE" != xBASH; then
41070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41071$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41072      fi
41073      # Try to locate tool using the code snippet
41074      for ac_prog in jtreg
41075do
41076  # Extract the first word of "$ac_prog", so it can be a program name with args.
41077set dummy $ac_prog; ac_word=$2
41078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41079$as_echo_n "checking for $ac_word... " >&6; }
41080if ${ac_cv_path_JTREGEXE+:} false; then :
41081  $as_echo_n "(cached) " >&6
41082else
41083  case $JTREGEXE in
41084  [\\/]* | ?:[\\/]*)
41085  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41086  ;;
41087  *)
41088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41089for as_dir in $PATH
41090do
41091  IFS=$as_save_IFS
41092  test -z "$as_dir" && as_dir=.
41093    for ac_exec_ext in '' $ac_executable_extensions; do
41094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41095    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41097    break 2
41098  fi
41099done
41100  done
41101IFS=$as_save_IFS
41102
41103  ;;
41104esac
41105fi
41106JTREGEXE=$ac_cv_path_JTREGEXE
41107if test -n "$JTREGEXE"; then
41108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41109$as_echo "$JTREGEXE" >&6; }
41110else
41111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41112$as_echo "no" >&6; }
41113fi
41114
41115
41116  test -n "$JTREGEXE" && break
41117done
41118
41119    else
41120      # If it succeeded, then it was overridden by the user. We will use it
41121      # for the tool.
41122
41123      # First remove it from the list of overridden variables, so we can test
41124      # for unknown variables in the end.
41125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41126
41127      # Check if the provided tool contains a complete path.
41128      tool_specified="$JTREGEXE"
41129      tool_basename="${tool_specified##*/}"
41130      if test "x$tool_basename" = "x$tool_specified"; then
41131        # A command without a complete path is provided, search $PATH.
41132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41133$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41134        # Extract the first word of "$tool_basename", so it can be a program name with args.
41135set dummy $tool_basename; ac_word=$2
41136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41137$as_echo_n "checking for $ac_word... " >&6; }
41138if ${ac_cv_path_JTREGEXE+:} false; then :
41139  $as_echo_n "(cached) " >&6
41140else
41141  case $JTREGEXE in
41142  [\\/]* | ?:[\\/]*)
41143  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41144  ;;
41145  *)
41146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41147for as_dir in $PATH
41148do
41149  IFS=$as_save_IFS
41150  test -z "$as_dir" && as_dir=.
41151    for ac_exec_ext in '' $ac_executable_extensions; do
41152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41153    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41155    break 2
41156  fi
41157done
41158  done
41159IFS=$as_save_IFS
41160
41161  ;;
41162esac
41163fi
41164JTREGEXE=$ac_cv_path_JTREGEXE
41165if test -n "$JTREGEXE"; then
41166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41167$as_echo "$JTREGEXE" >&6; }
41168else
41169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41170$as_echo "no" >&6; }
41171fi
41172
41173
41174        if test "x$JTREGEXE" = x; then
41175          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41176        fi
41177      else
41178        # Otherwise we believe it is a complete path. Use it as it is.
41179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41180$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41182$as_echo_n "checking for JTREGEXE... " >&6; }
41183        if test ! -x "$tool_specified"; then
41184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41185$as_echo "not found" >&6; }
41186          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41187        fi
41188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41189$as_echo "$tool_specified" >&6; }
41190      fi
41191    fi
41192  fi
41193
41194
41195
41196  if test "x$JTREGEXE" = x; then
41197    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41198  fi
41199
41200
41201      JT_HOME="`$DIRNAME $JTREGEXE`"
41202    fi
41203  fi
41204
41205
41206
41207
41208
41209
41210  # Option used to tell the compiler whether to create 32- or 64-bit executables
41211  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41212    COMPILER_TARGET_BITS_FLAG="-q"
41213  else
41214    COMPILER_TARGET_BITS_FLAG="-m"
41215  fi
41216
41217
41218  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41219  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41220    ARFLAGS="-r"
41221  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41222    ARFLAGS="-X64"
41223  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41224    # lib.exe is used as AR to create static libraries.
41225    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41226  else
41227    ARFLAGS=""
41228  fi
41229
41230
41231  ## Setup strip.
41232  # FIXME: should this really be per platform, or should it be per toolchain type?
41233  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41234  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41235  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41236    STRIPFLAGS="-g"
41237  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41238    STRIPFLAGS="-x"
41239  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41240    STRIPFLAGS="-S"
41241  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41242    STRIPFLAGS="-X32_64"
41243  fi
41244
41245  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41246    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41247  fi
41248
41249
41250  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41251    CC_OUT_OPTION=-Fo
41252    EXE_OUT_OPTION=-out:
41253    LD_OUT_OPTION=-out:
41254    AR_OUT_OPTION=-out:
41255  else
41256    # The option used to specify the target .o,.a or .so file.
41257    # When compiling, how to specify the to be created object file.
41258    CC_OUT_OPTION='-o$(SPACE)'
41259    # When linking, how to specify the to be created executable.
41260    EXE_OUT_OPTION='-o$(SPACE)'
41261    # When linking, how to specify the to be created dynamically linkable library.
41262    LD_OUT_OPTION='-o$(SPACE)'
41263    # When archiving, how to specify the to be create static archive for object files.
41264    AR_OUT_OPTION='rcs$(SPACE)'
41265  fi
41266
41267
41268
41269
41270
41271  # On Windows, we need to set RC flags.
41272  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41273    RC_FLAGS="-nologo -l0x409"
41274    if test "x$VARIANT" = xOPT; then
41275      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41276    fi
41277
41278    # The version variables used to create RC_FLAGS may be overridden
41279    # in a custom configure script, or possibly the command line.
41280    # Let those variables be expanded at make time in spec.gmk.
41281    # The \$ are escaped to the shell, and the $(...) variables
41282    # are evaluated by make.
41283    RC_FLAGS="$RC_FLAGS \
41284        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41285        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41286        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41287        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41288        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41289        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41290        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41291  fi
41292
41293
41294  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41295    # silence copyright notice and other headers.
41296    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41297  fi
41298
41299  if test "x$SYSROOT" != "x"; then
41300    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41301      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41302        # Solaris Studio does not have a concept of sysroot. Instead we must
41303        # make sure the default include and lib dirs are appended to each
41304        # compile and link command line.
41305        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41306        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41307            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41308            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41309      fi
41310    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41311      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41312      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41313      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41314    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41315      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41316      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41317    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41318      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41319      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41320    fi
41321    # Propagate the sysroot args to hotspot
41322    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41323    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41324    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41325  fi
41326
41327  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41328  # set this here so it doesn't have to be peppered throughout the forest
41329  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41330    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41331    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41332  fi
41333
41334
41335
41336
41337
41338# FIXME: Currently we must test this after toolchain but before flags. Fix!
41339
41340# Now we can test some aspects on the target using configure macros.
41341
41342{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41343$as_echo_n "checking for ANSI C header files... " >&6; }
41344if ${ac_cv_header_stdc+:} false; then :
41345  $as_echo_n "(cached) " >&6
41346else
41347  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41348/* end confdefs.h.  */
41349#include <stdlib.h>
41350#include <stdarg.h>
41351#include <string.h>
41352#include <float.h>
41353
41354int
41355main ()
41356{
41357
41358  ;
41359  return 0;
41360}
41361_ACEOF
41362if ac_fn_cxx_try_compile "$LINENO"; then :
41363  ac_cv_header_stdc=yes
41364else
41365  ac_cv_header_stdc=no
41366fi
41367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41368
41369if test $ac_cv_header_stdc = yes; then
41370  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41371  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41372/* end confdefs.h.  */
41373#include <string.h>
41374
41375_ACEOF
41376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41377  $EGREP "memchr" >/dev/null 2>&1; then :
41378
41379else
41380  ac_cv_header_stdc=no
41381fi
41382rm -f conftest*
41383
41384fi
41385
41386if test $ac_cv_header_stdc = yes; then
41387  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41388  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41389/* end confdefs.h.  */
41390#include <stdlib.h>
41391
41392_ACEOF
41393if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41394  $EGREP "free" >/dev/null 2>&1; then :
41395
41396else
41397  ac_cv_header_stdc=no
41398fi
41399rm -f conftest*
41400
41401fi
41402
41403if test $ac_cv_header_stdc = yes; then
41404  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41405  if test "$cross_compiling" = yes; then :
41406  :
41407else
41408  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41409/* end confdefs.h.  */
41410#include <ctype.h>
41411#include <stdlib.h>
41412#if ((' ' & 0x0FF) == 0x020)
41413# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41414# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41415#else
41416# define ISLOWER(c) \
41417		   (('a' <= (c) && (c) <= 'i') \
41418		     || ('j' <= (c) && (c) <= 'r') \
41419		     || ('s' <= (c) && (c) <= 'z'))
41420# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41421#endif
41422
41423#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41424int
41425main ()
41426{
41427  int i;
41428  for (i = 0; i < 256; i++)
41429    if (XOR (islower (i), ISLOWER (i))
41430	|| toupper (i) != TOUPPER (i))
41431      return 2;
41432  return 0;
41433}
41434_ACEOF
41435if ac_fn_cxx_try_run "$LINENO"; then :
41436
41437else
41438  ac_cv_header_stdc=no
41439fi
41440rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41441  conftest.$ac_objext conftest.beam conftest.$ac_ext
41442fi
41443
41444fi
41445fi
41446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41447$as_echo "$ac_cv_header_stdc" >&6; }
41448if test $ac_cv_header_stdc = yes; then
41449
41450$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41451
41452fi
41453
41454# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41455for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41456		  inttypes.h stdint.h unistd.h
41457do :
41458  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41459ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41460"
41461if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41462  cat >>confdefs.h <<_ACEOF
41463#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41464_ACEOF
41465
41466fi
41467
41468done
41469
41470
41471
41472  ###############################################################################
41473  #
41474  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41475  # (The JVM can use 32 or 64 bit Java pointers but that decision
41476  # is made at runtime.)
41477  #
41478
41479  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41480    # Always specify -m flag on Solaris
41481    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41482
41483  # When we add flags to the "official" CFLAGS etc, we need to
41484  # keep track of these additions in ADDED_CFLAGS etc. These
41485  # will later be checked to make sure only controlled additions
41486  # have been made to CFLAGS etc.
41487  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41488  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41489  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41490
41491  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41492  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41493  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41494
41495  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41496  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41497  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41498
41499  elif test "x$COMPILE_TYPE" = xreduced; then
41500    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41501      # Specify -m if running reduced on unix platforms
41502
41503  # When we add flags to the "official" CFLAGS etc, we need to
41504  # keep track of these additions in ADDED_CFLAGS etc. These
41505  # will later be checked to make sure only controlled additions
41506  # have been made to CFLAGS etc.
41507  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41508  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41509  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41510
41511  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41512  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41513  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41514
41515  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41516  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41517  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41518
41519    fi
41520  fi
41521
41522  # Make compilation sanity check
41523  for ac_header in stdio.h
41524do :
41525  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41526if test "x$ac_cv_header_stdio_h" = xyes; then :
41527  cat >>confdefs.h <<_ACEOF
41528#define HAVE_STDIO_H 1
41529_ACEOF
41530
41531else
41532
41533    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41534$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41535    if test "x$COMPILE_TYPE" = xreduced; then
41536      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41537$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41538    elif test "x$COMPILE_TYPE" = xcross; then
41539      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41540$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41541    fi
41542    as_fn_error $? "Cannot continue." "$LINENO" 5
41543
41544fi
41545
41546done
41547
41548
41549  # The cast to long int works around a bug in the HP C Compiler
41550# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41551# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41552# This bug is HP SR number 8606223364.
41553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41554$as_echo_n "checking size of int *... " >&6; }
41555if ${ac_cv_sizeof_int_p+:} false; then :
41556  $as_echo_n "(cached) " >&6
41557else
41558  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41559
41560else
41561  if test "$ac_cv_type_int_p" = yes; then
41562     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41564as_fn_error 77 "cannot compute sizeof (int *)
41565See \`config.log' for more details" "$LINENO" 5; }
41566   else
41567     ac_cv_sizeof_int_p=0
41568   fi
41569fi
41570
41571fi
41572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41573$as_echo "$ac_cv_sizeof_int_p" >&6; }
41574
41575
41576
41577cat >>confdefs.h <<_ACEOF
41578#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41579_ACEOF
41580
41581
41582
41583  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41584  if test "x$ac_cv_sizeof_int_p" = x; then
41585    # The test failed, lets stick to the assumed value.
41586    { $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
41587$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41588  else
41589    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41590
41591    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41592      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41593      # Let's try to implicitely set the compilers target architecture and retry the test
41594      { $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
41595$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;}
41596      { $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
41597$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;}
41598
41599  # When we add flags to the "official" CFLAGS etc, we need to
41600  # keep track of these additions in ADDED_CFLAGS etc. These
41601  # will later be checked to make sure only controlled additions
41602  # have been made to CFLAGS etc.
41603  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41604  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41605  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41606
41607  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41608  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41609  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41610
41611  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41612  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41613  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41614
41615
41616      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41617      unset ac_cv_sizeof_int_p
41618      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41619      cat >>confdefs.h <<_ACEOF
41620#undef SIZEOF_INT_P
41621_ACEOF
41622
41623      # The cast to long int works around a bug in the HP C Compiler
41624# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41625# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41626# This bug is HP SR number 8606223364.
41627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41628$as_echo_n "checking size of int *... " >&6; }
41629if ${ac_cv_sizeof_int_p+:} false; then :
41630  $as_echo_n "(cached) " >&6
41631else
41632  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41633
41634else
41635  if test "$ac_cv_type_int_p" = yes; then
41636     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41637$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41638as_fn_error 77 "cannot compute sizeof (int *)
41639See \`config.log' for more details" "$LINENO" 5; }
41640   else
41641     ac_cv_sizeof_int_p=0
41642   fi
41643fi
41644
41645fi
41646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41647$as_echo "$ac_cv_sizeof_int_p" >&6; }
41648
41649
41650
41651cat >>confdefs.h <<_ACEOF
41652#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41653_ACEOF
41654
41655
41656
41657      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41658
41659      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41660        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
41661      fi
41662    fi
41663  fi
41664
41665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41666$as_echo_n "checking for target address size... " >&6; }
41667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41668$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41669
41670
41671  ###############################################################################
41672  #
41673  # Is the target little of big endian?
41674  #
41675   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41676$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41677if ${ac_cv_c_bigendian+:} false; then :
41678  $as_echo_n "(cached) " >&6
41679else
41680  ac_cv_c_bigendian=unknown
41681    # See if we're dealing with a universal compiler.
41682    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41683/* end confdefs.h.  */
41684#ifndef __APPLE_CC__
41685	       not a universal capable compiler
41686	     #endif
41687	     typedef int dummy;
41688
41689_ACEOF
41690if ac_fn_cxx_try_compile "$LINENO"; then :
41691
41692	# Check for potential -arch flags.  It is not universal unless
41693	# there are at least two -arch flags with different values.
41694	ac_arch=
41695	ac_prev=
41696	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41697	 if test -n "$ac_prev"; then
41698	   case $ac_word in
41699	     i?86 | x86_64 | ppc | ppc64)
41700	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41701		 ac_arch=$ac_word
41702	       else
41703		 ac_cv_c_bigendian=universal
41704		 break
41705	       fi
41706	       ;;
41707	   esac
41708	   ac_prev=
41709	 elif test "x$ac_word" = "x-arch"; then
41710	   ac_prev=arch
41711	 fi
41712       done
41713fi
41714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41715    if test $ac_cv_c_bigendian = unknown; then
41716      # See if sys/param.h defines the BYTE_ORDER macro.
41717      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41718/* end confdefs.h.  */
41719#include <sys/types.h>
41720	     #include <sys/param.h>
41721
41722int
41723main ()
41724{
41725#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41726		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41727		     && LITTLE_ENDIAN)
41728	      bogus endian macros
41729	     #endif
41730
41731  ;
41732  return 0;
41733}
41734_ACEOF
41735if ac_fn_cxx_try_compile "$LINENO"; then :
41736  # It does; now see whether it defined to BIG_ENDIAN or not.
41737	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41738/* end confdefs.h.  */
41739#include <sys/types.h>
41740		#include <sys/param.h>
41741
41742int
41743main ()
41744{
41745#if BYTE_ORDER != BIG_ENDIAN
41746		 not big endian
41747		#endif
41748
41749  ;
41750  return 0;
41751}
41752_ACEOF
41753if ac_fn_cxx_try_compile "$LINENO"; then :
41754  ac_cv_c_bigendian=yes
41755else
41756  ac_cv_c_bigendian=no
41757fi
41758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41759fi
41760rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41761    fi
41762    if test $ac_cv_c_bigendian = unknown; then
41763      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41764      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41765/* end confdefs.h.  */
41766#include <limits.h>
41767
41768int
41769main ()
41770{
41771#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41772	      bogus endian macros
41773	     #endif
41774
41775  ;
41776  return 0;
41777}
41778_ACEOF
41779if ac_fn_cxx_try_compile "$LINENO"; then :
41780  # It does; now see whether it defined to _BIG_ENDIAN or not.
41781	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41782/* end confdefs.h.  */
41783#include <limits.h>
41784
41785int
41786main ()
41787{
41788#ifndef _BIG_ENDIAN
41789		 not big endian
41790		#endif
41791
41792  ;
41793  return 0;
41794}
41795_ACEOF
41796if ac_fn_cxx_try_compile "$LINENO"; then :
41797  ac_cv_c_bigendian=yes
41798else
41799  ac_cv_c_bigendian=no
41800fi
41801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41802fi
41803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41804    fi
41805    if test $ac_cv_c_bigendian = unknown; then
41806      # Compile a test program.
41807      if test "$cross_compiling" = yes; then :
41808  # Try to guess by grepping values from an object file.
41809	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41810/* end confdefs.h.  */
41811short int ascii_mm[] =
41812		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41813		short int ascii_ii[] =
41814		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41815		int use_ascii (int i) {
41816		  return ascii_mm[i] + ascii_ii[i];
41817		}
41818		short int ebcdic_ii[] =
41819		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41820		short int ebcdic_mm[] =
41821		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41822		int use_ebcdic (int i) {
41823		  return ebcdic_mm[i] + ebcdic_ii[i];
41824		}
41825		extern int foo;
41826
41827int
41828main ()
41829{
41830return use_ascii (foo) == use_ebcdic (foo);
41831  ;
41832  return 0;
41833}
41834_ACEOF
41835if ac_fn_cxx_try_compile "$LINENO"; then :
41836  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41837	      ac_cv_c_bigendian=yes
41838	    fi
41839	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41840	      if test "$ac_cv_c_bigendian" = unknown; then
41841		ac_cv_c_bigendian=no
41842	      else
41843		# finding both strings is unlikely to happen, but who knows?
41844		ac_cv_c_bigendian=unknown
41845	      fi
41846	    fi
41847fi
41848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41849else
41850  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41851/* end confdefs.h.  */
41852$ac_includes_default
41853int
41854main ()
41855{
41856
41857	     /* Are we little or big endian?  From Harbison&Steele.  */
41858	     union
41859	     {
41860	       long int l;
41861	       char c[sizeof (long int)];
41862	     } u;
41863	     u.l = 1;
41864	     return u.c[sizeof (long int) - 1] == 1;
41865
41866  ;
41867  return 0;
41868}
41869_ACEOF
41870if ac_fn_cxx_try_run "$LINENO"; then :
41871  ac_cv_c_bigendian=no
41872else
41873  ac_cv_c_bigendian=yes
41874fi
41875rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41876  conftest.$ac_objext conftest.beam conftest.$ac_ext
41877fi
41878
41879    fi
41880fi
41881{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41882$as_echo "$ac_cv_c_bigendian" >&6; }
41883 case $ac_cv_c_bigendian in #(
41884   yes)
41885     ENDIAN="big";; #(
41886   no)
41887     ENDIAN="little" ;; #(
41888   universal)
41889     ENDIAN="universal_endianness"
41890     ;; #(
41891   *)
41892     ENDIAN="unknown" ;;
41893 esac
41894
41895
41896  if test "x$ENDIAN" = xuniversal_endianness; then
41897    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41898  fi
41899  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41900    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
41901  fi
41902
41903
41904# Configure flags for the tools
41905
41906  ###############################################################################
41907  #
41908  # How to compile shared libraries.
41909  #
41910
41911  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41912    PICFLAG="-fPIC"
41913    C_FLAG_REORDER=''
41914    CXX_FLAG_REORDER=''
41915
41916    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41917      # Linking is different on MacOSX
41918      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41919      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41920      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41921      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41922      SET_SHARED_LIBRARY_MAPFILE=''
41923    else
41924      # Default works for linux, might work on other platforms as well.
41925      SHARED_LIBRARY_FLAGS='-shared'
41926      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41927      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41928      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41929      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41930    fi
41931  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41932    PICFLAG=''
41933    C_FLAG_REORDER=''
41934    CXX_FLAG_REORDER=''
41935
41936    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41937      # Linking is different on MacOSX
41938      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41939      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41940      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41941      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41942      SET_SHARED_LIBRARY_MAPFILE=''
41943    else
41944      # Default works for linux, might work on other platforms as well.
41945      SHARED_LIBRARY_FLAGS='-shared'
41946      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41947      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41948      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41949      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41950    fi
41951  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41952    PICFLAG="-KPIC"
41953    C_FLAG_REORDER='-xF'
41954    CXX_FLAG_REORDER='-xF'
41955    SHARED_LIBRARY_FLAGS="-G"
41956    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41957    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41958    SET_SHARED_LIBRARY_NAME=''
41959    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41960  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41961    PICFLAG="-qpic=large"
41962    C_FLAG_REORDER=''
41963    CXX_FLAG_REORDER=''
41964    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41965    SET_EXECUTABLE_ORIGIN=""
41966    SET_SHARED_LIBRARY_ORIGIN=''
41967    SET_SHARED_LIBRARY_NAME=''
41968    SET_SHARED_LIBRARY_MAPFILE=''
41969  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41970    PICFLAG=""
41971    C_FLAG_REORDER=''
41972    CXX_FLAG_REORDER=''
41973    SHARED_LIBRARY_FLAGS="-LD"
41974    SET_EXECUTABLE_ORIGIN=''
41975    SET_SHARED_LIBRARY_ORIGIN=''
41976    SET_SHARED_LIBRARY_NAME=''
41977    SET_SHARED_LIBRARY_MAPFILE=''
41978  fi
41979
41980
41981
41982
41983
41984
41985
41986
41987  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41988    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41989    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41990    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41991  fi
41992  # The (cross) compiler is now configured, we can now test capabilities
41993  # of the target platform.
41994
41995
41996
41997  ###############################################################################
41998  #
41999  # Setup the opt flags for different compilers
42000  # and different operating systems.
42001  #
42002
42003  # FIXME: this was indirectly the old default, but just inherited.
42004  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42005  #   C_FLAG_DEPS="-MMD -MF"
42006  # fi
42007
42008  # Generate make dependency files
42009  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42010    C_FLAG_DEPS="-MMD -MF"
42011  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42012    C_FLAG_DEPS="-MMD -MF"
42013  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42014    C_FLAG_DEPS="-xMMD -xMF"
42015  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42016    C_FLAG_DEPS="-qmakedep=gcc -MF"
42017  fi
42018  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42019
42020
42021
42022  # Debug symbols
42023  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42024    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42025      # reduce from default "-g2" option to save space
42026      CFLAGS_DEBUG_SYMBOLS="-g1"
42027      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42028    else
42029      CFLAGS_DEBUG_SYMBOLS="-g"
42030      CXXFLAGS_DEBUG_SYMBOLS="-g"
42031    fi
42032  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42033    CFLAGS_DEBUG_SYMBOLS="-g"
42034    CXXFLAGS_DEBUG_SYMBOLS="-g"
42035  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42036    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42037    # FIXME: likely a bug, this disables debug symbols rather than enables them
42038    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42039  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42040    CFLAGS_DEBUG_SYMBOLS="-g"
42041    CXXFLAGS_DEBUG_SYMBOLS="-g"
42042  fi
42043
42044
42045
42046  # bounds, memory and behavior checking options
42047  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42048    case $DEBUG_LEVEL in
42049    release )
42050      # no adjustment
42051      ;;
42052    fastdebug )
42053      # no adjustment
42054      ;;
42055    slowdebug )
42056      # Add runtime stack smashing and undefined behavior checks.
42057      # Not all versions of gcc support -fstack-protector
42058      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
42059
42060  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"" >&5
42061$as_echo_n "checking if compiler supports \"$STACK_PROTECTOR_CFLAG\"... " >&6; }
42062  supports=yes
42063
42064  saved_cflags="$CFLAGS"
42065  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG"
42066  ac_ext=c
42067ac_cpp='$CPP $CPPFLAGS'
42068ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42069ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42070ac_compiler_gnu=$ac_cv_c_compiler_gnu
42071
42072  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42073/* end confdefs.h.  */
42074int i;
42075_ACEOF
42076if ac_fn_c_try_compile "$LINENO"; then :
42077
42078else
42079  supports=no
42080fi
42081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42082  ac_ext=cpp
42083ac_cpp='$CXXCPP $CPPFLAGS'
42084ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42085ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42086ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42087
42088  CFLAGS="$saved_cflags"
42089
42090  saved_cxxflags="$CXXFLAGS"
42091  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG"
42092  ac_ext=cpp
42093ac_cpp='$CXXCPP $CPPFLAGS'
42094ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42095ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42096ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42097
42098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42099/* end confdefs.h.  */
42100int i;
42101_ACEOF
42102if ac_fn_cxx_try_compile "$LINENO"; then :
42103
42104else
42105  supports=no
42106fi
42107rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42108  ac_ext=cpp
42109ac_cpp='$CXXCPP $CPPFLAGS'
42110ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42111ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42112ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42113
42114  CXXFLAGS="$saved_cxxflags"
42115
42116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42117$as_echo "$supports" >&6; }
42118  if test "x$supports" = "xyes" ; then
42119    :
42120  else
42121    STACK_PROTECTOR_CFLAG=""
42122  fi
42123
42124
42125      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42126      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
42127      ;;
42128    esac
42129  fi
42130
42131  # Optimization levels
42132  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42133    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42134
42135    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42136      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42137      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42138      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42139      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42140      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42141      C_O_FLAG_NONE="-xregs=no%frameptr"
42142      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42143      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42144      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42145      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42146      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42147      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42148        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42149        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42150      fi
42151    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42152      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42153      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42154      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42155      C_O_FLAG_DEBUG=""
42156      C_O_FLAG_NONE=""
42157      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42158      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42159      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42160      C_O_FLAG_DEBUG=""
42161      CXX_O_FLAG_NONE=""
42162    fi
42163  else
42164    # The remaining toolchains share opt flags between CC and CXX;
42165    # setup for C and duplicate afterwards.
42166    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42167      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42168        # On MacOSX we optimize for size, something
42169        # we should do for all platforms?
42170        C_O_FLAG_HIGHEST="-Os"
42171        C_O_FLAG_HI="-Os"
42172        C_O_FLAG_NORM="-Os"
42173      else
42174        C_O_FLAG_HIGHEST="-O3"
42175        C_O_FLAG_HI="-O3"
42176        C_O_FLAG_NORM="-O2"
42177      fi
42178      C_O_FLAG_DEBUG="-O0"
42179      C_O_FLAG_NONE="-O0"
42180    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42181      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42182        # On MacOSX we optimize for size, something
42183        # we should do for all platforms?
42184        C_O_FLAG_HIGHEST="-Os"
42185        C_O_FLAG_HI="-Os"
42186        C_O_FLAG_NORM="-Os"
42187      else
42188        C_O_FLAG_HIGHEST="-O3"
42189        C_O_FLAG_HI="-O3"
42190        C_O_FLAG_NORM="-O2"
42191      fi
42192      C_O_FLAG_DEBUG="-O0"
42193      C_O_FLAG_NONE="-O0"
42194    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42195      C_O_FLAG_HIGHEST="-O3"
42196      C_O_FLAG_HI="-O3 -qstrict"
42197      C_O_FLAG_NORM="-O2"
42198      C_O_FLAG_DEBUG="-qnoopt"
42199      C_O_FLAG_NONE="-qnoop"
42200    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42201      C_O_FLAG_HIGHEST="-O2"
42202      C_O_FLAG_HI="-O1"
42203      C_O_FLAG_NORM="-O1"
42204      C_O_FLAG_DEBUG="-Od"
42205      C_O_FLAG_NONE="-Od"
42206    fi
42207    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42208    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42209    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42210    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42211    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42212  fi
42213
42214  # Adjust optimization flags according to debug level.
42215  case $DEBUG_LEVEL in
42216    release )
42217      # no adjustment
42218      ;;
42219    fastdebug )
42220      # Not quite so much optimization
42221      C_O_FLAG_HI="$C_O_FLAG_NORM"
42222      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42223      ;;
42224    slowdebug )
42225      # Disable optimization
42226      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42227      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42228      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42229      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42230      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42231      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42232      ;;
42233  esac
42234
42235
42236
42237
42238
42239
42240
42241
42242
42243
42244
42245
42246
42247  # Special extras...
42248  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42249    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42250      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42251      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42252    fi
42253    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42254    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42255  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42256    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42257    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
42258  fi
42259
42260  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42262$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42263  fi
42264
42265  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42266    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42267$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42268  fi
42269
42270  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42271    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42272$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42273  fi
42274
42275
42276# Check whether --with-extra-cflags was given.
42277if test "${with_extra_cflags+set}" = set; then :
42278  withval=$with_extra_cflags;
42279fi
42280
42281
42282
42283# Check whether --with-extra-cxxflags was given.
42284if test "${with_extra_cxxflags+set}" = set; then :
42285  withval=$with_extra_cxxflags;
42286fi
42287
42288
42289
42290# Check whether --with-extra-ldflags was given.
42291if test "${with_extra_ldflags+set}" = set; then :
42292  withval=$with_extra_ldflags;
42293fi
42294
42295
42296  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42297  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42298  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42299
42300  # Hotspot needs these set in their legacy form
42301  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42302  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42303  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42304
42305
42306
42307
42308
42309  ###############################################################################
42310  #
42311  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42312  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42313  #
42314
42315  # Setup compiler/platform specific flags into
42316  #    CFLAGS_JDK    - C Compiler flags
42317  #    CXXFLAGS_JDK  - C++ Compiler flags
42318  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42319  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42320    if test "x$OPENJDK_TARGET_CPU" = xx86; then
42321      # Force compatibility with i586 on 32 bit intel platforms.
42322      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
42323    fi
42324    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42325        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42326    case $OPENJDK_TARGET_CPU_ARCH in
42327      arm )
42328        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42329        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42330        ;;
42331      ppc )
42332        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42333        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42334        ;;
42335      * )
42336        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42337        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42338        ;;
42339    esac
42340  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42341    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42342    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42343      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42344    fi
42345
42346    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42347    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42348  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42349    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42350    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42351  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42352    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42353        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42354        -DWIN32_LEAN_AND_MEAN \
42355        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42356        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
42357        -DWIN32 -DIAL"
42358    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42359      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42360    else
42361      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42362    fi
42363    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42364    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42365    # studio.
42366    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42367      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42368          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42369    fi
42370  fi
42371
42372  ###############################################################################
42373
42374  # Adjust flags according to debug level.
42375  case $DEBUG_LEVEL in
42376    fastdebug | slowdebug )
42377      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42378      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42379      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42380      ;;
42381    release )
42382      ;;
42383    * )
42384      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42385      ;;
42386  esac
42387
42388  # Setup LP64
42389  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42390
42391  # Set some common defines. These works for all compilers, but assume
42392  # -D is universally accepted.
42393
42394  # Setup endianness
42395  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42396    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42397    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42398    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42399    #   Note: -Dmacro         is the same as    #define macro 1
42400    #         -Dmacro=        is the same as    #define macro
42401    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42402      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42403    else
42404      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42405    fi
42406  else
42407    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42408    # are defined in the system?
42409    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42410      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42411    else
42412      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42413    fi
42414  fi
42415
42416  # Setup target OS define. Use OS target name but in upper case.
42417  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42418  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42419
42420  # Setup target CPU
42421  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42422
42423  # Setup debug/release defines
42424  if test "x$DEBUG_LEVEL" = xrelease; then
42425    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42426    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42427      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42428    fi
42429  else
42430    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42431  fi
42432
42433  # Setup release name
42434  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42435
42436
42437  # Set some additional per-OS defines.
42438  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42439    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42440  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42441    # FIXME: PPC64 should not be here.
42442    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42443  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42444    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42445  fi
42446
42447  # Additional macosx handling
42448  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42449    # Setting these parameters makes it an error to link to macosx APIs that are
42450    # newer than the given OS version and makes the linked binaries compatible
42451    # even if built on a newer version of the OS.
42452    # The expected format is X.Y.Z
42453    MACOSX_VERSION_MIN=10.7.0
42454
42455
42456    # The macro takes the version with no dots, ex: 1070
42457    # Let the flags variables get resolved in make for easier override on make
42458    # command line.
42459    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42460    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42461  fi
42462
42463  # Setup some hard coded includes
42464  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42465      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42466      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42467      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42468
42469  # The shared libraries are compiled using the picflag.
42470  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42471  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42472
42473  # Executable flags
42474  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42475  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42476
42477
42478
42479
42480
42481
42482  # Flags for compiling test libraries
42483  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42484  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42485
42486  # Flags for compiling test executables
42487  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42488  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42489
42490
42491
42492
42493
42494
42495  # Setup LDFLAGS et al.
42496  #
42497
42498  # Now this is odd. The JDK native libraries have to link against libjvm.so
42499  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42500  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42501  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42502  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42503  # libraries will link to whatever is in memory. Yuck.
42504  #
42505  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42506  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42507    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42508    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42509      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42510    fi
42511    # TODO: make -debug optional "--disable-full-debug-symbols"
42512    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42513  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42514    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42515    # We have previously set HAS_GNU_HASH if this is the case
42516    if test -n "$HAS_GNU_HASH"; then
42517      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42518    fi
42519    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42520      # And since we now know that the linker is gnu, then add -z defs, to forbid
42521      # undefined symbols in object files.
42522      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42523      case $DEBUG_LEVEL in
42524        release )
42525          # tell linker to optimize libraries.
42526          # Should this be supplied to the OSS linker as well?
42527          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42528          ;;
42529        slowdebug )
42530          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42531            # do relocations at load
42532            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42533            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42534          fi
42535          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42536            # mark relocations read only
42537            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42538            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42539          fi
42540          ;;
42541        fastdebug )
42542          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42543            # mark relocations read only
42544            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42545            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42546          fi
42547          ;;
42548        * )
42549          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42550          ;;
42551        esac
42552    fi
42553  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42554    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42555    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42556  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42557    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42558  fi
42559
42560  # Customize LDFLAGS for executables
42561
42562  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42563
42564  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42565    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42566      LDFLAGS_STACK_SIZE=1048576
42567    else
42568      LDFLAGS_STACK_SIZE=327680
42569    fi
42570    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42571  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42572    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42573  fi
42574
42575  # Customize LDFLAGS for libs
42576  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42577
42578  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42579    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42580    LDFLAGS_JDKLIB_SUFFIX=""
42581  else
42582    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42583        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42584
42585    # On some platforms (mac) the linker warns about non existing -L dirs.
42586    # Add server first if available. Linking aginst client does not always produce the same results.
42587    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42588    # Default to server for other variants.
42589    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42590      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42591    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42592      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42593    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42594      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42595    else
42596      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42597    fi
42598
42599    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42600    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42601      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42602    fi
42603  fi
42604
42605
42606
42607
42608
42609
42610
42611  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42612  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42613  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42614  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42615
42616
42617
42618
42619
42620
42621
42622  # Some Zero and Shark settings.
42623  # ZERO_ARCHFLAG tells the compiler which mode to build for
42624  case "${OPENJDK_TARGET_CPU}" in
42625    s390)
42626      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42627      ;;
42628    *)
42629      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42630  esac
42631
42632  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42633$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42634  supports=yes
42635
42636  saved_cflags="$CFLAGS"
42637  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42638  ac_ext=c
42639ac_cpp='$CPP $CPPFLAGS'
42640ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42641ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42642ac_compiler_gnu=$ac_cv_c_compiler_gnu
42643
42644  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42645/* end confdefs.h.  */
42646int i;
42647_ACEOF
42648if ac_fn_c_try_compile "$LINENO"; then :
42649
42650else
42651  supports=no
42652fi
42653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42654  ac_ext=cpp
42655ac_cpp='$CXXCPP $CPPFLAGS'
42656ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42657ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42658ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42659
42660  CFLAGS="$saved_cflags"
42661
42662  saved_cxxflags="$CXXFLAGS"
42663  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42664  ac_ext=cpp
42665ac_cpp='$CXXCPP $CPPFLAGS'
42666ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42667ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42668ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42669
42670  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42671/* end confdefs.h.  */
42672int i;
42673_ACEOF
42674if ac_fn_cxx_try_compile "$LINENO"; then :
42675
42676else
42677  supports=no
42678fi
42679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42680  ac_ext=cpp
42681ac_cpp='$CXXCPP $CPPFLAGS'
42682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42685
42686  CXXFLAGS="$saved_cxxflags"
42687
42688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42689$as_echo "$supports" >&6; }
42690  if test "x$supports" = "xyes" ; then
42691    :
42692  else
42693    ZERO_ARCHFLAG=""
42694  fi
42695
42696
42697
42698  # Check that the compiler supports -mX (or -qX on AIX) flags
42699  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42700
42701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42702$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42703  supports=yes
42704
42705  saved_cflags="$CFLAGS"
42706  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42707  ac_ext=c
42708ac_cpp='$CPP $CPPFLAGS'
42709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42711ac_compiler_gnu=$ac_cv_c_compiler_gnu
42712
42713  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42714/* end confdefs.h.  */
42715int i;
42716_ACEOF
42717if ac_fn_c_try_compile "$LINENO"; then :
42718
42719else
42720  supports=no
42721fi
42722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42723  ac_ext=cpp
42724ac_cpp='$CXXCPP $CPPFLAGS'
42725ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42726ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42727ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42728
42729  CFLAGS="$saved_cflags"
42730
42731  saved_cxxflags="$CXXFLAGS"
42732  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42733  ac_ext=cpp
42734ac_cpp='$CXXCPP $CPPFLAGS'
42735ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42736ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42737ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42738
42739  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42740/* end confdefs.h.  */
42741int i;
42742_ACEOF
42743if ac_fn_cxx_try_compile "$LINENO"; then :
42744
42745else
42746  supports=no
42747fi
42748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42749  ac_ext=cpp
42750ac_cpp='$CXXCPP $CPPFLAGS'
42751ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42752ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42753ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42754
42755  CXXFLAGS="$saved_cxxflags"
42756
42757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42758$as_echo "$supports" >&6; }
42759  if test "x$supports" = "xyes" ; then
42760    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42761  else
42762    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42763  fi
42764
42765
42766
42767  # Check whether --enable-warnings-as-errors was given.
42768if test "${enable_warnings_as_errors+set}" = set; then :
42769  enableval=$enable_warnings_as_errors;
42770fi
42771
42772
42773  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42774$as_echo_n "checking if native warnings are errors... " >&6; }
42775  if test "x$enable_warnings_as_errors" = "xyes"; then
42776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42777$as_echo "yes (explicitely set)" >&6; }
42778    WARNINGS_AS_ERRORS=true
42779  elif test "x$enable_warnings_as_errors" = "xno"; then
42780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42781$as_echo "no" >&6; }
42782    WARNINGS_AS_ERRORS=false
42783  elif test "x$enable_warnings_as_errors" = "x"; then
42784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42785$as_echo "yes (default)" >&6; }
42786    WARNINGS_AS_ERRORS=true
42787  else
42788    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42789  fi
42790
42791
42792  case "${TOOLCHAIN_TYPE}" in
42793    microsoft)
42794      DISABLE_WARNING_PREFIX="-wd"
42795      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42796      ;;
42797    solstudio)
42798      DISABLE_WARNING_PREFIX="-erroff="
42799      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42800      ;;
42801    gcc)
42802      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42803
42804  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42805$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42806  supports=yes
42807
42808  saved_cflags="$CFLAGS"
42809  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42810  ac_ext=c
42811ac_cpp='$CPP $CPPFLAGS'
42812ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42813ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42814ac_compiler_gnu=$ac_cv_c_compiler_gnu
42815
42816  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42817/* end confdefs.h.  */
42818int i;
42819_ACEOF
42820if ac_fn_c_try_compile "$LINENO"; then :
42821
42822else
42823  supports=no
42824fi
42825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42826  ac_ext=cpp
42827ac_cpp='$CXXCPP $CPPFLAGS'
42828ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42829ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42830ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42831
42832  CFLAGS="$saved_cflags"
42833
42834  saved_cxxflags="$CXXFLAGS"
42835  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42836  ac_ext=cpp
42837ac_cpp='$CXXCPP $CPPFLAGS'
42838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42841
42842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42843/* end confdefs.h.  */
42844int i;
42845_ACEOF
42846if ac_fn_cxx_try_compile "$LINENO"; then :
42847
42848else
42849  supports=no
42850fi
42851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42852  ac_ext=cpp
42853ac_cpp='$CXXCPP $CPPFLAGS'
42854ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42855ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42856ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42857
42858  CXXFLAGS="$saved_cxxflags"
42859
42860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42861$as_echo "$supports" >&6; }
42862  if test "x$supports" = "xyes" ; then
42863    GCC_CAN_DISABLE_WARNINGS=true
42864  else
42865    GCC_CAN_DISABLE_WARNINGS=false
42866
42867  fi
42868
42869      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42870        DISABLE_WARNING_PREFIX="-Wno-"
42871      else
42872        DISABLE_WARNING_PREFIX=
42873      fi
42874      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42875      ;;
42876    clang)
42877      DISABLE_WARNING_PREFIX="-Wno-"
42878      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42879      ;;
42880  esac
42881
42882
42883
42884
42885# Setup debug symbols (need objcopy from the toolchain for that)
42886
42887  #
42888  # ENABLE_DEBUG_SYMBOLS
42889  # This must be done after the toolchain is setup, since we're looking at objcopy.
42890  #
42891  # Check whether --enable-debug-symbols was given.
42892if test "${enable_debug_symbols+set}" = set; then :
42893  enableval=$enable_debug_symbols;
42894fi
42895
42896
42897  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42898$as_echo_n "checking if we should generate debug symbols... " >&6; }
42899
42900  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42901    # explicit enabling of enable-debug-symbols and can't find objcopy
42902    #   this is an error
42903    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42904  fi
42905
42906  if test "x$enable_debug_symbols" = "xyes"; then
42907    ENABLE_DEBUG_SYMBOLS=true
42908  elif test "x$enable_debug_symbols" = "xno"; then
42909    ENABLE_DEBUG_SYMBOLS=false
42910  else
42911    # Default is on if objcopy is found
42912    if test "x$OBJCOPY" != x; then
42913      ENABLE_DEBUG_SYMBOLS=true
42914    # MacOS X and Windows don't use objcopy but default is on for those OSes
42915    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42916      ENABLE_DEBUG_SYMBOLS=true
42917    else
42918      ENABLE_DEBUG_SYMBOLS=false
42919    fi
42920  fi
42921
42922  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42923$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42924
42925  #
42926  # ZIP_DEBUGINFO_FILES
42927  #
42928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42929$as_echo_n "checking if we should zip debug-info files... " >&6; }
42930  # Check whether --enable-zip-debug-info was given.
42931if test "${enable_zip_debug_info+set}" = set; then :
42932  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42933else
42934  enable_zip_debug_info="yes"
42935fi
42936
42937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42938$as_echo "${enable_zip_debug_info}" >&6; }
42939
42940  if test "x${enable_zip_debug_info}" = "xno"; then
42941    ZIP_DEBUGINFO_FILES=false
42942  else
42943    ZIP_DEBUGINFO_FILES=true
42944  fi
42945
42946
42947
42948
42949
42950  # Check whether --enable-native-coverage was given.
42951if test "${enable_native_coverage+set}" = set; then :
42952  enableval=$enable_native_coverage;
42953fi
42954
42955  GCOV_ENABLED="false"
42956  if test "x$enable_native_coverage" = "xyes"; then
42957    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42958      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42959$as_echo_n "checking if native coverage is enabled... " >&6; }
42960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42961$as_echo "yes" >&6; }
42962      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42963      GCOV_LDFLAGS="-fprofile-arcs"
42964      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42965      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42966      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42967      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42968      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42969      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42970      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42971      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42972      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42973      GCOV_ENABLED="true"
42974    else
42975      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42976    fi
42977  elif test "x$enable_native_coverage" = "xno"; then
42978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42979$as_echo_n "checking if native coverage is enabled... " >&6; }
42980    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42981$as_echo "no" >&6; }
42982  elif test "x$enable_native_coverage" != "x"; then
42983    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42984  fi
42985
42986
42987
42988
42989###############################################################################
42990#
42991# Check dependencies for external and internal libraries.
42992#
42993###############################################################################
42994
42995# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42996
42997  # When using cygwin or msys, we need a wrapper binary that renames
42998  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42999  # @files and rewrites these too! This wrapper binary is
43000  # called fixpath.
43001  FIXPATH=
43002  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43004$as_echo_n "checking if fixpath can be created... " >&6; }
43005    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43006    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
43007    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
43008    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43009      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43010      FIXPATH="$FIXPATH_BIN -c"
43011    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43012      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43013      # @ was chosen as separator to minimize risk of other tools messing around with it
43014      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
43015          | tr ' ' '\n' | grep '^/./' | sort | uniq`
43016      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43017      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
43018    fi
43019    FIXPATH_SRC_W="$FIXPATH_SRC"
43020    FIXPATH_BIN_W="$FIXPATH_BIN"
43021
43022  unix_path="$FIXPATH_SRC_W"
43023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43024    windows_path=`$CYGPATH -m "$unix_path"`
43025    FIXPATH_SRC_W="$windows_path"
43026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43027    windows_path=`cmd //c echo $unix_path`
43028    FIXPATH_SRC_W="$windows_path"
43029  fi
43030
43031
43032  unix_path="$FIXPATH_BIN_W"
43033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43034    windows_path=`$CYGPATH -m "$unix_path"`
43035    FIXPATH_BIN_W="$windows_path"
43036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43037    windows_path=`cmd //c echo $unix_path`
43038    FIXPATH_BIN_W="$windows_path"
43039  fi
43040
43041    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
43042    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
43043    cd $FIXPATH_DIR
43044    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
43045    cd $CURDIR
43046
43047    if test ! -x $FIXPATH_BIN; then
43048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43049$as_echo "no" >&6; }
43050      cat $FIXPATH_DIR/fixpath1.log
43051      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
43052    fi
43053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43054$as_echo "yes" >&6; }
43055    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43056$as_echo_n "checking if fixpath.exe works... " >&6; }
43057    cd $FIXPATH_DIR
43058    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
43059        > $FIXPATH_DIR/fixpath2.log 2>&1
43060    cd $CURDIR
43061    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
43062      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43063$as_echo "no" >&6; }
43064      cat $FIXPATH_DIR/fixpath2.log
43065      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43066    fi
43067    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43068$as_echo "yes" >&6; }
43069  fi
43070
43071
43072
43073
43074
43075
43076  ###############################################################################
43077  #
43078  # OS specific settings that we never will need to probe.
43079  #
43080  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43082$as_echo_n "checking what is not needed on Linux?... " >&6; }
43083    PULSE_NOT_NEEDED=yes
43084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43085$as_echo "pulse" >&6; }
43086  fi
43087
43088  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43090$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43091    ALSA_NOT_NEEDED=yes
43092    PULSE_NOT_NEEDED=yes
43093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43094$as_echo "alsa pulse" >&6; }
43095  fi
43096
43097  if test "x$OPENJDK_TARGET_OS" = xaix; then
43098    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43099$as_echo_n "checking what is not needed on AIX?... " >&6; }
43100    ALSA_NOT_NEEDED=yes
43101    PULSE_NOT_NEEDED=yes
43102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43103$as_echo "alsa pulse" >&6; }
43104  fi
43105
43106
43107  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43109$as_echo_n "checking what is not needed on Windows?... " >&6; }
43110    CUPS_NOT_NEEDED=yes
43111    ALSA_NOT_NEEDED=yes
43112    PULSE_NOT_NEEDED=yes
43113    X11_NOT_NEEDED=yes
43114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43115$as_echo "alsa cups pulse x11" >&6; }
43116  fi
43117
43118  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43120$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43121    ALSA_NOT_NEEDED=yes
43122    PULSE_NOT_NEEDED=yes
43123    X11_NOT_NEEDED=yes
43124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43125$as_echo "alsa pulse x11" >&6; }
43126  fi
43127
43128  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43129    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43130$as_echo_n "checking what is not needed on bsd?... " >&6; }
43131    ALSA_NOT_NEEDED=yes
43132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43133$as_echo "alsa" >&6; }
43134  fi
43135
43136  if test "x$OPENJDK" = "xfalse"; then
43137    FREETYPE_NOT_NEEDED=yes
43138  fi
43139
43140  if test "x$SUPPORT_HEADFUL" = xno; then
43141    X11_NOT_NEEDED=yes
43142  fi
43143
43144
43145
43146  ###############################################################################
43147  #
43148  # Check for X Windows
43149  #
43150
43151  if test "x$X11_NOT_NEEDED" = xyes; then
43152    if test "x${with_x}" != x; then
43153      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43154$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43155    fi
43156    X_CFLAGS=
43157    X_LIBS=
43158  else
43159    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43160    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43161    # --x-libraries for the sysroot, if that seems to be correct.
43162    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43163      if test "x$SYSROOT" != "x"; then
43164        if test "x$x_includes" = xNONE; then
43165          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43166            x_includes="$SYSROOT/usr/X11R6/include"
43167          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43168            x_includes="$SYSROOT/usr/include"
43169          fi
43170        fi
43171        if test "x$x_libraries" = xNONE; then
43172          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43173            x_libraries="$SYSROOT/usr/X11R6/lib"
43174          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43175            x_libraries="$SYSROOT/usr/lib64"
43176          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43177            x_libraries="$SYSROOT/usr/lib"
43178          fi
43179        fi
43180      fi
43181    fi
43182
43183    # Now let autoconf do it's magic
43184    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43185$as_echo_n "checking for X... " >&6; }
43186
43187
43188# Check whether --with-x was given.
43189if test "${with_x+set}" = set; then :
43190  withval=$with_x;
43191fi
43192
43193# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43194if test "x$with_x" = xno; then
43195  # The user explicitly disabled X.
43196  have_x=disabled
43197else
43198  case $x_includes,$x_libraries in #(
43199    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43200    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43201  $as_echo_n "(cached) " >&6
43202else
43203  # One or both of the vars are not set, and there is no cached value.
43204ac_x_includes=no ac_x_libraries=no
43205rm -f -r conftest.dir
43206if mkdir conftest.dir; then
43207  cd conftest.dir
43208  cat >Imakefile <<'_ACEOF'
43209incroot:
43210	@echo incroot='${INCROOT}'
43211usrlibdir:
43212	@echo usrlibdir='${USRLIBDIR}'
43213libdir:
43214	@echo libdir='${LIBDIR}'
43215_ACEOF
43216  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43217    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43218    for ac_var in incroot usrlibdir libdir; do
43219      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43220    done
43221    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43222    for ac_extension in a so sl dylib la dll; do
43223      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43224	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43225	ac_im_usrlibdir=$ac_im_libdir; break
43226      fi
43227    done
43228    # Screen out bogus values from the imake configuration.  They are
43229    # bogus both because they are the default anyway, and because
43230    # using them would break gcc on systems where it needs fixed includes.
43231    case $ac_im_incroot in
43232	/usr/include) ac_x_includes= ;;
43233	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43234    esac
43235    case $ac_im_usrlibdir in
43236	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43237	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43238    esac
43239  fi
43240  cd ..
43241  rm -f -r conftest.dir
43242fi
43243
43244# Standard set of common directories for X headers.
43245# Check X11 before X11Rn because it is often a symlink to the current release.
43246ac_x_header_dirs='
43247/usr/X11/include
43248/usr/X11R7/include
43249/usr/X11R6/include
43250/usr/X11R5/include
43251/usr/X11R4/include
43252
43253/usr/include/X11
43254/usr/include/X11R7
43255/usr/include/X11R6
43256/usr/include/X11R5
43257/usr/include/X11R4
43258
43259/usr/local/X11/include
43260/usr/local/X11R7/include
43261/usr/local/X11R6/include
43262/usr/local/X11R5/include
43263/usr/local/X11R4/include
43264
43265/usr/local/include/X11
43266/usr/local/include/X11R7
43267/usr/local/include/X11R6
43268/usr/local/include/X11R5
43269/usr/local/include/X11R4
43270
43271/usr/X386/include
43272/usr/x386/include
43273/usr/XFree86/include/X11
43274
43275/usr/include
43276/usr/local/include
43277/usr/unsupported/include
43278/usr/athena/include
43279/usr/local/x11r5/include
43280/usr/lpp/Xamples/include
43281
43282/usr/openwin/include
43283/usr/openwin/share/include'
43284
43285if test "$ac_x_includes" = no; then
43286  # Guess where to find include files, by looking for Xlib.h.
43287  # First, try using that file with no special directory specified.
43288  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43289/* end confdefs.h.  */
43290#include <X11/Xlib.h>
43291_ACEOF
43292if ac_fn_cxx_try_cpp "$LINENO"; then :
43293  # We can compile using X headers with no special include directory.
43294ac_x_includes=
43295else
43296  for ac_dir in $ac_x_header_dirs; do
43297  if test -r "$ac_dir/X11/Xlib.h"; then
43298    ac_x_includes=$ac_dir
43299    break
43300  fi
43301done
43302fi
43303rm -f conftest.err conftest.i conftest.$ac_ext
43304fi # $ac_x_includes = no
43305
43306if test "$ac_x_libraries" = no; then
43307  # Check for the libraries.
43308  # See if we find them without any special options.
43309  # Don't add to $LIBS permanently.
43310  ac_save_LIBS=$LIBS
43311  LIBS="-lX11 $LIBS"
43312  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43313/* end confdefs.h.  */
43314#include <X11/Xlib.h>
43315int
43316main ()
43317{
43318XrmInitialize ()
43319  ;
43320  return 0;
43321}
43322_ACEOF
43323if ac_fn_cxx_try_link "$LINENO"; then :
43324  LIBS=$ac_save_LIBS
43325# We can link X programs with no special library path.
43326ac_x_libraries=
43327else
43328  LIBS=$ac_save_LIBS
43329for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43330do
43331  # Don't even attempt the hair of trying to link an X program!
43332  for ac_extension in a so sl dylib la dll; do
43333    if test -r "$ac_dir/libX11.$ac_extension"; then
43334      ac_x_libraries=$ac_dir
43335      break 2
43336    fi
43337  done
43338done
43339fi
43340rm -f core conftest.err conftest.$ac_objext \
43341    conftest$ac_exeext conftest.$ac_ext
43342fi # $ac_x_libraries = no
43343
43344case $ac_x_includes,$ac_x_libraries in #(
43345  no,* | *,no | *\'*)
43346    # Didn't find X, or a directory has "'" in its name.
43347    ac_cv_have_x="have_x=no";; #(
43348  *)
43349    # Record where we found X for the cache.
43350    ac_cv_have_x="have_x=yes\
43351	ac_x_includes='$ac_x_includes'\
43352	ac_x_libraries='$ac_x_libraries'"
43353esac
43354fi
43355;; #(
43356    *) have_x=yes;;
43357  esac
43358  eval "$ac_cv_have_x"
43359fi # $with_x != no
43360
43361if test "$have_x" != yes; then
43362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43363$as_echo "$have_x" >&6; }
43364  no_x=yes
43365else
43366  # If each of the values was on the command line, it overrides each guess.
43367  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43368  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43369  # Update the cache value to reflect the command line values.
43370  ac_cv_have_x="have_x=yes\
43371	ac_x_includes='$x_includes'\
43372	ac_x_libraries='$x_libraries'"
43373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43374$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43375fi
43376
43377    if test "$no_x" = yes; then
43378  # Not all programs may use this symbol, but it does not hurt to define it.
43379
43380$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43381
43382  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43383else
43384  if test -n "$x_includes"; then
43385    X_CFLAGS="$X_CFLAGS -I$x_includes"
43386  fi
43387
43388  # It would also be nice to do this for all -L options, not just this one.
43389  if test -n "$x_libraries"; then
43390    X_LIBS="$X_LIBS -L$x_libraries"
43391    # For Solaris; some versions of Sun CC require a space after -R and
43392    # others require no space.  Words are not sufficient . . . .
43393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43394$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43395    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43396    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43397    ac_cxx_werror_flag=yes
43398    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43399/* end confdefs.h.  */
43400
43401int
43402main ()
43403{
43404
43405  ;
43406  return 0;
43407}
43408_ACEOF
43409if ac_fn_cxx_try_link "$LINENO"; then :
43410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43411$as_echo "no" >&6; }
43412       X_LIBS="$X_LIBS -R$x_libraries"
43413else
43414  LIBS="$ac_xsave_LIBS -R $x_libraries"
43415       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43416/* end confdefs.h.  */
43417
43418int
43419main ()
43420{
43421
43422  ;
43423  return 0;
43424}
43425_ACEOF
43426if ac_fn_cxx_try_link "$LINENO"; then :
43427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43428$as_echo "yes" >&6; }
43429	  X_LIBS="$X_LIBS -R $x_libraries"
43430else
43431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43432$as_echo "neither works" >&6; }
43433fi
43434rm -f core conftest.err conftest.$ac_objext \
43435    conftest$ac_exeext conftest.$ac_ext
43436fi
43437rm -f core conftest.err conftest.$ac_objext \
43438    conftest$ac_exeext conftest.$ac_ext
43439    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43440    LIBS=$ac_xsave_LIBS
43441  fi
43442
43443  # Check for system-dependent libraries X programs must link with.
43444  # Do this before checking for the system-independent R6 libraries
43445  # (-lICE), since we may need -lsocket or whatever for X linking.
43446
43447  if test "$ISC" = yes; then
43448    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43449  else
43450    # Martyn Johnson says this is needed for Ultrix, if the X
43451    # libraries were built with DECnet support.  And Karl Berry says
43452    # the Alpha needs dnet_stub (dnet does not exist).
43453    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43454    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43455/* end confdefs.h.  */
43456
43457/* Override any GCC internal prototype to avoid an error.
43458   Use char because int might match the return type of a GCC
43459   builtin and then its argument prototype would still apply.  */
43460#ifdef __cplusplus
43461extern "C"
43462#endif
43463char XOpenDisplay ();
43464int
43465main ()
43466{
43467return XOpenDisplay ();
43468  ;
43469  return 0;
43470}
43471_ACEOF
43472if ac_fn_cxx_try_link "$LINENO"; then :
43473
43474else
43475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43476$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43477if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43478  $as_echo_n "(cached) " >&6
43479else
43480  ac_check_lib_save_LIBS=$LIBS
43481LIBS="-ldnet  $LIBS"
43482cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43483/* end confdefs.h.  */
43484
43485/* Override any GCC internal prototype to avoid an error.
43486   Use char because int might match the return type of a GCC
43487   builtin and then its argument prototype would still apply.  */
43488#ifdef __cplusplus
43489extern "C"
43490#endif
43491char dnet_ntoa ();
43492int
43493main ()
43494{
43495return dnet_ntoa ();
43496  ;
43497  return 0;
43498}
43499_ACEOF
43500if ac_fn_cxx_try_link "$LINENO"; then :
43501  ac_cv_lib_dnet_dnet_ntoa=yes
43502else
43503  ac_cv_lib_dnet_dnet_ntoa=no
43504fi
43505rm -f core conftest.err conftest.$ac_objext \
43506    conftest$ac_exeext conftest.$ac_ext
43507LIBS=$ac_check_lib_save_LIBS
43508fi
43509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43510$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43511if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43512  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43513fi
43514
43515    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43516      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43517$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43518if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43519  $as_echo_n "(cached) " >&6
43520else
43521  ac_check_lib_save_LIBS=$LIBS
43522LIBS="-ldnet_stub  $LIBS"
43523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43524/* end confdefs.h.  */
43525
43526/* Override any GCC internal prototype to avoid an error.
43527   Use char because int might match the return type of a GCC
43528   builtin and then its argument prototype would still apply.  */
43529#ifdef __cplusplus
43530extern "C"
43531#endif
43532char dnet_ntoa ();
43533int
43534main ()
43535{
43536return dnet_ntoa ();
43537  ;
43538  return 0;
43539}
43540_ACEOF
43541if ac_fn_cxx_try_link "$LINENO"; then :
43542  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43543else
43544  ac_cv_lib_dnet_stub_dnet_ntoa=no
43545fi
43546rm -f core conftest.err conftest.$ac_objext \
43547    conftest$ac_exeext conftest.$ac_ext
43548LIBS=$ac_check_lib_save_LIBS
43549fi
43550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43551$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43552if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43553  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43554fi
43555
43556    fi
43557fi
43558rm -f core conftest.err conftest.$ac_objext \
43559    conftest$ac_exeext conftest.$ac_ext
43560    LIBS="$ac_xsave_LIBS"
43561
43562    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43563    # to get the SysV transport functions.
43564    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43565    # needs -lnsl.
43566    # The nsl library prevents programs from opening the X display
43567    # on Irix 5.2, according to T.E. Dickey.
43568    # The functions gethostbyname, getservbyname, and inet_addr are
43569    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43570    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43571if test "x$ac_cv_func_gethostbyname" = xyes; then :
43572
43573fi
43574
43575    if test $ac_cv_func_gethostbyname = no; then
43576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43577$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43578if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43579  $as_echo_n "(cached) " >&6
43580else
43581  ac_check_lib_save_LIBS=$LIBS
43582LIBS="-lnsl  $LIBS"
43583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43584/* end confdefs.h.  */
43585
43586/* Override any GCC internal prototype to avoid an error.
43587   Use char because int might match the return type of a GCC
43588   builtin and then its argument prototype would still apply.  */
43589#ifdef __cplusplus
43590extern "C"
43591#endif
43592char gethostbyname ();
43593int
43594main ()
43595{
43596return gethostbyname ();
43597  ;
43598  return 0;
43599}
43600_ACEOF
43601if ac_fn_cxx_try_link "$LINENO"; then :
43602  ac_cv_lib_nsl_gethostbyname=yes
43603else
43604  ac_cv_lib_nsl_gethostbyname=no
43605fi
43606rm -f core conftest.err conftest.$ac_objext \
43607    conftest$ac_exeext conftest.$ac_ext
43608LIBS=$ac_check_lib_save_LIBS
43609fi
43610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43611$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43612if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43613  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43614fi
43615
43616      if test $ac_cv_lib_nsl_gethostbyname = no; then
43617	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43618$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43619if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43620  $as_echo_n "(cached) " >&6
43621else
43622  ac_check_lib_save_LIBS=$LIBS
43623LIBS="-lbsd  $LIBS"
43624cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43625/* end confdefs.h.  */
43626
43627/* Override any GCC internal prototype to avoid an error.
43628   Use char because int might match the return type of a GCC
43629   builtin and then its argument prototype would still apply.  */
43630#ifdef __cplusplus
43631extern "C"
43632#endif
43633char gethostbyname ();
43634int
43635main ()
43636{
43637return gethostbyname ();
43638  ;
43639  return 0;
43640}
43641_ACEOF
43642if ac_fn_cxx_try_link "$LINENO"; then :
43643  ac_cv_lib_bsd_gethostbyname=yes
43644else
43645  ac_cv_lib_bsd_gethostbyname=no
43646fi
43647rm -f core conftest.err conftest.$ac_objext \
43648    conftest$ac_exeext conftest.$ac_ext
43649LIBS=$ac_check_lib_save_LIBS
43650fi
43651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43652$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43653if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43654  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43655fi
43656
43657      fi
43658    fi
43659
43660    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43661    # socket/setsockopt and other routines are undefined under SCO ODT
43662    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43663    # on later versions), says Simon Leinen: it contains gethostby*
43664    # variants that don't use the name server (or something).  -lsocket
43665    # must be given before -lnsl if both are needed.  We assume that
43666    # if connect needs -lnsl, so does gethostbyname.
43667    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43668if test "x$ac_cv_func_connect" = xyes; then :
43669
43670fi
43671
43672    if test $ac_cv_func_connect = no; then
43673      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43674$as_echo_n "checking for connect in -lsocket... " >&6; }
43675if ${ac_cv_lib_socket_connect+:} false; then :
43676  $as_echo_n "(cached) " >&6
43677else
43678  ac_check_lib_save_LIBS=$LIBS
43679LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43681/* end confdefs.h.  */
43682
43683/* Override any GCC internal prototype to avoid an error.
43684   Use char because int might match the return type of a GCC
43685   builtin and then its argument prototype would still apply.  */
43686#ifdef __cplusplus
43687extern "C"
43688#endif
43689char connect ();
43690int
43691main ()
43692{
43693return connect ();
43694  ;
43695  return 0;
43696}
43697_ACEOF
43698if ac_fn_cxx_try_link "$LINENO"; then :
43699  ac_cv_lib_socket_connect=yes
43700else
43701  ac_cv_lib_socket_connect=no
43702fi
43703rm -f core conftest.err conftest.$ac_objext \
43704    conftest$ac_exeext conftest.$ac_ext
43705LIBS=$ac_check_lib_save_LIBS
43706fi
43707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43708$as_echo "$ac_cv_lib_socket_connect" >&6; }
43709if test "x$ac_cv_lib_socket_connect" = xyes; then :
43710  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43711fi
43712
43713    fi
43714
43715    # Guillermo Gomez says -lposix is necessary on A/UX.
43716    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43717if test "x$ac_cv_func_remove" = xyes; then :
43718
43719fi
43720
43721    if test $ac_cv_func_remove = no; then
43722      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43723$as_echo_n "checking for remove in -lposix... " >&6; }
43724if ${ac_cv_lib_posix_remove+:} false; then :
43725  $as_echo_n "(cached) " >&6
43726else
43727  ac_check_lib_save_LIBS=$LIBS
43728LIBS="-lposix  $LIBS"
43729cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43730/* end confdefs.h.  */
43731
43732/* Override any GCC internal prototype to avoid an error.
43733   Use char because int might match the return type of a GCC
43734   builtin and then its argument prototype would still apply.  */
43735#ifdef __cplusplus
43736extern "C"
43737#endif
43738char remove ();
43739int
43740main ()
43741{
43742return remove ();
43743  ;
43744  return 0;
43745}
43746_ACEOF
43747if ac_fn_cxx_try_link "$LINENO"; then :
43748  ac_cv_lib_posix_remove=yes
43749else
43750  ac_cv_lib_posix_remove=no
43751fi
43752rm -f core conftest.err conftest.$ac_objext \
43753    conftest$ac_exeext conftest.$ac_ext
43754LIBS=$ac_check_lib_save_LIBS
43755fi
43756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43757$as_echo "$ac_cv_lib_posix_remove" >&6; }
43758if test "x$ac_cv_lib_posix_remove" = xyes; then :
43759  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43760fi
43761
43762    fi
43763
43764    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43765    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43766if test "x$ac_cv_func_shmat" = xyes; then :
43767
43768fi
43769
43770    if test $ac_cv_func_shmat = no; then
43771      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43772$as_echo_n "checking for shmat in -lipc... " >&6; }
43773if ${ac_cv_lib_ipc_shmat+:} false; then :
43774  $as_echo_n "(cached) " >&6
43775else
43776  ac_check_lib_save_LIBS=$LIBS
43777LIBS="-lipc  $LIBS"
43778cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43779/* end confdefs.h.  */
43780
43781/* Override any GCC internal prototype to avoid an error.
43782   Use char because int might match the return type of a GCC
43783   builtin and then its argument prototype would still apply.  */
43784#ifdef __cplusplus
43785extern "C"
43786#endif
43787char shmat ();
43788int
43789main ()
43790{
43791return shmat ();
43792  ;
43793  return 0;
43794}
43795_ACEOF
43796if ac_fn_cxx_try_link "$LINENO"; then :
43797  ac_cv_lib_ipc_shmat=yes
43798else
43799  ac_cv_lib_ipc_shmat=no
43800fi
43801rm -f core conftest.err conftest.$ac_objext \
43802    conftest$ac_exeext conftest.$ac_ext
43803LIBS=$ac_check_lib_save_LIBS
43804fi
43805{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43806$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43807if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43808  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43809fi
43810
43811    fi
43812  fi
43813
43814  # Check for libraries that X11R6 Xt/Xaw programs need.
43815  ac_save_LDFLAGS=$LDFLAGS
43816  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43817  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43818  # check for ICE first), but we must link in the order -lSM -lICE or
43819  # we get undefined symbols.  So assume we have SM if we have ICE.
43820  # These have to be linked with before -lX11, unlike the other
43821  # libraries we check for below, so use a different variable.
43822  # John Interrante, Karl Berry
43823  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43824$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43825if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43826  $as_echo_n "(cached) " >&6
43827else
43828  ac_check_lib_save_LIBS=$LIBS
43829LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43831/* end confdefs.h.  */
43832
43833/* Override any GCC internal prototype to avoid an error.
43834   Use char because int might match the return type of a GCC
43835   builtin and then its argument prototype would still apply.  */
43836#ifdef __cplusplus
43837extern "C"
43838#endif
43839char IceConnectionNumber ();
43840int
43841main ()
43842{
43843return IceConnectionNumber ();
43844  ;
43845  return 0;
43846}
43847_ACEOF
43848if ac_fn_cxx_try_link "$LINENO"; then :
43849  ac_cv_lib_ICE_IceConnectionNumber=yes
43850else
43851  ac_cv_lib_ICE_IceConnectionNumber=no
43852fi
43853rm -f core conftest.err conftest.$ac_objext \
43854    conftest$ac_exeext conftest.$ac_ext
43855LIBS=$ac_check_lib_save_LIBS
43856fi
43857{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43858$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43859if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43860  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43861fi
43862
43863  LDFLAGS=$ac_save_LDFLAGS
43864
43865fi
43866
43867
43868    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43869    # this doesn't make sense so we remove it.
43870    if test "x$COMPILE_TYPE" = xcross; then
43871      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43872    fi
43873
43874    if test "x$no_x" = xyes; then
43875
43876  # Print a helpful message on how to acquire the necessary build dependency.
43877  # x11 is the help tag: freetype, cups, pulse, alsa etc
43878  MISSING_DEPENDENCY=x11
43879
43880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43881    cygwin_help $MISSING_DEPENDENCY
43882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43883    msys_help $MISSING_DEPENDENCY
43884  else
43885    PKGHANDLER_COMMAND=
43886
43887    case $PKGHANDLER in
43888      apt-get)
43889        apt_help     $MISSING_DEPENDENCY ;;
43890      yum)
43891        yum_help     $MISSING_DEPENDENCY ;;
43892      port)
43893        port_help    $MISSING_DEPENDENCY ;;
43894      pkgutil)
43895        pkgutil_help $MISSING_DEPENDENCY ;;
43896      pkgadd)
43897        pkgadd_help  $MISSING_DEPENDENCY ;;
43898    esac
43899
43900    if test "x$PKGHANDLER_COMMAND" != x; then
43901      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43902    fi
43903  fi
43904
43905      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43906    fi
43907
43908    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43909      OPENWIN_HOME="/usr/openwin"
43910      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43911      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43912          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43913          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43914          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43915    fi
43916
43917    ac_ext=c
43918ac_cpp='$CPP $CPPFLAGS'
43919ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43920ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43921ac_compiler_gnu=$ac_cv_c_compiler_gnu
43922
43923    OLD_CFLAGS="$CFLAGS"
43924    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43925
43926    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43927    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43928do :
43929  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43930ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43931          # include <X11/Xlib.h>
43932          # include <X11/Xutil.h>
43933
43934
43935"
43936if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43937  cat >>confdefs.h <<_ACEOF
43938#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43939_ACEOF
43940 X11_HEADERS_OK=yes
43941else
43942  X11_HEADERS_OK=no; break
43943fi
43944
43945done
43946
43947
43948    if test "x$X11_HEADERS_OK" = xno; then
43949
43950  # Print a helpful message on how to acquire the necessary build dependency.
43951  # x11 is the help tag: freetype, cups, pulse, alsa etc
43952  MISSING_DEPENDENCY=x11
43953
43954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43955    cygwin_help $MISSING_DEPENDENCY
43956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43957    msys_help $MISSING_DEPENDENCY
43958  else
43959    PKGHANDLER_COMMAND=
43960
43961    case $PKGHANDLER in
43962      apt-get)
43963        apt_help     $MISSING_DEPENDENCY ;;
43964      yum)
43965        yum_help     $MISSING_DEPENDENCY ;;
43966      port)
43967        port_help    $MISSING_DEPENDENCY ;;
43968      pkgutil)
43969        pkgutil_help $MISSING_DEPENDENCY ;;
43970      pkgadd)
43971        pkgadd_help  $MISSING_DEPENDENCY ;;
43972    esac
43973
43974    if test "x$PKGHANDLER_COMMAND" != x; then
43975      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43976    fi
43977  fi
43978
43979      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43980    fi
43981
43982    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43983    # defined in libawt_xawt.
43984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43985$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43986    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43987/* end confdefs.h.  */
43988#include <X11/extensions/Xrender.h>
43989int
43990main ()
43991{
43992XLinearGradient x;
43993  ;
43994  return 0;
43995}
43996_ACEOF
43997if ac_fn_c_try_compile "$LINENO"; then :
43998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43999$as_echo "yes" >&6; }
44000else
44001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44002$as_echo "no" >&6; }
44003         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44004fi
44005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44006
44007    CFLAGS="$OLD_CFLAGS"
44008    ac_ext=cpp
44009ac_cpp='$CXXCPP $CPPFLAGS'
44010ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44011ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44012ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44013
44014  fi # X11_NOT_NEEDED
44015
44016
44017
44018
44019
44020
44021  ###############################################################################
44022  #
44023  # The common unix printing system cups is used to print from java.
44024  #
44025
44026# Check whether --with-cups was given.
44027if test "${with_cups+set}" = set; then :
44028  withval=$with_cups;
44029fi
44030
44031
44032# Check whether --with-cups-include was given.
44033if test "${with_cups_include+set}" = set; then :
44034  withval=$with_cups_include;
44035fi
44036
44037
44038  if test "x$CUPS_NOT_NEEDED" = xyes; then
44039    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44040      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44041$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44042    fi
44043    CUPS_CFLAGS=
44044  else
44045    CUPS_FOUND=no
44046
44047    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44048      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44049    fi
44050
44051    if test "x${with_cups}" != x; then
44052      CUPS_CFLAGS="-I${with_cups}/include"
44053      CUPS_FOUND=yes
44054    fi
44055    if test "x${with_cups_include}" != x; then
44056      CUPS_CFLAGS="-I${with_cups_include}"
44057      CUPS_FOUND=yes
44058    fi
44059    if test "x$CUPS_FOUND" = xno; then
44060
44061
44062  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44063    # Source the builddeps file again, to make sure it uses the latest variables!
44064    . $builddepsfile
44065    # Look for a target and build machine specific resource!
44066    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44067    if test "x$resource" = x; then
44068      # Ok, lets instead look for a target specific resource
44069      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44070    fi
44071    if test "x$resource" = x; then
44072      # Ok, lets instead look for a build specific resource
44073      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44074    fi
44075    if test "x$resource" = x; then
44076      # Ok, lets instead look for a generic resource
44077      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44078      resource=${builddep_cups}
44079    fi
44080    if test "x$resource" != x; then
44081      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44082$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44083      # If the resource in the builddeps.conf file is an existing directory,
44084      # for example /java/linux/cups
44085      if test -d ${resource}; then
44086        depdir=${resource}
44087      else
44088
44089  # cups is for example mymodule
44090  # $resource is for example libs/general/libmymod_1_2_3.zip
44091  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44092  # $with_builddeps_dir is for example /localhome/builddeps
44093  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44094  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44095  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44096  filename=`basename $resource`
44097  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44098  filebase=${filename%%.*}
44099  extension=${filename#*.}
44100  installdir=$with_builddeps_dir/$filebase
44101  if test ! -f $installdir/$filename.unpacked; then
44102    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44103$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44104    if test ! -d $installdir; then
44105      mkdir -p $installdir
44106    fi
44107    if test ! -d $installdir; then
44108      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44109    fi
44110    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44111    touch $tmpfile
44112    if test ! -f $tmpfile; then
44113      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44114    fi
44115
44116  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44117  # $tmpfile is the local file name for the downloaded file.
44118  VALID_TOOL=no
44119  if test "x$BDEPS_FTP" = xwget; then
44120    VALID_TOOL=yes
44121    wget -O $tmpfile $with_builddeps_server/$resource
44122  fi
44123  if test "x$BDEPS_FTP" = xlftp; then
44124    VALID_TOOL=yes
44125    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44126  fi
44127  if test "x$BDEPS_FTP" = xftp; then
44128    VALID_TOOL=yes
44129    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44130    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44131    FTPUSERPWD=${FTPSERVER%%@*}
44132    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44133      FTPUSER=${userpwd%%:*}
44134      FTPPWD=${userpwd#*@}
44135      FTPSERVER=${FTPSERVER#*@}
44136    else
44137      FTPUSER=ftp
44138      FTPPWD=ftp
44139    fi
44140    # the "pass" command does not work on some
44141    # ftp clients (read ftp.exe) but if it works,
44142    # passive mode is better!
44143    ( \
44144        echo "user $FTPUSER $FTPPWD"        ; \
44145        echo "pass"                         ; \
44146        echo "bin"                          ; \
44147        echo "get $FTPPATH $tmpfile"              ; \
44148    ) | ftp -in $FTPSERVER
44149  fi
44150  if test "x$VALID_TOOL" != xyes; then
44151    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44152  fi
44153
44154    mv $tmpfile $installdir/$filename
44155    if test ! -s $installdir/$filename; then
44156      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44157    fi
44158    case "$extension" in
44159      zip)  echo "Unzipping $installdir/$filename..."
44160        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44161        ;;
44162      tar.gz) echo "Untaring $installdir/$filename..."
44163        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44164        ;;
44165      tgz) echo "Untaring $installdir/$filename..."
44166        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44167        ;;
44168      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44169        ;;
44170    esac
44171  fi
44172  if test -f $installdir/$filename.unpacked; then
44173    depdir=$installdir
44174  fi
44175
44176      fi
44177      # Source the builddeps file again, because in the previous command, the depdir
44178      # was updated to point at the current build dependency install directory.
44179      . $builddepsfile
44180      # Now extract variables from the builddeps.conf files.
44181      theroot=${builddep_cups_ROOT}
44182      thecflags=${builddep_cups_CFLAGS}
44183      thelibs=${builddep_cups_LIBS}
44184      if test "x$depdir" = x; then
44185        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44186      fi
44187      CUPS=$depdir
44188      if test "x$theroot" != x; then
44189        CUPS="$theroot"
44190      fi
44191      if test "x$thecflags" != x; then
44192        CUPS_CFLAGS="$thecflags"
44193      fi
44194      if test "x$thelibs" != x; then
44195        CUPS_LIBS="$thelibs"
44196      fi
44197      CUPS_FOUND=yes
44198
44199    fi
44200
44201  fi
44202
44203    fi
44204    if test "x$CUPS_FOUND" = xno; then
44205      # Are the cups headers installed in the default /usr/include location?
44206      for ac_header in cups/cups.h cups/ppd.h
44207do :
44208  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44209ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44210if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44211  cat >>confdefs.h <<_ACEOF
44212#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44213_ACEOF
44214
44215            CUPS_FOUND=yes
44216            CUPS_CFLAGS=
44217            DEFAULT_CUPS=yes
44218
44219
44220fi
44221
44222done
44223
44224    fi
44225    if test "x$CUPS_FOUND" = xno; then
44226      # Getting nervous now? Lets poke around for standard Solaris third-party
44227      # package installation locations.
44228      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44229$as_echo_n "checking for cups headers... " >&6; }
44230      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44231        # An SFW package seems to be installed!
44232        CUPS_FOUND=yes
44233        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44234      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44235        # A CSW package seems to be installed!
44236        CUPS_FOUND=yes
44237        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44238      fi
44239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44240$as_echo "$CUPS_FOUND" >&6; }
44241    fi
44242    if test "x$CUPS_FOUND" = xno; then
44243
44244  # Print a helpful message on how to acquire the necessary build dependency.
44245  # cups is the help tag: freetype, cups, pulse, alsa etc
44246  MISSING_DEPENDENCY=cups
44247
44248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44249    cygwin_help $MISSING_DEPENDENCY
44250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44251    msys_help $MISSING_DEPENDENCY
44252  else
44253    PKGHANDLER_COMMAND=
44254
44255    case $PKGHANDLER in
44256      apt-get)
44257        apt_help     $MISSING_DEPENDENCY ;;
44258      yum)
44259        yum_help     $MISSING_DEPENDENCY ;;
44260      port)
44261        port_help    $MISSING_DEPENDENCY ;;
44262      pkgutil)
44263        pkgutil_help $MISSING_DEPENDENCY ;;
44264      pkgadd)
44265        pkgadd_help  $MISSING_DEPENDENCY ;;
44266    esac
44267
44268    if test "x$PKGHANDLER_COMMAND" != x; then
44269      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44270    fi
44271  fi
44272
44273      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44274    fi
44275  fi
44276
44277
44278
44279
44280
44281
44282  ###############################################################################
44283  #
44284  # The ubiquitous freetype library is used to render fonts.
44285  #
44286
44287# Check whether --with-freetype was given.
44288if test "${with_freetype+set}" = set; then :
44289  withval=$with_freetype;
44290fi
44291
44292
44293# Check whether --with-freetype-include was given.
44294if test "${with_freetype_include+set}" = set; then :
44295  withval=$with_freetype_include;
44296fi
44297
44298
44299# Check whether --with-freetype-lib was given.
44300if test "${with_freetype_lib+set}" = set; then :
44301  withval=$with_freetype_lib;
44302fi
44303
44304
44305# Check whether --with-freetype-src was given.
44306if test "${with_freetype_src+set}" = set; then :
44307  withval=$with_freetype_src;
44308fi
44309
44310  # Check whether --enable-freetype-bundling was given.
44311if test "${enable_freetype_bundling+set}" = set; then :
44312  enableval=$enable_freetype_bundling;
44313fi
44314
44315
44316  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44317  FREETYPE_BASE_NAME=freetype
44318  FREETYPE_CFLAGS=
44319  FREETYPE_LIBS=
44320  FREETYPE_BUNDLE_LIB_PATH=
44321
44322  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44323    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
44324      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44325$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44326    fi
44327    if test "x$enable_freetype_bundling" != x; then
44328      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44329$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44330    fi
44331  else
44332    # freetype is needed to build; go get it!
44333
44334    BUNDLE_FREETYPE="$enable_freetype_bundling"
44335
44336    if  test "x$with_freetype_src" != x; then
44337      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44338        # Try to build freetype if --with-freetype-src was given on Windows
44339
44340  FREETYPE_SRC_PATH="$with_freetype_src"
44341  BUILD_FREETYPE=yes
44342
44343  # Check if the freetype sources are acessible..
44344  if ! test -d $FREETYPE_SRC_PATH; then
44345    { $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
44346$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44347    BUILD_FREETYPE=no
44348  fi
44349  # ..and contain a vc2010 project file
44350  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44351  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44352    { $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
44353$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44354    BUILD_FREETYPE=no
44355  fi
44356  # Now check if configure found a version of 'msbuild.exe'
44357  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44358    { $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
44359$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;}
44360    BUILD_FREETYPE=no
44361  fi
44362
44363  # Ready to go..
44364  if test "x$BUILD_FREETYPE" = xyes; then
44365
44366    # msbuild requires trailing slashes for output directories
44367    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44368    freetype_lib_path_unix="$freetype_lib_path"
44369    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44370
44371  unix_path="$vcxproj_path"
44372  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44373    windows_path=`$CYGPATH -m "$unix_path"`
44374    vcxproj_path="$windows_path"
44375  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44376    windows_path=`cmd //c echo $unix_path`
44377    vcxproj_path="$windows_path"
44378  fi
44379
44380
44381  unix_path="$freetype_lib_path"
44382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44383    windows_path=`$CYGPATH -m "$unix_path"`
44384    freetype_lib_path="$windows_path"
44385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44386    windows_path=`cmd //c echo $unix_path`
44387    freetype_lib_path="$windows_path"
44388  fi
44389
44390
44391  unix_path="$freetype_obj_path"
44392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44393    windows_path=`$CYGPATH -m "$unix_path"`
44394    freetype_obj_path="$windows_path"
44395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44396    windows_path=`cmd //c echo $unix_path`
44397    freetype_obj_path="$windows_path"
44398  fi
44399
44400    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44401      freetype_platform=x64
44402    else
44403      freetype_platform=win32
44404    fi
44405
44406    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44407    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44408    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44409    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44410    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44411$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44412
44413    # First we try to build the freetype.dll
44414    $ECHO -e "@echo off\n"\
44415	     "$MSBUILD $vcxproj_path "\
44416		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44417		       "/p:Configuration=\"Release Multithreaded\" "\
44418		       "/p:Platform=$freetype_platform "\
44419		       "/p:ConfigurationType=DynamicLibrary "\
44420		       "/p:TargetName=freetype "\
44421		       "/p:OutDir=\"$freetype_lib_path\" "\
44422		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44423    cmd /c freetype.bat
44424
44425    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44426      # If that succeeds we also build freetype.lib
44427      $ECHO -e "@echo off\n"\
44428	       "$MSBUILD $vcxproj_path "\
44429			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44430			 "/p:Configuration=\"Release Multithreaded\" "\
44431			 "/p:Platform=$freetype_platform "\
44432			 "/p:ConfigurationType=StaticLibrary "\
44433			 "/p:TargetName=freetype "\
44434			 "/p:OutDir=\"$freetype_lib_path\" "\
44435			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44436      cmd /c freetype.bat
44437
44438      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44439	# Once we build both, lib and dll, set freetype lib and include path appropriately
44440	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44441	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44442	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44443$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44444      else
44445	BUILD_FREETYPE=no
44446      fi
44447    else
44448      BUILD_FREETYPE=no
44449    fi
44450  fi
44451
44452        if test "x$BUILD_FREETYPE" = xyes; then
44453          # Okay, we built it. Check that it works.
44454
44455  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44456  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44457  METHOD="--with-freetype-src"
44458
44459  # Let's start with an optimistic view of the world :-)
44460  FOUND_FREETYPE=yes
44461
44462  # First look for the canonical freetype main include file ft2build.h.
44463  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44464    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44465    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44466    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44467      # Fail.
44468      FOUND_FREETYPE=no
44469    fi
44470  fi
44471
44472  if test "x$FOUND_FREETYPE" = xyes; then
44473    # Include file found, let's continue the sanity check.
44474    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44475$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44476
44477    # Reset to default value
44478    FREETYPE_BASE_NAME=freetype
44479    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44480    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44481      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44482          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44483        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44484        # for the .6 version explicitly.
44485        FREETYPE_BASE_NAME=freetype.6
44486        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44487        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44488$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44489      else
44490        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44491$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44492        FOUND_FREETYPE=no
44493      fi
44494    else
44495      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44496        # On Windows, we will need both .lib and .dll file.
44497        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44498          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44499$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44500          FOUND_FREETYPE=no
44501        fi
44502      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44503          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44504        # Found lib in isa dir, use that instead.
44505        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44506        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44507$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44508      fi
44509    fi
44510  fi
44511
44512  if test "x$FOUND_FREETYPE" = xyes; then
44513
44514  # Only process if variable expands to non-empty
44515
44516  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44517    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44518
44519  # Input might be given as Windows format, start by converting to
44520  # unix format.
44521  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44522  new_path=`$CYGPATH -u "$path"`
44523
44524  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44525  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44526  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44527  # "foo.exe" is OK but "foo" is an error.
44528  #
44529  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44530  # It is also a way to make sure we got the proper file name for the real test later on.
44531  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44532  if test "x$test_shortpath" = x; then
44533    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44534$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44535    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44536  fi
44537
44538  # Call helper function which possibly converts this using DOS-style short mode.
44539  # If so, the updated path is stored in $new_path.
44540
44541  input_path="$new_path"
44542  # Check if we need to convert this using DOS-style short mode. If the path
44543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44544  # take no chances and rewrite it.
44545  # Note: m4 eats our [], so we need to use [ and ] instead.
44546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44547  if test "x$has_forbidden_chars" != x; then
44548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44549    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44550    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44551    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44552      # Going to short mode and back again did indeed matter. Since short mode is
44553      # case insensitive, let's make it lowercase to improve readability.
44554      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44555      # Now convert it back to Unix-style (cygpath)
44556      input_path=`$CYGPATH -u "$shortmode_path"`
44557      new_path="$input_path"
44558    fi
44559  fi
44560
44561  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44562  if test "x$test_cygdrive_prefix" = x; then
44563    # As a simple fix, exclude /usr/bin since it's not a real path.
44564    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44565      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44566      # a path prefixed by /cygdrive for fixpath to work.
44567      new_path="$CYGWIN_ROOT_PATH$input_path"
44568    fi
44569  fi
44570
44571
44572  if test "x$path" != "x$new_path"; then
44573    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44576  fi
44577
44578    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44579
44580  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44581  has_colon=`$ECHO $path | $GREP ^.:`
44582  new_path="$path"
44583  if test "x$has_colon" = x; then
44584    # Not in mixed or Windows style, start by that.
44585    new_path=`cmd //c echo $path`
44586  fi
44587
44588
44589  input_path="$new_path"
44590  # Check if we need to convert this using DOS-style short mode. If the path
44591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44592  # take no chances and rewrite it.
44593  # Note: m4 eats our [], so we need to use [ and ] instead.
44594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44595  if test "x$has_forbidden_chars" != x; then
44596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44597    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44598  fi
44599
44600
44601  windows_path="$new_path"
44602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44603    unix_path=`$CYGPATH -u "$windows_path"`
44604    new_path="$unix_path"
44605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44606    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44607    new_path="$unix_path"
44608  fi
44609
44610  if test "x$path" != "x$new_path"; then
44611    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44613$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44614  fi
44615
44616  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44617  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44618
44619    else
44620      # We're on a unix platform. Hooray! :)
44621      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44622      has_space=`$ECHO "$path" | $GREP " "`
44623      if test "x$has_space" != x; then
44624        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44625$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44626        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44627      fi
44628
44629      # Use eval to expand a potential ~
44630      eval path="$path"
44631      if test ! -f "$path" && test ! -d "$path"; then
44632        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44633      fi
44634
44635      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44636    fi
44637  fi
44638
44639
44640  # Only process if variable expands to non-empty
44641
44642  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44643    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44644
44645  # Input might be given as Windows format, start by converting to
44646  # unix format.
44647  path="$POTENTIAL_FREETYPE_LIB_PATH"
44648  new_path=`$CYGPATH -u "$path"`
44649
44650  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44651  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44652  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44653  # "foo.exe" is OK but "foo" is an error.
44654  #
44655  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44656  # It is also a way to make sure we got the proper file name for the real test later on.
44657  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44658  if test "x$test_shortpath" = x; then
44659    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44660$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44661    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44662  fi
44663
44664  # Call helper function which possibly converts this using DOS-style short mode.
44665  # If so, the updated path is stored in $new_path.
44666
44667  input_path="$new_path"
44668  # Check if we need to convert this using DOS-style short mode. If the path
44669  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44670  # take no chances and rewrite it.
44671  # Note: m4 eats our [], so we need to use [ and ] instead.
44672  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44673  if test "x$has_forbidden_chars" != x; then
44674    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44675    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44676    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44677    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44678      # Going to short mode and back again did indeed matter. Since short mode is
44679      # case insensitive, let's make it lowercase to improve readability.
44680      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44681      # Now convert it back to Unix-style (cygpath)
44682      input_path=`$CYGPATH -u "$shortmode_path"`
44683      new_path="$input_path"
44684    fi
44685  fi
44686
44687  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44688  if test "x$test_cygdrive_prefix" = x; then
44689    # As a simple fix, exclude /usr/bin since it's not a real path.
44690    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44691      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44692      # a path prefixed by /cygdrive for fixpath to work.
44693      new_path="$CYGWIN_ROOT_PATH$input_path"
44694    fi
44695  fi
44696
44697
44698  if test "x$path" != "x$new_path"; then
44699    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44701$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44702  fi
44703
44704    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44705
44706  path="$POTENTIAL_FREETYPE_LIB_PATH"
44707  has_colon=`$ECHO $path | $GREP ^.:`
44708  new_path="$path"
44709  if test "x$has_colon" = x; then
44710    # Not in mixed or Windows style, start by that.
44711    new_path=`cmd //c echo $path`
44712  fi
44713
44714
44715  input_path="$new_path"
44716  # Check if we need to convert this using DOS-style short mode. If the path
44717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44718  # take no chances and rewrite it.
44719  # Note: m4 eats our [], so we need to use [ and ] instead.
44720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44721  if test "x$has_forbidden_chars" != x; then
44722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44723    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44724  fi
44725
44726
44727  windows_path="$new_path"
44728  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44729    unix_path=`$CYGPATH -u "$windows_path"`
44730    new_path="$unix_path"
44731  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44732    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44733    new_path="$unix_path"
44734  fi
44735
44736  if test "x$path" != "x$new_path"; then
44737    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44739$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44740  fi
44741
44742  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44743  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44744
44745    else
44746      # We're on a unix platform. Hooray! :)
44747      path="$POTENTIAL_FREETYPE_LIB_PATH"
44748      has_space=`$ECHO "$path" | $GREP " "`
44749      if test "x$has_space" != x; then
44750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44751$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44752        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44753      fi
44754
44755      # Use eval to expand a potential ~
44756      eval path="$path"
44757      if test ! -f "$path" && test ! -d "$path"; then
44758        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44759      fi
44760
44761      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44762    fi
44763  fi
44764
44765
44766    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44768$as_echo_n "checking for freetype includes... " >&6; }
44769    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44770$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44771    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44772    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44773$as_echo_n "checking for freetype libraries... " >&6; }
44774    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44775$as_echo "$FREETYPE_LIB_PATH" >&6; }
44776  fi
44777
44778          if test "x$FOUND_FREETYPE" != xyes; then
44779            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44780          fi
44781        else
44782          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44783$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44784          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44785        fi
44786      else
44787        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44788$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44789      fi
44790    fi
44791
44792    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44793      # User has specified settings
44794
44795      if test "x$BUNDLE_FREETYPE" = x; then
44796        # If not specified, default is to bundle freetype
44797        BUNDLE_FREETYPE=yes
44798      fi
44799
44800      if test "x$with_freetype" != x; then
44801        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44802        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44803      fi
44804
44805      # Allow --with-freetype-lib and --with-freetype-include to override
44806      if test "x$with_freetype_include" != x; then
44807        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44808      fi
44809      if test "x$with_freetype_lib" != x; then
44810        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44811      fi
44812
44813      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44814        # Okay, we got it. Check that it works.
44815
44816  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44817  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44818  METHOD="--with-freetype"
44819
44820  # Let's start with an optimistic view of the world :-)
44821  FOUND_FREETYPE=yes
44822
44823  # First look for the canonical freetype main include file ft2build.h.
44824  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44825    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44826    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44827    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44828      # Fail.
44829      FOUND_FREETYPE=no
44830    fi
44831  fi
44832
44833  if test "x$FOUND_FREETYPE" = xyes; then
44834    # Include file found, let's continue the sanity check.
44835    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44836$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44837
44838    # Reset to default value
44839    FREETYPE_BASE_NAME=freetype
44840    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44841    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44842      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44843          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44844        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44845        # for the .6 version explicitly.
44846        FREETYPE_BASE_NAME=freetype.6
44847        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44848        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44849$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44850      else
44851        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44852$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44853        FOUND_FREETYPE=no
44854      fi
44855    else
44856      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44857        # On Windows, we will need both .lib and .dll file.
44858        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44859          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44860$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44861          FOUND_FREETYPE=no
44862        fi
44863      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44864          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44865        # Found lib in isa dir, use that instead.
44866        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44867        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44868$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44869      fi
44870    fi
44871  fi
44872
44873  if test "x$FOUND_FREETYPE" = xyes; then
44874
44875  # Only process if variable expands to non-empty
44876
44877  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44878    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44879
44880  # Input might be given as Windows format, start by converting to
44881  # unix format.
44882  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44883  new_path=`$CYGPATH -u "$path"`
44884
44885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44888  # "foo.exe" is OK but "foo" is an error.
44889  #
44890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44891  # It is also a way to make sure we got the proper file name for the real test later on.
44892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44893  if test "x$test_shortpath" = x; then
44894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44895$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44896    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44897  fi
44898
44899  # Call helper function which possibly converts this using DOS-style short mode.
44900  # If so, the updated path is stored in $new_path.
44901
44902  input_path="$new_path"
44903  # Check if we need to convert this using DOS-style short mode. If the path
44904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44905  # take no chances and rewrite it.
44906  # Note: m4 eats our [], so we need to use [ and ] instead.
44907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44908  if test "x$has_forbidden_chars" != x; then
44909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44913      # Going to short mode and back again did indeed matter. Since short mode is
44914      # case insensitive, let's make it lowercase to improve readability.
44915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44916      # Now convert it back to Unix-style (cygpath)
44917      input_path=`$CYGPATH -u "$shortmode_path"`
44918      new_path="$input_path"
44919    fi
44920  fi
44921
44922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44923  if test "x$test_cygdrive_prefix" = x; then
44924    # As a simple fix, exclude /usr/bin since it's not a real path.
44925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44927      # a path prefixed by /cygdrive for fixpath to work.
44928      new_path="$CYGWIN_ROOT_PATH$input_path"
44929    fi
44930  fi
44931
44932
44933  if test "x$path" != "x$new_path"; then
44934    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44936$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44937  fi
44938
44939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44940
44941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44942  has_colon=`$ECHO $path | $GREP ^.:`
44943  new_path="$path"
44944  if test "x$has_colon" = x; then
44945    # Not in mixed or Windows style, start by that.
44946    new_path=`cmd //c echo $path`
44947  fi
44948
44949
44950  input_path="$new_path"
44951  # Check if we need to convert this using DOS-style short mode. If the path
44952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44953  # take no chances and rewrite it.
44954  # Note: m4 eats our [], so we need to use [ and ] instead.
44955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44956  if test "x$has_forbidden_chars" != x; then
44957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44959  fi
44960
44961
44962  windows_path="$new_path"
44963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44964    unix_path=`$CYGPATH -u "$windows_path"`
44965    new_path="$unix_path"
44966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44968    new_path="$unix_path"
44969  fi
44970
44971  if test "x$path" != "x$new_path"; then
44972    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44975  fi
44976
44977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44979
44980    else
44981      # We're on a unix platform. Hooray! :)
44982      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44983      has_space=`$ECHO "$path" | $GREP " "`
44984      if test "x$has_space" != x; then
44985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44987        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44988      fi
44989
44990      # Use eval to expand a potential ~
44991      eval path="$path"
44992      if test ! -f "$path" && test ! -d "$path"; then
44993        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44994      fi
44995
44996      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44997    fi
44998  fi
44999
45000
45001  # Only process if variable expands to non-empty
45002
45003  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45005
45006  # Input might be given as Windows format, start by converting to
45007  # unix format.
45008  path="$POTENTIAL_FREETYPE_LIB_PATH"
45009  new_path=`$CYGPATH -u "$path"`
45010
45011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45014  # "foo.exe" is OK but "foo" is an error.
45015  #
45016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45017  # It is also a way to make sure we got the proper file name for the real test later on.
45018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45019  if test "x$test_shortpath" = x; then
45020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45021$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45022    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45023  fi
45024
45025  # Call helper function which possibly converts this using DOS-style short mode.
45026  # If so, the updated path is stored in $new_path.
45027
45028  input_path="$new_path"
45029  # Check if we need to convert this using DOS-style short mode. If the path
45030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45031  # take no chances and rewrite it.
45032  # Note: m4 eats our [], so we need to use [ and ] instead.
45033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45034  if test "x$has_forbidden_chars" != x; then
45035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45039      # Going to short mode and back again did indeed matter. Since short mode is
45040      # case insensitive, let's make it lowercase to improve readability.
45041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45042      # Now convert it back to Unix-style (cygpath)
45043      input_path=`$CYGPATH -u "$shortmode_path"`
45044      new_path="$input_path"
45045    fi
45046  fi
45047
45048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45049  if test "x$test_cygdrive_prefix" = x; then
45050    # As a simple fix, exclude /usr/bin since it's not a real path.
45051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45053      # a path prefixed by /cygdrive for fixpath to work.
45054      new_path="$CYGWIN_ROOT_PATH$input_path"
45055    fi
45056  fi
45057
45058
45059  if test "x$path" != "x$new_path"; then
45060    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45062$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45063  fi
45064
45065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45066
45067  path="$POTENTIAL_FREETYPE_LIB_PATH"
45068  has_colon=`$ECHO $path | $GREP ^.:`
45069  new_path="$path"
45070  if test "x$has_colon" = x; then
45071    # Not in mixed or Windows style, start by that.
45072    new_path=`cmd //c echo $path`
45073  fi
45074
45075
45076  input_path="$new_path"
45077  # Check if we need to convert this using DOS-style short mode. If the path
45078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45079  # take no chances and rewrite it.
45080  # Note: m4 eats our [], so we need to use [ and ] instead.
45081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45082  if test "x$has_forbidden_chars" != x; then
45083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45085  fi
45086
45087
45088  windows_path="$new_path"
45089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45090    unix_path=`$CYGPATH -u "$windows_path"`
45091    new_path="$unix_path"
45092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45094    new_path="$unix_path"
45095  fi
45096
45097  if test "x$path" != "x$new_path"; then
45098    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45100$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45101  fi
45102
45103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45105
45106    else
45107      # We're on a unix platform. Hooray! :)
45108      path="$POTENTIAL_FREETYPE_LIB_PATH"
45109      has_space=`$ECHO "$path" | $GREP " "`
45110      if test "x$has_space" != x; then
45111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45112$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45114      fi
45115
45116      # Use eval to expand a potential ~
45117      eval path="$path"
45118      if test ! -f "$path" && test ! -d "$path"; then
45119        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45120      fi
45121
45122      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45123    fi
45124  fi
45125
45126
45127    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45129$as_echo_n "checking for freetype includes... " >&6; }
45130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45131$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45132    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45134$as_echo_n "checking for freetype libraries... " >&6; }
45135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45136$as_echo "$FREETYPE_LIB_PATH" >&6; }
45137  fi
45138
45139        if test "x$FOUND_FREETYPE" != xyes; then
45140          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45141        fi
45142      else
45143        # User specified only one of lib or include. This is an error.
45144        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45145          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45146$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45147          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45148        else
45149          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45150$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45151          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45152        fi
45153      fi
45154    else
45155      # User did not specify settings, but we need freetype. Try to locate it.
45156
45157      if test "x$BUNDLE_FREETYPE" = x; then
45158        # If not specified, default is to bundle freetype only on windows
45159        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45160          BUNDLE_FREETYPE=yes
45161        else
45162          BUNDLE_FREETYPE=no
45163        fi
45164      fi
45165
45166      if test "x$FOUND_FREETYPE" != xyes; then
45167        # Check builddeps
45168
45169
45170  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45171    # Source the builddeps file again, to make sure it uses the latest variables!
45172    . $builddepsfile
45173    # Look for a target and build machine specific resource!
45174    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45175    if test "x$resource" = x; then
45176      # Ok, lets instead look for a target specific resource
45177      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45178    fi
45179    if test "x$resource" = x; then
45180      # Ok, lets instead look for a build specific resource
45181      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45182    fi
45183    if test "x$resource" = x; then
45184      # Ok, lets instead look for a generic resource
45185      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45186      resource=${builddep_freetype2}
45187    fi
45188    if test "x$resource" != x; then
45189      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45190$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45191      # If the resource in the builddeps.conf file is an existing directory,
45192      # for example /java/linux/cups
45193      if test -d ${resource}; then
45194        depdir=${resource}
45195      else
45196
45197  # freetype2 is for example mymodule
45198  # $resource is for example libs/general/libmymod_1_2_3.zip
45199  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45200  # $with_builddeps_dir is for example /localhome/builddeps
45201  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45202  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45203  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45204  filename=`basename $resource`
45205  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45206  filebase=${filename%%.*}
45207  extension=${filename#*.}
45208  installdir=$with_builddeps_dir/$filebase
45209  if test ! -f $installdir/$filename.unpacked; then
45210    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45211$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45212    if test ! -d $installdir; then
45213      mkdir -p $installdir
45214    fi
45215    if test ! -d $installdir; then
45216      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45217    fi
45218    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45219    touch $tmpfile
45220    if test ! -f $tmpfile; then
45221      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45222    fi
45223
45224  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45225  # $tmpfile is the local file name for the downloaded file.
45226  VALID_TOOL=no
45227  if test "x$BDEPS_FTP" = xwget; then
45228    VALID_TOOL=yes
45229    wget -O $tmpfile $with_builddeps_server/$resource
45230  fi
45231  if test "x$BDEPS_FTP" = xlftp; then
45232    VALID_TOOL=yes
45233    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45234  fi
45235  if test "x$BDEPS_FTP" = xftp; then
45236    VALID_TOOL=yes
45237    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45238    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45239    FTPUSERPWD=${FTPSERVER%%@*}
45240    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45241      FTPUSER=${userpwd%%:*}
45242      FTPPWD=${userpwd#*@}
45243      FTPSERVER=${FTPSERVER#*@}
45244    else
45245      FTPUSER=ftp
45246      FTPPWD=ftp
45247    fi
45248    # the "pass" command does not work on some
45249    # ftp clients (read ftp.exe) but if it works,
45250    # passive mode is better!
45251    ( \
45252        echo "user $FTPUSER $FTPPWD"        ; \
45253        echo "pass"                         ; \
45254        echo "bin"                          ; \
45255        echo "get $FTPPATH $tmpfile"              ; \
45256    ) | ftp -in $FTPSERVER
45257  fi
45258  if test "x$VALID_TOOL" != xyes; then
45259    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45260  fi
45261
45262    mv $tmpfile $installdir/$filename
45263    if test ! -s $installdir/$filename; then
45264      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45265    fi
45266    case "$extension" in
45267      zip)  echo "Unzipping $installdir/$filename..."
45268        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45269        ;;
45270      tar.gz) echo "Untaring $installdir/$filename..."
45271        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45272        ;;
45273      tgz) echo "Untaring $installdir/$filename..."
45274        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45275        ;;
45276      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45277        ;;
45278    esac
45279  fi
45280  if test -f $installdir/$filename.unpacked; then
45281    depdir=$installdir
45282  fi
45283
45284      fi
45285      # Source the builddeps file again, because in the previous command, the depdir
45286      # was updated to point at the current build dependency install directory.
45287      . $builddepsfile
45288      # Now extract variables from the builddeps.conf files.
45289      theroot=${builddep_freetype2_ROOT}
45290      thecflags=${builddep_freetype2_CFLAGS}
45291      thelibs=${builddep_freetype2_LIBS}
45292      if test "x$depdir" = x; then
45293        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45294      fi
45295      FREETYPE=$depdir
45296      if test "x$theroot" != x; then
45297        FREETYPE="$theroot"
45298      fi
45299      if test "x$thecflags" != x; then
45300        FREETYPE_CFLAGS="$thecflags"
45301      fi
45302      if test "x$thelibs" != x; then
45303        FREETYPE_LIBS="$thelibs"
45304      fi
45305      FOUND_FREETYPE=yes
45306      else FOUND_FREETYPE=no
45307
45308    fi
45309    else FOUND_FREETYPE=no
45310
45311  fi
45312
45313        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45314        if test "x$FOUND_FREETYPE" = xyes; then
45315          if test "x$BUNDLE_FREETYPE" = xyes; then
45316            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45317$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45318            FOUND_FREETYPE=no
45319          else
45320            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45321$as_echo_n "checking for freetype... " >&6; }
45322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45323$as_echo "yes (using builddeps)" >&6; }
45324          fi
45325        fi
45326      fi
45327
45328      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45329      if test "x$SYSROOT" = x; then
45330        if test "x$FOUND_FREETYPE" != xyes; then
45331          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45332          if test "x$PKG_CONFIG" != x; then
45333
45334pkg_failed=no
45335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45336$as_echo_n "checking for FREETYPE... " >&6; }
45337
45338if test -n "$FREETYPE_CFLAGS"; then
45339    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45340 elif test -n "$PKG_CONFIG"; then
45341    if test -n "$PKG_CONFIG" && \
45342    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45343  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45344  ac_status=$?
45345  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45346  test $ac_status = 0; }; then
45347  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45348else
45349  pkg_failed=yes
45350fi
45351 else
45352    pkg_failed=untried
45353fi
45354if test -n "$FREETYPE_LIBS"; then
45355    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45356 elif test -n "$PKG_CONFIG"; then
45357    if test -n "$PKG_CONFIG" && \
45358    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45359  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45360  ac_status=$?
45361  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45362  test $ac_status = 0; }; then
45363  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45364else
45365  pkg_failed=yes
45366fi
45367 else
45368    pkg_failed=untried
45369fi
45370
45371
45372
45373if test $pkg_failed = yes; then
45374
45375if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45376        _pkg_short_errors_supported=yes
45377else
45378        _pkg_short_errors_supported=no
45379fi
45380        if test $_pkg_short_errors_supported = yes; then
45381	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45382        else
45383	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45384        fi
45385	# Put the nasty error message in config.log where it belongs
45386	echo "$FREETYPE_PKG_ERRORS" >&5
45387
45388	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45389$as_echo "no" >&6; }
45390                FOUND_FREETYPE=no
45391elif test $pkg_failed = untried; then
45392	FOUND_FREETYPE=no
45393else
45394	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45395	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45397$as_echo "yes" >&6; }
45398	FOUND_FREETYPE=yes
45399fi
45400            if test "x$FOUND_FREETYPE" = xyes; then
45401              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45402              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45403              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45404              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45405                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45406              fi
45407              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45408              if test "x$BUNDLE_FREETYPE" = xyes; then
45409                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45410$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45411                FOUND_FREETYPE=no
45412              else
45413                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45414$as_echo_n "checking for freetype... " >&6; }
45415                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45416$as_echo "yes (using pkg-config)" >&6; }
45417              fi
45418            fi
45419          fi
45420        fi
45421      fi
45422
45423      if test "x$FOUND_FREETYPE" != xyes; then
45424        # Check in well-known locations
45425        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45426          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45427
45428  windows_path="$FREETYPE_BASE_DIR"
45429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45430    unix_path=`$CYGPATH -u "$windows_path"`
45431    FREETYPE_BASE_DIR="$unix_path"
45432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45434    FREETYPE_BASE_DIR="$unix_path"
45435  fi
45436
45437
45438  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45439  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45440  METHOD="well-known location"
45441
45442  # Let's start with an optimistic view of the world :-)
45443  FOUND_FREETYPE=yes
45444
45445  # First look for the canonical freetype main include file ft2build.h.
45446  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45447    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45448    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45449    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45450      # Fail.
45451      FOUND_FREETYPE=no
45452    fi
45453  fi
45454
45455  if test "x$FOUND_FREETYPE" = xyes; then
45456    # Include file found, let's continue the sanity check.
45457    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45458$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45459
45460    # Reset to default value
45461    FREETYPE_BASE_NAME=freetype
45462    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45463    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45464      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45465          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45466        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45467        # for the .6 version explicitly.
45468        FREETYPE_BASE_NAME=freetype.6
45469        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45470        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45471$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45472      else
45473        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45474$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45475        FOUND_FREETYPE=no
45476      fi
45477    else
45478      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45479        # On Windows, we will need both .lib and .dll file.
45480        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45481          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45482$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45483          FOUND_FREETYPE=no
45484        fi
45485      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45486          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45487        # Found lib in isa dir, use that instead.
45488        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45489        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45490$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45491      fi
45492    fi
45493  fi
45494
45495  if test "x$FOUND_FREETYPE" = xyes; then
45496
45497  # Only process if variable expands to non-empty
45498
45499  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45500    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45501
45502  # Input might be given as Windows format, start by converting to
45503  # unix format.
45504  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45505  new_path=`$CYGPATH -u "$path"`
45506
45507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45510  # "foo.exe" is OK but "foo" is an error.
45511  #
45512  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45513  # It is also a way to make sure we got the proper file name for the real test later on.
45514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45515  if test "x$test_shortpath" = x; then
45516    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45517$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45518    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45519  fi
45520
45521  # Call helper function which possibly converts this using DOS-style short mode.
45522  # If so, the updated path is stored in $new_path.
45523
45524  input_path="$new_path"
45525  # Check if we need to convert this using DOS-style short mode. If the path
45526  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45527  # take no chances and rewrite it.
45528  # Note: m4 eats our [], so we need to use [ and ] instead.
45529  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45530  if test "x$has_forbidden_chars" != x; then
45531    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45532    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45533    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45534    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45535      # Going to short mode and back again did indeed matter. Since short mode is
45536      # case insensitive, let's make it lowercase to improve readability.
45537      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45538      # Now convert it back to Unix-style (cygpath)
45539      input_path=`$CYGPATH -u "$shortmode_path"`
45540      new_path="$input_path"
45541    fi
45542  fi
45543
45544  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45545  if test "x$test_cygdrive_prefix" = x; then
45546    # As a simple fix, exclude /usr/bin since it's not a real path.
45547    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45548      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45549      # a path prefixed by /cygdrive for fixpath to work.
45550      new_path="$CYGWIN_ROOT_PATH$input_path"
45551    fi
45552  fi
45553
45554
45555  if test "x$path" != "x$new_path"; then
45556    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45557    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45558$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45559  fi
45560
45561    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45562
45563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45564  has_colon=`$ECHO $path | $GREP ^.:`
45565  new_path="$path"
45566  if test "x$has_colon" = x; then
45567    # Not in mixed or Windows style, start by that.
45568    new_path=`cmd //c echo $path`
45569  fi
45570
45571
45572  input_path="$new_path"
45573  # Check if we need to convert this using DOS-style short mode. If the path
45574  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45575  # take no chances and rewrite it.
45576  # Note: m4 eats our [], so we need to use [ and ] instead.
45577  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45578  if test "x$has_forbidden_chars" != x; then
45579    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45580    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45581  fi
45582
45583
45584  windows_path="$new_path"
45585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45586    unix_path=`$CYGPATH -u "$windows_path"`
45587    new_path="$unix_path"
45588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45590    new_path="$unix_path"
45591  fi
45592
45593  if test "x$path" != "x$new_path"; then
45594    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45597  fi
45598
45599  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45600  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45601
45602    else
45603      # We're on a unix platform. Hooray! :)
45604      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45605      has_space=`$ECHO "$path" | $GREP " "`
45606      if test "x$has_space" != x; then
45607        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45608$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45609        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45610      fi
45611
45612      # Use eval to expand a potential ~
45613      eval path="$path"
45614      if test ! -f "$path" && test ! -d "$path"; then
45615        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45616      fi
45617
45618      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45619    fi
45620  fi
45621
45622
45623  # Only process if variable expands to non-empty
45624
45625  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45627
45628  # Input might be given as Windows format, start by converting to
45629  # unix format.
45630  path="$POTENTIAL_FREETYPE_LIB_PATH"
45631  new_path=`$CYGPATH -u "$path"`
45632
45633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45636  # "foo.exe" is OK but "foo" is an error.
45637  #
45638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45639  # It is also a way to make sure we got the proper file name for the real test later on.
45640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45641  if test "x$test_shortpath" = x; then
45642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45644    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45645  fi
45646
45647  # Call helper function which possibly converts this using DOS-style short mode.
45648  # If so, the updated path is stored in $new_path.
45649
45650  input_path="$new_path"
45651  # Check if we need to convert this using DOS-style short mode. If the path
45652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45653  # take no chances and rewrite it.
45654  # Note: m4 eats our [], so we need to use [ and ] instead.
45655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45656  if test "x$has_forbidden_chars" != x; then
45657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45661      # Going to short mode and back again did indeed matter. Since short mode is
45662      # case insensitive, let's make it lowercase to improve readability.
45663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45664      # Now convert it back to Unix-style (cygpath)
45665      input_path=`$CYGPATH -u "$shortmode_path"`
45666      new_path="$input_path"
45667    fi
45668  fi
45669
45670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45671  if test "x$test_cygdrive_prefix" = x; then
45672    # As a simple fix, exclude /usr/bin since it's not a real path.
45673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45675      # a path prefixed by /cygdrive for fixpath to work.
45676      new_path="$CYGWIN_ROOT_PATH$input_path"
45677    fi
45678  fi
45679
45680
45681  if test "x$path" != "x$new_path"; then
45682    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45685  fi
45686
45687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45688
45689  path="$POTENTIAL_FREETYPE_LIB_PATH"
45690  has_colon=`$ECHO $path | $GREP ^.:`
45691  new_path="$path"
45692  if test "x$has_colon" = x; then
45693    # Not in mixed or Windows style, start by that.
45694    new_path=`cmd //c echo $path`
45695  fi
45696
45697
45698  input_path="$new_path"
45699  # Check if we need to convert this using DOS-style short mode. If the path
45700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45701  # take no chances and rewrite it.
45702  # Note: m4 eats our [], so we need to use [ and ] instead.
45703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45704  if test "x$has_forbidden_chars" != x; then
45705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45707  fi
45708
45709
45710  windows_path="$new_path"
45711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45712    unix_path=`$CYGPATH -u "$windows_path"`
45713    new_path="$unix_path"
45714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45716    new_path="$unix_path"
45717  fi
45718
45719  if test "x$path" != "x$new_path"; then
45720    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45722$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45723  fi
45724
45725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45727
45728    else
45729      # We're on a unix platform. Hooray! :)
45730      path="$POTENTIAL_FREETYPE_LIB_PATH"
45731      has_space=`$ECHO "$path" | $GREP " "`
45732      if test "x$has_space" != x; then
45733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45734$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45736      fi
45737
45738      # Use eval to expand a potential ~
45739      eval path="$path"
45740      if test ! -f "$path" && test ! -d "$path"; then
45741        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45742      fi
45743
45744      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45745    fi
45746  fi
45747
45748
45749    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45750    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45751$as_echo_n "checking for freetype includes... " >&6; }
45752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45753$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45754    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45756$as_echo_n "checking for freetype libraries... " >&6; }
45757    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45758$as_echo "$FREETYPE_LIB_PATH" >&6; }
45759  fi
45760
45761          if test "x$FOUND_FREETYPE" != xyes; then
45762            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45763
45764  windows_path="$FREETYPE_BASE_DIR"
45765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45766    unix_path=`$CYGPATH -u "$windows_path"`
45767    FREETYPE_BASE_DIR="$unix_path"
45768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45770    FREETYPE_BASE_DIR="$unix_path"
45771  fi
45772
45773
45774  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45775  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45776  METHOD="well-known location"
45777
45778  # Let's start with an optimistic view of the world :-)
45779  FOUND_FREETYPE=yes
45780
45781  # First look for the canonical freetype main include file ft2build.h.
45782  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45783    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45784    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45785    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45786      # Fail.
45787      FOUND_FREETYPE=no
45788    fi
45789  fi
45790
45791  if test "x$FOUND_FREETYPE" = xyes; then
45792    # Include file found, let's continue the sanity check.
45793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45794$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45795
45796    # Reset to default value
45797    FREETYPE_BASE_NAME=freetype
45798    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45799    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45800      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45801          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45802        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45803        # for the .6 version explicitly.
45804        FREETYPE_BASE_NAME=freetype.6
45805        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45806        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45807$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45808      else
45809        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45810$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45811        FOUND_FREETYPE=no
45812      fi
45813    else
45814      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45815        # On Windows, we will need both .lib and .dll file.
45816        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45817          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45818$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45819          FOUND_FREETYPE=no
45820        fi
45821      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45822          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45823        # Found lib in isa dir, use that instead.
45824        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45825        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45826$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45827      fi
45828    fi
45829  fi
45830
45831  if test "x$FOUND_FREETYPE" = xyes; then
45832
45833  # Only process if variable expands to non-empty
45834
45835  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45836    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45837
45838  # Input might be given as Windows format, start by converting to
45839  # unix format.
45840  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45841  new_path=`$CYGPATH -u "$path"`
45842
45843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45846  # "foo.exe" is OK but "foo" is an error.
45847  #
45848  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45849  # It is also a way to make sure we got the proper file name for the real test later on.
45850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45851  if test "x$test_shortpath" = x; then
45852    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45853$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45854    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45855  fi
45856
45857  # Call helper function which possibly converts this using DOS-style short mode.
45858  # If so, the updated path is stored in $new_path.
45859
45860  input_path="$new_path"
45861  # Check if we need to convert this using DOS-style short mode. If the path
45862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45863  # take no chances and rewrite it.
45864  # Note: m4 eats our [], so we need to use [ and ] instead.
45865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45866  if test "x$has_forbidden_chars" != x; then
45867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45871      # Going to short mode and back again did indeed matter. Since short mode is
45872      # case insensitive, let's make it lowercase to improve readability.
45873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45874      # Now convert it back to Unix-style (cygpath)
45875      input_path=`$CYGPATH -u "$shortmode_path"`
45876      new_path="$input_path"
45877    fi
45878  fi
45879
45880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45881  if test "x$test_cygdrive_prefix" = x; then
45882    # As a simple fix, exclude /usr/bin since it's not a real path.
45883    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45885      # a path prefixed by /cygdrive for fixpath to work.
45886      new_path="$CYGWIN_ROOT_PATH$input_path"
45887    fi
45888  fi
45889
45890
45891  if test "x$path" != "x$new_path"; then
45892    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45893    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45894$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45895  fi
45896
45897    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45898
45899  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45900  has_colon=`$ECHO $path | $GREP ^.:`
45901  new_path="$path"
45902  if test "x$has_colon" = x; then
45903    # Not in mixed or Windows style, start by that.
45904    new_path=`cmd //c echo $path`
45905  fi
45906
45907
45908  input_path="$new_path"
45909  # Check if we need to convert this using DOS-style short mode. If the path
45910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45911  # take no chances and rewrite it.
45912  # Note: m4 eats our [], so we need to use [ and ] instead.
45913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45914  if test "x$has_forbidden_chars" != x; then
45915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45917  fi
45918
45919
45920  windows_path="$new_path"
45921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45922    unix_path=`$CYGPATH -u "$windows_path"`
45923    new_path="$unix_path"
45924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45926    new_path="$unix_path"
45927  fi
45928
45929  if test "x$path" != "x$new_path"; then
45930    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45932$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45933  fi
45934
45935  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45936  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45937
45938    else
45939      # We're on a unix platform. Hooray! :)
45940      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45941      has_space=`$ECHO "$path" | $GREP " "`
45942      if test "x$has_space" != x; then
45943        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45944$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45945        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45946      fi
45947
45948      # Use eval to expand a potential ~
45949      eval path="$path"
45950      if test ! -f "$path" && test ! -d "$path"; then
45951        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45952      fi
45953
45954      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45955    fi
45956  fi
45957
45958
45959  # Only process if variable expands to non-empty
45960
45961  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45962    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45963
45964  # Input might be given as Windows format, start by converting to
45965  # unix format.
45966  path="$POTENTIAL_FREETYPE_LIB_PATH"
45967  new_path=`$CYGPATH -u "$path"`
45968
45969  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45970  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45971  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45972  # "foo.exe" is OK but "foo" is an error.
45973  #
45974  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45975  # It is also a way to make sure we got the proper file name for the real test later on.
45976  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45977  if test "x$test_shortpath" = x; then
45978    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45979$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45980    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45981  fi
45982
45983  # Call helper function which possibly converts this using DOS-style short mode.
45984  # If so, the updated path is stored in $new_path.
45985
45986  input_path="$new_path"
45987  # Check if we need to convert this using DOS-style short mode. If the path
45988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45989  # take no chances and rewrite it.
45990  # Note: m4 eats our [], so we need to use [ and ] instead.
45991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45992  if test "x$has_forbidden_chars" != x; then
45993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45994    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45995    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45996    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45997      # Going to short mode and back again did indeed matter. Since short mode is
45998      # case insensitive, let's make it lowercase to improve readability.
45999      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46000      # Now convert it back to Unix-style (cygpath)
46001      input_path=`$CYGPATH -u "$shortmode_path"`
46002      new_path="$input_path"
46003    fi
46004  fi
46005
46006  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46007  if test "x$test_cygdrive_prefix" = x; then
46008    # As a simple fix, exclude /usr/bin since it's not a real path.
46009    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46010      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46011      # a path prefixed by /cygdrive for fixpath to work.
46012      new_path="$CYGWIN_ROOT_PATH$input_path"
46013    fi
46014  fi
46015
46016
46017  if test "x$path" != "x$new_path"; then
46018    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46019    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46020$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46021  fi
46022
46023    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46024
46025  path="$POTENTIAL_FREETYPE_LIB_PATH"
46026  has_colon=`$ECHO $path | $GREP ^.:`
46027  new_path="$path"
46028  if test "x$has_colon" = x; then
46029    # Not in mixed or Windows style, start by that.
46030    new_path=`cmd //c echo $path`
46031  fi
46032
46033
46034  input_path="$new_path"
46035  # Check if we need to convert this using DOS-style short mode. If the path
46036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46037  # take no chances and rewrite it.
46038  # Note: m4 eats our [], so we need to use [ and ] instead.
46039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46040  if test "x$has_forbidden_chars" != x; then
46041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46042    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46043  fi
46044
46045
46046  windows_path="$new_path"
46047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46048    unix_path=`$CYGPATH -u "$windows_path"`
46049    new_path="$unix_path"
46050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46051    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46052    new_path="$unix_path"
46053  fi
46054
46055  if test "x$path" != "x$new_path"; then
46056    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46059  fi
46060
46061  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46062  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46063
46064    else
46065      # We're on a unix platform. Hooray! :)
46066      path="$POTENTIAL_FREETYPE_LIB_PATH"
46067      has_space=`$ECHO "$path" | $GREP " "`
46068      if test "x$has_space" != x; then
46069        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46070$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46071        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46072      fi
46073
46074      # Use eval to expand a potential ~
46075      eval path="$path"
46076      if test ! -f "$path" && test ! -d "$path"; then
46077        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46078      fi
46079
46080      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46081    fi
46082  fi
46083
46084
46085    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46086    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46087$as_echo_n "checking for freetype includes... " >&6; }
46088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46089$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46090    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46092$as_echo_n "checking for freetype libraries... " >&6; }
46093    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46094$as_echo "$FREETYPE_LIB_PATH" >&6; }
46095  fi
46096
46097          fi
46098        else
46099          FREETYPE_BASE_DIR="$SYSROOT/usr"
46100
46101  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46102  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46103  METHOD="well-known location"
46104
46105  # Let's start with an optimistic view of the world :-)
46106  FOUND_FREETYPE=yes
46107
46108  # First look for the canonical freetype main include file ft2build.h.
46109  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46110    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46111    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46112    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46113      # Fail.
46114      FOUND_FREETYPE=no
46115    fi
46116  fi
46117
46118  if test "x$FOUND_FREETYPE" = xyes; then
46119    # Include file found, let's continue the sanity check.
46120    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46121$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46122
46123    # Reset to default value
46124    FREETYPE_BASE_NAME=freetype
46125    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46126    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46127      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46128          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46129        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46130        # for the .6 version explicitly.
46131        FREETYPE_BASE_NAME=freetype.6
46132        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46133        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46134$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46135      else
46136        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46137$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46138        FOUND_FREETYPE=no
46139      fi
46140    else
46141      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46142        # On Windows, we will need both .lib and .dll file.
46143        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46144          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46145$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46146          FOUND_FREETYPE=no
46147        fi
46148      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46149          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46150        # Found lib in isa dir, use that instead.
46151        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46152        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46153$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46154      fi
46155    fi
46156  fi
46157
46158  if test "x$FOUND_FREETYPE" = xyes; then
46159
46160  # Only process if variable expands to non-empty
46161
46162  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46163    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46164
46165  # Input might be given as Windows format, start by converting to
46166  # unix format.
46167  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46168  new_path=`$CYGPATH -u "$path"`
46169
46170  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46171  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46172  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46173  # "foo.exe" is OK but "foo" is an error.
46174  #
46175  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46176  # It is also a way to make sure we got the proper file name for the real test later on.
46177  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46178  if test "x$test_shortpath" = x; then
46179    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46180$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46181    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46182  fi
46183
46184  # Call helper function which possibly converts this using DOS-style short mode.
46185  # If so, the updated path is stored in $new_path.
46186
46187  input_path="$new_path"
46188  # Check if we need to convert this using DOS-style short mode. If the path
46189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46190  # take no chances and rewrite it.
46191  # Note: m4 eats our [], so we need to use [ and ] instead.
46192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46193  if test "x$has_forbidden_chars" != x; then
46194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46195    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46196    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46197    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46198      # Going to short mode and back again did indeed matter. Since short mode is
46199      # case insensitive, let's make it lowercase to improve readability.
46200      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46201      # Now convert it back to Unix-style (cygpath)
46202      input_path=`$CYGPATH -u "$shortmode_path"`
46203      new_path="$input_path"
46204    fi
46205  fi
46206
46207  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46208  if test "x$test_cygdrive_prefix" = x; then
46209    # As a simple fix, exclude /usr/bin since it's not a real path.
46210    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46211      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46212      # a path prefixed by /cygdrive for fixpath to work.
46213      new_path="$CYGWIN_ROOT_PATH$input_path"
46214    fi
46215  fi
46216
46217
46218  if test "x$path" != "x$new_path"; then
46219    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46220    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46221$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46222  fi
46223
46224    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46225
46226  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46227  has_colon=`$ECHO $path | $GREP ^.:`
46228  new_path="$path"
46229  if test "x$has_colon" = x; then
46230    # Not in mixed or Windows style, start by that.
46231    new_path=`cmd //c echo $path`
46232  fi
46233
46234
46235  input_path="$new_path"
46236  # Check if we need to convert this using DOS-style short mode. If the path
46237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46238  # take no chances and rewrite it.
46239  # Note: m4 eats our [], so we need to use [ and ] instead.
46240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46241  if test "x$has_forbidden_chars" != x; then
46242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46244  fi
46245
46246
46247  windows_path="$new_path"
46248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46249    unix_path=`$CYGPATH -u "$windows_path"`
46250    new_path="$unix_path"
46251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46252    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46253    new_path="$unix_path"
46254  fi
46255
46256  if test "x$path" != "x$new_path"; then
46257    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46259$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46260  fi
46261
46262  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46263  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46264
46265    else
46266      # We're on a unix platform. Hooray! :)
46267      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46268      has_space=`$ECHO "$path" | $GREP " "`
46269      if test "x$has_space" != x; then
46270        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46271$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46272        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46273      fi
46274
46275      # Use eval to expand a potential ~
46276      eval path="$path"
46277      if test ! -f "$path" && test ! -d "$path"; then
46278        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46279      fi
46280
46281      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46282    fi
46283  fi
46284
46285
46286  # Only process if variable expands to non-empty
46287
46288  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46289    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46290
46291  # Input might be given as Windows format, start by converting to
46292  # unix format.
46293  path="$POTENTIAL_FREETYPE_LIB_PATH"
46294  new_path=`$CYGPATH -u "$path"`
46295
46296  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46297  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46298  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46299  # "foo.exe" is OK but "foo" is an error.
46300  #
46301  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46302  # It is also a way to make sure we got the proper file name for the real test later on.
46303  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46304  if test "x$test_shortpath" = x; then
46305    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46307    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46308  fi
46309
46310  # Call helper function which possibly converts this using DOS-style short mode.
46311  # If so, the updated path is stored in $new_path.
46312
46313  input_path="$new_path"
46314  # Check if we need to convert this using DOS-style short mode. If the path
46315  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46316  # take no chances and rewrite it.
46317  # Note: m4 eats our [], so we need to use [ and ] instead.
46318  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46319  if test "x$has_forbidden_chars" != x; then
46320    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46321    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46322    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46323    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46324      # Going to short mode and back again did indeed matter. Since short mode is
46325      # case insensitive, let's make it lowercase to improve readability.
46326      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46327      # Now convert it back to Unix-style (cygpath)
46328      input_path=`$CYGPATH -u "$shortmode_path"`
46329      new_path="$input_path"
46330    fi
46331  fi
46332
46333  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46334  if test "x$test_cygdrive_prefix" = x; then
46335    # As a simple fix, exclude /usr/bin since it's not a real path.
46336    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46337      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46338      # a path prefixed by /cygdrive for fixpath to work.
46339      new_path="$CYGWIN_ROOT_PATH$input_path"
46340    fi
46341  fi
46342
46343
46344  if test "x$path" != "x$new_path"; then
46345    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46347$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46348  fi
46349
46350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351
46352  path="$POTENTIAL_FREETYPE_LIB_PATH"
46353  has_colon=`$ECHO $path | $GREP ^.:`
46354  new_path="$path"
46355  if test "x$has_colon" = x; then
46356    # Not in mixed or Windows style, start by that.
46357    new_path=`cmd //c echo $path`
46358  fi
46359
46360
46361  input_path="$new_path"
46362  # Check if we need to convert this using DOS-style short mode. If the path
46363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46364  # take no chances and rewrite it.
46365  # Note: m4 eats our [], so we need to use [ and ] instead.
46366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46367  if test "x$has_forbidden_chars" != x; then
46368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46369    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46370  fi
46371
46372
46373  windows_path="$new_path"
46374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46375    unix_path=`$CYGPATH -u "$windows_path"`
46376    new_path="$unix_path"
46377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46378    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46379    new_path="$unix_path"
46380  fi
46381
46382  if test "x$path" != "x$new_path"; then
46383    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46385$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46386  fi
46387
46388  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46389  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46390
46391    else
46392      # We're on a unix platform. Hooray! :)
46393      path="$POTENTIAL_FREETYPE_LIB_PATH"
46394      has_space=`$ECHO "$path" | $GREP " "`
46395      if test "x$has_space" != x; then
46396        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46397$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46398        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46399      fi
46400
46401      # Use eval to expand a potential ~
46402      eval path="$path"
46403      if test ! -f "$path" && test ! -d "$path"; then
46404        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46405      fi
46406
46407      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46408    fi
46409  fi
46410
46411
46412    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46414$as_echo_n "checking for freetype includes... " >&6; }
46415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46416$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46417    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46419$as_echo_n "checking for freetype libraries... " >&6; }
46420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46421$as_echo "$FREETYPE_LIB_PATH" >&6; }
46422  fi
46423
46424
46425          if test "x$FOUND_FREETYPE" != xyes; then
46426            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46427
46428  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46429  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46430  METHOD="well-known location"
46431
46432  # Let's start with an optimistic view of the world :-)
46433  FOUND_FREETYPE=yes
46434
46435  # First look for the canonical freetype main include file ft2build.h.
46436  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46437    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46438    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46439    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46440      # Fail.
46441      FOUND_FREETYPE=no
46442    fi
46443  fi
46444
46445  if test "x$FOUND_FREETYPE" = xyes; then
46446    # Include file found, let's continue the sanity check.
46447    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46448$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46449
46450    # Reset to default value
46451    FREETYPE_BASE_NAME=freetype
46452    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46453    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46454      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46455          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46456        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46457        # for the .6 version explicitly.
46458        FREETYPE_BASE_NAME=freetype.6
46459        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46460        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46461$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46462      else
46463        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46464$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46465        FOUND_FREETYPE=no
46466      fi
46467    else
46468      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46469        # On Windows, we will need both .lib and .dll file.
46470        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46471          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46472$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46473          FOUND_FREETYPE=no
46474        fi
46475      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46476          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46477        # Found lib in isa dir, use that instead.
46478        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46479        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46480$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46481      fi
46482    fi
46483  fi
46484
46485  if test "x$FOUND_FREETYPE" = xyes; then
46486
46487  # Only process if variable expands to non-empty
46488
46489  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46491
46492  # Input might be given as Windows format, start by converting to
46493  # unix format.
46494  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46495  new_path=`$CYGPATH -u "$path"`
46496
46497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46500  # "foo.exe" is OK but "foo" is an error.
46501  #
46502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46503  # It is also a way to make sure we got the proper file name for the real test later on.
46504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46505  if test "x$test_shortpath" = x; then
46506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46507$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46508    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46509  fi
46510
46511  # Call helper function which possibly converts this using DOS-style short mode.
46512  # If so, the updated path is stored in $new_path.
46513
46514  input_path="$new_path"
46515  # Check if we need to convert this using DOS-style short mode. If the path
46516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46517  # take no chances and rewrite it.
46518  # Note: m4 eats our [], so we need to use [ and ] instead.
46519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46520  if test "x$has_forbidden_chars" != x; then
46521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46525      # Going to short mode and back again did indeed matter. Since short mode is
46526      # case insensitive, let's make it lowercase to improve readability.
46527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46528      # Now convert it back to Unix-style (cygpath)
46529      input_path=`$CYGPATH -u "$shortmode_path"`
46530      new_path="$input_path"
46531    fi
46532  fi
46533
46534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46535  if test "x$test_cygdrive_prefix" = x; then
46536    # As a simple fix, exclude /usr/bin since it's not a real path.
46537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46539      # a path prefixed by /cygdrive for fixpath to work.
46540      new_path="$CYGWIN_ROOT_PATH$input_path"
46541    fi
46542  fi
46543
46544
46545  if test "x$path" != "x$new_path"; then
46546    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46548$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46549  fi
46550
46551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46552
46553  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46554  has_colon=`$ECHO $path | $GREP ^.:`
46555  new_path="$path"
46556  if test "x$has_colon" = x; then
46557    # Not in mixed or Windows style, start by that.
46558    new_path=`cmd //c echo $path`
46559  fi
46560
46561
46562  input_path="$new_path"
46563  # Check if we need to convert this using DOS-style short mode. If the path
46564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46565  # take no chances and rewrite it.
46566  # Note: m4 eats our [], so we need to use [ and ] instead.
46567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46568  if test "x$has_forbidden_chars" != x; then
46569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46571  fi
46572
46573
46574  windows_path="$new_path"
46575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46576    unix_path=`$CYGPATH -u "$windows_path"`
46577    new_path="$unix_path"
46578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46580    new_path="$unix_path"
46581  fi
46582
46583  if test "x$path" != "x$new_path"; then
46584    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46586$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46587  fi
46588
46589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46591
46592    else
46593      # We're on a unix platform. Hooray! :)
46594      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46595      has_space=`$ECHO "$path" | $GREP " "`
46596      if test "x$has_space" != x; then
46597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46598$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46599        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46600      fi
46601
46602      # Use eval to expand a potential ~
46603      eval path="$path"
46604      if test ! -f "$path" && test ! -d "$path"; then
46605        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46606      fi
46607
46608      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46609    fi
46610  fi
46611
46612
46613  # Only process if variable expands to non-empty
46614
46615  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46617
46618  # Input might be given as Windows format, start by converting to
46619  # unix format.
46620  path="$POTENTIAL_FREETYPE_LIB_PATH"
46621  new_path=`$CYGPATH -u "$path"`
46622
46623  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46624  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46625  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46626  # "foo.exe" is OK but "foo" is an error.
46627  #
46628  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46629  # It is also a way to make sure we got the proper file name for the real test later on.
46630  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46631  if test "x$test_shortpath" = x; then
46632    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46633$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46634    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46635  fi
46636
46637  # Call helper function which possibly converts this using DOS-style short mode.
46638  # If so, the updated path is stored in $new_path.
46639
46640  input_path="$new_path"
46641  # Check if we need to convert this using DOS-style short mode. If the path
46642  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46643  # take no chances and rewrite it.
46644  # Note: m4 eats our [], so we need to use [ and ] instead.
46645  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46646  if test "x$has_forbidden_chars" != x; then
46647    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46648    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46649    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46650    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46651      # Going to short mode and back again did indeed matter. Since short mode is
46652      # case insensitive, let's make it lowercase to improve readability.
46653      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46654      # Now convert it back to Unix-style (cygpath)
46655      input_path=`$CYGPATH -u "$shortmode_path"`
46656      new_path="$input_path"
46657    fi
46658  fi
46659
46660  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46661  if test "x$test_cygdrive_prefix" = x; then
46662    # As a simple fix, exclude /usr/bin since it's not a real path.
46663    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46664      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46665      # a path prefixed by /cygdrive for fixpath to work.
46666      new_path="$CYGWIN_ROOT_PATH$input_path"
46667    fi
46668  fi
46669
46670
46671  if test "x$path" != "x$new_path"; then
46672    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46674$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46675  fi
46676
46677    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46678
46679  path="$POTENTIAL_FREETYPE_LIB_PATH"
46680  has_colon=`$ECHO $path | $GREP ^.:`
46681  new_path="$path"
46682  if test "x$has_colon" = x; then
46683    # Not in mixed or Windows style, start by that.
46684    new_path=`cmd //c echo $path`
46685  fi
46686
46687
46688  input_path="$new_path"
46689  # Check if we need to convert this using DOS-style short mode. If the path
46690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46691  # take no chances and rewrite it.
46692  # Note: m4 eats our [], so we need to use [ and ] instead.
46693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46694  if test "x$has_forbidden_chars" != x; then
46695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46696    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46697  fi
46698
46699
46700  windows_path="$new_path"
46701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46702    unix_path=`$CYGPATH -u "$windows_path"`
46703    new_path="$unix_path"
46704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46706    new_path="$unix_path"
46707  fi
46708
46709  if test "x$path" != "x$new_path"; then
46710    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46711    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46712$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46713  fi
46714
46715  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46716  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46717
46718    else
46719      # We're on a unix platform. Hooray! :)
46720      path="$POTENTIAL_FREETYPE_LIB_PATH"
46721      has_space=`$ECHO "$path" | $GREP " "`
46722      if test "x$has_space" != x; then
46723        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46725        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46726      fi
46727
46728      # Use eval to expand a potential ~
46729      eval path="$path"
46730      if test ! -f "$path" && test ! -d "$path"; then
46731        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46732      fi
46733
46734      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46735    fi
46736  fi
46737
46738
46739    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46740    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46741$as_echo_n "checking for freetype includes... " >&6; }
46742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46743$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46744    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46745    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46746$as_echo_n "checking for freetype libraries... " >&6; }
46747    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46748$as_echo "$FREETYPE_LIB_PATH" >&6; }
46749  fi
46750
46751          fi
46752
46753          if test "x$FOUND_FREETYPE" != xyes; then
46754            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46755
46756  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46757  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46758  METHOD="well-known location"
46759
46760  # Let's start with an optimistic view of the world :-)
46761  FOUND_FREETYPE=yes
46762
46763  # First look for the canonical freetype main include file ft2build.h.
46764  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46765    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46766    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46767    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46768      # Fail.
46769      FOUND_FREETYPE=no
46770    fi
46771  fi
46772
46773  if test "x$FOUND_FREETYPE" = xyes; then
46774    # Include file found, let's continue the sanity check.
46775    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46776$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46777
46778    # Reset to default value
46779    FREETYPE_BASE_NAME=freetype
46780    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46781    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46782      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46783          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46784        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46785        # for the .6 version explicitly.
46786        FREETYPE_BASE_NAME=freetype.6
46787        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46788        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46789$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46790      else
46791        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46792$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46793        FOUND_FREETYPE=no
46794      fi
46795    else
46796      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46797        # On Windows, we will need both .lib and .dll file.
46798        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46799          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46800$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46801          FOUND_FREETYPE=no
46802        fi
46803      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46804          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46805        # Found lib in isa dir, use that instead.
46806        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46807        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46808$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46809      fi
46810    fi
46811  fi
46812
46813  if test "x$FOUND_FREETYPE" = xyes; then
46814
46815  # Only process if variable expands to non-empty
46816
46817  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46819
46820  # Input might be given as Windows format, start by converting to
46821  # unix format.
46822  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46823  new_path=`$CYGPATH -u "$path"`
46824
46825  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46826  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46827  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46828  # "foo.exe" is OK but "foo" is an error.
46829  #
46830  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46831  # It is also a way to make sure we got the proper file name for the real test later on.
46832  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46833  if test "x$test_shortpath" = x; then
46834    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46835$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46836    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46837  fi
46838
46839  # Call helper function which possibly converts this using DOS-style short mode.
46840  # If so, the updated path is stored in $new_path.
46841
46842  input_path="$new_path"
46843  # Check if we need to convert this using DOS-style short mode. If the path
46844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46845  # take no chances and rewrite it.
46846  # Note: m4 eats our [], so we need to use [ and ] instead.
46847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46848  if test "x$has_forbidden_chars" != x; then
46849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46850    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46851    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46852    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46853      # Going to short mode and back again did indeed matter. Since short mode is
46854      # case insensitive, let's make it lowercase to improve readability.
46855      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46856      # Now convert it back to Unix-style (cygpath)
46857      input_path=`$CYGPATH -u "$shortmode_path"`
46858      new_path="$input_path"
46859    fi
46860  fi
46861
46862  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46863  if test "x$test_cygdrive_prefix" = x; then
46864    # As a simple fix, exclude /usr/bin since it's not a real path.
46865    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46866      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46867      # a path prefixed by /cygdrive for fixpath to work.
46868      new_path="$CYGWIN_ROOT_PATH$input_path"
46869    fi
46870  fi
46871
46872
46873  if test "x$path" != "x$new_path"; then
46874    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46877  fi
46878
46879    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46880
46881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46882  has_colon=`$ECHO $path | $GREP ^.:`
46883  new_path="$path"
46884  if test "x$has_colon" = x; then
46885    # Not in mixed or Windows style, start by that.
46886    new_path=`cmd //c echo $path`
46887  fi
46888
46889
46890  input_path="$new_path"
46891  # Check if we need to convert this using DOS-style short mode. If the path
46892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46893  # take no chances and rewrite it.
46894  # Note: m4 eats our [], so we need to use [ and ] instead.
46895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46896  if test "x$has_forbidden_chars" != x; then
46897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46898    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46899  fi
46900
46901
46902  windows_path="$new_path"
46903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46904    unix_path=`$CYGPATH -u "$windows_path"`
46905    new_path="$unix_path"
46906  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46907    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46908    new_path="$unix_path"
46909  fi
46910
46911  if test "x$path" != "x$new_path"; then
46912    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46914$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46915  fi
46916
46917  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46918  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46919
46920    else
46921      # We're on a unix platform. Hooray! :)
46922      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46923      has_space=`$ECHO "$path" | $GREP " "`
46924      if test "x$has_space" != x; then
46925        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46926$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46927        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46928      fi
46929
46930      # Use eval to expand a potential ~
46931      eval path="$path"
46932      if test ! -f "$path" && test ! -d "$path"; then
46933        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46934      fi
46935
46936      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46937    fi
46938  fi
46939
46940
46941  # Only process if variable expands to non-empty
46942
46943  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46945
46946  # Input might be given as Windows format, start by converting to
46947  # unix format.
46948  path="$POTENTIAL_FREETYPE_LIB_PATH"
46949  new_path=`$CYGPATH -u "$path"`
46950
46951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46954  # "foo.exe" is OK but "foo" is an error.
46955  #
46956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46957  # It is also a way to make sure we got the proper file name for the real test later on.
46958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46959  if test "x$test_shortpath" = x; then
46960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46961$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46962    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46963  fi
46964
46965  # Call helper function which possibly converts this using DOS-style short mode.
46966  # If so, the updated path is stored in $new_path.
46967
46968  input_path="$new_path"
46969  # Check if we need to convert this using DOS-style short mode. If the path
46970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46971  # take no chances and rewrite it.
46972  # Note: m4 eats our [], so we need to use [ and ] instead.
46973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46974  if test "x$has_forbidden_chars" != x; then
46975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46979      # Going to short mode and back again did indeed matter. Since short mode is
46980      # case insensitive, let's make it lowercase to improve readability.
46981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46982      # Now convert it back to Unix-style (cygpath)
46983      input_path=`$CYGPATH -u "$shortmode_path"`
46984      new_path="$input_path"
46985    fi
46986  fi
46987
46988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46989  if test "x$test_cygdrive_prefix" = x; then
46990    # As a simple fix, exclude /usr/bin since it's not a real path.
46991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46993      # a path prefixed by /cygdrive for fixpath to work.
46994      new_path="$CYGWIN_ROOT_PATH$input_path"
46995    fi
46996  fi
46997
46998
46999  if test "x$path" != "x$new_path"; then
47000    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47002$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47003  fi
47004
47005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47006
47007  path="$POTENTIAL_FREETYPE_LIB_PATH"
47008  has_colon=`$ECHO $path | $GREP ^.:`
47009  new_path="$path"
47010  if test "x$has_colon" = x; then
47011    # Not in mixed or Windows style, start by that.
47012    new_path=`cmd //c echo $path`
47013  fi
47014
47015
47016  input_path="$new_path"
47017  # Check if we need to convert this using DOS-style short mode. If the path
47018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47019  # take no chances and rewrite it.
47020  # Note: m4 eats our [], so we need to use [ and ] instead.
47021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47022  if test "x$has_forbidden_chars" != x; then
47023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47025  fi
47026
47027
47028  windows_path="$new_path"
47029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47030    unix_path=`$CYGPATH -u "$windows_path"`
47031    new_path="$unix_path"
47032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47034    new_path="$unix_path"
47035  fi
47036
47037  if test "x$path" != "x$new_path"; then
47038    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47040$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47041  fi
47042
47043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47045
47046    else
47047      # We're on a unix platform. Hooray! :)
47048      path="$POTENTIAL_FREETYPE_LIB_PATH"
47049      has_space=`$ECHO "$path" | $GREP " "`
47050      if test "x$has_space" != x; then
47051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47052$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47054      fi
47055
47056      # Use eval to expand a potential ~
47057      eval path="$path"
47058      if test ! -f "$path" && test ! -d "$path"; then
47059        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47060      fi
47061
47062      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47063    fi
47064  fi
47065
47066
47067    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47069$as_echo_n "checking for freetype includes... " >&6; }
47070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47071$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47072    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47074$as_echo_n "checking for freetype libraries... " >&6; }
47075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47076$as_echo "$FREETYPE_LIB_PATH" >&6; }
47077  fi
47078
47079          fi
47080
47081          if test "x$FOUND_FREETYPE" != xyes; then
47082            FREETYPE_BASE_DIR="$SYSROOT/usr"
47083            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47084
47085  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47086  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47087  METHOD="well-known location"
47088
47089  # Let's start with an optimistic view of the world :-)
47090  FOUND_FREETYPE=yes
47091
47092  # First look for the canonical freetype main include file ft2build.h.
47093  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47094    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47095    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47096    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47097      # Fail.
47098      FOUND_FREETYPE=no
47099    fi
47100  fi
47101
47102  if test "x$FOUND_FREETYPE" = xyes; then
47103    # Include file found, let's continue the sanity check.
47104    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47105$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47106
47107    # Reset to default value
47108    FREETYPE_BASE_NAME=freetype
47109    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47110    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47111      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47112          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47113        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47114        # for the .6 version explicitly.
47115        FREETYPE_BASE_NAME=freetype.6
47116        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47117        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47118$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47119      else
47120        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47121$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47122        FOUND_FREETYPE=no
47123      fi
47124    else
47125      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47126        # On Windows, we will need both .lib and .dll file.
47127        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47128          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47129$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47130          FOUND_FREETYPE=no
47131        fi
47132      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47133          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47134        # Found lib in isa dir, use that instead.
47135        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47136        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47137$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47138      fi
47139    fi
47140  fi
47141
47142  if test "x$FOUND_FREETYPE" = xyes; then
47143
47144  # Only process if variable expands to non-empty
47145
47146  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47148
47149  # Input might be given as Windows format, start by converting to
47150  # unix format.
47151  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47152  new_path=`$CYGPATH -u "$path"`
47153
47154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47157  # "foo.exe" is OK but "foo" is an error.
47158  #
47159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47160  # It is also a way to make sure we got the proper file name for the real test later on.
47161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47162  if test "x$test_shortpath" = x; then
47163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47164$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47165    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47166  fi
47167
47168  # Call helper function which possibly converts this using DOS-style short mode.
47169  # If so, the updated path is stored in $new_path.
47170
47171  input_path="$new_path"
47172  # Check if we need to convert this using DOS-style short mode. If the path
47173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47174  # take no chances and rewrite it.
47175  # Note: m4 eats our [], so we need to use [ and ] instead.
47176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47177  if test "x$has_forbidden_chars" != x; then
47178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47182      # Going to short mode and back again did indeed matter. Since short mode is
47183      # case insensitive, let's make it lowercase to improve readability.
47184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47185      # Now convert it back to Unix-style (cygpath)
47186      input_path=`$CYGPATH -u "$shortmode_path"`
47187      new_path="$input_path"
47188    fi
47189  fi
47190
47191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47192  if test "x$test_cygdrive_prefix" = x; then
47193    # As a simple fix, exclude /usr/bin since it's not a real path.
47194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47196      # a path prefixed by /cygdrive for fixpath to work.
47197      new_path="$CYGWIN_ROOT_PATH$input_path"
47198    fi
47199  fi
47200
47201
47202  if test "x$path" != "x$new_path"; then
47203    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47205$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47206  fi
47207
47208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47209
47210  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47211  has_colon=`$ECHO $path | $GREP ^.:`
47212  new_path="$path"
47213  if test "x$has_colon" = x; then
47214    # Not in mixed or Windows style, start by that.
47215    new_path=`cmd //c echo $path`
47216  fi
47217
47218
47219  input_path="$new_path"
47220  # Check if we need to convert this using DOS-style short mode. If the path
47221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47222  # take no chances and rewrite it.
47223  # Note: m4 eats our [], so we need to use [ and ] instead.
47224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47225  if test "x$has_forbidden_chars" != x; then
47226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47228  fi
47229
47230
47231  windows_path="$new_path"
47232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47233    unix_path=`$CYGPATH -u "$windows_path"`
47234    new_path="$unix_path"
47235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47237    new_path="$unix_path"
47238  fi
47239
47240  if test "x$path" != "x$new_path"; then
47241    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47243$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47244  fi
47245
47246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47248
47249    else
47250      # We're on a unix platform. Hooray! :)
47251      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47252      has_space=`$ECHO "$path" | $GREP " "`
47253      if test "x$has_space" != x; then
47254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47255$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47256        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47257      fi
47258
47259      # Use eval to expand a potential ~
47260      eval path="$path"
47261      if test ! -f "$path" && test ! -d "$path"; then
47262        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47263      fi
47264
47265      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47266    fi
47267  fi
47268
47269
47270  # Only process if variable expands to non-empty
47271
47272  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47274
47275  # Input might be given as Windows format, start by converting to
47276  # unix format.
47277  path="$POTENTIAL_FREETYPE_LIB_PATH"
47278  new_path=`$CYGPATH -u "$path"`
47279
47280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47283  # "foo.exe" is OK but "foo" is an error.
47284  #
47285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47286  # It is also a way to make sure we got the proper file name for the real test later on.
47287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47288  if test "x$test_shortpath" = x; then
47289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47291    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47292  fi
47293
47294  # Call helper function which possibly converts this using DOS-style short mode.
47295  # If so, the updated path is stored in $new_path.
47296
47297  input_path="$new_path"
47298  # Check if we need to convert this using DOS-style short mode. If the path
47299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47300  # take no chances and rewrite it.
47301  # Note: m4 eats our [], so we need to use [ and ] instead.
47302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47303  if test "x$has_forbidden_chars" != x; then
47304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47308      # Going to short mode and back again did indeed matter. Since short mode is
47309      # case insensitive, let's make it lowercase to improve readability.
47310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47311      # Now convert it back to Unix-style (cygpath)
47312      input_path=`$CYGPATH -u "$shortmode_path"`
47313      new_path="$input_path"
47314    fi
47315  fi
47316
47317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47318  if test "x$test_cygdrive_prefix" = x; then
47319    # As a simple fix, exclude /usr/bin since it's not a real path.
47320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47322      # a path prefixed by /cygdrive for fixpath to work.
47323      new_path="$CYGWIN_ROOT_PATH$input_path"
47324    fi
47325  fi
47326
47327
47328  if test "x$path" != "x$new_path"; then
47329    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47331$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47332  fi
47333
47334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47335
47336  path="$POTENTIAL_FREETYPE_LIB_PATH"
47337  has_colon=`$ECHO $path | $GREP ^.:`
47338  new_path="$path"
47339  if test "x$has_colon" = x; then
47340    # Not in mixed or Windows style, start by that.
47341    new_path=`cmd //c echo $path`
47342  fi
47343
47344
47345  input_path="$new_path"
47346  # Check if we need to convert this using DOS-style short mode. If the path
47347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47348  # take no chances and rewrite it.
47349  # Note: m4 eats our [], so we need to use [ and ] instead.
47350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47351  if test "x$has_forbidden_chars" != x; then
47352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47354  fi
47355
47356
47357  windows_path="$new_path"
47358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47359    unix_path=`$CYGPATH -u "$windows_path"`
47360    new_path="$unix_path"
47361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47363    new_path="$unix_path"
47364  fi
47365
47366  if test "x$path" != "x$new_path"; then
47367    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47369$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47370  fi
47371
47372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47374
47375    else
47376      # We're on a unix platform. Hooray! :)
47377      path="$POTENTIAL_FREETYPE_LIB_PATH"
47378      has_space=`$ECHO "$path" | $GREP " "`
47379      if test "x$has_space" != x; then
47380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47381$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47383      fi
47384
47385      # Use eval to expand a potential ~
47386      eval path="$path"
47387      if test ! -f "$path" && test ! -d "$path"; then
47388        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47389      fi
47390
47391      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47392    fi
47393  fi
47394
47395
47396    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47397    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47398$as_echo_n "checking for freetype includes... " >&6; }
47399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47400$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47401    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47402    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47403$as_echo_n "checking for freetype libraries... " >&6; }
47404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47405$as_echo "$FREETYPE_LIB_PATH" >&6; }
47406  fi
47407
47408            else
47409
47410  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47411  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47412  METHOD="well-known location"
47413
47414  # Let's start with an optimistic view of the world :-)
47415  FOUND_FREETYPE=yes
47416
47417  # First look for the canonical freetype main include file ft2build.h.
47418  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47419    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47420    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47421    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47422      # Fail.
47423      FOUND_FREETYPE=no
47424    fi
47425  fi
47426
47427  if test "x$FOUND_FREETYPE" = xyes; then
47428    # Include file found, let's continue the sanity check.
47429    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47430$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47431
47432    # Reset to default value
47433    FREETYPE_BASE_NAME=freetype
47434    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47435    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47436      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47437          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47438        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47439        # for the .6 version explicitly.
47440        FREETYPE_BASE_NAME=freetype.6
47441        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47442        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47443$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47444      else
47445        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47446$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47447        FOUND_FREETYPE=no
47448      fi
47449    else
47450      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47451        # On Windows, we will need both .lib and .dll file.
47452        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47453          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47454$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47455          FOUND_FREETYPE=no
47456        fi
47457      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47458          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47459        # Found lib in isa dir, use that instead.
47460        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47461        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47462$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47463      fi
47464    fi
47465  fi
47466
47467  if test "x$FOUND_FREETYPE" = xyes; then
47468
47469  # Only process if variable expands to non-empty
47470
47471  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47472    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47473
47474  # Input might be given as Windows format, start by converting to
47475  # unix format.
47476  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47477  new_path=`$CYGPATH -u "$path"`
47478
47479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47482  # "foo.exe" is OK but "foo" is an error.
47483  #
47484  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47485  # It is also a way to make sure we got the proper file name for the real test later on.
47486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47487  if test "x$test_shortpath" = x; then
47488    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47489$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47490    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47491  fi
47492
47493  # Call helper function which possibly converts this using DOS-style short mode.
47494  # If so, the updated path is stored in $new_path.
47495
47496  input_path="$new_path"
47497  # Check if we need to convert this using DOS-style short mode. If the path
47498  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47499  # take no chances and rewrite it.
47500  # Note: m4 eats our [], so we need to use [ and ] instead.
47501  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47502  if test "x$has_forbidden_chars" != x; then
47503    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47504    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47505    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47506    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47507      # Going to short mode and back again did indeed matter. Since short mode is
47508      # case insensitive, let's make it lowercase to improve readability.
47509      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47510      # Now convert it back to Unix-style (cygpath)
47511      input_path=`$CYGPATH -u "$shortmode_path"`
47512      new_path="$input_path"
47513    fi
47514  fi
47515
47516  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47517  if test "x$test_cygdrive_prefix" = x; then
47518    # As a simple fix, exclude /usr/bin since it's not a real path.
47519    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47520      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47521      # a path prefixed by /cygdrive for fixpath to work.
47522      new_path="$CYGWIN_ROOT_PATH$input_path"
47523    fi
47524  fi
47525
47526
47527  if test "x$path" != "x$new_path"; then
47528    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47531  fi
47532
47533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47534
47535  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47536  has_colon=`$ECHO $path | $GREP ^.:`
47537  new_path="$path"
47538  if test "x$has_colon" = x; then
47539    # Not in mixed or Windows style, start by that.
47540    new_path=`cmd //c echo $path`
47541  fi
47542
47543
47544  input_path="$new_path"
47545  # Check if we need to convert this using DOS-style short mode. If the path
47546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47547  # take no chances and rewrite it.
47548  # Note: m4 eats our [], so we need to use [ and ] instead.
47549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47550  if test "x$has_forbidden_chars" != x; then
47551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47553  fi
47554
47555
47556  windows_path="$new_path"
47557  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47558    unix_path=`$CYGPATH -u "$windows_path"`
47559    new_path="$unix_path"
47560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47561    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47562    new_path="$unix_path"
47563  fi
47564
47565  if test "x$path" != "x$new_path"; then
47566    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47569  fi
47570
47571  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47572  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47573
47574    else
47575      # We're on a unix platform. Hooray! :)
47576      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47577      has_space=`$ECHO "$path" | $GREP " "`
47578      if test "x$has_space" != x; then
47579        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47580$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47581        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47582      fi
47583
47584      # Use eval to expand a potential ~
47585      eval path="$path"
47586      if test ! -f "$path" && test ! -d "$path"; then
47587        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47588      fi
47589
47590      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47591    fi
47592  fi
47593
47594
47595  # Only process if variable expands to non-empty
47596
47597  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47599
47600  # Input might be given as Windows format, start by converting to
47601  # unix format.
47602  path="$POTENTIAL_FREETYPE_LIB_PATH"
47603  new_path=`$CYGPATH -u "$path"`
47604
47605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47608  # "foo.exe" is OK but "foo" is an error.
47609  #
47610  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47611  # It is also a way to make sure we got the proper file name for the real test later on.
47612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47613  if test "x$test_shortpath" = x; then
47614    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47616    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47617  fi
47618
47619  # Call helper function which possibly converts this using DOS-style short mode.
47620  # If so, the updated path is stored in $new_path.
47621
47622  input_path="$new_path"
47623  # Check if we need to convert this using DOS-style short mode. If the path
47624  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47625  # take no chances and rewrite it.
47626  # Note: m4 eats our [], so we need to use [ and ] instead.
47627  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47628  if test "x$has_forbidden_chars" != x; then
47629    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47630    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47631    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47632    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47633      # Going to short mode and back again did indeed matter. Since short mode is
47634      # case insensitive, let's make it lowercase to improve readability.
47635      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47636      # Now convert it back to Unix-style (cygpath)
47637      input_path=`$CYGPATH -u "$shortmode_path"`
47638      new_path="$input_path"
47639    fi
47640  fi
47641
47642  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47643  if test "x$test_cygdrive_prefix" = x; then
47644    # As a simple fix, exclude /usr/bin since it's not a real path.
47645    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47646      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47647      # a path prefixed by /cygdrive for fixpath to work.
47648      new_path="$CYGWIN_ROOT_PATH$input_path"
47649    fi
47650  fi
47651
47652
47653  if test "x$path" != "x$new_path"; then
47654    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47656$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47657  fi
47658
47659    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47660
47661  path="$POTENTIAL_FREETYPE_LIB_PATH"
47662  has_colon=`$ECHO $path | $GREP ^.:`
47663  new_path="$path"
47664  if test "x$has_colon" = x; then
47665    # Not in mixed or Windows style, start by that.
47666    new_path=`cmd //c echo $path`
47667  fi
47668
47669
47670  input_path="$new_path"
47671  # Check if we need to convert this using DOS-style short mode. If the path
47672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47673  # take no chances and rewrite it.
47674  # Note: m4 eats our [], so we need to use [ and ] instead.
47675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47676  if test "x$has_forbidden_chars" != x; then
47677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47679  fi
47680
47681
47682  windows_path="$new_path"
47683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47684    unix_path=`$CYGPATH -u "$windows_path"`
47685    new_path="$unix_path"
47686  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47687    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47688    new_path="$unix_path"
47689  fi
47690
47691  if test "x$path" != "x$new_path"; then
47692    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47694$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47695  fi
47696
47697  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47698  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47699
47700    else
47701      # We're on a unix platform. Hooray! :)
47702      path="$POTENTIAL_FREETYPE_LIB_PATH"
47703      has_space=`$ECHO "$path" | $GREP " "`
47704      if test "x$has_space" != x; then
47705        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47706$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47707        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47708      fi
47709
47710      # Use eval to expand a potential ~
47711      eval path="$path"
47712      if test ! -f "$path" && test ! -d "$path"; then
47713        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47714      fi
47715
47716      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47717    fi
47718  fi
47719
47720
47721    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47723$as_echo_n "checking for freetype includes... " >&6; }
47724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47725$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47726    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47728$as_echo_n "checking for freetype libraries... " >&6; }
47729    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47730$as_echo "$FREETYPE_LIB_PATH" >&6; }
47731  fi
47732
47733              if test "x$FOUND_FREETYPE" != xyes; then
47734
47735  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47736  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47737  METHOD="well-known location"
47738
47739  # Let's start with an optimistic view of the world :-)
47740  FOUND_FREETYPE=yes
47741
47742  # First look for the canonical freetype main include file ft2build.h.
47743  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47744    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47745    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47746    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47747      # Fail.
47748      FOUND_FREETYPE=no
47749    fi
47750  fi
47751
47752  if test "x$FOUND_FREETYPE" = xyes; then
47753    # Include file found, let's continue the sanity check.
47754    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47755$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47756
47757    # Reset to default value
47758    FREETYPE_BASE_NAME=freetype
47759    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47760    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47761      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47762          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47763        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47764        # for the .6 version explicitly.
47765        FREETYPE_BASE_NAME=freetype.6
47766        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47767        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47768$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47769      else
47770        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47771$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47772        FOUND_FREETYPE=no
47773      fi
47774    else
47775      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47776        # On Windows, we will need both .lib and .dll file.
47777        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47778          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47779$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47780          FOUND_FREETYPE=no
47781        fi
47782      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47783          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47784        # Found lib in isa dir, use that instead.
47785        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47786        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47787$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47788      fi
47789    fi
47790  fi
47791
47792  if test "x$FOUND_FREETYPE" = xyes; then
47793
47794  # Only process if variable expands to non-empty
47795
47796  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47798
47799  # Input might be given as Windows format, start by converting to
47800  # unix format.
47801  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47802  new_path=`$CYGPATH -u "$path"`
47803
47804  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47805  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47806  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47807  # "foo.exe" is OK but "foo" is an error.
47808  #
47809  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47810  # It is also a way to make sure we got the proper file name for the real test later on.
47811  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47812  if test "x$test_shortpath" = x; then
47813    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47814$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47815    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47816  fi
47817
47818  # Call helper function which possibly converts this using DOS-style short mode.
47819  # If so, the updated path is stored in $new_path.
47820
47821  input_path="$new_path"
47822  # Check if we need to convert this using DOS-style short mode. If the path
47823  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47824  # take no chances and rewrite it.
47825  # Note: m4 eats our [], so we need to use [ and ] instead.
47826  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47827  if test "x$has_forbidden_chars" != x; then
47828    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47829    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47830    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47831    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47832      # Going to short mode and back again did indeed matter. Since short mode is
47833      # case insensitive, let's make it lowercase to improve readability.
47834      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47835      # Now convert it back to Unix-style (cygpath)
47836      input_path=`$CYGPATH -u "$shortmode_path"`
47837      new_path="$input_path"
47838    fi
47839  fi
47840
47841  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47842  if test "x$test_cygdrive_prefix" = x; then
47843    # As a simple fix, exclude /usr/bin since it's not a real path.
47844    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47845      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47846      # a path prefixed by /cygdrive for fixpath to work.
47847      new_path="$CYGWIN_ROOT_PATH$input_path"
47848    fi
47849  fi
47850
47851
47852  if test "x$path" != "x$new_path"; then
47853    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47854    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47855$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47856  fi
47857
47858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47859
47860  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47861  has_colon=`$ECHO $path | $GREP ^.:`
47862  new_path="$path"
47863  if test "x$has_colon" = x; then
47864    # Not in mixed or Windows style, start by that.
47865    new_path=`cmd //c echo $path`
47866  fi
47867
47868
47869  input_path="$new_path"
47870  # Check if we need to convert this using DOS-style short mode. If the path
47871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47872  # take no chances and rewrite it.
47873  # Note: m4 eats our [], so we need to use [ and ] instead.
47874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47875  if test "x$has_forbidden_chars" != x; then
47876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47877    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47878  fi
47879
47880
47881  windows_path="$new_path"
47882  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47883    unix_path=`$CYGPATH -u "$windows_path"`
47884    new_path="$unix_path"
47885  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47886    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47887    new_path="$unix_path"
47888  fi
47889
47890  if test "x$path" != "x$new_path"; then
47891    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47893$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47894  fi
47895
47896  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47897  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47898
47899    else
47900      # We're on a unix platform. Hooray! :)
47901      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47902      has_space=`$ECHO "$path" | $GREP " "`
47903      if test "x$has_space" != x; then
47904        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47906        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47907      fi
47908
47909      # Use eval to expand a potential ~
47910      eval path="$path"
47911      if test ! -f "$path" && test ! -d "$path"; then
47912        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47913      fi
47914
47915      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47916    fi
47917  fi
47918
47919
47920  # Only process if variable expands to non-empty
47921
47922  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47923    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47924
47925  # Input might be given as Windows format, start by converting to
47926  # unix format.
47927  path="$POTENTIAL_FREETYPE_LIB_PATH"
47928  new_path=`$CYGPATH -u "$path"`
47929
47930  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47931  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47932  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47933  # "foo.exe" is OK but "foo" is an error.
47934  #
47935  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47936  # It is also a way to make sure we got the proper file name for the real test later on.
47937  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47938  if test "x$test_shortpath" = x; then
47939    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47940$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47941    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47942  fi
47943
47944  # Call helper function which possibly converts this using DOS-style short mode.
47945  # If so, the updated path is stored in $new_path.
47946
47947  input_path="$new_path"
47948  # Check if we need to convert this using DOS-style short mode. If the path
47949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47950  # take no chances and rewrite it.
47951  # Note: m4 eats our [], so we need to use [ and ] instead.
47952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47953  if test "x$has_forbidden_chars" != x; then
47954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47958      # Going to short mode and back again did indeed matter. Since short mode is
47959      # case insensitive, let's make it lowercase to improve readability.
47960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47961      # Now convert it back to Unix-style (cygpath)
47962      input_path=`$CYGPATH -u "$shortmode_path"`
47963      new_path="$input_path"
47964    fi
47965  fi
47966
47967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47968  if test "x$test_cygdrive_prefix" = x; then
47969    # As a simple fix, exclude /usr/bin since it's not a real path.
47970    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47972      # a path prefixed by /cygdrive for fixpath to work.
47973      new_path="$CYGWIN_ROOT_PATH$input_path"
47974    fi
47975  fi
47976
47977
47978  if test "x$path" != "x$new_path"; then
47979    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47980    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47981$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47982  fi
47983
47984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47985
47986  path="$POTENTIAL_FREETYPE_LIB_PATH"
47987  has_colon=`$ECHO $path | $GREP ^.:`
47988  new_path="$path"
47989  if test "x$has_colon" = x; then
47990    # Not in mixed or Windows style, start by that.
47991    new_path=`cmd //c echo $path`
47992  fi
47993
47994
47995  input_path="$new_path"
47996  # Check if we need to convert this using DOS-style short mode. If the path
47997  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47998  # take no chances and rewrite it.
47999  # Note: m4 eats our [], so we need to use [ and ] instead.
48000  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48001  if test "x$has_forbidden_chars" != x; then
48002    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48003    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48004  fi
48005
48006
48007  windows_path="$new_path"
48008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48009    unix_path=`$CYGPATH -u "$windows_path"`
48010    new_path="$unix_path"
48011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48013    new_path="$unix_path"
48014  fi
48015
48016  if test "x$path" != "x$new_path"; then
48017    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48019$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48020  fi
48021
48022  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48023  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48024
48025    else
48026      # We're on a unix platform. Hooray! :)
48027      path="$POTENTIAL_FREETYPE_LIB_PATH"
48028      has_space=`$ECHO "$path" | $GREP " "`
48029      if test "x$has_space" != x; then
48030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48032        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48033      fi
48034
48035      # Use eval to expand a potential ~
48036      eval path="$path"
48037      if test ! -f "$path" && test ! -d "$path"; then
48038        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48039      fi
48040
48041      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48042    fi
48043  fi
48044
48045
48046    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48047    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48048$as_echo_n "checking for freetype includes... " >&6; }
48049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48050$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48051    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48053$as_echo_n "checking for freetype libraries... " >&6; }
48054    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48055$as_echo "$FREETYPE_LIB_PATH" >&6; }
48056  fi
48057
48058              fi
48059            fi
48060          fi
48061        fi
48062      fi # end check in well-known locations
48063
48064      if test "x$FOUND_FREETYPE" != xyes; then
48065
48066  # Print a helpful message on how to acquire the necessary build dependency.
48067  # freetype is the help tag: freetype, cups, pulse, alsa etc
48068  MISSING_DEPENDENCY=freetype
48069
48070  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48071    cygwin_help $MISSING_DEPENDENCY
48072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48073    msys_help $MISSING_DEPENDENCY
48074  else
48075    PKGHANDLER_COMMAND=
48076
48077    case $PKGHANDLER in
48078      apt-get)
48079        apt_help     $MISSING_DEPENDENCY ;;
48080      yum)
48081        yum_help     $MISSING_DEPENDENCY ;;
48082      port)
48083        port_help    $MISSING_DEPENDENCY ;;
48084      pkgutil)
48085        pkgutil_help $MISSING_DEPENDENCY ;;
48086      pkgadd)
48087        pkgadd_help  $MISSING_DEPENDENCY ;;
48088    esac
48089
48090    if test "x$PKGHANDLER_COMMAND" != x; then
48091      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48092    fi
48093  fi
48094
48095        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48096      fi
48097    fi # end user specified settings
48098
48099    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48100    if test "x$FREETYPE_CFLAGS" = x; then
48101
48102  # Only process if variable expands to non-empty
48103
48104  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48105    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48106
48107  # Input might be given as Windows format, start by converting to
48108  # unix format.
48109  path="$FREETYPE_INCLUDE_PATH"
48110  new_path=`$CYGPATH -u "$path"`
48111
48112  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48113  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48114  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48115  # "foo.exe" is OK but "foo" is an error.
48116  #
48117  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48118  # It is also a way to make sure we got the proper file name for the real test later on.
48119  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48120  if test "x$test_shortpath" = x; then
48121    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48122$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48123    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48124  fi
48125
48126  # Call helper function which possibly converts this using DOS-style short mode.
48127  # If so, the updated path is stored in $new_path.
48128
48129  input_path="$new_path"
48130  # Check if we need to convert this using DOS-style short mode. If the path
48131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48132  # take no chances and rewrite it.
48133  # Note: m4 eats our [], so we need to use [ and ] instead.
48134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48135  if test "x$has_forbidden_chars" != x; then
48136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48137    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48138    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48139    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48140      # Going to short mode and back again did indeed matter. Since short mode is
48141      # case insensitive, let's make it lowercase to improve readability.
48142      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48143      # Now convert it back to Unix-style (cygpath)
48144      input_path=`$CYGPATH -u "$shortmode_path"`
48145      new_path="$input_path"
48146    fi
48147  fi
48148
48149  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48150  if test "x$test_cygdrive_prefix" = x; then
48151    # As a simple fix, exclude /usr/bin since it's not a real path.
48152    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48153      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48154      # a path prefixed by /cygdrive for fixpath to work.
48155      new_path="$CYGWIN_ROOT_PATH$input_path"
48156    fi
48157  fi
48158
48159
48160  if test "x$path" != "x$new_path"; then
48161    FREETYPE_INCLUDE_PATH="$new_path"
48162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48163$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48164  fi
48165
48166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48167
48168  path="$FREETYPE_INCLUDE_PATH"
48169  has_colon=`$ECHO $path | $GREP ^.:`
48170  new_path="$path"
48171  if test "x$has_colon" = x; then
48172    # Not in mixed or Windows style, start by that.
48173    new_path=`cmd //c echo $path`
48174  fi
48175
48176
48177  input_path="$new_path"
48178  # Check if we need to convert this using DOS-style short mode. If the path
48179  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48180  # take no chances and rewrite it.
48181  # Note: m4 eats our [], so we need to use [ and ] instead.
48182  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48183  if test "x$has_forbidden_chars" != x; then
48184    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48185    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48186  fi
48187
48188
48189  windows_path="$new_path"
48190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48191    unix_path=`$CYGPATH -u "$windows_path"`
48192    new_path="$unix_path"
48193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48195    new_path="$unix_path"
48196  fi
48197
48198  if test "x$path" != "x$new_path"; then
48199    FREETYPE_INCLUDE_PATH="$new_path"
48200    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48201$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48202  fi
48203
48204  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48205  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48206
48207    else
48208      # We're on a unix platform. Hooray! :)
48209      path="$FREETYPE_INCLUDE_PATH"
48210      has_space=`$ECHO "$path" | $GREP " "`
48211      if test "x$has_space" != x; then
48212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48213$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48214        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48215      fi
48216
48217      # Use eval to expand a potential ~
48218      eval path="$path"
48219      if test ! -f "$path" && test ! -d "$path"; then
48220        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48221      fi
48222
48223      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48224    fi
48225  fi
48226
48227      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48228        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48229      else
48230        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48231      fi
48232    fi
48233
48234    if test "x$FREETYPE_LIBS" = x; then
48235
48236  # Only process if variable expands to non-empty
48237
48238  if test "x$FREETYPE_LIB_PATH" != x; then
48239    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48240
48241  # Input might be given as Windows format, start by converting to
48242  # unix format.
48243  path="$FREETYPE_LIB_PATH"
48244  new_path=`$CYGPATH -u "$path"`
48245
48246  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48247  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48248  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48249  # "foo.exe" is OK but "foo" is an error.
48250  #
48251  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48252  # It is also a way to make sure we got the proper file name for the real test later on.
48253  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48254  if test "x$test_shortpath" = x; then
48255    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48256$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48257    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48258  fi
48259
48260  # Call helper function which possibly converts this using DOS-style short mode.
48261  # If so, the updated path is stored in $new_path.
48262
48263  input_path="$new_path"
48264  # Check if we need to convert this using DOS-style short mode. If the path
48265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48266  # take no chances and rewrite it.
48267  # Note: m4 eats our [], so we need to use [ and ] instead.
48268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48269  if test "x$has_forbidden_chars" != x; then
48270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48271    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48272    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48273    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48274      # Going to short mode and back again did indeed matter. Since short mode is
48275      # case insensitive, let's make it lowercase to improve readability.
48276      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48277      # Now convert it back to Unix-style (cygpath)
48278      input_path=`$CYGPATH -u "$shortmode_path"`
48279      new_path="$input_path"
48280    fi
48281  fi
48282
48283  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48284  if test "x$test_cygdrive_prefix" = x; then
48285    # As a simple fix, exclude /usr/bin since it's not a real path.
48286    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48287      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48288      # a path prefixed by /cygdrive for fixpath to work.
48289      new_path="$CYGWIN_ROOT_PATH$input_path"
48290    fi
48291  fi
48292
48293
48294  if test "x$path" != "x$new_path"; then
48295    FREETYPE_LIB_PATH="$new_path"
48296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48297$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48298  fi
48299
48300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48301
48302  path="$FREETYPE_LIB_PATH"
48303  has_colon=`$ECHO $path | $GREP ^.:`
48304  new_path="$path"
48305  if test "x$has_colon" = x; then
48306    # Not in mixed or Windows style, start by that.
48307    new_path=`cmd //c echo $path`
48308  fi
48309
48310
48311  input_path="$new_path"
48312  # Check if we need to convert this using DOS-style short mode. If the path
48313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48314  # take no chances and rewrite it.
48315  # Note: m4 eats our [], so we need to use [ and ] instead.
48316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48317  if test "x$has_forbidden_chars" != x; then
48318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48320  fi
48321
48322
48323  windows_path="$new_path"
48324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48325    unix_path=`$CYGPATH -u "$windows_path"`
48326    new_path="$unix_path"
48327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48329    new_path="$unix_path"
48330  fi
48331
48332  if test "x$path" != "x$new_path"; then
48333    FREETYPE_LIB_PATH="$new_path"
48334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48335$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48336  fi
48337
48338  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48339  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48340
48341    else
48342      # We're on a unix platform. Hooray! :)
48343      path="$FREETYPE_LIB_PATH"
48344      has_space=`$ECHO "$path" | $GREP " "`
48345      if test "x$has_space" != x; then
48346        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48347$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48348        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48349      fi
48350
48351      # Use eval to expand a potential ~
48352      eval path="$path"
48353      if test ! -f "$path" && test ! -d "$path"; then
48354        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48355      fi
48356
48357      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48358    fi
48359  fi
48360
48361      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48362        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48363      else
48364        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48365      fi
48366    fi
48367
48368    # Try to compile it
48369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48370$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48371    ac_ext=cpp
48372ac_cpp='$CXXCPP $CPPFLAGS'
48373ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48374ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48375ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48376
48377    PREV_CXXCFLAGS="$CXXFLAGS"
48378    PREV_LIBS="$LIBS"
48379    PREV_CXX="$CXX"
48380    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48381    LIBS="$LIBS $FREETYPE_LIBS"
48382    CXX="$FIXPATH $CXX"
48383    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48384/* end confdefs.h.  */
48385
48386          #include<ft2build.h>
48387          #include FT_FREETYPE_H
48388          int main () {
48389            FT_Init_FreeType(NULL);
48390            return 0;
48391          }
48392
48393_ACEOF
48394if ac_fn_cxx_try_link "$LINENO"; then :
48395
48396          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48397$as_echo "yes" >&6; }
48398
48399else
48400
48401          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48402$as_echo "no" >&6; }
48403          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48404$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48405          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48406$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48407
48408
48409  # Print a helpful message on how to acquire the necessary build dependency.
48410  # freetype is the help tag: freetype, cups, pulse, alsa etc
48411  MISSING_DEPENDENCY=freetype
48412
48413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48414    cygwin_help $MISSING_DEPENDENCY
48415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48416    msys_help $MISSING_DEPENDENCY
48417  else
48418    PKGHANDLER_COMMAND=
48419
48420    case $PKGHANDLER in
48421      apt-get)
48422        apt_help     $MISSING_DEPENDENCY ;;
48423      yum)
48424        yum_help     $MISSING_DEPENDENCY ;;
48425      port)
48426        port_help    $MISSING_DEPENDENCY ;;
48427      pkgutil)
48428        pkgutil_help $MISSING_DEPENDENCY ;;
48429      pkgadd)
48430        pkgadd_help  $MISSING_DEPENDENCY ;;
48431    esac
48432
48433    if test "x$PKGHANDLER_COMMAND" != x; then
48434      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48435    fi
48436  fi
48437
48438
48439          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48440
48441
48442fi
48443rm -f core conftest.err conftest.$ac_objext \
48444    conftest$ac_exeext conftest.$ac_ext
48445    CXXCFLAGS="$PREV_CXXFLAGS"
48446    LIBS="$PREV_LIBS"
48447    CXX="$PREV_CXX"
48448    ac_ext=cpp
48449ac_cpp='$CXXCPP $CPPFLAGS'
48450ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48451ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48452ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48453
48454
48455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48456$as_echo_n "checking if we should bundle freetype... " >&6; }
48457    if test "x$BUNDLE_FREETYPE" = xyes; then
48458      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48459    fi
48460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48461$as_echo "$BUNDLE_FREETYPE" >&6; }
48462
48463  fi # end freetype needed
48464
48465
48466
48467
48468
48469
48470
48471  ###############################################################################
48472  #
48473  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48474  #
48475
48476# Check whether --with-alsa was given.
48477if test "${with_alsa+set}" = set; then :
48478  withval=$with_alsa;
48479fi
48480
48481
48482# Check whether --with-alsa-include was given.
48483if test "${with_alsa_include+set}" = set; then :
48484  withval=$with_alsa_include;
48485fi
48486
48487
48488# Check whether --with-alsa-lib was given.
48489if test "${with_alsa_lib+set}" = set; then :
48490  withval=$with_alsa_lib;
48491fi
48492
48493
48494  if test "x$ALSA_NOT_NEEDED" = xyes; then
48495    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48496      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48497$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48498    fi
48499    ALSA_CFLAGS=
48500    ALSA_LIBS=
48501  else
48502    ALSA_FOUND=no
48503
48504    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48505      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48506    fi
48507
48508    if test "x${with_alsa}" != x; then
48509      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48510      ALSA_CFLAGS="-I${with_alsa}/include"
48511      ALSA_FOUND=yes
48512    fi
48513    if test "x${with_alsa_include}" != x; then
48514      ALSA_CFLAGS="-I${with_alsa_include}"
48515      ALSA_FOUND=yes
48516    fi
48517    if test "x${with_alsa_lib}" != x; then
48518      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48519      ALSA_FOUND=yes
48520    fi
48521    if test "x$ALSA_FOUND" = xno; then
48522
48523
48524  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48525    # Source the builddeps file again, to make sure it uses the latest variables!
48526    . $builddepsfile
48527    # Look for a target and build machine specific resource!
48528    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48529    if test "x$resource" = x; then
48530      # Ok, lets instead look for a target specific resource
48531      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48532    fi
48533    if test "x$resource" = x; then
48534      # Ok, lets instead look for a build specific resource
48535      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48536    fi
48537    if test "x$resource" = x; then
48538      # Ok, lets instead look for a generic resource
48539      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48540      resource=${builddep_alsa}
48541    fi
48542    if test "x$resource" != x; then
48543      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48544$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48545      # If the resource in the builddeps.conf file is an existing directory,
48546      # for example /java/linux/cups
48547      if test -d ${resource}; then
48548        depdir=${resource}
48549      else
48550
48551  # alsa is for example mymodule
48552  # $resource is for example libs/general/libmymod_1_2_3.zip
48553  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48554  # $with_builddeps_dir is for example /localhome/builddeps
48555  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48556  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48557  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48558  filename=`basename $resource`
48559  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48560  filebase=${filename%%.*}
48561  extension=${filename#*.}
48562  installdir=$with_builddeps_dir/$filebase
48563  if test ! -f $installdir/$filename.unpacked; then
48564    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48565$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48566    if test ! -d $installdir; then
48567      mkdir -p $installdir
48568    fi
48569    if test ! -d $installdir; then
48570      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48571    fi
48572    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48573    touch $tmpfile
48574    if test ! -f $tmpfile; then
48575      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48576    fi
48577
48578  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48579  # $tmpfile is the local file name for the downloaded file.
48580  VALID_TOOL=no
48581  if test "x$BDEPS_FTP" = xwget; then
48582    VALID_TOOL=yes
48583    wget -O $tmpfile $with_builddeps_server/$resource
48584  fi
48585  if test "x$BDEPS_FTP" = xlftp; then
48586    VALID_TOOL=yes
48587    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48588  fi
48589  if test "x$BDEPS_FTP" = xftp; then
48590    VALID_TOOL=yes
48591    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48592    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48593    FTPUSERPWD=${FTPSERVER%%@*}
48594    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48595      FTPUSER=${userpwd%%:*}
48596      FTPPWD=${userpwd#*@}
48597      FTPSERVER=${FTPSERVER#*@}
48598    else
48599      FTPUSER=ftp
48600      FTPPWD=ftp
48601    fi
48602    # the "pass" command does not work on some
48603    # ftp clients (read ftp.exe) but if it works,
48604    # passive mode is better!
48605    ( \
48606        echo "user $FTPUSER $FTPPWD"        ; \
48607        echo "pass"                         ; \
48608        echo "bin"                          ; \
48609        echo "get $FTPPATH $tmpfile"              ; \
48610    ) | ftp -in $FTPSERVER
48611  fi
48612  if test "x$VALID_TOOL" != xyes; then
48613    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48614  fi
48615
48616    mv $tmpfile $installdir/$filename
48617    if test ! -s $installdir/$filename; then
48618      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48619    fi
48620    case "$extension" in
48621      zip)  echo "Unzipping $installdir/$filename..."
48622        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48623        ;;
48624      tar.gz) echo "Untaring $installdir/$filename..."
48625        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48626        ;;
48627      tgz) echo "Untaring $installdir/$filename..."
48628        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48629        ;;
48630      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48631        ;;
48632    esac
48633  fi
48634  if test -f $installdir/$filename.unpacked; then
48635    depdir=$installdir
48636  fi
48637
48638      fi
48639      # Source the builddeps file again, because in the previous command, the depdir
48640      # was updated to point at the current build dependency install directory.
48641      . $builddepsfile
48642      # Now extract variables from the builddeps.conf files.
48643      theroot=${builddep_alsa_ROOT}
48644      thecflags=${builddep_alsa_CFLAGS}
48645      thelibs=${builddep_alsa_LIBS}
48646      if test "x$depdir" = x; then
48647        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48648      fi
48649      ALSA=$depdir
48650      if test "x$theroot" != x; then
48651        ALSA="$theroot"
48652      fi
48653      if test "x$thecflags" != x; then
48654        ALSA_CFLAGS="$thecflags"
48655      fi
48656      if test "x$thelibs" != x; then
48657        ALSA_LIBS="$thelibs"
48658      fi
48659      ALSA_FOUND=yes
48660      else ALSA_FOUND=no
48661
48662    fi
48663    else ALSA_FOUND=no
48664
48665  fi
48666
48667    fi
48668    # Do not try pkg-config if we have a sysroot set.
48669    if test "x$SYSROOT" = x; then
48670      if test "x$ALSA_FOUND" = xno; then
48671
48672pkg_failed=no
48673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48674$as_echo_n "checking for ALSA... " >&6; }
48675
48676if test -n "$ALSA_CFLAGS"; then
48677    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48678 elif test -n "$PKG_CONFIG"; then
48679    if test -n "$PKG_CONFIG" && \
48680    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48681  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48682  ac_status=$?
48683  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48684  test $ac_status = 0; }; then
48685  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48686else
48687  pkg_failed=yes
48688fi
48689 else
48690    pkg_failed=untried
48691fi
48692if test -n "$ALSA_LIBS"; then
48693    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48694 elif test -n "$PKG_CONFIG"; then
48695    if test -n "$PKG_CONFIG" && \
48696    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48697  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48698  ac_status=$?
48699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48700  test $ac_status = 0; }; then
48701  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48702else
48703  pkg_failed=yes
48704fi
48705 else
48706    pkg_failed=untried
48707fi
48708
48709
48710
48711if test $pkg_failed = yes; then
48712
48713if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48714        _pkg_short_errors_supported=yes
48715else
48716        _pkg_short_errors_supported=no
48717fi
48718        if test $_pkg_short_errors_supported = yes; then
48719	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48720        else
48721	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48722        fi
48723	# Put the nasty error message in config.log where it belongs
48724	echo "$ALSA_PKG_ERRORS" >&5
48725
48726	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48727$as_echo "no" >&6; }
48728                ALSA_FOUND=no
48729elif test $pkg_failed = untried; then
48730	ALSA_FOUND=no
48731else
48732	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48733	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48734        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48735$as_echo "yes" >&6; }
48736	ALSA_FOUND=yes
48737fi
48738      fi
48739    fi
48740    if test "x$ALSA_FOUND" = xno; then
48741      for ac_header in alsa/asoundlib.h
48742do :
48743  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48744if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48745  cat >>confdefs.h <<_ACEOF
48746#define HAVE_ALSA_ASOUNDLIB_H 1
48747_ACEOF
48748
48749            ALSA_FOUND=yes
48750            ALSA_CFLAGS=-Iignoreme
48751            ALSA_LIBS=-lasound
48752            DEFAULT_ALSA=yes
48753
48754else
48755  ALSA_FOUND=no
48756fi
48757
48758done
48759
48760    fi
48761    if test "x$ALSA_FOUND" = xno; then
48762
48763  # Print a helpful message on how to acquire the necessary build dependency.
48764  # alsa is the help tag: freetype, cups, pulse, alsa etc
48765  MISSING_DEPENDENCY=alsa
48766
48767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48768    cygwin_help $MISSING_DEPENDENCY
48769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48770    msys_help $MISSING_DEPENDENCY
48771  else
48772    PKGHANDLER_COMMAND=
48773
48774    case $PKGHANDLER in
48775      apt-get)
48776        apt_help     $MISSING_DEPENDENCY ;;
48777      yum)
48778        yum_help     $MISSING_DEPENDENCY ;;
48779      port)
48780        port_help    $MISSING_DEPENDENCY ;;
48781      pkgutil)
48782        pkgutil_help $MISSING_DEPENDENCY ;;
48783      pkgadd)
48784        pkgadd_help  $MISSING_DEPENDENCY ;;
48785    esac
48786
48787    if test "x$PKGHANDLER_COMMAND" != x; then
48788      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48789    fi
48790  fi
48791
48792      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48793    fi
48794  fi
48795
48796
48797
48798
48799
48800
48801  ###############################################################################
48802  #
48803  # Check for the jpeg library
48804  #
48805
48806
48807# Check whether --with-libjpeg was given.
48808if test "${with_libjpeg+set}" = set; then :
48809  withval=$with_libjpeg;
48810fi
48811
48812
48813  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48814$as_echo_n "checking for which libjpeg to use... " >&6; }
48815
48816  # default is bundled
48817  DEFAULT_LIBJPEG=bundled
48818
48819  #
48820  # if user didn't specify, use DEFAULT_LIBJPEG
48821  #
48822  if test "x${with_libjpeg}" = "x"; then
48823    with_libjpeg=${DEFAULT_LIBJPEG}
48824  fi
48825
48826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48827$as_echo "${with_libjpeg}" >&6; }
48828
48829  if test "x${with_libjpeg}" = "xbundled"; then
48830    USE_EXTERNAL_LIBJPEG=false
48831  elif test "x${with_libjpeg}" = "xsystem"; then
48832    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48833if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48834
48835else
48836   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48837fi
48838
48839
48840    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48841$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48842if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48843  $as_echo_n "(cached) " >&6
48844else
48845  ac_check_lib_save_LIBS=$LIBS
48846LIBS="-ljpeg  $LIBS"
48847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48848/* end confdefs.h.  */
48849
48850/* Override any GCC internal prototype to avoid an error.
48851   Use char because int might match the return type of a GCC
48852   builtin and then its argument prototype would still apply.  */
48853#ifdef __cplusplus
48854extern "C"
48855#endif
48856char jpeg_CreateDecompress ();
48857int
48858main ()
48859{
48860return jpeg_CreateDecompress ();
48861  ;
48862  return 0;
48863}
48864_ACEOF
48865if ac_fn_cxx_try_link "$LINENO"; then :
48866  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48867else
48868  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48869fi
48870rm -f core conftest.err conftest.$ac_objext \
48871    conftest$ac_exeext conftest.$ac_ext
48872LIBS=$ac_check_lib_save_LIBS
48873fi
48874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48875$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48876if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48877  cat >>confdefs.h <<_ACEOF
48878#define HAVE_LIBJPEG 1
48879_ACEOF
48880
48881  LIBS="-ljpeg $LIBS"
48882
48883else
48884   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48885fi
48886
48887
48888    USE_EXTERNAL_LIBJPEG=true
48889  else
48890    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48891  fi
48892
48893
48894
48895  ###############################################################################
48896  #
48897  # Check for the gif library
48898  #
48899
48900
48901# Check whether --with-giflib was given.
48902if test "${with_giflib+set}" = set; then :
48903  withval=$with_giflib;
48904fi
48905
48906
48907
48908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48909$as_echo_n "checking for which giflib to use... " >&6; }
48910
48911  # default is bundled
48912  DEFAULT_GIFLIB=bundled
48913
48914  #
48915  # if user didn't specify, use DEFAULT_GIFLIB
48916  #
48917  if test "x${with_giflib}" = "x"; then
48918    with_giflib=${DEFAULT_GIFLIB}
48919  fi
48920
48921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48922$as_echo "${with_giflib}" >&6; }
48923
48924  if test "x${with_giflib}" = "xbundled"; then
48925    USE_EXTERNAL_LIBGIF=false
48926  elif test "x${with_giflib}" = "xsystem"; then
48927    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48928if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48929
48930else
48931   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48932fi
48933
48934
48935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48936$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48937if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48938  $as_echo_n "(cached) " >&6
48939else
48940  ac_check_lib_save_LIBS=$LIBS
48941LIBS="-lgif  $LIBS"
48942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48943/* end confdefs.h.  */
48944
48945/* Override any GCC internal prototype to avoid an error.
48946   Use char because int might match the return type of a GCC
48947   builtin and then its argument prototype would still apply.  */
48948#ifdef __cplusplus
48949extern "C"
48950#endif
48951char DGifGetCode ();
48952int
48953main ()
48954{
48955return DGifGetCode ();
48956  ;
48957  return 0;
48958}
48959_ACEOF
48960if ac_fn_cxx_try_link "$LINENO"; then :
48961  ac_cv_lib_gif_DGifGetCode=yes
48962else
48963  ac_cv_lib_gif_DGifGetCode=no
48964fi
48965rm -f core conftest.err conftest.$ac_objext \
48966    conftest$ac_exeext conftest.$ac_ext
48967LIBS=$ac_check_lib_save_LIBS
48968fi
48969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48970$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48971if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48972  cat >>confdefs.h <<_ACEOF
48973#define HAVE_LIBGIF 1
48974_ACEOF
48975
48976  LIBS="-lgif $LIBS"
48977
48978else
48979   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48980fi
48981
48982
48983    USE_EXTERNAL_LIBGIF=true
48984  else
48985    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48986  fi
48987
48988
48989  ###############################################################################
48990  #
48991  # Check for the lcms2 library
48992  #
48993
48994
48995# Check whether --with-lcms was given.
48996if test "${with_lcms+set}" = set; then :
48997  withval=$with_lcms;
48998fi
48999
49000
49001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49002$as_echo_n "checking for which lcms to use... " >&6; }
49003
49004  DEFAULT_LCMS=bundled
49005
49006  #
49007  # If user didn't specify, use DEFAULT_LCMS
49008  #
49009  if test "x${with_lcms}" = "x"; then
49010      with_lcms=${DEFAULT_LCMS}
49011  fi
49012
49013  if test "x${with_lcms}" = "xbundled"; then
49014    USE_EXTERNAL_LCMS=false
49015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49016$as_echo "bundled" >&6; }
49017  elif test "x${with_lcms}" = "xsystem"; then
49018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49019$as_echo "system" >&6; }
49020
49021pkg_failed=no
49022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49023$as_echo_n "checking for LCMS... " >&6; }
49024
49025if test -n "$LCMS_CFLAGS"; then
49026    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49027 elif test -n "$PKG_CONFIG"; then
49028    if test -n "$PKG_CONFIG" && \
49029    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49030  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49031  ac_status=$?
49032  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49033  test $ac_status = 0; }; then
49034  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49035else
49036  pkg_failed=yes
49037fi
49038 else
49039    pkg_failed=untried
49040fi
49041if test -n "$LCMS_LIBS"; then
49042    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49043 elif test -n "$PKG_CONFIG"; then
49044    if test -n "$PKG_CONFIG" && \
49045    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49046  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49047  ac_status=$?
49048  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49049  test $ac_status = 0; }; then
49050  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49051else
49052  pkg_failed=yes
49053fi
49054 else
49055    pkg_failed=untried
49056fi
49057
49058
49059
49060if test $pkg_failed = yes; then
49061
49062if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49063        _pkg_short_errors_supported=yes
49064else
49065        _pkg_short_errors_supported=no
49066fi
49067        if test $_pkg_short_errors_supported = yes; then
49068	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49069        else
49070	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49071        fi
49072	# Put the nasty error message in config.log where it belongs
49073	echo "$LCMS_PKG_ERRORS" >&5
49074
49075	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49076$as_echo "no" >&6; }
49077                LCMS_FOUND=no
49078elif test $pkg_failed = untried; then
49079	LCMS_FOUND=no
49080else
49081	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49082	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49084$as_echo "yes" >&6; }
49085	LCMS_FOUND=yes
49086fi
49087    if test "x${LCMS_FOUND}" = "xyes"; then
49088      USE_EXTERNAL_LCMS=true
49089    else
49090      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49091    fi
49092  else
49093    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49094  fi
49095
49096
49097
49098  ###############################################################################
49099  #
49100  # Check for the png library
49101  #
49102
49103
49104# Check whether --with-libpng was given.
49105if test "${with_libpng+set}" = set; then :
49106  withval=$with_libpng;
49107fi
49108
49109
49110
49111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49112$as_echo_n "checking for which libpng to use... " >&6; }
49113
49114  # default is bundled
49115  DEFAULT_LIBPNG=bundled
49116
49117  #
49118  # if user didn't specify, use DEFAULT_LIBPNG
49119  #
49120  if test "x${with_libpng}" = "x"; then
49121      with_libpng=${DEFAULT_LIBPNG}
49122  fi
49123
49124  if test "x${with_libpng}" = "xbundled"; then
49125      USE_EXTERNAL_LIBPNG=false
49126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49127$as_echo "bundled" >&6; }
49128  elif test "x${with_libpng}" = "xsystem"; then
49129
49130pkg_failed=no
49131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49132$as_echo_n "checking for PNG... " >&6; }
49133
49134if test -n "$PNG_CFLAGS"; then
49135    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49136 elif test -n "$PKG_CONFIG"; then
49137    if test -n "$PKG_CONFIG" && \
49138    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49139  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49140  ac_status=$?
49141  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49142  test $ac_status = 0; }; then
49143  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49144else
49145  pkg_failed=yes
49146fi
49147 else
49148    pkg_failed=untried
49149fi
49150if test -n "$PNG_LIBS"; then
49151    pkg_cv_PNG_LIBS="$PNG_LIBS"
49152 elif test -n "$PKG_CONFIG"; then
49153    if test -n "$PKG_CONFIG" && \
49154    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49155  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49156  ac_status=$?
49157  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49158  test $ac_status = 0; }; then
49159  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49160else
49161  pkg_failed=yes
49162fi
49163 else
49164    pkg_failed=untried
49165fi
49166
49167
49168
49169if test $pkg_failed = yes; then
49170
49171if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49172        _pkg_short_errors_supported=yes
49173else
49174        _pkg_short_errors_supported=no
49175fi
49176        if test $_pkg_short_errors_supported = yes; then
49177	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49178        else
49179	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49180        fi
49181	# Put the nasty error message in config.log where it belongs
49182	echo "$PNG_PKG_ERRORS" >&5
49183
49184	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49185$as_echo "no" >&6; }
49186                 LIBPNG_FOUND=no
49187elif test $pkg_failed = untried; then
49188	 LIBPNG_FOUND=no
49189else
49190	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49191	PNG_LIBS=$pkg_cv_PNG_LIBS
49192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49193$as_echo "yes" >&6; }
49194	 LIBPNG_FOUND=yes
49195fi
49196      if test "x${LIBPNG_FOUND}" = "xyes"; then
49197          USE_EXTERNAL_LIBPNG=true
49198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49199$as_echo "system" >&6; }
49200      else
49201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49202$as_echo "system not found" >&6; }
49203          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49204      fi
49205  else
49206      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49207  fi
49208
49209
49210  ###############################################################################
49211  #
49212  # Check for the zlib library
49213  #
49214
49215
49216# Check whether --with-zlib was given.
49217if test "${with_zlib+set}" = set; then :
49218  withval=$with_zlib;
49219fi
49220
49221
49222  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49223$as_echo_n "checking for compress in -lz... " >&6; }
49224if ${ac_cv_lib_z_compress+:} false; then :
49225  $as_echo_n "(cached) " >&6
49226else
49227  ac_check_lib_save_LIBS=$LIBS
49228LIBS="-lz  $LIBS"
49229cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49230/* end confdefs.h.  */
49231
49232/* Override any GCC internal prototype to avoid an error.
49233   Use char because int might match the return type of a GCC
49234   builtin and then its argument prototype would still apply.  */
49235#ifdef __cplusplus
49236extern "C"
49237#endif
49238char compress ();
49239int
49240main ()
49241{
49242return compress ();
49243  ;
49244  return 0;
49245}
49246_ACEOF
49247if ac_fn_cxx_try_link "$LINENO"; then :
49248  ac_cv_lib_z_compress=yes
49249else
49250  ac_cv_lib_z_compress=no
49251fi
49252rm -f core conftest.err conftest.$ac_objext \
49253    conftest$ac_exeext conftest.$ac_ext
49254LIBS=$ac_check_lib_save_LIBS
49255fi
49256{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49257$as_echo "$ac_cv_lib_z_compress" >&6; }
49258if test "x$ac_cv_lib_z_compress" = xyes; then :
49259   ZLIB_FOUND=yes
49260else
49261   ZLIB_FOUND=no
49262fi
49263
49264
49265  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49266$as_echo_n "checking for which zlib to use... " >&6; }
49267
49268  DEFAULT_ZLIB=bundled
49269  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49270    #
49271    # On macosx default is system...on others default is
49272    #
49273    DEFAULT_ZLIB=system
49274  fi
49275
49276  if test "x${ZLIB_FOUND}" != "xyes"; then
49277    #
49278    # If we don't find any system...set default to bundled
49279    #
49280    DEFAULT_ZLIB=bundled
49281  fi
49282
49283  #
49284  # If user didn't specify, use DEFAULT_ZLIB
49285  #
49286  if test "x${with_zlib}" = "x"; then
49287    with_zlib=${DEFAULT_ZLIB}
49288  fi
49289
49290  if test "x${with_zlib}" = "xbundled"; then
49291    USE_EXTERNAL_LIBZ=false
49292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49293$as_echo "bundled" >&6; }
49294  elif test "x${with_zlib}" = "xsystem"; then
49295    if test "x${ZLIB_FOUND}" = "xyes"; then
49296      USE_EXTERNAL_LIBZ=true
49297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49298$as_echo "system" >&6; }
49299    else
49300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49301$as_echo "system not found" >&6; }
49302      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49303    fi
49304  else
49305    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49306  fi
49307
49308
49309
49310  ###############################################################################
49311  LIBZIP_CAN_USE_MMAP=true
49312
49313
49314
49315  ###############################################################################
49316  #
49317  # Check if altzone exists in time.h
49318  #
49319
49320  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49321/* end confdefs.h.  */
49322#include <time.h>
49323int
49324main ()
49325{
49326return (int)altzone;
49327  ;
49328  return 0;
49329}
49330_ACEOF
49331if ac_fn_cxx_try_link "$LINENO"; then :
49332  has_altzone=yes
49333else
49334  has_altzone=no
49335fi
49336rm -f core conftest.err conftest.$ac_objext \
49337    conftest$ac_exeext conftest.$ac_ext
49338  if test "x$has_altzone" = xyes; then
49339
49340$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49341
49342  fi
49343
49344  ###############################################################################
49345  #
49346  # Check the maths library
49347  #
49348
49349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49350$as_echo_n "checking for cos in -lm... " >&6; }
49351if ${ac_cv_lib_m_cos+:} false; then :
49352  $as_echo_n "(cached) " >&6
49353else
49354  ac_check_lib_save_LIBS=$LIBS
49355LIBS="-lm  $LIBS"
49356cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49357/* end confdefs.h.  */
49358
49359/* Override any GCC internal prototype to avoid an error.
49360   Use char because int might match the return type of a GCC
49361   builtin and then its argument prototype would still apply.  */
49362#ifdef __cplusplus
49363extern "C"
49364#endif
49365char cos ();
49366int
49367main ()
49368{
49369return cos ();
49370  ;
49371  return 0;
49372}
49373_ACEOF
49374if ac_fn_cxx_try_link "$LINENO"; then :
49375  ac_cv_lib_m_cos=yes
49376else
49377  ac_cv_lib_m_cos=no
49378fi
49379rm -f core conftest.err conftest.$ac_objext \
49380    conftest$ac_exeext conftest.$ac_ext
49381LIBS=$ac_check_lib_save_LIBS
49382fi
49383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49384$as_echo "$ac_cv_lib_m_cos" >&6; }
49385if test "x$ac_cv_lib_m_cos" = xyes; then :
49386  cat >>confdefs.h <<_ACEOF
49387#define HAVE_LIBM 1
49388_ACEOF
49389
49390  LIBS="-lm $LIBS"
49391
49392else
49393
49394        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49395$as_echo "$as_me: Maths library was not found" >&6;}
49396
49397
49398fi
49399
49400
49401
49402  ###############################################################################
49403  #
49404  # Check for libdl.so
49405
49406  save_LIBS="$LIBS"
49407  LIBS=""
49408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49409$as_echo_n "checking for dlopen in -ldl... " >&6; }
49410if ${ac_cv_lib_dl_dlopen+:} false; then :
49411  $as_echo_n "(cached) " >&6
49412else
49413  ac_check_lib_save_LIBS=$LIBS
49414LIBS="-ldl  $LIBS"
49415cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49416/* end confdefs.h.  */
49417
49418/* Override any GCC internal prototype to avoid an error.
49419   Use char because int might match the return type of a GCC
49420   builtin and then its argument prototype would still apply.  */
49421#ifdef __cplusplus
49422extern "C"
49423#endif
49424char dlopen ();
49425int
49426main ()
49427{
49428return dlopen ();
49429  ;
49430  return 0;
49431}
49432_ACEOF
49433if ac_fn_cxx_try_link "$LINENO"; then :
49434  ac_cv_lib_dl_dlopen=yes
49435else
49436  ac_cv_lib_dl_dlopen=no
49437fi
49438rm -f core conftest.err conftest.$ac_objext \
49439    conftest$ac_exeext conftest.$ac_ext
49440LIBS=$ac_check_lib_save_LIBS
49441fi
49442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49443$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49444if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49445  cat >>confdefs.h <<_ACEOF
49446#define HAVE_LIBDL 1
49447_ACEOF
49448
49449  LIBS="-ldl $LIBS"
49450
49451fi
49452
49453  LIBDL="$LIBS"
49454
49455  LIBS="$save_LIBS"
49456
49457
49458  ###############################################################################
49459  #
49460  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49461  # dynamic build is configured on command line.
49462  #
49463
49464# Check whether --with-stdc++lib was given.
49465if test "${with_stdc__lib+set}" = set; then :
49466  withval=$with_stdc__lib;
49467        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49468                && test "x$with_stdc__lib" != xdefault; then
49469          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49470        fi
49471
49472else
49473  with_stdc__lib=default
49474
49475fi
49476
49477
49478  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49479    # Test if -lstdc++ works.
49480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49481$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49482    ac_ext=cpp
49483ac_cpp='$CXXCPP $CPPFLAGS'
49484ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49485ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49486ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49487
49488    OLD_CXXFLAGS="$CXXFLAGS"
49489    CXXFLAGS="$CXXFLAGS -lstdc++"
49490    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49491/* end confdefs.h.  */
49492
49493int
49494main ()
49495{
49496return 0;
49497  ;
49498  return 0;
49499}
49500_ACEOF
49501if ac_fn_cxx_try_link "$LINENO"; then :
49502  has_dynamic_libstdcxx=yes
49503else
49504  has_dynamic_libstdcxx=no
49505fi
49506rm -f core conftest.err conftest.$ac_objext \
49507    conftest$ac_exeext conftest.$ac_ext
49508    CXXFLAGS="$OLD_CXXFLAGS"
49509    ac_ext=cpp
49510ac_cpp='$CXXCPP $CPPFLAGS'
49511ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49512ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49513ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49514
49515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49516$as_echo "$has_dynamic_libstdcxx" >&6; }
49517
49518    # Test if stdc++ can be linked statically.
49519    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49520$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49521    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49522    ac_ext=cpp
49523ac_cpp='$CXXCPP $CPPFLAGS'
49524ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49525ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49526ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49527
49528    OLD_LIBS="$LIBS"
49529    OLD_CXX="$CXX"
49530    LIBS="$STATIC_STDCXX_FLAGS"
49531    CXX="$CC"
49532    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49533/* end confdefs.h.  */
49534
49535int
49536main ()
49537{
49538return 0;
49539  ;
49540  return 0;
49541}
49542_ACEOF
49543if ac_fn_cxx_try_link "$LINENO"; then :
49544  has_static_libstdcxx=yes
49545else
49546  has_static_libstdcxx=no
49547fi
49548rm -f core conftest.err conftest.$ac_objext \
49549    conftest$ac_exeext conftest.$ac_ext
49550    LIBS="$OLD_LIBS"
49551    CXX="$OLD_CXX"
49552    ac_ext=cpp
49553ac_cpp='$CXXCPP $CPPFLAGS'
49554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49557
49558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49559$as_echo "$has_static_libstdcxx" >&6; }
49560
49561    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49562      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49563    fi
49564
49565    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49566      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49567    fi
49568
49569    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49570      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49571    fi
49572
49573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49574$as_echo_n "checking how to link with libstdc++... " >&6; }
49575    # If dynamic was requested, it's available since it would fail above otherwise.
49576    # If dynamic wasn't requested, go with static unless it isn't available.
49577    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49578      LIBCXX="$LIBCXX -lstdc++"
49579      LDCXX="$CXX"
49580      STATIC_CXX_SETTING="STATIC_CXX=false"
49581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49582$as_echo "dynamic" >&6; }
49583    else
49584      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49585      LDCXX="$CC"
49586      STATIC_CXX_SETTING="STATIC_CXX=true"
49587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49588$as_echo "static" >&6; }
49589    fi
49590  fi
49591
49592
49593  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49594    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49595
49596pkg_failed=no
49597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49598$as_echo_n "checking for LIBFFI... " >&6; }
49599
49600if test -n "$LIBFFI_CFLAGS"; then
49601    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49602 elif test -n "$PKG_CONFIG"; then
49603    if test -n "$PKG_CONFIG" && \
49604    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49605  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49606  ac_status=$?
49607  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49608  test $ac_status = 0; }; then
49609  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49610else
49611  pkg_failed=yes
49612fi
49613 else
49614    pkg_failed=untried
49615fi
49616if test -n "$LIBFFI_LIBS"; then
49617    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49618 elif test -n "$PKG_CONFIG"; then
49619    if test -n "$PKG_CONFIG" && \
49620    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49621  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49622  ac_status=$?
49623  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49624  test $ac_status = 0; }; then
49625  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49626else
49627  pkg_failed=yes
49628fi
49629 else
49630    pkg_failed=untried
49631fi
49632
49633
49634
49635if test $pkg_failed = yes; then
49636
49637if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49638        _pkg_short_errors_supported=yes
49639else
49640        _pkg_short_errors_supported=no
49641fi
49642        if test $_pkg_short_errors_supported = yes; then
49643	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49644        else
49645	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49646        fi
49647	# Put the nasty error message in config.log where it belongs
49648	echo "$LIBFFI_PKG_ERRORS" >&5
49649
49650	as_fn_error $? "Package requirements (libffi) were not met:
49651
49652$LIBFFI_PKG_ERRORS
49653
49654Consider adjusting the PKG_CONFIG_PATH environment variable if you
49655installed software in a non-standard prefix.
49656
49657Alternatively, you may set the environment variables LIBFFI_CFLAGS
49658and LIBFFI_LIBS to avoid the need to call pkg-config.
49659See the pkg-config man page for more details.
49660" "$LINENO" 5
49661elif test $pkg_failed = untried; then
49662	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49663$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49664as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49665is in your PATH or set the PKG_CONFIG environment variable to the full
49666path to pkg-config.
49667
49668Alternatively, you may set the environment variables LIBFFI_CFLAGS
49669and LIBFFI_LIBS to avoid the need to call pkg-config.
49670See the pkg-config man page for more details.
49671
49672To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49673See \`config.log' for more details" "$LINENO" 5; }
49674else
49675	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49676	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49678$as_echo "yes" >&6; }
49679	:
49680fi
49681
49682  fi
49683
49684  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49685    # Extract the first word of "llvm-config", so it can be a program name with args.
49686set dummy llvm-config; ac_word=$2
49687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49688$as_echo_n "checking for $ac_word... " >&6; }
49689if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49690  $as_echo_n "(cached) " >&6
49691else
49692  if test -n "$LLVM_CONFIG"; then
49693  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49694else
49695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49696for as_dir in $PATH
49697do
49698  IFS=$as_save_IFS
49699  test -z "$as_dir" && as_dir=.
49700    for ac_exec_ext in '' $ac_executable_extensions; do
49701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49702    ac_cv_prog_LLVM_CONFIG="llvm-config"
49703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49704    break 2
49705  fi
49706done
49707  done
49708IFS=$as_save_IFS
49709
49710fi
49711fi
49712LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49713if test -n "$LLVM_CONFIG"; then
49714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49715$as_echo "$LLVM_CONFIG" >&6; }
49716else
49717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49718$as_echo "no" >&6; }
49719fi
49720
49721
49722
49723    if test "x$LLVM_CONFIG" != xllvm-config; then
49724      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49725    fi
49726
49727    llvm_components="jit mcjit engine nativecodegen native"
49728    unset LLVM_CFLAGS
49729    for flag in $("$LLVM_CONFIG" --cxxflags); do
49730      if echo "${flag}" | grep -q '^-[ID]'; then
49731        if test "${flag}" != "-D_DEBUG" ; then
49732          if test "${LLVM_CFLAGS}" != "" ; then
49733            LLVM_CFLAGS="${LLVM_CFLAGS} "
49734          fi
49735          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49736        fi
49737      fi
49738    done
49739    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49740    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49741
49742    unset LLVM_LDFLAGS
49743    for flag in $("${LLVM_CONFIG}" --ldflags); do
49744      if echo "${flag}" | grep -q '^-L'; then
49745        if test "${LLVM_LDFLAGS}" != ""; then
49746          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49747        fi
49748        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49749      fi
49750    done
49751
49752    unset LLVM_LIBS
49753    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49754      if echo "${flag}" | grep -q '^-l'; then
49755        if test "${LLVM_LIBS}" != ""; then
49756          LLVM_LIBS="${LLVM_LIBS} "
49757        fi
49758        LLVM_LIBS="${LLVM_LIBS}${flag}"
49759      fi
49760    done
49761
49762
49763
49764
49765  fi
49766
49767  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49768  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49769    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49770  fi
49771
49772  # TODO better (platform agnostic) test
49773  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49774    LIBCXX="-lstdc++"
49775  fi
49776
49777
49778
49779
49780  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49781
49782
49783# Check whether --with-msvcr-dll was given.
49784if test "${with_msvcr_dll+set}" = set; then :
49785  withval=$with_msvcr_dll;
49786fi
49787
49788
49789  if test "x$with_msvcr_dll" != x; then
49790    # If given explicitely by user, do not probe. If not present, fail directly.
49791
49792  DLL_NAME="$MSVCR_NAME"
49793  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49794  METHOD="--with-msvcr-dll"
49795  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49796    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49797$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49798
49799    # Need to check if the found msvcr is correct architecture
49800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49801$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49802    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49804      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49805      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49806      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49807        CORRECT_MSVCR_ARCH="PE32 executable"
49808      else
49809        CORRECT_MSVCR_ARCH="PE32+ executable"
49810      fi
49811    else
49812      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49813        CORRECT_MSVCR_ARCH=386
49814      else
49815        CORRECT_MSVCR_ARCH=x86-64
49816      fi
49817    fi
49818    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49819      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49820$as_echo "ok" >&6; }
49821      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49822
49823  # Only process if variable expands to non-empty
49824
49825  if test "x$MSVC_DLL" != x; then
49826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49827
49828  # Input might be given as Windows format, start by converting to
49829  # unix format.
49830  path="$MSVC_DLL"
49831  new_path=`$CYGPATH -u "$path"`
49832
49833  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49834  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49835  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49836  # "foo.exe" is OK but "foo" is an error.
49837  #
49838  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49839  # It is also a way to make sure we got the proper file name for the real test later on.
49840  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49841  if test "x$test_shortpath" = x; then
49842    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49843$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49844    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49845  fi
49846
49847  # Call helper function which possibly converts this using DOS-style short mode.
49848  # If so, the updated path is stored in $new_path.
49849
49850  input_path="$new_path"
49851  # Check if we need to convert this using DOS-style short mode. If the path
49852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49853  # take no chances and rewrite it.
49854  # Note: m4 eats our [], so we need to use [ and ] instead.
49855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49856  if test "x$has_forbidden_chars" != x; then
49857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49861      # Going to short mode and back again did indeed matter. Since short mode is
49862      # case insensitive, let's make it lowercase to improve readability.
49863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49864      # Now convert it back to Unix-style (cygpath)
49865      input_path=`$CYGPATH -u "$shortmode_path"`
49866      new_path="$input_path"
49867    fi
49868  fi
49869
49870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49871  if test "x$test_cygdrive_prefix" = x; then
49872    # As a simple fix, exclude /usr/bin since it's not a real path.
49873    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49875      # a path prefixed by /cygdrive for fixpath to work.
49876      new_path="$CYGWIN_ROOT_PATH$input_path"
49877    fi
49878  fi
49879
49880
49881  if test "x$path" != "x$new_path"; then
49882    MSVC_DLL="$new_path"
49883    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49884$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49885  fi
49886
49887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49888
49889  path="$MSVC_DLL"
49890  has_colon=`$ECHO $path | $GREP ^.:`
49891  new_path="$path"
49892  if test "x$has_colon" = x; then
49893    # Not in mixed or Windows style, start by that.
49894    new_path=`cmd //c echo $path`
49895  fi
49896
49897
49898  input_path="$new_path"
49899  # Check if we need to convert this using DOS-style short mode. If the path
49900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49901  # take no chances and rewrite it.
49902  # Note: m4 eats our [], so we need to use [ and ] instead.
49903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49904  if test "x$has_forbidden_chars" != x; then
49905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49906    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49907  fi
49908
49909
49910  windows_path="$new_path"
49911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49912    unix_path=`$CYGPATH -u "$windows_path"`
49913    new_path="$unix_path"
49914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49916    new_path="$unix_path"
49917  fi
49918
49919  if test "x$path" != "x$new_path"; then
49920    MSVC_DLL="$new_path"
49921    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49922$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49923  fi
49924
49925  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49926  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49927
49928    else
49929      # We're on a unix platform. Hooray! :)
49930      path="$MSVC_DLL"
49931      has_space=`$ECHO "$path" | $GREP " "`
49932      if test "x$has_space" != x; then
49933        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49934$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49935        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49936      fi
49937
49938      # Use eval to expand a potential ~
49939      eval path="$path"
49940      if test ! -f "$path" && test ! -d "$path"; then
49941        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49942      fi
49943
49944      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49945    fi
49946  fi
49947
49948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49949$as_echo_n "checking for $DLL_NAME... " >&6; }
49950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49951$as_echo "$MSVC_DLL" >&6; }
49952    else
49953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49954$as_echo "incorrect, ignoring" >&6; }
49955      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49956$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49957    fi
49958  fi
49959
49960    if test "x$MSVC_DLL" = x; then
49961      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49962    fi
49963    MSVCR_DLL="$MSVC_DLL"
49964  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49965
49966  DLL_NAME="$MSVCR_NAME"
49967  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49968  METHOD="devkit"
49969  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49971$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49972
49973    # Need to check if the found msvcr is correct architecture
49974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49975$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49976    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49978      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49979      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49980      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49981        CORRECT_MSVCR_ARCH="PE32 executable"
49982      else
49983        CORRECT_MSVCR_ARCH="PE32+ executable"
49984      fi
49985    else
49986      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49987        CORRECT_MSVCR_ARCH=386
49988      else
49989        CORRECT_MSVCR_ARCH=x86-64
49990      fi
49991    fi
49992    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49993      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49994$as_echo "ok" >&6; }
49995      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49996
49997  # Only process if variable expands to non-empty
49998
49999  if test "x$MSVC_DLL" != x; then
50000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50001
50002  # Input might be given as Windows format, start by converting to
50003  # unix format.
50004  path="$MSVC_DLL"
50005  new_path=`$CYGPATH -u "$path"`
50006
50007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50010  # "foo.exe" is OK but "foo" is an error.
50011  #
50012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50013  # It is also a way to make sure we got the proper file name for the real test later on.
50014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50015  if test "x$test_shortpath" = x; then
50016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50017$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50018    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50019  fi
50020
50021  # Call helper function which possibly converts this using DOS-style short mode.
50022  # If so, the updated path is stored in $new_path.
50023
50024  input_path="$new_path"
50025  # Check if we need to convert this using DOS-style short mode. If the path
50026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50027  # take no chances and rewrite it.
50028  # Note: m4 eats our [], so we need to use [ and ] instead.
50029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50030  if test "x$has_forbidden_chars" != x; then
50031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50035      # Going to short mode and back again did indeed matter. Since short mode is
50036      # case insensitive, let's make it lowercase to improve readability.
50037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50038      # Now convert it back to Unix-style (cygpath)
50039      input_path=`$CYGPATH -u "$shortmode_path"`
50040      new_path="$input_path"
50041    fi
50042  fi
50043
50044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50045  if test "x$test_cygdrive_prefix" = x; then
50046    # As a simple fix, exclude /usr/bin since it's not a real path.
50047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50049      # a path prefixed by /cygdrive for fixpath to work.
50050      new_path="$CYGWIN_ROOT_PATH$input_path"
50051    fi
50052  fi
50053
50054
50055  if test "x$path" != "x$new_path"; then
50056    MSVC_DLL="$new_path"
50057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50058$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50059  fi
50060
50061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50062
50063  path="$MSVC_DLL"
50064  has_colon=`$ECHO $path | $GREP ^.:`
50065  new_path="$path"
50066  if test "x$has_colon" = x; then
50067    # Not in mixed or Windows style, start by that.
50068    new_path=`cmd //c echo $path`
50069  fi
50070
50071
50072  input_path="$new_path"
50073  # Check if we need to convert this using DOS-style short mode. If the path
50074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50075  # take no chances and rewrite it.
50076  # Note: m4 eats our [], so we need to use [ and ] instead.
50077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50078  if test "x$has_forbidden_chars" != x; then
50079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50081  fi
50082
50083
50084  windows_path="$new_path"
50085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50086    unix_path=`$CYGPATH -u "$windows_path"`
50087    new_path="$unix_path"
50088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50090    new_path="$unix_path"
50091  fi
50092
50093  if test "x$path" != "x$new_path"; then
50094    MSVC_DLL="$new_path"
50095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50096$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50097  fi
50098
50099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50101
50102    else
50103      # We're on a unix platform. Hooray! :)
50104      path="$MSVC_DLL"
50105      has_space=`$ECHO "$path" | $GREP " "`
50106      if test "x$has_space" != x; then
50107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50108$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50110      fi
50111
50112      # Use eval to expand a potential ~
50113      eval path="$path"
50114      if test ! -f "$path" && test ! -d "$path"; then
50115        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50116      fi
50117
50118      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50119    fi
50120  fi
50121
50122      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50123$as_echo_n "checking for $DLL_NAME... " >&6; }
50124      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50125$as_echo "$MSVC_DLL" >&6; }
50126    else
50127      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50128$as_echo "incorrect, ignoring" >&6; }
50129      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50130$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50131    fi
50132  fi
50133
50134    if test "x$MSVC_DLL" = x; then
50135      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
50136    fi
50137    MSVCR_DLL="$MSVC_DLL"
50138  else
50139
50140  DLL_NAME="${MSVCR_NAME}"
50141  MSVC_DLL=
50142
50143  if test "x$MSVC_DLL" = x; then
50144    # Probe: Using well-known location from Visual Studio 10.0
50145    if test "x$VCINSTALLDIR" != x; then
50146      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50147
50148  windows_path="$CYGWIN_VC_INSTALL_DIR"
50149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50150    unix_path=`$CYGPATH -u "$windows_path"`
50151    CYGWIN_VC_INSTALL_DIR="$unix_path"
50152  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50153    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50154    CYGWIN_VC_INSTALL_DIR="$unix_path"
50155  fi
50156
50157      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50158        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50159      else
50160        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50161      fi
50162      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50163
50164  DLL_NAME="$DLL_NAME"
50165  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50166  METHOD="well-known location in VCINSTALLDIR"
50167  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50168    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50169$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50170
50171    # Need to check if the found msvcr is correct architecture
50172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50173$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50174    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50176      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50177      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50178      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50179        CORRECT_MSVCR_ARCH="PE32 executable"
50180      else
50181        CORRECT_MSVCR_ARCH="PE32+ executable"
50182      fi
50183    else
50184      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50185        CORRECT_MSVCR_ARCH=386
50186      else
50187        CORRECT_MSVCR_ARCH=x86-64
50188      fi
50189    fi
50190    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50191      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50192$as_echo "ok" >&6; }
50193      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50194
50195  # Only process if variable expands to non-empty
50196
50197  if test "x$MSVC_DLL" != x; then
50198    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50199
50200  # Input might be given as Windows format, start by converting to
50201  # unix format.
50202  path="$MSVC_DLL"
50203  new_path=`$CYGPATH -u "$path"`
50204
50205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50208  # "foo.exe" is OK but "foo" is an error.
50209  #
50210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50211  # It is also a way to make sure we got the proper file name for the real test later on.
50212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50213  if test "x$test_shortpath" = x; then
50214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50215$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50216    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50217  fi
50218
50219  # Call helper function which possibly converts this using DOS-style short mode.
50220  # If so, the updated path is stored in $new_path.
50221
50222  input_path="$new_path"
50223  # Check if we need to convert this using DOS-style short mode. If the path
50224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50225  # take no chances and rewrite it.
50226  # Note: m4 eats our [], so we need to use [ and ] instead.
50227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50228  if test "x$has_forbidden_chars" != x; then
50229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50233      # Going to short mode and back again did indeed matter. Since short mode is
50234      # case insensitive, let's make it lowercase to improve readability.
50235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50236      # Now convert it back to Unix-style (cygpath)
50237      input_path=`$CYGPATH -u "$shortmode_path"`
50238      new_path="$input_path"
50239    fi
50240  fi
50241
50242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50243  if test "x$test_cygdrive_prefix" = x; then
50244    # As a simple fix, exclude /usr/bin since it's not a real path.
50245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50247      # a path prefixed by /cygdrive for fixpath to work.
50248      new_path="$CYGWIN_ROOT_PATH$input_path"
50249    fi
50250  fi
50251
50252
50253  if test "x$path" != "x$new_path"; then
50254    MSVC_DLL="$new_path"
50255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50256$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50257  fi
50258
50259    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50260
50261  path="$MSVC_DLL"
50262  has_colon=`$ECHO $path | $GREP ^.:`
50263  new_path="$path"
50264  if test "x$has_colon" = x; then
50265    # Not in mixed or Windows style, start by that.
50266    new_path=`cmd //c echo $path`
50267  fi
50268
50269
50270  input_path="$new_path"
50271  # Check if we need to convert this using DOS-style short mode. If the path
50272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50273  # take no chances and rewrite it.
50274  # Note: m4 eats our [], so we need to use [ and ] instead.
50275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50276  if test "x$has_forbidden_chars" != x; then
50277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50279  fi
50280
50281
50282  windows_path="$new_path"
50283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50284    unix_path=`$CYGPATH -u "$windows_path"`
50285    new_path="$unix_path"
50286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50288    new_path="$unix_path"
50289  fi
50290
50291  if test "x$path" != "x$new_path"; then
50292    MSVC_DLL="$new_path"
50293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50294$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50295  fi
50296
50297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50299
50300    else
50301      # We're on a unix platform. Hooray! :)
50302      path="$MSVC_DLL"
50303      has_space=`$ECHO "$path" | $GREP " "`
50304      if test "x$has_space" != x; then
50305        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50306$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50307        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50308      fi
50309
50310      # Use eval to expand a potential ~
50311      eval path="$path"
50312      if test ! -f "$path" && test ! -d "$path"; then
50313        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50314      fi
50315
50316      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50317    fi
50318  fi
50319
50320      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50321$as_echo_n "checking for $DLL_NAME... " >&6; }
50322      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50323$as_echo "$MSVC_DLL" >&6; }
50324    else
50325      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50326$as_echo "incorrect, ignoring" >&6; }
50327      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50328$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50329    fi
50330  fi
50331
50332    fi
50333  fi
50334
50335  if test "x$MSVC_DLL" = x; then
50336    # Probe: Check in the Boot JDK directory.
50337    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50338
50339  DLL_NAME="$DLL_NAME"
50340  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50341  METHOD="well-known location in Boot JDK"
50342  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50343    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50344$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50345
50346    # Need to check if the found msvcr is correct architecture
50347    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50348$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50349    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50351      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50352      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50353      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50354        CORRECT_MSVCR_ARCH="PE32 executable"
50355      else
50356        CORRECT_MSVCR_ARCH="PE32+ executable"
50357      fi
50358    else
50359      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50360        CORRECT_MSVCR_ARCH=386
50361      else
50362        CORRECT_MSVCR_ARCH=x86-64
50363      fi
50364    fi
50365    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50367$as_echo "ok" >&6; }
50368      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50369
50370  # Only process if variable expands to non-empty
50371
50372  if test "x$MSVC_DLL" != x; then
50373    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50374
50375  # Input might be given as Windows format, start by converting to
50376  # unix format.
50377  path="$MSVC_DLL"
50378  new_path=`$CYGPATH -u "$path"`
50379
50380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50383  # "foo.exe" is OK but "foo" is an error.
50384  #
50385  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50386  # It is also a way to make sure we got the proper file name for the real test later on.
50387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50388  if test "x$test_shortpath" = x; then
50389    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50390$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50391    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50392  fi
50393
50394  # Call helper function which possibly converts this using DOS-style short mode.
50395  # If so, the updated path is stored in $new_path.
50396
50397  input_path="$new_path"
50398  # Check if we need to convert this using DOS-style short mode. If the path
50399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50400  # take no chances and rewrite it.
50401  # Note: m4 eats our [], so we need to use [ and ] instead.
50402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50403  if test "x$has_forbidden_chars" != x; then
50404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50408      # Going to short mode and back again did indeed matter. Since short mode is
50409      # case insensitive, let's make it lowercase to improve readability.
50410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50411      # Now convert it back to Unix-style (cygpath)
50412      input_path=`$CYGPATH -u "$shortmode_path"`
50413      new_path="$input_path"
50414    fi
50415  fi
50416
50417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50418  if test "x$test_cygdrive_prefix" = x; then
50419    # As a simple fix, exclude /usr/bin since it's not a real path.
50420    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50422      # a path prefixed by /cygdrive for fixpath to work.
50423      new_path="$CYGWIN_ROOT_PATH$input_path"
50424    fi
50425  fi
50426
50427
50428  if test "x$path" != "x$new_path"; then
50429    MSVC_DLL="$new_path"
50430    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50431$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50432  fi
50433
50434    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50435
50436  path="$MSVC_DLL"
50437  has_colon=`$ECHO $path | $GREP ^.:`
50438  new_path="$path"
50439  if test "x$has_colon" = x; then
50440    # Not in mixed or Windows style, start by that.
50441    new_path=`cmd //c echo $path`
50442  fi
50443
50444
50445  input_path="$new_path"
50446  # Check if we need to convert this using DOS-style short mode. If the path
50447  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50448  # take no chances and rewrite it.
50449  # Note: m4 eats our [], so we need to use [ and ] instead.
50450  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50451  if test "x$has_forbidden_chars" != x; then
50452    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50453    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50454  fi
50455
50456
50457  windows_path="$new_path"
50458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50459    unix_path=`$CYGPATH -u "$windows_path"`
50460    new_path="$unix_path"
50461  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50462    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50463    new_path="$unix_path"
50464  fi
50465
50466  if test "x$path" != "x$new_path"; then
50467    MSVC_DLL="$new_path"
50468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50469$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50470  fi
50471
50472  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50473  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50474
50475    else
50476      # We're on a unix platform. Hooray! :)
50477      path="$MSVC_DLL"
50478      has_space=`$ECHO "$path" | $GREP " "`
50479      if test "x$has_space" != x; then
50480        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50481$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50482        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50483      fi
50484
50485      # Use eval to expand a potential ~
50486      eval path="$path"
50487      if test ! -f "$path" && test ! -d "$path"; then
50488        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50489      fi
50490
50491      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50492    fi
50493  fi
50494
50495      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50496$as_echo_n "checking for $DLL_NAME... " >&6; }
50497      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50498$as_echo "$MSVC_DLL" >&6; }
50499    else
50500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50501$as_echo "incorrect, ignoring" >&6; }
50502      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50503$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50504    fi
50505  fi
50506
50507  fi
50508
50509  if test "x$MSVC_DLL" = x; then
50510    # Probe: Look in the Windows system32 directory
50511    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50512
50513  windows_path="$CYGWIN_SYSTEMROOT"
50514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50515    unix_path=`$CYGPATH -u "$windows_path"`
50516    CYGWIN_SYSTEMROOT="$unix_path"
50517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50519    CYGWIN_SYSTEMROOT="$unix_path"
50520  fi
50521
50522    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50523
50524  DLL_NAME="$DLL_NAME"
50525  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50526  METHOD="well-known location in SYSTEMROOT"
50527  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50528    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50529$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50530
50531    # Need to check if the found msvcr is correct architecture
50532    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50533$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50534    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50536      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50537      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50538      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50539        CORRECT_MSVCR_ARCH="PE32 executable"
50540      else
50541        CORRECT_MSVCR_ARCH="PE32+ executable"
50542      fi
50543    else
50544      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50545        CORRECT_MSVCR_ARCH=386
50546      else
50547        CORRECT_MSVCR_ARCH=x86-64
50548      fi
50549    fi
50550    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50551      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50552$as_echo "ok" >&6; }
50553      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50554
50555  # Only process if variable expands to non-empty
50556
50557  if test "x$MSVC_DLL" != x; then
50558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50559
50560  # Input might be given as Windows format, start by converting to
50561  # unix format.
50562  path="$MSVC_DLL"
50563  new_path=`$CYGPATH -u "$path"`
50564
50565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50568  # "foo.exe" is OK but "foo" is an error.
50569  #
50570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50571  # It is also a way to make sure we got the proper file name for the real test later on.
50572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50573  if test "x$test_shortpath" = x; then
50574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50575$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50576    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50577  fi
50578
50579  # Call helper function which possibly converts this using DOS-style short mode.
50580  # If so, the updated path is stored in $new_path.
50581
50582  input_path="$new_path"
50583  # Check if we need to convert this using DOS-style short mode. If the path
50584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50585  # take no chances and rewrite it.
50586  # Note: m4 eats our [], so we need to use [ and ] instead.
50587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50588  if test "x$has_forbidden_chars" != x; then
50589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50593      # Going to short mode and back again did indeed matter. Since short mode is
50594      # case insensitive, let's make it lowercase to improve readability.
50595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50596      # Now convert it back to Unix-style (cygpath)
50597      input_path=`$CYGPATH -u "$shortmode_path"`
50598      new_path="$input_path"
50599    fi
50600  fi
50601
50602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50603  if test "x$test_cygdrive_prefix" = x; then
50604    # As a simple fix, exclude /usr/bin since it's not a real path.
50605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50607      # a path prefixed by /cygdrive for fixpath to work.
50608      new_path="$CYGWIN_ROOT_PATH$input_path"
50609    fi
50610  fi
50611
50612
50613  if test "x$path" != "x$new_path"; then
50614    MSVC_DLL="$new_path"
50615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50616$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50617  fi
50618
50619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50620
50621  path="$MSVC_DLL"
50622  has_colon=`$ECHO $path | $GREP ^.:`
50623  new_path="$path"
50624  if test "x$has_colon" = x; then
50625    # Not in mixed or Windows style, start by that.
50626    new_path=`cmd //c echo $path`
50627  fi
50628
50629
50630  input_path="$new_path"
50631  # Check if we need to convert this using DOS-style short mode. If the path
50632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50633  # take no chances and rewrite it.
50634  # Note: m4 eats our [], so we need to use [ and ] instead.
50635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50636  if test "x$has_forbidden_chars" != x; then
50637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50639  fi
50640
50641
50642  windows_path="$new_path"
50643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50644    unix_path=`$CYGPATH -u "$windows_path"`
50645    new_path="$unix_path"
50646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50648    new_path="$unix_path"
50649  fi
50650
50651  if test "x$path" != "x$new_path"; then
50652    MSVC_DLL="$new_path"
50653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50654$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50655  fi
50656
50657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50659
50660    else
50661      # We're on a unix platform. Hooray! :)
50662      path="$MSVC_DLL"
50663      has_space=`$ECHO "$path" | $GREP " "`
50664      if test "x$has_space" != x; then
50665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50666$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50668      fi
50669
50670      # Use eval to expand a potential ~
50671      eval path="$path"
50672      if test ! -f "$path" && test ! -d "$path"; then
50673        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50674      fi
50675
50676      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50677    fi
50678  fi
50679
50680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50681$as_echo_n "checking for $DLL_NAME... " >&6; }
50682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50683$as_echo "$MSVC_DLL" >&6; }
50684    else
50685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50686$as_echo "incorrect, ignoring" >&6; }
50687      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50688$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50689    fi
50690  fi
50691
50692  fi
50693
50694  if test "x$MSVC_DLL" = x; then
50695    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50696    if test "x$VS100COMNTOOLS" != x; then
50697      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50698
50699  windows_path="$CYGWIN_VS_TOOLS_DIR"
50700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50701    unix_path=`$CYGPATH -u "$windows_path"`
50702    CYGWIN_VS_TOOLS_DIR="$unix_path"
50703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50705    CYGWIN_VS_TOOLS_DIR="$unix_path"
50706  fi
50707
50708      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50709        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50710	    | $GREP -i /x64/ | $HEAD --lines 1`
50711      else
50712        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50713	    | $GREP -i /x86/ | $HEAD --lines 1`
50714      fi
50715
50716  DLL_NAME="$DLL_NAME"
50717  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50718  METHOD="search of VS100COMNTOOLS"
50719  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50720    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50721$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50722
50723    # Need to check if the found msvcr is correct architecture
50724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50725$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50726    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50728      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50729      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50730      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50731        CORRECT_MSVCR_ARCH="PE32 executable"
50732      else
50733        CORRECT_MSVCR_ARCH="PE32+ executable"
50734      fi
50735    else
50736      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50737        CORRECT_MSVCR_ARCH=386
50738      else
50739        CORRECT_MSVCR_ARCH=x86-64
50740      fi
50741    fi
50742    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50744$as_echo "ok" >&6; }
50745      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50746
50747  # Only process if variable expands to non-empty
50748
50749  if test "x$MSVC_DLL" != x; then
50750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50751
50752  # Input might be given as Windows format, start by converting to
50753  # unix format.
50754  path="$MSVC_DLL"
50755  new_path=`$CYGPATH -u "$path"`
50756
50757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50760  # "foo.exe" is OK but "foo" is an error.
50761  #
50762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50763  # It is also a way to make sure we got the proper file name for the real test later on.
50764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50765  if test "x$test_shortpath" = x; then
50766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50767$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50768    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50769  fi
50770
50771  # Call helper function which possibly converts this using DOS-style short mode.
50772  # If so, the updated path is stored in $new_path.
50773
50774  input_path="$new_path"
50775  # Check if we need to convert this using DOS-style short mode. If the path
50776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50777  # take no chances and rewrite it.
50778  # Note: m4 eats our [], so we need to use [ and ] instead.
50779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50780  if test "x$has_forbidden_chars" != x; then
50781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50785      # Going to short mode and back again did indeed matter. Since short mode is
50786      # case insensitive, let's make it lowercase to improve readability.
50787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50788      # Now convert it back to Unix-style (cygpath)
50789      input_path=`$CYGPATH -u "$shortmode_path"`
50790      new_path="$input_path"
50791    fi
50792  fi
50793
50794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50795  if test "x$test_cygdrive_prefix" = x; then
50796    # As a simple fix, exclude /usr/bin since it's not a real path.
50797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50799      # a path prefixed by /cygdrive for fixpath to work.
50800      new_path="$CYGWIN_ROOT_PATH$input_path"
50801    fi
50802  fi
50803
50804
50805  if test "x$path" != "x$new_path"; then
50806    MSVC_DLL="$new_path"
50807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50808$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50809  fi
50810
50811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50812
50813  path="$MSVC_DLL"
50814  has_colon=`$ECHO $path | $GREP ^.:`
50815  new_path="$path"
50816  if test "x$has_colon" = x; then
50817    # Not in mixed or Windows style, start by that.
50818    new_path=`cmd //c echo $path`
50819  fi
50820
50821
50822  input_path="$new_path"
50823  # Check if we need to convert this using DOS-style short mode. If the path
50824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50825  # take no chances and rewrite it.
50826  # Note: m4 eats our [], so we need to use [ and ] instead.
50827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50828  if test "x$has_forbidden_chars" != x; then
50829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50831  fi
50832
50833
50834  windows_path="$new_path"
50835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50836    unix_path=`$CYGPATH -u "$windows_path"`
50837    new_path="$unix_path"
50838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50840    new_path="$unix_path"
50841  fi
50842
50843  if test "x$path" != "x$new_path"; then
50844    MSVC_DLL="$new_path"
50845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50847  fi
50848
50849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50851
50852    else
50853      # We're on a unix platform. Hooray! :)
50854      path="$MSVC_DLL"
50855      has_space=`$ECHO "$path" | $GREP " "`
50856      if test "x$has_space" != x; then
50857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50858$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50860      fi
50861
50862      # Use eval to expand a potential ~
50863      eval path="$path"
50864      if test ! -f "$path" && test ! -d "$path"; then
50865        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50866      fi
50867
50868      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50869    fi
50870  fi
50871
50872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50873$as_echo_n "checking for $DLL_NAME... " >&6; }
50874      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50875$as_echo "$MSVC_DLL" >&6; }
50876    else
50877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50878$as_echo "incorrect, ignoring" >&6; }
50879      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50880$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50881    fi
50882  fi
50883
50884    fi
50885  fi
50886
50887  if test "x$MSVC_DLL" = x; then
50888    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50889    # (This was the original behaviour; kept since it might turn something up)
50890    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50891      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50892        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50893	    | $GREP x64 | $HEAD --lines 1`
50894      else
50895        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50896	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50897        if test "x$POSSIBLE_MSVC_DLL" = x; then
50898          # We're grasping at straws now...
50899          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50900	      | $HEAD --lines 1`
50901        fi
50902      fi
50903
50904
50905  DLL_NAME="$DLL_NAME"
50906  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50907  METHOD="search of VCINSTALLDIR"
50908  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50909    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50910$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50911
50912    # Need to check if the found msvcr is correct architecture
50913    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50914$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50915    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50916    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50917      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50918      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50919      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50920        CORRECT_MSVCR_ARCH="PE32 executable"
50921      else
50922        CORRECT_MSVCR_ARCH="PE32+ executable"
50923      fi
50924    else
50925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50926        CORRECT_MSVCR_ARCH=386
50927      else
50928        CORRECT_MSVCR_ARCH=x86-64
50929      fi
50930    fi
50931    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50932      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50933$as_echo "ok" >&6; }
50934      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50935
50936  # Only process if variable expands to non-empty
50937
50938  if test "x$MSVC_DLL" != x; then
50939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50940
50941  # Input might be given as Windows format, start by converting to
50942  # unix format.
50943  path="$MSVC_DLL"
50944  new_path=`$CYGPATH -u "$path"`
50945
50946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50949  # "foo.exe" is OK but "foo" is an error.
50950  #
50951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50952  # It is also a way to make sure we got the proper file name for the real test later on.
50953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50954  if test "x$test_shortpath" = x; then
50955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50956$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50957    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50958  fi
50959
50960  # Call helper function which possibly converts this using DOS-style short mode.
50961  # If so, the updated path is stored in $new_path.
50962
50963  input_path="$new_path"
50964  # Check if we need to convert this using DOS-style short mode. If the path
50965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50966  # take no chances and rewrite it.
50967  # Note: m4 eats our [], so we need to use [ and ] instead.
50968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50969  if test "x$has_forbidden_chars" != x; then
50970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50974      # Going to short mode and back again did indeed matter. Since short mode is
50975      # case insensitive, let's make it lowercase to improve readability.
50976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50977      # Now convert it back to Unix-style (cygpath)
50978      input_path=`$CYGPATH -u "$shortmode_path"`
50979      new_path="$input_path"
50980    fi
50981  fi
50982
50983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50984  if test "x$test_cygdrive_prefix" = x; then
50985    # As a simple fix, exclude /usr/bin since it's not a real path.
50986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50988      # a path prefixed by /cygdrive for fixpath to work.
50989      new_path="$CYGWIN_ROOT_PATH$input_path"
50990    fi
50991  fi
50992
50993
50994  if test "x$path" != "x$new_path"; then
50995    MSVC_DLL="$new_path"
50996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50997$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50998  fi
50999
51000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51001
51002  path="$MSVC_DLL"
51003  has_colon=`$ECHO $path | $GREP ^.:`
51004  new_path="$path"
51005  if test "x$has_colon" = x; then
51006    # Not in mixed or Windows style, start by that.
51007    new_path=`cmd //c echo $path`
51008  fi
51009
51010
51011  input_path="$new_path"
51012  # Check if we need to convert this using DOS-style short mode. If the path
51013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51014  # take no chances and rewrite it.
51015  # Note: m4 eats our [], so we need to use [ and ] instead.
51016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51017  if test "x$has_forbidden_chars" != x; then
51018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51020  fi
51021
51022
51023  windows_path="$new_path"
51024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51025    unix_path=`$CYGPATH -u "$windows_path"`
51026    new_path="$unix_path"
51027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51029    new_path="$unix_path"
51030  fi
51031
51032  if test "x$path" != "x$new_path"; then
51033    MSVC_DLL="$new_path"
51034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51035$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51036  fi
51037
51038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51040
51041    else
51042      # We're on a unix platform. Hooray! :)
51043      path="$MSVC_DLL"
51044      has_space=`$ECHO "$path" | $GREP " "`
51045      if test "x$has_space" != x; then
51046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51047$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51049      fi
51050
51051      # Use eval to expand a potential ~
51052      eval path="$path"
51053      if test ! -f "$path" && test ! -d "$path"; then
51054        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51055      fi
51056
51057      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51058    fi
51059  fi
51060
51061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51062$as_echo_n "checking for $DLL_NAME... " >&6; }
51063      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51064$as_echo "$MSVC_DLL" >&6; }
51065    else
51066      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51067$as_echo "incorrect, ignoring" >&6; }
51068      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51069$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51070    fi
51071  fi
51072
51073    fi
51074  fi
51075
51076  if test "x$MSVC_DLL" = x; then
51077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51078$as_echo_n "checking for $DLL_NAME... " >&6; }
51079    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51080$as_echo "no" >&6; }
51081    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
51082  fi
51083
51084    MSVCR_DLL="$MSVC_DLL"
51085  fi
51086
51087
51088
51089# Check whether --with-msvcp-dll was given.
51090if test "${with_msvcp_dll+set}" = set; then :
51091  withval=$with_msvcp_dll;
51092fi
51093
51094
51095  if test "x$MSVCP_NAME" != "x"; then
51096    if test "x$with_msvcp_dll" != x; then
51097      # If given explicitely by user, do not probe. If not present, fail directly.
51098
51099  DLL_NAME="$MSVCP_NAME"
51100  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
51101  METHOD="--with-msvcp-dll"
51102  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51103    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51104$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51105
51106    # Need to check if the found msvcr is correct architecture
51107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51108$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51109    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51110    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51111      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51112      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51113      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51114        CORRECT_MSVCR_ARCH="PE32 executable"
51115      else
51116        CORRECT_MSVCR_ARCH="PE32+ executable"
51117      fi
51118    else
51119      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51120        CORRECT_MSVCR_ARCH=386
51121      else
51122        CORRECT_MSVCR_ARCH=x86-64
51123      fi
51124    fi
51125    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51126      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51127$as_echo "ok" >&6; }
51128      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51129
51130  # Only process if variable expands to non-empty
51131
51132  if test "x$MSVC_DLL" != x; then
51133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51134
51135  # Input might be given as Windows format, start by converting to
51136  # unix format.
51137  path="$MSVC_DLL"
51138  new_path=`$CYGPATH -u "$path"`
51139
51140  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51141  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51142  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51143  # "foo.exe" is OK but "foo" is an error.
51144  #
51145  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51146  # It is also a way to make sure we got the proper file name for the real test later on.
51147  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51148  if test "x$test_shortpath" = x; then
51149    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51150$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51151    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51152  fi
51153
51154  # Call helper function which possibly converts this using DOS-style short mode.
51155  # If so, the updated path is stored in $new_path.
51156
51157  input_path="$new_path"
51158  # Check if we need to convert this using DOS-style short mode. If the path
51159  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51160  # take no chances and rewrite it.
51161  # Note: m4 eats our [], so we need to use [ and ] instead.
51162  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51163  if test "x$has_forbidden_chars" != x; then
51164    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51165    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51166    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51167    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51168      # Going to short mode and back again did indeed matter. Since short mode is
51169      # case insensitive, let's make it lowercase to improve readability.
51170      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51171      # Now convert it back to Unix-style (cygpath)
51172      input_path=`$CYGPATH -u "$shortmode_path"`
51173      new_path="$input_path"
51174    fi
51175  fi
51176
51177  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51178  if test "x$test_cygdrive_prefix" = x; then
51179    # As a simple fix, exclude /usr/bin since it's not a real path.
51180    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51181      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51182      # a path prefixed by /cygdrive for fixpath to work.
51183      new_path="$CYGWIN_ROOT_PATH$input_path"
51184    fi
51185  fi
51186
51187
51188  if test "x$path" != "x$new_path"; then
51189    MSVC_DLL="$new_path"
51190    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51191$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51192  fi
51193
51194    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51195
51196  path="$MSVC_DLL"
51197  has_colon=`$ECHO $path | $GREP ^.:`
51198  new_path="$path"
51199  if test "x$has_colon" = x; then
51200    # Not in mixed or Windows style, start by that.
51201    new_path=`cmd //c echo $path`
51202  fi
51203
51204
51205  input_path="$new_path"
51206  # Check if we need to convert this using DOS-style short mode. If the path
51207  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51208  # take no chances and rewrite it.
51209  # Note: m4 eats our [], so we need to use [ and ] instead.
51210  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51211  if test "x$has_forbidden_chars" != x; then
51212    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51213    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51214  fi
51215
51216
51217  windows_path="$new_path"
51218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51219    unix_path=`$CYGPATH -u "$windows_path"`
51220    new_path="$unix_path"
51221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51223    new_path="$unix_path"
51224  fi
51225
51226  if test "x$path" != "x$new_path"; then
51227    MSVC_DLL="$new_path"
51228    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51229$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51230  fi
51231
51232  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51233  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51234
51235    else
51236      # We're on a unix platform. Hooray! :)
51237      path="$MSVC_DLL"
51238      has_space=`$ECHO "$path" | $GREP " "`
51239      if test "x$has_space" != x; then
51240        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51241$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51242        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51243      fi
51244
51245      # Use eval to expand a potential ~
51246      eval path="$path"
51247      if test ! -f "$path" && test ! -d "$path"; then
51248        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51249      fi
51250
51251      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51252    fi
51253  fi
51254
51255      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51256$as_echo_n "checking for $DLL_NAME... " >&6; }
51257      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51258$as_echo "$MSVC_DLL" >&6; }
51259    else
51260      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51261$as_echo "incorrect, ignoring" >&6; }
51262      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51263$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51264    fi
51265  fi
51266
51267      if test "x$MSVC_DLL" = x; then
51268        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
51269      fi
51270      MSVCP_DLL="$MSVC_DLL"
51271    elif test "x$DEVKIT_MSVCP_DLL" != x; then
51272
51273  DLL_NAME="$MSVCP_NAME"
51274  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
51275  METHOD="devkit"
51276  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51277    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51278$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51279
51280    # Need to check if the found msvcr is correct architecture
51281    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51282$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51283    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51284    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51285      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51286      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51287      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51288        CORRECT_MSVCR_ARCH="PE32 executable"
51289      else
51290        CORRECT_MSVCR_ARCH="PE32+ executable"
51291      fi
51292    else
51293      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51294        CORRECT_MSVCR_ARCH=386
51295      else
51296        CORRECT_MSVCR_ARCH=x86-64
51297      fi
51298    fi
51299    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51300      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51301$as_echo "ok" >&6; }
51302      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51303
51304  # Only process if variable expands to non-empty
51305
51306  if test "x$MSVC_DLL" != x; then
51307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51308
51309  # Input might be given as Windows format, start by converting to
51310  # unix format.
51311  path="$MSVC_DLL"
51312  new_path=`$CYGPATH -u "$path"`
51313
51314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51317  # "foo.exe" is OK but "foo" is an error.
51318  #
51319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51320  # It is also a way to make sure we got the proper file name for the real test later on.
51321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51322  if test "x$test_shortpath" = x; then
51323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51324$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51325    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51326  fi
51327
51328  # Call helper function which possibly converts this using DOS-style short mode.
51329  # If so, the updated path is stored in $new_path.
51330
51331  input_path="$new_path"
51332  # Check if we need to convert this using DOS-style short mode. If the path
51333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51334  # take no chances and rewrite it.
51335  # Note: m4 eats our [], so we need to use [ and ] instead.
51336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51337  if test "x$has_forbidden_chars" != x; then
51338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51342      # Going to short mode and back again did indeed matter. Since short mode is
51343      # case insensitive, let's make it lowercase to improve readability.
51344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51345      # Now convert it back to Unix-style (cygpath)
51346      input_path=`$CYGPATH -u "$shortmode_path"`
51347      new_path="$input_path"
51348    fi
51349  fi
51350
51351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51352  if test "x$test_cygdrive_prefix" = x; then
51353    # As a simple fix, exclude /usr/bin since it's not a real path.
51354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51356      # a path prefixed by /cygdrive for fixpath to work.
51357      new_path="$CYGWIN_ROOT_PATH$input_path"
51358    fi
51359  fi
51360
51361
51362  if test "x$path" != "x$new_path"; then
51363    MSVC_DLL="$new_path"
51364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51365$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51366  fi
51367
51368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51369
51370  path="$MSVC_DLL"
51371  has_colon=`$ECHO $path | $GREP ^.:`
51372  new_path="$path"
51373  if test "x$has_colon" = x; then
51374    # Not in mixed or Windows style, start by that.
51375    new_path=`cmd //c echo $path`
51376  fi
51377
51378
51379  input_path="$new_path"
51380  # Check if we need to convert this using DOS-style short mode. If the path
51381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51382  # take no chances and rewrite it.
51383  # Note: m4 eats our [], so we need to use [ and ] instead.
51384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51385  if test "x$has_forbidden_chars" != x; then
51386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51388  fi
51389
51390
51391  windows_path="$new_path"
51392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51393    unix_path=`$CYGPATH -u "$windows_path"`
51394    new_path="$unix_path"
51395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51397    new_path="$unix_path"
51398  fi
51399
51400  if test "x$path" != "x$new_path"; then
51401    MSVC_DLL="$new_path"
51402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51403$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51404  fi
51405
51406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51408
51409    else
51410      # We're on a unix platform. Hooray! :)
51411      path="$MSVC_DLL"
51412      has_space=`$ECHO "$path" | $GREP " "`
51413      if test "x$has_space" != x; then
51414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51415$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51417      fi
51418
51419      # Use eval to expand a potential ~
51420      eval path="$path"
51421      if test ! -f "$path" && test ! -d "$path"; then
51422        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51423      fi
51424
51425      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51426    fi
51427  fi
51428
51429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51430$as_echo_n "checking for $DLL_NAME... " >&6; }
51431      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51432$as_echo "$MSVC_DLL" >&6; }
51433    else
51434      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51435$as_echo "incorrect, ignoring" >&6; }
51436      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51437$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51438    fi
51439  fi
51440
51441      if test "x$MSVC_DLL" = x; then
51442        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51443      fi
51444      MSVCP_DLL="$MSVC_DLL"
51445    else
51446
51447  DLL_NAME="${MSVCP_NAME}"
51448  MSVC_DLL=
51449
51450  if test "x$MSVC_DLL" = x; then
51451    # Probe: Using well-known location from Visual Studio 10.0
51452    if test "x$VCINSTALLDIR" != x; then
51453      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51454
51455  windows_path="$CYGWIN_VC_INSTALL_DIR"
51456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51457    unix_path=`$CYGPATH -u "$windows_path"`
51458    CYGWIN_VC_INSTALL_DIR="$unix_path"
51459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51461    CYGWIN_VC_INSTALL_DIR="$unix_path"
51462  fi
51463
51464      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51465        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51466      else
51467        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51468      fi
51469      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51470
51471  DLL_NAME="$DLL_NAME"
51472  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51473  METHOD="well-known location in VCINSTALLDIR"
51474  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51476$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51477
51478    # Need to check if the found msvcr is correct architecture
51479    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51480$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51481    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51482    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51483      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51484      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51485      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51486        CORRECT_MSVCR_ARCH="PE32 executable"
51487      else
51488        CORRECT_MSVCR_ARCH="PE32+ executable"
51489      fi
51490    else
51491      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51492        CORRECT_MSVCR_ARCH=386
51493      else
51494        CORRECT_MSVCR_ARCH=x86-64
51495      fi
51496    fi
51497    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51498      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51499$as_echo "ok" >&6; }
51500      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51501
51502  # Only process if variable expands to non-empty
51503
51504  if test "x$MSVC_DLL" != x; then
51505    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51506
51507  # Input might be given as Windows format, start by converting to
51508  # unix format.
51509  path="$MSVC_DLL"
51510  new_path=`$CYGPATH -u "$path"`
51511
51512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51515  # "foo.exe" is OK but "foo" is an error.
51516  #
51517  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51518  # It is also a way to make sure we got the proper file name for the real test later on.
51519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51520  if test "x$test_shortpath" = x; then
51521    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51522$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51523    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51524  fi
51525
51526  # Call helper function which possibly converts this using DOS-style short mode.
51527  # If so, the updated path is stored in $new_path.
51528
51529  input_path="$new_path"
51530  # Check if we need to convert this using DOS-style short mode. If the path
51531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51532  # take no chances and rewrite it.
51533  # Note: m4 eats our [], so we need to use [ and ] instead.
51534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51535  if test "x$has_forbidden_chars" != x; then
51536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51540      # Going to short mode and back again did indeed matter. Since short mode is
51541      # case insensitive, let's make it lowercase to improve readability.
51542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51543      # Now convert it back to Unix-style (cygpath)
51544      input_path=`$CYGPATH -u "$shortmode_path"`
51545      new_path="$input_path"
51546    fi
51547  fi
51548
51549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51550  if test "x$test_cygdrive_prefix" = x; then
51551    # As a simple fix, exclude /usr/bin since it's not a real path.
51552    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51554      # a path prefixed by /cygdrive for fixpath to work.
51555      new_path="$CYGWIN_ROOT_PATH$input_path"
51556    fi
51557  fi
51558
51559
51560  if test "x$path" != "x$new_path"; then
51561    MSVC_DLL="$new_path"
51562    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51563$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51564  fi
51565
51566    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51567
51568  path="$MSVC_DLL"
51569  has_colon=`$ECHO $path | $GREP ^.:`
51570  new_path="$path"
51571  if test "x$has_colon" = x; then
51572    # Not in mixed or Windows style, start by that.
51573    new_path=`cmd //c echo $path`
51574  fi
51575
51576
51577  input_path="$new_path"
51578  # Check if we need to convert this using DOS-style short mode. If the path
51579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51580  # take no chances and rewrite it.
51581  # Note: m4 eats our [], so we need to use [ and ] instead.
51582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51583  if test "x$has_forbidden_chars" != x; then
51584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51586  fi
51587
51588
51589  windows_path="$new_path"
51590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51591    unix_path=`$CYGPATH -u "$windows_path"`
51592    new_path="$unix_path"
51593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51594    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51595    new_path="$unix_path"
51596  fi
51597
51598  if test "x$path" != "x$new_path"; then
51599    MSVC_DLL="$new_path"
51600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51601$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51602  fi
51603
51604  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51605  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51606
51607    else
51608      # We're on a unix platform. Hooray! :)
51609      path="$MSVC_DLL"
51610      has_space=`$ECHO "$path" | $GREP " "`
51611      if test "x$has_space" != x; then
51612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51613$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51614        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51615      fi
51616
51617      # Use eval to expand a potential ~
51618      eval path="$path"
51619      if test ! -f "$path" && test ! -d "$path"; then
51620        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51621      fi
51622
51623      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51624    fi
51625  fi
51626
51627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51628$as_echo_n "checking for $DLL_NAME... " >&6; }
51629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51630$as_echo "$MSVC_DLL" >&6; }
51631    else
51632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51633$as_echo "incorrect, ignoring" >&6; }
51634      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51635$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51636    fi
51637  fi
51638
51639    fi
51640  fi
51641
51642  if test "x$MSVC_DLL" = x; then
51643    # Probe: Check in the Boot JDK directory.
51644    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51645
51646  DLL_NAME="$DLL_NAME"
51647  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51648  METHOD="well-known location in Boot JDK"
51649  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51650    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51651$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51652
51653    # Need to check if the found msvcr is correct architecture
51654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51655$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51656    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51657    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51658      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51659      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51660      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51661        CORRECT_MSVCR_ARCH="PE32 executable"
51662      else
51663        CORRECT_MSVCR_ARCH="PE32+ executable"
51664      fi
51665    else
51666      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51667        CORRECT_MSVCR_ARCH=386
51668      else
51669        CORRECT_MSVCR_ARCH=x86-64
51670      fi
51671    fi
51672    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51673      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51674$as_echo "ok" >&6; }
51675      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51676
51677  # Only process if variable expands to non-empty
51678
51679  if test "x$MSVC_DLL" != x; then
51680    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51681
51682  # Input might be given as Windows format, start by converting to
51683  # unix format.
51684  path="$MSVC_DLL"
51685  new_path=`$CYGPATH -u "$path"`
51686
51687  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51688  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51689  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51690  # "foo.exe" is OK but "foo" is an error.
51691  #
51692  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51693  # It is also a way to make sure we got the proper file name for the real test later on.
51694  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51695  if test "x$test_shortpath" = x; then
51696    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51697$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51698    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51699  fi
51700
51701  # Call helper function which possibly converts this using DOS-style short mode.
51702  # If so, the updated path is stored in $new_path.
51703
51704  input_path="$new_path"
51705  # Check if we need to convert this using DOS-style short mode. If the path
51706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51707  # take no chances and rewrite it.
51708  # Note: m4 eats our [], so we need to use [ and ] instead.
51709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51710  if test "x$has_forbidden_chars" != x; then
51711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51712    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51713    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51714    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51715      # Going to short mode and back again did indeed matter. Since short mode is
51716      # case insensitive, let's make it lowercase to improve readability.
51717      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51718      # Now convert it back to Unix-style (cygpath)
51719      input_path=`$CYGPATH -u "$shortmode_path"`
51720      new_path="$input_path"
51721    fi
51722  fi
51723
51724  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51725  if test "x$test_cygdrive_prefix" = x; then
51726    # As a simple fix, exclude /usr/bin since it's not a real path.
51727    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51728      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51729      # a path prefixed by /cygdrive for fixpath to work.
51730      new_path="$CYGWIN_ROOT_PATH$input_path"
51731    fi
51732  fi
51733
51734
51735  if test "x$path" != "x$new_path"; then
51736    MSVC_DLL="$new_path"
51737    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51738$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51739  fi
51740
51741    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51742
51743  path="$MSVC_DLL"
51744  has_colon=`$ECHO $path | $GREP ^.:`
51745  new_path="$path"
51746  if test "x$has_colon" = x; then
51747    # Not in mixed or Windows style, start by that.
51748    new_path=`cmd //c echo $path`
51749  fi
51750
51751
51752  input_path="$new_path"
51753  # Check if we need to convert this using DOS-style short mode. If the path
51754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51755  # take no chances and rewrite it.
51756  # Note: m4 eats our [], so we need to use [ and ] instead.
51757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51758  if test "x$has_forbidden_chars" != x; then
51759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51760    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51761  fi
51762
51763
51764  windows_path="$new_path"
51765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51766    unix_path=`$CYGPATH -u "$windows_path"`
51767    new_path="$unix_path"
51768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51770    new_path="$unix_path"
51771  fi
51772
51773  if test "x$path" != "x$new_path"; then
51774    MSVC_DLL="$new_path"
51775    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51776$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51777  fi
51778
51779  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51780  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51781
51782    else
51783      # We're on a unix platform. Hooray! :)
51784      path="$MSVC_DLL"
51785      has_space=`$ECHO "$path" | $GREP " "`
51786      if test "x$has_space" != x; then
51787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51788$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51789        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51790      fi
51791
51792      # Use eval to expand a potential ~
51793      eval path="$path"
51794      if test ! -f "$path" && test ! -d "$path"; then
51795        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51796      fi
51797
51798      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51799    fi
51800  fi
51801
51802      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51803$as_echo_n "checking for $DLL_NAME... " >&6; }
51804      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51805$as_echo "$MSVC_DLL" >&6; }
51806    else
51807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51808$as_echo "incorrect, ignoring" >&6; }
51809      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51810$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51811    fi
51812  fi
51813
51814  fi
51815
51816  if test "x$MSVC_DLL" = x; then
51817    # Probe: Look in the Windows system32 directory
51818    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51819
51820  windows_path="$CYGWIN_SYSTEMROOT"
51821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51822    unix_path=`$CYGPATH -u "$windows_path"`
51823    CYGWIN_SYSTEMROOT="$unix_path"
51824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51826    CYGWIN_SYSTEMROOT="$unix_path"
51827  fi
51828
51829    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51830
51831  DLL_NAME="$DLL_NAME"
51832  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51833  METHOD="well-known location in SYSTEMROOT"
51834  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51835    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51836$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51837
51838    # Need to check if the found msvcr is correct architecture
51839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51840$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51841    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51842    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51843      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51844      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51845      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51846        CORRECT_MSVCR_ARCH="PE32 executable"
51847      else
51848        CORRECT_MSVCR_ARCH="PE32+ executable"
51849      fi
51850    else
51851      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51852        CORRECT_MSVCR_ARCH=386
51853      else
51854        CORRECT_MSVCR_ARCH=x86-64
51855      fi
51856    fi
51857    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51858      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51859$as_echo "ok" >&6; }
51860      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51861
51862  # Only process if variable expands to non-empty
51863
51864  if test "x$MSVC_DLL" != x; then
51865    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51866
51867  # Input might be given as Windows format, start by converting to
51868  # unix format.
51869  path="$MSVC_DLL"
51870  new_path=`$CYGPATH -u "$path"`
51871
51872  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51873  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51874  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51875  # "foo.exe" is OK but "foo" is an error.
51876  #
51877  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51878  # It is also a way to make sure we got the proper file name for the real test later on.
51879  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51880  if test "x$test_shortpath" = x; then
51881    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51882$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51883    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51884  fi
51885
51886  # Call helper function which possibly converts this using DOS-style short mode.
51887  # If so, the updated path is stored in $new_path.
51888
51889  input_path="$new_path"
51890  # Check if we need to convert this using DOS-style short mode. If the path
51891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51892  # take no chances and rewrite it.
51893  # Note: m4 eats our [], so we need to use [ and ] instead.
51894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51895  if test "x$has_forbidden_chars" != x; then
51896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51900      # Going to short mode and back again did indeed matter. Since short mode is
51901      # case insensitive, let's make it lowercase to improve readability.
51902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51903      # Now convert it back to Unix-style (cygpath)
51904      input_path=`$CYGPATH -u "$shortmode_path"`
51905      new_path="$input_path"
51906    fi
51907  fi
51908
51909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51910  if test "x$test_cygdrive_prefix" = x; then
51911    # As a simple fix, exclude /usr/bin since it's not a real path.
51912    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51914      # a path prefixed by /cygdrive for fixpath to work.
51915      new_path="$CYGWIN_ROOT_PATH$input_path"
51916    fi
51917  fi
51918
51919
51920  if test "x$path" != "x$new_path"; then
51921    MSVC_DLL="$new_path"
51922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51923$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51924  fi
51925
51926    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51927
51928  path="$MSVC_DLL"
51929  has_colon=`$ECHO $path | $GREP ^.:`
51930  new_path="$path"
51931  if test "x$has_colon" = x; then
51932    # Not in mixed or Windows style, start by that.
51933    new_path=`cmd //c echo $path`
51934  fi
51935
51936
51937  input_path="$new_path"
51938  # Check if we need to convert this using DOS-style short mode. If the path
51939  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51940  # take no chances and rewrite it.
51941  # Note: m4 eats our [], so we need to use [ and ] instead.
51942  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51943  if test "x$has_forbidden_chars" != x; then
51944    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51945    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51946  fi
51947
51948
51949  windows_path="$new_path"
51950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51951    unix_path=`$CYGPATH -u "$windows_path"`
51952    new_path="$unix_path"
51953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51955    new_path="$unix_path"
51956  fi
51957
51958  if test "x$path" != "x$new_path"; then
51959    MSVC_DLL="$new_path"
51960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51961$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51962  fi
51963
51964  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51965  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51966
51967    else
51968      # We're on a unix platform. Hooray! :)
51969      path="$MSVC_DLL"
51970      has_space=`$ECHO "$path" | $GREP " "`
51971      if test "x$has_space" != x; then
51972        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51973$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51974        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51975      fi
51976
51977      # Use eval to expand a potential ~
51978      eval path="$path"
51979      if test ! -f "$path" && test ! -d "$path"; then
51980        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51981      fi
51982
51983      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51984    fi
51985  fi
51986
51987      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51988$as_echo_n "checking for $DLL_NAME... " >&6; }
51989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51990$as_echo "$MSVC_DLL" >&6; }
51991    else
51992      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51993$as_echo "incorrect, ignoring" >&6; }
51994      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51995$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51996    fi
51997  fi
51998
51999  fi
52000
52001  if test "x$MSVC_DLL" = x; then
52002    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
52003    if test "x$VS100COMNTOOLS" != x; then
52004      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
52005
52006  windows_path="$CYGWIN_VS_TOOLS_DIR"
52007  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52008    unix_path=`$CYGPATH -u "$windows_path"`
52009    CYGWIN_VS_TOOLS_DIR="$unix_path"
52010  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52011    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52012    CYGWIN_VS_TOOLS_DIR="$unix_path"
52013  fi
52014
52015      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52016        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52017	    | $GREP -i /x64/ | $HEAD --lines 1`
52018      else
52019        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
52020	    | $GREP -i /x86/ | $HEAD --lines 1`
52021      fi
52022
52023  DLL_NAME="$DLL_NAME"
52024  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52025  METHOD="search of VS100COMNTOOLS"
52026  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52027    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52028$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52029
52030    # Need to check if the found msvcr is correct architecture
52031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52032$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52033    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52034    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52035      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52036      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52037      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52038        CORRECT_MSVCR_ARCH="PE32 executable"
52039      else
52040        CORRECT_MSVCR_ARCH="PE32+ executable"
52041      fi
52042    else
52043      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52044        CORRECT_MSVCR_ARCH=386
52045      else
52046        CORRECT_MSVCR_ARCH=x86-64
52047      fi
52048    fi
52049    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52051$as_echo "ok" >&6; }
52052      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52053
52054  # Only process if variable expands to non-empty
52055
52056  if test "x$MSVC_DLL" != x; then
52057    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52058
52059  # Input might be given as Windows format, start by converting to
52060  # unix format.
52061  path="$MSVC_DLL"
52062  new_path=`$CYGPATH -u "$path"`
52063
52064  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52065  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52066  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52067  # "foo.exe" is OK but "foo" is an error.
52068  #
52069  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52070  # It is also a way to make sure we got the proper file name for the real test later on.
52071  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52072  if test "x$test_shortpath" = x; then
52073    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52074$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52075    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52076  fi
52077
52078  # Call helper function which possibly converts this using DOS-style short mode.
52079  # If so, the updated path is stored in $new_path.
52080
52081  input_path="$new_path"
52082  # Check if we need to convert this using DOS-style short mode. If the path
52083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52084  # take no chances and rewrite it.
52085  # Note: m4 eats our [], so we need to use [ and ] instead.
52086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52087  if test "x$has_forbidden_chars" != x; then
52088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52089    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52090    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52091    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52092      # Going to short mode and back again did indeed matter. Since short mode is
52093      # case insensitive, let's make it lowercase to improve readability.
52094      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52095      # Now convert it back to Unix-style (cygpath)
52096      input_path=`$CYGPATH -u "$shortmode_path"`
52097      new_path="$input_path"
52098    fi
52099  fi
52100
52101  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52102  if test "x$test_cygdrive_prefix" = x; then
52103    # As a simple fix, exclude /usr/bin since it's not a real path.
52104    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52105      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52106      # a path prefixed by /cygdrive for fixpath to work.
52107      new_path="$CYGWIN_ROOT_PATH$input_path"
52108    fi
52109  fi
52110
52111
52112  if test "x$path" != "x$new_path"; then
52113    MSVC_DLL="$new_path"
52114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52115$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52116  fi
52117
52118    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52119
52120  path="$MSVC_DLL"
52121  has_colon=`$ECHO $path | $GREP ^.:`
52122  new_path="$path"
52123  if test "x$has_colon" = x; then
52124    # Not in mixed or Windows style, start by that.
52125    new_path=`cmd //c echo $path`
52126  fi
52127
52128
52129  input_path="$new_path"
52130  # Check if we need to convert this using DOS-style short mode. If the path
52131  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52132  # take no chances and rewrite it.
52133  # Note: m4 eats our [], so we need to use [ and ] instead.
52134  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52135  if test "x$has_forbidden_chars" != x; then
52136    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52137    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52138  fi
52139
52140
52141  windows_path="$new_path"
52142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52143    unix_path=`$CYGPATH -u "$windows_path"`
52144    new_path="$unix_path"
52145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52147    new_path="$unix_path"
52148  fi
52149
52150  if test "x$path" != "x$new_path"; then
52151    MSVC_DLL="$new_path"
52152    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52153$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52154  fi
52155
52156  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52157  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52158
52159    else
52160      # We're on a unix platform. Hooray! :)
52161      path="$MSVC_DLL"
52162      has_space=`$ECHO "$path" | $GREP " "`
52163      if test "x$has_space" != x; then
52164        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52165$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52166        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52167      fi
52168
52169      # Use eval to expand a potential ~
52170      eval path="$path"
52171      if test ! -f "$path" && test ! -d "$path"; then
52172        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52173      fi
52174
52175      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52176    fi
52177  fi
52178
52179      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52180$as_echo_n "checking for $DLL_NAME... " >&6; }
52181      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52182$as_echo "$MSVC_DLL" >&6; }
52183    else
52184      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52185$as_echo "incorrect, ignoring" >&6; }
52186      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52187$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52188    fi
52189  fi
52190
52191    fi
52192  fi
52193
52194  if test "x$MSVC_DLL" = x; then
52195    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
52196    # (This was the original behaviour; kept since it might turn something up)
52197    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
52198      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52199        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52200	    | $GREP x64 | $HEAD --lines 1`
52201      else
52202        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52203	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
52204        if test "x$POSSIBLE_MSVC_DLL" = x; then
52205          # We're grasping at straws now...
52206          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
52207	      | $HEAD --lines 1`
52208        fi
52209      fi
52210
52211
52212  DLL_NAME="$DLL_NAME"
52213  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
52214  METHOD="search of VCINSTALLDIR"
52215  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
52216    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
52217$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
52218
52219    # Need to check if the found msvcr is correct architecture
52220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
52221$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
52222    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
52223    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52224      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
52225      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
52226      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52227        CORRECT_MSVCR_ARCH="PE32 executable"
52228      else
52229        CORRECT_MSVCR_ARCH="PE32+ executable"
52230      fi
52231    else
52232      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
52233        CORRECT_MSVCR_ARCH=386
52234      else
52235        CORRECT_MSVCR_ARCH=x86-64
52236      fi
52237    fi
52238    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
52239      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
52240$as_echo "ok" >&6; }
52241      MSVC_DLL="$POSSIBLE_MSVC_DLL"
52242
52243  # Only process if variable expands to non-empty
52244
52245  if test "x$MSVC_DLL" != x; then
52246    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52247
52248  # Input might be given as Windows format, start by converting to
52249  # unix format.
52250  path="$MSVC_DLL"
52251  new_path=`$CYGPATH -u "$path"`
52252
52253  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
52254  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
52255  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
52256  # "foo.exe" is OK but "foo" is an error.
52257  #
52258  # This test is therefore slightly more accurate than "test -f" to check for file precense.
52259  # It is also a way to make sure we got the proper file name for the real test later on.
52260  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
52261  if test "x$test_shortpath" = x; then
52262    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52263$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52264    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
52265  fi
52266
52267  # Call helper function which possibly converts this using DOS-style short mode.
52268  # If so, the updated path is stored in $new_path.
52269
52270  input_path="$new_path"
52271  # Check if we need to convert this using DOS-style short mode. If the path
52272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52273  # take no chances and rewrite it.
52274  # Note: m4 eats our [], so we need to use [ and ] instead.
52275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
52276  if test "x$has_forbidden_chars" != x; then
52277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52278    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
52279    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
52280    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
52281      # Going to short mode and back again did indeed matter. Since short mode is
52282      # case insensitive, let's make it lowercase to improve readability.
52283      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52284      # Now convert it back to Unix-style (cygpath)
52285      input_path=`$CYGPATH -u "$shortmode_path"`
52286      new_path="$input_path"
52287    fi
52288  fi
52289
52290  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52291  if test "x$test_cygdrive_prefix" = x; then
52292    # As a simple fix, exclude /usr/bin since it's not a real path.
52293    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52294      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52295      # a path prefixed by /cygdrive for fixpath to work.
52296      new_path="$CYGWIN_ROOT_PATH$input_path"
52297    fi
52298  fi
52299
52300
52301  if test "x$path" != "x$new_path"; then
52302    MSVC_DLL="$new_path"
52303    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52304$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52305  fi
52306
52307    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52308
52309  path="$MSVC_DLL"
52310  has_colon=`$ECHO $path | $GREP ^.:`
52311  new_path="$path"
52312  if test "x$has_colon" = x; then
52313    # Not in mixed or Windows style, start by that.
52314    new_path=`cmd //c echo $path`
52315  fi
52316
52317
52318  input_path="$new_path"
52319  # Check if we need to convert this using DOS-style short mode. If the path
52320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52321  # take no chances and rewrite it.
52322  # Note: m4 eats our [], so we need to use [ and ] instead.
52323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52324  if test "x$has_forbidden_chars" != x; then
52325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52326    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52327  fi
52328
52329
52330  windows_path="$new_path"
52331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52332    unix_path=`$CYGPATH -u "$windows_path"`
52333    new_path="$unix_path"
52334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52336    new_path="$unix_path"
52337  fi
52338
52339  if test "x$path" != "x$new_path"; then
52340    MSVC_DLL="$new_path"
52341    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52342$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52343  fi
52344
52345  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52346  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52347
52348    else
52349      # We're on a unix platform. Hooray! :)
52350      path="$MSVC_DLL"
52351      has_space=`$ECHO "$path" | $GREP " "`
52352      if test "x$has_space" != x; then
52353        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52354$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52355        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52356      fi
52357
52358      # Use eval to expand a potential ~
52359      eval path="$path"
52360      if test ! -f "$path" && test ! -d "$path"; then
52361        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52362      fi
52363
52364      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52365    fi
52366  fi
52367
52368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52369$as_echo_n "checking for $DLL_NAME... " >&6; }
52370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52371$as_echo "$MSVC_DLL" >&6; }
52372    else
52373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52374$as_echo "incorrect, ignoring" >&6; }
52375      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52376$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52377    fi
52378  fi
52379
52380    fi
52381  fi
52382
52383  if test "x$MSVC_DLL" = x; then
52384    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52385$as_echo_n "checking for $DLL_NAME... " >&6; }
52386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52387$as_echo "no" >&6; }
52388    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52389  fi
52390
52391      MSVCP_DLL="$MSVC_DLL"
52392    fi
52393
52394  fi
52395
52396
52397
52398# Check whether --with-dxsdk was given.
52399if test "${with_dxsdk+set}" = set; then :
52400  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52401$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52402fi
52403
52404
52405
52406
52407# Check whether --with-dxsdk-lib was given.
52408if test "${with_dxsdk_lib+set}" = set; then :
52409  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52410$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52411fi
52412
52413
52414
52415
52416# Check whether --with-dxsdk-include was given.
52417if test "${with_dxsdk_include+set}" = set; then :
52418  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52419$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52420fi
52421
52422
52423  fi
52424
52425
52426###############################################################################
52427#
52428# We need to do some final tweaking, when everything else is done.
52429#
52430###############################################################################
52431
52432
52433  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52434
52435
52436  # The name of the Service Agent jar.
52437  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52438  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52439    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52440  fi
52441
52442
52443
52444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52445$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52446
52447    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52448      ENABLE_INTREE_EC=yes
52449      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52450$as_echo "yes" >&6; }
52451    else
52452      ENABLE_INTREE_EC=no
52453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52454$as_echo "no" >&6; }
52455    fi
52456
52457
52458
52459
52460###############################################################################
52461#
52462# Configure parts of the build that only affect the build performance,
52463# not the result.
52464#
52465###############################################################################
52466
52467
52468  # How many cores do we have on this build system?
52469
52470# Check whether --with-num-cores was given.
52471if test "${with_num_cores+set}" = set; then :
52472  withval=$with_num_cores;
52473fi
52474
52475  if test "x$with_num_cores" = x; then
52476    # The number of cores were not specified, try to probe them.
52477
52478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52479$as_echo_n "checking for number of cores... " >&6; }
52480  NUM_CORES=1
52481  FOUND_CORES=no
52482
52483  if test -f /proc/cpuinfo; then
52484    # Looks like a Linux (or cygwin) system
52485    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52486    FOUND_CORES=yes
52487  elif test -x /usr/sbin/psrinfo; then
52488    # Looks like a Solaris system
52489    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52490    FOUND_CORES=yes
52491  elif test -x /usr/sbin/system_profiler; then
52492    # Looks like a MacOSX system
52493    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52494    FOUND_CORES=yes
52495  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52496    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52497    FOUND_CORES=yes
52498  elif test -n "$NUMBER_OF_PROCESSORS"; then
52499    # On windows, look in the env
52500    NUM_CORES=$NUMBER_OF_PROCESSORS
52501    FOUND_CORES=yes
52502  fi
52503
52504  if test "x$FOUND_CORES" = xyes; then
52505    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52506$as_echo "$NUM_CORES" >&6; }
52507  else
52508    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52509$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52511$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52512  fi
52513
52514  else
52515    NUM_CORES=$with_num_cores
52516  fi
52517
52518
52519
52520  # How much memory do we have on this build system?
52521
52522# Check whether --with-memory-size was given.
52523if test "${with_memory_size+set}" = set; then :
52524  withval=$with_memory_size;
52525fi
52526
52527  if test "x$with_memory_size" = x; then
52528    # The memory size was not specified, try to probe it.
52529
52530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52531$as_echo_n "checking for memory size... " >&6; }
52532  # Default to 1024 MB
52533  MEMORY_SIZE=1024
52534  FOUND_MEM=no
52535
52536  if test -f /proc/meminfo; then
52537    # Looks like a Linux (or cygwin) system
52538    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52539    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52540    FOUND_MEM=yes
52541  elif test -x /usr/sbin/prtconf; then
52542    # Looks like a Solaris or AIX system
52543    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52544    FOUND_MEM=yes
52545  elif test -x /usr/sbin/system_profiler; then
52546    # Looks like a MacOSX system
52547    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52548    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52549    FOUND_MEM=yes
52550  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52551    # Windows, but without cygwin
52552    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52553    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52554    FOUND_MEM=yes
52555  fi
52556
52557  if test "x$FOUND_MEM" = xyes; then
52558    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52559$as_echo "$MEMORY_SIZE MB" >&6; }
52560  else
52561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52562$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52563    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52564$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52565  fi
52566
52567  else
52568    MEMORY_SIZE=$with_memory_size
52569  fi
52570
52571
52572
52573  # Provide a decent default number of parallel jobs for make depending on
52574  # number of cores, amount of memory and machine architecture.
52575
52576# Check whether --with-jobs was given.
52577if test "${with_jobs+set}" = set; then :
52578  withval=$with_jobs;
52579fi
52580
52581  if test "x$with_jobs" = x; then
52582    # Number of jobs was not specified, calculate.
52583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52584$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52585    # Approximate memory in GB.
52586    memory_gb=`expr $MEMORY_SIZE / 1024`
52587    # Pick the lowest of memory in gb and number of cores.
52588    if test "$memory_gb" -lt "$NUM_CORES"; then
52589      JOBS="$memory_gb"
52590    else
52591      JOBS="$NUM_CORES"
52592      # On bigger machines, leave some room for other processes to run
52593      if test "$JOBS" -gt "4"; then
52594        JOBS=`expr $JOBS '*' 90 / 100`
52595      fi
52596    fi
52597    # Cap number of jobs to 16
52598    if test "$JOBS" -gt "16"; then
52599      JOBS=16
52600    fi
52601    if test "$JOBS" -eq "0"; then
52602      JOBS=1
52603    fi
52604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52605$as_echo "$JOBS" >&6; }
52606  else
52607    JOBS=$with_jobs
52608  fi
52609
52610
52611
52612# Setup arguments for the boot jdk (after cores and memory have been setup)
52613
52614  ##############################################################################
52615  #
52616  # Specify jvm options for anything that is run with the Boot JDK.
52617  # Not all JVM:s accept the same arguments on the command line.
52618  #
52619
52620# Check whether --with-boot-jdk-jvmargs was given.
52621if test "${with_boot_jdk_jvmargs+set}" = set; then :
52622  withval=$with_boot_jdk_jvmargs;
52623fi
52624
52625
52626  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52627$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52628
52629  # Disable special log output when a debug build is used as Boot JDK...
52630
52631  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52632  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52633  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52634  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52635  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52636  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52637    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52638    JVM_ARG_OK=true
52639  else
52640    $ECHO "Arg failed:" >&5
52641    $ECHO "$OUTPUT" >&5
52642    JVM_ARG_OK=false
52643  fi
52644
52645
52646  # Apply user provided options.
52647
52648  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52649  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52650  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52651  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52652  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52653  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52654    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52655    JVM_ARG_OK=true
52656  else
52657    $ECHO "Arg failed:" >&5
52658    $ECHO "$OUTPUT" >&5
52659    JVM_ARG_OK=false
52660  fi
52661
52662
52663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52664$as_echo "$boot_jdk_jvmargs" >&6; }
52665
52666  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52667  JAVA_FLAGS=$boot_jdk_jvmargs
52668
52669
52670
52671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52672$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52673
52674  # Starting amount of heap memory.
52675
52676  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52677  $ECHO "Command: $JAVA -Xms64M -version" >&5
52678  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52679  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52680  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52681  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52682    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52683    JVM_ARG_OK=true
52684  else
52685    $ECHO "Arg failed:" >&5
52686    $ECHO "$OUTPUT" >&5
52687    JVM_ARG_OK=false
52688  fi
52689
52690
52691  # Maximum amount of heap memory.
52692  # Maximum stack size.
52693  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52694  if test "x$BUILD_NUM_BITS" = x32; then
52695    if test "$JVM_MAX_HEAP" -gt "1100"; then
52696      JVM_MAX_HEAP=1100
52697    elif test "$JVM_MAX_HEAP" -lt "512"; then
52698      JVM_MAX_HEAP=512
52699    fi
52700    STACK_SIZE=768
52701  else
52702    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52703    # pointers are used. Apparently, we need to increase the heap and stack
52704    # space for the jvm. More specifically, when running javac to build huge
52705    # jdk batch
52706    if test "$JVM_MAX_HEAP" -gt "1600"; then
52707      JVM_MAX_HEAP=1600
52708    elif test "$JVM_MAX_HEAP" -lt "512"; then
52709      JVM_MAX_HEAP=512
52710    fi
52711    STACK_SIZE=1536
52712  fi
52713
52714  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52715  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52716  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52717  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52718  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52719  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52720    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52721    JVM_ARG_OK=true
52722  else
52723    $ECHO "Arg failed:" >&5
52724    $ECHO "$OUTPUT" >&5
52725    JVM_ARG_OK=false
52726  fi
52727
52728
52729  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52730  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52731  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52732  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52733  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52734  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52735    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52736    JVM_ARG_OK=true
52737  else
52738    $ECHO "Arg failed:" >&5
52739    $ECHO "$OUTPUT" >&5
52740    JVM_ARG_OK=false
52741  fi
52742
52743
52744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52745$as_echo "$boot_jdk_jvmargs_big" >&6; }
52746
52747  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52748
52749
52750
52751  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52752$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52753
52754  # Use serial gc for small short lived tools if possible
52755
52756  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52757  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52758  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52759  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52760  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52761  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52762    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52763    JVM_ARG_OK=true
52764  else
52765    $ECHO "Arg failed:" >&5
52766    $ECHO "$OUTPUT" >&5
52767    JVM_ARG_OK=false
52768  fi
52769
52770
52771  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52772  $ECHO "Command: $JAVA -Xms32M -version" >&5
52773  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52774  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52775  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52776  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52777    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52778    JVM_ARG_OK=true
52779  else
52780    $ECHO "Arg failed:" >&5
52781    $ECHO "$OUTPUT" >&5
52782    JVM_ARG_OK=false
52783  fi
52784
52785
52786  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52787  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52788  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52789  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52790  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52791  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52792    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52793    JVM_ARG_OK=true
52794  else
52795    $ECHO "Arg failed:" >&5
52796    $ECHO "$OUTPUT" >&5
52797    JVM_ARG_OK=false
52798  fi
52799
52800
52801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52802$as_echo "$boot_jdk_jvmargs_small" >&6; }
52803
52804  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52805
52806
52807  JAVA_TOOL_FLAGS_SMALL=""
52808  for f in $JAVA_FLAGS_SMALL; do
52809    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52810  done
52811
52812
52813
52814# Setup smart javac (after cores and memory have been setup)
52815
52816
52817# Check whether --with-sjavac-server-java was given.
52818if test "${with_sjavac_server_java+set}" = set; then :
52819  withval=$with_sjavac_server_java;
52820fi
52821
52822
52823  if test "x$with_sjavac_server_java" != x; then
52824    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52825    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52826    if test "x$FOUND_VERSION" = x; then
52827      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52828    fi
52829  else
52830    SJAVAC_SERVER_JAVA="$JAVA"
52831  fi
52832
52833
52834  if test "$MEMORY_SIZE" -gt "3000"; then
52835
52836  $ECHO "Check if jvm arg is ok: -d64" >&5
52837  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52838  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52839  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52840  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52841  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52842    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52843    JVM_ARG_OK=true
52844  else
52845    $ECHO "Arg failed:" >&5
52846    $ECHO "$OUTPUT" >&5
52847    JVM_ARG_OK=false
52848  fi
52849
52850    if test "$JVM_ARG_OK" = true; then
52851      JVM_64BIT=true
52852      JVM_ARG_OK=false
52853    fi
52854  fi
52855
52856  MX_VALUE=`expr $MEMORY_SIZE / 2`
52857  if test "$JVM_64BIT" = true; then
52858    # Set ms lower than mx since more than one instance of the server might
52859    # get launched at the same time before they figure out which instance won.
52860    MS_VALUE=512
52861    if test "$MX_VALUE" -gt "2048"; then
52862      MX_VALUE=2048
52863    fi
52864  else
52865    MS_VALUE=256
52866    if test "$MX_VALUE" -gt "1500"; then
52867      MX_VALUE=1500
52868    fi
52869  fi
52870  if test "$MX_VALUE" -lt "512"; then
52871    MX_VALUE=512
52872  fi
52873
52874  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52875  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52876  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52877  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52878  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52879  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52880    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52881    JVM_ARG_OK=true
52882  else
52883    $ECHO "Arg failed:" >&5
52884    $ECHO "$OUTPUT" >&5
52885    JVM_ARG_OK=false
52886  fi
52887
52888
52889
52890  # Check whether --enable-sjavac was given.
52891if test "${enable_sjavac+set}" = set; then :
52892  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52893else
52894  ENABLE_SJAVAC='no'
52895fi
52896
52897  if test "x$JVM_ARG_OK" = "xfalse"; then
52898    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52899$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52900    ENABLE_SJAVAC=no;
52901  fi
52902  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52903$as_echo_n "checking whether to use sjavac... " >&6; }
52904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52905$as_echo "$ENABLE_SJAVAC" >&6; }
52906
52907
52908
52909# Can the C/C++ compiler use precompiled headers?
52910
52911
52912  ###############################################################################
52913  #
52914  # Can the C/C++ compiler use precompiled headers?
52915  #
52916  # Check whether --enable-precompiled-headers was given.
52917if test "${enable_precompiled_headers+set}" = set; then :
52918  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52919else
52920  ENABLE_PRECOMPH=yes
52921fi
52922
52923
52924  USE_PRECOMPILED_HEADER=1
52925  if test "x$ENABLE_PRECOMPH" = xno; then
52926    USE_PRECOMPILED_HEADER=0
52927  fi
52928
52929  if test "x$ENABLE_PRECOMPH" = xyes; then
52930    # Check that the compiler actually supports precomp headers.
52931    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52932      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52933$as_echo_n "checking that precompiled headers work... " >&6; }
52934      echo "int alfa();" > conftest.h
52935      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52936      if test ! -f conftest.hpp.gch; then
52937        USE_PRECOMPILED_HEADER=0
52938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52939$as_echo "no" >&6; }
52940      else
52941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52942$as_echo "yes" >&6; }
52943      fi
52944      rm -f conftest.h conftest.hpp.gch
52945    fi
52946  fi
52947
52948
52949
52950
52951# Setup use of ccache, if available
52952
52953  # Check whether --enable-ccache was given.
52954if test "${enable_ccache+set}" = set; then :
52955  enableval=$enable_ccache;
52956fi
52957
52958
52959  CCACHE=
52960  CCACHE_STATUS=
52961  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52962$as_echo_n "checking is ccache enabled... " >&6; }
52963  if test "x$enable_ccache" = xyes; then
52964    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52966$as_echo "yes" >&6; }
52967      OLD_PATH="$PATH"
52968      if test "x$TOOLCHAIN_PATH" != x; then
52969        PATH=$TOOLCHAIN_PATH:$PATH
52970      fi
52971
52972
52973
52974  # Publish this variable in the help.
52975
52976
52977  if test "x$CCACHE" = x; then
52978    # The variable is not set by user, try to locate tool using the code snippet
52979    for ac_prog in ccache
52980do
52981  # Extract the first word of "$ac_prog", so it can be a program name with args.
52982set dummy $ac_prog; ac_word=$2
52983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52984$as_echo_n "checking for $ac_word... " >&6; }
52985if ${ac_cv_path_CCACHE+:} false; then :
52986  $as_echo_n "(cached) " >&6
52987else
52988  case $CCACHE in
52989  [\\/]* | ?:[\\/]*)
52990  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52991  ;;
52992  *)
52993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52994for as_dir in $PATH
52995do
52996  IFS=$as_save_IFS
52997  test -z "$as_dir" && as_dir=.
52998    for ac_exec_ext in '' $ac_executable_extensions; do
52999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53000    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53002    break 2
53003  fi
53004done
53005  done
53006IFS=$as_save_IFS
53007
53008  ;;
53009esac
53010fi
53011CCACHE=$ac_cv_path_CCACHE
53012if test -n "$CCACHE"; then
53013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53014$as_echo "$CCACHE" >&6; }
53015else
53016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53017$as_echo "no" >&6; }
53018fi
53019
53020
53021  test -n "$CCACHE" && break
53022done
53023
53024  else
53025    # The variable is set, but is it from the command line or the environment?
53026
53027    # Try to remove the string !CCACHE! from our list.
53028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
53029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
53030      # If it failed, the variable was not from the command line. Ignore it,
53031      # but warn the user (except for BASH, which is always set by the calling BASH).
53032      if test "xCCACHE" != xBASH; then
53033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
53034$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
53035      fi
53036      # Try to locate tool using the code snippet
53037      for ac_prog in ccache
53038do
53039  # Extract the first word of "$ac_prog", so it can be a program name with args.
53040set dummy $ac_prog; ac_word=$2
53041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53042$as_echo_n "checking for $ac_word... " >&6; }
53043if ${ac_cv_path_CCACHE+:} false; then :
53044  $as_echo_n "(cached) " >&6
53045else
53046  case $CCACHE in
53047  [\\/]* | ?:[\\/]*)
53048  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53049  ;;
53050  *)
53051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53052for as_dir in $PATH
53053do
53054  IFS=$as_save_IFS
53055  test -z "$as_dir" && as_dir=.
53056    for ac_exec_ext in '' $ac_executable_extensions; do
53057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53058    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53060    break 2
53061  fi
53062done
53063  done
53064IFS=$as_save_IFS
53065
53066  ;;
53067esac
53068fi
53069CCACHE=$ac_cv_path_CCACHE
53070if test -n "$CCACHE"; then
53071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53072$as_echo "$CCACHE" >&6; }
53073else
53074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53075$as_echo "no" >&6; }
53076fi
53077
53078
53079  test -n "$CCACHE" && break
53080done
53081
53082    else
53083      # If it succeeded, then it was overridden by the user. We will use it
53084      # for the tool.
53085
53086      # First remove it from the list of overridden variables, so we can test
53087      # for unknown variables in the end.
53088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
53089
53090      # Check if the provided tool contains a complete path.
53091      tool_specified="$CCACHE"
53092      tool_basename="${tool_specified##*/}"
53093      if test "x$tool_basename" = "x$tool_specified"; then
53094        # A command without a complete path is provided, search $PATH.
53095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
53096$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
53097        # Extract the first word of "$tool_basename", so it can be a program name with args.
53098set dummy $tool_basename; ac_word=$2
53099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
53100$as_echo_n "checking for $ac_word... " >&6; }
53101if ${ac_cv_path_CCACHE+:} false; then :
53102  $as_echo_n "(cached) " >&6
53103else
53104  case $CCACHE in
53105  [\\/]* | ?:[\\/]*)
53106  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
53107  ;;
53108  *)
53109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53110for as_dir in $PATH
53111do
53112  IFS=$as_save_IFS
53113  test -z "$as_dir" && as_dir=.
53114    for ac_exec_ext in '' $ac_executable_extensions; do
53115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
53116    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
53117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
53118    break 2
53119  fi
53120done
53121  done
53122IFS=$as_save_IFS
53123
53124  ;;
53125esac
53126fi
53127CCACHE=$ac_cv_path_CCACHE
53128if test -n "$CCACHE"; then
53129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
53130$as_echo "$CCACHE" >&6; }
53131else
53132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53133$as_echo "no" >&6; }
53134fi
53135
53136
53137        if test "x$CCACHE" = x; then
53138          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
53139        fi
53140      else
53141        # Otherwise we believe it is a complete path. Use it as it is.
53142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
53143$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
53144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
53145$as_echo_n "checking for CCACHE... " >&6; }
53146        if test ! -x "$tool_specified"; then
53147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
53148$as_echo "not found" >&6; }
53149          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
53150        fi
53151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
53152$as_echo "$tool_specified" >&6; }
53153      fi
53154    fi
53155  fi
53156
53157
53158
53159  if test "x$CCACHE" = x; then
53160    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
53161  fi
53162
53163
53164      PATH="$OLD_PATH"
53165      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
53166      CCACHE_STATUS="Active ($CCACHE_VERSION)"
53167    else
53168      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53169$as_echo "no" >&6; }
53170      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
53171$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
53172    fi
53173  elif test "x$enable_ccache" = xno; then
53174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
53175$as_echo "no, explicitly disabled" >&6; }
53176    CCACHE_STATUS="Disabled"
53177  elif test "x$enable_ccache" = x; then
53178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53179$as_echo "no" >&6; }
53180  else
53181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
53182$as_echo "unknown" >&6; }
53183    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
53184  fi
53185
53186
53187
53188# Check whether --with-ccache-dir was given.
53189if test "${with_ccache_dir+set}" = set; then :
53190  withval=$with_ccache_dir;
53191fi
53192
53193
53194  if test "x$with_ccache_dir" != x; then
53195    # When using a non home ccache directory, assume the use is to share ccache files
53196    # with other users. Thus change the umask.
53197    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
53198    if test "x$CCACHE" = x; then
53199      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
53200$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
53201    fi
53202  fi
53203
53204  if test "x$CCACHE" != x; then
53205
53206  if test "x$CCACHE" != x; then
53207    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
53208      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
53209          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
53210      if test "x$HAS_BAD_CCACHE" != "x"; then
53211        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
53212      fi
53213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
53214$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
53215      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
53216      PUSHED_FLAGS="$CXXFLAGS"
53217      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
53218      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53219/* end confdefs.h.  */
53220
53221int
53222main ()
53223{
53224
53225  ;
53226  return 0;
53227}
53228_ACEOF
53229if ac_fn_cxx_try_compile "$LINENO"; then :
53230  CC_KNOWS_CCACHE_TRICK=yes
53231else
53232  CC_KNOWS_CCACHE_TRICK=no
53233fi
53234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53235      CXXFLAGS="$PUSHED_FLAGS"
53236      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
53237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53238$as_echo "yes" >&6; }
53239        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
53240
53241        CCACHE_SLOPPINESS=pch_defines,time_macros
53242      else
53243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53244$as_echo "no" >&6; }
53245        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
53246      fi
53247    fi
53248
53249    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
53250        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
53251
53252    if test "x$SET_CCACHE_DIR" != x; then
53253      mkdir -p $CCACHE_DIR > /dev/null 2>&1
53254      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
53255    fi
53256  fi
53257
53258  fi
53259
53260
53261###############################################################################
53262#
53263# And now the finish...
53264#
53265###############################################################################
53266
53267# Check for some common pitfalls
53268
53269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53270    file_to_test="$SRC_ROOT/LICENSE"
53271    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
53272      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
53273    fi
53274  fi
53275
53276
53277  # Did user specify any unknown variables?
53278
53279  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
53280    # Replace the separating ! with spaces before presenting for end user.
53281    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
53282    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
53283$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
53284  fi
53285
53286
53287  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
53288$as_echo_n "checking if build directory is on local disk... " >&6; }
53289
53290  # df -l lists only local disks; if the given directory is not found then
53291  # a non-zero exit code is given
53292  if test "x$DF" = x; then
53293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53294      # msys does not have df; use Windows "net use" instead.
53295      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53296      if test "x$IS_NETWORK_DISK" = x; then
53297        OUTPUT_DIR_IS_LOCAL="yes"
53298      else
53299        OUTPUT_DIR_IS_LOCAL="no"
53300      fi
53301    else
53302      # No df here, say it's local
53303      OUTPUT_DIR_IS_LOCAL="yes"
53304    fi
53305  else
53306    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53307      OUTPUT_DIR_IS_LOCAL="yes"
53308    else
53309      OUTPUT_DIR_IS_LOCAL="no"
53310    fi
53311  fi
53312
53313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53314$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53315
53316
53317
53318  # Check if the user has any old-style ALT_ variables set.
53319  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53320
53321  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53322  # Since we can't properly handle the dependencies for this, warn the user about the situation
53323  if test -e $OUTPUT_ROOT/spec.gmk; then
53324    IS_RECONFIGURE=yes
53325  else
53326    IS_RECONFIGURE=no
53327  fi
53328
53329
53330# At the end, call the custom hook. (Dummy macro if no custom sources available)
53331
53332
53333# We're messing a bit with internal autoconf variables to put the config.status
53334# in the output directory instead of the current directory.
53335CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53336
53337# Create the actual output files. Now the main work of configure is done.
53338cat >confcache <<\_ACEOF
53339# This file is a shell script that caches the results of configure
53340# tests run on this system so they can be shared between configure
53341# scripts and configure runs, see configure's option --config-cache.
53342# It is not useful on other systems.  If it contains results you don't
53343# want to keep, you may remove or edit it.
53344#
53345# config.status only pays attention to the cache file if you give it
53346# the --recheck option to rerun configure.
53347#
53348# `ac_cv_env_foo' variables (set or unset) will be overridden when
53349# loading this file, other *unset* `ac_cv_foo' will be assigned the
53350# following values.
53351
53352_ACEOF
53353
53354# The following way of writing the cache mishandles newlines in values,
53355# but we know of no workaround that is simple, portable, and efficient.
53356# So, we kill variables containing newlines.
53357# Ultrix sh set writes to stderr and can't be redirected directly,
53358# and sets the high bit in the cache file unless we assign to the vars.
53359(
53360  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53361    eval ac_val=\$$ac_var
53362    case $ac_val in #(
53363    *${as_nl}*)
53364      case $ac_var in #(
53365      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53366$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53367      esac
53368      case $ac_var in #(
53369      _ | IFS | as_nl) ;; #(
53370      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53371      *) { eval $ac_var=; unset $ac_var;} ;;
53372      esac ;;
53373    esac
53374  done
53375
53376  (set) 2>&1 |
53377    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53378    *${as_nl}ac_space=\ *)
53379      # `set' does not quote correctly, so add quotes: double-quote
53380      # substitution turns \\\\ into \\, and sed turns \\ into \.
53381      sed -n \
53382	"s/'/'\\\\''/g;
53383	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53384      ;; #(
53385    *)
53386      # `set' quotes correctly as required by POSIX, so do not add quotes.
53387      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53388      ;;
53389    esac |
53390    sort
53391) |
53392  sed '
53393     /^ac_cv_env_/b end
53394     t clear
53395     :clear
53396     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53397     t end
53398     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53399     :end' >>confcache
53400if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53401  if test -w "$cache_file"; then
53402    if test "x$cache_file" != "x/dev/null"; then
53403      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53404$as_echo "$as_me: updating cache $cache_file" >&6;}
53405      if test ! -f "$cache_file" || test -h "$cache_file"; then
53406	cat confcache >"$cache_file"
53407      else
53408        case $cache_file in #(
53409        */* | ?:*)
53410	  mv -f confcache "$cache_file"$$ &&
53411	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53412        *)
53413	  mv -f confcache "$cache_file" ;;
53414	esac
53415      fi
53416    fi
53417  else
53418    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53419$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53420  fi
53421fi
53422rm -f confcache
53423
53424test "x$prefix" = xNONE && prefix=$ac_default_prefix
53425# Let make expand exec_prefix.
53426test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53427
53428# Transform confdefs.h into DEFS.
53429# Protect against shell expansion while executing Makefile rules.
53430# Protect against Makefile macro expansion.
53431#
53432# If the first sed substitution is executed (which looks for macros that
53433# take arguments), then branch to the quote section.  Otherwise,
53434# look for a macro that doesn't take arguments.
53435ac_script='
53436:mline
53437/\\$/{
53438 N
53439 s,\\\n,,
53440 b mline
53441}
53442t clear
53443:clear
53444s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53445t quote
53446s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53447t quote
53448b any
53449:quote
53450s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53451s/\[/\\&/g
53452s/\]/\\&/g
53453s/\$/$$/g
53454H
53455:any
53456${
53457	g
53458	s/^\n//
53459	s/\n/ /g
53460	p
53461}
53462'
53463DEFS=`sed -n "$ac_script" confdefs.h`
53464
53465
53466ac_libobjs=
53467ac_ltlibobjs=
53468U=
53469for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53470  # 1. Remove the extension, and $U if already installed.
53471  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53472  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53473  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53474  #    will be set to the directory where LIBOBJS objects are built.
53475  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53476  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53477done
53478LIBOBJS=$ac_libobjs
53479
53480LTLIBOBJS=$ac_ltlibobjs
53481
53482
53483
53484: "${CONFIG_STATUS=./config.status}"
53485ac_write_fail=0
53486ac_clean_files_save=$ac_clean_files
53487ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53488{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53489$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53490as_write_fail=0
53491cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53492#! $SHELL
53493# Generated by $as_me.
53494# Run this file to recreate the current configuration.
53495# Compiler output produced by configure, useful for debugging
53496# configure, is in config.log if it exists.
53497
53498debug=false
53499ac_cs_recheck=false
53500ac_cs_silent=false
53501
53502SHELL=\${CONFIG_SHELL-$SHELL}
53503export SHELL
53504_ASEOF
53505cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53506## -------------------- ##
53507## M4sh Initialization. ##
53508## -------------------- ##
53509
53510# Be more Bourne compatible
53511DUALCASE=1; export DUALCASE # for MKS sh
53512if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53513  emulate sh
53514  NULLCMD=:
53515  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53516  # is contrary to our usage.  Disable this feature.
53517  alias -g '${1+"$@"}'='"$@"'
53518  setopt NO_GLOB_SUBST
53519else
53520  case `(set -o) 2>/dev/null` in #(
53521  *posix*) :
53522    set -o posix ;; #(
53523  *) :
53524     ;;
53525esac
53526fi
53527
53528
53529as_nl='
53530'
53531export as_nl
53532# Printing a long string crashes Solaris 7 /usr/bin/printf.
53533as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53534as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53535as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53536# Prefer a ksh shell builtin over an external printf program on Solaris,
53537# but without wasting forks for bash or zsh.
53538if test -z "$BASH_VERSION$ZSH_VERSION" \
53539    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53540  as_echo='print -r --'
53541  as_echo_n='print -rn --'
53542elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53543  as_echo='printf %s\n'
53544  as_echo_n='printf %s'
53545else
53546  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53547    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53548    as_echo_n='/usr/ucb/echo -n'
53549  else
53550    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53551    as_echo_n_body='eval
53552      arg=$1;
53553      case $arg in #(
53554      *"$as_nl"*)
53555	expr "X$arg" : "X\\(.*\\)$as_nl";
53556	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53557      esac;
53558      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53559    '
53560    export as_echo_n_body
53561    as_echo_n='sh -c $as_echo_n_body as_echo'
53562  fi
53563  export as_echo_body
53564  as_echo='sh -c $as_echo_body as_echo'
53565fi
53566
53567# The user is always right.
53568if test "${PATH_SEPARATOR+set}" != set; then
53569  PATH_SEPARATOR=:
53570  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53571    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53572      PATH_SEPARATOR=';'
53573  }
53574fi
53575
53576
53577# IFS
53578# We need space, tab and new line, in precisely that order.  Quoting is
53579# there to prevent editors from complaining about space-tab.
53580# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53581# splitting by setting IFS to empty value.)
53582IFS=" ""	$as_nl"
53583
53584# Find who we are.  Look in the path if we contain no directory separator.
53585as_myself=
53586case $0 in #((
53587  *[\\/]* ) as_myself=$0 ;;
53588  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53589for as_dir in $PATH
53590do
53591  IFS=$as_save_IFS
53592  test -z "$as_dir" && as_dir=.
53593    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53594  done
53595IFS=$as_save_IFS
53596
53597     ;;
53598esac
53599# We did not find ourselves, most probably we were run as `sh COMMAND'
53600# in which case we are not to be found in the path.
53601if test "x$as_myself" = x; then
53602  as_myself=$0
53603fi
53604if test ! -f "$as_myself"; then
53605  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53606  exit 1
53607fi
53608
53609# Unset variables that we do not need and which cause bugs (e.g. in
53610# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53611# suppresses any "Segmentation fault" message there.  '((' could
53612# trigger a bug in pdksh 5.2.14.
53613for as_var in BASH_ENV ENV MAIL MAILPATH
53614do eval test x\${$as_var+set} = xset \
53615  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53616done
53617PS1='$ '
53618PS2='> '
53619PS4='+ '
53620
53621# NLS nuisances.
53622LC_ALL=C
53623export LC_ALL
53624LANGUAGE=C
53625export LANGUAGE
53626
53627# CDPATH.
53628(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53629
53630
53631# as_fn_error STATUS ERROR [LINENO LOG_FD]
53632# ----------------------------------------
53633# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53634# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53635# script with STATUS, using 1 if that was 0.
53636as_fn_error ()
53637{
53638  as_status=$1; test $as_status -eq 0 && as_status=1
53639  if test "$4"; then
53640    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53641    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53642  fi
53643  $as_echo "$as_me: error: $2" >&2
53644  as_fn_exit $as_status
53645} # as_fn_error
53646
53647
53648# as_fn_set_status STATUS
53649# -----------------------
53650# Set $? to STATUS, without forking.
53651as_fn_set_status ()
53652{
53653  return $1
53654} # as_fn_set_status
53655
53656# as_fn_exit STATUS
53657# -----------------
53658# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53659as_fn_exit ()
53660{
53661  set +e
53662  as_fn_set_status $1
53663  exit $1
53664} # as_fn_exit
53665
53666# as_fn_unset VAR
53667# ---------------
53668# Portably unset VAR.
53669as_fn_unset ()
53670{
53671  { eval $1=; unset $1;}
53672}
53673as_unset=as_fn_unset
53674# as_fn_append VAR VALUE
53675# ----------------------
53676# Append the text in VALUE to the end of the definition contained in VAR. Take
53677# advantage of any shell optimizations that allow amortized linear growth over
53678# repeated appends, instead of the typical quadratic growth present in naive
53679# implementations.
53680if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53681  eval 'as_fn_append ()
53682  {
53683    eval $1+=\$2
53684  }'
53685else
53686  as_fn_append ()
53687  {
53688    eval $1=\$$1\$2
53689  }
53690fi # as_fn_append
53691
53692# as_fn_arith ARG...
53693# ------------------
53694# Perform arithmetic evaluation on the ARGs, and store the result in the
53695# global $as_val. Take advantage of shells that can avoid forks. The arguments
53696# must be portable across $(()) and expr.
53697if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53698  eval 'as_fn_arith ()
53699  {
53700    as_val=$(( $* ))
53701  }'
53702else
53703  as_fn_arith ()
53704  {
53705    as_val=`expr "$@" || test $? -eq 1`
53706  }
53707fi # as_fn_arith
53708
53709
53710if expr a : '\(a\)' >/dev/null 2>&1 &&
53711   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53712  as_expr=expr
53713else
53714  as_expr=false
53715fi
53716
53717if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53718  as_basename=basename
53719else
53720  as_basename=false
53721fi
53722
53723if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53724  as_dirname=dirname
53725else
53726  as_dirname=false
53727fi
53728
53729as_me=`$as_basename -- "$0" ||
53730$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53731	 X"$0" : 'X\(//\)$' \| \
53732	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53733$as_echo X/"$0" |
53734    sed '/^.*\/\([^/][^/]*\)\/*$/{
53735	    s//\1/
53736	    q
53737	  }
53738	  /^X\/\(\/\/\)$/{
53739	    s//\1/
53740	    q
53741	  }
53742	  /^X\/\(\/\).*/{
53743	    s//\1/
53744	    q
53745	  }
53746	  s/.*/./; q'`
53747
53748# Avoid depending upon Character Ranges.
53749as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53750as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53751as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53752as_cr_digits='0123456789'
53753as_cr_alnum=$as_cr_Letters$as_cr_digits
53754
53755ECHO_C= ECHO_N= ECHO_T=
53756case `echo -n x` in #(((((
53757-n*)
53758  case `echo 'xy\c'` in
53759  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53760  xy)  ECHO_C='\c';;
53761  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53762       ECHO_T='	';;
53763  esac;;
53764*)
53765  ECHO_N='-n';;
53766esac
53767
53768rm -f conf$$ conf$$.exe conf$$.file
53769if test -d conf$$.dir; then
53770  rm -f conf$$.dir/conf$$.file
53771else
53772  rm -f conf$$.dir
53773  mkdir conf$$.dir 2>/dev/null
53774fi
53775if (echo >conf$$.file) 2>/dev/null; then
53776  if ln -s conf$$.file conf$$ 2>/dev/null; then
53777    as_ln_s='ln -s'
53778    # ... but there are two gotchas:
53779    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53780    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53781    # In both cases, we have to default to `cp -pR'.
53782    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53783      as_ln_s='cp -pR'
53784  elif ln conf$$.file conf$$ 2>/dev/null; then
53785    as_ln_s=ln
53786  else
53787    as_ln_s='cp -pR'
53788  fi
53789else
53790  as_ln_s='cp -pR'
53791fi
53792rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53793rmdir conf$$.dir 2>/dev/null
53794
53795
53796# as_fn_mkdir_p
53797# -------------
53798# Create "$as_dir" as a directory, including parents if necessary.
53799as_fn_mkdir_p ()
53800{
53801
53802  case $as_dir in #(
53803  -*) as_dir=./$as_dir;;
53804  esac
53805  test -d "$as_dir" || eval $as_mkdir_p || {
53806    as_dirs=
53807    while :; do
53808      case $as_dir in #(
53809      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53810      *) as_qdir=$as_dir;;
53811      esac
53812      as_dirs="'$as_qdir' $as_dirs"
53813      as_dir=`$as_dirname -- "$as_dir" ||
53814$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53815	 X"$as_dir" : 'X\(//\)[^/]' \| \
53816	 X"$as_dir" : 'X\(//\)$' \| \
53817	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53818$as_echo X"$as_dir" |
53819    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53820	    s//\1/
53821	    q
53822	  }
53823	  /^X\(\/\/\)[^/].*/{
53824	    s//\1/
53825	    q
53826	  }
53827	  /^X\(\/\/\)$/{
53828	    s//\1/
53829	    q
53830	  }
53831	  /^X\(\/\).*/{
53832	    s//\1/
53833	    q
53834	  }
53835	  s/.*/./; q'`
53836      test -d "$as_dir" && break
53837    done
53838    test -z "$as_dirs" || eval "mkdir $as_dirs"
53839  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53840
53841
53842} # as_fn_mkdir_p
53843if mkdir -p . 2>/dev/null; then
53844  as_mkdir_p='mkdir -p "$as_dir"'
53845else
53846  test -d ./-p && rmdir ./-p
53847  as_mkdir_p=false
53848fi
53849
53850
53851# as_fn_executable_p FILE
53852# -----------------------
53853# Test if FILE is an executable regular file.
53854as_fn_executable_p ()
53855{
53856  test -f "$1" && test -x "$1"
53857} # as_fn_executable_p
53858as_test_x='test -x'
53859as_executable_p=as_fn_executable_p
53860
53861# Sed expression to map a string onto a valid CPP name.
53862as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53863
53864# Sed expression to map a string onto a valid variable name.
53865as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53866
53867
53868exec 6>&1
53869## ----------------------------------- ##
53870## Main body of $CONFIG_STATUS script. ##
53871## ----------------------------------- ##
53872_ASEOF
53873test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53874
53875cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53876# Save the log message, to keep $0 and so on meaningful, and to
53877# report actual input values of CONFIG_FILES etc. instead of their
53878# values after options handling.
53879ac_log="
53880This file was extended by OpenJDK $as_me jdk9, which was
53881generated by GNU Autoconf 2.69.  Invocation command line was
53882
53883  CONFIG_FILES    = $CONFIG_FILES
53884  CONFIG_HEADERS  = $CONFIG_HEADERS
53885  CONFIG_LINKS    = $CONFIG_LINKS
53886  CONFIG_COMMANDS = $CONFIG_COMMANDS
53887  $ $0 $@
53888
53889on `(hostname || uname -n) 2>/dev/null | sed 1q`
53890"
53891
53892_ACEOF
53893
53894case $ac_config_files in *"
53895"*) set x $ac_config_files; shift; ac_config_files=$*;;
53896esac
53897
53898
53899
53900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53901# Files that config.status was made for.
53902config_files="$ac_config_files"
53903
53904_ACEOF
53905
53906cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53907ac_cs_usage="\
53908\`$as_me' instantiates files and other configuration actions
53909from templates according to the current configuration.  Unless the files
53910and actions are specified as TAGs, all are instantiated by default.
53911
53912Usage: $0 [OPTION]... [TAG]...
53913
53914  -h, --help       print this help, then exit
53915  -V, --version    print version number and configuration settings, then exit
53916      --config     print configuration, then exit
53917  -q, --quiet, --silent
53918                   do not print progress messages
53919  -d, --debug      don't remove temporary files
53920      --recheck    update $as_me by reconfiguring in the same conditions
53921      --file=FILE[:TEMPLATE]
53922                   instantiate the configuration file FILE
53923
53924Configuration files:
53925$config_files
53926
53927Report bugs to <build-dev@openjdk.java.net>.
53928OpenJDK home page: <http://openjdk.java.net>."
53929
53930_ACEOF
53931cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53932ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53933ac_cs_version="\\
53934OpenJDK config.status jdk9
53935configured by $0, generated by GNU Autoconf 2.69,
53936  with options \\"\$ac_cs_config\\"
53937
53938Copyright (C) 2012 Free Software Foundation, Inc.
53939This config.status script is free software; the Free Software Foundation
53940gives unlimited permission to copy, distribute and modify it."
53941
53942ac_pwd='$ac_pwd'
53943srcdir='$srcdir'
53944AWK='$AWK'
53945test -n "\$AWK" || AWK=awk
53946_ACEOF
53947
53948cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53949# The default lists apply if the user does not specify any file.
53950ac_need_defaults=:
53951while test $# != 0
53952do
53953  case $1 in
53954  --*=?*)
53955    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53956    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53957    ac_shift=:
53958    ;;
53959  --*=)
53960    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53961    ac_optarg=
53962    ac_shift=:
53963    ;;
53964  *)
53965    ac_option=$1
53966    ac_optarg=$2
53967    ac_shift=shift
53968    ;;
53969  esac
53970
53971  case $ac_option in
53972  # Handling of the options.
53973  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53974    ac_cs_recheck=: ;;
53975  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53976    $as_echo "$ac_cs_version"; exit ;;
53977  --config | --confi | --conf | --con | --co | --c )
53978    $as_echo "$ac_cs_config"; exit ;;
53979  --debug | --debu | --deb | --de | --d | -d )
53980    debug=: ;;
53981  --file | --fil | --fi | --f )
53982    $ac_shift
53983    case $ac_optarg in
53984    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53985    '') as_fn_error $? "missing file argument" ;;
53986    esac
53987    as_fn_append CONFIG_FILES " '$ac_optarg'"
53988    ac_need_defaults=false;;
53989  --he | --h |  --help | --hel | -h )
53990    $as_echo "$ac_cs_usage"; exit ;;
53991  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53992  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53993    ac_cs_silent=: ;;
53994
53995  # This is an error.
53996  -*) as_fn_error $? "unrecognized option: \`$1'
53997Try \`$0 --help' for more information." ;;
53998
53999  *) as_fn_append ac_config_targets " $1"
54000     ac_need_defaults=false ;;
54001
54002  esac
54003  shift
54004done
54005
54006ac_configure_extra_args=
54007
54008if $ac_cs_silent; then
54009  exec 6>/dev/null
54010  ac_configure_extra_args="$ac_configure_extra_args --silent"
54011fi
54012
54013_ACEOF
54014cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54015if \$ac_cs_recheck; then
54016  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
54017  shift
54018  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
54019  CONFIG_SHELL='$SHELL'
54020  export CONFIG_SHELL
54021  exec "\$@"
54022fi
54023
54024_ACEOF
54025cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54026exec 5>>config.log
54027{
54028  echo
54029  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
54030## Running $as_me. ##
54031_ASBOX
54032  $as_echo "$ac_log"
54033} >&5
54034
54035_ACEOF
54036cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54037_ACEOF
54038
54039cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54040
54041# Handling of arguments.
54042for ac_config_target in $ac_config_targets
54043do
54044  case $ac_config_target in
54045    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
54046    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
54047    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
54048    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
54049    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
54050
54051  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
54052  esac
54053done
54054
54055
54056# If the user did not use the arguments to specify the items to instantiate,
54057# then the envvar interface is used.  Set only those that are not.
54058# We use the long form for the default assignment because of an extremely
54059# bizarre bug on SunOS 4.1.3.
54060if $ac_need_defaults; then
54061  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
54062fi
54063
54064# Have a temporary directory for convenience.  Make it in the build tree
54065# simply because there is no reason against having it here, and in addition,
54066# creating and moving files from /tmp can sometimes cause problems.
54067# Hook for its removal unless debugging.
54068# Note that there is a small window in which the directory will not be cleaned:
54069# after its creation but before its name has been assigned to `$tmp'.
54070$debug ||
54071{
54072  tmp= ac_tmp=
54073  trap 'exit_status=$?
54074  : "${ac_tmp:=$tmp}"
54075  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
54076' 0
54077  trap 'as_fn_exit 1' 1 2 13 15
54078}
54079# Create a (secure) tmp directory for tmp files.
54080
54081{
54082  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
54083  test -d "$tmp"
54084}  ||
54085{
54086  tmp=./conf$$-$RANDOM
54087  (umask 077 && mkdir "$tmp")
54088} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
54089ac_tmp=$tmp
54090
54091# Set up the scripts for CONFIG_FILES section.
54092# No need to generate them if there are no CONFIG_FILES.
54093# This happens for instance with `./config.status config.h'.
54094if test -n "$CONFIG_FILES"; then
54095
54096
54097ac_cr=`echo X | tr X '\015'`
54098# On cygwin, bash can eat \r inside `` if the user requested igncr.
54099# But we know of no other shell where ac_cr would be empty at this
54100# point, so we can use a bashism as a fallback.
54101if test "x$ac_cr" = x; then
54102  eval ac_cr=\$\'\\r\'
54103fi
54104ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
54105if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
54106  ac_cs_awk_cr='\\r'
54107else
54108  ac_cs_awk_cr=$ac_cr
54109fi
54110
54111echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
54112_ACEOF
54113
54114
54115{
54116  echo "cat >conf$$subs.awk <<_ACEOF" &&
54117  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
54118  echo "_ACEOF"
54119} >conf$$subs.sh ||
54120  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54121ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
54122ac_delim='%!_!# '
54123for ac_last_try in false false false false false :; do
54124  . ./conf$$subs.sh ||
54125    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54126
54127  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
54128  if test $ac_delim_n = $ac_delim_num; then
54129    break
54130  elif $ac_last_try; then
54131    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
54132  else
54133    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
54134  fi
54135done
54136rm -f conf$$subs.sh
54137
54138cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54139cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
54140_ACEOF
54141sed -n '
54142h
54143s/^/S["/; s/!.*/"]=/
54144p
54145g
54146s/^[^!]*!//
54147:repl
54148t repl
54149s/'"$ac_delim"'$//
54150t delim
54151:nl
54152h
54153s/\(.\{148\}\)..*/\1/
54154t more1
54155s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
54156p
54157n
54158b repl
54159:more1
54160s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54161p
54162g
54163s/.\{148\}//
54164t nl
54165:delim
54166h
54167s/\(.\{148\}\)..*/\1/
54168t more2
54169s/["\\]/\\&/g; s/^/"/; s/$/"/
54170p
54171b
54172:more2
54173s/["\\]/\\&/g; s/^/"/; s/$/"\\/
54174p
54175g
54176s/.\{148\}//
54177t delim
54178' <conf$$subs.awk | sed '
54179/^[^""]/{
54180  N
54181  s/\n//
54182}
54183' >>$CONFIG_STATUS || ac_write_fail=1
54184rm -f conf$$subs.awk
54185cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54186_ACAWK
54187cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
54188  for (key in S) S_is_set[key] = 1
54189  FS = ""
54190
54191}
54192{
54193  line = $ 0
54194  nfields = split(line, field, "@")
54195  substed = 0
54196  len = length(field[1])
54197  for (i = 2; i < nfields; i++) {
54198    key = field[i]
54199    keylen = length(key)
54200    if (S_is_set[key]) {
54201      value = S[key]
54202      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
54203      len += length(value) + length(field[++i])
54204      substed = 1
54205    } else
54206      len += 1 + keylen
54207  }
54208
54209  print line
54210}
54211
54212_ACAWK
54213_ACEOF
54214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54215if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
54216  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
54217else
54218  cat
54219fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
54220  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
54221_ACEOF
54222
54223# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
54224# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
54225# trailing colons and then remove the whole line if VPATH becomes empty
54226# (actually we leave an empty line to preserve line numbers).
54227if test "x$srcdir" = x.; then
54228  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
54229h
54230s///
54231s/^/:/
54232s/[	 ]*$/:/
54233s/:\$(srcdir):/:/g
54234s/:\${srcdir}:/:/g
54235s/:@srcdir@:/:/g
54236s/^:*//
54237s/:*$//
54238x
54239s/\(=[	 ]*\).*/\1/
54240G
54241s/\n//
54242s/^[^=]*=[	 ]*$//
54243}'
54244fi
54245
54246cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54247fi # test -n "$CONFIG_FILES"
54248
54249
54250eval set X "  :F $CONFIG_FILES      "
54251shift
54252for ac_tag
54253do
54254  case $ac_tag in
54255  :[FHLC]) ac_mode=$ac_tag; continue;;
54256  esac
54257  case $ac_mode$ac_tag in
54258  :[FHL]*:*);;
54259  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
54260  :[FH]-) ac_tag=-:-;;
54261  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
54262  esac
54263  ac_save_IFS=$IFS
54264  IFS=:
54265  set x $ac_tag
54266  IFS=$ac_save_IFS
54267  shift
54268  ac_file=$1
54269  shift
54270
54271  case $ac_mode in
54272  :L) ac_source=$1;;
54273  :[FH])
54274    ac_file_inputs=
54275    for ac_f
54276    do
54277      case $ac_f in
54278      -) ac_f="$ac_tmp/stdin";;
54279      *) # Look for the file first in the build tree, then in the source tree
54280	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
54281	 # because $ac_f cannot contain `:'.
54282	 test -f "$ac_f" ||
54283	   case $ac_f in
54284	   [\\/$]*) false;;
54285	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
54286	   esac ||
54287	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
54288      esac
54289      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54290      as_fn_append ac_file_inputs " '$ac_f'"
54291    done
54292
54293    # Let's still pretend it is `configure' which instantiates (i.e., don't
54294    # use $as_me), people would be surprised to read:
54295    #    /* config.h.  Generated by config.status.  */
54296    configure_input='Generated from '`
54297	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54298	`' by configure.'
54299    if test x"$ac_file" != x-; then
54300      configure_input="$ac_file.  $configure_input"
54301      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54302$as_echo "$as_me: creating $ac_file" >&6;}
54303    fi
54304    # Neutralize special characters interpreted by sed in replacement strings.
54305    case $configure_input in #(
54306    *\&* | *\|* | *\\* )
54307       ac_sed_conf_input=`$as_echo "$configure_input" |
54308       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54309    *) ac_sed_conf_input=$configure_input;;
54310    esac
54311
54312    case $ac_tag in
54313    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54314      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54315    esac
54316    ;;
54317  esac
54318
54319  ac_dir=`$as_dirname -- "$ac_file" ||
54320$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54321	 X"$ac_file" : 'X\(//\)[^/]' \| \
54322	 X"$ac_file" : 'X\(//\)$' \| \
54323	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54324$as_echo X"$ac_file" |
54325    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54326	    s//\1/
54327	    q
54328	  }
54329	  /^X\(\/\/\)[^/].*/{
54330	    s//\1/
54331	    q
54332	  }
54333	  /^X\(\/\/\)$/{
54334	    s//\1/
54335	    q
54336	  }
54337	  /^X\(\/\).*/{
54338	    s//\1/
54339	    q
54340	  }
54341	  s/.*/./; q'`
54342  as_dir="$ac_dir"; as_fn_mkdir_p
54343  ac_builddir=.
54344
54345case "$ac_dir" in
54346.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54347*)
54348  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54349  # A ".." for each directory in $ac_dir_suffix.
54350  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54351  case $ac_top_builddir_sub in
54352  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54353  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54354  esac ;;
54355esac
54356ac_abs_top_builddir=$ac_pwd
54357ac_abs_builddir=$ac_pwd$ac_dir_suffix
54358# for backward compatibility:
54359ac_top_builddir=$ac_top_build_prefix
54360
54361case $srcdir in
54362  .)  # We are building in place.
54363    ac_srcdir=.
54364    ac_top_srcdir=$ac_top_builddir_sub
54365    ac_abs_top_srcdir=$ac_pwd ;;
54366  [\\/]* | ?:[\\/]* )  # Absolute name.
54367    ac_srcdir=$srcdir$ac_dir_suffix;
54368    ac_top_srcdir=$srcdir
54369    ac_abs_top_srcdir=$srcdir ;;
54370  *) # Relative name.
54371    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54372    ac_top_srcdir=$ac_top_build_prefix$srcdir
54373    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54374esac
54375ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54376
54377
54378  case $ac_mode in
54379  :F)
54380  #
54381  # CONFIG_FILE
54382  #
54383
54384_ACEOF
54385
54386cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54387# If the template does not know about datarootdir, expand it.
54388# FIXME: This hack should be removed a few years after 2.60.
54389ac_datarootdir_hack=; ac_datarootdir_seen=
54390ac_sed_dataroot='
54391/datarootdir/ {
54392  p
54393  q
54394}
54395/@datadir@/p
54396/@docdir@/p
54397/@infodir@/p
54398/@localedir@/p
54399/@mandir@/p'
54400case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54401*datarootdir*) ac_datarootdir_seen=yes;;
54402*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54403  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54404$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54405_ACEOF
54406cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54407  ac_datarootdir_hack='
54408  s&@datadir@&$datadir&g
54409  s&@docdir@&$docdir&g
54410  s&@infodir@&$infodir&g
54411  s&@localedir@&$localedir&g
54412  s&@mandir@&$mandir&g
54413  s&\\\${datarootdir}&$datarootdir&g' ;;
54414esac
54415_ACEOF
54416
54417# Neutralize VPATH when `$srcdir' = `.'.
54418# Shell code in configure.ac might set extrasub.
54419# FIXME: do we really want to maintain this feature?
54420cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54421ac_sed_extra="$ac_vpsub
54422$extrasub
54423_ACEOF
54424cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54425:t
54426/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54427s|@configure_input@|$ac_sed_conf_input|;t t
54428s&@top_builddir@&$ac_top_builddir_sub&;t t
54429s&@top_build_prefix@&$ac_top_build_prefix&;t t
54430s&@srcdir@&$ac_srcdir&;t t
54431s&@abs_srcdir@&$ac_abs_srcdir&;t t
54432s&@top_srcdir@&$ac_top_srcdir&;t t
54433s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54434s&@builddir@&$ac_builddir&;t t
54435s&@abs_builddir@&$ac_abs_builddir&;t t
54436s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54437$ac_datarootdir_hack
54438"
54439eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54440  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54441
54442test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54443  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54444  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54445      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54446  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54447which seems to be undefined.  Please make sure it is defined" >&5
54448$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54449which seems to be undefined.  Please make sure it is defined" >&2;}
54450
54451  rm -f "$ac_tmp/stdin"
54452  case $ac_file in
54453  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54454  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54455  esac \
54456  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54457 ;;
54458
54459
54460
54461  esac
54462
54463done # for ac_tag
54464
54465
54466as_fn_exit 0
54467_ACEOF
54468ac_clean_files=$ac_clean_files_save
54469
54470test $ac_write_fail = 0 ||
54471  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54472
54473
54474# configure is writing to config.log, and then calls config.status.
54475# config.status does its own redirection, appending to config.log.
54476# Unfortunately, on DOS this fails, as config.log is still kept open
54477# by configure, so config.status won't be able to write to it; its
54478# output is simply discarded.  So we exec the FD to /dev/null,
54479# effectively closing config.log, so it can be properly (re)opened and
54480# appended to by config.status.  When coming back to configure, we
54481# need to make the FD available again.
54482if test "$no_create" != yes; then
54483  ac_cs_success=:
54484  ac_config_status_args=
54485  test "$silent" = yes &&
54486    ac_config_status_args="$ac_config_status_args --quiet"
54487  exec 5>/dev/null
54488  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54489  exec 5>>config.log
54490  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54491  # would make configure fail if this is the last instruction.
54492  $ac_cs_success || as_fn_exit 1
54493fi
54494if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54495  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54496$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54497fi
54498
54499
54500# After AC_OUTPUT, we need to do final work
54501
54502
54503  # Try to move config.log (generated by autoconf) to the configure-support directory.
54504  if test -e ./config.log; then
54505    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54506  fi
54507
54508  # Rotate our log file (configure.log)
54509  if test -e "$OUTPUT_ROOT/configure.log.old"; then
54510    $RM -f "$OUTPUT_ROOT/configure.log.old"
54511  fi
54512  if test -e "$OUTPUT_ROOT/configure.log"; then
54513    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
54514  fi
54515
54516  # Move configure.log from current directory to the build output root
54517  if test -e ./configure.log; then
54518    echo found it
54519    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
54520  fi
54521
54522  # Make the compare script executable
54523  $CHMOD +x $OUTPUT_ROOT/compare.sh
54524
54525
54526# Finally output some useful information to the user
54527
54528  # Finally output some useful information to the user
54529
54530  printf "\n"
54531  printf "====================================================\n"
54532  if test "x$no_create" != "xyes"; then
54533    if test "x$IS_RECONFIGURE" != "xyes"; then
54534      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54535    else
54536      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54537    fi
54538  else
54539    if test "x$IS_RECONFIGURE" != "xyes"; then
54540      printf "A configuration has been successfully checked but not created\n"
54541    else
54542      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54543    fi
54544  fi
54545  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54546    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54547  else
54548    printf "using default settings.\n"
54549  fi
54550
54551  printf "\n"
54552  printf "Configuration summary:\n"
54553  printf "* Debug level:    $DEBUG_LEVEL\n"
54554  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54555  printf "* JDK variant:    $JDK_VARIANT\n"
54556  printf "* JVM variants:   $with_jvm_variants\n"
54557  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54558
54559  printf "\n"
54560  printf "Tools summary:\n"
54561  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54562    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54563  fi
54564  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54565  if test "x$TOOLCHAIN_VERSION" != "x"; then
54566    print_version=" $TOOLCHAIN_VERSION"
54567  fi
54568  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54569  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54570  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54571
54572  printf "\n"
54573  printf "Build performance summary:\n"
54574  printf "* Cores to use:   $JOBS\n"
54575  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54576  if test "x$CCACHE_STATUS" != "x"; then
54577    printf "* ccache status:  $CCACHE_STATUS\n"
54578  fi
54579  printf "\n"
54580
54581  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54582    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54583    printf "will result in longer build times.\n"
54584    printf "\n"
54585  fi
54586
54587  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54588    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54589    printf "These are not respected, and will be ignored. It is recommended\n"
54590    printf "that you clean your environment. The following variables are set:\n"
54591    printf "$FOUND_ALT_VARIABLES\n"
54592    printf "\n"
54593  fi
54594
54595  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54596    printf "WARNING: Your build output directory is not on a local disk.\n"
54597    printf "This will severely degrade build performance!\n"
54598    printf "It is recommended that you create an output directory on a local disk,\n"
54599    printf "and run the configure script again from that directory.\n"
54600    printf "\n"
54601  fi
54602
54603  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54604    printf "WARNING: The result of this configuration has overridden an older\n"
54605    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54606    printf "proper build. Failure to do so might result in strange build problems.\n"
54607    printf "\n"
54608  fi
54609
54610  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54611    printf "WARNING: The result of this configuration was not saved.\n"
54612    printf "You should run without '--no-create | -n' to create the configuration.\n"
54613    printf "\n"
54614  fi
54615
54616
54617
54618  # Locate config.log.
54619  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
54620    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
54621  elif test -e "./config.log"; then
54622    CONFIG_LOG_PATH="."
54623  fi
54624
54625  if test -e "$CONFIG_LOG_PATH/config.log"; then
54626    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
54627    if test $? -eq 0; then
54628      printf "The following warnings were produced. Repeated here for convenience:\n"
54629      # We must quote sed expression (using []) to stop m4 from eating the [].
54630      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
54631      printf "\n"
54632    fi
54633  fi
54634
54635