generated-configure.sh revision 1480:cfd05cc6c27b
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_OPTIONS
722CFLAGS_DEBUG_OPTIONS
723CXXFLAGS_DEBUG_SYMBOLS
724CFLAGS_DEBUG_SYMBOLS
725CXX_FLAG_DEPS
726C_FLAG_DEPS
727SET_SHARED_LIBRARY_MAPFILE
728SET_SHARED_LIBRARY_NAME
729SET_SHARED_LIBRARY_ORIGIN
730SET_EXECUTABLE_ORIGIN
731CXX_FLAG_REORDER
732C_FLAG_REORDER
733SYSROOT_LDFLAGS
734SYSROOT_CFLAGS
735RC_FLAGS
736AR_OUT_OPTION
737LD_OUT_OPTION
738EXE_OUT_OPTION
739CC_OUT_OPTION
740POST_STRIP_CMD
741ARFLAGS
742COMPILER_TARGET_BITS_FLAG
743JT_HOME
744JTREGEXE
745USING_BROKEN_SUSE_LD
746PACKAGE_PATH
747USE_CLANG
748HOTSPOT_LD
749HOTSPOT_CXX
750HOTSPOT_RC
751HOTSPOT_MT
752BUILD_LD
753BUILD_CXX
754BUILD_CC
755ac_ct_OBJDUMP
756OBJDUMP
757ac_ct_OBJCOPY
758OBJCOPY
759ac_ct_NM
760ac_ct_STRIP
761GNM
762NM
763STRIP
764MSBUILD
765DUMPBIN
766RC
767MT
768LIPO
769ac_ct_AR
770AR
771AS
772LDCXX
773LD
774CXXCPP
775CPP
776ac_ct_CXX
777CXXFLAGS
778CXX
779ac_ct_PROPER_COMPILER_CXX
780PROPER_COMPILER_CXX
781TOOLCHAIN_PATH_CXX
782POTENTIAL_CXX
783OBJEXT
784EXEEXT
785ac_ct_CC
786CPPFLAGS
787LDFLAGS
788CFLAGS
789CC
790ac_ct_PROPER_COMPILER_CC
791PROPER_COMPILER_CC
792TOOLCHAIN_PATH_CC
793POTENTIAL_CC
794VS_LIB
795VS_INCLUDE
796VS_PATH
797CYGWIN_LINK
798EXE_SUFFIX
799OBJ_SUFFIX
800STATIC_LIBRARY
801SHARED_LIBRARY
802STATIC_LIBRARY_SUFFIX
803SHARED_LIBRARY_SUFFIX
804LIBRARY_PREFIX
805TOOLCHAIN_TYPE
806BUILD_HOTSPOT
807HOTSPOT_DIST
808BUILD_OUTPUT
809OVERRIDE_SRC_ROOT
810ADD_SRC_ROOT
811JDK_TOPDIR
812NASHORN_TOPDIR
813HOTSPOT_TOPDIR
814JAXWS_TOPDIR
815JAXP_TOPDIR
816CORBA_TOPDIR
817LANGTOOLS_TOPDIR
818JAVAC_FLAGS
819BOOT_JDK_SOURCETARGET
820JARSIGNER
821JAR
822JAVAH
823JAVAC
824JAVA
825BOOT_JDK
826JAVA_CHECK
827JAVAC_CHECK
828COOKED_BUILD_NUMBER
829JDK_VERSION
830COPYRIGHT_YEAR
831MACOSX_BUNDLE_ID_BASE
832MACOSX_BUNDLE_NAME_BASE
833COMPANY_NAME
834JDK_RC_PLATFORM_NAME
835PRODUCT_SUFFIX
836PRODUCT_NAME
837LAUNCHER_NAME
838MILESTONE
839JDK_BUILD_NUMBER
840JDK_UPDATE_VERSION
841JDK_MICRO_VERSION
842JDK_MINOR_VERSION
843JDK_MAJOR_VERSION
844USER_RELEASE_SUFFIX
845COMPRESS_JARS
846RMICONNECTOR_IIOP
847UNLIMITED_CRYPTO
848CACERTS_FILE
849TEST_IN_BUILD
850BUILD_HEADLESS
851SUPPORT_HEADFUL
852SUPPORT_HEADLESS
853BDEPS_FTP
854BDEPS_UNZIP
855OS_VERSION_MICRO
856OS_VERSION_MINOR
857OS_VERSION_MAJOR
858PKG_CONFIG
859BASH_ARGS
860CODESIGN
861XATTR
862DSYMUTIL
863IS_GNU_TIME
864TIME
865STAT
866HG
867READELF
868OTOOL
869LDD
870ZIP
871UNZIP
872FIND_DELETE
873OUTPUT_SYNC
874OUTPUT_SYNC_SUPPORTED
875MAKE
876CHECK_TOOLSDIR_MAKE
877CHECK_TOOLSDIR_GMAKE
878CHECK_MAKE
879CHECK_GMAKE
880PKGHANDLER
881CONFIGURESUPPORT_OUTPUTDIR
882OUTPUT_ROOT
883CONF_NAME
884SPEC
885SDKROOT
886XCODEBUILD
887BUILD_VARIANT_RELEASE
888DEBUG_CLASSFILES
889FASTDEBUG
890VARIANT
891DEBUG_LEVEL
892MACOSX_UNIVERSAL
893INCLUDE_SA
894JVM_VARIANT_CORE
895JVM_VARIANT_ZEROSHARK
896JVM_VARIANT_ZERO
897JVM_VARIANT_KERNEL
898JVM_VARIANT_MINIMAL1
899JVM_VARIANT_CLIENT
900JVM_VARIANT_SERVER
901JVM_VARIANTS
902JVM_INTERPRETER
903JDK_VARIANT
904SET_OPENJDK
905CANONICAL_TOPDIR
906ORIGINAL_TOPDIR
907TOPDIR
908PATH_SEP
909ZERO_ARCHDEF
910DEFINE_CROSS_COMPILE_ARCH
911LP64
912OPENJDK_TARGET_OS_EXPORT_DIR
913OPENJDK_TARGET_CPU_JLI_CFLAGS
914OPENJDK_TARGET_CPU_OSARCH
915OPENJDK_TARGET_CPU_ISADIR
916OPENJDK_TARGET_CPU_LIBDIR
917OPENJDK_TARGET_CPU_LEGACY_LIB
918OPENJDK_TARGET_CPU_LEGACY
919REQUIRED_OS_VERSION
920REQUIRED_OS_NAME
921COMPILE_TYPE
922OPENJDK_TARGET_CPU_ENDIAN
923OPENJDK_TARGET_CPU_BITS
924OPENJDK_TARGET_CPU_ARCH
925OPENJDK_TARGET_CPU
926OPENJDK_TARGET_OS_ENV
927OPENJDK_TARGET_OS_TYPE
928OPENJDK_TARGET_OS
929OPENJDK_BUILD_CPU_ENDIAN
930OPENJDK_BUILD_CPU_BITS
931OPENJDK_BUILD_CPU_ARCH
932OPENJDK_BUILD_CPU
933OPENJDK_BUILD_OS_ENV
934OPENJDK_BUILD_OS_TYPE
935OPENJDK_BUILD_OS
936OPENJDK_BUILD_AUTOCONF_NAME
937OPENJDK_TARGET_AUTOCONF_NAME
938target_os
939target_vendor
940target_cpu
941target
942host_os
943host_vendor
944host_cpu
945host
946build_os
947build_vendor
948build_cpu
949build
950CPIO
951SETFILE
952DF
953READLINK
954CYGPATH
955SED
956FGREP
957EGREP
958GREP
959AWK
960XARGS
961WHICH
962WC
963UNIQ
964UNAME
965TR
966TOUCH
967TEE
968TAR
969TAIL
970SORT
971SH
972RM
973PRINTF
974NAWK
975MV
976MKTEMP
977MKDIR
978LS
979LN
980HEAD
981FIND
982FILE
983EXPR
984ECHO
985DIRNAME
986DIFF
987DATE
988CUT
989CP
990COMM
991CMP
992CHMOD
993CAT
994BASH
995BASENAME
996DATE_WHEN_CONFIGURED
997ORIGINAL_PATH
998CONFIGURE_COMMAND_LINE
999target_alias
1000host_alias
1001build_alias
1002LIBS
1003ECHO_T
1004ECHO_N
1005ECHO_C
1006DEFS
1007mandir
1008localedir
1009libdir
1010psdir
1011pdfdir
1012dvidir
1013htmldir
1014infodir
1015docdir
1016oldincludedir
1017includedir
1018localstatedir
1019sharedstatedir
1020sysconfdir
1021datadir
1022datarootdir
1023libexecdir
1024sbindir
1025bindir
1026program_transform_name
1027prefix
1028exec_prefix
1029PACKAGE_URL
1030PACKAGE_BUGREPORT
1031PACKAGE_STRING
1032PACKAGE_VERSION
1033PACKAGE_TARNAME
1034PACKAGE_NAME
1035PATH_SEPARATOR
1036SHELL'
1037ac_subst_files=''
1038ac_user_opts='
1039enable_option_checking
1040with_target_bits
1041enable_openjdk_only
1042with_custom_make_dir
1043with_jdk_variant
1044with_jvm_interpreter
1045with_jvm_variants
1046enable_debug
1047with_debug_level
1048with_devkit
1049with_sys_root
1050with_sysroot
1051with_tools_dir
1052with_toolchain_path
1053with_extra_path
1054with_sdk_name
1055with_conf_name
1056with_output_sync
1057with_builddeps_conf
1058with_builddeps_server
1059with_builddeps_dir
1060with_builddeps_group
1061enable_headful
1062enable_hotspot_test_in_build
1063with_cacerts_file
1064enable_unlimited_crypto
1065enable_rmiconnector_iiop
1066with_milestone
1067with_update_version
1068with_user_release_suffix
1069with_build_number
1070with_copyright_year
1071with_boot_jdk
1072with_add_source_root
1073with_override_source_root
1074with_adds_and_overrides
1075with_override_langtools
1076with_override_corba
1077with_override_jaxp
1078with_override_jaxws
1079with_override_hotspot
1080with_override_nashorn
1081with_override_jdk
1082with_import_hotspot
1083with_toolchain_type
1084with_toolchain_version
1085with_jtreg
1086with_extra_cflags
1087with_extra_cxxflags
1088with_extra_ldflags
1089enable_warnings_as_errors
1090enable_debug_symbols
1091enable_zip_debug_info
1092enable_native_coverage
1093with_x
1094with_cups
1095with_cups_include
1096with_freetype
1097with_freetype_include
1098with_freetype_lib
1099with_freetype_src
1100enable_freetype_bundling
1101with_alsa
1102with_alsa_include
1103with_alsa_lib
1104with_libjpeg
1105with_giflib
1106with_lcms
1107with_libpng
1108with_zlib
1109with_stdc__lib
1110with_msvcr_dll
1111with_msvcp_dll
1112with_dxsdk
1113with_dxsdk_lib
1114with_dxsdk_include
1115with_num_cores
1116with_memory_size
1117with_jobs
1118with_boot_jdk_jvmargs
1119with_sjavac_server_java
1120enable_sjavac
1121enable_precompiled_headers
1122enable_ccache
1123with_ccache_dir
1124'
1125      ac_precious_vars='build_alias
1126host_alias
1127target_alias
1128BASENAME
1129BASH
1130CAT
1131CHMOD
1132CMP
1133COMM
1134CP
1135CUT
1136DATE
1137DIFF
1138DIRNAME
1139ECHO
1140EXPR
1141FILE
1142FIND
1143HEAD
1144LN
1145LS
1146MKDIR
1147MKTEMP
1148MV
1149NAWK
1150PRINTF
1151RM
1152SH
1153SORT
1154TAIL
1155TAR
1156TEE
1157TOUCH
1158TR
1159UNAME
1160UNIQ
1161WC
1162WHICH
1163XARGS
1164AWK
1165GREP
1166EGREP
1167FGREP
1168SED
1169CYGPATH
1170READLINK
1171DF
1172SETFILE
1173CPIO
1174UNZIP
1175ZIP
1176LDD
1177OTOOL
1178READELF
1179HG
1180STAT
1181TIME
1182DSYMUTIL
1183XATTR
1184CODESIGN
1185PKG_CONFIG
1186JAVA
1187JAVAC
1188JAVAH
1189JAR
1190JARSIGNER
1191CC
1192CFLAGS
1193LDFLAGS
1194LIBS
1195CPPFLAGS
1196CXX
1197CXXFLAGS
1198CCC
1199CPP
1200CXXCPP
1201AS
1202AR
1203LIPO
1204STRIP
1205NM
1206GNM
1207OBJCOPY
1208OBJDUMP
1209BUILD_CC
1210BUILD_CXX
1211BUILD_LD
1212JTREGEXE
1213XMKMF
1214FREETYPE_CFLAGS
1215FREETYPE_LIBS
1216ALSA_CFLAGS
1217ALSA_LIBS
1218LCMS_CFLAGS
1219LCMS_LIBS
1220PNG_CFLAGS
1221PNG_LIBS
1222LIBFFI_CFLAGS
1223LIBFFI_LIBS
1224CCACHE'
1225
1226
1227# Initialize some variables set by options.
1228ac_init_help=
1229ac_init_version=false
1230ac_unrecognized_opts=
1231ac_unrecognized_sep=
1232# The variables have the same names as the options, with
1233# dashes changed to underlines.
1234cache_file=/dev/null
1235exec_prefix=NONE
1236no_create=
1237no_recursion=
1238prefix=NONE
1239program_prefix=NONE
1240program_suffix=NONE
1241program_transform_name=s,x,x,
1242silent=
1243site=
1244srcdir=
1245verbose=
1246x_includes=NONE
1247x_libraries=NONE
1248
1249# Installation directory options.
1250# These are left unexpanded so users can "make install exec_prefix=/foo"
1251# and all the variables that are supposed to be based on exec_prefix
1252# by default will actually change.
1253# Use braces instead of parens because sh, perl, etc. also accept them.
1254# (The list follows the same order as the GNU Coding Standards.)
1255bindir='${exec_prefix}/bin'
1256sbindir='${exec_prefix}/sbin'
1257libexecdir='${exec_prefix}/libexec'
1258datarootdir='${prefix}/share'
1259datadir='${datarootdir}'
1260sysconfdir='${prefix}/etc'
1261sharedstatedir='${prefix}/com'
1262localstatedir='${prefix}/var'
1263includedir='${prefix}/include'
1264oldincludedir='/usr/include'
1265docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1266infodir='${datarootdir}/info'
1267htmldir='${docdir}'
1268dvidir='${docdir}'
1269pdfdir='${docdir}'
1270psdir='${docdir}'
1271libdir='${exec_prefix}/lib'
1272localedir='${datarootdir}/locale'
1273mandir='${datarootdir}/man'
1274
1275ac_prev=
1276ac_dashdash=
1277for ac_option
1278do
1279  # If the previous option needs an argument, assign it.
1280  if test -n "$ac_prev"; then
1281    eval $ac_prev=\$ac_option
1282    ac_prev=
1283    continue
1284  fi
1285
1286  case $ac_option in
1287  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1288  *=)   ac_optarg= ;;
1289  *)    ac_optarg=yes ;;
1290  esac
1291
1292  # Accept the important Cygnus configure options, so we can diagnose typos.
1293
1294  case $ac_dashdash$ac_option in
1295  --)
1296    ac_dashdash=yes ;;
1297
1298  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1299    ac_prev=bindir ;;
1300  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1301    bindir=$ac_optarg ;;
1302
1303  -build | --build | --buil | --bui | --bu)
1304    ac_prev=build_alias ;;
1305  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1306    build_alias=$ac_optarg ;;
1307
1308  -cache-file | --cache-file | --cache-fil | --cache-fi \
1309  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1310    ac_prev=cache_file ;;
1311  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1312  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1313    cache_file=$ac_optarg ;;
1314
1315  --config-cache | -C)
1316    cache_file=config.cache ;;
1317
1318  -datadir | --datadir | --datadi | --datad)
1319    ac_prev=datadir ;;
1320  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1321    datadir=$ac_optarg ;;
1322
1323  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1324  | --dataroo | --dataro | --datar)
1325    ac_prev=datarootdir ;;
1326  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1327  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1328    datarootdir=$ac_optarg ;;
1329
1330  -disable-* | --disable-*)
1331    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1332    # Reject names that are not valid shell variable names.
1333    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1334      as_fn_error $? "invalid feature name: $ac_useropt"
1335    ac_useropt_orig=$ac_useropt
1336    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1337    case $ac_user_opts in
1338      *"
1339"enable_$ac_useropt"
1340"*) ;;
1341      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1342	 ac_unrecognized_sep=', ';;
1343    esac
1344    eval enable_$ac_useropt=no ;;
1345
1346  -docdir | --docdir | --docdi | --doc | --do)
1347    ac_prev=docdir ;;
1348  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1349    docdir=$ac_optarg ;;
1350
1351  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1352    ac_prev=dvidir ;;
1353  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1354    dvidir=$ac_optarg ;;
1355
1356  -enable-* | --enable-*)
1357    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1358    # Reject names that are not valid shell variable names.
1359    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1360      as_fn_error $? "invalid feature name: $ac_useropt"
1361    ac_useropt_orig=$ac_useropt
1362    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1363    case $ac_user_opts in
1364      *"
1365"enable_$ac_useropt"
1366"*) ;;
1367      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1368	 ac_unrecognized_sep=', ';;
1369    esac
1370    eval enable_$ac_useropt=\$ac_optarg ;;
1371
1372  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1373  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1374  | --exec | --exe | --ex)
1375    ac_prev=exec_prefix ;;
1376  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1377  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1378  | --exec=* | --exe=* | --ex=*)
1379    exec_prefix=$ac_optarg ;;
1380
1381  -gas | --gas | --ga | --g)
1382    # Obsolete; use --with-gas.
1383    with_gas=yes ;;
1384
1385  -help | --help | --hel | --he | -h)
1386    ac_init_help=long ;;
1387  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1388    ac_init_help=recursive ;;
1389  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1390    ac_init_help=short ;;
1391
1392  -host | --host | --hos | --ho)
1393    ac_prev=host_alias ;;
1394  -host=* | --host=* | --hos=* | --ho=*)
1395    host_alias=$ac_optarg ;;
1396
1397  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1398    ac_prev=htmldir ;;
1399  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1400  | --ht=*)
1401    htmldir=$ac_optarg ;;
1402
1403  -includedir | --includedir | --includedi | --included | --include \
1404  | --includ | --inclu | --incl | --inc)
1405    ac_prev=includedir ;;
1406  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1407  | --includ=* | --inclu=* | --incl=* | --inc=*)
1408    includedir=$ac_optarg ;;
1409
1410  -infodir | --infodir | --infodi | --infod | --info | --inf)
1411    ac_prev=infodir ;;
1412  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1413    infodir=$ac_optarg ;;
1414
1415  -libdir | --libdir | --libdi | --libd)
1416    ac_prev=libdir ;;
1417  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1418    libdir=$ac_optarg ;;
1419
1420  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1421  | --libexe | --libex | --libe)
1422    ac_prev=libexecdir ;;
1423  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1424  | --libexe=* | --libex=* | --libe=*)
1425    libexecdir=$ac_optarg ;;
1426
1427  -localedir | --localedir | --localedi | --localed | --locale)
1428    ac_prev=localedir ;;
1429  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1430    localedir=$ac_optarg ;;
1431
1432  -localstatedir | --localstatedir | --localstatedi | --localstated \
1433  | --localstate | --localstat | --localsta | --localst | --locals)
1434    ac_prev=localstatedir ;;
1435  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1436  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1437    localstatedir=$ac_optarg ;;
1438
1439  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1440    ac_prev=mandir ;;
1441  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1442    mandir=$ac_optarg ;;
1443
1444  -nfp | --nfp | --nf)
1445    # Obsolete; use --without-fp.
1446    with_fp=no ;;
1447
1448  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1449  | --no-cr | --no-c | -n)
1450    no_create=yes ;;
1451
1452  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1453  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1454    no_recursion=yes ;;
1455
1456  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1457  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1458  | --oldin | --oldi | --old | --ol | --o)
1459    ac_prev=oldincludedir ;;
1460  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1461  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1462  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1463    oldincludedir=$ac_optarg ;;
1464
1465  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1466    ac_prev=prefix ;;
1467  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1468    prefix=$ac_optarg ;;
1469
1470  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1471  | --program-pre | --program-pr | --program-p)
1472    ac_prev=program_prefix ;;
1473  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1474  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1475    program_prefix=$ac_optarg ;;
1476
1477  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1478  | --program-suf | --program-su | --program-s)
1479    ac_prev=program_suffix ;;
1480  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1481  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1482    program_suffix=$ac_optarg ;;
1483
1484  -program-transform-name | --program-transform-name \
1485  | --program-transform-nam | --program-transform-na \
1486  | --program-transform-n | --program-transform- \
1487  | --program-transform | --program-transfor \
1488  | --program-transfo | --program-transf \
1489  | --program-trans | --program-tran \
1490  | --progr-tra | --program-tr | --program-t)
1491    ac_prev=program_transform_name ;;
1492  -program-transform-name=* | --program-transform-name=* \
1493  | --program-transform-nam=* | --program-transform-na=* \
1494  | --program-transform-n=* | --program-transform-=* \
1495  | --program-transform=* | --program-transfor=* \
1496  | --program-transfo=* | --program-transf=* \
1497  | --program-trans=* | --program-tran=* \
1498  | --progr-tra=* | --program-tr=* | --program-t=*)
1499    program_transform_name=$ac_optarg ;;
1500
1501  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1502    ac_prev=pdfdir ;;
1503  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1504    pdfdir=$ac_optarg ;;
1505
1506  -psdir | --psdir | --psdi | --psd | --ps)
1507    ac_prev=psdir ;;
1508  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1509    psdir=$ac_optarg ;;
1510
1511  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1512  | -silent | --silent | --silen | --sile | --sil)
1513    silent=yes ;;
1514
1515  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1516    ac_prev=sbindir ;;
1517  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1518  | --sbi=* | --sb=*)
1519    sbindir=$ac_optarg ;;
1520
1521  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1522  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1523  | --sharedst | --shareds | --shared | --share | --shar \
1524  | --sha | --sh)
1525    ac_prev=sharedstatedir ;;
1526  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1527  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1528  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1529  | --sha=* | --sh=*)
1530    sharedstatedir=$ac_optarg ;;
1531
1532  -site | --site | --sit)
1533    ac_prev=site ;;
1534  -site=* | --site=* | --sit=*)
1535    site=$ac_optarg ;;
1536
1537  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1538    ac_prev=srcdir ;;
1539  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1540    srcdir=$ac_optarg ;;
1541
1542  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1543  | --syscon | --sysco | --sysc | --sys | --sy)
1544    ac_prev=sysconfdir ;;
1545  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1546  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1547    sysconfdir=$ac_optarg ;;
1548
1549  -target | --target | --targe | --targ | --tar | --ta | --t)
1550    ac_prev=target_alias ;;
1551  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1552    target_alias=$ac_optarg ;;
1553
1554  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1555    verbose=yes ;;
1556
1557  -version | --version | --versio | --versi | --vers | -V)
1558    ac_init_version=: ;;
1559
1560  -with-* | --with-*)
1561    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1562    # Reject names that are not valid shell variable names.
1563    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1564      as_fn_error $? "invalid package name: $ac_useropt"
1565    ac_useropt_orig=$ac_useropt
1566    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1567    case $ac_user_opts in
1568      *"
1569"with_$ac_useropt"
1570"*) ;;
1571      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1572	 ac_unrecognized_sep=', ';;
1573    esac
1574    eval with_$ac_useropt=\$ac_optarg ;;
1575
1576  -without-* | --without-*)
1577    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1578    # Reject names that are not valid shell variable names.
1579    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1580      as_fn_error $? "invalid package name: $ac_useropt"
1581    ac_useropt_orig=$ac_useropt
1582    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1583    case $ac_user_opts in
1584      *"
1585"with_$ac_useropt"
1586"*) ;;
1587      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1588	 ac_unrecognized_sep=', ';;
1589    esac
1590    eval with_$ac_useropt=no ;;
1591
1592  --x)
1593    # Obsolete; use --with-x.
1594    with_x=yes ;;
1595
1596  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1597  | --x-incl | --x-inc | --x-in | --x-i)
1598    ac_prev=x_includes ;;
1599  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1600  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1601    x_includes=$ac_optarg ;;
1602
1603  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1604  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1605    ac_prev=x_libraries ;;
1606  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1607  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1608    x_libraries=$ac_optarg ;;
1609
1610  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1611Try \`$0 --help' for more information"
1612    ;;
1613
1614  *=*)
1615    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1616    # Reject names that are not valid shell variable names.
1617    case $ac_envvar in #(
1618      '' | [0-9]* | *[!_$as_cr_alnum]* )
1619      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1620    esac
1621    eval $ac_envvar=\$ac_optarg
1622    export $ac_envvar ;;
1623
1624  *)
1625    # FIXME: should be removed in autoconf 3.0.
1626    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1627    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1628      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1629    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1630    ;;
1631
1632  esac
1633done
1634
1635if test -n "$ac_prev"; then
1636  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1637  as_fn_error $? "missing argument to $ac_option"
1638fi
1639
1640if test -n "$ac_unrecognized_opts"; then
1641  case $enable_option_checking in
1642    no) ;;
1643    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1644    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1645  esac
1646fi
1647
1648# Check all directory arguments for consistency.
1649for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1650		datadir sysconfdir sharedstatedir localstatedir includedir \
1651		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1652		libdir localedir mandir
1653do
1654  eval ac_val=\$$ac_var
1655  # Remove trailing slashes.
1656  case $ac_val in
1657    */ )
1658      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1659      eval $ac_var=\$ac_val;;
1660  esac
1661  # Be sure to have absolute directory names.
1662  case $ac_val in
1663    [\\/$]* | ?:[\\/]* )  continue;;
1664    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1665  esac
1666  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1667done
1668
1669# There might be people who depend on the old broken behavior: `$host'
1670# used to hold the argument of --host etc.
1671# FIXME: To remove some day.
1672build=$build_alias
1673host=$host_alias
1674target=$target_alias
1675
1676# FIXME: To remove some day.
1677if test "x$host_alias" != x; then
1678  if test "x$build_alias" = x; then
1679    cross_compiling=maybe
1680  elif test "x$build_alias" != "x$host_alias"; then
1681    cross_compiling=yes
1682  fi
1683fi
1684
1685ac_tool_prefix=
1686test -n "$host_alias" && ac_tool_prefix=$host_alias-
1687
1688test "$silent" = yes && exec 6>/dev/null
1689
1690
1691ac_pwd=`pwd` && test -n "$ac_pwd" &&
1692ac_ls_di=`ls -di .` &&
1693ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1694  as_fn_error $? "working directory cannot be determined"
1695test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1696  as_fn_error $? "pwd does not report name of working directory"
1697
1698
1699# Find the source files, if location was not specified.
1700if test -z "$srcdir"; then
1701  ac_srcdir_defaulted=yes
1702  # Try the directory containing this script, then the parent directory.
1703  ac_confdir=`$as_dirname -- "$as_myself" ||
1704$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1705	 X"$as_myself" : 'X\(//\)[^/]' \| \
1706	 X"$as_myself" : 'X\(//\)$' \| \
1707	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1708$as_echo X"$as_myself" |
1709    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1710	    s//\1/
1711	    q
1712	  }
1713	  /^X\(\/\/\)[^/].*/{
1714	    s//\1/
1715	    q
1716	  }
1717	  /^X\(\/\/\)$/{
1718	    s//\1/
1719	    q
1720	  }
1721	  /^X\(\/\).*/{
1722	    s//\1/
1723	    q
1724	  }
1725	  s/.*/./; q'`
1726  srcdir=$ac_confdir
1727  if test ! -r "$srcdir/$ac_unique_file"; then
1728    srcdir=..
1729  fi
1730else
1731  ac_srcdir_defaulted=no
1732fi
1733if test ! -r "$srcdir/$ac_unique_file"; then
1734  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1735  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1736fi
1737ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1738ac_abs_confdir=`(
1739	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1740	pwd)`
1741# When building in place, set srcdir=.
1742if test "$ac_abs_confdir" = "$ac_pwd"; then
1743  srcdir=.
1744fi
1745# Remove unnecessary trailing slashes from srcdir.
1746# Double slashes in file names in object file debugging info
1747# mess up M-x gdb in Emacs.
1748case $srcdir in
1749*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1750esac
1751for ac_var in $ac_precious_vars; do
1752  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1753  eval ac_env_${ac_var}_value=\$${ac_var}
1754  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1755  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1756done
1757
1758#
1759# Report the --help message.
1760#
1761if test "$ac_init_help" = "long"; then
1762  # Omit some internal or obsolete options to make the list less imposing.
1763  # This message is too long to be a string in the A/UX 3.1 sh.
1764  cat <<_ACEOF
1765\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1766
1767Usage: $0 [OPTION]... [VAR=VALUE]...
1768
1769To assign environment variables (e.g., CC, CFLAGS...), specify them as
1770VAR=VALUE.  See below for descriptions of some of the useful variables.
1771
1772Defaults for the options are specified in brackets.
1773
1774Configuration:
1775  -h, --help              display this help and exit
1776      --help=short        display options specific to this package
1777      --help=recursive    display the short help of all the included packages
1778  -V, --version           display version information and exit
1779  -q, --quiet, --silent   do not print \`checking ...' messages
1780      --cache-file=FILE   cache test results in FILE [disabled]
1781  -C, --config-cache      alias for \`--cache-file=config.cache'
1782  -n, --no-create         do not create output files
1783      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1784
1785Installation directories:
1786  --prefix=PREFIX         install architecture-independent files in PREFIX
1787                          [$ac_default_prefix]
1788  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1789                          [PREFIX]
1790
1791By default, \`make install' will install all the files in
1792\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1793an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1794for instance \`--prefix=\$HOME'.
1795
1796For better control, use the options below.
1797
1798Fine tuning of the installation directories:
1799  --bindir=DIR            user executables [EPREFIX/bin]
1800  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1801  --libexecdir=DIR        program executables [EPREFIX/libexec]
1802  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1803  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1804  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1805  --libdir=DIR            object code libraries [EPREFIX/lib]
1806  --includedir=DIR        C header files [PREFIX/include]
1807  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1808  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1809  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1810  --infodir=DIR           info documentation [DATAROOTDIR/info]
1811  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1812  --mandir=DIR            man documentation [DATAROOTDIR/man]
1813  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1814  --htmldir=DIR           html documentation [DOCDIR]
1815  --dvidir=DIR            dvi documentation [DOCDIR]
1816  --pdfdir=DIR            pdf documentation [DOCDIR]
1817  --psdir=DIR             ps documentation [DOCDIR]
1818_ACEOF
1819
1820  cat <<\_ACEOF
1821
1822X features:
1823  --x-includes=DIR    X include files are in DIR
1824  --x-libraries=DIR   X library files are in DIR
1825
1826System types:
1827  --build=BUILD     configure for building on BUILD [guessed]
1828  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1829  --target=TARGET   configure for building compilers for TARGET [HOST]
1830_ACEOF
1831fi
1832
1833if test -n "$ac_init_help"; then
1834  case $ac_init_help in
1835     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1836   esac
1837  cat <<\_ACEOF
1838
1839Optional Features:
1840  --disable-option-checking  ignore unrecognized --enable/--with options
1841  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1842  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1843  --enable-openjdk-only   suppress building custom source even if present
1844                          [disabled]
1845  --enable-debug          set the debug level to fastdebug (shorthand for
1846                          --with-debug-level=fastdebug) [disabled]
1847  --disable-headful       disable building headful support (graphical UI
1848                          support) [enabled]
1849  --enable-hotspot-test-in-build
1850                          run the Queens test after Hotspot build [disabled]
1851  --enable-unlimited-crypto
1852                          Enable unlimited crypto policy [disabled]
1853  --enable-rmiconnector-iiop
1854                          enable the JMX RMIConnector iiop transport
1855                          [disabled]
1856  --disable-warnings-as-errors
1857                          do not consider native warnings to be an error
1858                          [enabled]
1859  --disable-debug-symbols disable generation of debug symbols [enabled]
1860  --disable-zip-debug-info
1861                          disable zipping of debug-info files [enabled]
1862  --enable-native-coverage
1863                          enable native compilation with code coverage
1864                          data[disabled]
1865  --disable-freetype-bundling
1866                          disable bundling of the freetype library with the
1867                          build result [enabled on Windows or when using
1868                          --with-freetype, disabled otherwise]
1869  --enable-sjavac         use sjavac to do fast incremental compiles
1870                          [disabled]
1871  --disable-precompiled-headers
1872                          disable using precompiled headers when compiling C++
1873                          [enabled]
1874  --enable-ccache         enable using ccache to speed up recompilations
1875                          [disabled]
1876
1877Optional Packages:
1878  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1879  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1880  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1881                          support it), e.g. --with-target-bits=32 [guessed]
1882  --with-custom-make-dir  Deprecated. Option is kept for backwards
1883                          compatibility and is ignored
1884  --with-jdk-variant      JDK variant to build (normal) [normal]
1885  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1886  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1887                          client, minimal1, kernel, zero, zeroshark, core)
1888                          [server]
1889  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1890                          optimized (HotSpot build only)) [release]
1891  --with-devkit           use this devkit for compilers, tools and resources
1892  --with-sys-root         alias for --with-sysroot for backwards compatability
1893  --with-sysroot          use this directory as sysroot
1894  --with-tools-dir        alias for --with-toolchain-path for backwards
1895                          compatibility
1896  --with-toolchain-path   prepend these directories when searching for
1897                          toolchain binaries (compilers etc)
1898  --with-extra-path       prepend these directories to the default path
1899  --with-sdk-name         use the platform SDK of the given name. [macosx]
1900  --with-conf-name        use this as the name of the configuration [generated
1901                          from important configuration options]
1902  --with-output-sync      set make output sync type if supported by make.
1903                          [recurse]
1904  --with-builddeps-conf   use this configuration file for the builddeps
1905  --with-builddeps-server download and use build dependencies from this server
1906                          url
1907  --with-builddeps-dir    store downloaded build dependencies here
1908                          [/localhome/builddeps]
1909  --with-builddeps-group  chgrp the downloaded build dependencies to this
1910                          group
1911  --with-cacerts-file     specify alternative cacerts file
1912  --with-milestone        Set milestone value for build [internal]
1913  --with-update-version   Set update version value for build [b00]
1914  --with-user-release-suffix
1915                          Add a custom string to the version string if build
1916                          number is not set.[username_builddateb00]
1917  --with-build-number     Set build number value for build [b00]
1918  --with-copyright-year   Set copyright year value for build [current year]
1919  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1920  --with-add-source-root  for each and every source directory, look in this
1921                          additional source root for the same directory; if it
1922                          exists and have files in it, include it in the build
1923  --with-override-source-root
1924                          for each and every source directory, look in this
1925                          override source root for the same directory; if it
1926                          exists, use that directory instead and ignore the
1927                          directory in the original source root
1928  --with-adds-and-overrides
1929                          use the subdirs 'adds' and 'overrides' in the
1930                          specified directory as add-source-root and
1931                          override-source-root
1932  --with-override-langtools
1933                          use this langtools dir for the build
1934  --with-override-corba   use this corba dir for the build
1935  --with-override-jaxp    use this jaxp dir for the build
1936  --with-override-jaxws   use this jaxws dir for the build
1937  --with-override-hotspot use this hotspot dir for the build
1938  --with-override-nashorn use this nashorn dir for the build
1939  --with-override-jdk     use this jdk dir for the build
1940  --with-import-hotspot   import hotspot binaries from this jdk image or
1941                          hotspot build dist dir instead of building from
1942                          source
1943  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1944                          to show possible values [platform dependent]
1945  --with-toolchain-version
1946                          the version of the toolchain to look for, use
1947                          '--help' to show possible values [platform
1948                          dependent]
1949  --with-jtreg            Regression Test Harness [probed]
1950  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1951  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1952  --with-extra-ldflags    extra flags to be used when linking jdk
1953  --with-x                use the X Window System
1954  --with-cups             specify prefix directory for the cups package
1955                          (expecting the headers under PATH/include)
1956  --with-cups-include     specify directory for the cups include files
1957  --with-freetype         specify prefix directory for the freetype package
1958                          (expecting the libraries under PATH/lib and the
1959                          headers under PATH/include)
1960  --with-freetype-include specify directory for the freetype include files
1961  --with-freetype-lib     specify directory for the freetype library
1962  --with-freetype-src     specify directory with freetype sources to
1963                          automatically build the library (experimental,
1964                          Windows-only)
1965  --with-alsa             specify prefix directory for the alsa package
1966                          (expecting the libraries under PATH/lib and the
1967                          headers under PATH/include)
1968  --with-alsa-include     specify directory for the alsa include files
1969  --with-alsa-lib         specify directory for the alsa library
1970  --with-libjpeg          use libjpeg from build system or OpenJDK source
1971                          (system, bundled) [bundled]
1972  --with-giflib           use giflib from build system or OpenJDK source
1973                          (system, bundled) [bundled]
1974  --with-lcms             use lcms2 from build system or OpenJDK source
1975                          (system, bundled) [bundled]
1976  --with-libpng           use libpng from build system or OpenJDK source
1977                          (system, bundled) [bundled]
1978  --with-zlib             use zlib from build system or OpenJDK source
1979                          (system, bundled) [bundled]
1980  --with-stdc++lib=<static>,<dynamic>,<default>
1981                          force linking of the C++ runtime on Linux to either
1982                          static or dynamic, default is static with dynamic as
1983                          fallback
1984  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1985                          (Windows only) [probed]
1986  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1987                          (Windows only) [probed]
1988  --with-dxsdk            Deprecated. Option is kept for backwards
1989                          compatibility and is ignored
1990  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1991                          compatibility and is ignored
1992  --with-dxsdk-include    Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-num-cores        number of cores in the build system, e.g.
1995                          --with-num-cores=8 [probed]
1996  --with-memory-size      memory (in MB) available in the build system, e.g.
1997                          --with-memory-size=1024 [probed]
1998  --with-jobs             number of parallel jobs to let make run [calculated
1999                          based on cores and memory]
2000  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2001                          invocations of boot JDK, overriding the default
2002                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2003                          -enableassertions"
2004  --with-sjavac-server-java
2005                          use this java binary for running the sjavac
2006                          background server [Boot JDK java]
2007  --with-ccache-dir       where to store ccache files [~/.ccache]
2008
2009Some influential environment variables:
2010  BASENAME    Override default value for BASENAME
2011  BASH        Override default value for BASH
2012  CAT         Override default value for CAT
2013  CHMOD       Override default value for CHMOD
2014  CMP         Override default value for CMP
2015  COMM        Override default value for COMM
2016  CP          Override default value for CP
2017  CUT         Override default value for CUT
2018  DATE        Override default value for DATE
2019  DIFF        Override default value for DIFF
2020  DIRNAME     Override default value for DIRNAME
2021  ECHO        Override default value for ECHO
2022  EXPR        Override default value for EXPR
2023  FILE        Override default value for FILE
2024  FIND        Override default value for FIND
2025  HEAD        Override default value for HEAD
2026  LN          Override default value for LN
2027  LS          Override default value for LS
2028  MKDIR       Override default value for MKDIR
2029  MKTEMP      Override default value for MKTEMP
2030  MV          Override default value for MV
2031  NAWK        Override default value for NAWK
2032  PRINTF      Override default value for PRINTF
2033  RM          Override default value for RM
2034  SH          Override default value for SH
2035  SORT        Override default value for SORT
2036  TAIL        Override default value for TAIL
2037  TAR         Override default value for TAR
2038  TEE         Override default value for TEE
2039  TOUCH       Override default value for TOUCH
2040  TR          Override default value for TR
2041  UNAME       Override default value for UNAME
2042  UNIQ        Override default value for UNIQ
2043  WC          Override default value for WC
2044  WHICH       Override default value for WHICH
2045  XARGS       Override default value for XARGS
2046  AWK         Override default value for AWK
2047  GREP        Override default value for GREP
2048  EGREP       Override default value for EGREP
2049  FGREP       Override default value for FGREP
2050  SED         Override default value for SED
2051  CYGPATH     Override default value for CYGPATH
2052  READLINK    Override default value for READLINK
2053  DF          Override default value for DF
2054  SETFILE     Override default value for SETFILE
2055  CPIO        Override default value for CPIO
2056  UNZIP       Override default value for UNZIP
2057  ZIP         Override default value for ZIP
2058  LDD         Override default value for LDD
2059  OTOOL       Override default value for OTOOL
2060  READELF     Override default value for READELF
2061  HG          Override default value for HG
2062  STAT        Override default value for STAT
2063  TIME        Override default value for TIME
2064  DSYMUTIL    Override default value for DSYMUTIL
2065  XATTR       Override default value for XATTR
2066  CODESIGN    Override default value for CODESIGN
2067  PKG_CONFIG  path to pkg-config utility
2068  JAVA        Override default value for JAVA
2069  JAVAC       Override default value for JAVAC
2070  JAVAH       Override default value for JAVAH
2071  JAR         Override default value for JAR
2072  JARSIGNER   Override default value for JARSIGNER
2073  CC          C compiler command
2074  CFLAGS      C compiler flags
2075  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2076              nonstandard directory <lib dir>
2077  LIBS        libraries to pass to the linker, e.g. -l<library>
2078  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2079              you have headers in a nonstandard directory <include dir>
2080  CXX         C++ compiler command
2081  CXXFLAGS    C++ compiler flags
2082  CPP         C preprocessor
2083  CXXCPP      C++ preprocessor
2084  AS          Override default value for AS
2085  AR          Override default value for AR
2086  LIPO        Override default value for LIPO
2087  STRIP       Override default value for STRIP
2088  NM          Override default value for NM
2089  GNM         Override default value for GNM
2090  OBJCOPY     Override default value for OBJCOPY
2091  OBJDUMP     Override default value for OBJDUMP
2092  BUILD_CC    Override default value for BUILD_CC
2093  BUILD_CXX   Override default value for BUILD_CXX
2094  BUILD_LD    Override default value for BUILD_LD
2095  JTREGEXE    Override default value for JTREGEXE
2096  XMKMF       Path to xmkmf, Makefile generator for X Window System
2097  FREETYPE_CFLAGS
2098              C compiler flags for FREETYPE, overriding pkg-config
2099  FREETYPE_LIBS
2100              linker flags for FREETYPE, overriding pkg-config
2101  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2102  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2103  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2104  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2105  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2106  PNG_LIBS    linker flags for PNG, overriding pkg-config
2107  LIBFFI_CFLAGS
2108              C compiler flags for LIBFFI, overriding pkg-config
2109  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2110  CCACHE      Override default value for CCACHE
2111
2112Use these variables to override the choices made by `configure' or to help
2113it to find libraries and programs with nonstandard names/locations.
2114
2115Report bugs to <build-dev@openjdk.java.net>.
2116OpenJDK home page: <http://openjdk.java.net>.
2117_ACEOF
2118ac_status=$?
2119fi
2120
2121if test "$ac_init_help" = "recursive"; then
2122  # If there are subdirs, report their specific --help.
2123  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2124    test -d "$ac_dir" ||
2125      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2126      continue
2127    ac_builddir=.
2128
2129case "$ac_dir" in
2130.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2131*)
2132  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2133  # A ".." for each directory in $ac_dir_suffix.
2134  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2135  case $ac_top_builddir_sub in
2136  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2137  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2138  esac ;;
2139esac
2140ac_abs_top_builddir=$ac_pwd
2141ac_abs_builddir=$ac_pwd$ac_dir_suffix
2142# for backward compatibility:
2143ac_top_builddir=$ac_top_build_prefix
2144
2145case $srcdir in
2146  .)  # We are building in place.
2147    ac_srcdir=.
2148    ac_top_srcdir=$ac_top_builddir_sub
2149    ac_abs_top_srcdir=$ac_pwd ;;
2150  [\\/]* | ?:[\\/]* )  # Absolute name.
2151    ac_srcdir=$srcdir$ac_dir_suffix;
2152    ac_top_srcdir=$srcdir
2153    ac_abs_top_srcdir=$srcdir ;;
2154  *) # Relative name.
2155    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2156    ac_top_srcdir=$ac_top_build_prefix$srcdir
2157    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2158esac
2159ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2160
2161    cd "$ac_dir" || { ac_status=$?; continue; }
2162    # Check for guested configure.
2163    if test -f "$ac_srcdir/configure.gnu"; then
2164      echo &&
2165      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2166    elif test -f "$ac_srcdir/configure"; then
2167      echo &&
2168      $SHELL "$ac_srcdir/configure" --help=recursive
2169    else
2170      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2171    fi || ac_status=$?
2172    cd "$ac_pwd" || { ac_status=$?; break; }
2173  done
2174fi
2175
2176test -n "$ac_init_help" && exit $ac_status
2177if $ac_init_version; then
2178  cat <<\_ACEOF
2179OpenJDK configure jdk9
2180generated by GNU Autoconf 2.69
2181
2182Copyright (C) 2012 Free Software Foundation, Inc.
2183This configure script is free software; the Free Software Foundation
2184gives unlimited permission to copy, distribute and modify it.
2185_ACEOF
2186  exit
2187fi
2188
2189## ------------------------ ##
2190## Autoconf initialization. ##
2191## ------------------------ ##
2192
2193# ac_fn_c_try_compile LINENO
2194# --------------------------
2195# Try to compile conftest.$ac_ext, and return whether this succeeded.
2196ac_fn_c_try_compile ()
2197{
2198  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199  rm -f conftest.$ac_objext
2200  if { { ac_try="$ac_compile"
2201case "(($ac_try" in
2202  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2203  *) ac_try_echo=$ac_try;;
2204esac
2205eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2206$as_echo "$ac_try_echo"; } >&5
2207  (eval "$ac_compile") 2>conftest.err
2208  ac_status=$?
2209  if test -s conftest.err; then
2210    grep -v '^ *+' conftest.err >conftest.er1
2211    cat conftest.er1 >&5
2212    mv -f conftest.er1 conftest.err
2213  fi
2214  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2215  test $ac_status = 0; } && {
2216	 test -z "$ac_c_werror_flag" ||
2217	 test ! -s conftest.err
2218       } && test -s conftest.$ac_objext; then :
2219  ac_retval=0
2220else
2221  $as_echo "$as_me: failed program was:" >&5
2222sed 's/^/| /' conftest.$ac_ext >&5
2223
2224	ac_retval=1
2225fi
2226  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2227  as_fn_set_status $ac_retval
2228
2229} # ac_fn_c_try_compile
2230
2231# ac_fn_cxx_try_compile LINENO
2232# ----------------------------
2233# Try to compile conftest.$ac_ext, and return whether this succeeded.
2234ac_fn_cxx_try_compile ()
2235{
2236  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2237  rm -f conftest.$ac_objext
2238  if { { ac_try="$ac_compile"
2239case "(($ac_try" in
2240  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2241  *) ac_try_echo=$ac_try;;
2242esac
2243eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2244$as_echo "$ac_try_echo"; } >&5
2245  (eval "$ac_compile") 2>conftest.err
2246  ac_status=$?
2247  if test -s conftest.err; then
2248    grep -v '^ *+' conftest.err >conftest.er1
2249    cat conftest.er1 >&5
2250    mv -f conftest.er1 conftest.err
2251  fi
2252  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2253  test $ac_status = 0; } && {
2254	 test -z "$ac_cxx_werror_flag" ||
2255	 test ! -s conftest.err
2256       } && test -s conftest.$ac_objext; then :
2257  ac_retval=0
2258else
2259  $as_echo "$as_me: failed program was:" >&5
2260sed 's/^/| /' conftest.$ac_ext >&5
2261
2262	ac_retval=1
2263fi
2264  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2265  as_fn_set_status $ac_retval
2266
2267} # ac_fn_cxx_try_compile
2268
2269# ac_fn_c_try_cpp LINENO
2270# ----------------------
2271# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2272ac_fn_c_try_cpp ()
2273{
2274  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2275  if { { ac_try="$ac_cpp conftest.$ac_ext"
2276case "(($ac_try" in
2277  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2278  *) ac_try_echo=$ac_try;;
2279esac
2280eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2281$as_echo "$ac_try_echo"; } >&5
2282  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2283  ac_status=$?
2284  if test -s conftest.err; then
2285    grep -v '^ *+' conftest.err >conftest.er1
2286    cat conftest.er1 >&5
2287    mv -f conftest.er1 conftest.err
2288  fi
2289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2290  test $ac_status = 0; } > conftest.i && {
2291	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2292	 test ! -s conftest.err
2293       }; then :
2294  ac_retval=0
2295else
2296  $as_echo "$as_me: failed program was:" >&5
2297sed 's/^/| /' conftest.$ac_ext >&5
2298
2299    ac_retval=1
2300fi
2301  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2302  as_fn_set_status $ac_retval
2303
2304} # ac_fn_c_try_cpp
2305
2306# ac_fn_cxx_try_cpp LINENO
2307# ------------------------
2308# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2309ac_fn_cxx_try_cpp ()
2310{
2311  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2312  if { { ac_try="$ac_cpp conftest.$ac_ext"
2313case "(($ac_try" in
2314  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2315  *) ac_try_echo=$ac_try;;
2316esac
2317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2318$as_echo "$ac_try_echo"; } >&5
2319  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2320  ac_status=$?
2321  if test -s conftest.err; then
2322    grep -v '^ *+' conftest.err >conftest.er1
2323    cat conftest.er1 >&5
2324    mv -f conftest.er1 conftest.err
2325  fi
2326  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2327  test $ac_status = 0; } > conftest.i && {
2328	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2329	 test ! -s conftest.err
2330       }; then :
2331  ac_retval=0
2332else
2333  $as_echo "$as_me: failed program was:" >&5
2334sed 's/^/| /' conftest.$ac_ext >&5
2335
2336    ac_retval=1
2337fi
2338  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2339  as_fn_set_status $ac_retval
2340
2341} # ac_fn_cxx_try_cpp
2342
2343# ac_fn_c_try_link LINENO
2344# -----------------------
2345# Try to link conftest.$ac_ext, and return whether this succeeded.
2346ac_fn_c_try_link ()
2347{
2348  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2349  rm -f conftest.$ac_objext conftest$ac_exeext
2350  if { { ac_try="$ac_link"
2351case "(($ac_try" in
2352  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2353  *) ac_try_echo=$ac_try;;
2354esac
2355eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2356$as_echo "$ac_try_echo"; } >&5
2357  (eval "$ac_link") 2>conftest.err
2358  ac_status=$?
2359  if test -s conftest.err; then
2360    grep -v '^ *+' conftest.err >conftest.er1
2361    cat conftest.er1 >&5
2362    mv -f conftest.er1 conftest.err
2363  fi
2364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2365  test $ac_status = 0; } && {
2366	 test -z "$ac_c_werror_flag" ||
2367	 test ! -s conftest.err
2368       } && test -s conftest$ac_exeext && {
2369	 test "$cross_compiling" = yes ||
2370	 test -x conftest$ac_exeext
2371       }; then :
2372  ac_retval=0
2373else
2374  $as_echo "$as_me: failed program was:" >&5
2375sed 's/^/| /' conftest.$ac_ext >&5
2376
2377	ac_retval=1
2378fi
2379  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2380  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2381  # interfere with the next link command; also delete a directory that is
2382  # left behind by Apple's compiler.  We do this before executing the actions.
2383  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2384  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2385  as_fn_set_status $ac_retval
2386
2387} # ac_fn_c_try_link
2388
2389# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2390# ---------------------------------------------------------
2391# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2392# the include files in INCLUDES and setting the cache variable VAR
2393# accordingly.
2394ac_fn_cxx_check_header_mongrel ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  if eval \${$3+:} false; then :
2398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2399$as_echo_n "checking for $2... " >&6; }
2400if eval \${$3+:} false; then :
2401  $as_echo_n "(cached) " >&6
2402fi
2403eval ac_res=\$$3
2404	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2405$as_echo "$ac_res" >&6; }
2406else
2407  # Is the header compilable?
2408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2409$as_echo_n "checking $2 usability... " >&6; }
2410cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2411/* end confdefs.h.  */
2412$4
2413#include <$2>
2414_ACEOF
2415if ac_fn_cxx_try_compile "$LINENO"; then :
2416  ac_header_compiler=yes
2417else
2418  ac_header_compiler=no
2419fi
2420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2422$as_echo "$ac_header_compiler" >&6; }
2423
2424# Is the header present?
2425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2426$as_echo_n "checking $2 presence... " >&6; }
2427cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2428/* end confdefs.h.  */
2429#include <$2>
2430_ACEOF
2431if ac_fn_cxx_try_cpp "$LINENO"; then :
2432  ac_header_preproc=yes
2433else
2434  ac_header_preproc=no
2435fi
2436rm -f conftest.err conftest.i conftest.$ac_ext
2437{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2438$as_echo "$ac_header_preproc" >&6; }
2439
2440# So?  What about this header?
2441case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2442  yes:no: )
2443    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2444$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2445    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2446$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2447    ;;
2448  no:yes:* )
2449    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2450$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2451    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2452$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2454$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2456$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2457    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2458$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2459( $as_echo "## ----------------------------------------- ##
2460## Report this to build-dev@openjdk.java.net ##
2461## ----------------------------------------- ##"
2462     ) | sed "s/^/$as_me: WARNING:     /" >&2
2463    ;;
2464esac
2465  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2466$as_echo_n "checking for $2... " >&6; }
2467if eval \${$3+:} false; then :
2468  $as_echo_n "(cached) " >&6
2469else
2470  eval "$3=\$ac_header_compiler"
2471fi
2472eval ac_res=\$$3
2473	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2474$as_echo "$ac_res" >&6; }
2475fi
2476  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2477
2478} # ac_fn_cxx_check_header_mongrel
2479
2480# ac_fn_cxx_try_run LINENO
2481# ------------------------
2482# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2483# that executables *can* be run.
2484ac_fn_cxx_try_run ()
2485{
2486  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2487  if { { ac_try="$ac_link"
2488case "(($ac_try" in
2489  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2490  *) ac_try_echo=$ac_try;;
2491esac
2492eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2493$as_echo "$ac_try_echo"; } >&5
2494  (eval "$ac_link") 2>&5
2495  ac_status=$?
2496  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2497  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2498  { { case "(($ac_try" in
2499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500  *) ac_try_echo=$ac_try;;
2501esac
2502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503$as_echo "$ac_try_echo"; } >&5
2504  (eval "$ac_try") 2>&5
2505  ac_status=$?
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; }; }; then :
2508  ac_retval=0
2509else
2510  $as_echo "$as_me: program exited with status $ac_status" >&5
2511       $as_echo "$as_me: failed program was:" >&5
2512sed 's/^/| /' conftest.$ac_ext >&5
2513
2514       ac_retval=$ac_status
2515fi
2516  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2517  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2518  as_fn_set_status $ac_retval
2519
2520} # ac_fn_cxx_try_run
2521
2522# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2523# ---------------------------------------------------------
2524# Tests whether HEADER exists and can be compiled using the include files in
2525# INCLUDES, setting the cache variable VAR accordingly.
2526ac_fn_cxx_check_header_compile ()
2527{
2528  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2529  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2530$as_echo_n "checking for $2... " >&6; }
2531if eval \${$3+:} false; then :
2532  $as_echo_n "(cached) " >&6
2533else
2534  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2535/* end confdefs.h.  */
2536$4
2537#include <$2>
2538_ACEOF
2539if ac_fn_cxx_try_compile "$LINENO"; then :
2540  eval "$3=yes"
2541else
2542  eval "$3=no"
2543fi
2544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2545fi
2546eval ac_res=\$$3
2547	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2548$as_echo "$ac_res" >&6; }
2549  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2550
2551} # ac_fn_cxx_check_header_compile
2552
2553# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2554# ----------------------------------------------
2555# Tries to find the compile-time value of EXPR in a program that includes
2556# INCLUDES, setting VAR accordingly. Returns whether the value could be
2557# computed
2558ac_fn_cxx_compute_int ()
2559{
2560  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2561  if test "$cross_compiling" = yes; then
2562    # Depending upon the size, compute the lo and hi bounds.
2563cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2564/* end confdefs.h.  */
2565$4
2566int
2567main ()
2568{
2569static int test_array [1 - 2 * !(($2) >= 0)];
2570test_array [0] = 0;
2571return test_array [0];
2572
2573  ;
2574  return 0;
2575}
2576_ACEOF
2577if ac_fn_cxx_try_compile "$LINENO"; then :
2578  ac_lo=0 ac_mid=0
2579  while :; do
2580    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2581/* end confdefs.h.  */
2582$4
2583int
2584main ()
2585{
2586static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2587test_array [0] = 0;
2588return test_array [0];
2589
2590  ;
2591  return 0;
2592}
2593_ACEOF
2594if ac_fn_cxx_try_compile "$LINENO"; then :
2595  ac_hi=$ac_mid; break
2596else
2597  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2598			if test $ac_lo -le $ac_mid; then
2599			  ac_lo= ac_hi=
2600			  break
2601			fi
2602			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2603fi
2604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2605  done
2606else
2607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2608/* end confdefs.h.  */
2609$4
2610int
2611main ()
2612{
2613static int test_array [1 - 2 * !(($2) < 0)];
2614test_array [0] = 0;
2615return test_array [0];
2616
2617  ;
2618  return 0;
2619}
2620_ACEOF
2621if ac_fn_cxx_try_compile "$LINENO"; then :
2622  ac_hi=-1 ac_mid=-1
2623  while :; do
2624    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2625/* end confdefs.h.  */
2626$4
2627int
2628main ()
2629{
2630static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2631test_array [0] = 0;
2632return test_array [0];
2633
2634  ;
2635  return 0;
2636}
2637_ACEOF
2638if ac_fn_cxx_try_compile "$LINENO"; then :
2639  ac_lo=$ac_mid; break
2640else
2641  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2642			if test $ac_mid -le $ac_hi; then
2643			  ac_lo= ac_hi=
2644			  break
2645			fi
2646			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2647fi
2648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2649  done
2650else
2651  ac_lo= ac_hi=
2652fi
2653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2654fi
2655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2656# Binary search between lo and hi bounds.
2657while test "x$ac_lo" != "x$ac_hi"; do
2658  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2659  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2660/* end confdefs.h.  */
2661$4
2662int
2663main ()
2664{
2665static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2666test_array [0] = 0;
2667return test_array [0];
2668
2669  ;
2670  return 0;
2671}
2672_ACEOF
2673if ac_fn_cxx_try_compile "$LINENO"; then :
2674  ac_hi=$ac_mid
2675else
2676  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2677fi
2678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2679done
2680case $ac_lo in #((
2681?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2682'') ac_retval=1 ;;
2683esac
2684  else
2685    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686/* end confdefs.h.  */
2687$4
2688static long int longval () { return $2; }
2689static unsigned long int ulongval () { return $2; }
2690#include <stdio.h>
2691#include <stdlib.h>
2692int
2693main ()
2694{
2695
2696  FILE *f = fopen ("conftest.val", "w");
2697  if (! f)
2698    return 1;
2699  if (($2) < 0)
2700    {
2701      long int i = longval ();
2702      if (i != ($2))
2703	return 1;
2704      fprintf (f, "%ld", i);
2705    }
2706  else
2707    {
2708      unsigned long int i = ulongval ();
2709      if (i != ($2))
2710	return 1;
2711      fprintf (f, "%lu", i);
2712    }
2713  /* Do not output a trailing newline, as this causes \r\n confusion
2714     on some platforms.  */
2715  return ferror (f) || fclose (f) != 0;
2716
2717  ;
2718  return 0;
2719}
2720_ACEOF
2721if ac_fn_cxx_try_run "$LINENO"; then :
2722  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2723else
2724  ac_retval=1
2725fi
2726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2727  conftest.$ac_objext conftest.beam conftest.$ac_ext
2728rm -f conftest.val
2729
2730  fi
2731  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2732  as_fn_set_status $ac_retval
2733
2734} # ac_fn_cxx_compute_int
2735
2736# ac_fn_cxx_try_link LINENO
2737# -------------------------
2738# Try to link conftest.$ac_ext, and return whether this succeeded.
2739ac_fn_cxx_try_link ()
2740{
2741  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2742  rm -f conftest.$ac_objext conftest$ac_exeext
2743  if { { ac_try="$ac_link"
2744case "(($ac_try" in
2745  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2746  *) ac_try_echo=$ac_try;;
2747esac
2748eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2749$as_echo "$ac_try_echo"; } >&5
2750  (eval "$ac_link") 2>conftest.err
2751  ac_status=$?
2752  if test -s conftest.err; then
2753    grep -v '^ *+' conftest.err >conftest.er1
2754    cat conftest.er1 >&5
2755    mv -f conftest.er1 conftest.err
2756  fi
2757  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2758  test $ac_status = 0; } && {
2759	 test -z "$ac_cxx_werror_flag" ||
2760	 test ! -s conftest.err
2761       } && test -s conftest$ac_exeext && {
2762	 test "$cross_compiling" = yes ||
2763	 test -x conftest$ac_exeext
2764       }; then :
2765  ac_retval=0
2766else
2767  $as_echo "$as_me: failed program was:" >&5
2768sed 's/^/| /' conftest.$ac_ext >&5
2769
2770	ac_retval=1
2771fi
2772  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2773  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2774  # interfere with the next link command; also delete a directory that is
2775  # left behind by Apple's compiler.  We do this before executing the actions.
2776  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2777  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2778  as_fn_set_status $ac_retval
2779
2780} # ac_fn_cxx_try_link
2781
2782# ac_fn_cxx_check_func LINENO FUNC VAR
2783# ------------------------------------
2784# Tests whether FUNC exists, setting the cache variable VAR accordingly
2785ac_fn_cxx_check_func ()
2786{
2787  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2789$as_echo_n "checking for $2... " >&6; }
2790if eval \${$3+:} false; then :
2791  $as_echo_n "(cached) " >&6
2792else
2793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794/* end confdefs.h.  */
2795/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2796   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2797#define $2 innocuous_$2
2798
2799/* System header to define __stub macros and hopefully few prototypes,
2800    which can conflict with char $2 (); below.
2801    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2802    <limits.h> exists even on freestanding compilers.  */
2803
2804#ifdef __STDC__
2805# include <limits.h>
2806#else
2807# include <assert.h>
2808#endif
2809
2810#undef $2
2811
2812/* Override any GCC internal prototype to avoid an error.
2813   Use char because int might match the return type of a GCC
2814   builtin and then its argument prototype would still apply.  */
2815#ifdef __cplusplus
2816extern "C"
2817#endif
2818char $2 ();
2819/* The GNU C library defines this for functions which it implements
2820    to always fail with ENOSYS.  Some functions are actually named
2821    something starting with __ and the normal name is an alias.  */
2822#if defined __stub_$2 || defined __stub___$2
2823choke me
2824#endif
2825
2826int
2827main ()
2828{
2829return $2 ();
2830  ;
2831  return 0;
2832}
2833_ACEOF
2834if ac_fn_cxx_try_link "$LINENO"; then :
2835  eval "$3=yes"
2836else
2837  eval "$3=no"
2838fi
2839rm -f core conftest.err conftest.$ac_objext \
2840    conftest$ac_exeext conftest.$ac_ext
2841fi
2842eval ac_res=\$$3
2843	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2844$as_echo "$ac_res" >&6; }
2845  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2846
2847} # ac_fn_cxx_check_func
2848
2849# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2850# -------------------------------------------------------
2851# Tests whether HEADER exists and can be compiled using the include files in
2852# INCLUDES, setting the cache variable VAR accordingly.
2853ac_fn_c_check_header_compile ()
2854{
2855  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2857$as_echo_n "checking for $2... " >&6; }
2858if eval \${$3+:} false; then :
2859  $as_echo_n "(cached) " >&6
2860else
2861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2862/* end confdefs.h.  */
2863$4
2864#include <$2>
2865_ACEOF
2866if ac_fn_c_try_compile "$LINENO"; then :
2867  eval "$3=yes"
2868else
2869  eval "$3=no"
2870fi
2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872fi
2873eval ac_res=\$$3
2874	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2875$as_echo "$ac_res" >&6; }
2876  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2877
2878} # ac_fn_c_check_header_compile
2879cat >config.log <<_ACEOF
2880This file contains any messages produced by compilers while
2881running configure, to aid debugging if configure makes a mistake.
2882
2883It was created by OpenJDK $as_me jdk9, which was
2884generated by GNU Autoconf 2.69.  Invocation command line was
2885
2886  $ $0 $@
2887
2888_ACEOF
2889exec 5>>config.log
2890{
2891cat <<_ASUNAME
2892## --------- ##
2893## Platform. ##
2894## --------- ##
2895
2896hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2897uname -m = `(uname -m) 2>/dev/null || echo unknown`
2898uname -r = `(uname -r) 2>/dev/null || echo unknown`
2899uname -s = `(uname -s) 2>/dev/null || echo unknown`
2900uname -v = `(uname -v) 2>/dev/null || echo unknown`
2901
2902/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2903/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2904
2905/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2906/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2907/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2908/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2909/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2910/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2911/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2912
2913_ASUNAME
2914
2915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2916for as_dir in $PATH
2917do
2918  IFS=$as_save_IFS
2919  test -z "$as_dir" && as_dir=.
2920    $as_echo "PATH: $as_dir"
2921  done
2922IFS=$as_save_IFS
2923
2924} >&5
2925
2926cat >&5 <<_ACEOF
2927
2928
2929## ----------- ##
2930## Core tests. ##
2931## ----------- ##
2932
2933_ACEOF
2934
2935
2936# Keep a trace of the command line.
2937# Strip out --no-create and --no-recursion so they do not pile up.
2938# Strip out --silent because we don't want to record it for future runs.
2939# Also quote any args containing shell meta-characters.
2940# Make two passes to allow for proper duplicate-argument suppression.
2941ac_configure_args=
2942ac_configure_args0=
2943ac_configure_args1=
2944ac_must_keep_next=false
2945for ac_pass in 1 2
2946do
2947  for ac_arg
2948  do
2949    case $ac_arg in
2950    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2951    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2952    | -silent | --silent | --silen | --sile | --sil)
2953      continue ;;
2954    *\'*)
2955      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2956    esac
2957    case $ac_pass in
2958    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2959    2)
2960      as_fn_append ac_configure_args1 " '$ac_arg'"
2961      if test $ac_must_keep_next = true; then
2962	ac_must_keep_next=false # Got value, back to normal.
2963      else
2964	case $ac_arg in
2965	  *=* | --config-cache | -C | -disable-* | --disable-* \
2966	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2967	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2968	  | -with-* | --with-* | -without-* | --without-* | --x)
2969	    case "$ac_configure_args0 " in
2970	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2971	    esac
2972	    ;;
2973	  -* ) ac_must_keep_next=true ;;
2974	esac
2975      fi
2976      as_fn_append ac_configure_args " '$ac_arg'"
2977      ;;
2978    esac
2979  done
2980done
2981{ ac_configure_args0=; unset ac_configure_args0;}
2982{ ac_configure_args1=; unset ac_configure_args1;}
2983
2984# When interrupted or exit'd, cleanup temporary files, and complete
2985# config.log.  We remove comments because anyway the quotes in there
2986# would cause problems or look ugly.
2987# WARNING: Use '\'' to represent an apostrophe within the trap.
2988# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2989trap 'exit_status=$?
2990  # Save into config.log some information that might help in debugging.
2991  {
2992    echo
2993
2994    $as_echo "## ---------------- ##
2995## Cache variables. ##
2996## ---------------- ##"
2997    echo
2998    # The following way of writing the cache mishandles newlines in values,
2999(
3000  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3001    eval ac_val=\$$ac_var
3002    case $ac_val in #(
3003    *${as_nl}*)
3004      case $ac_var in #(
3005      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3006$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3007      esac
3008      case $ac_var in #(
3009      _ | IFS | as_nl) ;; #(
3010      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3011      *) { eval $ac_var=; unset $ac_var;} ;;
3012      esac ;;
3013    esac
3014  done
3015  (set) 2>&1 |
3016    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3017    *${as_nl}ac_space=\ *)
3018      sed -n \
3019	"s/'\''/'\''\\\\'\'''\''/g;
3020	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3021      ;; #(
3022    *)
3023      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3024      ;;
3025    esac |
3026    sort
3027)
3028    echo
3029
3030    $as_echo "## ----------------- ##
3031## Output variables. ##
3032## ----------------- ##"
3033    echo
3034    for ac_var in $ac_subst_vars
3035    do
3036      eval ac_val=\$$ac_var
3037      case $ac_val in
3038      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3039      esac
3040      $as_echo "$ac_var='\''$ac_val'\''"
3041    done | sort
3042    echo
3043
3044    if test -n "$ac_subst_files"; then
3045      $as_echo "## ------------------- ##
3046## File substitutions. ##
3047## ------------------- ##"
3048      echo
3049      for ac_var in $ac_subst_files
3050      do
3051	eval ac_val=\$$ac_var
3052	case $ac_val in
3053	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3054	esac
3055	$as_echo "$ac_var='\''$ac_val'\''"
3056      done | sort
3057      echo
3058    fi
3059
3060    if test -s confdefs.h; then
3061      $as_echo "## ----------- ##
3062## confdefs.h. ##
3063## ----------- ##"
3064      echo
3065      cat confdefs.h
3066      echo
3067    fi
3068    test "$ac_signal" != 0 &&
3069      $as_echo "$as_me: caught signal $ac_signal"
3070    $as_echo "$as_me: exit $exit_status"
3071  } >&5
3072  rm -f core *.core core.conftest.* &&
3073    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3074    exit $exit_status
3075' 0
3076for ac_signal in 1 2 13 15; do
3077  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3078done
3079ac_signal=0
3080
3081# confdefs.h avoids OS command line length limits that DEFS can exceed.
3082rm -f -r conftest* confdefs.h
3083
3084$as_echo "/* confdefs.h */" > confdefs.h
3085
3086# Predefined preprocessor variables.
3087
3088cat >>confdefs.h <<_ACEOF
3089#define PACKAGE_NAME "$PACKAGE_NAME"
3090_ACEOF
3091
3092cat >>confdefs.h <<_ACEOF
3093#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3094_ACEOF
3095
3096cat >>confdefs.h <<_ACEOF
3097#define PACKAGE_VERSION "$PACKAGE_VERSION"
3098_ACEOF
3099
3100cat >>confdefs.h <<_ACEOF
3101#define PACKAGE_STRING "$PACKAGE_STRING"
3102_ACEOF
3103
3104cat >>confdefs.h <<_ACEOF
3105#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3106_ACEOF
3107
3108cat >>confdefs.h <<_ACEOF
3109#define PACKAGE_URL "$PACKAGE_URL"
3110_ACEOF
3111
3112
3113# Let the site file select an alternate cache file if it wants to.
3114# Prefer an explicitly selected file to automatically selected ones.
3115ac_site_file1=NONE
3116ac_site_file2=NONE
3117if test -n "$CONFIG_SITE"; then
3118  # We do not want a PATH search for config.site.
3119  case $CONFIG_SITE in #((
3120    -*)  ac_site_file1=./$CONFIG_SITE;;
3121    */*) ac_site_file1=$CONFIG_SITE;;
3122    *)   ac_site_file1=./$CONFIG_SITE;;
3123  esac
3124elif test "x$prefix" != xNONE; then
3125  ac_site_file1=$prefix/share/config.site
3126  ac_site_file2=$prefix/etc/config.site
3127else
3128  ac_site_file1=$ac_default_prefix/share/config.site
3129  ac_site_file2=$ac_default_prefix/etc/config.site
3130fi
3131for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3132do
3133  test "x$ac_site_file" = xNONE && continue
3134  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3135    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3136$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3137    sed 's/^/| /' "$ac_site_file" >&5
3138    . "$ac_site_file" \
3139      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3140$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3141as_fn_error $? "failed to load site script $ac_site_file
3142See \`config.log' for more details" "$LINENO" 5; }
3143  fi
3144done
3145
3146if test -r "$cache_file"; then
3147  # Some versions of bash will fail to source /dev/null (special files
3148  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3149  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3150    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3151$as_echo "$as_me: loading cache $cache_file" >&6;}
3152    case $cache_file in
3153      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3154      *)                      . "./$cache_file";;
3155    esac
3156  fi
3157else
3158  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3159$as_echo "$as_me: creating cache $cache_file" >&6;}
3160  >$cache_file
3161fi
3162
3163# Check that the precious variables saved in the cache have kept the same
3164# value.
3165ac_cache_corrupted=false
3166for ac_var in $ac_precious_vars; do
3167  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3168  eval ac_new_set=\$ac_env_${ac_var}_set
3169  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3170  eval ac_new_val=\$ac_env_${ac_var}_value
3171  case $ac_old_set,$ac_new_set in
3172    set,)
3173      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3174$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3175      ac_cache_corrupted=: ;;
3176    ,set)
3177      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3178$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3179      ac_cache_corrupted=: ;;
3180    ,);;
3181    *)
3182      if test "x$ac_old_val" != "x$ac_new_val"; then
3183	# differences in whitespace do not lead to failure.
3184	ac_old_val_w=`echo x $ac_old_val`
3185	ac_new_val_w=`echo x $ac_new_val`
3186	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3187	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3188$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3189	  ac_cache_corrupted=:
3190	else
3191	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3192$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3193	  eval $ac_var=\$ac_old_val
3194	fi
3195	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3196$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3197	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3198$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3199      fi;;
3200  esac
3201  # Pass precious variables to config.status.
3202  if test "$ac_new_set" = set; then
3203    case $ac_new_val in
3204    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3205    *) ac_arg=$ac_var=$ac_new_val ;;
3206    esac
3207    case " $ac_configure_args " in
3208      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3209      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3210    esac
3211  fi
3212done
3213if $ac_cache_corrupted; then
3214  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3215$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3216  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3217$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3218  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3219fi
3220## -------------------- ##
3221## Main body of script. ##
3222## -------------------- ##
3223
3224ac_ext=c
3225ac_cpp='$CPP $CPPFLAGS'
3226ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3227ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3228ac_compiler_gnu=$ac_cv_c_compiler_gnu
3229
3230
3231
3232ac_aux_dir=
3233for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3234  if 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/install.sh"; then
3239    ac_aux_dir=$ac_dir
3240    ac_install_sh="$ac_aux_dir/install.sh -c"
3241    break
3242  elif test -f "$ac_dir/shtool"; then
3243    ac_aux_dir=$ac_dir
3244    ac_install_sh="$ac_aux_dir/shtool install -c"
3245    break
3246  fi
3247done
3248if test -z "$ac_aux_dir"; then
3249  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
3250fi
3251
3252# These three variables are undocumented and unsupported,
3253# and are intended to be withdrawn in a future Autoconf release.
3254# They can cause serious problems if a builder's source tree is in a directory
3255# whose full name contains unusual characters.
3256ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3257ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3258ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3259
3260
3261# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3262
3263#
3264# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3265# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3266#
3267# This code is free software; you can redistribute it and/or modify it
3268# under the terms of the GNU General Public License version 2 only, as
3269# published by the Free Software Foundation.  Oracle designates this
3270# particular file as subject to the "Classpath" exception as provided
3271# by Oracle in the LICENSE file that accompanied this code.
3272#
3273# This code is distributed in the hope that it will be useful, but WITHOUT
3274# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3275# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3276# version 2 for more details (a copy is included in the LICENSE file that
3277# accompanied this code).
3278#
3279# You should have received a copy of the GNU General Public License version
3280# 2 along with this work; if not, write to the Free Software Foundation,
3281# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3282#
3283# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3284# or visit www.oracle.com if you need additional information or have any
3285# questions.
3286#
3287
3288#
3289# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3290#
3291# This program is free software; you can redistribute it and/or modify
3292# it under the terms of the GNU General Public License as published by
3293# the Free Software Foundation; either version 2 of the License, or
3294# (at your option) any later version.
3295#
3296# This program is distributed in the hope that it will be useful, but
3297# WITHOUT ANY WARRANTY; without even the implied warranty of
3298# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3299# General Public License for more details.
3300#
3301# You should have received a copy of the GNU General Public License
3302# along with this program; if not, write to the Free Software
3303# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3304#
3305# As a special exception to the GNU General Public License, if you
3306# distribute this file as part of a program that contains a
3307# configuration script generated by Autoconf, you may include it under
3308# the same distribution terms that you use for the rest of that program.
3309
3310# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3311# ----------------------------------
3312# PKG_PROG_PKG_CONFIG
3313
3314# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3315#
3316# Check to see whether a particular set of modules exists.  Similar
3317# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3318#
3319#
3320# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3321# this or PKG_CHECK_MODULES is called, or make sure to call
3322# PKG_CHECK_EXISTS manually
3323# --------------------------------------------------------------
3324
3325
3326
3327# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3328# ---------------------------------------------
3329# _PKG_CONFIG
3330
3331# _PKG_SHORT_ERRORS_SUPPORTED
3332# -----------------------------
3333# _PKG_SHORT_ERRORS_SUPPORTED
3334
3335
3336# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3337# [ACTION-IF-NOT-FOUND])
3338#
3339#
3340# Note that if there is a possibility the first call to
3341# PKG_CHECK_MODULES might not happen, you should be sure to include an
3342# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3343#
3344#
3345# --------------------------------------------------------------
3346# PKG_CHECK_MODULES
3347
3348
3349# Include these first...
3350#
3351# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3352# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3353#
3354# This code is free software; you can redistribute it and/or modify it
3355# under the terms of the GNU General Public License version 2 only, as
3356# published by the Free Software Foundation.  Oracle designates this
3357# particular file as subject to the "Classpath" exception as provided
3358# by Oracle in the LICENSE file that accompanied this code.
3359#
3360# This code is distributed in the hope that it will be useful, but WITHOUT
3361# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3362# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3363# version 2 for more details (a copy is included in the LICENSE file that
3364# accompanied this code).
3365#
3366# You should have received a copy of the GNU General Public License version
3367# 2 along with this work; if not, write to the Free Software Foundation,
3368# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3369#
3370# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3371# or visit www.oracle.com if you need additional information or have any
3372# questions.
3373#
3374
3375# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3376# If so, then append $1 to $2 \
3377# Also set JVM_ARG_OK to true/false depending on outcome.
3378
3379
3380# Appends a string to a path variable, only adding the : when needed.
3381
3382
3383# Prepends a string to a path variable, only adding the : when needed.
3384
3385
3386# This will make sure the given variable points to a full and proper
3387# path. This means:
3388# 1) There will be no spaces in the path. On unix platforms,
3389#    spaces in the path will result in an error. On Windows,
3390#    the path will be rewritten using short-style to be space-free.
3391# 2) The path will be absolute, and it will be in unix-style (on
3392#     cygwin).
3393# $1: The name of the variable to fix
3394
3395
3396# This will make sure the given variable points to a executable
3397# with a full and proper path. This means:
3398# 1) There will be no spaces in the path. On unix platforms,
3399#    spaces in the path will result in an error. On Windows,
3400#    the path will be rewritten using short-style to be space-free.
3401# 2) The path will be absolute, and it will be in unix-style (on
3402#     cygwin).
3403# Any arguments given to the executable is preserved.
3404# If the input variable does not have a directory specification, then
3405# it need to be in the PATH.
3406# $1: The name of the variable to fix
3407
3408
3409
3410
3411# Register a --with argument but mark it as deprecated
3412# $1: The name of the with argument to deprecate, not including --with-
3413
3414
3415# Register a --enable argument but mark it as deprecated
3416# $1: The name of the with argument to deprecate, not including --enable-
3417# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3418
3419
3420
3421
3422# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3423# $1: variable to check
3424
3425
3426# Check that there are no unprocessed overridden variables left.
3427# If so, they are an incorrect argument and we will exit with an error.
3428
3429
3430# Setup a tool for the given variable. If correctly specified by the user,
3431# use that value, otherwise search for the tool using the supplied code snippet.
3432# $1: variable to set
3433# $2: code snippet to call to look for the tool
3434
3435
3436# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3437# $1: variable to set
3438# $2: executable name (or list of names) to look for
3439
3440
3441# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3442# $1: variable to set
3443# $2: executable name (or list of names) to look for
3444
3445
3446# Like BASIC_PATH_PROGS but fails if no tool was found.
3447# $1: variable to set
3448# $2: executable name (or list of names) to look for
3449
3450
3451# Like BASIC_SETUP_TOOL but fails if no tool was found.
3452# $1: variable to set
3453# $2: autoconf macro to call to look for the special tool
3454
3455
3456# Setup the most fundamental tools that relies on not much else to set up,
3457# but is used by much of the early bootstrap code.
3458
3459
3460# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3461
3462
3463# Evaluates platform specific overrides for devkit variables.
3464# $1: Name of variable
3465
3466
3467
3468
3469
3470
3471#%%% Simple tools %%%
3472
3473# Check if we have found a usable version of make
3474# $1: the path to a potential make binary (or empty)
3475# $2: the description on how we found this
3476
3477
3478
3479
3480# Goes looking for a usable version of GNU make.
3481
3482
3483
3484
3485
3486
3487# Check if build directory is on local disk. If not possible to determine,
3488# we prefer to claim it's local.
3489# Argument 1: directory to test
3490# Argument 2: what to do if it is on local disk
3491# Argument 3: what to do otherwise (remote disk or failure)
3492
3493
3494# Check that source files have basic read permissions set. This might
3495# not be the case in cygwin in certain conditions.
3496
3497
3498
3499
3500# Check for support for specific options in bash
3501
3502
3503#
3504# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3506#
3507# This code is free software; you can redistribute it and/or modify it
3508# under the terms of the GNU General Public License version 2 only, as
3509# published by the Free Software Foundation.  Oracle designates this
3510# particular file as subject to the "Classpath" exception as provided
3511# by Oracle in the LICENSE file that accompanied this code.
3512#
3513# This code is distributed in the hope that it will be useful, but WITHOUT
3514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3516# version 2 for more details (a copy is included in the LICENSE file that
3517# accompanied this code).
3518#
3519# You should have received a copy of the GNU General Public License version
3520# 2 along with this work; if not, write to the Free Software Foundation,
3521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3522#
3523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3524# or visit www.oracle.com if you need additional information or have any
3525# questions.
3526#
3527
3528
3529
3530
3531
3532# Helper function which possibly converts a path using DOS-style short mode.
3533# If so, the updated path is stored in $new_path.
3534# $1: The path to check
3535
3536
3537# Helper function which possibly converts a path using DOS-style short mode.
3538# If so, the updated path is stored in $new_path.
3539# $1: The path to check
3540
3541
3542# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3543# and could probably be heavily simplified. However, all changes in this
3544# area tend to need lot of testing in different scenarios, and in lack of
3545# proper unit testing, cleaning this up has not been deemed worth the effort
3546# at the moment.
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3557
3558
3559
3560
3561#
3562# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3563# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3564#
3565# This code is free software; you can redistribute it and/or modify it
3566# under the terms of the GNU General Public License version 2 only, as
3567# published by the Free Software Foundation.  Oracle designates this
3568# particular file as subject to the "Classpath" exception as provided
3569# by Oracle in the LICENSE file that accompanied this code.
3570#
3571# This code is distributed in the hope that it will be useful, but WITHOUT
3572# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3573# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3574# version 2 for more details (a copy is included in the LICENSE file that
3575# accompanied this code).
3576#
3577# You should have received a copy of the GNU General Public License version
3578# 2 along with this work; if not, write to the Free Software Foundation,
3579# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3580#
3581# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3582# or visit www.oracle.com if you need additional information or have any
3583# questions.
3584#
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596# ... then the rest
3597#
3598# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3599# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3600#
3601# This code is free software; you can redistribute it and/or modify it
3602# under the terms of the GNU General Public License version 2 only, as
3603# published by the Free Software Foundation.  Oracle designates this
3604# particular file as subject to the "Classpath" exception as provided
3605# by Oracle in the LICENSE file that accompanied this code.
3606#
3607# This code is distributed in the hope that it will be useful, but WITHOUT
3608# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3609# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3610# version 2 for more details (a copy is included in the LICENSE file that
3611# accompanied this code).
3612#
3613# You should have received a copy of the GNU General Public License version
3614# 2 along with this work; if not, write to the Free Software Foundation,
3615# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3616#
3617# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3618# or visit www.oracle.com if you need additional information or have any
3619# questions.
3620#
3621
3622########################################################################
3623# This file handles detection of the Boot JDK. The Boot JDK detection
3624# process has been developed as a response to solve a complex real-world
3625# problem. Initially, it was simple, but it has grown as platform after
3626# platform, idiosyncracy after idiosyncracy has been supported.
3627#
3628# The basic idea is this:
3629# 1) You need an acceptable *) JDK to use as a Boot JDK
3630# 2) There are several ways to locate a JDK, that are mostly platform
3631#    dependent **)
3632# 3) You can have multiple JDKs installed
3633# 4) If possible, configure should try to dig out an acceptable JDK
3634#    automatically, without having to resort to command-line options
3635#
3636# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3637#     javac) and not a JRE, etc.
3638#
3639# **) On Windows we typically use a well-known path.
3640#     On MacOSX we typically use the tool java_home.
3641#     On Linux we typically find javac in the $PATH, and then follow a
3642#     chain of symlinks that often ends up in a real JDK.
3643#
3644# This leads to the code where we check in different ways to locate a
3645# JDK, and if one is found, check if it is acceptable. If not, we print
3646# our reasons for rejecting it (useful when debugging non-working
3647# configure situations) and continue checking the next one.
3648########################################################################
3649
3650# Execute the check given as argument, and verify the result
3651# If the Boot JDK was previously found, do nothing
3652# $1 A command line (typically autoconf macro) to execute
3653
3654
3655# Test: Is bootjdk explicitely set by command line arguments?
3656
3657
3658# Test: Is bootjdk available from builddeps?
3659
3660
3661# Test: Is $JAVA_HOME set?
3662
3663
3664# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3665
3666
3667# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3668# $1: Argument to the java_home binary (optional)
3669
3670
3671# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3672
3673
3674# Look for a jdk in the given path. If there are multiple, try to select the newest.
3675# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3676# $1 = Path to directory containing jdk installations.
3677# $2 = String to append to the found JDK directory to get the proper JDK home
3678
3679
3680# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3681# environmental variable as base for where to look.
3682# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3683
3684
3685# Test: Is there a JDK installed in default, well-known locations?
3686
3687
3688# Check that a command-line tool in the Boot JDK is correct
3689# $1 = name of variable to assign
3690# $2 = name of binary
3691
3692
3693###############################################################################
3694#
3695# We need a Boot JDK to bootstrap the build.
3696#
3697
3698
3699
3700
3701
3702#
3703# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3704# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3705#
3706# This code is free software; you can redistribute it and/or modify it
3707# under the terms of the GNU General Public License version 2 only, as
3708# published by the Free Software Foundation.  Oracle designates this
3709# particular file as subject to the "Classpath" exception as provided
3710# by Oracle in the LICENSE file that accompanied this code.
3711#
3712# This code is distributed in the hope that it will be useful, but WITHOUT
3713# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3714# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3715# version 2 for more details (a copy is included in the LICENSE file that
3716# accompanied this code).
3717#
3718# You should have received a copy of the GNU General Public License version
3719# 2 along with this work; if not, write to the Free Software Foundation,
3720# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3721#
3722# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3723# or visit www.oracle.com if you need additional information or have any
3724# questions.
3725#
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746#
3747# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3748# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3749#
3750# This code is free software; you can redistribute it and/or modify it
3751# under the terms of the GNU General Public License version 2 only, as
3752# published by the Free Software Foundation.  Oracle designates this
3753# particular file as subject to the "Classpath" exception as provided
3754# by Oracle in the LICENSE file that accompanied this code.
3755#
3756# This code is distributed in the hope that it will be useful, but WITHOUT
3757# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3758# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3759# version 2 for more details (a copy is included in the LICENSE file that
3760# accompanied this code).
3761#
3762# You should have received a copy of the GNU General Public License version
3763# 2 along with this work; if not, write to the Free Software Foundation,
3764# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3765#
3766# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3767# or visit www.oracle.com if you need additional information or have any
3768# questions.
3769#
3770
3771
3772
3773
3774
3775# Documentation on common flags used for solstudio in HIGHEST.
3776#
3777# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3778#          done with care, there are some assumptions below that need to
3779#          be understood about the use of pointers, and IEEE behavior.
3780#
3781# -fns: Use non-standard floating point mode (not IEEE 754)
3782# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3783# -fsingle: Use single precision floating point with 'float'
3784# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3785#   (Source with excessing pointer casting and data access with mixed
3786#    pointer types are not recommended)
3787# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3788#   (If you expect perfect errno behavior, do not use this)
3789# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3790# -xrestrict: Pointer parameters to functions do not overlap
3791#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3792#    If you pass in multiple pointers to the same data, do not use this)
3793# -xlibmil: Inline some library routines
3794#   (If you expect perfect errno behavior, do not use this)
3795# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3796#   (If you expect perfect errno behavior, do not use this)
3797#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3798
3799    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3800    # Bug?
3801    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3802    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3803    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3804    #fi
3805
3806
3807
3808
3809
3810# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3811#                                   [RUN-IF-FALSE])
3812# ------------------------------------------------------------
3813# Check that the c and c++ compilers support an argument
3814
3815
3816# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3817#                                    [RUN-IF-FALSE])
3818# ------------------------------------------------------------
3819# Check that the linker support an argument
3820
3821
3822
3823
3824#
3825# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3826# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3827#
3828# This code is free software; you can redistribute it and/or modify it
3829# under the terms of the GNU General Public License version 2 only, as
3830# published by the Free Software Foundation.  Oracle designates this
3831# particular file as subject to the "Classpath" exception as provided
3832# by Oracle in the LICENSE file that accompanied this code.
3833#
3834# This code is distributed in the hope that it will be useful, but WITHOUT
3835# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3836# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3837# version 2 for more details (a copy is included in the LICENSE file that
3838# accompanied this code).
3839#
3840# You should have received a copy of the GNU General Public License version
3841# 2 along with this work; if not, write to the Free Software Foundation,
3842# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3843#
3844# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3845# or visit www.oracle.com if you need additional information or have any
3846# questions.
3847#
3848
3849
3850
3851
3852
3853cygwin_help() {
3854  case $1 in
3855    unzip)
3856      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3857      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3858      ;;
3859    zip)
3860      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3862      ;;
3863    make)
3864      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3866      ;;
3867    freetype)
3868      HELP_MSG="
3869The freetype library can now be build during the configure process.
3870Download the freetype sources and unpack them into an arbitrary directory:
3871
3872wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3873tar -xzf freetype-2.5.3.tar.gz
3874
3875Then run configure with '--with-freetype-src=<freetype_src>'. This will
3876automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3877builds or into '<freetype_src>/lib32' for 32-bit builds.
3878Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3879and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3880      ;;
3881  esac
3882}
3883
3884msys_help() {
3885  PKGHANDLER_COMMAND=""
3886}
3887
3888apt_help() {
3889  case $1 in
3890    devkit)
3891      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3892    openjdk)
3893      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3894    alsa)
3895      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3896    cups)
3897      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3898    freetype)
3899      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3900    pulse)
3901      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3902    x11)
3903      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3904    ccache)
3905      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3906  esac
3907}
3908
3909yum_help() {
3910  case $1 in
3911    devkit)
3912      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3913    openjdk)
3914      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3915    alsa)
3916      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3917    cups)
3918      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3919    freetype)
3920      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3921    pulse)
3922      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3923    x11)
3924      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3925    ccache)
3926      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3927  esac
3928}
3929
3930port_help() {
3931  PKGHANDLER_COMMAND=""
3932}
3933
3934pkgutil_help() {
3935  PKGHANDLER_COMMAND=""
3936}
3937
3938pkgadd_help() {
3939  PKGHANDLER_COMMAND=""
3940}
3941
3942# This function will check if we're called from the "configure" wrapper while
3943# printing --help. If so, we will print out additional information that can
3944# only be extracted within the autoconf script, and then exit. This must be
3945# called at the very beginning in configure.ac.
3946
3947
3948
3949
3950
3951
3952#
3953# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3954# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3955#
3956# This code is free software; you can redistribute it and/or modify it
3957# under the terms of the GNU General Public License version 2 only, as
3958# published by the Free Software Foundation.  Oracle designates this
3959# particular file as subject to the "Classpath" exception as provided
3960# by Oracle in the LICENSE file that accompanied this code.
3961#
3962# This code is distributed in the hope that it will be useful, but WITHOUT
3963# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3964# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3965# version 2 for more details (a copy is included in the LICENSE file that
3966# accompanied this code).
3967#
3968# You should have received a copy of the GNU General Public License version
3969# 2 along with this work; if not, write to the Free Software Foundation,
3970# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3971#
3972# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3973# or visit www.oracle.com if you need additional information or have any
3974# questions.
3975#
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986###############################################################################
3987#
3988# Should we build only OpenJDK even if closed sources are present?
3989#
3990
3991
3992
3993
3994###############################################################################
3995#
3996# Setup version numbers
3997#
3998
3999
4000
4001
4002
4003
4004################################################################################
4005#
4006# Gcov coverage data for hotspot
4007#
4008
4009
4010#
4011# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4012# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4013#
4014# This code is free software; you can redistribute it and/or modify it
4015# under the terms of the GNU General Public License version 2 only, as
4016# published by the Free Software Foundation.  Oracle designates this
4017# particular file as subject to the "Classpath" exception as provided
4018# by Oracle in the LICENSE file that accompanied this code.
4019#
4020# This code is distributed in the hope that it will be useful, but WITHOUT
4021# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4022# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4023# version 2 for more details (a copy is included in the LICENSE file that
4024# accompanied this code).
4025#
4026# You should have received a copy of the GNU General Public License version
4027# 2 along with this work; if not, write to the Free Software Foundation,
4028# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4029#
4030# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4031# or visit www.oracle.com if you need additional information or have any
4032# questions.
4033#
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055#
4056# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4057# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4058#
4059# This code is free software; you can redistribute it and/or modify it
4060# under the terms of the GNU General Public License version 2 only, as
4061# published by the Free Software Foundation.  Oracle designates this
4062# particular file as subject to the "Classpath" exception as provided
4063# by Oracle in the LICENSE file that accompanied this code.
4064#
4065# This code is distributed in the hope that it will be useful, but WITHOUT
4066# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4067# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4068# version 2 for more details (a copy is included in the LICENSE file that
4069# accompanied this code).
4070#
4071# You should have received a copy of the GNU General Public License version
4072# 2 along with this work; if not, write to the Free Software Foundation,
4073# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4074#
4075# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4076# or visit www.oracle.com if you need additional information or have any
4077# questions.
4078#
4079
4080# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4081# Converts autoconf style CPU name to OpenJDK style, into
4082# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4083
4084
4085# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4086# Converts autoconf style OS name to OpenJDK style, into
4087# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4088
4089
4090# Expects $host_os $host_cpu $build_os and $build_cpu
4091# and $with_target_bits to have been setup!
4092#
4093# Translate the standard triplet(quadruplet) definition
4094# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4095# OPENJDK_BUILD_OS, etc.
4096
4097
4098# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4099# accordingly. Must be done after setting up build and target system, but before
4100# doing anything else with these values.
4101
4102
4103# Setup the legacy variables, for controlling the old makefiles.
4104#
4105
4106
4107
4108
4109#%%% Build and target systems %%%
4110
4111
4112
4113
4114# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4115# Add -mX to various FLAGS variables.
4116
4117
4118
4119
4120
4121
4122#
4123# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4124# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4125#
4126# This code is free software; you can redistribute it and/or modify it
4127# under the terms of the GNU General Public License version 2 only, as
4128# published by the Free Software Foundation.  Oracle designates this
4129# particular file as subject to the "Classpath" exception as provided
4130# by Oracle in the LICENSE file that accompanied this code.
4131#
4132# This code is distributed in the hope that it will be useful, but WITHOUT
4133# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4134# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4135# version 2 for more details (a copy is included in the LICENSE file that
4136# accompanied this code).
4137#
4138# You should have received a copy of the GNU General Public License version
4139# 2 along with this work; if not, write to the Free Software Foundation,
4140# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4141#
4142# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4143# or visit www.oracle.com if you need additional information or have any
4144# questions.
4145#
4146
4147
4148
4149
4150
4151
4152
4153
4154#
4155# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4156# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4157#
4158# This code is free software; you can redistribute it and/or modify it
4159# under the terms of the GNU General Public License version 2 only, as
4160# published by the Free Software Foundation.  Oracle designates this
4161# particular file as subject to the "Classpath" exception as provided
4162# by Oracle in the LICENSE file that accompanied this code.
4163#
4164# This code is distributed in the hope that it will be useful, but WITHOUT
4165# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4166# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4167# version 2 for more details (a copy is included in the LICENSE file that
4168# accompanied this code).
4169#
4170# You should have received a copy of the GNU General Public License version
4171# 2 along with this work; if not, write to the Free Software Foundation,
4172# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4173#
4174# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4175# or visit www.oracle.com if you need additional information or have any
4176# questions.
4177#
4178
4179########################################################################
4180# This file is responsible for detecting, verifying and setting up the
4181# toolchain, i.e. the compiler, linker and related utilities. It will setup
4182# proper paths to the binaries, but it will not setup any flags.
4183#
4184# The binaries used is determined by the toolchain type, which is the family of
4185# compilers and related tools that are used.
4186########################################################################
4187
4188
4189# All valid toolchains, regardless of platform (used by help.m4)
4190VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4191
4192# These toolchains are valid on different platforms
4193VALID_TOOLCHAINS_linux="gcc clang"
4194VALID_TOOLCHAINS_solaris="solstudio"
4195VALID_TOOLCHAINS_macosx="gcc clang"
4196VALID_TOOLCHAINS_aix="xlc"
4197VALID_TOOLCHAINS_windows="microsoft"
4198
4199# Toolchain descriptions
4200TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4201TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4202TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4203TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4204TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4205
4206# Setup a number of variables describing how native output files are
4207# named on this platform/toolchain.
4208
4209
4210# Determine which toolchain type to use, and make sure it is valid for this
4211# platform. Setup various information about the selected toolchain.
4212
4213
4214# Before we start detecting the toolchain executables, we might need some
4215# special setup, e.g. additional paths etc.
4216
4217
4218# Restore path, etc
4219
4220
4221# Check if a compiler is of the toolchain type we expect, and save the version
4222# information from it. If the compiler does not match the expected type,
4223# this function will abort using AC_MSG_ERROR. If it matches, the version will
4224# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4225# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4226#
4227# $1 = compiler to test (CC or CXX)
4228# $2 = human readable name of compiler (C or C++)
4229
4230
4231# Try to locate the given C or C++ compiler in the path, or otherwise.
4232#
4233# $1 = compiler to test (CC or CXX)
4234# $2 = human readable name of compiler (C or C++)
4235# $3 = list of compiler names to search for
4236
4237
4238# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4239# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4240# archiver (AR). Verify that the compilers are correct according to the
4241# toolchain type.
4242
4243
4244# Setup additional tools that is considered a part of the toolchain, but not the
4245# core part. Many of these are highly platform-specific and do not exist,
4246# and/or are not needed on all platforms.
4247
4248
4249# Setup the build tools (i.e, the compiler and linker used to build programs
4250# that should be run on the build platform, not the target platform, as a build
4251# helper). Since the non-cross-compile case uses the normal, target compilers
4252# for this, we can only do this after these have been setup.
4253
4254
4255# Setup legacy variables that are still needed as alternative ways to refer to
4256# parts of the toolchain.
4257
4258
4259# Do some additional checks on the detected tools.
4260
4261
4262# Setup the JTReg Regression Test Harness.
4263
4264
4265#
4266# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4267# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4268#
4269# This code is free software; you can redistribute it and/or modify it
4270# under the terms of the GNU General Public License version 2 only, as
4271# published by the Free Software Foundation.  Oracle designates this
4272# particular file as subject to the "Classpath" exception as provided
4273# by Oracle in the LICENSE file that accompanied this code.
4274#
4275# This code is distributed in the hope that it will be useful, but WITHOUT
4276# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4277# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4278# version 2 for more details (a copy is included in the LICENSE file that
4279# accompanied this code).
4280#
4281# You should have received a copy of the GNU General Public License version
4282# 2 along with this work; if not, write to the Free Software Foundation,
4283# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4284#
4285# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4286# or visit www.oracle.com if you need additional information or have any
4287# questions.
4288#
4289
4290################################################################################
4291# The order of these defines the priority by which we try to find them.
4292VALID_VS_VERSIONS="2013 2012 2010"
4293
4294VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4295VS_VERSION_INTERNAL_2010=100
4296VS_MSVCR_2010=msvcr100.dll
4297# We don't use msvcp on Visual Studio 2010
4298#VS_MSVCP_2010=msvcp100.dll
4299VS_ENVVAR_2010="VS100COMNTOOLS"
4300VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4301VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4302VS_VS_PLATFORM_NAME_2010="v100"
4303VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4304
4305VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4306VS_VERSION_INTERNAL_2012=110
4307VS_MSVCR_2012=msvcr110.dll
4308VS_MSVCP_2012=msvcp110.dll
4309VS_ENVVAR_2012="VS110COMNTOOLS"
4310VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4311VS_SDK_INSTALLDIR_2012=
4312VS_VS_PLATFORM_NAME_2012="v110"
4313VS_SDK_PLATFORM_NAME_2012=
4314
4315VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4316VS_VERSION_INTERNAL_2013=120
4317VS_MSVCR_2013=msvcr120.dll
4318VS_MSVCP_2013=msvcp120.dll
4319VS_ENVVAR_2013="VS120COMNTOOLS"
4320VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4321VS_SDK_INSTALLDIR_2013=
4322VS_VS_PLATFORM_NAME_2013="v120"
4323VS_SDK_PLATFORM_NAME_2013=
4324
4325################################################################################
4326
4327
4328
4329################################################################################
4330
4331
4332
4333################################################################################
4334# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4335# build environment and assigns it to VS_ENV_CMD
4336
4337
4338################################################################################
4339
4340
4341
4342################################################################################
4343# Check if the VS env variables were setup prior to running configure.
4344# If not, then find vcvarsall.bat and run it automatically, and integrate
4345# the set env variables into the spec file.
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360# This line needs to be here, verbatim, after all includes and the dummy hook
4361# definitions. It is replaced with custom functionality when building
4362# custom sources.
4363#CUSTOM_AUTOCONF_INCLUDE
4364
4365# Do not change or remove the following line, it is needed for consistency checks:
4366DATE_WHEN_GENERATED=1431074105
4367
4368###############################################################################
4369#
4370# Initialization / Boot-strapping
4371#
4372# The bootstrapping process needs to solve the "chicken or the egg" problem,
4373# thus it jumps back and forth, each time gaining something needed later on.
4374#
4375###############################################################################
4376
4377# If we are requested to print additional help, do that and then exit.
4378# This must be the very first call.
4379
4380  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4381    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4382    $PRINTF "Which are valid to use depends on the build platform.\n"
4383    for toolchain in $VALID_TOOLCHAINS_all; do
4384      # Use indirect variable referencing
4385      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4386      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4387      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4388    done
4389
4390    # And now exit directly
4391    exit 0
4392  fi
4393
4394
4395# Basic initialization that must happen first of all in the normal process.
4396
4397  # Save the original command line. This is passed to us by the wrapper configure script.
4398
4399  # Save the path variable before it gets changed
4400  ORIGINAL_PATH="$PATH"
4401
4402  DATE_WHEN_CONFIGURED=`LANG=C date`
4403
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4405$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4406  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4407$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4408
4409
4410  # Start with tools that do not need have cross compilation support
4411  # and can be expected to be found in the default PATH. These tools are
4412  # used by configure. Nor are these tools expected to be found in the
4413  # devkit from the builddeps server either, since they are
4414  # needed to download the devkit.
4415
4416  # First are all the simple required tools.
4417
4418
4419
4420  # Publish this variable in the help.
4421
4422
4423  if test "x$BASENAME" = x; then
4424    # The variable is not set by user, try to locate tool using the code snippet
4425    for ac_prog in basename
4426do
4427  # Extract the first word of "$ac_prog", so it can be a program name with args.
4428set dummy $ac_prog; ac_word=$2
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4430$as_echo_n "checking for $ac_word... " >&6; }
4431if ${ac_cv_path_BASENAME+:} false; then :
4432  $as_echo_n "(cached) " >&6
4433else
4434  case $BASENAME in
4435  [\\/]* | ?:[\\/]*)
4436  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4437  ;;
4438  *)
4439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442  IFS=$as_save_IFS
4443  test -z "$as_dir" && as_dir=.
4444    for ac_exec_ext in '' $ac_executable_extensions; do
4445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4446    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4448    break 2
4449  fi
4450done
4451  done
4452IFS=$as_save_IFS
4453
4454  ;;
4455esac
4456fi
4457BASENAME=$ac_cv_path_BASENAME
4458if test -n "$BASENAME"; then
4459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4460$as_echo "$BASENAME" >&6; }
4461else
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4463$as_echo "no" >&6; }
4464fi
4465
4466
4467  test -n "$BASENAME" && break
4468done
4469
4470  else
4471    # The variable is set, but is it from the command line or the environment?
4472
4473    # Try to remove the string !BASENAME! from our list.
4474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4476      # If it failed, the variable was not from the command line. Ignore it,
4477      # but warn the user (except for BASH, which is always set by the calling BASH).
4478      if test "xBASENAME" != xBASH; then
4479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4480$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4481      fi
4482      # Try to locate tool using the code snippet
4483      for ac_prog in basename
4484do
4485  # Extract the first word of "$ac_prog", so it can be a program name with args.
4486set dummy $ac_prog; ac_word=$2
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4488$as_echo_n "checking for $ac_word... " >&6; }
4489if ${ac_cv_path_BASENAME+:} false; then :
4490  $as_echo_n "(cached) " >&6
4491else
4492  case $BASENAME in
4493  [\\/]* | ?:[\\/]*)
4494  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4495  ;;
4496  *)
4497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4498for as_dir in $PATH
4499do
4500  IFS=$as_save_IFS
4501  test -z "$as_dir" && as_dir=.
4502    for ac_exec_ext in '' $ac_executable_extensions; do
4503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4504    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4506    break 2
4507  fi
4508done
4509  done
4510IFS=$as_save_IFS
4511
4512  ;;
4513esac
4514fi
4515BASENAME=$ac_cv_path_BASENAME
4516if test -n "$BASENAME"; then
4517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4518$as_echo "$BASENAME" >&6; }
4519else
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4521$as_echo "no" >&6; }
4522fi
4523
4524
4525  test -n "$BASENAME" && break
4526done
4527
4528    else
4529      # If it succeeded, then it was overridden by the user. We will use it
4530      # for the tool.
4531
4532      # First remove it from the list of overridden variables, so we can test
4533      # for unknown variables in the end.
4534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4535
4536      # Check if the provided tool contains a complete path.
4537      tool_specified="$BASENAME"
4538      tool_basename="${tool_specified##*/}"
4539      if test "x$tool_basename" = "x$tool_specified"; then
4540        # A command without a complete path is provided, search $PATH.
4541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4542$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4543        # Extract the first word of "$tool_basename", so it can be a program name with args.
4544set dummy $tool_basename; ac_word=$2
4545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4546$as_echo_n "checking for $ac_word... " >&6; }
4547if ${ac_cv_path_BASENAME+:} false; then :
4548  $as_echo_n "(cached) " >&6
4549else
4550  case $BASENAME in
4551  [\\/]* | ?:[\\/]*)
4552  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4553  ;;
4554  *)
4555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4556for as_dir in $PATH
4557do
4558  IFS=$as_save_IFS
4559  test -z "$as_dir" && as_dir=.
4560    for ac_exec_ext in '' $ac_executable_extensions; do
4561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4562    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4564    break 2
4565  fi
4566done
4567  done
4568IFS=$as_save_IFS
4569
4570  ;;
4571esac
4572fi
4573BASENAME=$ac_cv_path_BASENAME
4574if test -n "$BASENAME"; then
4575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4576$as_echo "$BASENAME" >&6; }
4577else
4578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4579$as_echo "no" >&6; }
4580fi
4581
4582
4583        if test "x$BASENAME" = x; then
4584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4585        fi
4586      else
4587        # Otherwise we believe it is a complete path. Use it as it is.
4588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4589$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4591$as_echo_n "checking for BASENAME... " >&6; }
4592        if test ! -x "$tool_specified"; then
4593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4594$as_echo "not found" >&6; }
4595          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4596        fi
4597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4598$as_echo "$tool_specified" >&6; }
4599      fi
4600    fi
4601  fi
4602
4603
4604
4605  if test "x$BASENAME" = x; then
4606    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4607  fi
4608
4609
4610
4611
4612
4613  # Publish this variable in the help.
4614
4615
4616  if test "x$BASH" = x; then
4617    # The variable is not set by user, try to locate tool using the code snippet
4618    for ac_prog in bash
4619do
4620  # Extract the first word of "$ac_prog", so it can be a program name with args.
4621set dummy $ac_prog; ac_word=$2
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4623$as_echo_n "checking for $ac_word... " >&6; }
4624if ${ac_cv_path_BASH+:} false; then :
4625  $as_echo_n "(cached) " >&6
4626else
4627  case $BASH in
4628  [\\/]* | ?:[\\/]*)
4629  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4630  ;;
4631  *)
4632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4639    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647  ;;
4648esac
4649fi
4650BASH=$ac_cv_path_BASH
4651if test -n "$BASH"; then
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4653$as_echo "$BASH" >&6; }
4654else
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656$as_echo "no" >&6; }
4657fi
4658
4659
4660  test -n "$BASH" && break
4661done
4662
4663  else
4664    # The variable is set, but is it from the command line or the environment?
4665
4666    # Try to remove the string !BASH! from our list.
4667    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4668    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4669      # If it failed, the variable was not from the command line. Ignore it,
4670      # but warn the user (except for BASH, which is always set by the calling BASH).
4671      if test "xBASH" != xBASH; then
4672        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4673$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4674      fi
4675      # Try to locate tool using the code snippet
4676      for ac_prog in bash
4677do
4678  # Extract the first word of "$ac_prog", so it can be a program name with args.
4679set dummy $ac_prog; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_BASH+:} false; then :
4683  $as_echo_n "(cached) " >&6
4684else
4685  case $BASH in
4686  [\\/]* | ?:[\\/]*)
4687  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4688  ;;
4689  *)
4690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in $PATH
4692do
4693  IFS=$as_save_IFS
4694  test -z "$as_dir" && as_dir=.
4695    for ac_exec_ext in '' $ac_executable_extensions; do
4696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699    break 2
4700  fi
4701done
4702  done
4703IFS=$as_save_IFS
4704
4705  ;;
4706esac
4707fi
4708BASH=$ac_cv_path_BASH
4709if test -n "$BASH"; then
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4711$as_echo "$BASH" >&6; }
4712else
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718  test -n "$BASH" && break
4719done
4720
4721    else
4722      # If it succeeded, then it was overridden by the user. We will use it
4723      # for the tool.
4724
4725      # First remove it from the list of overridden variables, so we can test
4726      # for unknown variables in the end.
4727      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4728
4729      # Check if the provided tool contains a complete path.
4730      tool_specified="$BASH"
4731      tool_basename="${tool_specified##*/}"
4732      if test "x$tool_basename" = "x$tool_specified"; then
4733        # A command without a complete path is provided, search $PATH.
4734        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4735$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4736        # Extract the first word of "$tool_basename", so it can be a program name with args.
4737set dummy $tool_basename; ac_word=$2
4738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4739$as_echo_n "checking for $ac_word... " >&6; }
4740if ${ac_cv_path_BASH+:} false; then :
4741  $as_echo_n "(cached) " >&6
4742else
4743  case $BASH in
4744  [\\/]* | ?:[\\/]*)
4745  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4746  ;;
4747  *)
4748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4749for as_dir in $PATH
4750do
4751  IFS=$as_save_IFS
4752  test -z "$as_dir" && as_dir=.
4753    for ac_exec_ext in '' $ac_executable_extensions; do
4754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4755    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4757    break 2
4758  fi
4759done
4760  done
4761IFS=$as_save_IFS
4762
4763  ;;
4764esac
4765fi
4766BASH=$ac_cv_path_BASH
4767if test -n "$BASH"; then
4768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4769$as_echo "$BASH" >&6; }
4770else
4771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4772$as_echo "no" >&6; }
4773fi
4774
4775
4776        if test "x$BASH" = x; then
4777          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4778        fi
4779      else
4780        # Otherwise we believe it is a complete path. Use it as it is.
4781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4782$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4784$as_echo_n "checking for BASH... " >&6; }
4785        if test ! -x "$tool_specified"; then
4786          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4787$as_echo "not found" >&6; }
4788          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4789        fi
4790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4791$as_echo "$tool_specified" >&6; }
4792      fi
4793    fi
4794  fi
4795
4796
4797
4798  if test "x$BASH" = x; then
4799    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4800  fi
4801
4802
4803
4804
4805
4806  # Publish this variable in the help.
4807
4808
4809  if test "x$CAT" = x; then
4810    # The variable is not set by user, try to locate tool using the code snippet
4811    for ac_prog in cat
4812do
4813  # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if ${ac_cv_path_CAT+:} false; then :
4818  $as_echo_n "(cached) " >&6
4819else
4820  case $CAT in
4821  [\\/]* | ?:[\\/]*)
4822  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4823  ;;
4824  *)
4825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in $PATH
4827do
4828  IFS=$as_save_IFS
4829  test -z "$as_dir" && as_dir=.
4830    for ac_exec_ext in '' $ac_executable_extensions; do
4831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4832    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834    break 2
4835  fi
4836done
4837  done
4838IFS=$as_save_IFS
4839
4840  ;;
4841esac
4842fi
4843CAT=$ac_cv_path_CAT
4844if test -n "$CAT"; then
4845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4846$as_echo "$CAT" >&6; }
4847else
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852
4853  test -n "$CAT" && break
4854done
4855
4856  else
4857    # The variable is set, but is it from the command line or the environment?
4858
4859    # Try to remove the string !CAT! from our list.
4860    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4861    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4862      # If it failed, the variable was not from the command line. Ignore it,
4863      # but warn the user (except for BASH, which is always set by the calling BASH).
4864      if test "xCAT" != xBASH; then
4865        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4866$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4867      fi
4868      # Try to locate tool using the code snippet
4869      for ac_prog in cat
4870do
4871  # Extract the first word of "$ac_prog", so it can be a program name with args.
4872set dummy $ac_prog; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if ${ac_cv_path_CAT+:} false; then :
4876  $as_echo_n "(cached) " >&6
4877else
4878  case $CAT in
4879  [\\/]* | ?:[\\/]*)
4880  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4881  ;;
4882  *)
4883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884for as_dir in $PATH
4885do
4886  IFS=$as_save_IFS
4887  test -z "$as_dir" && as_dir=.
4888    for ac_exec_ext in '' $ac_executable_extensions; do
4889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4890    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4892    break 2
4893  fi
4894done
4895  done
4896IFS=$as_save_IFS
4897
4898  ;;
4899esac
4900fi
4901CAT=$ac_cv_path_CAT
4902if test -n "$CAT"; then
4903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4904$as_echo "$CAT" >&6; }
4905else
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
4910
4911  test -n "$CAT" && break
4912done
4913
4914    else
4915      # If it succeeded, then it was overridden by the user. We will use it
4916      # for the tool.
4917
4918      # First remove it from the list of overridden variables, so we can test
4919      # for unknown variables in the end.
4920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4921
4922      # Check if the provided tool contains a complete path.
4923      tool_specified="$CAT"
4924      tool_basename="${tool_specified##*/}"
4925      if test "x$tool_basename" = "x$tool_specified"; then
4926        # A command without a complete path is provided, search $PATH.
4927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4928$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4929        # Extract the first word of "$tool_basename", so it can be a program name with args.
4930set dummy $tool_basename; ac_word=$2
4931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4932$as_echo_n "checking for $ac_word... " >&6; }
4933if ${ac_cv_path_CAT+:} false; then :
4934  $as_echo_n "(cached) " >&6
4935else
4936  case $CAT in
4937  [\\/]* | ?:[\\/]*)
4938  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4939  ;;
4940  *)
4941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4942for as_dir in $PATH
4943do
4944  IFS=$as_save_IFS
4945  test -z "$as_dir" && as_dir=.
4946    for ac_exec_ext in '' $ac_executable_extensions; do
4947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4948    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4950    break 2
4951  fi
4952done
4953  done
4954IFS=$as_save_IFS
4955
4956  ;;
4957esac
4958fi
4959CAT=$ac_cv_path_CAT
4960if test -n "$CAT"; then
4961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4962$as_echo "$CAT" >&6; }
4963else
4964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4965$as_echo "no" >&6; }
4966fi
4967
4968
4969        if test "x$CAT" = x; then
4970          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4971        fi
4972      else
4973        # Otherwise we believe it is a complete path. Use it as it is.
4974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4975$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4977$as_echo_n "checking for CAT... " >&6; }
4978        if test ! -x "$tool_specified"; then
4979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4980$as_echo "not found" >&6; }
4981          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4982        fi
4983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4984$as_echo "$tool_specified" >&6; }
4985      fi
4986    fi
4987  fi
4988
4989
4990
4991  if test "x$CAT" = x; then
4992    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4993  fi
4994
4995
4996
4997
4998
4999  # Publish this variable in the help.
5000
5001
5002  if test "x$CHMOD" = x; then
5003    # The variable is not set by user, try to locate tool using the code snippet
5004    for ac_prog in chmod
5005do
5006  # Extract the first word of "$ac_prog", so it can be a program name with args.
5007set dummy $ac_prog; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_CHMOD+:} false; then :
5011  $as_echo_n "(cached) " >&6
5012else
5013  case $CHMOD in
5014  [\\/]* | ?:[\\/]*)
5015  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5016  ;;
5017  *)
5018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in $PATH
5020do
5021  IFS=$as_save_IFS
5022  test -z "$as_dir" && as_dir=.
5023    for ac_exec_ext in '' $ac_executable_extensions; do
5024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027    break 2
5028  fi
5029done
5030  done
5031IFS=$as_save_IFS
5032
5033  ;;
5034esac
5035fi
5036CHMOD=$ac_cv_path_CHMOD
5037if test -n "$CHMOD"; then
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5039$as_echo "$CHMOD" >&6; }
5040else
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045
5046  test -n "$CHMOD" && break
5047done
5048
5049  else
5050    # The variable is set, but is it from the command line or the environment?
5051
5052    # Try to remove the string !CHMOD! from our list.
5053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5055      # If it failed, the variable was not from the command line. Ignore it,
5056      # but warn the user (except for BASH, which is always set by the calling BASH).
5057      if test "xCHMOD" != xBASH; then
5058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5059$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5060      fi
5061      # Try to locate tool using the code snippet
5062      for ac_prog in chmod
5063do
5064  # Extract the first word of "$ac_prog", so it can be a program name with args.
5065set dummy $ac_prog; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_path_CHMOD+:} false; then :
5069  $as_echo_n "(cached) " >&6
5070else
5071  case $CHMOD in
5072  [\\/]* | ?:[\\/]*)
5073  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5074  ;;
5075  *)
5076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079  IFS=$as_save_IFS
5080  test -z "$as_dir" && as_dir=.
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091  ;;
5092esac
5093fi
5094CHMOD=$ac_cv_path_CHMOD
5095if test -n "$CHMOD"; then
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5097$as_echo "$CHMOD" >&6; }
5098else
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104  test -n "$CHMOD" && break
5105done
5106
5107    else
5108      # If it succeeded, then it was overridden by the user. We will use it
5109      # for the tool.
5110
5111      # First remove it from the list of overridden variables, so we can test
5112      # for unknown variables in the end.
5113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5114
5115      # Check if the provided tool contains a complete path.
5116      tool_specified="$CHMOD"
5117      tool_basename="${tool_specified##*/}"
5118      if test "x$tool_basename" = "x$tool_specified"; then
5119        # A command without a complete path is provided, search $PATH.
5120        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5121$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5122        # Extract the first word of "$tool_basename", so it can be a program name with args.
5123set dummy $tool_basename; ac_word=$2
5124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5125$as_echo_n "checking for $ac_word... " >&6; }
5126if ${ac_cv_path_CHMOD+:} false; then :
5127  $as_echo_n "(cached) " >&6
5128else
5129  case $CHMOD in
5130  [\\/]* | ?:[\\/]*)
5131  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5132  ;;
5133  *)
5134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5135for as_dir in $PATH
5136do
5137  IFS=$as_save_IFS
5138  test -z "$as_dir" && as_dir=.
5139    for ac_exec_ext in '' $ac_executable_extensions; do
5140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5141    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5143    break 2
5144  fi
5145done
5146  done
5147IFS=$as_save_IFS
5148
5149  ;;
5150esac
5151fi
5152CHMOD=$ac_cv_path_CHMOD
5153if test -n "$CHMOD"; then
5154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5155$as_echo "$CHMOD" >&6; }
5156else
5157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5158$as_echo "no" >&6; }
5159fi
5160
5161
5162        if test "x$CHMOD" = x; then
5163          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5164        fi
5165      else
5166        # Otherwise we believe it is a complete path. Use it as it is.
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5168$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5169        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5170$as_echo_n "checking for CHMOD... " >&6; }
5171        if test ! -x "$tool_specified"; then
5172          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5173$as_echo "not found" >&6; }
5174          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5175        fi
5176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5177$as_echo "$tool_specified" >&6; }
5178      fi
5179    fi
5180  fi
5181
5182
5183
5184  if test "x$CHMOD" = x; then
5185    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5186  fi
5187
5188
5189
5190
5191
5192  # Publish this variable in the help.
5193
5194
5195  if test "x$CMP" = x; then
5196    # The variable is not set by user, try to locate tool using the code snippet
5197    for ac_prog in cmp
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_CMP+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $CMP in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229CMP=$ac_cv_path_CMP
5230if test -n "$CMP"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5232$as_echo "$CMP" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$CMP" && break
5240done
5241
5242  else
5243    # The variable is set, but is it from the command line or the environment?
5244
5245    # Try to remove the string !CMP! from our list.
5246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5248      # If it failed, the variable was not from the command line. Ignore it,
5249      # but warn the user (except for BASH, which is always set by the calling BASH).
5250      if test "xCMP" != xBASH; then
5251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5252$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5253      fi
5254      # Try to locate tool using the code snippet
5255      for ac_prog in cmp
5256do
5257  # Extract the first word of "$ac_prog", so it can be a program name with args.
5258set dummy $ac_prog; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if ${ac_cv_path_CMP+:} false; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $CMP in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287CMP=$ac_cv_path_CMP
5288if test -n "$CMP"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5290$as_echo "$CMP" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297  test -n "$CMP" && break
5298done
5299
5300    else
5301      # If it succeeded, then it was overridden by the user. We will use it
5302      # for the tool.
5303
5304      # First remove it from the list of overridden variables, so we can test
5305      # for unknown variables in the end.
5306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5307
5308      # Check if the provided tool contains a complete path.
5309      tool_specified="$CMP"
5310      tool_basename="${tool_specified##*/}"
5311      if test "x$tool_basename" = "x$tool_specified"; then
5312        # A command without a complete path is provided, search $PATH.
5313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5314$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5315        # Extract the first word of "$tool_basename", so it can be a program name with args.
5316set dummy $tool_basename; ac_word=$2
5317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5318$as_echo_n "checking for $ac_word... " >&6; }
5319if ${ac_cv_path_CMP+:} false; then :
5320  $as_echo_n "(cached) " >&6
5321else
5322  case $CMP in
5323  [\\/]* | ?:[\\/]*)
5324  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5325  ;;
5326  *)
5327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5328for as_dir in $PATH
5329do
5330  IFS=$as_save_IFS
5331  test -z "$as_dir" && as_dir=.
5332    for ac_exec_ext in '' $ac_executable_extensions; do
5333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5334    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5336    break 2
5337  fi
5338done
5339  done
5340IFS=$as_save_IFS
5341
5342  ;;
5343esac
5344fi
5345CMP=$ac_cv_path_CMP
5346if test -n "$CMP"; then
5347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5348$as_echo "$CMP" >&6; }
5349else
5350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5351$as_echo "no" >&6; }
5352fi
5353
5354
5355        if test "x$CMP" = x; then
5356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5357        fi
5358      else
5359        # Otherwise we believe it is a complete path. Use it as it is.
5360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5361$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5363$as_echo_n "checking for CMP... " >&6; }
5364        if test ! -x "$tool_specified"; then
5365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5366$as_echo "not found" >&6; }
5367          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5368        fi
5369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5370$as_echo "$tool_specified" >&6; }
5371      fi
5372    fi
5373  fi
5374
5375
5376
5377  if test "x$CMP" = x; then
5378    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5379  fi
5380
5381
5382
5383
5384
5385  # Publish this variable in the help.
5386
5387
5388  if test "x$COMM" = x; then
5389    # The variable is not set by user, try to locate tool using the code snippet
5390    for ac_prog in comm
5391do
5392  # Extract the first word of "$ac_prog", so it can be a program name with args.
5393set dummy $ac_prog; ac_word=$2
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395$as_echo_n "checking for $ac_word... " >&6; }
5396if ${ac_cv_path_COMM+:} false; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399  case $COMM in
5400  [\\/]* | ?:[\\/]*)
5401  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5402  ;;
5403  *)
5404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405for as_dir in $PATH
5406do
5407  IFS=$as_save_IFS
5408  test -z "$as_dir" && as_dir=.
5409    for ac_exec_ext in '' $ac_executable_extensions; do
5410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413    break 2
5414  fi
5415done
5416  done
5417IFS=$as_save_IFS
5418
5419  ;;
5420esac
5421fi
5422COMM=$ac_cv_path_COMM
5423if test -n "$COMM"; then
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5425$as_echo "$COMM" >&6; }
5426else
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428$as_echo "no" >&6; }
5429fi
5430
5431
5432  test -n "$COMM" && break
5433done
5434
5435  else
5436    # The variable is set, but is it from the command line or the environment?
5437
5438    # Try to remove the string !COMM! from our list.
5439    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5440    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5441      # If it failed, the variable was not from the command line. Ignore it,
5442      # but warn the user (except for BASH, which is always set by the calling BASH).
5443      if test "xCOMM" != xBASH; then
5444        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5445$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5446      fi
5447      # Try to locate tool using the code snippet
5448      for ac_prog in comm
5449do
5450  # Extract the first word of "$ac_prog", so it can be a program name with args.
5451set dummy $ac_prog; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_COMM+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $COMM in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480COMM=$ac_cv_path_COMM
5481if test -n "$COMM"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5483$as_echo "$COMM" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490  test -n "$COMM" && break
5491done
5492
5493    else
5494      # If it succeeded, then it was overridden by the user. We will use it
5495      # for the tool.
5496
5497      # First remove it from the list of overridden variables, so we can test
5498      # for unknown variables in the end.
5499      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5500
5501      # Check if the provided tool contains a complete path.
5502      tool_specified="$COMM"
5503      tool_basename="${tool_specified##*/}"
5504      if test "x$tool_basename" = "x$tool_specified"; then
5505        # A command without a complete path is provided, search $PATH.
5506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5507$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5508        # Extract the first word of "$tool_basename", so it can be a program name with args.
5509set dummy $tool_basename; ac_word=$2
5510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5511$as_echo_n "checking for $ac_word... " >&6; }
5512if ${ac_cv_path_COMM+:} false; then :
5513  $as_echo_n "(cached) " >&6
5514else
5515  case $COMM in
5516  [\\/]* | ?:[\\/]*)
5517  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5518  ;;
5519  *)
5520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5521for as_dir in $PATH
5522do
5523  IFS=$as_save_IFS
5524  test -z "$as_dir" && as_dir=.
5525    for ac_exec_ext in '' $ac_executable_extensions; do
5526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5527    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5529    break 2
5530  fi
5531done
5532  done
5533IFS=$as_save_IFS
5534
5535  ;;
5536esac
5537fi
5538COMM=$ac_cv_path_COMM
5539if test -n "$COMM"; then
5540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5541$as_echo "$COMM" >&6; }
5542else
5543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544$as_echo "no" >&6; }
5545fi
5546
5547
5548        if test "x$COMM" = x; then
5549          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5550        fi
5551      else
5552        # Otherwise we believe it is a complete path. Use it as it is.
5553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5554$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5556$as_echo_n "checking for COMM... " >&6; }
5557        if test ! -x "$tool_specified"; then
5558          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5559$as_echo "not found" >&6; }
5560          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5561        fi
5562        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5563$as_echo "$tool_specified" >&6; }
5564      fi
5565    fi
5566  fi
5567
5568
5569
5570  if test "x$COMM" = x; then
5571    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5572  fi
5573
5574
5575
5576
5577
5578  # Publish this variable in the help.
5579
5580
5581  if test "x$CP" = x; then
5582    # The variable is not set by user, try to locate tool using the code snippet
5583    for ac_prog in cp
5584do
5585  # Extract the first word of "$ac_prog", so it can be a program name with args.
5586set dummy $ac_prog; ac_word=$2
5587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
5589if ${ac_cv_path_CP+:} false; then :
5590  $as_echo_n "(cached) " >&6
5591else
5592  case $CP in
5593  [\\/]* | ?:[\\/]*)
5594  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5595  ;;
5596  *)
5597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5598for as_dir in $PATH
5599do
5600  IFS=$as_save_IFS
5601  test -z "$as_dir" && as_dir=.
5602    for ac_exec_ext in '' $ac_executable_extensions; do
5603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5604    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5606    break 2
5607  fi
5608done
5609  done
5610IFS=$as_save_IFS
5611
5612  ;;
5613esac
5614fi
5615CP=$ac_cv_path_CP
5616if test -n "$CP"; then
5617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5618$as_echo "$CP" >&6; }
5619else
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5621$as_echo "no" >&6; }
5622fi
5623
5624
5625  test -n "$CP" && break
5626done
5627
5628  else
5629    # The variable is set, but is it from the command line or the environment?
5630
5631    # Try to remove the string !CP! from our list.
5632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5634      # If it failed, the variable was not from the command line. Ignore it,
5635      # but warn the user (except for BASH, which is always set by the calling BASH).
5636      if test "xCP" != xBASH; then
5637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5638$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5639      fi
5640      # Try to locate tool using the code snippet
5641      for ac_prog in cp
5642do
5643  # Extract the first word of "$ac_prog", so it can be a program name with args.
5644set dummy $ac_prog; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_path_CP+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650  case $CP in
5651  [\\/]* | ?:[\\/]*)
5652  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5653  ;;
5654  *)
5655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5656for as_dir in $PATH
5657do
5658  IFS=$as_save_IFS
5659  test -z "$as_dir" && as_dir=.
5660    for ac_exec_ext in '' $ac_executable_extensions; do
5661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5662    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5664    break 2
5665  fi
5666done
5667  done
5668IFS=$as_save_IFS
5669
5670  ;;
5671esac
5672fi
5673CP=$ac_cv_path_CP
5674if test -n "$CP"; then
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5676$as_echo "$CP" >&6; }
5677else
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5679$as_echo "no" >&6; }
5680fi
5681
5682
5683  test -n "$CP" && break
5684done
5685
5686    else
5687      # If it succeeded, then it was overridden by the user. We will use it
5688      # for the tool.
5689
5690      # First remove it from the list of overridden variables, so we can test
5691      # for unknown variables in the end.
5692      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5693
5694      # Check if the provided tool contains a complete path.
5695      tool_specified="$CP"
5696      tool_basename="${tool_specified##*/}"
5697      if test "x$tool_basename" = "x$tool_specified"; then
5698        # A command without a complete path is provided, search $PATH.
5699        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5700$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5701        # Extract the first word of "$tool_basename", so it can be a program name with args.
5702set dummy $tool_basename; ac_word=$2
5703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5704$as_echo_n "checking for $ac_word... " >&6; }
5705if ${ac_cv_path_CP+:} false; then :
5706  $as_echo_n "(cached) " >&6
5707else
5708  case $CP in
5709  [\\/]* | ?:[\\/]*)
5710  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5711  ;;
5712  *)
5713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5714for as_dir in $PATH
5715do
5716  IFS=$as_save_IFS
5717  test -z "$as_dir" && as_dir=.
5718    for ac_exec_ext in '' $ac_executable_extensions; do
5719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5720    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5722    break 2
5723  fi
5724done
5725  done
5726IFS=$as_save_IFS
5727
5728  ;;
5729esac
5730fi
5731CP=$ac_cv_path_CP
5732if test -n "$CP"; then
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5734$as_echo "$CP" >&6; }
5735else
5736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
5738fi
5739
5740
5741        if test "x$CP" = x; then
5742          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5743        fi
5744      else
5745        # Otherwise we believe it is a complete path. Use it as it is.
5746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5747$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5749$as_echo_n "checking for CP... " >&6; }
5750        if test ! -x "$tool_specified"; then
5751          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5752$as_echo "not found" >&6; }
5753          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5754        fi
5755        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5756$as_echo "$tool_specified" >&6; }
5757      fi
5758    fi
5759  fi
5760
5761
5762
5763  if test "x$CP" = x; then
5764    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5765  fi
5766
5767
5768
5769
5770
5771  # Publish this variable in the help.
5772
5773
5774  if test "x$CUT" = x; then
5775    # The variable is not set by user, try to locate tool using the code snippet
5776    for ac_prog in cut
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_CUT+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $CUT in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808CUT=$ac_cv_path_CUT
5809if test -n "$CUT"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5811$as_echo "$CUT" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$CUT" && break
5819done
5820
5821  else
5822    # The variable is set, but is it from the command line or the environment?
5823
5824    # Try to remove the string !CUT! from our list.
5825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5827      # If it failed, the variable was not from the command line. Ignore it,
5828      # but warn the user (except for BASH, which is always set by the calling BASH).
5829      if test "xCUT" != xBASH; then
5830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5831$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5832      fi
5833      # Try to locate tool using the code snippet
5834      for ac_prog in cut
5835do
5836  # Extract the first word of "$ac_prog", so it can be a program name with args.
5837set dummy $ac_prog; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CUT+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CUT in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CUT=$ac_cv_path_CUT
5867if test -n "$CUT"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5869$as_echo "$CUT" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876  test -n "$CUT" && break
5877done
5878
5879    else
5880      # If it succeeded, then it was overridden by the user. We will use it
5881      # for the tool.
5882
5883      # First remove it from the list of overridden variables, so we can test
5884      # for unknown variables in the end.
5885      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5886
5887      # Check if the provided tool contains a complete path.
5888      tool_specified="$CUT"
5889      tool_basename="${tool_specified##*/}"
5890      if test "x$tool_basename" = "x$tool_specified"; then
5891        # A command without a complete path is provided, search $PATH.
5892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5893$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5894        # Extract the first word of "$tool_basename", so it can be a program name with args.
5895set dummy $tool_basename; ac_word=$2
5896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5897$as_echo_n "checking for $ac_word... " >&6; }
5898if ${ac_cv_path_CUT+:} false; then :
5899  $as_echo_n "(cached) " >&6
5900else
5901  case $CUT in
5902  [\\/]* | ?:[\\/]*)
5903  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5904  ;;
5905  *)
5906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5907for as_dir in $PATH
5908do
5909  IFS=$as_save_IFS
5910  test -z "$as_dir" && as_dir=.
5911    for ac_exec_ext in '' $ac_executable_extensions; do
5912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5913    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5915    break 2
5916  fi
5917done
5918  done
5919IFS=$as_save_IFS
5920
5921  ;;
5922esac
5923fi
5924CUT=$ac_cv_path_CUT
5925if test -n "$CUT"; then
5926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5927$as_echo "$CUT" >&6; }
5928else
5929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5930$as_echo "no" >&6; }
5931fi
5932
5933
5934        if test "x$CUT" = x; then
5935          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5936        fi
5937      else
5938        # Otherwise we believe it is a complete path. Use it as it is.
5939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5940$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5941        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5942$as_echo_n "checking for CUT... " >&6; }
5943        if test ! -x "$tool_specified"; then
5944          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5945$as_echo "not found" >&6; }
5946          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5947        fi
5948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5949$as_echo "$tool_specified" >&6; }
5950      fi
5951    fi
5952  fi
5953
5954
5955
5956  if test "x$CUT" = x; then
5957    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5958  fi
5959
5960
5961
5962
5963
5964  # Publish this variable in the help.
5965
5966
5967  if test "x$DATE" = x; then
5968    # The variable is not set by user, try to locate tool using the code snippet
5969    for ac_prog in date
5970do
5971  # Extract the first word of "$ac_prog", so it can be a program name with args.
5972set dummy $ac_prog; ac_word=$2
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5974$as_echo_n "checking for $ac_word... " >&6; }
5975if ${ac_cv_path_DATE+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978  case $DATE in
5979  [\\/]* | ?:[\\/]*)
5980  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5981  ;;
5982  *)
5983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986  IFS=$as_save_IFS
5987  test -z "$as_dir" && as_dir=.
5988    for ac_exec_ext in '' $ac_executable_extensions; do
5989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5990    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992    break 2
5993  fi
5994done
5995  done
5996IFS=$as_save_IFS
5997
5998  ;;
5999esac
6000fi
6001DATE=$ac_cv_path_DATE
6002if test -n "$DATE"; then
6003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6004$as_echo "$DATE" >&6; }
6005else
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011  test -n "$DATE" && break
6012done
6013
6014  else
6015    # The variable is set, but is it from the command line or the environment?
6016
6017    # Try to remove the string !DATE! from our list.
6018    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6019    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6020      # If it failed, the variable was not from the command line. Ignore it,
6021      # but warn the user (except for BASH, which is always set by the calling BASH).
6022      if test "xDATE" != xBASH; then
6023        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6024$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6025      fi
6026      # Try to locate tool using the code snippet
6027      for ac_prog in date
6028do
6029  # Extract the first word of "$ac_prog", so it can be a program name with args.
6030set dummy $ac_prog; ac_word=$2
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032$as_echo_n "checking for $ac_word... " >&6; }
6033if ${ac_cv_path_DATE+:} false; then :
6034  $as_echo_n "(cached) " >&6
6035else
6036  case $DATE in
6037  [\\/]* | ?:[\\/]*)
6038  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6039  ;;
6040  *)
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6048    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050    break 2
6051  fi
6052done
6053  done
6054IFS=$as_save_IFS
6055
6056  ;;
6057esac
6058fi
6059DATE=$ac_cv_path_DATE
6060if test -n "$DATE"; then
6061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6062$as_echo "$DATE" >&6; }
6063else
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069  test -n "$DATE" && break
6070done
6071
6072    else
6073      # If it succeeded, then it was overridden by the user. We will use it
6074      # for the tool.
6075
6076      # First remove it from the list of overridden variables, so we can test
6077      # for unknown variables in the end.
6078      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6079
6080      # Check if the provided tool contains a complete path.
6081      tool_specified="$DATE"
6082      tool_basename="${tool_specified##*/}"
6083      if test "x$tool_basename" = "x$tool_specified"; then
6084        # A command without a complete path is provided, search $PATH.
6085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6086$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6087        # Extract the first word of "$tool_basename", so it can be a program name with args.
6088set dummy $tool_basename; ac_word=$2
6089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6090$as_echo_n "checking for $ac_word... " >&6; }
6091if ${ac_cv_path_DATE+:} false; then :
6092  $as_echo_n "(cached) " >&6
6093else
6094  case $DATE in
6095  [\\/]* | ?:[\\/]*)
6096  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6097  ;;
6098  *)
6099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6100for as_dir in $PATH
6101do
6102  IFS=$as_save_IFS
6103  test -z "$as_dir" && as_dir=.
6104    for ac_exec_ext in '' $ac_executable_extensions; do
6105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6106    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6108    break 2
6109  fi
6110done
6111  done
6112IFS=$as_save_IFS
6113
6114  ;;
6115esac
6116fi
6117DATE=$ac_cv_path_DATE
6118if test -n "$DATE"; then
6119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6120$as_echo "$DATE" >&6; }
6121else
6122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6123$as_echo "no" >&6; }
6124fi
6125
6126
6127        if test "x$DATE" = x; then
6128          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6129        fi
6130      else
6131        # Otherwise we believe it is a complete path. Use it as it is.
6132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6133$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6135$as_echo_n "checking for DATE... " >&6; }
6136        if test ! -x "$tool_specified"; then
6137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6138$as_echo "not found" >&6; }
6139          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6140        fi
6141        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6142$as_echo "$tool_specified" >&6; }
6143      fi
6144    fi
6145  fi
6146
6147
6148
6149  if test "x$DATE" = x; then
6150    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6151  fi
6152
6153
6154
6155
6156
6157  # Publish this variable in the help.
6158
6159
6160  if test "x$DIFF" = x; then
6161    # The variable is not set by user, try to locate tool using the code snippet
6162    for ac_prog in gdiff diff
6163do
6164  # Extract the first word of "$ac_prog", so it can be a program name with args.
6165set dummy $ac_prog; ac_word=$2
6166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6167$as_echo_n "checking for $ac_word... " >&6; }
6168if ${ac_cv_path_DIFF+:} false; then :
6169  $as_echo_n "(cached) " >&6
6170else
6171  case $DIFF in
6172  [\\/]* | ?:[\\/]*)
6173  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6174  ;;
6175  *)
6176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177for as_dir in $PATH
6178do
6179  IFS=$as_save_IFS
6180  test -z "$as_dir" && as_dir=.
6181    for ac_exec_ext in '' $ac_executable_extensions; do
6182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6183    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6185    break 2
6186  fi
6187done
6188  done
6189IFS=$as_save_IFS
6190
6191  ;;
6192esac
6193fi
6194DIFF=$ac_cv_path_DIFF
6195if test -n "$DIFF"; then
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6197$as_echo "$DIFF" >&6; }
6198else
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200$as_echo "no" >&6; }
6201fi
6202
6203
6204  test -n "$DIFF" && break
6205done
6206
6207  else
6208    # The variable is set, but is it from the command line or the environment?
6209
6210    # Try to remove the string !DIFF! from our list.
6211    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6212    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6213      # If it failed, the variable was not from the command line. Ignore it,
6214      # but warn the user (except for BASH, which is always set by the calling BASH).
6215      if test "xDIFF" != xBASH; then
6216        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6217$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6218      fi
6219      # Try to locate tool using the code snippet
6220      for ac_prog in gdiff diff
6221do
6222  # Extract the first word of "$ac_prog", so it can be a program name with args.
6223set dummy $ac_prog; ac_word=$2
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225$as_echo_n "checking for $ac_word... " >&6; }
6226if ${ac_cv_path_DIFF+:} false; then :
6227  $as_echo_n "(cached) " >&6
6228else
6229  case $DIFF in
6230  [\\/]* | ?:[\\/]*)
6231  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6232  ;;
6233  *)
6234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235for as_dir in $PATH
6236do
6237  IFS=$as_save_IFS
6238  test -z "$as_dir" && as_dir=.
6239    for ac_exec_ext in '' $ac_executable_extensions; do
6240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6241    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243    break 2
6244  fi
6245done
6246  done
6247IFS=$as_save_IFS
6248
6249  ;;
6250esac
6251fi
6252DIFF=$ac_cv_path_DIFF
6253if test -n "$DIFF"; then
6254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6255$as_echo "$DIFF" >&6; }
6256else
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258$as_echo "no" >&6; }
6259fi
6260
6261
6262  test -n "$DIFF" && break
6263done
6264
6265    else
6266      # If it succeeded, then it was overridden by the user. We will use it
6267      # for the tool.
6268
6269      # First remove it from the list of overridden variables, so we can test
6270      # for unknown variables in the end.
6271      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6272
6273      # Check if the provided tool contains a complete path.
6274      tool_specified="$DIFF"
6275      tool_basename="${tool_specified##*/}"
6276      if test "x$tool_basename" = "x$tool_specified"; then
6277        # A command without a complete path is provided, search $PATH.
6278        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6279$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6280        # Extract the first word of "$tool_basename", so it can be a program name with args.
6281set dummy $tool_basename; ac_word=$2
6282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6283$as_echo_n "checking for $ac_word... " >&6; }
6284if ${ac_cv_path_DIFF+:} false; then :
6285  $as_echo_n "(cached) " >&6
6286else
6287  case $DIFF in
6288  [\\/]* | ?:[\\/]*)
6289  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6290  ;;
6291  *)
6292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6293for as_dir in $PATH
6294do
6295  IFS=$as_save_IFS
6296  test -z "$as_dir" && as_dir=.
6297    for ac_exec_ext in '' $ac_executable_extensions; do
6298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6299    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6301    break 2
6302  fi
6303done
6304  done
6305IFS=$as_save_IFS
6306
6307  ;;
6308esac
6309fi
6310DIFF=$ac_cv_path_DIFF
6311if test -n "$DIFF"; then
6312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6313$as_echo "$DIFF" >&6; }
6314else
6315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6316$as_echo "no" >&6; }
6317fi
6318
6319
6320        if test "x$DIFF" = x; then
6321          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6322        fi
6323      else
6324        # Otherwise we believe it is a complete path. Use it as it is.
6325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6326$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6328$as_echo_n "checking for DIFF... " >&6; }
6329        if test ! -x "$tool_specified"; then
6330          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6331$as_echo "not found" >&6; }
6332          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6333        fi
6334        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6335$as_echo "$tool_specified" >&6; }
6336      fi
6337    fi
6338  fi
6339
6340
6341
6342  if test "x$DIFF" = x; then
6343    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6344  fi
6345
6346
6347
6348
6349
6350  # Publish this variable in the help.
6351
6352
6353  if test "x$DIRNAME" = x; then
6354    # The variable is not set by user, try to locate tool using the code snippet
6355    for ac_prog in dirname
6356do
6357  # Extract the first word of "$ac_prog", so it can be a program name with args.
6358set dummy $ac_prog; ac_word=$2
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360$as_echo_n "checking for $ac_word... " >&6; }
6361if ${ac_cv_path_DIRNAME+:} false; then :
6362  $as_echo_n "(cached) " >&6
6363else
6364  case $DIRNAME in
6365  [\\/]* | ?:[\\/]*)
6366  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6367  ;;
6368  *)
6369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372  IFS=$as_save_IFS
6373  test -z "$as_dir" && as_dir=.
6374    for ac_exec_ext in '' $ac_executable_extensions; do
6375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6376    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6378    break 2
6379  fi
6380done
6381  done
6382IFS=$as_save_IFS
6383
6384  ;;
6385esac
6386fi
6387DIRNAME=$ac_cv_path_DIRNAME
6388if test -n "$DIRNAME"; then
6389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6390$as_echo "$DIRNAME" >&6; }
6391else
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396
6397  test -n "$DIRNAME" && break
6398done
6399
6400  else
6401    # The variable is set, but is it from the command line or the environment?
6402
6403    # Try to remove the string !DIRNAME! from our list.
6404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6406      # If it failed, the variable was not from the command line. Ignore it,
6407      # but warn the user (except for BASH, which is always set by the calling BASH).
6408      if test "xDIRNAME" != xBASH; then
6409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6410$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6411      fi
6412      # Try to locate tool using the code snippet
6413      for ac_prog in dirname
6414do
6415  # Extract the first word of "$ac_prog", so it can be a program name with args.
6416set dummy $ac_prog; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if ${ac_cv_path_DIRNAME+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $DIRNAME in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6434    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445DIRNAME=$ac_cv_path_DIRNAME
6446if test -n "$DIRNAME"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6448$as_echo "$DIRNAME" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455  test -n "$DIRNAME" && break
6456done
6457
6458    else
6459      # If it succeeded, then it was overridden by the user. We will use it
6460      # for the tool.
6461
6462      # First remove it from the list of overridden variables, so we can test
6463      # for unknown variables in the end.
6464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6465
6466      # Check if the provided tool contains a complete path.
6467      tool_specified="$DIRNAME"
6468      tool_basename="${tool_specified##*/}"
6469      if test "x$tool_basename" = "x$tool_specified"; then
6470        # A command without a complete path is provided, search $PATH.
6471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6472$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6473        # Extract the first word of "$tool_basename", so it can be a program name with args.
6474set dummy $tool_basename; ac_word=$2
6475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6476$as_echo_n "checking for $ac_word... " >&6; }
6477if ${ac_cv_path_DIRNAME+:} false; then :
6478  $as_echo_n "(cached) " >&6
6479else
6480  case $DIRNAME in
6481  [\\/]* | ?:[\\/]*)
6482  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6483  ;;
6484  *)
6485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6486for as_dir in $PATH
6487do
6488  IFS=$as_save_IFS
6489  test -z "$as_dir" && as_dir=.
6490    for ac_exec_ext in '' $ac_executable_extensions; do
6491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6492    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6494    break 2
6495  fi
6496done
6497  done
6498IFS=$as_save_IFS
6499
6500  ;;
6501esac
6502fi
6503DIRNAME=$ac_cv_path_DIRNAME
6504if test -n "$DIRNAME"; then
6505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6506$as_echo "$DIRNAME" >&6; }
6507else
6508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6509$as_echo "no" >&6; }
6510fi
6511
6512
6513        if test "x$DIRNAME" = x; then
6514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6515        fi
6516      else
6517        # Otherwise we believe it is a complete path. Use it as it is.
6518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6519$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6521$as_echo_n "checking for DIRNAME... " >&6; }
6522        if test ! -x "$tool_specified"; then
6523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6524$as_echo "not found" >&6; }
6525          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6526        fi
6527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6528$as_echo "$tool_specified" >&6; }
6529      fi
6530    fi
6531  fi
6532
6533
6534
6535  if test "x$DIRNAME" = x; then
6536    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6537  fi
6538
6539
6540
6541
6542
6543  # Publish this variable in the help.
6544
6545
6546  if test "x$ECHO" = x; then
6547    # The variable is not set by user, try to locate tool using the code snippet
6548    for ac_prog in echo
6549do
6550  # Extract the first word of "$ac_prog", so it can be a program name with args.
6551set dummy $ac_prog; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_path_ECHO+:} false; then :
6555  $as_echo_n "(cached) " >&6
6556else
6557  case $ECHO in
6558  [\\/]* | ?:[\\/]*)
6559  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6560  ;;
6561  *)
6562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH
6564do
6565  IFS=$as_save_IFS
6566  test -z "$as_dir" && as_dir=.
6567    for ac_exec_ext in '' $ac_executable_extensions; do
6568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6569    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571    break 2
6572  fi
6573done
6574  done
6575IFS=$as_save_IFS
6576
6577  ;;
6578esac
6579fi
6580ECHO=$ac_cv_path_ECHO
6581if test -n "$ECHO"; then
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6583$as_echo "$ECHO" >&6; }
6584else
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
6589
6590  test -n "$ECHO" && break
6591done
6592
6593  else
6594    # The variable is set, but is it from the command line or the environment?
6595
6596    # Try to remove the string !ECHO! from our list.
6597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6599      # If it failed, the variable was not from the command line. Ignore it,
6600      # but warn the user (except for BASH, which is always set by the calling BASH).
6601      if test "xECHO" != xBASH; then
6602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6603$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6604      fi
6605      # Try to locate tool using the code snippet
6606      for ac_prog in echo
6607do
6608  # Extract the first word of "$ac_prog", so it can be a program name with args.
6609set dummy $ac_prog; ac_word=$2
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_ECHO+:} false; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  case $ECHO in
6616  [\\/]* | ?:[\\/]*)
6617  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6618  ;;
6619  *)
6620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in $PATH
6622do
6623  IFS=$as_save_IFS
6624  test -z "$as_dir" && as_dir=.
6625    for ac_exec_ext in '' $ac_executable_extensions; do
6626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629    break 2
6630  fi
6631done
6632  done
6633IFS=$as_save_IFS
6634
6635  ;;
6636esac
6637fi
6638ECHO=$ac_cv_path_ECHO
6639if test -n "$ECHO"; then
6640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6641$as_echo "$ECHO" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646
6647
6648  test -n "$ECHO" && break
6649done
6650
6651    else
6652      # If it succeeded, then it was overridden by the user. We will use it
6653      # for the tool.
6654
6655      # First remove it from the list of overridden variables, so we can test
6656      # for unknown variables in the end.
6657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6658
6659      # Check if the provided tool contains a complete path.
6660      tool_specified="$ECHO"
6661      tool_basename="${tool_specified##*/}"
6662      if test "x$tool_basename" = "x$tool_specified"; then
6663        # A command without a complete path is provided, search $PATH.
6664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6665$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6666        # Extract the first word of "$tool_basename", so it can be a program name with args.
6667set dummy $tool_basename; ac_word=$2
6668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6669$as_echo_n "checking for $ac_word... " >&6; }
6670if ${ac_cv_path_ECHO+:} false; then :
6671  $as_echo_n "(cached) " >&6
6672else
6673  case $ECHO in
6674  [\\/]* | ?:[\\/]*)
6675  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6676  ;;
6677  *)
6678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6679for as_dir in $PATH
6680do
6681  IFS=$as_save_IFS
6682  test -z "$as_dir" && as_dir=.
6683    for ac_exec_ext in '' $ac_executable_extensions; do
6684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6685    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6687    break 2
6688  fi
6689done
6690  done
6691IFS=$as_save_IFS
6692
6693  ;;
6694esac
6695fi
6696ECHO=$ac_cv_path_ECHO
6697if test -n "$ECHO"; then
6698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6699$as_echo "$ECHO" >&6; }
6700else
6701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702$as_echo "no" >&6; }
6703fi
6704
6705
6706        if test "x$ECHO" = x; then
6707          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6708        fi
6709      else
6710        # Otherwise we believe it is a complete path. Use it as it is.
6711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6712$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6714$as_echo_n "checking for ECHO... " >&6; }
6715        if test ! -x "$tool_specified"; then
6716          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6717$as_echo "not found" >&6; }
6718          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6719        fi
6720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6721$as_echo "$tool_specified" >&6; }
6722      fi
6723    fi
6724  fi
6725
6726
6727
6728  if test "x$ECHO" = x; then
6729    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6730  fi
6731
6732
6733
6734
6735
6736  # Publish this variable in the help.
6737
6738
6739  if test "x$EXPR" = x; then
6740    # The variable is not set by user, try to locate tool using the code snippet
6741    for ac_prog in expr
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_EXPR+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $EXPR in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773EXPR=$ac_cv_path_EXPR
6774if test -n "$EXPR"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6776$as_echo "$EXPR" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$EXPR" && break
6784done
6785
6786  else
6787    # The variable is set, but is it from the command line or the environment?
6788
6789    # Try to remove the string !EXPR! from our list.
6790    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6791    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6792      # If it failed, the variable was not from the command line. Ignore it,
6793      # but warn the user (except for BASH, which is always set by the calling BASH).
6794      if test "xEXPR" != xBASH; then
6795        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6796$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6797      fi
6798      # Try to locate tool using the code snippet
6799      for ac_prog in expr
6800do
6801  # Extract the first word of "$ac_prog", so it can be a program name with args.
6802set dummy $ac_prog; ac_word=$2
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if ${ac_cv_path_EXPR+:} false; then :
6806  $as_echo_n "(cached) " >&6
6807else
6808  case $EXPR in
6809  [\\/]* | ?:[\\/]*)
6810  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6811  ;;
6812  *)
6813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6814for as_dir in $PATH
6815do
6816  IFS=$as_save_IFS
6817  test -z "$as_dir" && as_dir=.
6818    for ac_exec_ext in '' $ac_executable_extensions; do
6819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6820    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6822    break 2
6823  fi
6824done
6825  done
6826IFS=$as_save_IFS
6827
6828  ;;
6829esac
6830fi
6831EXPR=$ac_cv_path_EXPR
6832if test -n "$EXPR"; then
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6834$as_echo "$EXPR" >&6; }
6835else
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838fi
6839
6840
6841  test -n "$EXPR" && break
6842done
6843
6844    else
6845      # If it succeeded, then it was overridden by the user. We will use it
6846      # for the tool.
6847
6848      # First remove it from the list of overridden variables, so we can test
6849      # for unknown variables in the end.
6850      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6851
6852      # Check if the provided tool contains a complete path.
6853      tool_specified="$EXPR"
6854      tool_basename="${tool_specified##*/}"
6855      if test "x$tool_basename" = "x$tool_specified"; then
6856        # A command without a complete path is provided, search $PATH.
6857        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6858$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6859        # Extract the first word of "$tool_basename", so it can be a program name with args.
6860set dummy $tool_basename; ac_word=$2
6861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6862$as_echo_n "checking for $ac_word... " >&6; }
6863if ${ac_cv_path_EXPR+:} false; then :
6864  $as_echo_n "(cached) " >&6
6865else
6866  case $EXPR in
6867  [\\/]* | ?:[\\/]*)
6868  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6869  ;;
6870  *)
6871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6872for as_dir in $PATH
6873do
6874  IFS=$as_save_IFS
6875  test -z "$as_dir" && as_dir=.
6876    for ac_exec_ext in '' $ac_executable_extensions; do
6877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6878    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6880    break 2
6881  fi
6882done
6883  done
6884IFS=$as_save_IFS
6885
6886  ;;
6887esac
6888fi
6889EXPR=$ac_cv_path_EXPR
6890if test -n "$EXPR"; then
6891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6892$as_echo "$EXPR" >&6; }
6893else
6894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6895$as_echo "no" >&6; }
6896fi
6897
6898
6899        if test "x$EXPR" = x; then
6900          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6901        fi
6902      else
6903        # Otherwise we believe it is a complete path. Use it as it is.
6904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6905$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6906        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6907$as_echo_n "checking for EXPR... " >&6; }
6908        if test ! -x "$tool_specified"; then
6909          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6910$as_echo "not found" >&6; }
6911          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6912        fi
6913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6914$as_echo "$tool_specified" >&6; }
6915      fi
6916    fi
6917  fi
6918
6919
6920
6921  if test "x$EXPR" = x; then
6922    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6923  fi
6924
6925
6926
6927
6928
6929  # Publish this variable in the help.
6930
6931
6932  if test "x$FILE" = x; then
6933    # The variable is not set by user, try to locate tool using the code snippet
6934    for ac_prog in file
6935do
6936  # Extract the first word of "$ac_prog", so it can be a program name with args.
6937set dummy $ac_prog; ac_word=$2
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939$as_echo_n "checking for $ac_word... " >&6; }
6940if ${ac_cv_path_FILE+:} false; then :
6941  $as_echo_n "(cached) " >&6
6942else
6943  case $FILE in
6944  [\\/]* | ?:[\\/]*)
6945  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6946  ;;
6947  *)
6948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949for as_dir in $PATH
6950do
6951  IFS=$as_save_IFS
6952  test -z "$as_dir" && as_dir=.
6953    for ac_exec_ext in '' $ac_executable_extensions; do
6954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6955    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6957    break 2
6958  fi
6959done
6960  done
6961IFS=$as_save_IFS
6962
6963  ;;
6964esac
6965fi
6966FILE=$ac_cv_path_FILE
6967if test -n "$FILE"; then
6968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6969$as_echo "$FILE" >&6; }
6970else
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972$as_echo "no" >&6; }
6973fi
6974
6975
6976  test -n "$FILE" && break
6977done
6978
6979  else
6980    # The variable is set, but is it from the command line or the environment?
6981
6982    # Try to remove the string !FILE! from our list.
6983    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6984    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6985      # If it failed, the variable was not from the command line. Ignore it,
6986      # but warn the user (except for BASH, which is always set by the calling BASH).
6987      if test "xFILE" != xBASH; then
6988        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6989$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6990      fi
6991      # Try to locate tool using the code snippet
6992      for ac_prog in file
6993do
6994  # Extract the first word of "$ac_prog", so it can be a program name with args.
6995set dummy $ac_prog; ac_word=$2
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6997$as_echo_n "checking for $ac_word... " >&6; }
6998if ${ac_cv_path_FILE+:} false; then :
6999  $as_echo_n "(cached) " >&6
7000else
7001  case $FILE in
7002  [\\/]* | ?:[\\/]*)
7003  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7004  ;;
7005  *)
7006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7007for as_dir in $PATH
7008do
7009  IFS=$as_save_IFS
7010  test -z "$as_dir" && as_dir=.
7011    for ac_exec_ext in '' $ac_executable_extensions; do
7012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7013    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7015    break 2
7016  fi
7017done
7018  done
7019IFS=$as_save_IFS
7020
7021  ;;
7022esac
7023fi
7024FILE=$ac_cv_path_FILE
7025if test -n "$FILE"; then
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7027$as_echo "$FILE" >&6; }
7028else
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7030$as_echo "no" >&6; }
7031fi
7032
7033
7034  test -n "$FILE" && break
7035done
7036
7037    else
7038      # If it succeeded, then it was overridden by the user. We will use it
7039      # for the tool.
7040
7041      # First remove it from the list of overridden variables, so we can test
7042      # for unknown variables in the end.
7043      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7044
7045      # Check if the provided tool contains a complete path.
7046      tool_specified="$FILE"
7047      tool_basename="${tool_specified##*/}"
7048      if test "x$tool_basename" = "x$tool_specified"; then
7049        # A command without a complete path is provided, search $PATH.
7050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7051$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7052        # Extract the first word of "$tool_basename", so it can be a program name with args.
7053set dummy $tool_basename; ac_word=$2
7054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7055$as_echo_n "checking for $ac_word... " >&6; }
7056if ${ac_cv_path_FILE+:} false; then :
7057  $as_echo_n "(cached) " >&6
7058else
7059  case $FILE in
7060  [\\/]* | ?:[\\/]*)
7061  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7062  ;;
7063  *)
7064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7065for as_dir in $PATH
7066do
7067  IFS=$as_save_IFS
7068  test -z "$as_dir" && as_dir=.
7069    for ac_exec_ext in '' $ac_executable_extensions; do
7070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7071    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7073    break 2
7074  fi
7075done
7076  done
7077IFS=$as_save_IFS
7078
7079  ;;
7080esac
7081fi
7082FILE=$ac_cv_path_FILE
7083if test -n "$FILE"; then
7084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7085$as_echo "$FILE" >&6; }
7086else
7087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7088$as_echo "no" >&6; }
7089fi
7090
7091
7092        if test "x$FILE" = x; then
7093          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7094        fi
7095      else
7096        # Otherwise we believe it is a complete path. Use it as it is.
7097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7098$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7099        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7100$as_echo_n "checking for FILE... " >&6; }
7101        if test ! -x "$tool_specified"; then
7102          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7103$as_echo "not found" >&6; }
7104          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7105        fi
7106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7107$as_echo "$tool_specified" >&6; }
7108      fi
7109    fi
7110  fi
7111
7112
7113
7114  if test "x$FILE" = x; then
7115    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7116  fi
7117
7118
7119
7120
7121
7122  # Publish this variable in the help.
7123
7124
7125  if test "x$FIND" = x; then
7126    # The variable is not set by user, try to locate tool using the code snippet
7127    for ac_prog in find
7128do
7129  # Extract the first word of "$ac_prog", so it can be a program name with args.
7130set dummy $ac_prog; ac_word=$2
7131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7132$as_echo_n "checking for $ac_word... " >&6; }
7133if ${ac_cv_path_FIND+:} false; then :
7134  $as_echo_n "(cached) " >&6
7135else
7136  case $FIND in
7137  [\\/]* | ?:[\\/]*)
7138  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7139  ;;
7140  *)
7141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142for as_dir in $PATH
7143do
7144  IFS=$as_save_IFS
7145  test -z "$as_dir" && as_dir=.
7146    for ac_exec_ext in '' $ac_executable_extensions; do
7147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7148    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7150    break 2
7151  fi
7152done
7153  done
7154IFS=$as_save_IFS
7155
7156  ;;
7157esac
7158fi
7159FIND=$ac_cv_path_FIND
7160if test -n "$FIND"; then
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7162$as_echo "$FIND" >&6; }
7163else
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165$as_echo "no" >&6; }
7166fi
7167
7168
7169  test -n "$FIND" && break
7170done
7171
7172  else
7173    # The variable is set, but is it from the command line or the environment?
7174
7175    # Try to remove the string !FIND! from our list.
7176    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7177    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7178      # If it failed, the variable was not from the command line. Ignore it,
7179      # but warn the user (except for BASH, which is always set by the calling BASH).
7180      if test "xFIND" != xBASH; then
7181        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7182$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7183      fi
7184      # Try to locate tool using the code snippet
7185      for ac_prog in find
7186do
7187  # Extract the first word of "$ac_prog", so it can be a program name with args.
7188set dummy $ac_prog; ac_word=$2
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7190$as_echo_n "checking for $ac_word... " >&6; }
7191if ${ac_cv_path_FIND+:} false; then :
7192  $as_echo_n "(cached) " >&6
7193else
7194  case $FIND in
7195  [\\/]* | ?:[\\/]*)
7196  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7197  ;;
7198  *)
7199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7200for as_dir in $PATH
7201do
7202  IFS=$as_save_IFS
7203  test -z "$as_dir" && as_dir=.
7204    for ac_exec_ext in '' $ac_executable_extensions; do
7205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7206    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7208    break 2
7209  fi
7210done
7211  done
7212IFS=$as_save_IFS
7213
7214  ;;
7215esac
7216fi
7217FIND=$ac_cv_path_FIND
7218if test -n "$FIND"; then
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7220$as_echo "$FIND" >&6; }
7221else
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223$as_echo "no" >&6; }
7224fi
7225
7226
7227  test -n "$FIND" && break
7228done
7229
7230    else
7231      # If it succeeded, then it was overridden by the user. We will use it
7232      # for the tool.
7233
7234      # First remove it from the list of overridden variables, so we can test
7235      # for unknown variables in the end.
7236      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7237
7238      # Check if the provided tool contains a complete path.
7239      tool_specified="$FIND"
7240      tool_basename="${tool_specified##*/}"
7241      if test "x$tool_basename" = "x$tool_specified"; then
7242        # A command without a complete path is provided, search $PATH.
7243        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7244$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7245        # Extract the first word of "$tool_basename", so it can be a program name with args.
7246set dummy $tool_basename; ac_word=$2
7247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7248$as_echo_n "checking for $ac_word... " >&6; }
7249if ${ac_cv_path_FIND+:} false; then :
7250  $as_echo_n "(cached) " >&6
7251else
7252  case $FIND in
7253  [\\/]* | ?:[\\/]*)
7254  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7255  ;;
7256  *)
7257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7258for as_dir in $PATH
7259do
7260  IFS=$as_save_IFS
7261  test -z "$as_dir" && as_dir=.
7262    for ac_exec_ext in '' $ac_executable_extensions; do
7263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7264    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7266    break 2
7267  fi
7268done
7269  done
7270IFS=$as_save_IFS
7271
7272  ;;
7273esac
7274fi
7275FIND=$ac_cv_path_FIND
7276if test -n "$FIND"; then
7277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7278$as_echo "$FIND" >&6; }
7279else
7280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281$as_echo "no" >&6; }
7282fi
7283
7284
7285        if test "x$FIND" = x; then
7286          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7287        fi
7288      else
7289        # Otherwise we believe it is a complete path. Use it as it is.
7290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7291$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7292        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7293$as_echo_n "checking for FIND... " >&6; }
7294        if test ! -x "$tool_specified"; then
7295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7296$as_echo "not found" >&6; }
7297          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7298        fi
7299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7300$as_echo "$tool_specified" >&6; }
7301      fi
7302    fi
7303  fi
7304
7305
7306
7307  if test "x$FIND" = x; then
7308    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7309  fi
7310
7311
7312
7313
7314
7315  # Publish this variable in the help.
7316
7317
7318  if test "x$HEAD" = x; then
7319    # The variable is not set by user, try to locate tool using the code snippet
7320    for ac_prog in head
7321do
7322  # Extract the first word of "$ac_prog", so it can be a program name with args.
7323set dummy $ac_prog; ac_word=$2
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7325$as_echo_n "checking for $ac_word... " >&6; }
7326if ${ac_cv_path_HEAD+:} false; then :
7327  $as_echo_n "(cached) " >&6
7328else
7329  case $HEAD in
7330  [\\/]* | ?:[\\/]*)
7331  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7332  ;;
7333  *)
7334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7335for as_dir in $PATH
7336do
7337  IFS=$as_save_IFS
7338  test -z "$as_dir" && as_dir=.
7339    for ac_exec_ext in '' $ac_executable_extensions; do
7340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7341    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343    break 2
7344  fi
7345done
7346  done
7347IFS=$as_save_IFS
7348
7349  ;;
7350esac
7351fi
7352HEAD=$ac_cv_path_HEAD
7353if test -n "$HEAD"; then
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7355$as_echo "$HEAD" >&6; }
7356else
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
7359fi
7360
7361
7362  test -n "$HEAD" && break
7363done
7364
7365  else
7366    # The variable is set, but is it from the command line or the environment?
7367
7368    # Try to remove the string !HEAD! from our list.
7369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7370    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7371      # If it failed, the variable was not from the command line. Ignore it,
7372      # but warn the user (except for BASH, which is always set by the calling BASH).
7373      if test "xHEAD" != xBASH; then
7374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7375$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7376      fi
7377      # Try to locate tool using the code snippet
7378      for ac_prog in head
7379do
7380  # Extract the first word of "$ac_prog", so it can be a program name with args.
7381set dummy $ac_prog; ac_word=$2
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7383$as_echo_n "checking for $ac_word... " >&6; }
7384if ${ac_cv_path_HEAD+:} false; then :
7385  $as_echo_n "(cached) " >&6
7386else
7387  case $HEAD in
7388  [\\/]* | ?:[\\/]*)
7389  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7390  ;;
7391  *)
7392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393for as_dir in $PATH
7394do
7395  IFS=$as_save_IFS
7396  test -z "$as_dir" && as_dir=.
7397    for ac_exec_ext in '' $ac_executable_extensions; do
7398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7399    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7401    break 2
7402  fi
7403done
7404  done
7405IFS=$as_save_IFS
7406
7407  ;;
7408esac
7409fi
7410HEAD=$ac_cv_path_HEAD
7411if test -n "$HEAD"; then
7412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7413$as_echo "$HEAD" >&6; }
7414else
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
7417fi
7418
7419
7420  test -n "$HEAD" && break
7421done
7422
7423    else
7424      # If it succeeded, then it was overridden by the user. We will use it
7425      # for the tool.
7426
7427      # First remove it from the list of overridden variables, so we can test
7428      # for unknown variables in the end.
7429      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7430
7431      # Check if the provided tool contains a complete path.
7432      tool_specified="$HEAD"
7433      tool_basename="${tool_specified##*/}"
7434      if test "x$tool_basename" = "x$tool_specified"; then
7435        # A command without a complete path is provided, search $PATH.
7436        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7437$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7438        # Extract the first word of "$tool_basename", so it can be a program name with args.
7439set dummy $tool_basename; ac_word=$2
7440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7441$as_echo_n "checking for $ac_word... " >&6; }
7442if ${ac_cv_path_HEAD+:} false; then :
7443  $as_echo_n "(cached) " >&6
7444else
7445  case $HEAD in
7446  [\\/]* | ?:[\\/]*)
7447  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7448  ;;
7449  *)
7450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7451for as_dir in $PATH
7452do
7453  IFS=$as_save_IFS
7454  test -z "$as_dir" && as_dir=.
7455    for ac_exec_ext in '' $ac_executable_extensions; do
7456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7457    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7459    break 2
7460  fi
7461done
7462  done
7463IFS=$as_save_IFS
7464
7465  ;;
7466esac
7467fi
7468HEAD=$ac_cv_path_HEAD
7469if test -n "$HEAD"; then
7470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7471$as_echo "$HEAD" >&6; }
7472else
7473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7474$as_echo "no" >&6; }
7475fi
7476
7477
7478        if test "x$HEAD" = x; then
7479          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7480        fi
7481      else
7482        # Otherwise we believe it is a complete path. Use it as it is.
7483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7484$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7486$as_echo_n "checking for HEAD... " >&6; }
7487        if test ! -x "$tool_specified"; then
7488          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7489$as_echo "not found" >&6; }
7490          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7491        fi
7492        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7493$as_echo "$tool_specified" >&6; }
7494      fi
7495    fi
7496  fi
7497
7498
7499
7500  if test "x$HEAD" = x; then
7501    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7502  fi
7503
7504
7505
7506
7507
7508  # Publish this variable in the help.
7509
7510
7511  if test "x$LN" = x; then
7512    # The variable is not set by user, try to locate tool using the code snippet
7513    for ac_prog in ln
7514do
7515  # Extract the first word of "$ac_prog", so it can be a program name with args.
7516set dummy $ac_prog; ac_word=$2
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518$as_echo_n "checking for $ac_word... " >&6; }
7519if ${ac_cv_path_LN+:} false; then :
7520  $as_echo_n "(cached) " >&6
7521else
7522  case $LN in
7523  [\\/]* | ?:[\\/]*)
7524  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7525  ;;
7526  *)
7527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530  IFS=$as_save_IFS
7531  test -z "$as_dir" && as_dir=.
7532    for ac_exec_ext in '' $ac_executable_extensions; do
7533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536    break 2
7537  fi
7538done
7539  done
7540IFS=$as_save_IFS
7541
7542  ;;
7543esac
7544fi
7545LN=$ac_cv_path_LN
7546if test -n "$LN"; then
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7548$as_echo "$LN" >&6; }
7549else
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
7552fi
7553
7554
7555  test -n "$LN" && break
7556done
7557
7558  else
7559    # The variable is set, but is it from the command line or the environment?
7560
7561    # Try to remove the string !LN! from our list.
7562    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7563    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7564      # If it failed, the variable was not from the command line. Ignore it,
7565      # but warn the user (except for BASH, which is always set by the calling BASH).
7566      if test "xLN" != xBASH; then
7567        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7568$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7569      fi
7570      # Try to locate tool using the code snippet
7571      for ac_prog in ln
7572do
7573  # Extract the first word of "$ac_prog", so it can be a program name with args.
7574set dummy $ac_prog; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_LN+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $LN in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603LN=$ac_cv_path_LN
7604if test -n "$LN"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7606$as_echo "$LN" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613  test -n "$LN" && break
7614done
7615
7616    else
7617      # If it succeeded, then it was overridden by the user. We will use it
7618      # for the tool.
7619
7620      # First remove it from the list of overridden variables, so we can test
7621      # for unknown variables in the end.
7622      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7623
7624      # Check if the provided tool contains a complete path.
7625      tool_specified="$LN"
7626      tool_basename="${tool_specified##*/}"
7627      if test "x$tool_basename" = "x$tool_specified"; then
7628        # A command without a complete path is provided, search $PATH.
7629        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7630$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7631        # Extract the first word of "$tool_basename", so it can be a program name with args.
7632set dummy $tool_basename; ac_word=$2
7633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7634$as_echo_n "checking for $ac_word... " >&6; }
7635if ${ac_cv_path_LN+:} false; then :
7636  $as_echo_n "(cached) " >&6
7637else
7638  case $LN in
7639  [\\/]* | ?:[\\/]*)
7640  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7641  ;;
7642  *)
7643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7644for as_dir in $PATH
7645do
7646  IFS=$as_save_IFS
7647  test -z "$as_dir" && as_dir=.
7648    for ac_exec_ext in '' $ac_executable_extensions; do
7649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7650    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7652    break 2
7653  fi
7654done
7655  done
7656IFS=$as_save_IFS
7657
7658  ;;
7659esac
7660fi
7661LN=$ac_cv_path_LN
7662if test -n "$LN"; then
7663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7664$as_echo "$LN" >&6; }
7665else
7666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7667$as_echo "no" >&6; }
7668fi
7669
7670
7671        if test "x$LN" = x; then
7672          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7673        fi
7674      else
7675        # Otherwise we believe it is a complete path. Use it as it is.
7676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7677$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7679$as_echo_n "checking for LN... " >&6; }
7680        if test ! -x "$tool_specified"; then
7681          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7682$as_echo "not found" >&6; }
7683          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7684        fi
7685        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7686$as_echo "$tool_specified" >&6; }
7687      fi
7688    fi
7689  fi
7690
7691
7692
7693  if test "x$LN" = x; then
7694    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7695  fi
7696
7697
7698
7699
7700
7701  # Publish this variable in the help.
7702
7703
7704  if test "x$LS" = x; then
7705    # The variable is not set by user, try to locate tool using the code snippet
7706    for ac_prog in ls
7707do
7708  # Extract the first word of "$ac_prog", so it can be a program name with args.
7709set dummy $ac_prog; ac_word=$2
7710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711$as_echo_n "checking for $ac_word... " >&6; }
7712if ${ac_cv_path_LS+:} false; then :
7713  $as_echo_n "(cached) " >&6
7714else
7715  case $LS in
7716  [\\/]* | ?:[\\/]*)
7717  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7718  ;;
7719  *)
7720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723  IFS=$as_save_IFS
7724  test -z "$as_dir" && as_dir=.
7725    for ac_exec_ext in '' $ac_executable_extensions; do
7726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7727    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729    break 2
7730  fi
7731done
7732  done
7733IFS=$as_save_IFS
7734
7735  ;;
7736esac
7737fi
7738LS=$ac_cv_path_LS
7739if test -n "$LS"; then
7740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7741$as_echo "$LS" >&6; }
7742else
7743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7744$as_echo "no" >&6; }
7745fi
7746
7747
7748  test -n "$LS" && break
7749done
7750
7751  else
7752    # The variable is set, but is it from the command line or the environment?
7753
7754    # Try to remove the string !LS! from our list.
7755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7757      # If it failed, the variable was not from the command line. Ignore it,
7758      # but warn the user (except for BASH, which is always set by the calling BASH).
7759      if test "xLS" != xBASH; then
7760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7761$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7762      fi
7763      # Try to locate tool using the code snippet
7764      for ac_prog in ls
7765do
7766  # Extract the first word of "$ac_prog", so it can be a program name with args.
7767set dummy $ac_prog; ac_word=$2
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769$as_echo_n "checking for $ac_word... " >&6; }
7770if ${ac_cv_path_LS+:} false; then :
7771  $as_echo_n "(cached) " >&6
7772else
7773  case $LS in
7774  [\\/]* | ?:[\\/]*)
7775  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7776  ;;
7777  *)
7778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781  IFS=$as_save_IFS
7782  test -z "$as_dir" && as_dir=.
7783    for ac_exec_ext in '' $ac_executable_extensions; do
7784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7785    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7787    break 2
7788  fi
7789done
7790  done
7791IFS=$as_save_IFS
7792
7793  ;;
7794esac
7795fi
7796LS=$ac_cv_path_LS
7797if test -n "$LS"; then
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7799$as_echo "$LS" >&6; }
7800else
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802$as_echo "no" >&6; }
7803fi
7804
7805
7806  test -n "$LS" && break
7807done
7808
7809    else
7810      # If it succeeded, then it was overridden by the user. We will use it
7811      # for the tool.
7812
7813      # First remove it from the list of overridden variables, so we can test
7814      # for unknown variables in the end.
7815      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7816
7817      # Check if the provided tool contains a complete path.
7818      tool_specified="$LS"
7819      tool_basename="${tool_specified##*/}"
7820      if test "x$tool_basename" = "x$tool_specified"; then
7821        # A command without a complete path is provided, search $PATH.
7822        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7823$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7824        # Extract the first word of "$tool_basename", so it can be a program name with args.
7825set dummy $tool_basename; ac_word=$2
7826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7827$as_echo_n "checking for $ac_word... " >&6; }
7828if ${ac_cv_path_LS+:} false; then :
7829  $as_echo_n "(cached) " >&6
7830else
7831  case $LS in
7832  [\\/]* | ?:[\\/]*)
7833  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7834  ;;
7835  *)
7836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7837for as_dir in $PATH
7838do
7839  IFS=$as_save_IFS
7840  test -z "$as_dir" && as_dir=.
7841    for ac_exec_ext in '' $ac_executable_extensions; do
7842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7843    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7845    break 2
7846  fi
7847done
7848  done
7849IFS=$as_save_IFS
7850
7851  ;;
7852esac
7853fi
7854LS=$ac_cv_path_LS
7855if test -n "$LS"; then
7856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7857$as_echo "$LS" >&6; }
7858else
7859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7860$as_echo "no" >&6; }
7861fi
7862
7863
7864        if test "x$LS" = x; then
7865          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7866        fi
7867      else
7868        # Otherwise we believe it is a complete path. Use it as it is.
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7870$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7871        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7872$as_echo_n "checking for LS... " >&6; }
7873        if test ! -x "$tool_specified"; then
7874          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7875$as_echo "not found" >&6; }
7876          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7877        fi
7878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7879$as_echo "$tool_specified" >&6; }
7880      fi
7881    fi
7882  fi
7883
7884
7885
7886  if test "x$LS" = x; then
7887    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7888  fi
7889
7890
7891
7892
7893
7894  # Publish this variable in the help.
7895
7896
7897  if test "x$MKDIR" = x; then
7898    # The variable is not set by user, try to locate tool using the code snippet
7899    for ac_prog in mkdir
7900do
7901  # Extract the first word of "$ac_prog", so it can be a program name with args.
7902set dummy $ac_prog; ac_word=$2
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7904$as_echo_n "checking for $ac_word... " >&6; }
7905if ${ac_cv_path_MKDIR+:} false; then :
7906  $as_echo_n "(cached) " >&6
7907else
7908  case $MKDIR in
7909  [\\/]* | ?:[\\/]*)
7910  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7911  ;;
7912  *)
7913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7914for as_dir in $PATH
7915do
7916  IFS=$as_save_IFS
7917  test -z "$as_dir" && as_dir=.
7918    for ac_exec_ext in '' $ac_executable_extensions; do
7919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7920    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7922    break 2
7923  fi
7924done
7925  done
7926IFS=$as_save_IFS
7927
7928  ;;
7929esac
7930fi
7931MKDIR=$ac_cv_path_MKDIR
7932if test -n "$MKDIR"; then
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7934$as_echo "$MKDIR" >&6; }
7935else
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7937$as_echo "no" >&6; }
7938fi
7939
7940
7941  test -n "$MKDIR" && break
7942done
7943
7944  else
7945    # The variable is set, but is it from the command line or the environment?
7946
7947    # Try to remove the string !MKDIR! from our list.
7948    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7949    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7950      # If it failed, the variable was not from the command line. Ignore it,
7951      # but warn the user (except for BASH, which is always set by the calling BASH).
7952      if test "xMKDIR" != xBASH; then
7953        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7954$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7955      fi
7956      # Try to locate tool using the code snippet
7957      for ac_prog in mkdir
7958do
7959  # Extract the first word of "$ac_prog", so it can be a program name with args.
7960set dummy $ac_prog; ac_word=$2
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7962$as_echo_n "checking for $ac_word... " >&6; }
7963if ${ac_cv_path_MKDIR+:} false; then :
7964  $as_echo_n "(cached) " >&6
7965else
7966  case $MKDIR in
7967  [\\/]* | ?:[\\/]*)
7968  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7969  ;;
7970  *)
7971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7972for as_dir in $PATH
7973do
7974  IFS=$as_save_IFS
7975  test -z "$as_dir" && as_dir=.
7976    for ac_exec_ext in '' $ac_executable_extensions; do
7977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7978    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7980    break 2
7981  fi
7982done
7983  done
7984IFS=$as_save_IFS
7985
7986  ;;
7987esac
7988fi
7989MKDIR=$ac_cv_path_MKDIR
7990if test -n "$MKDIR"; then
7991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7992$as_echo "$MKDIR" >&6; }
7993else
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
7996fi
7997
7998
7999  test -n "$MKDIR" && break
8000done
8001
8002    else
8003      # If it succeeded, then it was overridden by the user. We will use it
8004      # for the tool.
8005
8006      # First remove it from the list of overridden variables, so we can test
8007      # for unknown variables in the end.
8008      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8009
8010      # Check if the provided tool contains a complete path.
8011      tool_specified="$MKDIR"
8012      tool_basename="${tool_specified##*/}"
8013      if test "x$tool_basename" = "x$tool_specified"; then
8014        # A command without a complete path is provided, search $PATH.
8015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8016$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8017        # Extract the first word of "$tool_basename", so it can be a program name with args.
8018set dummy $tool_basename; ac_word=$2
8019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8020$as_echo_n "checking for $ac_word... " >&6; }
8021if ${ac_cv_path_MKDIR+:} false; then :
8022  $as_echo_n "(cached) " >&6
8023else
8024  case $MKDIR in
8025  [\\/]* | ?:[\\/]*)
8026  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8027  ;;
8028  *)
8029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8030for as_dir in $PATH
8031do
8032  IFS=$as_save_IFS
8033  test -z "$as_dir" && as_dir=.
8034    for ac_exec_ext in '' $ac_executable_extensions; do
8035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8036    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8038    break 2
8039  fi
8040done
8041  done
8042IFS=$as_save_IFS
8043
8044  ;;
8045esac
8046fi
8047MKDIR=$ac_cv_path_MKDIR
8048if test -n "$MKDIR"; then
8049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8050$as_echo "$MKDIR" >&6; }
8051else
8052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8053$as_echo "no" >&6; }
8054fi
8055
8056
8057        if test "x$MKDIR" = x; then
8058          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8059        fi
8060      else
8061        # Otherwise we believe it is a complete path. Use it as it is.
8062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8063$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8064        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8065$as_echo_n "checking for MKDIR... " >&6; }
8066        if test ! -x "$tool_specified"; then
8067          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8068$as_echo "not found" >&6; }
8069          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8070        fi
8071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8072$as_echo "$tool_specified" >&6; }
8073      fi
8074    fi
8075  fi
8076
8077
8078
8079  if test "x$MKDIR" = x; then
8080    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8081  fi
8082
8083
8084
8085
8086
8087  # Publish this variable in the help.
8088
8089
8090  if test "x$MKTEMP" = x; then
8091    # The variable is not set by user, try to locate tool using the code snippet
8092    for ac_prog in mktemp
8093do
8094  # Extract the first word of "$ac_prog", so it can be a program name with args.
8095set dummy $ac_prog; ac_word=$2
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097$as_echo_n "checking for $ac_word... " >&6; }
8098if ${ac_cv_path_MKTEMP+:} false; then :
8099  $as_echo_n "(cached) " >&6
8100else
8101  case $MKTEMP in
8102  [\\/]* | ?:[\\/]*)
8103  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8104  ;;
8105  *)
8106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109  IFS=$as_save_IFS
8110  test -z "$as_dir" && as_dir=.
8111    for ac_exec_ext in '' $ac_executable_extensions; do
8112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8113    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8115    break 2
8116  fi
8117done
8118  done
8119IFS=$as_save_IFS
8120
8121  ;;
8122esac
8123fi
8124MKTEMP=$ac_cv_path_MKTEMP
8125if test -n "$MKTEMP"; then
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8127$as_echo "$MKTEMP" >&6; }
8128else
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
8131fi
8132
8133
8134  test -n "$MKTEMP" && break
8135done
8136
8137  else
8138    # The variable is set, but is it from the command line or the environment?
8139
8140    # Try to remove the string !MKTEMP! from our list.
8141    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8142    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8143      # If it failed, the variable was not from the command line. Ignore it,
8144      # but warn the user (except for BASH, which is always set by the calling BASH).
8145      if test "xMKTEMP" != xBASH; then
8146        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8147$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8148      fi
8149      # Try to locate tool using the code snippet
8150      for ac_prog in mktemp
8151do
8152  # Extract the first word of "$ac_prog", so it can be a program name with args.
8153set dummy $ac_prog; ac_word=$2
8154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
8156if ${ac_cv_path_MKTEMP+:} false; then :
8157  $as_echo_n "(cached) " >&6
8158else
8159  case $MKTEMP in
8160  [\\/]* | ?:[\\/]*)
8161  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8162  ;;
8163  *)
8164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167  IFS=$as_save_IFS
8168  test -z "$as_dir" && as_dir=.
8169    for ac_exec_ext in '' $ac_executable_extensions; do
8170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8171    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8173    break 2
8174  fi
8175done
8176  done
8177IFS=$as_save_IFS
8178
8179  ;;
8180esac
8181fi
8182MKTEMP=$ac_cv_path_MKTEMP
8183if test -n "$MKTEMP"; then
8184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8185$as_echo "$MKTEMP" >&6; }
8186else
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
8189fi
8190
8191
8192  test -n "$MKTEMP" && break
8193done
8194
8195    else
8196      # If it succeeded, then it was overridden by the user. We will use it
8197      # for the tool.
8198
8199      # First remove it from the list of overridden variables, so we can test
8200      # for unknown variables in the end.
8201      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8202
8203      # Check if the provided tool contains a complete path.
8204      tool_specified="$MKTEMP"
8205      tool_basename="${tool_specified##*/}"
8206      if test "x$tool_basename" = "x$tool_specified"; then
8207        # A command without a complete path is provided, search $PATH.
8208        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8209$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8210        # Extract the first word of "$tool_basename", so it can be a program name with args.
8211set dummy $tool_basename; ac_word=$2
8212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8213$as_echo_n "checking for $ac_word... " >&6; }
8214if ${ac_cv_path_MKTEMP+:} false; then :
8215  $as_echo_n "(cached) " >&6
8216else
8217  case $MKTEMP in
8218  [\\/]* | ?:[\\/]*)
8219  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8220  ;;
8221  *)
8222  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8223for as_dir in $PATH
8224do
8225  IFS=$as_save_IFS
8226  test -z "$as_dir" && as_dir=.
8227    for ac_exec_ext in '' $ac_executable_extensions; do
8228  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8229    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8230    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8231    break 2
8232  fi
8233done
8234  done
8235IFS=$as_save_IFS
8236
8237  ;;
8238esac
8239fi
8240MKTEMP=$ac_cv_path_MKTEMP
8241if test -n "$MKTEMP"; then
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8243$as_echo "$MKTEMP" >&6; }
8244else
8245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8246$as_echo "no" >&6; }
8247fi
8248
8249
8250        if test "x$MKTEMP" = x; then
8251          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8252        fi
8253      else
8254        # Otherwise we believe it is a complete path. Use it as it is.
8255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8256$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8257        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8258$as_echo_n "checking for MKTEMP... " >&6; }
8259        if test ! -x "$tool_specified"; then
8260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8261$as_echo "not found" >&6; }
8262          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8263        fi
8264        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8265$as_echo "$tool_specified" >&6; }
8266      fi
8267    fi
8268  fi
8269
8270
8271
8272  if test "x$MKTEMP" = x; then
8273    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8274  fi
8275
8276
8277
8278
8279
8280  # Publish this variable in the help.
8281
8282
8283  if test "x$MV" = x; then
8284    # The variable is not set by user, try to locate tool using the code snippet
8285    for ac_prog in mv
8286do
8287  # Extract the first word of "$ac_prog", so it can be a program name with args.
8288set dummy $ac_prog; ac_word=$2
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8290$as_echo_n "checking for $ac_word... " >&6; }
8291if ${ac_cv_path_MV+:} false; then :
8292  $as_echo_n "(cached) " >&6
8293else
8294  case $MV in
8295  [\\/]* | ?:[\\/]*)
8296  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8297  ;;
8298  *)
8299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300for as_dir in $PATH
8301do
8302  IFS=$as_save_IFS
8303  test -z "$as_dir" && as_dir=.
8304    for ac_exec_ext in '' $ac_executable_extensions; do
8305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308    break 2
8309  fi
8310done
8311  done
8312IFS=$as_save_IFS
8313
8314  ;;
8315esac
8316fi
8317MV=$ac_cv_path_MV
8318if test -n "$MV"; then
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8320$as_echo "$MV" >&6; }
8321else
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
8324fi
8325
8326
8327  test -n "$MV" && break
8328done
8329
8330  else
8331    # The variable is set, but is it from the command line or the environment?
8332
8333    # Try to remove the string !MV! from our list.
8334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8336      # If it failed, the variable was not from the command line. Ignore it,
8337      # but warn the user (except for BASH, which is always set by the calling BASH).
8338      if test "xMV" != xBASH; then
8339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8340$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8341      fi
8342      # Try to locate tool using the code snippet
8343      for ac_prog in mv
8344do
8345  # Extract the first word of "$ac_prog", so it can be a program name with args.
8346set dummy $ac_prog; ac_word=$2
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8348$as_echo_n "checking for $ac_word... " >&6; }
8349if ${ac_cv_path_MV+:} false; then :
8350  $as_echo_n "(cached) " >&6
8351else
8352  case $MV in
8353  [\\/]* | ?:[\\/]*)
8354  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8355  ;;
8356  *)
8357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8358for as_dir in $PATH
8359do
8360  IFS=$as_save_IFS
8361  test -z "$as_dir" && as_dir=.
8362    for ac_exec_ext in '' $ac_executable_extensions; do
8363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8364    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8366    break 2
8367  fi
8368done
8369  done
8370IFS=$as_save_IFS
8371
8372  ;;
8373esac
8374fi
8375MV=$ac_cv_path_MV
8376if test -n "$MV"; then
8377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8378$as_echo "$MV" >&6; }
8379else
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8381$as_echo "no" >&6; }
8382fi
8383
8384
8385  test -n "$MV" && break
8386done
8387
8388    else
8389      # If it succeeded, then it was overridden by the user. We will use it
8390      # for the tool.
8391
8392      # First remove it from the list of overridden variables, so we can test
8393      # for unknown variables in the end.
8394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8395
8396      # Check if the provided tool contains a complete path.
8397      tool_specified="$MV"
8398      tool_basename="${tool_specified##*/}"
8399      if test "x$tool_basename" = "x$tool_specified"; then
8400        # A command without a complete path is provided, search $PATH.
8401        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8402$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8403        # Extract the first word of "$tool_basename", so it can be a program name with args.
8404set dummy $tool_basename; ac_word=$2
8405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8406$as_echo_n "checking for $ac_word... " >&6; }
8407if ${ac_cv_path_MV+:} false; then :
8408  $as_echo_n "(cached) " >&6
8409else
8410  case $MV in
8411  [\\/]* | ?:[\\/]*)
8412  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8413  ;;
8414  *)
8415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8416for as_dir in $PATH
8417do
8418  IFS=$as_save_IFS
8419  test -z "$as_dir" && as_dir=.
8420    for ac_exec_ext in '' $ac_executable_extensions; do
8421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8422    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8424    break 2
8425  fi
8426done
8427  done
8428IFS=$as_save_IFS
8429
8430  ;;
8431esac
8432fi
8433MV=$ac_cv_path_MV
8434if test -n "$MV"; then
8435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8436$as_echo "$MV" >&6; }
8437else
8438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8439$as_echo "no" >&6; }
8440fi
8441
8442
8443        if test "x$MV" = x; then
8444          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8445        fi
8446      else
8447        # Otherwise we believe it is a complete path. Use it as it is.
8448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8449$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8450        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8451$as_echo_n "checking for MV... " >&6; }
8452        if test ! -x "$tool_specified"; then
8453          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8454$as_echo "not found" >&6; }
8455          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8456        fi
8457        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8458$as_echo "$tool_specified" >&6; }
8459      fi
8460    fi
8461  fi
8462
8463
8464
8465  if test "x$MV" = x; then
8466    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8467  fi
8468
8469
8470
8471
8472
8473  # Publish this variable in the help.
8474
8475
8476  if test "x$NAWK" = x; then
8477    # The variable is not set by user, try to locate tool using the code snippet
8478    for ac_prog in nawk gawk awk
8479do
8480  # Extract the first word of "$ac_prog", so it can be a program name with args.
8481set dummy $ac_prog; ac_word=$2
8482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483$as_echo_n "checking for $ac_word... " >&6; }
8484if ${ac_cv_path_NAWK+:} false; then :
8485  $as_echo_n "(cached) " >&6
8486else
8487  case $NAWK in
8488  [\\/]* | ?:[\\/]*)
8489  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8490  ;;
8491  *)
8492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8493for as_dir in $PATH
8494do
8495  IFS=$as_save_IFS
8496  test -z "$as_dir" && as_dir=.
8497    for ac_exec_ext in '' $ac_executable_extensions; do
8498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8499    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8501    break 2
8502  fi
8503done
8504  done
8505IFS=$as_save_IFS
8506
8507  ;;
8508esac
8509fi
8510NAWK=$ac_cv_path_NAWK
8511if test -n "$NAWK"; then
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8513$as_echo "$NAWK" >&6; }
8514else
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8516$as_echo "no" >&6; }
8517fi
8518
8519
8520  test -n "$NAWK" && break
8521done
8522
8523  else
8524    # The variable is set, but is it from the command line or the environment?
8525
8526    # Try to remove the string !NAWK! from our list.
8527    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8528    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8529      # If it failed, the variable was not from the command line. Ignore it,
8530      # but warn the user (except for BASH, which is always set by the calling BASH).
8531      if test "xNAWK" != xBASH; then
8532        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8533$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8534      fi
8535      # Try to locate tool using the code snippet
8536      for ac_prog in nawk gawk awk
8537do
8538  # Extract the first word of "$ac_prog", so it can be a program name with args.
8539set dummy $ac_prog; ac_word=$2
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8541$as_echo_n "checking for $ac_word... " >&6; }
8542if ${ac_cv_path_NAWK+:} false; then :
8543  $as_echo_n "(cached) " >&6
8544else
8545  case $NAWK in
8546  [\\/]* | ?:[\\/]*)
8547  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8548  ;;
8549  *)
8550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553  IFS=$as_save_IFS
8554  test -z "$as_dir" && as_dir=.
8555    for ac_exec_ext in '' $ac_executable_extensions; do
8556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8557    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8559    break 2
8560  fi
8561done
8562  done
8563IFS=$as_save_IFS
8564
8565  ;;
8566esac
8567fi
8568NAWK=$ac_cv_path_NAWK
8569if test -n "$NAWK"; then
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8571$as_echo "$NAWK" >&6; }
8572else
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
8575fi
8576
8577
8578  test -n "$NAWK" && break
8579done
8580
8581    else
8582      # If it succeeded, then it was overridden by the user. We will use it
8583      # for the tool.
8584
8585      # First remove it from the list of overridden variables, so we can test
8586      # for unknown variables in the end.
8587      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8588
8589      # Check if the provided tool contains a complete path.
8590      tool_specified="$NAWK"
8591      tool_basename="${tool_specified##*/}"
8592      if test "x$tool_basename" = "x$tool_specified"; then
8593        # A command without a complete path is provided, search $PATH.
8594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8595$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8596        # Extract the first word of "$tool_basename", so it can be a program name with args.
8597set dummy $tool_basename; ac_word=$2
8598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8599$as_echo_n "checking for $ac_word... " >&6; }
8600if ${ac_cv_path_NAWK+:} false; then :
8601  $as_echo_n "(cached) " >&6
8602else
8603  case $NAWK in
8604  [\\/]* | ?:[\\/]*)
8605  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8606  ;;
8607  *)
8608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8609for as_dir in $PATH
8610do
8611  IFS=$as_save_IFS
8612  test -z "$as_dir" && as_dir=.
8613    for ac_exec_ext in '' $ac_executable_extensions; do
8614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8615    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8617    break 2
8618  fi
8619done
8620  done
8621IFS=$as_save_IFS
8622
8623  ;;
8624esac
8625fi
8626NAWK=$ac_cv_path_NAWK
8627if test -n "$NAWK"; then
8628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8629$as_echo "$NAWK" >&6; }
8630else
8631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8632$as_echo "no" >&6; }
8633fi
8634
8635
8636        if test "x$NAWK" = x; then
8637          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8638        fi
8639      else
8640        # Otherwise we believe it is a complete path. Use it as it is.
8641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8642$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8644$as_echo_n "checking for NAWK... " >&6; }
8645        if test ! -x "$tool_specified"; then
8646          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8647$as_echo "not found" >&6; }
8648          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8649        fi
8650        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8651$as_echo "$tool_specified" >&6; }
8652      fi
8653    fi
8654  fi
8655
8656
8657
8658  if test "x$NAWK" = x; then
8659    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8660  fi
8661
8662
8663
8664
8665
8666  # Publish this variable in the help.
8667
8668
8669  if test "x$PRINTF" = x; then
8670    # The variable is not set by user, try to locate tool using the code snippet
8671    for ac_prog in printf
8672do
8673  # Extract the first word of "$ac_prog", so it can be a program name with args.
8674set dummy $ac_prog; ac_word=$2
8675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8676$as_echo_n "checking for $ac_word... " >&6; }
8677if ${ac_cv_path_PRINTF+:} false; then :
8678  $as_echo_n "(cached) " >&6
8679else
8680  case $PRINTF in
8681  [\\/]* | ?:[\\/]*)
8682  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8683  ;;
8684  *)
8685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686for as_dir in $PATH
8687do
8688  IFS=$as_save_IFS
8689  test -z "$as_dir" && as_dir=.
8690    for ac_exec_ext in '' $ac_executable_extensions; do
8691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8692    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8694    break 2
8695  fi
8696done
8697  done
8698IFS=$as_save_IFS
8699
8700  ;;
8701esac
8702fi
8703PRINTF=$ac_cv_path_PRINTF
8704if test -n "$PRINTF"; then
8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8706$as_echo "$PRINTF" >&6; }
8707else
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
8710fi
8711
8712
8713  test -n "$PRINTF" && break
8714done
8715
8716  else
8717    # The variable is set, but is it from the command line or the environment?
8718
8719    # Try to remove the string !PRINTF! from our list.
8720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8722      # If it failed, the variable was not from the command line. Ignore it,
8723      # but warn the user (except for BASH, which is always set by the calling BASH).
8724      if test "xPRINTF" != xBASH; then
8725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8726$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8727      fi
8728      # Try to locate tool using the code snippet
8729      for ac_prog in printf
8730do
8731  # Extract the first word of "$ac_prog", so it can be a program name with args.
8732set dummy $ac_prog; ac_word=$2
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734$as_echo_n "checking for $ac_word... " >&6; }
8735if ${ac_cv_path_PRINTF+:} false; then :
8736  $as_echo_n "(cached) " >&6
8737else
8738  case $PRINTF in
8739  [\\/]* | ?:[\\/]*)
8740  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8741  ;;
8742  *)
8743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744for as_dir in $PATH
8745do
8746  IFS=$as_save_IFS
8747  test -z "$as_dir" && as_dir=.
8748    for ac_exec_ext in '' $ac_executable_extensions; do
8749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8750    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8752    break 2
8753  fi
8754done
8755  done
8756IFS=$as_save_IFS
8757
8758  ;;
8759esac
8760fi
8761PRINTF=$ac_cv_path_PRINTF
8762if test -n "$PRINTF"; then
8763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8764$as_echo "$PRINTF" >&6; }
8765else
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8767$as_echo "no" >&6; }
8768fi
8769
8770
8771  test -n "$PRINTF" && break
8772done
8773
8774    else
8775      # If it succeeded, then it was overridden by the user. We will use it
8776      # for the tool.
8777
8778      # First remove it from the list of overridden variables, so we can test
8779      # for unknown variables in the end.
8780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8781
8782      # Check if the provided tool contains a complete path.
8783      tool_specified="$PRINTF"
8784      tool_basename="${tool_specified##*/}"
8785      if test "x$tool_basename" = "x$tool_specified"; then
8786        # A command without a complete path is provided, search $PATH.
8787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8788$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8789        # Extract the first word of "$tool_basename", so it can be a program name with args.
8790set dummy $tool_basename; ac_word=$2
8791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8792$as_echo_n "checking for $ac_word... " >&6; }
8793if ${ac_cv_path_PRINTF+:} false; then :
8794  $as_echo_n "(cached) " >&6
8795else
8796  case $PRINTF in
8797  [\\/]* | ?:[\\/]*)
8798  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8799  ;;
8800  *)
8801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8802for as_dir in $PATH
8803do
8804  IFS=$as_save_IFS
8805  test -z "$as_dir" && as_dir=.
8806    for ac_exec_ext in '' $ac_executable_extensions; do
8807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8808    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8810    break 2
8811  fi
8812done
8813  done
8814IFS=$as_save_IFS
8815
8816  ;;
8817esac
8818fi
8819PRINTF=$ac_cv_path_PRINTF
8820if test -n "$PRINTF"; then
8821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8822$as_echo "$PRINTF" >&6; }
8823else
8824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8825$as_echo "no" >&6; }
8826fi
8827
8828
8829        if test "x$PRINTF" = x; then
8830          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8831        fi
8832      else
8833        # Otherwise we believe it is a complete path. Use it as it is.
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8835$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8836        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8837$as_echo_n "checking for PRINTF... " >&6; }
8838        if test ! -x "$tool_specified"; then
8839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8840$as_echo "not found" >&6; }
8841          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8842        fi
8843        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8844$as_echo "$tool_specified" >&6; }
8845      fi
8846    fi
8847  fi
8848
8849
8850
8851  if test "x$PRINTF" = x; then
8852    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8853  fi
8854
8855
8856
8857
8858
8859  # Publish this variable in the help.
8860
8861
8862  if test "x$RM" = x; then
8863    # The variable is not set by user, try to locate tool using the code snippet
8864    for ac_prog in rm
8865do
8866  # Extract the first word of "$ac_prog", so it can be a program name with args.
8867set dummy $ac_prog; ac_word=$2
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869$as_echo_n "checking for $ac_word... " >&6; }
8870if ${ac_cv_path_RM+:} false; then :
8871  $as_echo_n "(cached) " >&6
8872else
8873  case $RM in
8874  [\\/]* | ?:[\\/]*)
8875  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8876  ;;
8877  *)
8878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8879for as_dir in $PATH
8880do
8881  IFS=$as_save_IFS
8882  test -z "$as_dir" && as_dir=.
8883    for ac_exec_ext in '' $ac_executable_extensions; do
8884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8885    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8887    break 2
8888  fi
8889done
8890  done
8891IFS=$as_save_IFS
8892
8893  ;;
8894esac
8895fi
8896RM=$ac_cv_path_RM
8897if test -n "$RM"; then
8898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8899$as_echo "$RM" >&6; }
8900else
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902$as_echo "no" >&6; }
8903fi
8904
8905
8906  test -n "$RM" && break
8907done
8908
8909  else
8910    # The variable is set, but is it from the command line or the environment?
8911
8912    # Try to remove the string !RM! from our list.
8913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8915      # If it failed, the variable was not from the command line. Ignore it,
8916      # but warn the user (except for BASH, which is always set by the calling BASH).
8917      if test "xRM" != xBASH; then
8918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8919$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8920      fi
8921      # Try to locate tool using the code snippet
8922      for ac_prog in rm
8923do
8924  # Extract the first word of "$ac_prog", so it can be a program name with args.
8925set dummy $ac_prog; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_RM+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $RM in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954RM=$ac_cv_path_RM
8955if test -n "$RM"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8957$as_echo "$RM" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964  test -n "$RM" && break
8965done
8966
8967    else
8968      # If it succeeded, then it was overridden by the user. We will use it
8969      # for the tool.
8970
8971      # First remove it from the list of overridden variables, so we can test
8972      # for unknown variables in the end.
8973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8974
8975      # Check if the provided tool contains a complete path.
8976      tool_specified="$RM"
8977      tool_basename="${tool_specified##*/}"
8978      if test "x$tool_basename" = "x$tool_specified"; then
8979        # A command without a complete path is provided, search $PATH.
8980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8981$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8982        # Extract the first word of "$tool_basename", so it can be a program name with args.
8983set dummy $tool_basename; ac_word=$2
8984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8985$as_echo_n "checking for $ac_word... " >&6; }
8986if ${ac_cv_path_RM+:} false; then :
8987  $as_echo_n "(cached) " >&6
8988else
8989  case $RM in
8990  [\\/]* | ?:[\\/]*)
8991  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8992  ;;
8993  *)
8994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8995for as_dir in $PATH
8996do
8997  IFS=$as_save_IFS
8998  test -z "$as_dir" && as_dir=.
8999    for ac_exec_ext in '' $ac_executable_extensions; do
9000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9001    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9003    break 2
9004  fi
9005done
9006  done
9007IFS=$as_save_IFS
9008
9009  ;;
9010esac
9011fi
9012RM=$ac_cv_path_RM
9013if test -n "$RM"; then
9014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9015$as_echo "$RM" >&6; }
9016else
9017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9018$as_echo "no" >&6; }
9019fi
9020
9021
9022        if test "x$RM" = x; then
9023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9024        fi
9025      else
9026        # Otherwise we believe it is a complete path. Use it as it is.
9027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9028$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9030$as_echo_n "checking for RM... " >&6; }
9031        if test ! -x "$tool_specified"; then
9032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9033$as_echo "not found" >&6; }
9034          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9035        fi
9036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9037$as_echo "$tool_specified" >&6; }
9038      fi
9039    fi
9040  fi
9041
9042
9043
9044  if test "x$RM" = x; then
9045    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9046  fi
9047
9048
9049
9050
9051
9052  # Publish this variable in the help.
9053
9054
9055  if test "x$SH" = x; then
9056    # The variable is not set by user, try to locate tool using the code snippet
9057    for ac_prog in sh
9058do
9059  # Extract the first word of "$ac_prog", so it can be a program name with args.
9060set dummy $ac_prog; ac_word=$2
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9062$as_echo_n "checking for $ac_word... " >&6; }
9063if ${ac_cv_path_SH+:} false; then :
9064  $as_echo_n "(cached) " >&6
9065else
9066  case $SH in
9067  [\\/]* | ?:[\\/]*)
9068  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9069  ;;
9070  *)
9071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9072for as_dir in $PATH
9073do
9074  IFS=$as_save_IFS
9075  test -z "$as_dir" && as_dir=.
9076    for ac_exec_ext in '' $ac_executable_extensions; do
9077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9078    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9080    break 2
9081  fi
9082done
9083  done
9084IFS=$as_save_IFS
9085
9086  ;;
9087esac
9088fi
9089SH=$ac_cv_path_SH
9090if test -n "$SH"; then
9091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9092$as_echo "$SH" >&6; }
9093else
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095$as_echo "no" >&6; }
9096fi
9097
9098
9099  test -n "$SH" && break
9100done
9101
9102  else
9103    # The variable is set, but is it from the command line or the environment?
9104
9105    # Try to remove the string !SH! from our list.
9106    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9107    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9108      # If it failed, the variable was not from the command line. Ignore it,
9109      # but warn the user (except for BASH, which is always set by the calling BASH).
9110      if test "xSH" != xBASH; then
9111        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9112$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9113      fi
9114      # Try to locate tool using the code snippet
9115      for ac_prog in sh
9116do
9117  # Extract the first word of "$ac_prog", so it can be a program name with args.
9118set dummy $ac_prog; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_SH+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $SH in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147SH=$ac_cv_path_SH
9148if test -n "$SH"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9150$as_echo "$SH" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157  test -n "$SH" && break
9158done
9159
9160    else
9161      # If it succeeded, then it was overridden by the user. We will use it
9162      # for the tool.
9163
9164      # First remove it from the list of overridden variables, so we can test
9165      # for unknown variables in the end.
9166      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9167
9168      # Check if the provided tool contains a complete path.
9169      tool_specified="$SH"
9170      tool_basename="${tool_specified##*/}"
9171      if test "x$tool_basename" = "x$tool_specified"; then
9172        # A command without a complete path is provided, search $PATH.
9173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9174$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9175        # Extract the first word of "$tool_basename", so it can be a program name with args.
9176set dummy $tool_basename; ac_word=$2
9177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9178$as_echo_n "checking for $ac_word... " >&6; }
9179if ${ac_cv_path_SH+:} false; then :
9180  $as_echo_n "(cached) " >&6
9181else
9182  case $SH in
9183  [\\/]* | ?:[\\/]*)
9184  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9185  ;;
9186  *)
9187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9188for as_dir in $PATH
9189do
9190  IFS=$as_save_IFS
9191  test -z "$as_dir" && as_dir=.
9192    for ac_exec_ext in '' $ac_executable_extensions; do
9193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9194    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9196    break 2
9197  fi
9198done
9199  done
9200IFS=$as_save_IFS
9201
9202  ;;
9203esac
9204fi
9205SH=$ac_cv_path_SH
9206if test -n "$SH"; then
9207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9208$as_echo "$SH" >&6; }
9209else
9210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9211$as_echo "no" >&6; }
9212fi
9213
9214
9215        if test "x$SH" = x; then
9216          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9217        fi
9218      else
9219        # Otherwise we believe it is a complete path. Use it as it is.
9220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9221$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9222        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9223$as_echo_n "checking for SH... " >&6; }
9224        if test ! -x "$tool_specified"; then
9225          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9226$as_echo "not found" >&6; }
9227          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9228        fi
9229        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9230$as_echo "$tool_specified" >&6; }
9231      fi
9232    fi
9233  fi
9234
9235
9236
9237  if test "x$SH" = x; then
9238    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9239  fi
9240
9241
9242
9243
9244
9245  # Publish this variable in the help.
9246
9247
9248  if test "x$SORT" = x; then
9249    # The variable is not set by user, try to locate tool using the code snippet
9250    for ac_prog in sort
9251do
9252  # Extract the first word of "$ac_prog", so it can be a program name with args.
9253set dummy $ac_prog; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_SORT+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $SORT in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282SORT=$ac_cv_path_SORT
9283if test -n "$SORT"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9285$as_echo "$SORT" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292  test -n "$SORT" && break
9293done
9294
9295  else
9296    # The variable is set, but is it from the command line or the environment?
9297
9298    # Try to remove the string !SORT! from our list.
9299    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9300    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9301      # If it failed, the variable was not from the command line. Ignore it,
9302      # but warn the user (except for BASH, which is always set by the calling BASH).
9303      if test "xSORT" != xBASH; then
9304        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9305$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9306      fi
9307      # Try to locate tool using the code snippet
9308      for ac_prog in sort
9309do
9310  # Extract the first word of "$ac_prog", so it can be a program name with args.
9311set dummy $ac_prog; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_SORT+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $SORT in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340SORT=$ac_cv_path_SORT
9341if test -n "$SORT"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9343$as_echo "$SORT" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350  test -n "$SORT" && break
9351done
9352
9353    else
9354      # If it succeeded, then it was overridden by the user. We will use it
9355      # for the tool.
9356
9357      # First remove it from the list of overridden variables, so we can test
9358      # for unknown variables in the end.
9359      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9360
9361      # Check if the provided tool contains a complete path.
9362      tool_specified="$SORT"
9363      tool_basename="${tool_specified##*/}"
9364      if test "x$tool_basename" = "x$tool_specified"; then
9365        # A command without a complete path is provided, search $PATH.
9366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9367$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9368        # Extract the first word of "$tool_basename", so it can be a program name with args.
9369set dummy $tool_basename; ac_word=$2
9370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9371$as_echo_n "checking for $ac_word... " >&6; }
9372if ${ac_cv_path_SORT+:} false; then :
9373  $as_echo_n "(cached) " >&6
9374else
9375  case $SORT in
9376  [\\/]* | ?:[\\/]*)
9377  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9378  ;;
9379  *)
9380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9381for as_dir in $PATH
9382do
9383  IFS=$as_save_IFS
9384  test -z "$as_dir" && as_dir=.
9385    for ac_exec_ext in '' $ac_executable_extensions; do
9386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9387    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9389    break 2
9390  fi
9391done
9392  done
9393IFS=$as_save_IFS
9394
9395  ;;
9396esac
9397fi
9398SORT=$ac_cv_path_SORT
9399if test -n "$SORT"; then
9400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9401$as_echo "$SORT" >&6; }
9402else
9403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9404$as_echo "no" >&6; }
9405fi
9406
9407
9408        if test "x$SORT" = x; then
9409          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9410        fi
9411      else
9412        # Otherwise we believe it is a complete path. Use it as it is.
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9414$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9415        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9416$as_echo_n "checking for SORT... " >&6; }
9417        if test ! -x "$tool_specified"; then
9418          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9419$as_echo "not found" >&6; }
9420          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9421        fi
9422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9423$as_echo "$tool_specified" >&6; }
9424      fi
9425    fi
9426  fi
9427
9428
9429
9430  if test "x$SORT" = x; then
9431    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9432  fi
9433
9434
9435
9436
9437
9438  # Publish this variable in the help.
9439
9440
9441  if test "x$TAIL" = x; then
9442    # The variable is not set by user, try to locate tool using the code snippet
9443    for ac_prog in tail
9444do
9445  # Extract the first word of "$ac_prog", so it can be a program name with args.
9446set dummy $ac_prog; ac_word=$2
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9448$as_echo_n "checking for $ac_word... " >&6; }
9449if ${ac_cv_path_TAIL+:} false; then :
9450  $as_echo_n "(cached) " >&6
9451else
9452  case $TAIL in
9453  [\\/]* | ?:[\\/]*)
9454  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9455  ;;
9456  *)
9457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9458for as_dir in $PATH
9459do
9460  IFS=$as_save_IFS
9461  test -z "$as_dir" && as_dir=.
9462    for ac_exec_ext in '' $ac_executable_extensions; do
9463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9464    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9466    break 2
9467  fi
9468done
9469  done
9470IFS=$as_save_IFS
9471
9472  ;;
9473esac
9474fi
9475TAIL=$ac_cv_path_TAIL
9476if test -n "$TAIL"; then
9477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9478$as_echo "$TAIL" >&6; }
9479else
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
9482fi
9483
9484
9485  test -n "$TAIL" && break
9486done
9487
9488  else
9489    # The variable is set, but is it from the command line or the environment?
9490
9491    # Try to remove the string !TAIL! from our list.
9492    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9493    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9494      # If it failed, the variable was not from the command line. Ignore it,
9495      # but warn the user (except for BASH, which is always set by the calling BASH).
9496      if test "xTAIL" != xBASH; then
9497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9498$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9499      fi
9500      # Try to locate tool using the code snippet
9501      for ac_prog in tail
9502do
9503  # Extract the first word of "$ac_prog", so it can be a program name with args.
9504set dummy $ac_prog; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_TAIL+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $TAIL in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533TAIL=$ac_cv_path_TAIL
9534if test -n "$TAIL"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9536$as_echo "$TAIL" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543  test -n "$TAIL" && break
9544done
9545
9546    else
9547      # If it succeeded, then it was overridden by the user. We will use it
9548      # for the tool.
9549
9550      # First remove it from the list of overridden variables, so we can test
9551      # for unknown variables in the end.
9552      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9553
9554      # Check if the provided tool contains a complete path.
9555      tool_specified="$TAIL"
9556      tool_basename="${tool_specified##*/}"
9557      if test "x$tool_basename" = "x$tool_specified"; then
9558        # A command without a complete path is provided, search $PATH.
9559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9560$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9561        # Extract the first word of "$tool_basename", so it can be a program name with args.
9562set dummy $tool_basename; ac_word=$2
9563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9564$as_echo_n "checking for $ac_word... " >&6; }
9565if ${ac_cv_path_TAIL+:} false; then :
9566  $as_echo_n "(cached) " >&6
9567else
9568  case $TAIL in
9569  [\\/]* | ?:[\\/]*)
9570  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9571  ;;
9572  *)
9573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9574for as_dir in $PATH
9575do
9576  IFS=$as_save_IFS
9577  test -z "$as_dir" && as_dir=.
9578    for ac_exec_ext in '' $ac_executable_extensions; do
9579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9580    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9582    break 2
9583  fi
9584done
9585  done
9586IFS=$as_save_IFS
9587
9588  ;;
9589esac
9590fi
9591TAIL=$ac_cv_path_TAIL
9592if test -n "$TAIL"; then
9593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9594$as_echo "$TAIL" >&6; }
9595else
9596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9597$as_echo "no" >&6; }
9598fi
9599
9600
9601        if test "x$TAIL" = x; then
9602          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9603        fi
9604      else
9605        # Otherwise we believe it is a complete path. Use it as it is.
9606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9607$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9608        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9609$as_echo_n "checking for TAIL... " >&6; }
9610        if test ! -x "$tool_specified"; then
9611          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9612$as_echo "not found" >&6; }
9613          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9614        fi
9615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9616$as_echo "$tool_specified" >&6; }
9617      fi
9618    fi
9619  fi
9620
9621
9622
9623  if test "x$TAIL" = x; then
9624    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9625  fi
9626
9627
9628
9629
9630
9631  # Publish this variable in the help.
9632
9633
9634  if test "x$TAR" = x; then
9635    # The variable is not set by user, try to locate tool using the code snippet
9636    for ac_prog in tar
9637do
9638  # Extract the first word of "$ac_prog", so it can be a program name with args.
9639set dummy $ac_prog; ac_word=$2
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641$as_echo_n "checking for $ac_word... " >&6; }
9642if ${ac_cv_path_TAR+:} false; then :
9643  $as_echo_n "(cached) " >&6
9644else
9645  case $TAR in
9646  [\\/]* | ?:[\\/]*)
9647  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9648  ;;
9649  *)
9650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9651for as_dir in $PATH
9652do
9653  IFS=$as_save_IFS
9654  test -z "$as_dir" && as_dir=.
9655    for ac_exec_ext in '' $ac_executable_extensions; do
9656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9657    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9659    break 2
9660  fi
9661done
9662  done
9663IFS=$as_save_IFS
9664
9665  ;;
9666esac
9667fi
9668TAR=$ac_cv_path_TAR
9669if test -n "$TAR"; then
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9671$as_echo "$TAR" >&6; }
9672else
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9674$as_echo "no" >&6; }
9675fi
9676
9677
9678  test -n "$TAR" && break
9679done
9680
9681  else
9682    # The variable is set, but is it from the command line or the environment?
9683
9684    # Try to remove the string !TAR! from our list.
9685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9687      # If it failed, the variable was not from the command line. Ignore it,
9688      # but warn the user (except for BASH, which is always set by the calling BASH).
9689      if test "xTAR" != xBASH; then
9690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9691$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9692      fi
9693      # Try to locate tool using the code snippet
9694      for ac_prog in tar
9695do
9696  # Extract the first word of "$ac_prog", so it can be a program name with args.
9697set dummy $ac_prog; ac_word=$2
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9699$as_echo_n "checking for $ac_word... " >&6; }
9700if ${ac_cv_path_TAR+:} false; then :
9701  $as_echo_n "(cached) " >&6
9702else
9703  case $TAR in
9704  [\\/]* | ?:[\\/]*)
9705  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9706  ;;
9707  *)
9708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9709for as_dir in $PATH
9710do
9711  IFS=$as_save_IFS
9712  test -z "$as_dir" && as_dir=.
9713    for ac_exec_ext in '' $ac_executable_extensions; do
9714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9715    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9717    break 2
9718  fi
9719done
9720  done
9721IFS=$as_save_IFS
9722
9723  ;;
9724esac
9725fi
9726TAR=$ac_cv_path_TAR
9727if test -n "$TAR"; then
9728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9729$as_echo "$TAR" >&6; }
9730else
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
9733fi
9734
9735
9736  test -n "$TAR" && break
9737done
9738
9739    else
9740      # If it succeeded, then it was overridden by the user. We will use it
9741      # for the tool.
9742
9743      # First remove it from the list of overridden variables, so we can test
9744      # for unknown variables in the end.
9745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9746
9747      # Check if the provided tool contains a complete path.
9748      tool_specified="$TAR"
9749      tool_basename="${tool_specified##*/}"
9750      if test "x$tool_basename" = "x$tool_specified"; then
9751        # A command without a complete path is provided, search $PATH.
9752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9753$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9754        # Extract the first word of "$tool_basename", so it can be a program name with args.
9755set dummy $tool_basename; ac_word=$2
9756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9757$as_echo_n "checking for $ac_word... " >&6; }
9758if ${ac_cv_path_TAR+:} false; then :
9759  $as_echo_n "(cached) " >&6
9760else
9761  case $TAR in
9762  [\\/]* | ?:[\\/]*)
9763  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9764  ;;
9765  *)
9766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9767for as_dir in $PATH
9768do
9769  IFS=$as_save_IFS
9770  test -z "$as_dir" && as_dir=.
9771    for ac_exec_ext in '' $ac_executable_extensions; do
9772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9773    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9775    break 2
9776  fi
9777done
9778  done
9779IFS=$as_save_IFS
9780
9781  ;;
9782esac
9783fi
9784TAR=$ac_cv_path_TAR
9785if test -n "$TAR"; then
9786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9787$as_echo "$TAR" >&6; }
9788else
9789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9790$as_echo "no" >&6; }
9791fi
9792
9793
9794        if test "x$TAR" = x; then
9795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9796        fi
9797      else
9798        # Otherwise we believe it is a complete path. Use it as it is.
9799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9800$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9802$as_echo_n "checking for TAR... " >&6; }
9803        if test ! -x "$tool_specified"; then
9804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9805$as_echo "not found" >&6; }
9806          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9807        fi
9808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9809$as_echo "$tool_specified" >&6; }
9810      fi
9811    fi
9812  fi
9813
9814
9815
9816  if test "x$TAR" = x; then
9817    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9818  fi
9819
9820
9821
9822
9823
9824  # Publish this variable in the help.
9825
9826
9827  if test "x$TEE" = x; then
9828    # The variable is not set by user, try to locate tool using the code snippet
9829    for ac_prog in tee
9830do
9831  # Extract the first word of "$ac_prog", so it can be a program name with args.
9832set dummy $ac_prog; ac_word=$2
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9834$as_echo_n "checking for $ac_word... " >&6; }
9835if ${ac_cv_path_TEE+:} false; then :
9836  $as_echo_n "(cached) " >&6
9837else
9838  case $TEE in
9839  [\\/]* | ?:[\\/]*)
9840  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9841  ;;
9842  *)
9843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9844for as_dir in $PATH
9845do
9846  IFS=$as_save_IFS
9847  test -z "$as_dir" && as_dir=.
9848    for ac_exec_ext in '' $ac_executable_extensions; do
9849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9850    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9852    break 2
9853  fi
9854done
9855  done
9856IFS=$as_save_IFS
9857
9858  ;;
9859esac
9860fi
9861TEE=$ac_cv_path_TEE
9862if test -n "$TEE"; then
9863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9864$as_echo "$TEE" >&6; }
9865else
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
9868fi
9869
9870
9871  test -n "$TEE" && break
9872done
9873
9874  else
9875    # The variable is set, but is it from the command line or the environment?
9876
9877    # Try to remove the string !TEE! from our list.
9878    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9879    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9880      # If it failed, the variable was not from the command line. Ignore it,
9881      # but warn the user (except for BASH, which is always set by the calling BASH).
9882      if test "xTEE" != xBASH; then
9883        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9884$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9885      fi
9886      # Try to locate tool using the code snippet
9887      for ac_prog in tee
9888do
9889  # Extract the first word of "$ac_prog", so it can be a program name with args.
9890set dummy $ac_prog; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if ${ac_cv_path_TEE+:} false; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $TEE in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919TEE=$ac_cv_path_TEE
9920if test -n "$TEE"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9922$as_echo "$TEE" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929  test -n "$TEE" && break
9930done
9931
9932    else
9933      # If it succeeded, then it was overridden by the user. We will use it
9934      # for the tool.
9935
9936      # First remove it from the list of overridden variables, so we can test
9937      # for unknown variables in the end.
9938      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9939
9940      # Check if the provided tool contains a complete path.
9941      tool_specified="$TEE"
9942      tool_basename="${tool_specified##*/}"
9943      if test "x$tool_basename" = "x$tool_specified"; then
9944        # A command without a complete path is provided, search $PATH.
9945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9946$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9947        # Extract the first word of "$tool_basename", so it can be a program name with args.
9948set dummy $tool_basename; ac_word=$2
9949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9950$as_echo_n "checking for $ac_word... " >&6; }
9951if ${ac_cv_path_TEE+:} false; then :
9952  $as_echo_n "(cached) " >&6
9953else
9954  case $TEE in
9955  [\\/]* | ?:[\\/]*)
9956  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9957  ;;
9958  *)
9959  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9960for as_dir in $PATH
9961do
9962  IFS=$as_save_IFS
9963  test -z "$as_dir" && as_dir=.
9964    for ac_exec_ext in '' $ac_executable_extensions; do
9965  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9966    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9967    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9968    break 2
9969  fi
9970done
9971  done
9972IFS=$as_save_IFS
9973
9974  ;;
9975esac
9976fi
9977TEE=$ac_cv_path_TEE
9978if test -n "$TEE"; then
9979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9980$as_echo "$TEE" >&6; }
9981else
9982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9983$as_echo "no" >&6; }
9984fi
9985
9986
9987        if test "x$TEE" = x; then
9988          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9989        fi
9990      else
9991        # Otherwise we believe it is a complete path. Use it as it is.
9992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9993$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
9995$as_echo_n "checking for TEE... " >&6; }
9996        if test ! -x "$tool_specified"; then
9997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9998$as_echo "not found" >&6; }
9999          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10000        fi
10001        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10002$as_echo "$tool_specified" >&6; }
10003      fi
10004    fi
10005  fi
10006
10007
10008
10009  if test "x$TEE" = x; then
10010    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10011  fi
10012
10013
10014
10015
10016
10017  # Publish this variable in the help.
10018
10019
10020  if test "x$TOUCH" = x; then
10021    # The variable is not set by user, try to locate tool using the code snippet
10022    for ac_prog in touch
10023do
10024  # Extract the first word of "$ac_prog", so it can be a program name with args.
10025set dummy $ac_prog; ac_word=$2
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027$as_echo_n "checking for $ac_word... " >&6; }
10028if ${ac_cv_path_TOUCH+:} false; then :
10029  $as_echo_n "(cached) " >&6
10030else
10031  case $TOUCH in
10032  [\\/]* | ?:[\\/]*)
10033  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10034  ;;
10035  *)
10036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037for as_dir in $PATH
10038do
10039  IFS=$as_save_IFS
10040  test -z "$as_dir" && as_dir=.
10041    for ac_exec_ext in '' $ac_executable_extensions; do
10042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045    break 2
10046  fi
10047done
10048  done
10049IFS=$as_save_IFS
10050
10051  ;;
10052esac
10053fi
10054TOUCH=$ac_cv_path_TOUCH
10055if test -n "$TOUCH"; then
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10057$as_echo "$TOUCH" >&6; }
10058else
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061fi
10062
10063
10064  test -n "$TOUCH" && break
10065done
10066
10067  else
10068    # The variable is set, but is it from the command line or the environment?
10069
10070    # Try to remove the string !TOUCH! from our list.
10071    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10072    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10073      # If it failed, the variable was not from the command line. Ignore it,
10074      # but warn the user (except for BASH, which is always set by the calling BASH).
10075      if test "xTOUCH" != xBASH; then
10076        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10077$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10078      fi
10079      # Try to locate tool using the code snippet
10080      for ac_prog in touch
10081do
10082  # Extract the first word of "$ac_prog", so it can be a program name with args.
10083set dummy $ac_prog; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_TOUCH+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $TOUCH in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112TOUCH=$ac_cv_path_TOUCH
10113if test -n "$TOUCH"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10115$as_echo "$TOUCH" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122  test -n "$TOUCH" && break
10123done
10124
10125    else
10126      # If it succeeded, then it was overridden by the user. We will use it
10127      # for the tool.
10128
10129      # First remove it from the list of overridden variables, so we can test
10130      # for unknown variables in the end.
10131      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10132
10133      # Check if the provided tool contains a complete path.
10134      tool_specified="$TOUCH"
10135      tool_basename="${tool_specified##*/}"
10136      if test "x$tool_basename" = "x$tool_specified"; then
10137        # A command without a complete path is provided, search $PATH.
10138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10139$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10140        # Extract the first word of "$tool_basename", so it can be a program name with args.
10141set dummy $tool_basename; ac_word=$2
10142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10143$as_echo_n "checking for $ac_word... " >&6; }
10144if ${ac_cv_path_TOUCH+:} false; then :
10145  $as_echo_n "(cached) " >&6
10146else
10147  case $TOUCH in
10148  [\\/]* | ?:[\\/]*)
10149  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10150  ;;
10151  *)
10152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10153for as_dir in $PATH
10154do
10155  IFS=$as_save_IFS
10156  test -z "$as_dir" && as_dir=.
10157    for ac_exec_ext in '' $ac_executable_extensions; do
10158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10159    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10161    break 2
10162  fi
10163done
10164  done
10165IFS=$as_save_IFS
10166
10167  ;;
10168esac
10169fi
10170TOUCH=$ac_cv_path_TOUCH
10171if test -n "$TOUCH"; then
10172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10173$as_echo "$TOUCH" >&6; }
10174else
10175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10176$as_echo "no" >&6; }
10177fi
10178
10179
10180        if test "x$TOUCH" = x; then
10181          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10182        fi
10183      else
10184        # Otherwise we believe it is a complete path. Use it as it is.
10185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10186$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10187        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10188$as_echo_n "checking for TOUCH... " >&6; }
10189        if test ! -x "$tool_specified"; then
10190          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10191$as_echo "not found" >&6; }
10192          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10193        fi
10194        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10195$as_echo "$tool_specified" >&6; }
10196      fi
10197    fi
10198  fi
10199
10200
10201
10202  if test "x$TOUCH" = x; then
10203    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10204  fi
10205
10206
10207
10208
10209
10210  # Publish this variable in the help.
10211
10212
10213  if test "x$TR" = x; then
10214    # The variable is not set by user, try to locate tool using the code snippet
10215    for ac_prog in tr
10216do
10217  # Extract the first word of "$ac_prog", so it can be a program name with args.
10218set dummy $ac_prog; ac_word=$2
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10220$as_echo_n "checking for $ac_word... " >&6; }
10221if ${ac_cv_path_TR+:} false; then :
10222  $as_echo_n "(cached) " >&6
10223else
10224  case $TR in
10225  [\\/]* | ?:[\\/]*)
10226  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10227  ;;
10228  *)
10229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10230for as_dir in $PATH
10231do
10232  IFS=$as_save_IFS
10233  test -z "$as_dir" && as_dir=.
10234    for ac_exec_ext in '' $ac_executable_extensions; do
10235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10236    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10238    break 2
10239  fi
10240done
10241  done
10242IFS=$as_save_IFS
10243
10244  ;;
10245esac
10246fi
10247TR=$ac_cv_path_TR
10248if test -n "$TR"; then
10249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10250$as_echo "$TR" >&6; }
10251else
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10253$as_echo "no" >&6; }
10254fi
10255
10256
10257  test -n "$TR" && break
10258done
10259
10260  else
10261    # The variable is set, but is it from the command line or the environment?
10262
10263    # Try to remove the string !TR! from our list.
10264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10266      # If it failed, the variable was not from the command line. Ignore it,
10267      # but warn the user (except for BASH, which is always set by the calling BASH).
10268      if test "xTR" != xBASH; then
10269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10270$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10271      fi
10272      # Try to locate tool using the code snippet
10273      for ac_prog in tr
10274do
10275  # Extract the first word of "$ac_prog", so it can be a program name with args.
10276set dummy $ac_prog; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_TR+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $TR in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305TR=$ac_cv_path_TR
10306if test -n "$TR"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10308$as_echo "$TR" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315  test -n "$TR" && break
10316done
10317
10318    else
10319      # If it succeeded, then it was overridden by the user. We will use it
10320      # for the tool.
10321
10322      # First remove it from the list of overridden variables, so we can test
10323      # for unknown variables in the end.
10324      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10325
10326      # Check if the provided tool contains a complete path.
10327      tool_specified="$TR"
10328      tool_basename="${tool_specified##*/}"
10329      if test "x$tool_basename" = "x$tool_specified"; then
10330        # A command without a complete path is provided, search $PATH.
10331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10332$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10333        # Extract the first word of "$tool_basename", so it can be a program name with args.
10334set dummy $tool_basename; ac_word=$2
10335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10336$as_echo_n "checking for $ac_word... " >&6; }
10337if ${ac_cv_path_TR+:} false; then :
10338  $as_echo_n "(cached) " >&6
10339else
10340  case $TR in
10341  [\\/]* | ?:[\\/]*)
10342  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10343  ;;
10344  *)
10345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10346for as_dir in $PATH
10347do
10348  IFS=$as_save_IFS
10349  test -z "$as_dir" && as_dir=.
10350    for ac_exec_ext in '' $ac_executable_extensions; do
10351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10352    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10354    break 2
10355  fi
10356done
10357  done
10358IFS=$as_save_IFS
10359
10360  ;;
10361esac
10362fi
10363TR=$ac_cv_path_TR
10364if test -n "$TR"; then
10365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10366$as_echo "$TR" >&6; }
10367else
10368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10369$as_echo "no" >&6; }
10370fi
10371
10372
10373        if test "x$TR" = x; then
10374          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10375        fi
10376      else
10377        # Otherwise we believe it is a complete path. Use it as it is.
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10379$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10381$as_echo_n "checking for TR... " >&6; }
10382        if test ! -x "$tool_specified"; then
10383          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10384$as_echo "not found" >&6; }
10385          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10386        fi
10387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10388$as_echo "$tool_specified" >&6; }
10389      fi
10390    fi
10391  fi
10392
10393
10394
10395  if test "x$TR" = x; then
10396    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10397  fi
10398
10399
10400
10401
10402
10403  # Publish this variable in the help.
10404
10405
10406  if test "x$UNAME" = x; then
10407    # The variable is not set by user, try to locate tool using the code snippet
10408    for ac_prog in uname
10409do
10410  # Extract the first word of "$ac_prog", so it can be a program name with args.
10411set dummy $ac_prog; ac_word=$2
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10413$as_echo_n "checking for $ac_word... " >&6; }
10414if ${ac_cv_path_UNAME+:} false; then :
10415  $as_echo_n "(cached) " >&6
10416else
10417  case $UNAME in
10418  [\\/]* | ?:[\\/]*)
10419  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10420  ;;
10421  *)
10422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10423for as_dir in $PATH
10424do
10425  IFS=$as_save_IFS
10426  test -z "$as_dir" && as_dir=.
10427    for ac_exec_ext in '' $ac_executable_extensions; do
10428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10429    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10431    break 2
10432  fi
10433done
10434  done
10435IFS=$as_save_IFS
10436
10437  ;;
10438esac
10439fi
10440UNAME=$ac_cv_path_UNAME
10441if test -n "$UNAME"; then
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10443$as_echo "$UNAME" >&6; }
10444else
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10446$as_echo "no" >&6; }
10447fi
10448
10449
10450  test -n "$UNAME" && break
10451done
10452
10453  else
10454    # The variable is set, but is it from the command line or the environment?
10455
10456    # Try to remove the string !UNAME! from our list.
10457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10459      # If it failed, the variable was not from the command line. Ignore it,
10460      # but warn the user (except for BASH, which is always set by the calling BASH).
10461      if test "xUNAME" != xBASH; then
10462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10463$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10464      fi
10465      # Try to locate tool using the code snippet
10466      for ac_prog in uname
10467do
10468  # Extract the first word of "$ac_prog", so it can be a program name with args.
10469set dummy $ac_prog; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_UNAME+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $UNAME in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498UNAME=$ac_cv_path_UNAME
10499if test -n "$UNAME"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10501$as_echo "$UNAME" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508  test -n "$UNAME" && break
10509done
10510
10511    else
10512      # If it succeeded, then it was overridden by the user. We will use it
10513      # for the tool.
10514
10515      # First remove it from the list of overridden variables, so we can test
10516      # for unknown variables in the end.
10517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10518
10519      # Check if the provided tool contains a complete path.
10520      tool_specified="$UNAME"
10521      tool_basename="${tool_specified##*/}"
10522      if test "x$tool_basename" = "x$tool_specified"; then
10523        # A command without a complete path is provided, search $PATH.
10524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10525$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10526        # Extract the first word of "$tool_basename", so it can be a program name with args.
10527set dummy $tool_basename; ac_word=$2
10528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10529$as_echo_n "checking for $ac_word... " >&6; }
10530if ${ac_cv_path_UNAME+:} false; then :
10531  $as_echo_n "(cached) " >&6
10532else
10533  case $UNAME in
10534  [\\/]* | ?:[\\/]*)
10535  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10536  ;;
10537  *)
10538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10539for as_dir in $PATH
10540do
10541  IFS=$as_save_IFS
10542  test -z "$as_dir" && as_dir=.
10543    for ac_exec_ext in '' $ac_executable_extensions; do
10544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10545    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10547    break 2
10548  fi
10549done
10550  done
10551IFS=$as_save_IFS
10552
10553  ;;
10554esac
10555fi
10556UNAME=$ac_cv_path_UNAME
10557if test -n "$UNAME"; then
10558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10559$as_echo "$UNAME" >&6; }
10560else
10561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10562$as_echo "no" >&6; }
10563fi
10564
10565
10566        if test "x$UNAME" = x; then
10567          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10568        fi
10569      else
10570        # Otherwise we believe it is a complete path. Use it as it is.
10571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10572$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10573        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10574$as_echo_n "checking for UNAME... " >&6; }
10575        if test ! -x "$tool_specified"; then
10576          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10577$as_echo "not found" >&6; }
10578          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10579        fi
10580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10581$as_echo "$tool_specified" >&6; }
10582      fi
10583    fi
10584  fi
10585
10586
10587
10588  if test "x$UNAME" = x; then
10589    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10590  fi
10591
10592
10593
10594
10595
10596  # Publish this variable in the help.
10597
10598
10599  if test "x$UNIQ" = x; then
10600    # The variable is not set by user, try to locate tool using the code snippet
10601    for ac_prog in uniq
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_UNIQ+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $UNIQ in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633UNIQ=$ac_cv_path_UNIQ
10634if test -n "$UNIQ"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10636$as_echo "$UNIQ" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$UNIQ" && break
10644done
10645
10646  else
10647    # The variable is set, but is it from the command line or the environment?
10648
10649    # Try to remove the string !UNIQ! from our list.
10650    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10651    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10652      # If it failed, the variable was not from the command line. Ignore it,
10653      # but warn the user (except for BASH, which is always set by the calling BASH).
10654      if test "xUNIQ" != xBASH; then
10655        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10656$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10657      fi
10658      # Try to locate tool using the code snippet
10659      for ac_prog in uniq
10660do
10661  # Extract the first word of "$ac_prog", so it can be a program name with args.
10662set dummy $ac_prog; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_UNIQ+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $UNIQ in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691UNIQ=$ac_cv_path_UNIQ
10692if test -n "$UNIQ"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10694$as_echo "$UNIQ" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701  test -n "$UNIQ" && break
10702done
10703
10704    else
10705      # If it succeeded, then it was overridden by the user. We will use it
10706      # for the tool.
10707
10708      # First remove it from the list of overridden variables, so we can test
10709      # for unknown variables in the end.
10710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10711
10712      # Check if the provided tool contains a complete path.
10713      tool_specified="$UNIQ"
10714      tool_basename="${tool_specified##*/}"
10715      if test "x$tool_basename" = "x$tool_specified"; then
10716        # A command without a complete path is provided, search $PATH.
10717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10718$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10719        # Extract the first word of "$tool_basename", so it can be a program name with args.
10720set dummy $tool_basename; ac_word=$2
10721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10722$as_echo_n "checking for $ac_word... " >&6; }
10723if ${ac_cv_path_UNIQ+:} false; then :
10724  $as_echo_n "(cached) " >&6
10725else
10726  case $UNIQ in
10727  [\\/]* | ?:[\\/]*)
10728  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10729  ;;
10730  *)
10731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10732for as_dir in $PATH
10733do
10734  IFS=$as_save_IFS
10735  test -z "$as_dir" && as_dir=.
10736    for ac_exec_ext in '' $ac_executable_extensions; do
10737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10738    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10740    break 2
10741  fi
10742done
10743  done
10744IFS=$as_save_IFS
10745
10746  ;;
10747esac
10748fi
10749UNIQ=$ac_cv_path_UNIQ
10750if test -n "$UNIQ"; then
10751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10752$as_echo "$UNIQ" >&6; }
10753else
10754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10755$as_echo "no" >&6; }
10756fi
10757
10758
10759        if test "x$UNIQ" = x; then
10760          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10761        fi
10762      else
10763        # Otherwise we believe it is a complete path. Use it as it is.
10764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10765$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10767$as_echo_n "checking for UNIQ... " >&6; }
10768        if test ! -x "$tool_specified"; then
10769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10770$as_echo "not found" >&6; }
10771          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10772        fi
10773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10774$as_echo "$tool_specified" >&6; }
10775      fi
10776    fi
10777  fi
10778
10779
10780
10781  if test "x$UNIQ" = x; then
10782    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10783  fi
10784
10785
10786
10787
10788
10789  # Publish this variable in the help.
10790
10791
10792  if test "x$WC" = x; then
10793    # The variable is not set by user, try to locate tool using the code snippet
10794    for ac_prog in wc
10795do
10796  # Extract the first word of "$ac_prog", so it can be a program name with args.
10797set dummy $ac_prog; ac_word=$2
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10799$as_echo_n "checking for $ac_word... " >&6; }
10800if ${ac_cv_path_WC+:} false; then :
10801  $as_echo_n "(cached) " >&6
10802else
10803  case $WC in
10804  [\\/]* | ?:[\\/]*)
10805  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10806  ;;
10807  *)
10808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10809for as_dir in $PATH
10810do
10811  IFS=$as_save_IFS
10812  test -z "$as_dir" && as_dir=.
10813    for ac_exec_ext in '' $ac_executable_extensions; do
10814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10815    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10817    break 2
10818  fi
10819done
10820  done
10821IFS=$as_save_IFS
10822
10823  ;;
10824esac
10825fi
10826WC=$ac_cv_path_WC
10827if test -n "$WC"; then
10828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10829$as_echo "$WC" >&6; }
10830else
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
10833fi
10834
10835
10836  test -n "$WC" && break
10837done
10838
10839  else
10840    # The variable is set, but is it from the command line or the environment?
10841
10842    # Try to remove the string !WC! from our list.
10843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10845      # If it failed, the variable was not from the command line. Ignore it,
10846      # but warn the user (except for BASH, which is always set by the calling BASH).
10847      if test "xWC" != xBASH; then
10848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10849$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10850      fi
10851      # Try to locate tool using the code snippet
10852      for ac_prog in wc
10853do
10854  # Extract the first word of "$ac_prog", so it can be a program name with args.
10855set dummy $ac_prog; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_path_WC+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  case $WC in
10862  [\\/]* | ?:[\\/]*)
10863  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10864  ;;
10865  *)
10866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10867for as_dir in $PATH
10868do
10869  IFS=$as_save_IFS
10870  test -z "$as_dir" && as_dir=.
10871    for ac_exec_ext in '' $ac_executable_extensions; do
10872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10873    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10875    break 2
10876  fi
10877done
10878  done
10879IFS=$as_save_IFS
10880
10881  ;;
10882esac
10883fi
10884WC=$ac_cv_path_WC
10885if test -n "$WC"; then
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10887$as_echo "$WC" >&6; }
10888else
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
10891fi
10892
10893
10894  test -n "$WC" && break
10895done
10896
10897    else
10898      # If it succeeded, then it was overridden by the user. We will use it
10899      # for the tool.
10900
10901      # First remove it from the list of overridden variables, so we can test
10902      # for unknown variables in the end.
10903      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10904
10905      # Check if the provided tool contains a complete path.
10906      tool_specified="$WC"
10907      tool_basename="${tool_specified##*/}"
10908      if test "x$tool_basename" = "x$tool_specified"; then
10909        # A command without a complete path is provided, search $PATH.
10910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10911$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10912        # Extract the first word of "$tool_basename", so it can be a program name with args.
10913set dummy $tool_basename; ac_word=$2
10914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10915$as_echo_n "checking for $ac_word... " >&6; }
10916if ${ac_cv_path_WC+:} false; then :
10917  $as_echo_n "(cached) " >&6
10918else
10919  case $WC in
10920  [\\/]* | ?:[\\/]*)
10921  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10922  ;;
10923  *)
10924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10925for as_dir in $PATH
10926do
10927  IFS=$as_save_IFS
10928  test -z "$as_dir" && as_dir=.
10929    for ac_exec_ext in '' $ac_executable_extensions; do
10930  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10931    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10932    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10933    break 2
10934  fi
10935done
10936  done
10937IFS=$as_save_IFS
10938
10939  ;;
10940esac
10941fi
10942WC=$ac_cv_path_WC
10943if test -n "$WC"; then
10944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10945$as_echo "$WC" >&6; }
10946else
10947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10948$as_echo "no" >&6; }
10949fi
10950
10951
10952        if test "x$WC" = x; then
10953          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10954        fi
10955      else
10956        # Otherwise we believe it is a complete path. Use it as it is.
10957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10958$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10960$as_echo_n "checking for WC... " >&6; }
10961        if test ! -x "$tool_specified"; then
10962          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10963$as_echo "not found" >&6; }
10964          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10965        fi
10966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10967$as_echo "$tool_specified" >&6; }
10968      fi
10969    fi
10970  fi
10971
10972
10973
10974  if test "x$WC" = x; then
10975    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10976  fi
10977
10978
10979
10980
10981
10982  # Publish this variable in the help.
10983
10984
10985  if test "x$WHICH" = x; then
10986    # The variable is not set by user, try to locate tool using the code snippet
10987    for ac_prog in which
10988do
10989  # Extract the first word of "$ac_prog", so it can be a program name with args.
10990set dummy $ac_prog; ac_word=$2
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10992$as_echo_n "checking for $ac_word... " >&6; }
10993if ${ac_cv_path_WHICH+:} false; then :
10994  $as_echo_n "(cached) " >&6
10995else
10996  case $WHICH in
10997  [\\/]* | ?:[\\/]*)
10998  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
10999  ;;
11000  *)
11001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11002for as_dir in $PATH
11003do
11004  IFS=$as_save_IFS
11005  test -z "$as_dir" && as_dir=.
11006    for ac_exec_ext in '' $ac_executable_extensions; do
11007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11008    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11010    break 2
11011  fi
11012done
11013  done
11014IFS=$as_save_IFS
11015
11016  ;;
11017esac
11018fi
11019WHICH=$ac_cv_path_WHICH
11020if test -n "$WHICH"; then
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11022$as_echo "$WHICH" >&6; }
11023else
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026fi
11027
11028
11029  test -n "$WHICH" && break
11030done
11031
11032  else
11033    # The variable is set, but is it from the command line or the environment?
11034
11035    # Try to remove the string !WHICH! from our list.
11036    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11037    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11038      # If it failed, the variable was not from the command line. Ignore it,
11039      # but warn the user (except for BASH, which is always set by the calling BASH).
11040      if test "xWHICH" != xBASH; then
11041        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11042$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11043      fi
11044      # Try to locate tool using the code snippet
11045      for ac_prog in which
11046do
11047  # Extract the first word of "$ac_prog", so it can be a program name with args.
11048set dummy $ac_prog; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
11051if ${ac_cv_path_WHICH+:} false; then :
11052  $as_echo_n "(cached) " >&6
11053else
11054  case $WHICH in
11055  [\\/]* | ?:[\\/]*)
11056  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11057  ;;
11058  *)
11059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062  IFS=$as_save_IFS
11063  test -z "$as_dir" && as_dir=.
11064    for ac_exec_ext in '' $ac_executable_extensions; do
11065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068    break 2
11069  fi
11070done
11071  done
11072IFS=$as_save_IFS
11073
11074  ;;
11075esac
11076fi
11077WHICH=$ac_cv_path_WHICH
11078if test -n "$WHICH"; then
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11080$as_echo "$WHICH" >&6; }
11081else
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
11084fi
11085
11086
11087  test -n "$WHICH" && break
11088done
11089
11090    else
11091      # If it succeeded, then it was overridden by the user. We will use it
11092      # for the tool.
11093
11094      # First remove it from the list of overridden variables, so we can test
11095      # for unknown variables in the end.
11096      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11097
11098      # Check if the provided tool contains a complete path.
11099      tool_specified="$WHICH"
11100      tool_basename="${tool_specified##*/}"
11101      if test "x$tool_basename" = "x$tool_specified"; then
11102        # A command without a complete path is provided, search $PATH.
11103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11104$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11105        # Extract the first word of "$tool_basename", so it can be a program name with args.
11106set dummy $tool_basename; ac_word=$2
11107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11108$as_echo_n "checking for $ac_word... " >&6; }
11109if ${ac_cv_path_WHICH+:} false; then :
11110  $as_echo_n "(cached) " >&6
11111else
11112  case $WHICH in
11113  [\\/]* | ?:[\\/]*)
11114  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11115  ;;
11116  *)
11117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11118for as_dir in $PATH
11119do
11120  IFS=$as_save_IFS
11121  test -z "$as_dir" && as_dir=.
11122    for ac_exec_ext in '' $ac_executable_extensions; do
11123  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11124    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11125    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11126    break 2
11127  fi
11128done
11129  done
11130IFS=$as_save_IFS
11131
11132  ;;
11133esac
11134fi
11135WHICH=$ac_cv_path_WHICH
11136if test -n "$WHICH"; then
11137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11138$as_echo "$WHICH" >&6; }
11139else
11140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11141$as_echo "no" >&6; }
11142fi
11143
11144
11145        if test "x$WHICH" = x; then
11146          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11147        fi
11148      else
11149        # Otherwise we believe it is a complete path. Use it as it is.
11150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11151$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11153$as_echo_n "checking for WHICH... " >&6; }
11154        if test ! -x "$tool_specified"; then
11155          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11156$as_echo "not found" >&6; }
11157          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11158        fi
11159        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11160$as_echo "$tool_specified" >&6; }
11161      fi
11162    fi
11163  fi
11164
11165
11166
11167  if test "x$WHICH" = x; then
11168    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11169  fi
11170
11171
11172
11173
11174
11175  # Publish this variable in the help.
11176
11177
11178  if test "x$XARGS" = x; then
11179    # The variable is not set by user, try to locate tool using the code snippet
11180    for ac_prog in xargs
11181do
11182  # Extract the first word of "$ac_prog", so it can be a program name with args.
11183set dummy $ac_prog; ac_word=$2
11184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11185$as_echo_n "checking for $ac_word... " >&6; }
11186if ${ac_cv_path_XARGS+:} false; then :
11187  $as_echo_n "(cached) " >&6
11188else
11189  case $XARGS in
11190  [\\/]* | ?:[\\/]*)
11191  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11192  ;;
11193  *)
11194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11195for as_dir in $PATH
11196do
11197  IFS=$as_save_IFS
11198  test -z "$as_dir" && as_dir=.
11199    for ac_exec_ext in '' $ac_executable_extensions; do
11200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11201    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11203    break 2
11204  fi
11205done
11206  done
11207IFS=$as_save_IFS
11208
11209  ;;
11210esac
11211fi
11212XARGS=$ac_cv_path_XARGS
11213if test -n "$XARGS"; then
11214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11215$as_echo "$XARGS" >&6; }
11216else
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
11219fi
11220
11221
11222  test -n "$XARGS" && break
11223done
11224
11225  else
11226    # The variable is set, but is it from the command line or the environment?
11227
11228    # Try to remove the string !XARGS! from our list.
11229    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11230    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11231      # If it failed, the variable was not from the command line. Ignore it,
11232      # but warn the user (except for BASH, which is always set by the calling BASH).
11233      if test "xXARGS" != xBASH; then
11234        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11235$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11236      fi
11237      # Try to locate tool using the code snippet
11238      for ac_prog in xargs
11239do
11240  # Extract the first word of "$ac_prog", so it can be a program name with args.
11241set dummy $ac_prog; ac_word=$2
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11243$as_echo_n "checking for $ac_word... " >&6; }
11244if ${ac_cv_path_XARGS+:} false; then :
11245  $as_echo_n "(cached) " >&6
11246else
11247  case $XARGS in
11248  [\\/]* | ?:[\\/]*)
11249  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11250  ;;
11251  *)
11252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11253for as_dir in $PATH
11254do
11255  IFS=$as_save_IFS
11256  test -z "$as_dir" && as_dir=.
11257    for ac_exec_ext in '' $ac_executable_extensions; do
11258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11259    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11261    break 2
11262  fi
11263done
11264  done
11265IFS=$as_save_IFS
11266
11267  ;;
11268esac
11269fi
11270XARGS=$ac_cv_path_XARGS
11271if test -n "$XARGS"; then
11272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11273$as_echo "$XARGS" >&6; }
11274else
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11276$as_echo "no" >&6; }
11277fi
11278
11279
11280  test -n "$XARGS" && break
11281done
11282
11283    else
11284      # If it succeeded, then it was overridden by the user. We will use it
11285      # for the tool.
11286
11287      # First remove it from the list of overridden variables, so we can test
11288      # for unknown variables in the end.
11289      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11290
11291      # Check if the provided tool contains a complete path.
11292      tool_specified="$XARGS"
11293      tool_basename="${tool_specified##*/}"
11294      if test "x$tool_basename" = "x$tool_specified"; then
11295        # A command without a complete path is provided, search $PATH.
11296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11297$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11298        # Extract the first word of "$tool_basename", so it can be a program name with args.
11299set dummy $tool_basename; ac_word=$2
11300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11301$as_echo_n "checking for $ac_word... " >&6; }
11302if ${ac_cv_path_XARGS+:} false; then :
11303  $as_echo_n "(cached) " >&6
11304else
11305  case $XARGS in
11306  [\\/]* | ?:[\\/]*)
11307  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11308  ;;
11309  *)
11310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11311for as_dir in $PATH
11312do
11313  IFS=$as_save_IFS
11314  test -z "$as_dir" && as_dir=.
11315    for ac_exec_ext in '' $ac_executable_extensions; do
11316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11317    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11319    break 2
11320  fi
11321done
11322  done
11323IFS=$as_save_IFS
11324
11325  ;;
11326esac
11327fi
11328XARGS=$ac_cv_path_XARGS
11329if test -n "$XARGS"; then
11330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11331$as_echo "$XARGS" >&6; }
11332else
11333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11334$as_echo "no" >&6; }
11335fi
11336
11337
11338        if test "x$XARGS" = x; then
11339          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11340        fi
11341      else
11342        # Otherwise we believe it is a complete path. Use it as it is.
11343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11344$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11345        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11346$as_echo_n "checking for XARGS... " >&6; }
11347        if test ! -x "$tool_specified"; then
11348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11349$as_echo "not found" >&6; }
11350          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11351        fi
11352        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11353$as_echo "$tool_specified" >&6; }
11354      fi
11355    fi
11356  fi
11357
11358
11359
11360  if test "x$XARGS" = x; then
11361    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11362  fi
11363
11364
11365
11366  # Then required tools that require some special treatment.
11367
11368
11369  # Publish this variable in the help.
11370
11371
11372  if test "x$AWK" = x; then
11373    # The variable is not set by user, try to locate tool using the code snippet
11374    for ac_prog in gawk mawk nawk awk
11375do
11376  # Extract the first word of "$ac_prog", so it can be a program name with args.
11377set dummy $ac_prog; ac_word=$2
11378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11379$as_echo_n "checking for $ac_word... " >&6; }
11380if ${ac_cv_prog_AWK+:} false; then :
11381  $as_echo_n "(cached) " >&6
11382else
11383  if test -n "$AWK"; then
11384  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11385else
11386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11387for as_dir in $PATH
11388do
11389  IFS=$as_save_IFS
11390  test -z "$as_dir" && as_dir=.
11391    for ac_exec_ext in '' $ac_executable_extensions; do
11392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11393    ac_cv_prog_AWK="$ac_prog"
11394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11395    break 2
11396  fi
11397done
11398  done
11399IFS=$as_save_IFS
11400
11401fi
11402fi
11403AWK=$ac_cv_prog_AWK
11404if test -n "$AWK"; then
11405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11406$as_echo "$AWK" >&6; }
11407else
11408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11409$as_echo "no" >&6; }
11410fi
11411
11412
11413  test -n "$AWK" && break
11414done
11415
11416  else
11417    # The variable is set, but is it from the command line or the environment?
11418
11419    # Try to remove the string !AWK! from our list.
11420    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11421    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11422      # If it failed, the variable was not from the command line. Ignore it,
11423      # but warn the user (except for BASH, which is always set by the calling BASH).
11424      if test "xAWK" != xBASH; then
11425        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11426$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11427      fi
11428      # Try to locate tool using the code snippet
11429      for ac_prog in gawk mawk nawk awk
11430do
11431  # Extract the first word of "$ac_prog", so it can be a program name with args.
11432set dummy $ac_prog; ac_word=$2
11433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11434$as_echo_n "checking for $ac_word... " >&6; }
11435if ${ac_cv_prog_AWK+:} false; then :
11436  $as_echo_n "(cached) " >&6
11437else
11438  if test -n "$AWK"; then
11439  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11440else
11441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11442for as_dir in $PATH
11443do
11444  IFS=$as_save_IFS
11445  test -z "$as_dir" && as_dir=.
11446    for ac_exec_ext in '' $ac_executable_extensions; do
11447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11448    ac_cv_prog_AWK="$ac_prog"
11449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11450    break 2
11451  fi
11452done
11453  done
11454IFS=$as_save_IFS
11455
11456fi
11457fi
11458AWK=$ac_cv_prog_AWK
11459if test -n "$AWK"; then
11460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11461$as_echo "$AWK" >&6; }
11462else
11463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11464$as_echo "no" >&6; }
11465fi
11466
11467
11468  test -n "$AWK" && break
11469done
11470
11471    else
11472      # If it succeeded, then it was overridden by the user. We will use it
11473      # for the tool.
11474
11475      # First remove it from the list of overridden variables, so we can test
11476      # for unknown variables in the end.
11477      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11478
11479      # Check if the provided tool contains a complete path.
11480      tool_specified="$AWK"
11481      tool_basename="${tool_specified##*/}"
11482      if test "x$tool_basename" = "x$tool_specified"; then
11483        # A command without a complete path is provided, search $PATH.
11484        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11485$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11486        # Extract the first word of "$tool_basename", so it can be a program name with args.
11487set dummy $tool_basename; ac_word=$2
11488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11489$as_echo_n "checking for $ac_word... " >&6; }
11490if ${ac_cv_path_AWK+:} false; then :
11491  $as_echo_n "(cached) " >&6
11492else
11493  case $AWK in
11494  [\\/]* | ?:[\\/]*)
11495  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11496  ;;
11497  *)
11498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513  ;;
11514esac
11515fi
11516AWK=$ac_cv_path_AWK
11517if test -n "$AWK"; then
11518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11519$as_echo "$AWK" >&6; }
11520else
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11522$as_echo "no" >&6; }
11523fi
11524
11525
11526        if test "x$AWK" = x; then
11527          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11528        fi
11529      else
11530        # Otherwise we believe it is a complete path. Use it as it is.
11531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11532$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11534$as_echo_n "checking for AWK... " >&6; }
11535        if test ! -x "$tool_specified"; then
11536          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11537$as_echo "not found" >&6; }
11538          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11539        fi
11540        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11541$as_echo "$tool_specified" >&6; }
11542      fi
11543    fi
11544  fi
11545
11546
11547  if test "x$AWK" = x; then
11548    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11549  fi
11550
11551
11552
11553
11554  # Publish this variable in the help.
11555
11556
11557  if test "x$GREP" = x; then
11558    # The variable is not set by user, try to locate tool using the code snippet
11559    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11560$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11561if ${ac_cv_path_GREP+:} false; then :
11562  $as_echo_n "(cached) " >&6
11563else
11564  if test -z "$GREP"; then
11565  ac_path_GREP_found=false
11566  # Loop through the user's path and test for each of PROGNAME-LIST
11567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11568for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11569do
11570  IFS=$as_save_IFS
11571  test -z "$as_dir" && as_dir=.
11572    for ac_prog in grep ggrep; do
11573    for ac_exec_ext in '' $ac_executable_extensions; do
11574      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11575      as_fn_executable_p "$ac_path_GREP" || continue
11576# Check for GNU ac_path_GREP and select it if it is found.
11577  # Check for GNU $ac_path_GREP
11578case `"$ac_path_GREP" --version 2>&1` in
11579*GNU*)
11580  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11581*)
11582  ac_count=0
11583  $as_echo_n 0123456789 >"conftest.in"
11584  while :
11585  do
11586    cat "conftest.in" "conftest.in" >"conftest.tmp"
11587    mv "conftest.tmp" "conftest.in"
11588    cp "conftest.in" "conftest.nl"
11589    $as_echo 'GREP' >> "conftest.nl"
11590    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11591    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11592    as_fn_arith $ac_count + 1 && ac_count=$as_val
11593    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11594      # Best one so far, save it but keep looking for a better one
11595      ac_cv_path_GREP="$ac_path_GREP"
11596      ac_path_GREP_max=$ac_count
11597    fi
11598    # 10*(2^10) chars as input seems more than enough
11599    test $ac_count -gt 10 && break
11600  done
11601  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11602esac
11603
11604      $ac_path_GREP_found && break 3
11605    done
11606  done
11607  done
11608IFS=$as_save_IFS
11609  if test -z "$ac_cv_path_GREP"; then
11610    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11611  fi
11612else
11613  ac_cv_path_GREP=$GREP
11614fi
11615
11616fi
11617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11618$as_echo "$ac_cv_path_GREP" >&6; }
11619 GREP="$ac_cv_path_GREP"
11620
11621
11622  else
11623    # The variable is set, but is it from the command line or the environment?
11624
11625    # Try to remove the string !GREP! from our list.
11626    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11627    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11628      # If it failed, the variable was not from the command line. Ignore it,
11629      # but warn the user (except for BASH, which is always set by the calling BASH).
11630      if test "xGREP" != xBASH; then
11631        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11632$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11633      fi
11634      # Try to locate tool using the code snippet
11635      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11636$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11637if ${ac_cv_path_GREP+:} false; then :
11638  $as_echo_n "(cached) " >&6
11639else
11640  if test -z "$GREP"; then
11641  ac_path_GREP_found=false
11642  # Loop through the user's path and test for each of PROGNAME-LIST
11643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11644for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11645do
11646  IFS=$as_save_IFS
11647  test -z "$as_dir" && as_dir=.
11648    for ac_prog in grep ggrep; do
11649    for ac_exec_ext in '' $ac_executable_extensions; do
11650      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11651      as_fn_executable_p "$ac_path_GREP" || continue
11652# Check for GNU ac_path_GREP and select it if it is found.
11653  # Check for GNU $ac_path_GREP
11654case `"$ac_path_GREP" --version 2>&1` in
11655*GNU*)
11656  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11657*)
11658  ac_count=0
11659  $as_echo_n 0123456789 >"conftest.in"
11660  while :
11661  do
11662    cat "conftest.in" "conftest.in" >"conftest.tmp"
11663    mv "conftest.tmp" "conftest.in"
11664    cp "conftest.in" "conftest.nl"
11665    $as_echo 'GREP' >> "conftest.nl"
11666    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11667    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11668    as_fn_arith $ac_count + 1 && ac_count=$as_val
11669    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11670      # Best one so far, save it but keep looking for a better one
11671      ac_cv_path_GREP="$ac_path_GREP"
11672      ac_path_GREP_max=$ac_count
11673    fi
11674    # 10*(2^10) chars as input seems more than enough
11675    test $ac_count -gt 10 && break
11676  done
11677  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11678esac
11679
11680      $ac_path_GREP_found && break 3
11681    done
11682  done
11683  done
11684IFS=$as_save_IFS
11685  if test -z "$ac_cv_path_GREP"; then
11686    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11687  fi
11688else
11689  ac_cv_path_GREP=$GREP
11690fi
11691
11692fi
11693{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11694$as_echo "$ac_cv_path_GREP" >&6; }
11695 GREP="$ac_cv_path_GREP"
11696
11697
11698    else
11699      # If it succeeded, then it was overridden by the user. We will use it
11700      # for the tool.
11701
11702      # First remove it from the list of overridden variables, so we can test
11703      # for unknown variables in the end.
11704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11705
11706      # Check if the provided tool contains a complete path.
11707      tool_specified="$GREP"
11708      tool_basename="${tool_specified##*/}"
11709      if test "x$tool_basename" = "x$tool_specified"; then
11710        # A command without a complete path is provided, search $PATH.
11711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11712$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11713        # Extract the first word of "$tool_basename", so it can be a program name with args.
11714set dummy $tool_basename; ac_word=$2
11715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11716$as_echo_n "checking for $ac_word... " >&6; }
11717if ${ac_cv_path_GREP+:} false; then :
11718  $as_echo_n "(cached) " >&6
11719else
11720  case $GREP in
11721  [\\/]* | ?:[\\/]*)
11722  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11723  ;;
11724  *)
11725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11726for as_dir in $PATH
11727do
11728  IFS=$as_save_IFS
11729  test -z "$as_dir" && as_dir=.
11730    for ac_exec_ext in '' $ac_executable_extensions; do
11731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11732    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11734    break 2
11735  fi
11736done
11737  done
11738IFS=$as_save_IFS
11739
11740  ;;
11741esac
11742fi
11743GREP=$ac_cv_path_GREP
11744if test -n "$GREP"; then
11745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11746$as_echo "$GREP" >&6; }
11747else
11748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11749$as_echo "no" >&6; }
11750fi
11751
11752
11753        if test "x$GREP" = x; then
11754          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11755        fi
11756      else
11757        # Otherwise we believe it is a complete path. Use it as it is.
11758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11759$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11761$as_echo_n "checking for GREP... " >&6; }
11762        if test ! -x "$tool_specified"; then
11763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11764$as_echo "not found" >&6; }
11765          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11766        fi
11767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11768$as_echo "$tool_specified" >&6; }
11769      fi
11770    fi
11771  fi
11772
11773
11774  if test "x$GREP" = x; then
11775    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11776  fi
11777
11778
11779
11780
11781  # Publish this variable in the help.
11782
11783
11784  if test "x$EGREP" = x; then
11785    # The variable is not set by user, try to locate tool using the code snippet
11786    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11787$as_echo_n "checking for egrep... " >&6; }
11788if ${ac_cv_path_EGREP+:} false; then :
11789  $as_echo_n "(cached) " >&6
11790else
11791  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11792   then ac_cv_path_EGREP="$GREP -E"
11793   else
11794     if test -z "$EGREP"; then
11795  ac_path_EGREP_found=false
11796  # Loop through the user's path and test for each of PROGNAME-LIST
11797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11798for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11799do
11800  IFS=$as_save_IFS
11801  test -z "$as_dir" && as_dir=.
11802    for ac_prog in egrep; do
11803    for ac_exec_ext in '' $ac_executable_extensions; do
11804      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11805      as_fn_executable_p "$ac_path_EGREP" || continue
11806# Check for GNU ac_path_EGREP and select it if it is found.
11807  # Check for GNU $ac_path_EGREP
11808case `"$ac_path_EGREP" --version 2>&1` in
11809*GNU*)
11810  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11811*)
11812  ac_count=0
11813  $as_echo_n 0123456789 >"conftest.in"
11814  while :
11815  do
11816    cat "conftest.in" "conftest.in" >"conftest.tmp"
11817    mv "conftest.tmp" "conftest.in"
11818    cp "conftest.in" "conftest.nl"
11819    $as_echo 'EGREP' >> "conftest.nl"
11820    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11821    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11822    as_fn_arith $ac_count + 1 && ac_count=$as_val
11823    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11824      # Best one so far, save it but keep looking for a better one
11825      ac_cv_path_EGREP="$ac_path_EGREP"
11826      ac_path_EGREP_max=$ac_count
11827    fi
11828    # 10*(2^10) chars as input seems more than enough
11829    test $ac_count -gt 10 && break
11830  done
11831  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11832esac
11833
11834      $ac_path_EGREP_found && break 3
11835    done
11836  done
11837  done
11838IFS=$as_save_IFS
11839  if test -z "$ac_cv_path_EGREP"; then
11840    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11841  fi
11842else
11843  ac_cv_path_EGREP=$EGREP
11844fi
11845
11846   fi
11847fi
11848{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11849$as_echo "$ac_cv_path_EGREP" >&6; }
11850 EGREP="$ac_cv_path_EGREP"
11851
11852
11853  else
11854    # The variable is set, but is it from the command line or the environment?
11855
11856    # Try to remove the string !EGREP! from our list.
11857    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11858    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11859      # If it failed, the variable was not from the command line. Ignore it,
11860      # but warn the user (except for BASH, which is always set by the calling BASH).
11861      if test "xEGREP" != xBASH; then
11862        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11863$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11864      fi
11865      # Try to locate tool using the code snippet
11866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11867$as_echo_n "checking for egrep... " >&6; }
11868if ${ac_cv_path_EGREP+:} false; then :
11869  $as_echo_n "(cached) " >&6
11870else
11871  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11872   then ac_cv_path_EGREP="$GREP -E"
11873   else
11874     if test -z "$EGREP"; then
11875  ac_path_EGREP_found=false
11876  # Loop through the user's path and test for each of PROGNAME-LIST
11877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11878for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11879do
11880  IFS=$as_save_IFS
11881  test -z "$as_dir" && as_dir=.
11882    for ac_prog in egrep; do
11883    for ac_exec_ext in '' $ac_executable_extensions; do
11884      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11885      as_fn_executable_p "$ac_path_EGREP" || continue
11886# Check for GNU ac_path_EGREP and select it if it is found.
11887  # Check for GNU $ac_path_EGREP
11888case `"$ac_path_EGREP" --version 2>&1` in
11889*GNU*)
11890  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11891*)
11892  ac_count=0
11893  $as_echo_n 0123456789 >"conftest.in"
11894  while :
11895  do
11896    cat "conftest.in" "conftest.in" >"conftest.tmp"
11897    mv "conftest.tmp" "conftest.in"
11898    cp "conftest.in" "conftest.nl"
11899    $as_echo 'EGREP' >> "conftest.nl"
11900    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11901    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11902    as_fn_arith $ac_count + 1 && ac_count=$as_val
11903    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11904      # Best one so far, save it but keep looking for a better one
11905      ac_cv_path_EGREP="$ac_path_EGREP"
11906      ac_path_EGREP_max=$ac_count
11907    fi
11908    # 10*(2^10) chars as input seems more than enough
11909    test $ac_count -gt 10 && break
11910  done
11911  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11912esac
11913
11914      $ac_path_EGREP_found && break 3
11915    done
11916  done
11917  done
11918IFS=$as_save_IFS
11919  if test -z "$ac_cv_path_EGREP"; then
11920    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11921  fi
11922else
11923  ac_cv_path_EGREP=$EGREP
11924fi
11925
11926   fi
11927fi
11928{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11929$as_echo "$ac_cv_path_EGREP" >&6; }
11930 EGREP="$ac_cv_path_EGREP"
11931
11932
11933    else
11934      # If it succeeded, then it was overridden by the user. We will use it
11935      # for the tool.
11936
11937      # First remove it from the list of overridden variables, so we can test
11938      # for unknown variables in the end.
11939      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11940
11941      # Check if the provided tool contains a complete path.
11942      tool_specified="$EGREP"
11943      tool_basename="${tool_specified##*/}"
11944      if test "x$tool_basename" = "x$tool_specified"; then
11945        # A command without a complete path is provided, search $PATH.
11946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11947$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11948        # Extract the first word of "$tool_basename", so it can be a program name with args.
11949set dummy $tool_basename; ac_word=$2
11950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11951$as_echo_n "checking for $ac_word... " >&6; }
11952if ${ac_cv_path_EGREP+:} false; then :
11953  $as_echo_n "(cached) " >&6
11954else
11955  case $EGREP in
11956  [\\/]* | ?:[\\/]*)
11957  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11958  ;;
11959  *)
11960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11961for as_dir in $PATH
11962do
11963  IFS=$as_save_IFS
11964  test -z "$as_dir" && as_dir=.
11965    for ac_exec_ext in '' $ac_executable_extensions; do
11966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11967    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11969    break 2
11970  fi
11971done
11972  done
11973IFS=$as_save_IFS
11974
11975  ;;
11976esac
11977fi
11978EGREP=$ac_cv_path_EGREP
11979if test -n "$EGREP"; then
11980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11981$as_echo "$EGREP" >&6; }
11982else
11983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11984$as_echo "no" >&6; }
11985fi
11986
11987
11988        if test "x$EGREP" = x; then
11989          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11990        fi
11991      else
11992        # Otherwise we believe it is a complete path. Use it as it is.
11993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11994$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
11995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
11996$as_echo_n "checking for EGREP... " >&6; }
11997        if test ! -x "$tool_specified"; then
11998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11999$as_echo "not found" >&6; }
12000          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12001        fi
12002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12003$as_echo "$tool_specified" >&6; }
12004      fi
12005    fi
12006  fi
12007
12008
12009  if test "x$EGREP" = x; then
12010    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12011  fi
12012
12013
12014
12015
12016  # Publish this variable in the help.
12017
12018
12019  if test "x$FGREP" = x; then
12020    # The variable is not set by user, try to locate tool using the code snippet
12021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12022$as_echo_n "checking for fgrep... " >&6; }
12023if ${ac_cv_path_FGREP+:} false; then :
12024  $as_echo_n "(cached) " >&6
12025else
12026  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12027   then ac_cv_path_FGREP="$GREP -F"
12028   else
12029     if test -z "$FGREP"; then
12030  ac_path_FGREP_found=false
12031  # Loop through the user's path and test for each of PROGNAME-LIST
12032  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12033for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12034do
12035  IFS=$as_save_IFS
12036  test -z "$as_dir" && as_dir=.
12037    for ac_prog in fgrep; do
12038    for ac_exec_ext in '' $ac_executable_extensions; do
12039      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12040      as_fn_executable_p "$ac_path_FGREP" || continue
12041# Check for GNU ac_path_FGREP and select it if it is found.
12042  # Check for GNU $ac_path_FGREP
12043case `"$ac_path_FGREP" --version 2>&1` in
12044*GNU*)
12045  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12046*)
12047  ac_count=0
12048  $as_echo_n 0123456789 >"conftest.in"
12049  while :
12050  do
12051    cat "conftest.in" "conftest.in" >"conftest.tmp"
12052    mv "conftest.tmp" "conftest.in"
12053    cp "conftest.in" "conftest.nl"
12054    $as_echo 'FGREP' >> "conftest.nl"
12055    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12056    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12057    as_fn_arith $ac_count + 1 && ac_count=$as_val
12058    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12059      # Best one so far, save it but keep looking for a better one
12060      ac_cv_path_FGREP="$ac_path_FGREP"
12061      ac_path_FGREP_max=$ac_count
12062    fi
12063    # 10*(2^10) chars as input seems more than enough
12064    test $ac_count -gt 10 && break
12065  done
12066  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12067esac
12068
12069      $ac_path_FGREP_found && break 3
12070    done
12071  done
12072  done
12073IFS=$as_save_IFS
12074  if test -z "$ac_cv_path_FGREP"; then
12075    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12076  fi
12077else
12078  ac_cv_path_FGREP=$FGREP
12079fi
12080
12081   fi
12082fi
12083{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12084$as_echo "$ac_cv_path_FGREP" >&6; }
12085 FGREP="$ac_cv_path_FGREP"
12086
12087
12088  else
12089    # The variable is set, but is it from the command line or the environment?
12090
12091    # Try to remove the string !FGREP! from our list.
12092    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12093    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12094      # If it failed, the variable was not from the command line. Ignore it,
12095      # but warn the user (except for BASH, which is always set by the calling BASH).
12096      if test "xFGREP" != xBASH; then
12097        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12098$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12099      fi
12100      # Try to locate tool using the code snippet
12101      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12102$as_echo_n "checking for fgrep... " >&6; }
12103if ${ac_cv_path_FGREP+:} false; then :
12104  $as_echo_n "(cached) " >&6
12105else
12106  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12107   then ac_cv_path_FGREP="$GREP -F"
12108   else
12109     if test -z "$FGREP"; then
12110  ac_path_FGREP_found=false
12111  # Loop through the user's path and test for each of PROGNAME-LIST
12112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12113for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12114do
12115  IFS=$as_save_IFS
12116  test -z "$as_dir" && as_dir=.
12117    for ac_prog in fgrep; do
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12120      as_fn_executable_p "$ac_path_FGREP" || continue
12121# Check for GNU ac_path_FGREP and select it if it is found.
12122  # Check for GNU $ac_path_FGREP
12123case `"$ac_path_FGREP" --version 2>&1` in
12124*GNU*)
12125  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12126*)
12127  ac_count=0
12128  $as_echo_n 0123456789 >"conftest.in"
12129  while :
12130  do
12131    cat "conftest.in" "conftest.in" >"conftest.tmp"
12132    mv "conftest.tmp" "conftest.in"
12133    cp "conftest.in" "conftest.nl"
12134    $as_echo 'FGREP' >> "conftest.nl"
12135    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12136    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12137    as_fn_arith $ac_count + 1 && ac_count=$as_val
12138    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12139      # Best one so far, save it but keep looking for a better one
12140      ac_cv_path_FGREP="$ac_path_FGREP"
12141      ac_path_FGREP_max=$ac_count
12142    fi
12143    # 10*(2^10) chars as input seems more than enough
12144    test $ac_count -gt 10 && break
12145  done
12146  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12147esac
12148
12149      $ac_path_FGREP_found && break 3
12150    done
12151  done
12152  done
12153IFS=$as_save_IFS
12154  if test -z "$ac_cv_path_FGREP"; then
12155    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12156  fi
12157else
12158  ac_cv_path_FGREP=$FGREP
12159fi
12160
12161   fi
12162fi
12163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12164$as_echo "$ac_cv_path_FGREP" >&6; }
12165 FGREP="$ac_cv_path_FGREP"
12166
12167
12168    else
12169      # If it succeeded, then it was overridden by the user. We will use it
12170      # for the tool.
12171
12172      # First remove it from the list of overridden variables, so we can test
12173      # for unknown variables in the end.
12174      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12175
12176      # Check if the provided tool contains a complete path.
12177      tool_specified="$FGREP"
12178      tool_basename="${tool_specified##*/}"
12179      if test "x$tool_basename" = "x$tool_specified"; then
12180        # A command without a complete path is provided, search $PATH.
12181        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12182$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12183        # Extract the first word of "$tool_basename", so it can be a program name with args.
12184set dummy $tool_basename; ac_word=$2
12185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12186$as_echo_n "checking for $ac_word... " >&6; }
12187if ${ac_cv_path_FGREP+:} false; then :
12188  $as_echo_n "(cached) " >&6
12189else
12190  case $FGREP in
12191  [\\/]* | ?:[\\/]*)
12192  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12193  ;;
12194  *)
12195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196for as_dir in $PATH
12197do
12198  IFS=$as_save_IFS
12199  test -z "$as_dir" && as_dir=.
12200    for ac_exec_ext in '' $ac_executable_extensions; do
12201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12202    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12204    break 2
12205  fi
12206done
12207  done
12208IFS=$as_save_IFS
12209
12210  ;;
12211esac
12212fi
12213FGREP=$ac_cv_path_FGREP
12214if test -n "$FGREP"; then
12215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12216$as_echo "$FGREP" >&6; }
12217else
12218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12219$as_echo "no" >&6; }
12220fi
12221
12222
12223        if test "x$FGREP" = x; then
12224          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12225        fi
12226      else
12227        # Otherwise we believe it is a complete path. Use it as it is.
12228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12229$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12231$as_echo_n "checking for FGREP... " >&6; }
12232        if test ! -x "$tool_specified"; then
12233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12234$as_echo "not found" >&6; }
12235          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12236        fi
12237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12238$as_echo "$tool_specified" >&6; }
12239      fi
12240    fi
12241  fi
12242
12243
12244  if test "x$FGREP" = x; then
12245    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12246  fi
12247
12248
12249
12250
12251  # Publish this variable in the help.
12252
12253
12254  if test "x$SED" = x; then
12255    # The variable is not set by user, try to locate tool using the code snippet
12256    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12257$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12258if ${ac_cv_path_SED+:} false; then :
12259  $as_echo_n "(cached) " >&6
12260else
12261            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12262     for ac_i in 1 2 3 4 5 6 7; do
12263       ac_script="$ac_script$as_nl$ac_script"
12264     done
12265     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12266     { ac_script=; unset ac_script;}
12267     if test -z "$SED"; then
12268  ac_path_SED_found=false
12269  # Loop through the user's path and test for each of PROGNAME-LIST
12270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12271for as_dir in $PATH
12272do
12273  IFS=$as_save_IFS
12274  test -z "$as_dir" && as_dir=.
12275    for ac_prog in sed gsed; do
12276    for ac_exec_ext in '' $ac_executable_extensions; do
12277      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12278      as_fn_executable_p "$ac_path_SED" || continue
12279# Check for GNU ac_path_SED and select it if it is found.
12280  # Check for GNU $ac_path_SED
12281case `"$ac_path_SED" --version 2>&1` in
12282*GNU*)
12283  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12284*)
12285  ac_count=0
12286  $as_echo_n 0123456789 >"conftest.in"
12287  while :
12288  do
12289    cat "conftest.in" "conftest.in" >"conftest.tmp"
12290    mv "conftest.tmp" "conftest.in"
12291    cp "conftest.in" "conftest.nl"
12292    $as_echo '' >> "conftest.nl"
12293    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12294    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12295    as_fn_arith $ac_count + 1 && ac_count=$as_val
12296    if test $ac_count -gt ${ac_path_SED_max-0}; then
12297      # Best one so far, save it but keep looking for a better one
12298      ac_cv_path_SED="$ac_path_SED"
12299      ac_path_SED_max=$ac_count
12300    fi
12301    # 10*(2^10) chars as input seems more than enough
12302    test $ac_count -gt 10 && break
12303  done
12304  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12305esac
12306
12307      $ac_path_SED_found && break 3
12308    done
12309  done
12310  done
12311IFS=$as_save_IFS
12312  if test -z "$ac_cv_path_SED"; then
12313    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12314  fi
12315else
12316  ac_cv_path_SED=$SED
12317fi
12318
12319fi
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12321$as_echo "$ac_cv_path_SED" >&6; }
12322 SED="$ac_cv_path_SED"
12323  rm -f conftest.sed
12324
12325  else
12326    # The variable is set, but is it from the command line or the environment?
12327
12328    # Try to remove the string !SED! from our list.
12329    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12330    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12331      # If it failed, the variable was not from the command line. Ignore it,
12332      # but warn the user (except for BASH, which is always set by the calling BASH).
12333      if test "xSED" != xBASH; then
12334        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12335$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12336      fi
12337      # Try to locate tool using the code snippet
12338      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12339$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12340if ${ac_cv_path_SED+:} false; then :
12341  $as_echo_n "(cached) " >&6
12342else
12343            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12344     for ac_i in 1 2 3 4 5 6 7; do
12345       ac_script="$ac_script$as_nl$ac_script"
12346     done
12347     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12348     { ac_script=; unset ac_script;}
12349     if test -z "$SED"; then
12350  ac_path_SED_found=false
12351  # Loop through the user's path and test for each of PROGNAME-LIST
12352  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12353for as_dir in $PATH
12354do
12355  IFS=$as_save_IFS
12356  test -z "$as_dir" && as_dir=.
12357    for ac_prog in sed gsed; do
12358    for ac_exec_ext in '' $ac_executable_extensions; do
12359      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12360      as_fn_executable_p "$ac_path_SED" || continue
12361# Check for GNU ac_path_SED and select it if it is found.
12362  # Check for GNU $ac_path_SED
12363case `"$ac_path_SED" --version 2>&1` in
12364*GNU*)
12365  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12366*)
12367  ac_count=0
12368  $as_echo_n 0123456789 >"conftest.in"
12369  while :
12370  do
12371    cat "conftest.in" "conftest.in" >"conftest.tmp"
12372    mv "conftest.tmp" "conftest.in"
12373    cp "conftest.in" "conftest.nl"
12374    $as_echo '' >> "conftest.nl"
12375    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12376    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12377    as_fn_arith $ac_count + 1 && ac_count=$as_val
12378    if test $ac_count -gt ${ac_path_SED_max-0}; then
12379      # Best one so far, save it but keep looking for a better one
12380      ac_cv_path_SED="$ac_path_SED"
12381      ac_path_SED_max=$ac_count
12382    fi
12383    # 10*(2^10) chars as input seems more than enough
12384    test $ac_count -gt 10 && break
12385  done
12386  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12387esac
12388
12389      $ac_path_SED_found && break 3
12390    done
12391  done
12392  done
12393IFS=$as_save_IFS
12394  if test -z "$ac_cv_path_SED"; then
12395    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12396  fi
12397else
12398  ac_cv_path_SED=$SED
12399fi
12400
12401fi
12402{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12403$as_echo "$ac_cv_path_SED" >&6; }
12404 SED="$ac_cv_path_SED"
12405  rm -f conftest.sed
12406
12407    else
12408      # If it succeeded, then it was overridden by the user. We will use it
12409      # for the tool.
12410
12411      # First remove it from the list of overridden variables, so we can test
12412      # for unknown variables in the end.
12413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12414
12415      # Check if the provided tool contains a complete path.
12416      tool_specified="$SED"
12417      tool_basename="${tool_specified##*/}"
12418      if test "x$tool_basename" = "x$tool_specified"; then
12419        # A command without a complete path is provided, search $PATH.
12420        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12421$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12422        # Extract the first word of "$tool_basename", so it can be a program name with args.
12423set dummy $tool_basename; ac_word=$2
12424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12425$as_echo_n "checking for $ac_word... " >&6; }
12426if ${ac_cv_path_SED+:} false; then :
12427  $as_echo_n "(cached) " >&6
12428else
12429  case $SED in
12430  [\\/]* | ?:[\\/]*)
12431  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12432  ;;
12433  *)
12434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12435for as_dir in $PATH
12436do
12437  IFS=$as_save_IFS
12438  test -z "$as_dir" && as_dir=.
12439    for ac_exec_ext in '' $ac_executable_extensions; do
12440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12441    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12443    break 2
12444  fi
12445done
12446  done
12447IFS=$as_save_IFS
12448
12449  ;;
12450esac
12451fi
12452SED=$ac_cv_path_SED
12453if test -n "$SED"; then
12454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12455$as_echo "$SED" >&6; }
12456else
12457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12458$as_echo "no" >&6; }
12459fi
12460
12461
12462        if test "x$SED" = x; then
12463          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12464        fi
12465      else
12466        # Otherwise we believe it is a complete path. Use it as it is.
12467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12468$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12469        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12470$as_echo_n "checking for SED... " >&6; }
12471        if test ! -x "$tool_specified"; then
12472          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12473$as_echo "not found" >&6; }
12474          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12475        fi
12476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12477$as_echo "$tool_specified" >&6; }
12478      fi
12479    fi
12480  fi
12481
12482
12483  if test "x$SED" = x; then
12484    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12485  fi
12486
12487
12488
12489  # Always force rm.
12490  RM="$RM -f"
12491
12492  # pwd behaves differently on various platforms and some don't support the -L flag.
12493  # Always use the bash builtin pwd to get uniform behavior.
12494  THEPWDCMD=pwd
12495
12496  # These are not required on all platforms
12497
12498
12499  # Publish this variable in the help.
12500
12501
12502  if test "x$CYGPATH" = x; then
12503    # The variable is not set by user, try to locate tool using the code snippet
12504    for ac_prog in cygpath
12505do
12506  # Extract the first word of "$ac_prog", so it can be a program name with args.
12507set dummy $ac_prog; ac_word=$2
12508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12509$as_echo_n "checking for $ac_word... " >&6; }
12510if ${ac_cv_path_CYGPATH+:} false; then :
12511  $as_echo_n "(cached) " >&6
12512else
12513  case $CYGPATH in
12514  [\\/]* | ?:[\\/]*)
12515  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12516  ;;
12517  *)
12518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12519for as_dir in $PATH
12520do
12521  IFS=$as_save_IFS
12522  test -z "$as_dir" && as_dir=.
12523    for ac_exec_ext in '' $ac_executable_extensions; do
12524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12525    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12527    break 2
12528  fi
12529done
12530  done
12531IFS=$as_save_IFS
12532
12533  ;;
12534esac
12535fi
12536CYGPATH=$ac_cv_path_CYGPATH
12537if test -n "$CYGPATH"; then
12538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12539$as_echo "$CYGPATH" >&6; }
12540else
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12542$as_echo "no" >&6; }
12543fi
12544
12545
12546  test -n "$CYGPATH" && break
12547done
12548
12549  else
12550    # The variable is set, but is it from the command line or the environment?
12551
12552    # Try to remove the string !CYGPATH! from our list.
12553    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12554    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12555      # If it failed, the variable was not from the command line. Ignore it,
12556      # but warn the user (except for BASH, which is always set by the calling BASH).
12557      if test "xCYGPATH" != xBASH; then
12558        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12559$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12560      fi
12561      # Try to locate tool using the code snippet
12562      for ac_prog in cygpath
12563do
12564  # Extract the first word of "$ac_prog", so it can be a program name with args.
12565set dummy $ac_prog; ac_word=$2
12566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12567$as_echo_n "checking for $ac_word... " >&6; }
12568if ${ac_cv_path_CYGPATH+:} false; then :
12569  $as_echo_n "(cached) " >&6
12570else
12571  case $CYGPATH in
12572  [\\/]* | ?:[\\/]*)
12573  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12574  ;;
12575  *)
12576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12577for as_dir in $PATH
12578do
12579  IFS=$as_save_IFS
12580  test -z "$as_dir" && as_dir=.
12581    for ac_exec_ext in '' $ac_executable_extensions; do
12582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12583    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12585    break 2
12586  fi
12587done
12588  done
12589IFS=$as_save_IFS
12590
12591  ;;
12592esac
12593fi
12594CYGPATH=$ac_cv_path_CYGPATH
12595if test -n "$CYGPATH"; then
12596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12597$as_echo "$CYGPATH" >&6; }
12598else
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12600$as_echo "no" >&6; }
12601fi
12602
12603
12604  test -n "$CYGPATH" && break
12605done
12606
12607    else
12608      # If it succeeded, then it was overridden by the user. We will use it
12609      # for the tool.
12610
12611      # First remove it from the list of overridden variables, so we can test
12612      # for unknown variables in the end.
12613      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12614
12615      # Check if the provided tool contains a complete path.
12616      tool_specified="$CYGPATH"
12617      tool_basename="${tool_specified##*/}"
12618      if test "x$tool_basename" = "x$tool_specified"; then
12619        # A command without a complete path is provided, search $PATH.
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12621$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12622        # Extract the first word of "$tool_basename", so it can be a program name with args.
12623set dummy $tool_basename; ac_word=$2
12624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12625$as_echo_n "checking for $ac_word... " >&6; }
12626if ${ac_cv_path_CYGPATH+:} false; then :
12627  $as_echo_n "(cached) " >&6
12628else
12629  case $CYGPATH in
12630  [\\/]* | ?:[\\/]*)
12631  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12632  ;;
12633  *)
12634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12635for as_dir in $PATH
12636do
12637  IFS=$as_save_IFS
12638  test -z "$as_dir" && as_dir=.
12639    for ac_exec_ext in '' $ac_executable_extensions; do
12640  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12641    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12642    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12643    break 2
12644  fi
12645done
12646  done
12647IFS=$as_save_IFS
12648
12649  ;;
12650esac
12651fi
12652CYGPATH=$ac_cv_path_CYGPATH
12653if test -n "$CYGPATH"; then
12654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12655$as_echo "$CYGPATH" >&6; }
12656else
12657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12658$as_echo "no" >&6; }
12659fi
12660
12661
12662        if test "x$CYGPATH" = x; then
12663          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12664        fi
12665      else
12666        # Otherwise we believe it is a complete path. Use it as it is.
12667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12668$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12669        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12670$as_echo_n "checking for CYGPATH... " >&6; }
12671        if test ! -x "$tool_specified"; then
12672          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12673$as_echo "not found" >&6; }
12674          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12675        fi
12676        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12677$as_echo "$tool_specified" >&6; }
12678      fi
12679    fi
12680  fi
12681
12682
12683
12684
12685  # Publish this variable in the help.
12686
12687
12688  if test "x$READLINK" = x; then
12689    # The variable is not set by user, try to locate tool using the code snippet
12690    for ac_prog in greadlink readlink
12691do
12692  # Extract the first word of "$ac_prog", so it can be a program name with args.
12693set dummy $ac_prog; ac_word=$2
12694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12695$as_echo_n "checking for $ac_word... " >&6; }
12696if ${ac_cv_path_READLINK+:} false; then :
12697  $as_echo_n "(cached) " >&6
12698else
12699  case $READLINK in
12700  [\\/]* | ?:[\\/]*)
12701  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12702  ;;
12703  *)
12704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12705for as_dir in $PATH
12706do
12707  IFS=$as_save_IFS
12708  test -z "$as_dir" && as_dir=.
12709    for ac_exec_ext in '' $ac_executable_extensions; do
12710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12711    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12713    break 2
12714  fi
12715done
12716  done
12717IFS=$as_save_IFS
12718
12719  ;;
12720esac
12721fi
12722READLINK=$ac_cv_path_READLINK
12723if test -n "$READLINK"; then
12724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12725$as_echo "$READLINK" >&6; }
12726else
12727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12728$as_echo "no" >&6; }
12729fi
12730
12731
12732  test -n "$READLINK" && break
12733done
12734
12735  else
12736    # The variable is set, but is it from the command line or the environment?
12737
12738    # Try to remove the string !READLINK! from our list.
12739    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12740    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12741      # If it failed, the variable was not from the command line. Ignore it,
12742      # but warn the user (except for BASH, which is always set by the calling BASH).
12743      if test "xREADLINK" != xBASH; then
12744        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12745$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12746      fi
12747      # Try to locate tool using the code snippet
12748      for ac_prog in greadlink readlink
12749do
12750  # Extract the first word of "$ac_prog", so it can be a program name with args.
12751set dummy $ac_prog; ac_word=$2
12752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12753$as_echo_n "checking for $ac_word... " >&6; }
12754if ${ac_cv_path_READLINK+:} false; then :
12755  $as_echo_n "(cached) " >&6
12756else
12757  case $READLINK in
12758  [\\/]* | ?:[\\/]*)
12759  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12760  ;;
12761  *)
12762  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12763for as_dir in $PATH
12764do
12765  IFS=$as_save_IFS
12766  test -z "$as_dir" && as_dir=.
12767    for ac_exec_ext in '' $ac_executable_extensions; do
12768  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12769    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12770    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12771    break 2
12772  fi
12773done
12774  done
12775IFS=$as_save_IFS
12776
12777  ;;
12778esac
12779fi
12780READLINK=$ac_cv_path_READLINK
12781if test -n "$READLINK"; then
12782  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12783$as_echo "$READLINK" >&6; }
12784else
12785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12786$as_echo "no" >&6; }
12787fi
12788
12789
12790  test -n "$READLINK" && break
12791done
12792
12793    else
12794      # If it succeeded, then it was overridden by the user. We will use it
12795      # for the tool.
12796
12797      # First remove it from the list of overridden variables, so we can test
12798      # for unknown variables in the end.
12799      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12800
12801      # Check if the provided tool contains a complete path.
12802      tool_specified="$READLINK"
12803      tool_basename="${tool_specified##*/}"
12804      if test "x$tool_basename" = "x$tool_specified"; then
12805        # A command without a complete path is provided, search $PATH.
12806        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12807$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12808        # Extract the first word of "$tool_basename", so it can be a program name with args.
12809set dummy $tool_basename; ac_word=$2
12810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12811$as_echo_n "checking for $ac_word... " >&6; }
12812if ${ac_cv_path_READLINK+:} false; then :
12813  $as_echo_n "(cached) " >&6
12814else
12815  case $READLINK in
12816  [\\/]* | ?:[\\/]*)
12817  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12818  ;;
12819  *)
12820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12821for as_dir in $PATH
12822do
12823  IFS=$as_save_IFS
12824  test -z "$as_dir" && as_dir=.
12825    for ac_exec_ext in '' $ac_executable_extensions; do
12826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12827    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12829    break 2
12830  fi
12831done
12832  done
12833IFS=$as_save_IFS
12834
12835  ;;
12836esac
12837fi
12838READLINK=$ac_cv_path_READLINK
12839if test -n "$READLINK"; then
12840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12841$as_echo "$READLINK" >&6; }
12842else
12843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12844$as_echo "no" >&6; }
12845fi
12846
12847
12848        if test "x$READLINK" = x; then
12849          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12850        fi
12851      else
12852        # Otherwise we believe it is a complete path. Use it as it is.
12853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12854$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12856$as_echo_n "checking for READLINK... " >&6; }
12857        if test ! -x "$tool_specified"; then
12858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12859$as_echo "not found" >&6; }
12860          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12861        fi
12862        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12863$as_echo "$tool_specified" >&6; }
12864      fi
12865    fi
12866  fi
12867
12868
12869
12870
12871  # Publish this variable in the help.
12872
12873
12874  if test "x$DF" = x; then
12875    # The variable is not set by user, try to locate tool using the code snippet
12876    for ac_prog in df
12877do
12878  # Extract the first word of "$ac_prog", so it can be a program name with args.
12879set dummy $ac_prog; ac_word=$2
12880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12881$as_echo_n "checking for $ac_word... " >&6; }
12882if ${ac_cv_path_DF+:} false; then :
12883  $as_echo_n "(cached) " >&6
12884else
12885  case $DF in
12886  [\\/]* | ?:[\\/]*)
12887  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12888  ;;
12889  *)
12890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12891for as_dir in $PATH
12892do
12893  IFS=$as_save_IFS
12894  test -z "$as_dir" && as_dir=.
12895    for ac_exec_ext in '' $ac_executable_extensions; do
12896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12897    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12899    break 2
12900  fi
12901done
12902  done
12903IFS=$as_save_IFS
12904
12905  ;;
12906esac
12907fi
12908DF=$ac_cv_path_DF
12909if test -n "$DF"; then
12910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12911$as_echo "$DF" >&6; }
12912else
12913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12914$as_echo "no" >&6; }
12915fi
12916
12917
12918  test -n "$DF" && break
12919done
12920
12921  else
12922    # The variable is set, but is it from the command line or the environment?
12923
12924    # Try to remove the string !DF! from our list.
12925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12927      # If it failed, the variable was not from the command line. Ignore it,
12928      # but warn the user (except for BASH, which is always set by the calling BASH).
12929      if test "xDF" != xBASH; then
12930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12931$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12932      fi
12933      # Try to locate tool using the code snippet
12934      for ac_prog in df
12935do
12936  # Extract the first word of "$ac_prog", so it can be a program name with args.
12937set dummy $ac_prog; ac_word=$2
12938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12939$as_echo_n "checking for $ac_word... " >&6; }
12940if ${ac_cv_path_DF+:} false; then :
12941  $as_echo_n "(cached) " >&6
12942else
12943  case $DF in
12944  [\\/]* | ?:[\\/]*)
12945  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12946  ;;
12947  *)
12948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12949for as_dir in $PATH
12950do
12951  IFS=$as_save_IFS
12952  test -z "$as_dir" && as_dir=.
12953    for ac_exec_ext in '' $ac_executable_extensions; do
12954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12955    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12957    break 2
12958  fi
12959done
12960  done
12961IFS=$as_save_IFS
12962
12963  ;;
12964esac
12965fi
12966DF=$ac_cv_path_DF
12967if test -n "$DF"; then
12968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12969$as_echo "$DF" >&6; }
12970else
12971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12972$as_echo "no" >&6; }
12973fi
12974
12975
12976  test -n "$DF" && break
12977done
12978
12979    else
12980      # If it succeeded, then it was overridden by the user. We will use it
12981      # for the tool.
12982
12983      # First remove it from the list of overridden variables, so we can test
12984      # for unknown variables in the end.
12985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12986
12987      # Check if the provided tool contains a complete path.
12988      tool_specified="$DF"
12989      tool_basename="${tool_specified##*/}"
12990      if test "x$tool_basename" = "x$tool_specified"; then
12991        # A command without a complete path is provided, search $PATH.
12992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12993$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12994        # Extract the first word of "$tool_basename", so it can be a program name with args.
12995set dummy $tool_basename; ac_word=$2
12996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12997$as_echo_n "checking for $ac_word... " >&6; }
12998if ${ac_cv_path_DF+:} false; then :
12999  $as_echo_n "(cached) " >&6
13000else
13001  case $DF in
13002  [\\/]* | ?:[\\/]*)
13003  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13004  ;;
13005  *)
13006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13007for as_dir in $PATH
13008do
13009  IFS=$as_save_IFS
13010  test -z "$as_dir" && as_dir=.
13011    for ac_exec_ext in '' $ac_executable_extensions; do
13012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13013    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13015    break 2
13016  fi
13017done
13018  done
13019IFS=$as_save_IFS
13020
13021  ;;
13022esac
13023fi
13024DF=$ac_cv_path_DF
13025if test -n "$DF"; then
13026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13027$as_echo "$DF" >&6; }
13028else
13029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13030$as_echo "no" >&6; }
13031fi
13032
13033
13034        if test "x$DF" = x; then
13035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13036        fi
13037      else
13038        # Otherwise we believe it is a complete path. Use it as it is.
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13040$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13042$as_echo_n "checking for DF... " >&6; }
13043        if test ! -x "$tool_specified"; then
13044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13045$as_echo "not found" >&6; }
13046          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13047        fi
13048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13049$as_echo "$tool_specified" >&6; }
13050      fi
13051    fi
13052  fi
13053
13054
13055
13056
13057  # Publish this variable in the help.
13058
13059
13060  if test "x$SETFILE" = x; then
13061    # The variable is not set by user, try to locate tool using the code snippet
13062    for ac_prog in SetFile
13063do
13064  # Extract the first word of "$ac_prog", so it can be a program name with args.
13065set dummy $ac_prog; ac_word=$2
13066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13067$as_echo_n "checking for $ac_word... " >&6; }
13068if ${ac_cv_path_SETFILE+:} false; then :
13069  $as_echo_n "(cached) " >&6
13070else
13071  case $SETFILE in
13072  [\\/]* | ?:[\\/]*)
13073  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13074  ;;
13075  *)
13076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13077for as_dir in $PATH
13078do
13079  IFS=$as_save_IFS
13080  test -z "$as_dir" && as_dir=.
13081    for ac_exec_ext in '' $ac_executable_extensions; do
13082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13083    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13085    break 2
13086  fi
13087done
13088  done
13089IFS=$as_save_IFS
13090
13091  ;;
13092esac
13093fi
13094SETFILE=$ac_cv_path_SETFILE
13095if test -n "$SETFILE"; then
13096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13097$as_echo "$SETFILE" >&6; }
13098else
13099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13100$as_echo "no" >&6; }
13101fi
13102
13103
13104  test -n "$SETFILE" && break
13105done
13106
13107  else
13108    # The variable is set, but is it from the command line or the environment?
13109
13110    # Try to remove the string !SETFILE! from our list.
13111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13113      # If it failed, the variable was not from the command line. Ignore it,
13114      # but warn the user (except for BASH, which is always set by the calling BASH).
13115      if test "xSETFILE" != xBASH; then
13116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13117$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13118      fi
13119      # Try to locate tool using the code snippet
13120      for ac_prog in SetFile
13121do
13122  # Extract the first word of "$ac_prog", so it can be a program name with args.
13123set dummy $ac_prog; ac_word=$2
13124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13125$as_echo_n "checking for $ac_word... " >&6; }
13126if ${ac_cv_path_SETFILE+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  case $SETFILE in
13130  [\\/]* | ?:[\\/]*)
13131  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13132  ;;
13133  *)
13134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13135for as_dir in $PATH
13136do
13137  IFS=$as_save_IFS
13138  test -z "$as_dir" && as_dir=.
13139    for ac_exec_ext in '' $ac_executable_extensions; do
13140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13141    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13143    break 2
13144  fi
13145done
13146  done
13147IFS=$as_save_IFS
13148
13149  ;;
13150esac
13151fi
13152SETFILE=$ac_cv_path_SETFILE
13153if test -n "$SETFILE"; then
13154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13155$as_echo "$SETFILE" >&6; }
13156else
13157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13158$as_echo "no" >&6; }
13159fi
13160
13161
13162  test -n "$SETFILE" && break
13163done
13164
13165    else
13166      # If it succeeded, then it was overridden by the user. We will use it
13167      # for the tool.
13168
13169      # First remove it from the list of overridden variables, so we can test
13170      # for unknown variables in the end.
13171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13172
13173      # Check if the provided tool contains a complete path.
13174      tool_specified="$SETFILE"
13175      tool_basename="${tool_specified##*/}"
13176      if test "x$tool_basename" = "x$tool_specified"; then
13177        # A command without a complete path is provided, search $PATH.
13178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13179$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13180        # Extract the first word of "$tool_basename", so it can be a program name with args.
13181set dummy $tool_basename; ac_word=$2
13182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13183$as_echo_n "checking for $ac_word... " >&6; }
13184if ${ac_cv_path_SETFILE+:} false; then :
13185  $as_echo_n "(cached) " >&6
13186else
13187  case $SETFILE in
13188  [\\/]* | ?:[\\/]*)
13189  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13190  ;;
13191  *)
13192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13193for as_dir in $PATH
13194do
13195  IFS=$as_save_IFS
13196  test -z "$as_dir" && as_dir=.
13197    for ac_exec_ext in '' $ac_executable_extensions; do
13198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13199    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13201    break 2
13202  fi
13203done
13204  done
13205IFS=$as_save_IFS
13206
13207  ;;
13208esac
13209fi
13210SETFILE=$ac_cv_path_SETFILE
13211if test -n "$SETFILE"; then
13212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13213$as_echo "$SETFILE" >&6; }
13214else
13215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13216$as_echo "no" >&6; }
13217fi
13218
13219
13220        if test "x$SETFILE" = x; then
13221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13222        fi
13223      else
13224        # Otherwise we believe it is a complete path. Use it as it is.
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13226$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13228$as_echo_n "checking for SETFILE... " >&6; }
13229        if test ! -x "$tool_specified"; then
13230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13231$as_echo "not found" >&6; }
13232          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13233        fi
13234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13235$as_echo "$tool_specified" >&6; }
13236      fi
13237    fi
13238  fi
13239
13240
13241
13242
13243  # Publish this variable in the help.
13244
13245
13246  if test "x$CPIO" = x; then
13247    # The variable is not set by user, try to locate tool using the code snippet
13248    for ac_prog in cpio bsdcpio
13249do
13250  # Extract the first word of "$ac_prog", so it can be a program name with args.
13251set dummy $ac_prog; ac_word=$2
13252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13253$as_echo_n "checking for $ac_word... " >&6; }
13254if ${ac_cv_path_CPIO+:} false; then :
13255  $as_echo_n "(cached) " >&6
13256else
13257  case $CPIO in
13258  [\\/]* | ?:[\\/]*)
13259  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13260  ;;
13261  *)
13262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13263for as_dir in $PATH
13264do
13265  IFS=$as_save_IFS
13266  test -z "$as_dir" && as_dir=.
13267    for ac_exec_ext in '' $ac_executable_extensions; do
13268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13269    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13271    break 2
13272  fi
13273done
13274  done
13275IFS=$as_save_IFS
13276
13277  ;;
13278esac
13279fi
13280CPIO=$ac_cv_path_CPIO
13281if test -n "$CPIO"; then
13282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13283$as_echo "$CPIO" >&6; }
13284else
13285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13286$as_echo "no" >&6; }
13287fi
13288
13289
13290  test -n "$CPIO" && break
13291done
13292
13293  else
13294    # The variable is set, but is it from the command line or the environment?
13295
13296    # Try to remove the string !CPIO! from our list.
13297    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13298    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13299      # If it failed, the variable was not from the command line. Ignore it,
13300      # but warn the user (except for BASH, which is always set by the calling BASH).
13301      if test "xCPIO" != xBASH; then
13302        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13303$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13304      fi
13305      # Try to locate tool using the code snippet
13306      for ac_prog in cpio bsdcpio
13307do
13308  # Extract the first word of "$ac_prog", so it can be a program name with args.
13309set dummy $ac_prog; ac_word=$2
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13311$as_echo_n "checking for $ac_word... " >&6; }
13312if ${ac_cv_path_CPIO+:} false; then :
13313  $as_echo_n "(cached) " >&6
13314else
13315  case $CPIO in
13316  [\\/]* | ?:[\\/]*)
13317  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13318  ;;
13319  *)
13320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13321for as_dir in $PATH
13322do
13323  IFS=$as_save_IFS
13324  test -z "$as_dir" && as_dir=.
13325    for ac_exec_ext in '' $ac_executable_extensions; do
13326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13327    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13329    break 2
13330  fi
13331done
13332  done
13333IFS=$as_save_IFS
13334
13335  ;;
13336esac
13337fi
13338CPIO=$ac_cv_path_CPIO
13339if test -n "$CPIO"; then
13340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13341$as_echo "$CPIO" >&6; }
13342else
13343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13344$as_echo "no" >&6; }
13345fi
13346
13347
13348  test -n "$CPIO" && break
13349done
13350
13351    else
13352      # If it succeeded, then it was overridden by the user. We will use it
13353      # for the tool.
13354
13355      # First remove it from the list of overridden variables, so we can test
13356      # for unknown variables in the end.
13357      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13358
13359      # Check if the provided tool contains a complete path.
13360      tool_specified="$CPIO"
13361      tool_basename="${tool_specified##*/}"
13362      if test "x$tool_basename" = "x$tool_specified"; then
13363        # A command without a complete path is provided, search $PATH.
13364        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13365$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13366        # Extract the first word of "$tool_basename", so it can be a program name with args.
13367set dummy $tool_basename; ac_word=$2
13368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13369$as_echo_n "checking for $ac_word... " >&6; }
13370if ${ac_cv_path_CPIO+:} false; then :
13371  $as_echo_n "(cached) " >&6
13372else
13373  case $CPIO in
13374  [\\/]* | ?:[\\/]*)
13375  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13376  ;;
13377  *)
13378  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13379for as_dir in $PATH
13380do
13381  IFS=$as_save_IFS
13382  test -z "$as_dir" && as_dir=.
13383    for ac_exec_ext in '' $ac_executable_extensions; do
13384  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13385    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13386    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13387    break 2
13388  fi
13389done
13390  done
13391IFS=$as_save_IFS
13392
13393  ;;
13394esac
13395fi
13396CPIO=$ac_cv_path_CPIO
13397if test -n "$CPIO"; then
13398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13399$as_echo "$CPIO" >&6; }
13400else
13401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13402$as_echo "no" >&6; }
13403fi
13404
13405
13406        if test "x$CPIO" = x; then
13407          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13408        fi
13409      else
13410        # Otherwise we believe it is a complete path. Use it as it is.
13411        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13412$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13413        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13414$as_echo_n "checking for CPIO... " >&6; }
13415        if test ! -x "$tool_specified"; then
13416          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13417$as_echo "not found" >&6; }
13418          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13419        fi
13420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13421$as_echo "$tool_specified" >&6; }
13422      fi
13423    fi
13424  fi
13425
13426
13427
13428
13429# Now we can determine OpenJDK build and target platforms. This is required to
13430# have early on.
13431# Make sure we can run config.sub.
13432$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13433  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13434
13435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13436$as_echo_n "checking build system type... " >&6; }
13437if ${ac_cv_build+:} false; then :
13438  $as_echo_n "(cached) " >&6
13439else
13440  ac_build_alias=$build_alias
13441test "x$ac_build_alias" = x &&
13442  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13443test "x$ac_build_alias" = x &&
13444  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13445ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13446  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13447
13448fi
13449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13450$as_echo "$ac_cv_build" >&6; }
13451case $ac_cv_build in
13452*-*-*) ;;
13453*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13454esac
13455build=$ac_cv_build
13456ac_save_IFS=$IFS; IFS='-'
13457set x $ac_cv_build
13458shift
13459build_cpu=$1
13460build_vendor=$2
13461shift; shift
13462# Remember, the first character of IFS is used to create $*,
13463# except with old shells:
13464build_os=$*
13465IFS=$ac_save_IFS
13466case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13467
13468
13469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13470$as_echo_n "checking host system type... " >&6; }
13471if ${ac_cv_host+:} false; then :
13472  $as_echo_n "(cached) " >&6
13473else
13474  if test "x$host_alias" = x; then
13475  ac_cv_host=$ac_cv_build
13476else
13477  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13478    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13479fi
13480
13481fi
13482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13483$as_echo "$ac_cv_host" >&6; }
13484case $ac_cv_host in
13485*-*-*) ;;
13486*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13487esac
13488host=$ac_cv_host
13489ac_save_IFS=$IFS; IFS='-'
13490set x $ac_cv_host
13491shift
13492host_cpu=$1
13493host_vendor=$2
13494shift; shift
13495# Remember, the first character of IFS is used to create $*,
13496# except with old shells:
13497host_os=$*
13498IFS=$ac_save_IFS
13499case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13500
13501
13502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13503$as_echo_n "checking target system type... " >&6; }
13504if ${ac_cv_target+:} false; then :
13505  $as_echo_n "(cached) " >&6
13506else
13507  if test "x$target_alias" = x; then
13508  ac_cv_target=$ac_cv_host
13509else
13510  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13511    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13512fi
13513
13514fi
13515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13516$as_echo "$ac_cv_target" >&6; }
13517case $ac_cv_target in
13518*-*-*) ;;
13519*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13520esac
13521target=$ac_cv_target
13522ac_save_IFS=$IFS; IFS='-'
13523set x $ac_cv_target
13524shift
13525target_cpu=$1
13526target_vendor=$2
13527shift; shift
13528# Remember, the first character of IFS is used to create $*,
13529# except with old shells:
13530target_os=$*
13531IFS=$ac_save_IFS
13532case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13533
13534
13535# The aliases save the names the user supplied, while $host etc.
13536# will get canonicalized.
13537test -n "$target_alias" &&
13538  test "$program_prefix$program_suffix$program_transform_name" = \
13539    NONENONEs,x,x, &&
13540  program_prefix=${target_alias}-
13541
13542  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13543  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13544  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13545  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13546  # to use the configure naming style.
13547
13548
13549
13550
13551
13552  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13553  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13554  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13555  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13556  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13557  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13558
13559
13560
13561  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13562
13563  case "$build_os" in
13564    *linux*)
13565      VAR_OS=linux
13566      VAR_OS_TYPE=unix
13567      ;;
13568    *solaris*)
13569      VAR_OS=solaris
13570      VAR_OS_TYPE=unix
13571      ;;
13572    *darwin*)
13573      VAR_OS=macosx
13574      VAR_OS_TYPE=unix
13575      ;;
13576    *bsd*)
13577      VAR_OS=bsd
13578      VAR_OS_TYPE=unix
13579      ;;
13580    *cygwin*)
13581      VAR_OS=windows
13582      VAR_OS_ENV=windows.cygwin
13583      ;;
13584    *mingw*)
13585      VAR_OS=windows
13586      VAR_OS_ENV=windows.msys
13587      ;;
13588    *aix*)
13589      VAR_OS=aix
13590      VAR_OS_TYPE=unix
13591      ;;
13592    *)
13593      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13594      ;;
13595  esac
13596
13597
13598  # First argument is the cpu name from the trip/quad
13599  case "$build_cpu" in
13600    x86_64)
13601      VAR_CPU=x86_64
13602      VAR_CPU_ARCH=x86
13603      VAR_CPU_BITS=64
13604      VAR_CPU_ENDIAN=little
13605      ;;
13606    i?86)
13607      VAR_CPU=x86
13608      VAR_CPU_ARCH=x86
13609      VAR_CPU_BITS=32
13610      VAR_CPU_ENDIAN=little
13611      ;;
13612    arm*)
13613      VAR_CPU=arm
13614      VAR_CPU_ARCH=arm
13615      VAR_CPU_BITS=32
13616      VAR_CPU_ENDIAN=little
13617      ;;
13618    aarch64)
13619      VAR_CPU=aarch64
13620      VAR_CPU_ARCH=aarch64
13621      VAR_CPU_BITS=64
13622      VAR_CPU_ENDIAN=little
13623      ;;
13624    powerpc)
13625      VAR_CPU=ppc
13626      VAR_CPU_ARCH=ppc
13627      VAR_CPU_BITS=32
13628      VAR_CPU_ENDIAN=big
13629      ;;
13630    powerpc64)
13631      VAR_CPU=ppc64
13632      VAR_CPU_ARCH=ppc
13633      VAR_CPU_BITS=64
13634      VAR_CPU_ENDIAN=big
13635      ;;
13636    powerpc64le)
13637      VAR_CPU=ppc64
13638      VAR_CPU_ARCH=ppc
13639      VAR_CPU_BITS=64
13640      VAR_CPU_ENDIAN=little
13641      ;;
13642    s390)
13643      VAR_CPU=s390
13644      VAR_CPU_ARCH=s390
13645      VAR_CPU_BITS=32
13646      VAR_CPU_ENDIAN=big
13647      ;;
13648    s390x)
13649      VAR_CPU=s390x
13650      VAR_CPU_ARCH=s390
13651      VAR_CPU_BITS=64
13652      VAR_CPU_ENDIAN=big
13653      ;;
13654    sparc)
13655      VAR_CPU=sparc
13656      VAR_CPU_ARCH=sparc
13657      VAR_CPU_BITS=32
13658      VAR_CPU_ENDIAN=big
13659      ;;
13660    sparcv9|sparc64)
13661      VAR_CPU=sparcv9
13662      VAR_CPU_ARCH=sparc
13663      VAR_CPU_BITS=64
13664      VAR_CPU_ENDIAN=big
13665      ;;
13666    *)
13667      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13668      ;;
13669  esac
13670
13671  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13672  OPENJDK_BUILD_OS="$VAR_OS"
13673  if test "x$VAR_OS_TYPE" != x; then
13674    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13675  else
13676    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13677  fi
13678  if test "x$VAR_OS_ENV" != x; then
13679    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13680  else
13681    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13682  fi
13683  OPENJDK_BUILD_CPU="$VAR_CPU"
13684  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13685  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13686  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13687
13688
13689
13690
13691
13692
13693
13694
13695  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13696$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13698$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13699
13700  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13701
13702  case "$host_os" in
13703    *linux*)
13704      VAR_OS=linux
13705      VAR_OS_TYPE=unix
13706      ;;
13707    *solaris*)
13708      VAR_OS=solaris
13709      VAR_OS_TYPE=unix
13710      ;;
13711    *darwin*)
13712      VAR_OS=macosx
13713      VAR_OS_TYPE=unix
13714      ;;
13715    *bsd*)
13716      VAR_OS=bsd
13717      VAR_OS_TYPE=unix
13718      ;;
13719    *cygwin*)
13720      VAR_OS=windows
13721      VAR_OS_ENV=windows.cygwin
13722      ;;
13723    *mingw*)
13724      VAR_OS=windows
13725      VAR_OS_ENV=windows.msys
13726      ;;
13727    *aix*)
13728      VAR_OS=aix
13729      VAR_OS_TYPE=unix
13730      ;;
13731    *)
13732      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13733      ;;
13734  esac
13735
13736
13737  # First argument is the cpu name from the trip/quad
13738  case "$host_cpu" in
13739    x86_64)
13740      VAR_CPU=x86_64
13741      VAR_CPU_ARCH=x86
13742      VAR_CPU_BITS=64
13743      VAR_CPU_ENDIAN=little
13744      ;;
13745    i?86)
13746      VAR_CPU=x86
13747      VAR_CPU_ARCH=x86
13748      VAR_CPU_BITS=32
13749      VAR_CPU_ENDIAN=little
13750      ;;
13751    arm*)
13752      VAR_CPU=arm
13753      VAR_CPU_ARCH=arm
13754      VAR_CPU_BITS=32
13755      VAR_CPU_ENDIAN=little
13756      ;;
13757    aarch64)
13758      VAR_CPU=aarch64
13759      VAR_CPU_ARCH=aarch64
13760      VAR_CPU_BITS=64
13761      VAR_CPU_ENDIAN=little
13762      ;;
13763    powerpc)
13764      VAR_CPU=ppc
13765      VAR_CPU_ARCH=ppc
13766      VAR_CPU_BITS=32
13767      VAR_CPU_ENDIAN=big
13768      ;;
13769    powerpc64)
13770      VAR_CPU=ppc64
13771      VAR_CPU_ARCH=ppc
13772      VAR_CPU_BITS=64
13773      VAR_CPU_ENDIAN=big
13774      ;;
13775    powerpc64le)
13776      VAR_CPU=ppc64
13777      VAR_CPU_ARCH=ppc
13778      VAR_CPU_BITS=64
13779      VAR_CPU_ENDIAN=little
13780      ;;
13781    s390)
13782      VAR_CPU=s390
13783      VAR_CPU_ARCH=s390
13784      VAR_CPU_BITS=32
13785      VAR_CPU_ENDIAN=big
13786      ;;
13787    s390x)
13788      VAR_CPU=s390x
13789      VAR_CPU_ARCH=s390
13790      VAR_CPU_BITS=64
13791      VAR_CPU_ENDIAN=big
13792      ;;
13793    sparc)
13794      VAR_CPU=sparc
13795      VAR_CPU_ARCH=sparc
13796      VAR_CPU_BITS=32
13797      VAR_CPU_ENDIAN=big
13798      ;;
13799    sparcv9|sparc64)
13800      VAR_CPU=sparcv9
13801      VAR_CPU_ARCH=sparc
13802      VAR_CPU_BITS=64
13803      VAR_CPU_ENDIAN=big
13804      ;;
13805    *)
13806      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13807      ;;
13808  esac
13809
13810  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13811  OPENJDK_TARGET_OS="$VAR_OS"
13812  if test "x$VAR_OS_TYPE" != x; then
13813    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13814  else
13815    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13816  fi
13817  if test "x$VAR_OS_ENV" != x; then
13818    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13819  else
13820    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13821  fi
13822  OPENJDK_TARGET_CPU="$VAR_CPU"
13823  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13824  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13825  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13826
13827
13828
13829
13830
13831
13832
13833
13834  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13835$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13837$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13838
13839
13840
13841# Check whether --with-target-bits was given.
13842if test "${with_target_bits+set}" = set; then :
13843  withval=$with_target_bits;
13844fi
13845
13846
13847  # We have three types of compiles:
13848  # native  == normal compilation, target system == build system
13849  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13850  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13851  #
13852  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13853    # We're doing a proper cross-compilation
13854    COMPILE_TYPE="cross"
13855  else
13856    COMPILE_TYPE="native"
13857  fi
13858
13859  if test "x$with_target_bits" != x; then
13860    if test "x$COMPILE_TYPE" = "xcross"; then
13861      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13862    fi
13863
13864    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13865      # A reduced build is requested
13866      COMPILE_TYPE="reduced"
13867      OPENJDK_TARGET_CPU_BITS=32
13868      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13869        OPENJDK_TARGET_CPU=x86
13870      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13871        OPENJDK_TARGET_CPU=sparc
13872      else
13873        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13874      fi
13875    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13876      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
13877    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13878      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13879$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13880    else
13881      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13882    fi
13883  fi
13884
13885
13886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13887$as_echo_n "checking compilation type... " >&6; }
13888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13889$as_echo "$COMPILE_TYPE" >&6; }
13890
13891
13892  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13893    REQUIRED_OS_NAME=SunOS
13894    REQUIRED_OS_VERSION=5.10
13895  fi
13896  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13897    REQUIRED_OS_NAME=Linux
13898    REQUIRED_OS_VERSION=2.6
13899  fi
13900  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13901    REQUIRED_OS_NAME=Windows
13902    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13903      REQUIRED_OS_VERSION=5.2
13904    else
13905      REQUIRED_OS_VERSION=5.1
13906    fi
13907  fi
13908  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13909    REQUIRED_OS_NAME=Darwin
13910    REQUIRED_OS_VERSION=11.2
13911  fi
13912
13913
13914
13915
13916
13917  # Also store the legacy naming of the cpu.
13918  # Ie i586 and amd64 instead of x86 and x86_64
13919  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13920  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13921    OPENJDK_TARGET_CPU_LEGACY="i586"
13922  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13923    # On all platforms except MacOSX replace x86_64 with amd64.
13924    OPENJDK_TARGET_CPU_LEGACY="amd64"
13925  fi
13926
13927
13928  # And the second legacy naming of the cpu.
13929  # Ie i386 and amd64 instead of x86 and x86_64.
13930  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13931  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13932    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13933  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13934    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13935  fi
13936
13937
13938  # This is the name of the cpu (but using i386 and amd64 instead of
13939  # x86 and x86_64, respectively), preceeded by a /, to be used when
13940  # locating libraries. On macosx, it's empty, though.
13941  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13942  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13943    OPENJDK_TARGET_CPU_LIBDIR=""
13944  fi
13945
13946
13947  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13948  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13949  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13950  OPENJDK_TARGET_CPU_ISADIR=""
13951  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13952    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13953      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13954    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13955      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13956    fi
13957  fi
13958
13959
13960  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13961  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13962  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13963    # On linux only, we replace x86 with i386.
13964    OPENJDK_TARGET_CPU_OSARCH="i386"
13965  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13966    # On all platforms except macosx, we replace x86_64 with amd64.
13967    OPENJDK_TARGET_CPU_OSARCH="amd64"
13968  fi
13969
13970
13971  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13972  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13973    OPENJDK_TARGET_CPU_JLI="i386"
13974  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13975    # On all platforms except macosx, we replace x86_64 with amd64.
13976    OPENJDK_TARGET_CPU_JLI="amd64"
13977  fi
13978  # Now setup the -D flags for building libjli.
13979  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13980  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13981    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13982      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13983    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13984      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13985    fi
13986  fi
13987
13988
13989  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13990      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13991  else
13992      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13993  fi
13994
13995
13996  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13997    A_LP64="LP64:="
13998    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13999    # unpack200.exe
14000    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14001      ADD_LP64="-D_LP64=1"
14002    fi
14003  fi
14004  LP64=$A_LP64
14005
14006
14007  if test "x$COMPILE_TYPE" = "xcross"; then
14008    # FIXME: ... or should this include reduced builds..?
14009    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14010  else
14011    DEFINE_CROSS_COMPILE_ARCH=""
14012  fi
14013
14014
14015  # ZERO_ARCHDEF is used to enable architecture-specific code
14016  case "${OPENJDK_TARGET_CPU}" in
14017    ppc)     ZERO_ARCHDEF=PPC32 ;;
14018    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14019    s390*)   ZERO_ARCHDEF=S390  ;;
14020    sparc*)  ZERO_ARCHDEF=SPARC ;;
14021    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14022    x86)     ZERO_ARCHDEF=IA32  ;;
14023    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14024  esac
14025
14026
14027
14028
14029# Continue setting up basic stuff. Most remaining code require fundamental tools.
14030
14031  # Save the current directory this script was started from
14032  CURDIR="$PWD"
14033
14034  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14035    PATH_SEP=";"
14036
14037  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14038  if test $SRC_ROOT_LENGTH -gt 100; then
14039    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14040  fi
14041
14042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14044$as_echo_n "checking cygwin release... " >&6; }
14045    CYGWIN_VERSION=`$UNAME -r`
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14047$as_echo "$CYGWIN_VERSION" >&6; }
14048    WINDOWS_ENV_VENDOR='cygwin'
14049    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14050
14051    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
14052    if test "x$CYGWIN_VERSION_OLD" != x; then
14053      { $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
14054$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;}
14055      as_fn_error $? "Cannot continue" "$LINENO" 5
14056    fi
14057    if test "x$CYGPATH" = x; then
14058      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14059    fi
14060    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14061$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14062    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14063    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14064    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14065    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14067$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14068    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14069    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14070    if test "x$test_cygdrive_prefix" = x; then
14071      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14072    fi
14073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14074    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14075$as_echo_n "checking msys release... " >&6; }
14076    MSYS_VERSION=`$UNAME -r`
14077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14078$as_echo "$MSYS_VERSION" >&6; }
14079
14080    WINDOWS_ENV_VENDOR='msys'
14081    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14082
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14084$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14085    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14086    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14087
14088  windows_path="$MSYS_ROOT_PATH"
14089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14090    unix_path=`$CYGPATH -u "$windows_path"`
14091    MSYS_ROOT_PATH="$unix_path"
14092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14094    MSYS_ROOT_PATH="$unix_path"
14095  fi
14096
14097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14098$as_echo "$MSYS_ROOT_PATH" >&6; }
14099    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14100  else
14101    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14102  fi
14103
14104  # Test if windows or unix (cygwin/msys) find is first in path.
14105  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14106$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14107  FIND_BINARY_OUTPUT=`find --version 2>&1`
14108  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14110$as_echo "unix style" >&6; }
14111  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14112    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14113$as_echo "Windows" >&6; }
14114    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14115$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14116    { $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
14117$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14118    as_fn_error $? "Cannot continue" "$LINENO" 5
14119  else
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14121$as_echo "unknown" >&6; }
14122    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14123$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14124  fi
14125
14126  else
14127    PATH_SEP=":"
14128  fi
14129
14130
14131  # We get the top-level directory from the supporting wrappers.
14132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14133$as_echo_n "checking for top-level directory... " >&6; }
14134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14135$as_echo "$TOPDIR" >&6; }
14136
14137
14138  # Save the original version of TOPDIR for string comparisons
14139  ORIGINAL_TOPDIR="$TOPDIR"
14140
14141
14142  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14143
14144  # Only process if variable expands to non-empty
14145
14146  if test "x$CURDIR" != x; then
14147    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14148
14149  # Input might be given as Windows format, start by converting to
14150  # unix format.
14151  path="$CURDIR"
14152  new_path=`$CYGPATH -u "$path"`
14153
14154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14157  # "foo.exe" is OK but "foo" is an error.
14158  #
14159  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14160  # It is also a way to make sure we got the proper file name for the real test later on.
14161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14162  if test "x$test_shortpath" = x; then
14163    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14164$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14165    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14166  fi
14167
14168  # Call helper function which possibly converts this using DOS-style short mode.
14169  # If so, the updated path is stored in $new_path.
14170
14171  input_path="$new_path"
14172  # Check if we need to convert this using DOS-style short mode. If the path
14173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14174  # take no chances and rewrite it.
14175  # Note: m4 eats our [], so we need to use [ and ] instead.
14176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14177  if test "x$has_forbidden_chars" != x; then
14178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14179    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14180    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14181    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14182      # Going to short mode and back again did indeed matter. Since short mode is
14183      # case insensitive, let's make it lowercase to improve readability.
14184      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14185      # Now convert it back to Unix-style (cygpath)
14186      input_path=`$CYGPATH -u "$shortmode_path"`
14187      new_path="$input_path"
14188    fi
14189  fi
14190
14191  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14192  if test "x$test_cygdrive_prefix" = x; then
14193    # As a simple fix, exclude /usr/bin since it's not a real path.
14194    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14195      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14196      # a path prefixed by /cygdrive for fixpath to work.
14197      new_path="$CYGWIN_ROOT_PATH$input_path"
14198    fi
14199  fi
14200
14201
14202  if test "x$path" != "x$new_path"; then
14203    CURDIR="$new_path"
14204    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14205$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14206  fi
14207
14208    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14209
14210  path="$CURDIR"
14211  has_colon=`$ECHO $path | $GREP ^.:`
14212  new_path="$path"
14213  if test "x$has_colon" = x; then
14214    # Not in mixed or Windows style, start by that.
14215    new_path=`cmd //c echo $path`
14216  fi
14217
14218
14219  input_path="$new_path"
14220  # Check if we need to convert this using DOS-style short mode. If the path
14221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14222  # take no chances and rewrite it.
14223  # Note: m4 eats our [], so we need to use [ and ] instead.
14224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14225  if test "x$has_forbidden_chars" != x; then
14226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14228  fi
14229
14230
14231  windows_path="$new_path"
14232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14233    unix_path=`$CYGPATH -u "$windows_path"`
14234    new_path="$unix_path"
14235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14237    new_path="$unix_path"
14238  fi
14239
14240  if test "x$path" != "x$new_path"; then
14241    CURDIR="$new_path"
14242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14243$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14244  fi
14245
14246  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14247  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14248
14249    else
14250      # We're on a unix platform. Hooray! :)
14251      path="$CURDIR"
14252      has_space=`$ECHO "$path" | $GREP " "`
14253      if test "x$has_space" != x; then
14254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14255$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14256        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14257      fi
14258
14259      # Use eval to expand a potential ~
14260      eval path="$path"
14261      if test ! -f "$path" && test ! -d "$path"; then
14262        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14263      fi
14264
14265      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14266    fi
14267  fi
14268
14269
14270  # Only process if variable expands to non-empty
14271
14272  if test "x$TOPDIR" != x; then
14273    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14274
14275  # Input might be given as Windows format, start by converting to
14276  # unix format.
14277  path="$TOPDIR"
14278  new_path=`$CYGPATH -u "$path"`
14279
14280  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14281  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14282  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14283  # "foo.exe" is OK but "foo" is an error.
14284  #
14285  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14286  # It is also a way to make sure we got the proper file name for the real test later on.
14287  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14288  if test "x$test_shortpath" = x; then
14289    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14290$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14291    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14292  fi
14293
14294  # Call helper function which possibly converts this using DOS-style short mode.
14295  # If so, the updated path is stored in $new_path.
14296
14297  input_path="$new_path"
14298  # Check if we need to convert this using DOS-style short mode. If the path
14299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14300  # take no chances and rewrite it.
14301  # Note: m4 eats our [], so we need to use [ and ] instead.
14302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14303  if test "x$has_forbidden_chars" != x; then
14304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14305    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14306    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14307    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14308      # Going to short mode and back again did indeed matter. Since short mode is
14309      # case insensitive, let's make it lowercase to improve readability.
14310      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14311      # Now convert it back to Unix-style (cygpath)
14312      input_path=`$CYGPATH -u "$shortmode_path"`
14313      new_path="$input_path"
14314    fi
14315  fi
14316
14317  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14318  if test "x$test_cygdrive_prefix" = x; then
14319    # As a simple fix, exclude /usr/bin since it's not a real path.
14320    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14321      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14322      # a path prefixed by /cygdrive for fixpath to work.
14323      new_path="$CYGWIN_ROOT_PATH$input_path"
14324    fi
14325  fi
14326
14327
14328  if test "x$path" != "x$new_path"; then
14329    TOPDIR="$new_path"
14330    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14331$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14332  fi
14333
14334    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14335
14336  path="$TOPDIR"
14337  has_colon=`$ECHO $path | $GREP ^.:`
14338  new_path="$path"
14339  if test "x$has_colon" = x; then
14340    # Not in mixed or Windows style, start by that.
14341    new_path=`cmd //c echo $path`
14342  fi
14343
14344
14345  input_path="$new_path"
14346  # Check if we need to convert this using DOS-style short mode. If the path
14347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14348  # take no chances and rewrite it.
14349  # Note: m4 eats our [], so we need to use [ and ] instead.
14350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14351  if test "x$has_forbidden_chars" != x; then
14352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14353    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14354  fi
14355
14356
14357  windows_path="$new_path"
14358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14359    unix_path=`$CYGPATH -u "$windows_path"`
14360    new_path="$unix_path"
14361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14363    new_path="$unix_path"
14364  fi
14365
14366  if test "x$path" != "x$new_path"; then
14367    TOPDIR="$new_path"
14368    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14369$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14370  fi
14371
14372  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14373  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14374
14375    else
14376      # We're on a unix platform. Hooray! :)
14377      path="$TOPDIR"
14378      has_space=`$ECHO "$path" | $GREP " "`
14379      if test "x$has_space" != x; then
14380        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14381$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14382        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14383      fi
14384
14385      # Use eval to expand a potential ~
14386      eval path="$path"
14387      if test ! -f "$path" && test ! -d "$path"; then
14388        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14389      fi
14390
14391      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14392    fi
14393  fi
14394
14395  # SRC_ROOT is a traditional alias for TOPDIR.
14396  SRC_ROOT=$TOPDIR
14397
14398  # Calculate a canonical version of TOPDIR for string comparisons
14399  CANONICAL_TOPDIR=$TOPDIR
14400
14401  if test "x$OPENJDK_BUILD_OS" != xwindows; then
14402    # Follow a chain of symbolic links. Use readlink
14403    # where it exists, else fall back to horribly
14404    # complicated shell code.
14405    if test "x$READLINK_TESTED" != yes; then
14406      # On MacOSX there is a readlink tool with a different
14407      # purpose than the GNU readlink tool. Check the found readlink.
14408      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
14409      if test "x$ISGNU" = x; then
14410        # A readlink that we do not know how to use.
14411        # Are there other non-GNU readlinks out there?
14412        READLINK_TESTED=yes
14413        READLINK=
14414      fi
14415    fi
14416
14417    if test "x$READLINK" != x; then
14418      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
14419    else
14420      # Save the current directory for restoring afterwards
14421      STARTDIR=$PWD
14422      COUNTER=0
14423      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
14424      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
14425      cd $sym_link_dir
14426      # Use -P flag to resolve symlinks in directories.
14427      cd `$THEPWDCMD -P`
14428      sym_link_dir=`$THEPWDCMD -P`
14429      # Resolve file symlinks
14430      while test $COUNTER -lt 20; do
14431        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
14432        if test "x$ISLINK" == x; then
14433          # This is not a symbolic link! We are done!
14434          break
14435        fi
14436        # Again resolve directory symlinks since the target of the just found
14437        # link could be in a different directory
14438        cd `$DIRNAME $ISLINK`
14439        sym_link_dir=`$THEPWDCMD -P`
14440        sym_link_file=`$BASENAME $ISLINK`
14441        let COUNTER=COUNTER+1
14442      done
14443      cd $STARTDIR
14444      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
14445    fi
14446  fi
14447
14448
14449
14450  # Locate the directory of this script.
14451  AUTOCONF_DIR=$TOPDIR/common/autoconf
14452
14453
14454# Check if it's a pure open build or if custom sources are to be used.
14455
14456  # Check whether --enable-openjdk-only was given.
14457if test "${enable_openjdk_only+set}" = set; then :
14458  enableval=$enable_openjdk_only;
14459else
14460  enable_openjdk_only="no"
14461fi
14462
14463
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14465$as_echo_n "checking for presence of closed sources... " >&6; }
14466  if test -d "$SRC_ROOT/jdk/src/closed"; then
14467    CLOSED_SOURCE_PRESENT=yes
14468  else
14469    CLOSED_SOURCE_PRESENT=no
14470  fi
14471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14472$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14473
14474  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14475$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14476  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14478$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14479
14480  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14481    OPENJDK=true
14482    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14483      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14484$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14485    fi
14486  else
14487    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14488      OPENJDK=true
14489    else
14490      OPENJDK=false
14491    fi
14492  fi
14493
14494  if test "x$OPENJDK" = "xtrue"; then
14495    SET_OPENJDK="OPENJDK=true"
14496  fi
14497
14498
14499
14500  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14501  # the IncludeCustomExtension macro.
14502
14503
14504# Check whether --with-custom-make-dir was given.
14505if test "${with_custom_make_dir+set}" = set; then :
14506  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
14507$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14508fi
14509
14510
14511
14512
14513# These are needed to be able to create a configuration name (and thus the output directory)
14514
14515  ###############################################################################
14516  #
14517  # Check which variant of the JDK that we want to build.
14518  # Currently we have:
14519  #    normal:   standard edition
14520  # but the custom make system may add other variants
14521  #
14522  # Effectively the JDK variant gives a name to a specific set of
14523  # modules to compile into the JDK. In the future, these modules
14524  # might even be Jigsaw modules.
14525  #
14526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14527$as_echo_n "checking which variant of the JDK to build... " >&6; }
14528
14529# Check whether --with-jdk-variant was given.
14530if test "${with_jdk_variant+set}" = set; then :
14531  withval=$with_jdk_variant;
14532fi
14533
14534
14535  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14536    JDK_VARIANT="normal"
14537  else
14538    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14539  fi
14540
14541
14542
14543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14544$as_echo "$JDK_VARIANT" >&6; }
14545
14546
14547###############################################################################
14548#
14549# Check which interpreter of the JVM we want to build.
14550# Currently we have:
14551#    template: Template interpreter (the default)
14552#    cpp     : C++ interpreter
14553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14554$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14555
14556# Check whether --with-jvm-interpreter was given.
14557if test "${with_jvm_interpreter+set}" = set; then :
14558  withval=$with_jvm_interpreter;
14559fi
14560
14561
14562if test "x$with_jvm_interpreter" = x; then
14563     with_jvm_interpreter="template"
14564fi
14565
14566JVM_INTERPRETER="$with_jvm_interpreter"
14567
14568if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14569   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14570fi
14571
14572
14573
14574{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14575$as_echo "$with_jvm_interpreter" >&6; }
14576
14577
14578
14579  ###############################################################################
14580  #
14581  # Check which variants of the JVM that we want to build.
14582  # Currently we have:
14583  #    server: normal interpreter and a tiered C1/C2 compiler
14584  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14585  #    minimal1: reduced form of client with optional VM services and features stripped out
14586  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14587  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14588  #    zero: no machine code interpreter, no compiler
14589  #    zeroshark: zero interpreter and shark/llvm compiler backend
14590#    core: interpreter only, no compiler (only works on some platforms)
14591  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14592$as_echo_n "checking which variants of the JVM to build... " >&6; }
14593
14594# Check whether --with-jvm-variants was given.
14595if test "${with_jvm_variants+set}" = set; then :
14596  withval=$with_jvm_variants;
14597fi
14598
14599
14600  if test "x$with_jvm_variants" = x; then
14601    with_jvm_variants="server"
14602  fi
14603
14604  JVM_VARIANTS=",$with_jvm_variants,"
14605  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,//'`
14606
14607  if test "x$TEST_VARIANTS" != "x,"; then
14608     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14609  fi
14610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14611$as_echo "$with_jvm_variants" >&6; }
14612
14613  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14614  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14615  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14616  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14617  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14618  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14619  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14620
14621  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14622    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14623      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14624    fi
14625  fi
14626  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14627    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14628      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14629    fi
14630  fi
14631  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14632    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14633      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14634    fi
14635  fi
14636
14637  # Replace the commas with AND for use in the build directory name.
14638  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14639  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/'`
14640  if test "x$COUNT_VARIANTS" != "x,1"; then
14641    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14642  else
14643    BUILDING_MULTIPLE_JVM_VARIANTS=no
14644  fi
14645
14646
14647
14648
14649
14650
14651
14652
14653
14654
14655  INCLUDE_SA=true
14656  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14657    INCLUDE_SA=false
14658  fi
14659  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14660    INCLUDE_SA=false
14661  fi
14662  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14663    INCLUDE_SA=false
14664  fi
14665  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14666    INCLUDE_SA=false
14667  fi
14668
14669
14670  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14671    MACOSX_UNIVERSAL="true"
14672  fi
14673
14674
14675
14676
14677  ###############################################################################
14678  #
14679  # Set the debug level
14680  #    release: no debug information, all optimizations, no asserts.
14681  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14682  #    fastdebug: debug information (-g), all optimizations, all asserts
14683  #    slowdebug: debug information (-g), no optimizations, all asserts
14684  #
14685  DEBUG_LEVEL="release"
14686  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14687$as_echo_n "checking which debug level to use... " >&6; }
14688  # Check whether --enable-debug was given.
14689if test "${enable_debug+set}" = set; then :
14690  enableval=$enable_debug;
14691        ENABLE_DEBUG="${enableval}"
14692        DEBUG_LEVEL="fastdebug"
14693
14694else
14695  ENABLE_DEBUG="no"
14696fi
14697
14698
14699
14700# Check whether --with-debug-level was given.
14701if test "${with_debug_level+set}" = set; then :
14702  withval=$with_debug_level;
14703        DEBUG_LEVEL="${withval}"
14704        if test "x$ENABLE_DEBUG" = xyes; then
14705          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14706        fi
14707
14708fi
14709
14710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14711$as_echo "$DEBUG_LEVEL" >&6; }
14712
14713  if test "x$DEBUG_LEVEL" != xrelease && \
14714      test "x$DEBUG_LEVEL" != xoptimized && \
14715      test "x$DEBUG_LEVEL" != xfastdebug && \
14716      test "x$DEBUG_LEVEL" != xslowdebug; then
14717    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14718  fi
14719
14720
14721  ###############################################################################
14722  #
14723  # Setup legacy vars/targets and new vars to deal with different debug levels.
14724  #
14725
14726  case $DEBUG_LEVEL in
14727    release )
14728      VARIANT="OPT"
14729      FASTDEBUG="false"
14730      DEBUG_CLASSFILES="false"
14731      BUILD_VARIANT_RELEASE=""
14732      HOTSPOT_DEBUG_LEVEL="product"
14733      HOTSPOT_EXPORT="product"
14734      ;;
14735    fastdebug )
14736      VARIANT="DBG"
14737      FASTDEBUG="true"
14738      DEBUG_CLASSFILES="true"
14739      BUILD_VARIANT_RELEASE="-fastdebug"
14740      HOTSPOT_DEBUG_LEVEL="fastdebug"
14741      HOTSPOT_EXPORT="fastdebug"
14742      ;;
14743    slowdebug )
14744      VARIANT="DBG"
14745      FASTDEBUG="false"
14746      DEBUG_CLASSFILES="true"
14747      BUILD_VARIANT_RELEASE="-debug"
14748      HOTSPOT_DEBUG_LEVEL="debug"
14749      HOTSPOT_EXPORT="debug"
14750      ;;
14751    optimized )
14752      VARIANT="OPT"
14753      FASTDEBUG="false"
14754      DEBUG_CLASSFILES="false"
14755      BUILD_VARIANT_RELEASE="-optimized"
14756      HOTSPOT_DEBUG_LEVEL="optimized"
14757      HOTSPOT_EXPORT="optimized"
14758      ;;
14759  esac
14760
14761  # The debug level 'optimized' is a little special because it is currently only
14762  # applicable to the HotSpot build where it means to build a completely
14763  # optimized version of the VM without any debugging code (like for the
14764  # 'release' debug level which is called 'product' in the HotSpot build) but
14765  # with the exception that it can contain additional code which is otherwise
14766  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14767  # test new and/or experimental features which are not intended for customer
14768  # shipment. Because these new features need to be tested and benchmarked in
14769  # real world scenarios, we want to build the containing JDK at the 'release'
14770  # debug level.
14771  if test "x$DEBUG_LEVEL" = xoptimized; then
14772    DEBUG_LEVEL="release"
14773  fi
14774
14775  #####
14776  # Generate the legacy makefile targets for hotspot.
14777  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14778  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14779  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14780  # But until then ...
14781  HOTSPOT_TARGET=""
14782
14783  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14784    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14785  fi
14786
14787  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14788    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14789  fi
14790
14791  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14792    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14793  fi
14794
14795  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14796    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14797  fi
14798
14799  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14800    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14801  fi
14802
14803  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14804    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14805  fi
14806
14807  if test "x$JVM_VARIANT_CORE" = xtrue; then
14808    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14809  fi
14810
14811  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14812
14813  # On Macosx universal binaries are produced, but they only contain
14814  # 64 bit intel. This invalidates control of which jvms are built
14815  # from configure, but only server is valid anyway. Fix this
14816  # when hotspot makefiles are rewritten.
14817  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14818    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14819  fi
14820
14821  #####
14822
14823
14824
14825
14826
14827
14828
14829
14830# With basic setup done, call the custom early hook.
14831
14832
14833# Check if we have devkits, extra paths or sysroot set.
14834
14835
14836# Check whether --with-devkit was given.
14837if test "${with_devkit+set}" = set; then :
14838  withval=$with_devkit;
14839
14840  # Only process if variable expands to non-empty
14841
14842  if test "x$with_devkit" != x; then
14843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14844
14845  # Input might be given as Windows format, start by converting to
14846  # unix format.
14847  path="$with_devkit"
14848  new_path=`$CYGPATH -u "$path"`
14849
14850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14853  # "foo.exe" is OK but "foo" is an error.
14854  #
14855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14856  # It is also a way to make sure we got the proper file name for the real test later on.
14857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14858  if test "x$test_shortpath" = x; then
14859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14860$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14861    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14862  fi
14863
14864  # Call helper function which possibly converts this using DOS-style short mode.
14865  # If so, the updated path is stored in $new_path.
14866
14867  input_path="$new_path"
14868  # Check if we need to convert this using DOS-style short mode. If the path
14869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14870  # take no chances and rewrite it.
14871  # Note: m4 eats our [], so we need to use [ and ] instead.
14872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14873  if test "x$has_forbidden_chars" != x; then
14874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14878      # Going to short mode and back again did indeed matter. Since short mode is
14879      # case insensitive, let's make it lowercase to improve readability.
14880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14881      # Now convert it back to Unix-style (cygpath)
14882      input_path=`$CYGPATH -u "$shortmode_path"`
14883      new_path="$input_path"
14884    fi
14885  fi
14886
14887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14888  if test "x$test_cygdrive_prefix" = x; then
14889    # As a simple fix, exclude /usr/bin since it's not a real path.
14890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14892      # a path prefixed by /cygdrive for fixpath to work.
14893      new_path="$CYGWIN_ROOT_PATH$input_path"
14894    fi
14895  fi
14896
14897
14898  if test "x$path" != "x$new_path"; then
14899    with_devkit="$new_path"
14900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14901$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14902  fi
14903
14904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14905
14906  path="$with_devkit"
14907  has_colon=`$ECHO $path | $GREP ^.:`
14908  new_path="$path"
14909  if test "x$has_colon" = x; then
14910    # Not in mixed or Windows style, start by that.
14911    new_path=`cmd //c echo $path`
14912  fi
14913
14914
14915  input_path="$new_path"
14916  # Check if we need to convert this using DOS-style short mode. If the path
14917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14918  # take no chances and rewrite it.
14919  # Note: m4 eats our [], so we need to use [ and ] instead.
14920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14921  if test "x$has_forbidden_chars" != x; then
14922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14924  fi
14925
14926
14927  windows_path="$new_path"
14928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14929    unix_path=`$CYGPATH -u "$windows_path"`
14930    new_path="$unix_path"
14931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14933    new_path="$unix_path"
14934  fi
14935
14936  if test "x$path" != "x$new_path"; then
14937    with_devkit="$new_path"
14938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14939$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14940  fi
14941
14942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14944
14945    else
14946      # We're on a unix platform. Hooray! :)
14947      path="$with_devkit"
14948      has_space=`$ECHO "$path" | $GREP " "`
14949      if test "x$has_space" != x; then
14950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14951$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14953      fi
14954
14955      # Use eval to expand a potential ~
14956      eval path="$path"
14957      if test ! -f "$path" && test ! -d "$path"; then
14958        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14959      fi
14960
14961      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14962    fi
14963  fi
14964
14965        DEVKIT_ROOT="$with_devkit"
14966        # Check for a meta data info file in the root of the devkit
14967        if test -f "$DEVKIT_ROOT/devkit.info"; then
14968          . $DEVKIT_ROOT/devkit.info
14969          # This potentially sets the following:
14970          # A descriptive name of the devkit
14971
14972  if test "x$DEVKIT_NAME" = x; then
14973    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
14974  fi
14975
14976          # Corresponds to --with-extra-path
14977
14978  if test "x$DEVKIT_EXTRA_PATH" = x; then
14979    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
14980  fi
14981
14982          # Corresponds to --with-toolchain-path
14983
14984  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14985    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
14986  fi
14987
14988          # Corresponds to --with-sysroot
14989
14990  if test "x$DEVKIT_SYSROOT" = x; then
14991    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
14992  fi
14993
14994
14995          # Identifies the Visual Studio version in the devkit
14996
14997  if test "x$DEVKIT_VS_VERSION" = x; then
14998    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
14999  fi
15000
15001          # The Visual Studio include environment variable
15002
15003  if test "x$DEVKIT_VS_INCLUDE" = x; then
15004    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
15005  fi
15006
15007          # The Visual Studio lib environment variable
15008
15009  if test "x$DEVKIT_VS_LIB" = x; then
15010    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
15011  fi
15012
15013          # Corresponds to --with-msvcr-dll
15014
15015  if test "x$DEVKIT_MSVCR_DLL" = x; then
15016    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
15017  fi
15018
15019          # Corresponds to --with-msvcp-dll
15020
15021  if test "x$DEVKIT_MSVCP_DLL" = x; then
15022    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
15023  fi
15024
15025        fi
15026
15027        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
15028$as_echo_n "checking for devkit... " >&6; }
15029        if test "x$DEVKIT_NAME" != x; then
15030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
15031$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
15032        else
15033          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
15034$as_echo "$DEVKIT_ROOT" >&6; }
15035        fi
15036
15037
15038  if test "x$DEVKIT_EXTRA_PATH" != x; then
15039    if test "x$EXTRA_PATH" = x; then
15040      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
15041    else
15042      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
15043    fi
15044  fi
15045
15046
15047        # Fallback default of just /bin if DEVKIT_PATH is not defined
15048        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
15049          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
15050        fi
15051
15052  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
15053    if test "x$TOOLCHAIN_PATH" = x; then
15054      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
15055    else
15056      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
15057    fi
15058  fi
15059
15060
15061        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
15062        # places for backwards compatiblity.
15063        if test "x$DEVKIT_SYSROOT" != x; then
15064          SYSROOT="$DEVKIT_SYSROOT"
15065        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
15066          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
15067        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
15068          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
15069        fi
15070
15071
15072fi
15073
15074
15075  # You can force the sysroot if the sysroot encoded into the compiler tools
15076  # is not correct.
15077
15078# Check whether --with-sys-root was given.
15079if test "${with_sys_root+set}" = set; then :
15080  withval=$with_sys_root; SYSROOT=$with_sys_root
15081
15082fi
15083
15084
15085
15086# Check whether --with-sysroot was given.
15087if test "${with_sysroot+set}" = set; then :
15088  withval=$with_sysroot; SYSROOT=$with_sysroot
15089
15090fi
15091
15092
15093
15094# Check whether --with-tools-dir was given.
15095if test "${with_tools_dir+set}" = set; then :
15096  withval=$with_tools_dir;
15097  if test "x$with_tools_dir" != x; then
15098    if test "x$TOOLCHAIN_PATH" = x; then
15099      TOOLCHAIN_PATH="$with_tools_dir"
15100    else
15101      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15102    fi
15103  fi
15104
15105
15106fi
15107
15108
15109
15110# Check whether --with-toolchain-path was given.
15111if test "${with_toolchain_path+set}" = set; then :
15112  withval=$with_toolchain_path;
15113  if test "x$with_toolchain_path" != x; then
15114    if test "x$TOOLCHAIN_PATH" = x; then
15115      TOOLCHAIN_PATH="$with_toolchain_path"
15116    else
15117      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15118    fi
15119  fi
15120
15121
15122fi
15123
15124
15125
15126# Check whether --with-extra-path was given.
15127if test "${with_extra_path+set}" = set; then :
15128  withval=$with_extra_path;
15129  if test "x$with_extra_path" != x; then
15130    if test "x$EXTRA_PATH" = x; then
15131      EXTRA_PATH="$with_extra_path"
15132    else
15133      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15134    fi
15135  fi
15136
15137
15138fi
15139
15140
15141  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15142    # detect if Xcode is installed by running xcodebuild -version
15143    # if no Xcode installed, xcodebuild exits with 1
15144    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15145    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15146      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15147      # fall back on the stub binary in /usr/bin/xcodebuild
15148      # Extract the first word of "xcodebuild", so it can be a program name with args.
15149set dummy xcodebuild; ac_word=$2
15150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15151$as_echo_n "checking for $ac_word... " >&6; }
15152if ${ac_cv_path_XCODEBUILD+:} false; then :
15153  $as_echo_n "(cached) " >&6
15154else
15155  case $XCODEBUILD in
15156  [\\/]* | ?:[\\/]*)
15157  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15158  ;;
15159  *)
15160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15161for as_dir in $TOOLCHAIN_PATH
15162do
15163  IFS=$as_save_IFS
15164  test -z "$as_dir" && as_dir=.
15165    for ac_exec_ext in '' $ac_executable_extensions; do
15166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15167    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15169    break 2
15170  fi
15171done
15172  done
15173IFS=$as_save_IFS
15174
15175  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15176  ;;
15177esac
15178fi
15179XCODEBUILD=$ac_cv_path_XCODEBUILD
15180if test -n "$XCODEBUILD"; then
15181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15182$as_echo "$XCODEBUILD" >&6; }
15183else
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15185$as_echo "no" >&6; }
15186fi
15187
15188
15189    else
15190      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15191      # when only the command line tools are installed there are no SDKs, so headers
15192      # are copied into the system frameworks
15193      XCODEBUILD=
15194
15195    fi
15196
15197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15198$as_echo_n "checking for sdk name... " >&6; }
15199
15200# Check whether --with-sdk-name was given.
15201if test "${with_sdk_name+set}" = set; then :
15202  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15203
15204fi
15205
15206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15207$as_echo "$SDKNAME" >&6; }
15208
15209    # if toolchain path is specified then don't rely on system headers, they may not compile
15210    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15211    test -z "$TOOLCHAIN_PATH" && \
15212      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15213
15214    if test -z "$SYSROOT"; then
15215      if test -n "$XCODEBUILD"; then
15216        # if we don't have system headers, use default SDK name (last resort)
15217        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15218          SDKNAME=${SDKNAME:-macosx}
15219        fi
15220
15221        if test -n "$SDKNAME"; then
15222          # Call xcodebuild to determine SYSROOT
15223          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15224        fi
15225      else
15226        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15227          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
15228        fi
15229      fi
15230    else
15231      # warn user if --with-sdk-name was also set
15232      if test -n "$with_sdk_name"; then
15233        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15234$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15235      fi
15236    fi
15237
15238    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15239      # If no system framework headers, then SYSROOT must be set, or we won't build
15240      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
15241    fi
15242
15243    # Perform a basic sanity test
15244    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15245      if test -z "$SYSROOT"; then
15246        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
15247      else
15248        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15249      fi
15250    fi
15251
15252    # set SDKROOT too, Xcode tools will pick it up
15253    SDKROOT=$SYSROOT
15254
15255  fi
15256
15257  # Prepend the extra path to the global path
15258
15259  if test "x$EXTRA_PATH" != x; then
15260    if test "x$PATH" = x; then
15261      PATH="$EXTRA_PATH"
15262    else
15263      PATH="$EXTRA_PATH:$PATH"
15264    fi
15265  fi
15266
15267
15268  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15269    # Add extra search paths on solaris for utilities like ar and as etc...
15270    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15271  fi
15272
15273  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15274$as_echo_n "checking for sysroot... " >&6; }
15275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15276$as_echo "$SYSROOT" >&6; }
15277  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15278$as_echo_n "checking for toolchain path... " >&6; }
15279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15280$as_echo "$TOOLCHAIN_PATH" >&6; }
15281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15282$as_echo_n "checking for extra path... " >&6; }
15283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15284$as_echo "$EXTRA_PATH" >&6; }
15285
15286
15287# To properly create a configuration name, we need to have the OpenJDK target
15288# and options (variants and debug level) parsed.
15289
15290
15291
15292# Check whether --with-conf-name was given.
15293if test "${with_conf_name+set}" = set; then :
15294  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15295fi
15296
15297
15298  # Test from where we are running configure, in or outside of src root.
15299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15300$as_echo_n "checking where to store configuration... " >&6; }
15301  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15302      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15303      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15304    # We are running configure from the src root.
15305    # Create a default ./build/target-variant-debuglevel output root.
15306    if test "x${CONF_NAME}" = x; then
15307      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15308$as_echo "in default location" >&6; }
15309      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15310    else
15311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15312$as_echo "in build directory with custom name" >&6; }
15313    fi
15314    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15315    $MKDIR -p "$OUTPUT_ROOT"
15316    if test ! -d "$OUTPUT_ROOT"; then
15317      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15318    fi
15319  else
15320    # We are running configure from outside of the src dir.
15321    # Then use the current directory as output dir!
15322    # If configuration is situated in normal build directory, just use the build
15323    # directory name as configuration name, otherwise use the complete path.
15324    if test "x${CONF_NAME}" = x; then
15325      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15326    fi
15327    OUTPUT_ROOT="$CURDIR"
15328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15329$as_echo "in current directory" >&6; }
15330
15331    # WARNING: This might be a bad thing to do. You need to be sure you want to
15332    # have a configuration in this directory. Do some sanity checks!
15333
15334    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15335      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15336      # other files
15337      files_present=`$LS $OUTPUT_ROOT`
15338      # Configure has already touched config.log and confdefs.h in the current dir when this check
15339      # is performed.
15340      filtered_files=`$ECHO "$files_present" \
15341          | $SED -e 's/config.log//g' \
15342	      -e 's/confdefs.h//g' \
15343	      -e 's/fixpath.exe//g' \
15344	      -e 's/ //g' \
15345          | $TR -d '\n'`
15346      if test "x$filtered_files" != x; then
15347        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15348$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15349        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15350$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15351        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15352$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15353        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15354$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15355        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15356$as_echo "$as_me: seriously mess up just about everything." >&6;}
15357        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15358$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15359        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15360$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15361        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15362      fi
15363    fi
15364  fi
15365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15366$as_echo_n "checking what configuration name to use... " >&6; }
15367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15368$as_echo "$CONF_NAME" >&6; }
15369
15370
15371  # Only process if variable expands to non-empty
15372
15373  if test "x$OUTPUT_ROOT" != x; then
15374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15375
15376  # Input might be given as Windows format, start by converting to
15377  # unix format.
15378  path="$OUTPUT_ROOT"
15379  new_path=`$CYGPATH -u "$path"`
15380
15381  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15382  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15383  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15384  # "foo.exe" is OK but "foo" is an error.
15385  #
15386  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15387  # It is also a way to make sure we got the proper file name for the real test later on.
15388  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15389  if test "x$test_shortpath" = x; then
15390    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15391$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15392    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15393  fi
15394
15395  # Call helper function which possibly converts this using DOS-style short mode.
15396  # If so, the updated path is stored in $new_path.
15397
15398  input_path="$new_path"
15399  # Check if we need to convert this using DOS-style short mode. If the path
15400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15401  # take no chances and rewrite it.
15402  # Note: m4 eats our [], so we need to use [ and ] instead.
15403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15404  if test "x$has_forbidden_chars" != x; then
15405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15409      # Going to short mode and back again did indeed matter. Since short mode is
15410      # case insensitive, let's make it lowercase to improve readability.
15411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15412      # Now convert it back to Unix-style (cygpath)
15413      input_path=`$CYGPATH -u "$shortmode_path"`
15414      new_path="$input_path"
15415    fi
15416  fi
15417
15418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15419  if test "x$test_cygdrive_prefix" = x; then
15420    # As a simple fix, exclude /usr/bin since it's not a real path.
15421    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15423      # a path prefixed by /cygdrive for fixpath to work.
15424      new_path="$CYGWIN_ROOT_PATH$input_path"
15425    fi
15426  fi
15427
15428
15429  if test "x$path" != "x$new_path"; then
15430    OUTPUT_ROOT="$new_path"
15431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15432$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15433  fi
15434
15435    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15436
15437  path="$OUTPUT_ROOT"
15438  has_colon=`$ECHO $path | $GREP ^.:`
15439  new_path="$path"
15440  if test "x$has_colon" = x; then
15441    # Not in mixed or Windows style, start by that.
15442    new_path=`cmd //c echo $path`
15443  fi
15444
15445
15446  input_path="$new_path"
15447  # Check if we need to convert this using DOS-style short mode. If the path
15448  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15449  # take no chances and rewrite it.
15450  # Note: m4 eats our [], so we need to use [ and ] instead.
15451  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15452  if test "x$has_forbidden_chars" != x; then
15453    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15454    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15455  fi
15456
15457
15458  windows_path="$new_path"
15459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15460    unix_path=`$CYGPATH -u "$windows_path"`
15461    new_path="$unix_path"
15462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15464    new_path="$unix_path"
15465  fi
15466
15467  if test "x$path" != "x$new_path"; then
15468    OUTPUT_ROOT="$new_path"
15469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15470$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15471  fi
15472
15473  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15474  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15475
15476    else
15477      # We're on a unix platform. Hooray! :)
15478      path="$OUTPUT_ROOT"
15479      has_space=`$ECHO "$path" | $GREP " "`
15480      if test "x$has_space" != x; then
15481        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15482$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15483        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15484      fi
15485
15486      # Use eval to expand a potential ~
15487      eval path="$path"
15488      if test ! -f "$path" && test ! -d "$path"; then
15489        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15490      fi
15491
15492      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15493    fi
15494  fi
15495
15496
15497  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
15498  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
15499
15500  SPEC=$OUTPUT_ROOT/spec.gmk
15501
15502  CONF_NAME=$CONF_NAME
15503
15504  OUTPUT_ROOT=$OUTPUT_ROOT
15505
15506
15507
15508  # The spec.gmk file contains all variables for the make system.
15509  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15510
15511  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15512  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15513
15514  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15515  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15516
15517  # The compare.sh is used to compare the build output to other builds.
15518  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15519
15520  # The generated Makefile knows where the spec.gmk is and where the source is.
15521  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15522  # which will look for generated configurations
15523  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15524
15525
15526
15527# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15528
15529  for ac_prog in apt-get yum port pkgutil pkgadd
15530do
15531  # Extract the first word of "$ac_prog", so it can be a program name with args.
15532set dummy $ac_prog; ac_word=$2
15533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15534$as_echo_n "checking for $ac_word... " >&6; }
15535if ${ac_cv_prog_PKGHANDLER+:} false; then :
15536  $as_echo_n "(cached) " >&6
15537else
15538  if test -n "$PKGHANDLER"; then
15539  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15540else
15541as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15542for as_dir in $PATH
15543do
15544  IFS=$as_save_IFS
15545  test -z "$as_dir" && as_dir=.
15546    for ac_exec_ext in '' $ac_executable_extensions; do
15547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15548    ac_cv_prog_PKGHANDLER="$ac_prog"
15549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15550    break 2
15551  fi
15552done
15553  done
15554IFS=$as_save_IFS
15555
15556fi
15557fi
15558PKGHANDLER=$ac_cv_prog_PKGHANDLER
15559if test -n "$PKGHANDLER"; then
15560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15561$as_echo "$PKGHANDLER" >&6; }
15562else
15563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15564$as_echo "no" >&6; }
15565fi
15566
15567
15568  test -n "$PKGHANDLER" && break
15569done
15570
15571
15572
15573# Setup tools that requires more complex handling, or that is not needed by the configure script.
15574
15575
15576  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15577  if test "x$MAKE" != x; then
15578    # User has supplied a make, test it.
15579    if test ! -f "$MAKE"; then
15580      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15581    fi
15582
15583  MAKE_CANDIDATE=""$MAKE""
15584  DESCRIPTION="user supplied MAKE=$MAKE"
15585
15586  # On Cygwin, we require a newer version of make than on other platforms
15587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15588    MAKE_VERSION_EXPR="-e 4\."
15589    MAKE_REQUIRED_VERSION="4.0"
15590   else
15591    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15592    MAKE_REQUIRED_VERSION="3.81"
15593  fi
15594
15595  if test "x$MAKE_CANDIDATE" != x; then
15596    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15597$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15598    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15599    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15600    if test "x$IS_GNU_MAKE" = x; then
15601      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15602$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15603    else
15604      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15605      if test "x$IS_MODERN_MAKE" = x; then
15606        { $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
15607$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;}
15608      else
15609        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15610          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15611            MAKE_EXPECTED_ENV='cygwin'
15612          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15613            MAKE_EXPECTED_ENV='msys'
15614          else
15615            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15616          fi
15617          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15618          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15619        else
15620          # Not relevant for non-Windows
15621          IS_MAKE_CORRECT_ENV=true
15622        fi
15623        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15624          { $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
15625$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;}
15626        else
15627          FOUND_MAKE=$MAKE_CANDIDATE
15628
15629  # Only process if variable expands to non-empty
15630
15631  if test "x$FOUND_MAKE" != x; then
15632    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15633
15634  # First separate the path from the arguments. This will split at the first
15635  # space.
15636  complete="$FOUND_MAKE"
15637  path="${complete%% *}"
15638  tmp="$complete EOL"
15639  arguments="${tmp#* }"
15640
15641  # Input might be given as Windows format, start by converting to
15642  # unix format.
15643  new_path=`$CYGPATH -u "$path"`
15644
15645  # Now try to locate executable using which
15646  new_path=`$WHICH "$new_path" 2> /dev/null`
15647  # bat and cmd files are not always considered executable in cygwin causing which
15648  # to not find them
15649  if test "x$new_path" = x \
15650      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15651      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15652    new_path=`$CYGPATH -u "$path"`
15653  fi
15654  if test "x$new_path" = x; then
15655    # Oops. Which didn't find the executable.
15656    # The splitting of arguments from the executable at a space might have been incorrect,
15657    # since paths with space are more likely in Windows. Give it another try with the whole
15658    # argument.
15659    path="$complete"
15660    arguments="EOL"
15661    new_path=`$CYGPATH -u "$path"`
15662    new_path=`$WHICH "$new_path" 2> /dev/null`
15663    # bat and cmd files are not always considered executable in cygwin causing which
15664    # to not find them
15665    if test "x$new_path" = x \
15666        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15667        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15668      new_path=`$CYGPATH -u "$path"`
15669    fi
15670    if test "x$new_path" = x; then
15671      # It's still not found. Now this is an unrecoverable error.
15672      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15673$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15674      has_space=`$ECHO "$complete" | $GREP " "`
15675      if test "x$has_space" != x; then
15676        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15677$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15678      fi
15679      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15680    fi
15681  fi
15682
15683  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15684  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15685  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15686  # "foo.exe" is OK but "foo" is an error.
15687  #
15688  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15689  # It is also a way to make sure we got the proper file name for the real test later on.
15690  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15691  if test "x$test_shortpath" = x; then
15692    # Short path failed, file does not exist as specified.
15693    # Try adding .exe or .cmd
15694    if test -f "${new_path}.exe"; then
15695      input_to_shortpath="${new_path}.exe"
15696    elif test -f "${new_path}.cmd"; then
15697      input_to_shortpath="${new_path}.cmd"
15698    else
15699      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15700$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15701      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15702$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15703      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15704    fi
15705  else
15706    input_to_shortpath="$new_path"
15707  fi
15708
15709  # Call helper function which possibly converts this using DOS-style short mode.
15710  # If so, the updated path is stored in $new_path.
15711  new_path="$input_to_shortpath"
15712
15713  input_path="$input_to_shortpath"
15714  # Check if we need to convert this using DOS-style short mode. If the path
15715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15716  # take no chances and rewrite it.
15717  # Note: m4 eats our [], so we need to use [ and ] instead.
15718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15719  if test "x$has_forbidden_chars" != x; then
15720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15724      # Going to short mode and back again did indeed matter. Since short mode is
15725      # case insensitive, let's make it lowercase to improve readability.
15726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15727      # Now convert it back to Unix-style (cygpath)
15728      input_path=`$CYGPATH -u "$shortmode_path"`
15729      new_path="$input_path"
15730    fi
15731  fi
15732
15733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15734  if test "x$test_cygdrive_prefix" = x; then
15735    # As a simple fix, exclude /usr/bin since it's not a real path.
15736    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15738      # a path prefixed by /cygdrive for fixpath to work.
15739      new_path="$CYGWIN_ROOT_PATH$input_path"
15740    fi
15741  fi
15742
15743  # remove trailing .exe if any
15744  new_path="${new_path/%.exe/}"
15745
15746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15747
15748  # First separate the path from the arguments. This will split at the first
15749  # space.
15750  complete="$FOUND_MAKE"
15751  path="${complete%% *}"
15752  tmp="$complete EOL"
15753  arguments="${tmp#* }"
15754
15755  # Input might be given as Windows format, start by converting to
15756  # unix format.
15757  new_path="$path"
15758
15759  windows_path="$new_path"
15760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15761    unix_path=`$CYGPATH -u "$windows_path"`
15762    new_path="$unix_path"
15763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15765    new_path="$unix_path"
15766  fi
15767
15768
15769  # Now try to locate executable using which
15770  new_path=`$WHICH "$new_path" 2> /dev/null`
15771
15772  if test "x$new_path" = x; then
15773    # Oops. Which didn't find the executable.
15774    # The splitting of arguments from the executable at a space might have been incorrect,
15775    # since paths with space are more likely in Windows. Give it another try with the whole
15776    # argument.
15777    path="$complete"
15778    arguments="EOL"
15779    new_path="$path"
15780
15781  windows_path="$new_path"
15782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15783    unix_path=`$CYGPATH -u "$windows_path"`
15784    new_path="$unix_path"
15785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15787    new_path="$unix_path"
15788  fi
15789
15790
15791    new_path=`$WHICH "$new_path" 2> /dev/null`
15792    # bat and cmd files are not always considered executable in MSYS causing which
15793    # to not find them
15794    if test "x$new_path" = x \
15795        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15796        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15797      new_path="$path"
15798
15799  windows_path="$new_path"
15800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15801    unix_path=`$CYGPATH -u "$windows_path"`
15802    new_path="$unix_path"
15803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15805    new_path="$unix_path"
15806  fi
15807
15808    fi
15809
15810    if test "x$new_path" = x; then
15811      # It's still not found. Now this is an unrecoverable error.
15812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15813$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15814      has_space=`$ECHO "$complete" | $GREP " "`
15815      if test "x$has_space" != x; then
15816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15818      fi
15819      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15820    fi
15821  fi
15822
15823  # Now new_path has a complete unix path to the binary
15824  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15825    # Keep paths in /bin as-is, but remove trailing .exe if any
15826    new_path="${new_path/%.exe/}"
15827    # Do not save /bin paths to all_fixpath_prefixes!
15828  else
15829    # Not in mixed or Windows style, start by that.
15830    new_path=`cmd //c echo $new_path`
15831
15832  input_path="$new_path"
15833  # Check if we need to convert this using DOS-style short mode. If the path
15834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15835  # take no chances and rewrite it.
15836  # Note: m4 eats our [], so we need to use [ and ] instead.
15837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15838  if test "x$has_forbidden_chars" != x; then
15839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15840    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15841  fi
15842
15843    # Output is in $new_path
15844
15845  windows_path="$new_path"
15846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15847    unix_path=`$CYGPATH -u "$windows_path"`
15848    new_path="$unix_path"
15849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15851    new_path="$unix_path"
15852  fi
15853
15854    # remove trailing .exe if any
15855    new_path="${new_path/%.exe/}"
15856
15857    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15858    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15859  fi
15860
15861    else
15862      # We're on a unix platform. Hooray! :)
15863      # First separate the path from the arguments. This will split at the first
15864      # space.
15865      complete="$FOUND_MAKE"
15866      path="${complete%% *}"
15867      tmp="$complete EOL"
15868      arguments="${tmp#* }"
15869
15870      # Cannot rely on the command "which" here since it doesn't always work.
15871      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15872      if test -z "$is_absolute_path"; then
15873        # Path to executable is not absolute. Find it.
15874        IFS_save="$IFS"
15875        IFS=:
15876        for p in $PATH; do
15877          if test -f "$p/$path" && test -x "$p/$path"; then
15878            new_path="$p/$path"
15879            break
15880          fi
15881        done
15882        IFS="$IFS_save"
15883      else
15884        # This is an absolute path, we can use it without further modifications.
15885        new_path="$path"
15886      fi
15887
15888      if test "x$new_path" = x; then
15889        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15890$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15891        has_space=`$ECHO "$complete" | $GREP " "`
15892        if test "x$has_space" != x; then
15893          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15894$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15895        fi
15896        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15897      fi
15898    fi
15899
15900    # Now join together the path and the arguments once again
15901    if test "x$arguments" != xEOL; then
15902      new_complete="$new_path ${arguments% *}"
15903    else
15904      new_complete="$new_path"
15905    fi
15906
15907    if test "x$complete" != "x$new_complete"; then
15908      FOUND_MAKE="$new_complete"
15909      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15910$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15911    fi
15912  fi
15913
15914        fi
15915      fi
15916    fi
15917  fi
15918
15919    if test "x$FOUND_MAKE" = x; then
15920      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
15921    fi
15922  else
15923    # Try our hardest to locate a correct version of GNU make
15924    for ac_prog in gmake
15925do
15926  # Extract the first word of "$ac_prog", so it can be a program name with args.
15927set dummy $ac_prog; ac_word=$2
15928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15929$as_echo_n "checking for $ac_word... " >&6; }
15930if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15931  $as_echo_n "(cached) " >&6
15932else
15933  case $CHECK_GMAKE in
15934  [\\/]* | ?:[\\/]*)
15935  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15936  ;;
15937  *)
15938  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15939for as_dir in $PATH
15940do
15941  IFS=$as_save_IFS
15942  test -z "$as_dir" && as_dir=.
15943    for ac_exec_ext in '' $ac_executable_extensions; do
15944  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15945    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15946    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15947    break 2
15948  fi
15949done
15950  done
15951IFS=$as_save_IFS
15952
15953  ;;
15954esac
15955fi
15956CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15957if test -n "$CHECK_GMAKE"; then
15958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15959$as_echo "$CHECK_GMAKE" >&6; }
15960else
15961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15962$as_echo "no" >&6; }
15963fi
15964
15965
15966  test -n "$CHECK_GMAKE" && break
15967done
15968
15969
15970  MAKE_CANDIDATE=""$CHECK_GMAKE""
15971  DESCRIPTION="gmake in PATH"
15972
15973  # On Cygwin, we require a newer version of make than on other platforms
15974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15975    MAKE_VERSION_EXPR="-e 4\."
15976    MAKE_REQUIRED_VERSION="4.0"
15977   else
15978    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
15979    MAKE_REQUIRED_VERSION="3.81"
15980  fi
15981
15982  if test "x$MAKE_CANDIDATE" != x; then
15983    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15984$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15985    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15986    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15987    if test "x$IS_GNU_MAKE" = x; then
15988      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15989$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15990    else
15991      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
15992      if test "x$IS_MODERN_MAKE" = x; then
15993        { $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
15994$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;}
15995      else
15996        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15997          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15998            MAKE_EXPECTED_ENV='cygwin'
15999          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16000            MAKE_EXPECTED_ENV='msys'
16001          else
16002            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16003          fi
16004          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16005          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16006        else
16007          # Not relevant for non-Windows
16008          IS_MAKE_CORRECT_ENV=true
16009        fi
16010        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16011          { $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
16012$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;}
16013        else
16014          FOUND_MAKE=$MAKE_CANDIDATE
16015
16016  # Only process if variable expands to non-empty
16017
16018  if test "x$FOUND_MAKE" != x; then
16019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16020
16021  # First separate the path from the arguments. This will split at the first
16022  # space.
16023  complete="$FOUND_MAKE"
16024  path="${complete%% *}"
16025  tmp="$complete EOL"
16026  arguments="${tmp#* }"
16027
16028  # Input might be given as Windows format, start by converting to
16029  # unix format.
16030  new_path=`$CYGPATH -u "$path"`
16031
16032  # Now try to locate executable using which
16033  new_path=`$WHICH "$new_path" 2> /dev/null`
16034  # bat and cmd files are not always considered executable in cygwin causing which
16035  # to not find them
16036  if test "x$new_path" = x \
16037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16039    new_path=`$CYGPATH -u "$path"`
16040  fi
16041  if test "x$new_path" = x; then
16042    # Oops. Which didn't find the executable.
16043    # The splitting of arguments from the executable at a space might have been incorrect,
16044    # since paths with space are more likely in Windows. Give it another try with the whole
16045    # argument.
16046    path="$complete"
16047    arguments="EOL"
16048    new_path=`$CYGPATH -u "$path"`
16049    new_path=`$WHICH "$new_path" 2> /dev/null`
16050    # bat and cmd files are not always considered executable in cygwin causing which
16051    # to not find them
16052    if test "x$new_path" = x \
16053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16055      new_path=`$CYGPATH -u "$path"`
16056    fi
16057    if test "x$new_path" = x; then
16058      # It's still not found. Now this is an unrecoverable error.
16059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16060$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16061      has_space=`$ECHO "$complete" | $GREP " "`
16062      if test "x$has_space" != x; then
16063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16065      fi
16066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16067    fi
16068  fi
16069
16070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16073  # "foo.exe" is OK but "foo" is an error.
16074  #
16075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16076  # It is also a way to make sure we got the proper file name for the real test later on.
16077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16078  if test "x$test_shortpath" = x; then
16079    # Short path failed, file does not exist as specified.
16080    # Try adding .exe or .cmd
16081    if test -f "${new_path}.exe"; then
16082      input_to_shortpath="${new_path}.exe"
16083    elif test -f "${new_path}.cmd"; then
16084      input_to_shortpath="${new_path}.cmd"
16085    else
16086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16087$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16090      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16091    fi
16092  else
16093    input_to_shortpath="$new_path"
16094  fi
16095
16096  # Call helper function which possibly converts this using DOS-style short mode.
16097  # If so, the updated path is stored in $new_path.
16098  new_path="$input_to_shortpath"
16099
16100  input_path="$input_to_shortpath"
16101  # Check if we need to convert this using DOS-style short mode. If the path
16102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16103  # take no chances and rewrite it.
16104  # Note: m4 eats our [], so we need to use [ and ] instead.
16105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16106  if test "x$has_forbidden_chars" != x; then
16107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16111      # Going to short mode and back again did indeed matter. Since short mode is
16112      # case insensitive, let's make it lowercase to improve readability.
16113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16114      # Now convert it back to Unix-style (cygpath)
16115      input_path=`$CYGPATH -u "$shortmode_path"`
16116      new_path="$input_path"
16117    fi
16118  fi
16119
16120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16121  if test "x$test_cygdrive_prefix" = x; then
16122    # As a simple fix, exclude /usr/bin since it's not a real path.
16123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16125      # a path prefixed by /cygdrive for fixpath to work.
16126      new_path="$CYGWIN_ROOT_PATH$input_path"
16127    fi
16128  fi
16129
16130  # remove trailing .exe if any
16131  new_path="${new_path/%.exe/}"
16132
16133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16134
16135  # First separate the path from the arguments. This will split at the first
16136  # space.
16137  complete="$FOUND_MAKE"
16138  path="${complete%% *}"
16139  tmp="$complete EOL"
16140  arguments="${tmp#* }"
16141
16142  # Input might be given as Windows format, start by converting to
16143  # unix format.
16144  new_path="$path"
16145
16146  windows_path="$new_path"
16147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16148    unix_path=`$CYGPATH -u "$windows_path"`
16149    new_path="$unix_path"
16150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16152    new_path="$unix_path"
16153  fi
16154
16155
16156  # Now try to locate executable using which
16157  new_path=`$WHICH "$new_path" 2> /dev/null`
16158
16159  if test "x$new_path" = x; then
16160    # Oops. Which didn't find the executable.
16161    # The splitting of arguments from the executable at a space might have been incorrect,
16162    # since paths with space are more likely in Windows. Give it another try with the whole
16163    # argument.
16164    path="$complete"
16165    arguments="EOL"
16166    new_path="$path"
16167
16168  windows_path="$new_path"
16169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16170    unix_path=`$CYGPATH -u "$windows_path"`
16171    new_path="$unix_path"
16172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16174    new_path="$unix_path"
16175  fi
16176
16177
16178    new_path=`$WHICH "$new_path" 2> /dev/null`
16179    # bat and cmd files are not always considered executable in MSYS causing which
16180    # to not find them
16181    if test "x$new_path" = x \
16182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16184      new_path="$path"
16185
16186  windows_path="$new_path"
16187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16188    unix_path=`$CYGPATH -u "$windows_path"`
16189    new_path="$unix_path"
16190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16192    new_path="$unix_path"
16193  fi
16194
16195    fi
16196
16197    if test "x$new_path" = x; then
16198      # It's still not found. Now this is an unrecoverable error.
16199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16201      has_space=`$ECHO "$complete" | $GREP " "`
16202      if test "x$has_space" != x; then
16203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16205      fi
16206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16207    fi
16208  fi
16209
16210  # Now new_path has a complete unix path to the binary
16211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16212    # Keep paths in /bin as-is, but remove trailing .exe if any
16213    new_path="${new_path/%.exe/}"
16214    # Do not save /bin paths to all_fixpath_prefixes!
16215  else
16216    # Not in mixed or Windows style, start by that.
16217    new_path=`cmd //c echo $new_path`
16218
16219  input_path="$new_path"
16220  # Check if we need to convert this using DOS-style short mode. If the path
16221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16222  # take no chances and rewrite it.
16223  # Note: m4 eats our [], so we need to use [ and ] instead.
16224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16225  if test "x$has_forbidden_chars" != x; then
16226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16228  fi
16229
16230    # Output is in $new_path
16231
16232  windows_path="$new_path"
16233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16234    unix_path=`$CYGPATH -u "$windows_path"`
16235    new_path="$unix_path"
16236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16238    new_path="$unix_path"
16239  fi
16240
16241    # remove trailing .exe if any
16242    new_path="${new_path/%.exe/}"
16243
16244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16246  fi
16247
16248    else
16249      # We're on a unix platform. Hooray! :)
16250      # First separate the path from the arguments. This will split at the first
16251      # space.
16252      complete="$FOUND_MAKE"
16253      path="${complete%% *}"
16254      tmp="$complete EOL"
16255      arguments="${tmp#* }"
16256
16257      # Cannot rely on the command "which" here since it doesn't always work.
16258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16259      if test -z "$is_absolute_path"; then
16260        # Path to executable is not absolute. Find it.
16261        IFS_save="$IFS"
16262        IFS=:
16263        for p in $PATH; do
16264          if test -f "$p/$path" && test -x "$p/$path"; then
16265            new_path="$p/$path"
16266            break
16267          fi
16268        done
16269        IFS="$IFS_save"
16270      else
16271        # This is an absolute path, we can use it without further modifications.
16272        new_path="$path"
16273      fi
16274
16275      if test "x$new_path" = x; then
16276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16278        has_space=`$ECHO "$complete" | $GREP " "`
16279        if test "x$has_space" != x; then
16280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16282        fi
16283        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16284      fi
16285    fi
16286
16287    # Now join together the path and the arguments once again
16288    if test "x$arguments" != xEOL; then
16289      new_complete="$new_path ${arguments% *}"
16290    else
16291      new_complete="$new_path"
16292    fi
16293
16294    if test "x$complete" != "x$new_complete"; then
16295      FOUND_MAKE="$new_complete"
16296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16298    fi
16299  fi
16300
16301        fi
16302      fi
16303    fi
16304  fi
16305
16306
16307    if test "x$FOUND_MAKE" = x; then
16308      for ac_prog in make
16309do
16310  # Extract the first word of "$ac_prog", so it can be a program name with args.
16311set dummy $ac_prog; ac_word=$2
16312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16313$as_echo_n "checking for $ac_word... " >&6; }
16314if ${ac_cv_path_CHECK_MAKE+:} false; then :
16315  $as_echo_n "(cached) " >&6
16316else
16317  case $CHECK_MAKE in
16318  [\\/]* | ?:[\\/]*)
16319  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16320  ;;
16321  *)
16322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16323for as_dir in $PATH
16324do
16325  IFS=$as_save_IFS
16326  test -z "$as_dir" && as_dir=.
16327    for ac_exec_ext in '' $ac_executable_extensions; do
16328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16329    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16331    break 2
16332  fi
16333done
16334  done
16335IFS=$as_save_IFS
16336
16337  ;;
16338esac
16339fi
16340CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16341if test -n "$CHECK_MAKE"; then
16342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16343$as_echo "$CHECK_MAKE" >&6; }
16344else
16345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16346$as_echo "no" >&6; }
16347fi
16348
16349
16350  test -n "$CHECK_MAKE" && break
16351done
16352
16353
16354  MAKE_CANDIDATE=""$CHECK_MAKE""
16355  DESCRIPTION="make in PATH"
16356
16357  # On Cygwin, we require a newer version of make than on other platforms
16358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16359    MAKE_VERSION_EXPR="-e 4\."
16360    MAKE_REQUIRED_VERSION="4.0"
16361   else
16362    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16363    MAKE_REQUIRED_VERSION="3.81"
16364  fi
16365
16366  if test "x$MAKE_CANDIDATE" != x; then
16367    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16368$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16369    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16370    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16371    if test "x$IS_GNU_MAKE" = x; then
16372      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16373$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16374    else
16375      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16376      if test "x$IS_MODERN_MAKE" = x; then
16377        { $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
16378$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;}
16379      else
16380        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16381          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16382            MAKE_EXPECTED_ENV='cygwin'
16383          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16384            MAKE_EXPECTED_ENV='msys'
16385          else
16386            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16387          fi
16388          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16389          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16390        else
16391          # Not relevant for non-Windows
16392          IS_MAKE_CORRECT_ENV=true
16393        fi
16394        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16395          { $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
16396$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;}
16397        else
16398          FOUND_MAKE=$MAKE_CANDIDATE
16399
16400  # Only process if variable expands to non-empty
16401
16402  if test "x$FOUND_MAKE" != x; then
16403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16404
16405  # First separate the path from the arguments. This will split at the first
16406  # space.
16407  complete="$FOUND_MAKE"
16408  path="${complete%% *}"
16409  tmp="$complete EOL"
16410  arguments="${tmp#* }"
16411
16412  # Input might be given as Windows format, start by converting to
16413  # unix format.
16414  new_path=`$CYGPATH -u "$path"`
16415
16416  # Now try to locate executable using which
16417  new_path=`$WHICH "$new_path" 2> /dev/null`
16418  # bat and cmd files are not always considered executable in cygwin causing which
16419  # to not find them
16420  if test "x$new_path" = x \
16421      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16422      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16423    new_path=`$CYGPATH -u "$path"`
16424  fi
16425  if test "x$new_path" = x; then
16426    # Oops. Which didn't find the executable.
16427    # The splitting of arguments from the executable at a space might have been incorrect,
16428    # since paths with space are more likely in Windows. Give it another try with the whole
16429    # argument.
16430    path="$complete"
16431    arguments="EOL"
16432    new_path=`$CYGPATH -u "$path"`
16433    new_path=`$WHICH "$new_path" 2> /dev/null`
16434    # bat and cmd files are not always considered executable in cygwin causing which
16435    # to not find them
16436    if test "x$new_path" = x \
16437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16439      new_path=`$CYGPATH -u "$path"`
16440    fi
16441    if test "x$new_path" = x; then
16442      # It's still not found. Now this is an unrecoverable error.
16443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16444$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16445      has_space=`$ECHO "$complete" | $GREP " "`
16446      if test "x$has_space" != x; then
16447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16449      fi
16450      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16451    fi
16452  fi
16453
16454  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16455  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16456  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16457  # "foo.exe" is OK but "foo" is an error.
16458  #
16459  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16460  # It is also a way to make sure we got the proper file name for the real test later on.
16461  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16462  if test "x$test_shortpath" = x; then
16463    # Short path failed, file does not exist as specified.
16464    # Try adding .exe or .cmd
16465    if test -f "${new_path}.exe"; then
16466      input_to_shortpath="${new_path}.exe"
16467    elif test -f "${new_path}.cmd"; then
16468      input_to_shortpath="${new_path}.cmd"
16469    else
16470      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16471$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16472      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16473$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16474      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16475    fi
16476  else
16477    input_to_shortpath="$new_path"
16478  fi
16479
16480  # Call helper function which possibly converts this using DOS-style short mode.
16481  # If so, the updated path is stored in $new_path.
16482  new_path="$input_to_shortpath"
16483
16484  input_path="$input_to_shortpath"
16485  # Check if we need to convert this using DOS-style short mode. If the path
16486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16487  # take no chances and rewrite it.
16488  # Note: m4 eats our [], so we need to use [ and ] instead.
16489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16490  if test "x$has_forbidden_chars" != x; then
16491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16495      # Going to short mode and back again did indeed matter. Since short mode is
16496      # case insensitive, let's make it lowercase to improve readability.
16497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16498      # Now convert it back to Unix-style (cygpath)
16499      input_path=`$CYGPATH -u "$shortmode_path"`
16500      new_path="$input_path"
16501    fi
16502  fi
16503
16504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16505  if test "x$test_cygdrive_prefix" = x; then
16506    # As a simple fix, exclude /usr/bin since it's not a real path.
16507    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16509      # a path prefixed by /cygdrive for fixpath to work.
16510      new_path="$CYGWIN_ROOT_PATH$input_path"
16511    fi
16512  fi
16513
16514  # remove trailing .exe if any
16515  new_path="${new_path/%.exe/}"
16516
16517    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16518
16519  # First separate the path from the arguments. This will split at the first
16520  # space.
16521  complete="$FOUND_MAKE"
16522  path="${complete%% *}"
16523  tmp="$complete EOL"
16524  arguments="${tmp#* }"
16525
16526  # Input might be given as Windows format, start by converting to
16527  # unix format.
16528  new_path="$path"
16529
16530  windows_path="$new_path"
16531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16532    unix_path=`$CYGPATH -u "$windows_path"`
16533    new_path="$unix_path"
16534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16536    new_path="$unix_path"
16537  fi
16538
16539
16540  # Now try to locate executable using which
16541  new_path=`$WHICH "$new_path" 2> /dev/null`
16542
16543  if test "x$new_path" = x; then
16544    # Oops. Which didn't find the executable.
16545    # The splitting of arguments from the executable at a space might have been incorrect,
16546    # since paths with space are more likely in Windows. Give it another try with the whole
16547    # argument.
16548    path="$complete"
16549    arguments="EOL"
16550    new_path="$path"
16551
16552  windows_path="$new_path"
16553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16554    unix_path=`$CYGPATH -u "$windows_path"`
16555    new_path="$unix_path"
16556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16558    new_path="$unix_path"
16559  fi
16560
16561
16562    new_path=`$WHICH "$new_path" 2> /dev/null`
16563    # bat and cmd files are not always considered executable in MSYS causing which
16564    # to not find them
16565    if test "x$new_path" = x \
16566        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16567        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16568      new_path="$path"
16569
16570  windows_path="$new_path"
16571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16572    unix_path=`$CYGPATH -u "$windows_path"`
16573    new_path="$unix_path"
16574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16576    new_path="$unix_path"
16577  fi
16578
16579    fi
16580
16581    if test "x$new_path" = x; then
16582      # It's still not found. Now this is an unrecoverable error.
16583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16584$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16585      has_space=`$ECHO "$complete" | $GREP " "`
16586      if test "x$has_space" != x; then
16587        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16588$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16589      fi
16590      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16591    fi
16592  fi
16593
16594  # Now new_path has a complete unix path to the binary
16595  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16596    # Keep paths in /bin as-is, but remove trailing .exe if any
16597    new_path="${new_path/%.exe/}"
16598    # Do not save /bin paths to all_fixpath_prefixes!
16599  else
16600    # Not in mixed or Windows style, start by that.
16601    new_path=`cmd //c echo $new_path`
16602
16603  input_path="$new_path"
16604  # Check if we need to convert this using DOS-style short mode. If the path
16605  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16606  # take no chances and rewrite it.
16607  # Note: m4 eats our [], so we need to use [ and ] instead.
16608  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16609  if test "x$has_forbidden_chars" != x; then
16610    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16611    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16612  fi
16613
16614    # Output is in $new_path
16615
16616  windows_path="$new_path"
16617  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16618    unix_path=`$CYGPATH -u "$windows_path"`
16619    new_path="$unix_path"
16620  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16621    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16622    new_path="$unix_path"
16623  fi
16624
16625    # remove trailing .exe if any
16626    new_path="${new_path/%.exe/}"
16627
16628    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16629    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16630  fi
16631
16632    else
16633      # We're on a unix platform. Hooray! :)
16634      # First separate the path from the arguments. This will split at the first
16635      # space.
16636      complete="$FOUND_MAKE"
16637      path="${complete%% *}"
16638      tmp="$complete EOL"
16639      arguments="${tmp#* }"
16640
16641      # Cannot rely on the command "which" here since it doesn't always work.
16642      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16643      if test -z "$is_absolute_path"; then
16644        # Path to executable is not absolute. Find it.
16645        IFS_save="$IFS"
16646        IFS=:
16647        for p in $PATH; do
16648          if test -f "$p/$path" && test -x "$p/$path"; then
16649            new_path="$p/$path"
16650            break
16651          fi
16652        done
16653        IFS="$IFS_save"
16654      else
16655        # This is an absolute path, we can use it without further modifications.
16656        new_path="$path"
16657      fi
16658
16659      if test "x$new_path" = x; then
16660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16661$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16662        has_space=`$ECHO "$complete" | $GREP " "`
16663        if test "x$has_space" != x; then
16664          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16665$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16666        fi
16667        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16668      fi
16669    fi
16670
16671    # Now join together the path and the arguments once again
16672    if test "x$arguments" != xEOL; then
16673      new_complete="$new_path ${arguments% *}"
16674    else
16675      new_complete="$new_path"
16676    fi
16677
16678    if test "x$complete" != "x$new_complete"; then
16679      FOUND_MAKE="$new_complete"
16680      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16681$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16682    fi
16683  fi
16684
16685        fi
16686      fi
16687    fi
16688  fi
16689
16690    fi
16691
16692    if test "x$FOUND_MAKE" = x; then
16693      if test "x$TOOLCHAIN_PATH" != x; then
16694        # We have a toolchain path, check that as well before giving up.
16695        OLD_PATH=$PATH
16696        PATH=$TOOLCHAIN_PATH:$PATH
16697        for ac_prog in gmake
16698do
16699  # Extract the first word of "$ac_prog", so it can be a program name with args.
16700set dummy $ac_prog; ac_word=$2
16701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16702$as_echo_n "checking for $ac_word... " >&6; }
16703if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16704  $as_echo_n "(cached) " >&6
16705else
16706  case $CHECK_TOOLSDIR_GMAKE in
16707  [\\/]* | ?:[\\/]*)
16708  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16709  ;;
16710  *)
16711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16712for as_dir in $PATH
16713do
16714  IFS=$as_save_IFS
16715  test -z "$as_dir" && as_dir=.
16716    for ac_exec_ext in '' $ac_executable_extensions; do
16717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16718    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16720    break 2
16721  fi
16722done
16723  done
16724IFS=$as_save_IFS
16725
16726  ;;
16727esac
16728fi
16729CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16730if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16732$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16733else
16734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16735$as_echo "no" >&6; }
16736fi
16737
16738
16739  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16740done
16741
16742
16743  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16744  DESCRIPTION="gmake in tools-dir"
16745
16746  # On Cygwin, we require a newer version of make than on other platforms
16747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16748    MAKE_VERSION_EXPR="-e 4\."
16749    MAKE_REQUIRED_VERSION="4.0"
16750   else
16751    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
16752    MAKE_REQUIRED_VERSION="3.81"
16753  fi
16754
16755  if test "x$MAKE_CANDIDATE" != x; then
16756    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16757$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16758    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16759    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16760    if test "x$IS_GNU_MAKE" = x; then
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16762$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16763    else
16764      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
16765      if test "x$IS_MODERN_MAKE" = x; then
16766        { $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
16767$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;}
16768      else
16769        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16770          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16771            MAKE_EXPECTED_ENV='cygwin'
16772          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16773            MAKE_EXPECTED_ENV='msys'
16774          else
16775            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16776          fi
16777          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16778          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16779        else
16780          # Not relevant for non-Windows
16781          IS_MAKE_CORRECT_ENV=true
16782        fi
16783        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16784          { $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
16785$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;}
16786        else
16787          FOUND_MAKE=$MAKE_CANDIDATE
16788
16789  # Only process if variable expands to non-empty
16790
16791  if test "x$FOUND_MAKE" != x; then
16792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16793
16794  # First separate the path from the arguments. This will split at the first
16795  # space.
16796  complete="$FOUND_MAKE"
16797  path="${complete%% *}"
16798  tmp="$complete EOL"
16799  arguments="${tmp#* }"
16800
16801  # Input might be given as Windows format, start by converting to
16802  # unix format.
16803  new_path=`$CYGPATH -u "$path"`
16804
16805  # Now try to locate executable using which
16806  new_path=`$WHICH "$new_path" 2> /dev/null`
16807  # bat and cmd files are not always considered executable in cygwin causing which
16808  # to not find them
16809  if test "x$new_path" = x \
16810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16812    new_path=`$CYGPATH -u "$path"`
16813  fi
16814  if test "x$new_path" = x; then
16815    # Oops. Which didn't find the executable.
16816    # The splitting of arguments from the executable at a space might have been incorrect,
16817    # since paths with space are more likely in Windows. Give it another try with the whole
16818    # argument.
16819    path="$complete"
16820    arguments="EOL"
16821    new_path=`$CYGPATH -u "$path"`
16822    new_path=`$WHICH "$new_path" 2> /dev/null`
16823    # bat and cmd files are not always considered executable in cygwin causing which
16824    # to not find them
16825    if test "x$new_path" = x \
16826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16828      new_path=`$CYGPATH -u "$path"`
16829    fi
16830    if test "x$new_path" = x; then
16831      # It's still not found. Now this is an unrecoverable error.
16832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16834      has_space=`$ECHO "$complete" | $GREP " "`
16835      if test "x$has_space" != x; then
16836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16838      fi
16839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16840    fi
16841  fi
16842
16843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16846  # "foo.exe" is OK but "foo" is an error.
16847  #
16848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16849  # It is also a way to make sure we got the proper file name for the real test later on.
16850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16851  if test "x$test_shortpath" = x; then
16852    # Short path failed, file does not exist as specified.
16853    # Try adding .exe or .cmd
16854    if test -f "${new_path}.exe"; then
16855      input_to_shortpath="${new_path}.exe"
16856    elif test -f "${new_path}.cmd"; then
16857      input_to_shortpath="${new_path}.cmd"
16858    else
16859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16864    fi
16865  else
16866    input_to_shortpath="$new_path"
16867  fi
16868
16869  # Call helper function which possibly converts this using DOS-style short mode.
16870  # If so, the updated path is stored in $new_path.
16871  new_path="$input_to_shortpath"
16872
16873  input_path="$input_to_shortpath"
16874  # Check if we need to convert this using DOS-style short mode. If the path
16875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16876  # take no chances and rewrite it.
16877  # Note: m4 eats our [], so we need to use [ and ] instead.
16878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16879  if test "x$has_forbidden_chars" != x; then
16880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16884      # Going to short mode and back again did indeed matter. Since short mode is
16885      # case insensitive, let's make it lowercase to improve readability.
16886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16887      # Now convert it back to Unix-style (cygpath)
16888      input_path=`$CYGPATH -u "$shortmode_path"`
16889      new_path="$input_path"
16890    fi
16891  fi
16892
16893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16894  if test "x$test_cygdrive_prefix" = x; then
16895    # As a simple fix, exclude /usr/bin since it's not a real path.
16896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16898      # a path prefixed by /cygdrive for fixpath to work.
16899      new_path="$CYGWIN_ROOT_PATH$input_path"
16900    fi
16901  fi
16902
16903  # remove trailing .exe if any
16904  new_path="${new_path/%.exe/}"
16905
16906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16907
16908  # First separate the path from the arguments. This will split at the first
16909  # space.
16910  complete="$FOUND_MAKE"
16911  path="${complete%% *}"
16912  tmp="$complete EOL"
16913  arguments="${tmp#* }"
16914
16915  # Input might be given as Windows format, start by converting to
16916  # unix format.
16917  new_path="$path"
16918
16919  windows_path="$new_path"
16920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16921    unix_path=`$CYGPATH -u "$windows_path"`
16922    new_path="$unix_path"
16923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16925    new_path="$unix_path"
16926  fi
16927
16928
16929  # Now try to locate executable using which
16930  new_path=`$WHICH "$new_path" 2> /dev/null`
16931
16932  if test "x$new_path" = x; then
16933    # Oops. Which didn't find the executable.
16934    # The splitting of arguments from the executable at a space might have been incorrect,
16935    # since paths with space are more likely in Windows. Give it another try with the whole
16936    # argument.
16937    path="$complete"
16938    arguments="EOL"
16939    new_path="$path"
16940
16941  windows_path="$new_path"
16942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16943    unix_path=`$CYGPATH -u "$windows_path"`
16944    new_path="$unix_path"
16945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16947    new_path="$unix_path"
16948  fi
16949
16950
16951    new_path=`$WHICH "$new_path" 2> /dev/null`
16952    # bat and cmd files are not always considered executable in MSYS causing which
16953    # to not find them
16954    if test "x$new_path" = x \
16955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16957      new_path="$path"
16958
16959  windows_path="$new_path"
16960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16961    unix_path=`$CYGPATH -u "$windows_path"`
16962    new_path="$unix_path"
16963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16965    new_path="$unix_path"
16966  fi
16967
16968    fi
16969
16970    if test "x$new_path" = x; then
16971      # It's still not found. Now this is an unrecoverable error.
16972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16974      has_space=`$ECHO "$complete" | $GREP " "`
16975      if test "x$has_space" != x; then
16976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16978      fi
16979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16980    fi
16981  fi
16982
16983  # Now new_path has a complete unix path to the binary
16984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16985    # Keep paths in /bin as-is, but remove trailing .exe if any
16986    new_path="${new_path/%.exe/}"
16987    # Do not save /bin paths to all_fixpath_prefixes!
16988  else
16989    # Not in mixed or Windows style, start by that.
16990    new_path=`cmd //c echo $new_path`
16991
16992  input_path="$new_path"
16993  # Check if we need to convert this using DOS-style short mode. If the path
16994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16995  # take no chances and rewrite it.
16996  # Note: m4 eats our [], so we need to use [ and ] instead.
16997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16998  if test "x$has_forbidden_chars" != x; then
16999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17001  fi
17002
17003    # Output is in $new_path
17004
17005  windows_path="$new_path"
17006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17007    unix_path=`$CYGPATH -u "$windows_path"`
17008    new_path="$unix_path"
17009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17011    new_path="$unix_path"
17012  fi
17013
17014    # remove trailing .exe if any
17015    new_path="${new_path/%.exe/}"
17016
17017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17019  fi
17020
17021    else
17022      # We're on a unix platform. Hooray! :)
17023      # First separate the path from the arguments. This will split at the first
17024      # space.
17025      complete="$FOUND_MAKE"
17026      path="${complete%% *}"
17027      tmp="$complete EOL"
17028      arguments="${tmp#* }"
17029
17030      # Cannot rely on the command "which" here since it doesn't always work.
17031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17032      if test -z "$is_absolute_path"; then
17033        # Path to executable is not absolute. Find it.
17034        IFS_save="$IFS"
17035        IFS=:
17036        for p in $PATH; do
17037          if test -f "$p/$path" && test -x "$p/$path"; then
17038            new_path="$p/$path"
17039            break
17040          fi
17041        done
17042        IFS="$IFS_save"
17043      else
17044        # This is an absolute path, we can use it without further modifications.
17045        new_path="$path"
17046      fi
17047
17048      if test "x$new_path" = x; then
17049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17051        has_space=`$ECHO "$complete" | $GREP " "`
17052        if test "x$has_space" != x; then
17053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17055        fi
17056        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17057      fi
17058    fi
17059
17060    # Now join together the path and the arguments once again
17061    if test "x$arguments" != xEOL; then
17062      new_complete="$new_path ${arguments% *}"
17063    else
17064      new_complete="$new_path"
17065    fi
17066
17067    if test "x$complete" != "x$new_complete"; then
17068      FOUND_MAKE="$new_complete"
17069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17070$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17071    fi
17072  fi
17073
17074        fi
17075      fi
17076    fi
17077  fi
17078
17079        if test "x$FOUND_MAKE" = x; then
17080          for ac_prog in make
17081do
17082  # Extract the first word of "$ac_prog", so it can be a program name with args.
17083set dummy $ac_prog; ac_word=$2
17084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17085$as_echo_n "checking for $ac_word... " >&6; }
17086if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
17087  $as_echo_n "(cached) " >&6
17088else
17089  case $CHECK_TOOLSDIR_MAKE in
17090  [\\/]* | ?:[\\/]*)
17091  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
17092  ;;
17093  *)
17094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17095for as_dir in $PATH
17096do
17097  IFS=$as_save_IFS
17098  test -z "$as_dir" && as_dir=.
17099    for ac_exec_ext in '' $ac_executable_extensions; do
17100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17101    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
17102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17103    break 2
17104  fi
17105done
17106  done
17107IFS=$as_save_IFS
17108
17109  ;;
17110esac
17111fi
17112CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
17113if test -n "$CHECK_TOOLSDIR_MAKE"; then
17114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
17115$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
17116else
17117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17118$as_echo "no" >&6; }
17119fi
17120
17121
17122  test -n "$CHECK_TOOLSDIR_MAKE" && break
17123done
17124
17125
17126  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
17127  DESCRIPTION="make in tools-dir"
17128
17129  # On Cygwin, we require a newer version of make than on other platforms
17130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17131    MAKE_VERSION_EXPR="-e 4\."
17132    MAKE_REQUIRED_VERSION="4.0"
17133   else
17134    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17135    MAKE_REQUIRED_VERSION="3.81"
17136  fi
17137
17138  if test "x$MAKE_CANDIDATE" != x; then
17139    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17140$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17141    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17142    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17143    if test "x$IS_GNU_MAKE" = x; then
17144      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17145$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17146    else
17147      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17148      if test "x$IS_MODERN_MAKE" = x; then
17149        { $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
17150$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;}
17151      else
17152        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17153          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17154            MAKE_EXPECTED_ENV='cygwin'
17155          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17156            MAKE_EXPECTED_ENV='msys'
17157          else
17158            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17159          fi
17160          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17161          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17162        else
17163          # Not relevant for non-Windows
17164          IS_MAKE_CORRECT_ENV=true
17165        fi
17166        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17167          { $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
17168$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;}
17169        else
17170          FOUND_MAKE=$MAKE_CANDIDATE
17171
17172  # Only process if variable expands to non-empty
17173
17174  if test "x$FOUND_MAKE" != x; then
17175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17176
17177  # First separate the path from the arguments. This will split at the first
17178  # space.
17179  complete="$FOUND_MAKE"
17180  path="${complete%% *}"
17181  tmp="$complete EOL"
17182  arguments="${tmp#* }"
17183
17184  # Input might be given as Windows format, start by converting to
17185  # unix format.
17186  new_path=`$CYGPATH -u "$path"`
17187
17188  # Now try to locate executable using which
17189  new_path=`$WHICH "$new_path" 2> /dev/null`
17190  # bat and cmd files are not always considered executable in cygwin causing which
17191  # to not find them
17192  if test "x$new_path" = x \
17193      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17194      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17195    new_path=`$CYGPATH -u "$path"`
17196  fi
17197  if test "x$new_path" = x; then
17198    # Oops. Which didn't find the executable.
17199    # The splitting of arguments from the executable at a space might have been incorrect,
17200    # since paths with space are more likely in Windows. Give it another try with the whole
17201    # argument.
17202    path="$complete"
17203    arguments="EOL"
17204    new_path=`$CYGPATH -u "$path"`
17205    new_path=`$WHICH "$new_path" 2> /dev/null`
17206    # bat and cmd files are not always considered executable in cygwin causing which
17207    # to not find them
17208    if test "x$new_path" = x \
17209        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17210        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17211      new_path=`$CYGPATH -u "$path"`
17212    fi
17213    if test "x$new_path" = x; then
17214      # It's still not found. Now this is an unrecoverable error.
17215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17216$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17217      has_space=`$ECHO "$complete" | $GREP " "`
17218      if test "x$has_space" != x; then
17219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17221      fi
17222      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17223    fi
17224  fi
17225
17226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17229  # "foo.exe" is OK but "foo" is an error.
17230  #
17231  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17232  # It is also a way to make sure we got the proper file name for the real test later on.
17233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17234  if test "x$test_shortpath" = x; then
17235    # Short path failed, file does not exist as specified.
17236    # Try adding .exe or .cmd
17237    if test -f "${new_path}.exe"; then
17238      input_to_shortpath="${new_path}.exe"
17239    elif test -f "${new_path}.cmd"; then
17240      input_to_shortpath="${new_path}.cmd"
17241    else
17242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17243$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17244      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17245$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17246      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17247    fi
17248  else
17249    input_to_shortpath="$new_path"
17250  fi
17251
17252  # Call helper function which possibly converts this using DOS-style short mode.
17253  # If so, the updated path is stored in $new_path.
17254  new_path="$input_to_shortpath"
17255
17256  input_path="$input_to_shortpath"
17257  # Check if we need to convert this using DOS-style short mode. If the path
17258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17259  # take no chances and rewrite it.
17260  # Note: m4 eats our [], so we need to use [ and ] instead.
17261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17262  if test "x$has_forbidden_chars" != x; then
17263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17267      # Going to short mode and back again did indeed matter. Since short mode is
17268      # case insensitive, let's make it lowercase to improve readability.
17269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17270      # Now convert it back to Unix-style (cygpath)
17271      input_path=`$CYGPATH -u "$shortmode_path"`
17272      new_path="$input_path"
17273    fi
17274  fi
17275
17276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17277  if test "x$test_cygdrive_prefix" = x; then
17278    # As a simple fix, exclude /usr/bin since it's not a real path.
17279    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17281      # a path prefixed by /cygdrive for fixpath to work.
17282      new_path="$CYGWIN_ROOT_PATH$input_path"
17283    fi
17284  fi
17285
17286  # remove trailing .exe if any
17287  new_path="${new_path/%.exe/}"
17288
17289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17290
17291  # First separate the path from the arguments. This will split at the first
17292  # space.
17293  complete="$FOUND_MAKE"
17294  path="${complete%% *}"
17295  tmp="$complete EOL"
17296  arguments="${tmp#* }"
17297
17298  # Input might be given as Windows format, start by converting to
17299  # unix format.
17300  new_path="$path"
17301
17302  windows_path="$new_path"
17303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17304    unix_path=`$CYGPATH -u "$windows_path"`
17305    new_path="$unix_path"
17306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17308    new_path="$unix_path"
17309  fi
17310
17311
17312  # Now try to locate executable using which
17313  new_path=`$WHICH "$new_path" 2> /dev/null`
17314
17315  if test "x$new_path" = x; then
17316    # Oops. Which didn't find the executable.
17317    # The splitting of arguments from the executable at a space might have been incorrect,
17318    # since paths with space are more likely in Windows. Give it another try with the whole
17319    # argument.
17320    path="$complete"
17321    arguments="EOL"
17322    new_path="$path"
17323
17324  windows_path="$new_path"
17325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17326    unix_path=`$CYGPATH -u "$windows_path"`
17327    new_path="$unix_path"
17328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17330    new_path="$unix_path"
17331  fi
17332
17333
17334    new_path=`$WHICH "$new_path" 2> /dev/null`
17335    # bat and cmd files are not always considered executable in MSYS causing which
17336    # to not find them
17337    if test "x$new_path" = x \
17338        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17339        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17340      new_path="$path"
17341
17342  windows_path="$new_path"
17343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17344    unix_path=`$CYGPATH -u "$windows_path"`
17345    new_path="$unix_path"
17346  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17347    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17348    new_path="$unix_path"
17349  fi
17350
17351    fi
17352
17353    if test "x$new_path" = x; then
17354      # It's still not found. Now this is an unrecoverable error.
17355      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17356$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17357      has_space=`$ECHO "$complete" | $GREP " "`
17358      if test "x$has_space" != x; then
17359        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17360$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17361      fi
17362      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17363    fi
17364  fi
17365
17366  # Now new_path has a complete unix path to the binary
17367  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17368    # Keep paths in /bin as-is, but remove trailing .exe if any
17369    new_path="${new_path/%.exe/}"
17370    # Do not save /bin paths to all_fixpath_prefixes!
17371  else
17372    # Not in mixed or Windows style, start by that.
17373    new_path=`cmd //c echo $new_path`
17374
17375  input_path="$new_path"
17376  # Check if we need to convert this using DOS-style short mode. If the path
17377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17378  # take no chances and rewrite it.
17379  # Note: m4 eats our [], so we need to use [ and ] instead.
17380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17381  if test "x$has_forbidden_chars" != x; then
17382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17384  fi
17385
17386    # Output is in $new_path
17387
17388  windows_path="$new_path"
17389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17390    unix_path=`$CYGPATH -u "$windows_path"`
17391    new_path="$unix_path"
17392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17394    new_path="$unix_path"
17395  fi
17396
17397    # remove trailing .exe if any
17398    new_path="${new_path/%.exe/}"
17399
17400    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17401    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17402  fi
17403
17404    else
17405      # We're on a unix platform. Hooray! :)
17406      # First separate the path from the arguments. This will split at the first
17407      # space.
17408      complete="$FOUND_MAKE"
17409      path="${complete%% *}"
17410      tmp="$complete EOL"
17411      arguments="${tmp#* }"
17412
17413      # Cannot rely on the command "which" here since it doesn't always work.
17414      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17415      if test -z "$is_absolute_path"; then
17416        # Path to executable is not absolute. Find it.
17417        IFS_save="$IFS"
17418        IFS=:
17419        for p in $PATH; do
17420          if test -f "$p/$path" && test -x "$p/$path"; then
17421            new_path="$p/$path"
17422            break
17423          fi
17424        done
17425        IFS="$IFS_save"
17426      else
17427        # This is an absolute path, we can use it without further modifications.
17428        new_path="$path"
17429      fi
17430
17431      if test "x$new_path" = x; then
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17433$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17434        has_space=`$ECHO "$complete" | $GREP " "`
17435        if test "x$has_space" != x; then
17436          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17437$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17438        fi
17439        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17440      fi
17441    fi
17442
17443    # Now join together the path and the arguments once again
17444    if test "x$arguments" != xEOL; then
17445      new_complete="$new_path ${arguments% *}"
17446    else
17447      new_complete="$new_path"
17448    fi
17449
17450    if test "x$complete" != "x$new_complete"; then
17451      FOUND_MAKE="$new_complete"
17452      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17453$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17454    fi
17455  fi
17456
17457        fi
17458      fi
17459    fi
17460  fi
17461
17462        fi
17463        PATH=$OLD_PATH
17464      fi
17465    fi
17466
17467    if test "x$FOUND_MAKE" = x; then
17468      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
17469    fi
17470  fi
17471
17472  MAKE=$FOUND_MAKE
17473
17474  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17475$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17476
17477
17478  # Check if make supports the output sync option and if so, setup using it.
17479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17480$as_echo_n "checking if make --output-sync is supported... " >&6; }
17481  if $MAKE --version -O > /dev/null 2>&1; then
17482    OUTPUT_SYNC_SUPPORTED=true
17483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17484$as_echo "yes" >&6; }
17485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17486$as_echo_n "checking for output-sync value... " >&6; }
17487
17488# Check whether --with-output-sync was given.
17489if test "${with_output_sync+set}" = set; then :
17490  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17491fi
17492
17493    if test "x$OUTPUT_SYNC" = "x"; then
17494      OUTPUT_SYNC=none
17495    fi
17496    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17497$as_echo "$OUTPUT_SYNC" >&6; }
17498    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17499      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17500    fi
17501  else
17502    OUTPUT_SYNC_SUPPORTED=false
17503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17504$as_echo "no" >&6; }
17505  fi
17506
17507
17508
17509
17510
17511
17512  # Test if find supports -delete
17513  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17514$as_echo_n "checking if find supports -delete... " >&6; }
17515  FIND_DELETE="-delete"
17516
17517  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17518
17519  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17520
17521  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17522  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17523    # No, it does not.
17524    rm $DELETEDIR/TestIfFindSupportsDelete
17525    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17526      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17527      FIND_DELETE="-print | xargs rm"
17528    else
17529      FIND_DELETE="-exec rm \{\} \+"
17530    fi
17531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17532$as_echo "no" >&6; }
17533  else
17534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17535$as_echo "yes" >&6; }
17536  fi
17537  rmdir $DELETEDIR
17538
17539
17540
17541  # These tools might not be installed by default,
17542  # need hint on how to install them.
17543
17544
17545
17546  # Publish this variable in the help.
17547
17548
17549  if test "x$UNZIP" = x; then
17550    # The variable is not set by user, try to locate tool using the code snippet
17551    for ac_prog in unzip
17552do
17553  # Extract the first word of "$ac_prog", so it can be a program name with args.
17554set dummy $ac_prog; ac_word=$2
17555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17556$as_echo_n "checking for $ac_word... " >&6; }
17557if ${ac_cv_path_UNZIP+:} false; then :
17558  $as_echo_n "(cached) " >&6
17559else
17560  case $UNZIP in
17561  [\\/]* | ?:[\\/]*)
17562  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17563  ;;
17564  *)
17565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17566for as_dir in $PATH
17567do
17568  IFS=$as_save_IFS
17569  test -z "$as_dir" && as_dir=.
17570    for ac_exec_ext in '' $ac_executable_extensions; do
17571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17572    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17574    break 2
17575  fi
17576done
17577  done
17578IFS=$as_save_IFS
17579
17580  ;;
17581esac
17582fi
17583UNZIP=$ac_cv_path_UNZIP
17584if test -n "$UNZIP"; then
17585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17586$as_echo "$UNZIP" >&6; }
17587else
17588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17589$as_echo "no" >&6; }
17590fi
17591
17592
17593  test -n "$UNZIP" && break
17594done
17595
17596  else
17597    # The variable is set, but is it from the command line or the environment?
17598
17599    # Try to remove the string !UNZIP! from our list.
17600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17602      # If it failed, the variable was not from the command line. Ignore it,
17603      # but warn the user (except for BASH, which is always set by the calling BASH).
17604      if test "xUNZIP" != xBASH; then
17605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17606$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17607      fi
17608      # Try to locate tool using the code snippet
17609      for ac_prog in unzip
17610do
17611  # Extract the first word of "$ac_prog", so it can be a program name with args.
17612set dummy $ac_prog; ac_word=$2
17613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17614$as_echo_n "checking for $ac_word... " >&6; }
17615if ${ac_cv_path_UNZIP+:} false; then :
17616  $as_echo_n "(cached) " >&6
17617else
17618  case $UNZIP in
17619  [\\/]* | ?:[\\/]*)
17620  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17621  ;;
17622  *)
17623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17624for as_dir in $PATH
17625do
17626  IFS=$as_save_IFS
17627  test -z "$as_dir" && as_dir=.
17628    for ac_exec_ext in '' $ac_executable_extensions; do
17629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17630    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17632    break 2
17633  fi
17634done
17635  done
17636IFS=$as_save_IFS
17637
17638  ;;
17639esac
17640fi
17641UNZIP=$ac_cv_path_UNZIP
17642if test -n "$UNZIP"; then
17643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17644$as_echo "$UNZIP" >&6; }
17645else
17646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17647$as_echo "no" >&6; }
17648fi
17649
17650
17651  test -n "$UNZIP" && break
17652done
17653
17654    else
17655      # If it succeeded, then it was overridden by the user. We will use it
17656      # for the tool.
17657
17658      # First remove it from the list of overridden variables, so we can test
17659      # for unknown variables in the end.
17660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17661
17662      # Check if the provided tool contains a complete path.
17663      tool_specified="$UNZIP"
17664      tool_basename="${tool_specified##*/}"
17665      if test "x$tool_basename" = "x$tool_specified"; then
17666        # A command without a complete path is provided, search $PATH.
17667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17668$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17669        # Extract the first word of "$tool_basename", so it can be a program name with args.
17670set dummy $tool_basename; ac_word=$2
17671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17672$as_echo_n "checking for $ac_word... " >&6; }
17673if ${ac_cv_path_UNZIP+:} false; then :
17674  $as_echo_n "(cached) " >&6
17675else
17676  case $UNZIP in
17677  [\\/]* | ?:[\\/]*)
17678  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17679  ;;
17680  *)
17681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17682for as_dir in $PATH
17683do
17684  IFS=$as_save_IFS
17685  test -z "$as_dir" && as_dir=.
17686    for ac_exec_ext in '' $ac_executable_extensions; do
17687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17688    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17690    break 2
17691  fi
17692done
17693  done
17694IFS=$as_save_IFS
17695
17696  ;;
17697esac
17698fi
17699UNZIP=$ac_cv_path_UNZIP
17700if test -n "$UNZIP"; then
17701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17702$as_echo "$UNZIP" >&6; }
17703else
17704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17705$as_echo "no" >&6; }
17706fi
17707
17708
17709        if test "x$UNZIP" = x; then
17710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17711        fi
17712      else
17713        # Otherwise we believe it is a complete path. Use it as it is.
17714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17715$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17717$as_echo_n "checking for UNZIP... " >&6; }
17718        if test ! -x "$tool_specified"; then
17719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17720$as_echo "not found" >&6; }
17721          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17722        fi
17723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17724$as_echo "$tool_specified" >&6; }
17725      fi
17726    fi
17727  fi
17728
17729
17730
17731  if test "x$UNZIP" = x; then
17732    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17733  fi
17734
17735
17736
17737
17738
17739  # Publish this variable in the help.
17740
17741
17742  if test "x$ZIP" = x; then
17743    # The variable is not set by user, try to locate tool using the code snippet
17744    for ac_prog in zip
17745do
17746  # Extract the first word of "$ac_prog", so it can be a program name with args.
17747set dummy $ac_prog; ac_word=$2
17748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17749$as_echo_n "checking for $ac_word... " >&6; }
17750if ${ac_cv_path_ZIP+:} false; then :
17751  $as_echo_n "(cached) " >&6
17752else
17753  case $ZIP in
17754  [\\/]* | ?:[\\/]*)
17755  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17756  ;;
17757  *)
17758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17759for as_dir in $PATH
17760do
17761  IFS=$as_save_IFS
17762  test -z "$as_dir" && as_dir=.
17763    for ac_exec_ext in '' $ac_executable_extensions; do
17764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17765    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17767    break 2
17768  fi
17769done
17770  done
17771IFS=$as_save_IFS
17772
17773  ;;
17774esac
17775fi
17776ZIP=$ac_cv_path_ZIP
17777if test -n "$ZIP"; then
17778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17779$as_echo "$ZIP" >&6; }
17780else
17781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17782$as_echo "no" >&6; }
17783fi
17784
17785
17786  test -n "$ZIP" && break
17787done
17788
17789  else
17790    # The variable is set, but is it from the command line or the environment?
17791
17792    # Try to remove the string !ZIP! from our list.
17793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17795      # If it failed, the variable was not from the command line. Ignore it,
17796      # but warn the user (except for BASH, which is always set by the calling BASH).
17797      if test "xZIP" != xBASH; then
17798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17799$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17800      fi
17801      # Try to locate tool using the code snippet
17802      for ac_prog in zip
17803do
17804  # Extract the first word of "$ac_prog", so it can be a program name with args.
17805set dummy $ac_prog; ac_word=$2
17806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17807$as_echo_n "checking for $ac_word... " >&6; }
17808if ${ac_cv_path_ZIP+:} false; then :
17809  $as_echo_n "(cached) " >&6
17810else
17811  case $ZIP in
17812  [\\/]* | ?:[\\/]*)
17813  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17814  ;;
17815  *)
17816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17817for as_dir in $PATH
17818do
17819  IFS=$as_save_IFS
17820  test -z "$as_dir" && as_dir=.
17821    for ac_exec_ext in '' $ac_executable_extensions; do
17822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17823    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17825    break 2
17826  fi
17827done
17828  done
17829IFS=$as_save_IFS
17830
17831  ;;
17832esac
17833fi
17834ZIP=$ac_cv_path_ZIP
17835if test -n "$ZIP"; then
17836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17837$as_echo "$ZIP" >&6; }
17838else
17839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17840$as_echo "no" >&6; }
17841fi
17842
17843
17844  test -n "$ZIP" && break
17845done
17846
17847    else
17848      # If it succeeded, then it was overridden by the user. We will use it
17849      # for the tool.
17850
17851      # First remove it from the list of overridden variables, so we can test
17852      # for unknown variables in the end.
17853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17854
17855      # Check if the provided tool contains a complete path.
17856      tool_specified="$ZIP"
17857      tool_basename="${tool_specified##*/}"
17858      if test "x$tool_basename" = "x$tool_specified"; then
17859        # A command without a complete path is provided, search $PATH.
17860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17861$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17862        # Extract the first word of "$tool_basename", so it can be a program name with args.
17863set dummy $tool_basename; ac_word=$2
17864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17865$as_echo_n "checking for $ac_word... " >&6; }
17866if ${ac_cv_path_ZIP+:} false; then :
17867  $as_echo_n "(cached) " >&6
17868else
17869  case $ZIP in
17870  [\\/]* | ?:[\\/]*)
17871  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17872  ;;
17873  *)
17874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17875for as_dir in $PATH
17876do
17877  IFS=$as_save_IFS
17878  test -z "$as_dir" && as_dir=.
17879    for ac_exec_ext in '' $ac_executable_extensions; do
17880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17881    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17883    break 2
17884  fi
17885done
17886  done
17887IFS=$as_save_IFS
17888
17889  ;;
17890esac
17891fi
17892ZIP=$ac_cv_path_ZIP
17893if test -n "$ZIP"; then
17894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17895$as_echo "$ZIP" >&6; }
17896else
17897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17898$as_echo "no" >&6; }
17899fi
17900
17901
17902        if test "x$ZIP" = x; then
17903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17904        fi
17905      else
17906        # Otherwise we believe it is a complete path. Use it as it is.
17907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17908$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17910$as_echo_n "checking for ZIP... " >&6; }
17911        if test ! -x "$tool_specified"; then
17912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17913$as_echo "not found" >&6; }
17914          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17915        fi
17916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17917$as_echo "$tool_specified" >&6; }
17918      fi
17919    fi
17920  fi
17921
17922
17923
17924  if test "x$ZIP" = x; then
17925    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17926  fi
17927
17928
17929
17930  # Non-required basic tools
17931
17932
17933
17934  # Publish this variable in the help.
17935
17936
17937  if test "x$LDD" = x; then
17938    # The variable is not set by user, try to locate tool using the code snippet
17939    for ac_prog in ldd
17940do
17941  # Extract the first word of "$ac_prog", so it can be a program name with args.
17942set dummy $ac_prog; ac_word=$2
17943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17944$as_echo_n "checking for $ac_word... " >&6; }
17945if ${ac_cv_path_LDD+:} false; then :
17946  $as_echo_n "(cached) " >&6
17947else
17948  case $LDD in
17949  [\\/]* | ?:[\\/]*)
17950  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17951  ;;
17952  *)
17953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17954for as_dir in $PATH
17955do
17956  IFS=$as_save_IFS
17957  test -z "$as_dir" && as_dir=.
17958    for ac_exec_ext in '' $ac_executable_extensions; do
17959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17960    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17962    break 2
17963  fi
17964done
17965  done
17966IFS=$as_save_IFS
17967
17968  ;;
17969esac
17970fi
17971LDD=$ac_cv_path_LDD
17972if test -n "$LDD"; then
17973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17974$as_echo "$LDD" >&6; }
17975else
17976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17977$as_echo "no" >&6; }
17978fi
17979
17980
17981  test -n "$LDD" && break
17982done
17983
17984  else
17985    # The variable is set, but is it from the command line or the environment?
17986
17987    # Try to remove the string !LDD! from our list.
17988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17990      # If it failed, the variable was not from the command line. Ignore it,
17991      # but warn the user (except for BASH, which is always set by the calling BASH).
17992      if test "xLDD" != xBASH; then
17993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17994$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17995      fi
17996      # Try to locate tool using the code snippet
17997      for ac_prog in ldd
17998do
17999  # Extract the first word of "$ac_prog", so it can be a program name with args.
18000set dummy $ac_prog; ac_word=$2
18001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18002$as_echo_n "checking for $ac_word... " >&6; }
18003if ${ac_cv_path_LDD+:} false; then :
18004  $as_echo_n "(cached) " >&6
18005else
18006  case $LDD in
18007  [\\/]* | ?:[\\/]*)
18008  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18009  ;;
18010  *)
18011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18012for as_dir in $PATH
18013do
18014  IFS=$as_save_IFS
18015  test -z "$as_dir" && as_dir=.
18016    for ac_exec_ext in '' $ac_executable_extensions; do
18017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18018    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18020    break 2
18021  fi
18022done
18023  done
18024IFS=$as_save_IFS
18025
18026  ;;
18027esac
18028fi
18029LDD=$ac_cv_path_LDD
18030if test -n "$LDD"; then
18031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18032$as_echo "$LDD" >&6; }
18033else
18034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18035$as_echo "no" >&6; }
18036fi
18037
18038
18039  test -n "$LDD" && break
18040done
18041
18042    else
18043      # If it succeeded, then it was overridden by the user. We will use it
18044      # for the tool.
18045
18046      # First remove it from the list of overridden variables, so we can test
18047      # for unknown variables in the end.
18048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18049
18050      # Check if the provided tool contains a complete path.
18051      tool_specified="$LDD"
18052      tool_basename="${tool_specified##*/}"
18053      if test "x$tool_basename" = "x$tool_specified"; then
18054        # A command without a complete path is provided, search $PATH.
18055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
18056$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
18057        # Extract the first word of "$tool_basename", so it can be a program name with args.
18058set dummy $tool_basename; ac_word=$2
18059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18060$as_echo_n "checking for $ac_word... " >&6; }
18061if ${ac_cv_path_LDD+:} false; then :
18062  $as_echo_n "(cached) " >&6
18063else
18064  case $LDD in
18065  [\\/]* | ?:[\\/]*)
18066  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
18067  ;;
18068  *)
18069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18070for as_dir in $PATH
18071do
18072  IFS=$as_save_IFS
18073  test -z "$as_dir" && as_dir=.
18074    for ac_exec_ext in '' $ac_executable_extensions; do
18075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18076    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
18077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18078    break 2
18079  fi
18080done
18081  done
18082IFS=$as_save_IFS
18083
18084  ;;
18085esac
18086fi
18087LDD=$ac_cv_path_LDD
18088if test -n "$LDD"; then
18089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
18090$as_echo "$LDD" >&6; }
18091else
18092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18093$as_echo "no" >&6; }
18094fi
18095
18096
18097        if test "x$LDD" = x; then
18098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18099        fi
18100      else
18101        # Otherwise we believe it is a complete path. Use it as it is.
18102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
18103$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
18104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
18105$as_echo_n "checking for LDD... " >&6; }
18106        if test ! -x "$tool_specified"; then
18107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18108$as_echo "not found" >&6; }
18109          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
18110        fi
18111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18112$as_echo "$tool_specified" >&6; }
18113      fi
18114    fi
18115  fi
18116
18117
18118  if test "x$LDD" = "x"; then
18119    # List shared lib dependencies is used for
18120    # debug output and checking for forbidden dependencies.
18121    # We can build without it.
18122    LDD="true"
18123  fi
18124
18125
18126  # Publish this variable in the help.
18127
18128
18129  if test "x$OTOOL" = x; then
18130    # The variable is not set by user, try to locate tool using the code snippet
18131    for ac_prog in otool
18132do
18133  # Extract the first word of "$ac_prog", so it can be a program name with args.
18134set dummy $ac_prog; ac_word=$2
18135{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18136$as_echo_n "checking for $ac_word... " >&6; }
18137if ${ac_cv_path_OTOOL+:} false; then :
18138  $as_echo_n "(cached) " >&6
18139else
18140  case $OTOOL in
18141  [\\/]* | ?:[\\/]*)
18142  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18143  ;;
18144  *)
18145  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18146for as_dir in $PATH
18147do
18148  IFS=$as_save_IFS
18149  test -z "$as_dir" && as_dir=.
18150    for ac_exec_ext in '' $ac_executable_extensions; do
18151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18152    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18154    break 2
18155  fi
18156done
18157  done
18158IFS=$as_save_IFS
18159
18160  ;;
18161esac
18162fi
18163OTOOL=$ac_cv_path_OTOOL
18164if test -n "$OTOOL"; then
18165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18166$as_echo "$OTOOL" >&6; }
18167else
18168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18169$as_echo "no" >&6; }
18170fi
18171
18172
18173  test -n "$OTOOL" && break
18174done
18175
18176  else
18177    # The variable is set, but is it from the command line or the environment?
18178
18179    # Try to remove the string !OTOOL! from our list.
18180    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18181    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18182      # If it failed, the variable was not from the command line. Ignore it,
18183      # but warn the user (except for BASH, which is always set by the calling BASH).
18184      if test "xOTOOL" != xBASH; then
18185        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18186$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18187      fi
18188      # Try to locate tool using the code snippet
18189      for ac_prog in otool
18190do
18191  # Extract the first word of "$ac_prog", so it can be a program name with args.
18192set dummy $ac_prog; ac_word=$2
18193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18194$as_echo_n "checking for $ac_word... " >&6; }
18195if ${ac_cv_path_OTOOL+:} false; then :
18196  $as_echo_n "(cached) " >&6
18197else
18198  case $OTOOL in
18199  [\\/]* | ?:[\\/]*)
18200  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18201  ;;
18202  *)
18203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18204for as_dir in $PATH
18205do
18206  IFS=$as_save_IFS
18207  test -z "$as_dir" && as_dir=.
18208    for ac_exec_ext in '' $ac_executable_extensions; do
18209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18210    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18212    break 2
18213  fi
18214done
18215  done
18216IFS=$as_save_IFS
18217
18218  ;;
18219esac
18220fi
18221OTOOL=$ac_cv_path_OTOOL
18222if test -n "$OTOOL"; then
18223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18224$as_echo "$OTOOL" >&6; }
18225else
18226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18227$as_echo "no" >&6; }
18228fi
18229
18230
18231  test -n "$OTOOL" && break
18232done
18233
18234    else
18235      # If it succeeded, then it was overridden by the user. We will use it
18236      # for the tool.
18237
18238      # First remove it from the list of overridden variables, so we can test
18239      # for unknown variables in the end.
18240      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18241
18242      # Check if the provided tool contains a complete path.
18243      tool_specified="$OTOOL"
18244      tool_basename="${tool_specified##*/}"
18245      if test "x$tool_basename" = "x$tool_specified"; then
18246        # A command without a complete path is provided, search $PATH.
18247        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18248$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18249        # Extract the first word of "$tool_basename", so it can be a program name with args.
18250set dummy $tool_basename; ac_word=$2
18251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18252$as_echo_n "checking for $ac_word... " >&6; }
18253if ${ac_cv_path_OTOOL+:} false; then :
18254  $as_echo_n "(cached) " >&6
18255else
18256  case $OTOOL in
18257  [\\/]* | ?:[\\/]*)
18258  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18259  ;;
18260  *)
18261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18262for as_dir in $PATH
18263do
18264  IFS=$as_save_IFS
18265  test -z "$as_dir" && as_dir=.
18266    for ac_exec_ext in '' $ac_executable_extensions; do
18267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18268    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18270    break 2
18271  fi
18272done
18273  done
18274IFS=$as_save_IFS
18275
18276  ;;
18277esac
18278fi
18279OTOOL=$ac_cv_path_OTOOL
18280if test -n "$OTOOL"; then
18281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18282$as_echo "$OTOOL" >&6; }
18283else
18284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18285$as_echo "no" >&6; }
18286fi
18287
18288
18289        if test "x$OTOOL" = x; then
18290          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18291        fi
18292      else
18293        # Otherwise we believe it is a complete path. Use it as it is.
18294        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18295$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18296        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18297$as_echo_n "checking for OTOOL... " >&6; }
18298        if test ! -x "$tool_specified"; then
18299          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18300$as_echo "not found" >&6; }
18301          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18302        fi
18303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18304$as_echo "$tool_specified" >&6; }
18305      fi
18306    fi
18307  fi
18308
18309
18310  if test "x$OTOOL" = "x"; then
18311    OTOOL="true"
18312  fi
18313
18314
18315  # Publish this variable in the help.
18316
18317
18318  if test "x$READELF" = x; then
18319    # The variable is not set by user, try to locate tool using the code snippet
18320    for ac_prog in greadelf readelf
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_READELF+:} false; then :
18327  $as_echo_n "(cached) " >&6
18328else
18329  case $READELF in
18330  [\\/]* | ?:[\\/]*)
18331  ac_cv_path_READELF="$READELF" # 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_READELF="$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
18352READELF=$ac_cv_path_READELF
18353if test -n "$READELF"; then
18354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18355$as_echo "$READELF" >&6; }
18356else
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18358$as_echo "no" >&6; }
18359fi
18360
18361
18362  test -n "$READELF" && 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 !READELF! from our list.
18369    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
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 "xREADELF" != xBASH; then
18374        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18375$as_echo "$as_me: WARNING: Ignoring value of READELF 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 greadelf readelf
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_READELF+:} false; then :
18385  $as_echo_n "(cached) " >&6
18386else
18387  case $READELF in
18388  [\\/]* | ?:[\\/]*)
18389  ac_cv_path_READELF="$READELF" # 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_READELF="$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
18410READELF=$ac_cv_path_READELF
18411if test -n "$READELF"; then
18412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18413$as_echo "$READELF" >&6; }
18414else
18415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18416$as_echo "no" >&6; }
18417fi
18418
18419
18420  test -n "$READELF" && 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="$READELF"
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 READELF=$tool_basename" >&5
18437$as_echo "$as_me: Will search for user supplied tool READELF=$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_READELF+:} false; then :
18443  $as_echo_n "(cached) " >&6
18444else
18445  case $READELF in
18446  [\\/]* | ?:[\\/]*)
18447  ac_cv_path_READELF="$READELF" # 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_READELF="$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
18468READELF=$ac_cv_path_READELF
18469if test -n "$READELF"; then
18470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18471$as_echo "$READELF" >&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$READELF" = 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 READELF=$tool_specified" >&5
18484$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18485        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18486$as_echo_n "checking for READELF... " >&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 READELF=$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$HG" = x; then
18505    # The variable is not set by user, try to locate tool using the code snippet
18506    for ac_prog in hg
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_HG+:} false; then :
18513  $as_echo_n "(cached) " >&6
18514else
18515  case $HG in
18516  [\\/]* | ?:[\\/]*)
18517  ac_cv_path_HG="$HG" # 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_HG="$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
18538HG=$ac_cv_path_HG
18539if test -n "$HG"; then
18540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18541$as_echo "$HG" >&6; }
18542else
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18544$as_echo "no" >&6; }
18545fi
18546
18547
18548  test -n "$HG" && 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 !HG! from our list.
18555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
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 "xHG" != xBASH; then
18560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18561$as_echo "$as_me: WARNING: Ignoring value of HG 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 hg
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_HG+:} false; then :
18571  $as_echo_n "(cached) " >&6
18572else
18573  case $HG in
18574  [\\/]* | ?:[\\/]*)
18575  ac_cv_path_HG="$HG" # 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_HG="$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
18596HG=$ac_cv_path_HG
18597if test -n "$HG"; then
18598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18599$as_echo "$HG" >&6; }
18600else
18601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18602$as_echo "no" >&6; }
18603fi
18604
18605
18606  test -n "$HG" && 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="$HG"
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 HG=$tool_basename" >&5
18623$as_echo "$as_me: Will search for user supplied tool HG=$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_HG+:} false; then :
18629  $as_echo_n "(cached) " >&6
18630else
18631  case $HG in
18632  [\\/]* | ?:[\\/]*)
18633  ac_cv_path_HG="$HG" # 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_HG="$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
18654HG=$ac_cv_path_HG
18655if test -n "$HG"; then
18656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18657$as_echo "$HG" >&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$HG" = 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 HG=$tool_specified" >&5
18670$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18672$as_echo_n "checking for HG... " >&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 HG=$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$STAT" = x; then
18691    # The variable is not set by user, try to locate tool using the code snippet
18692    for ac_prog in stat
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_STAT+:} false; then :
18699  $as_echo_n "(cached) " >&6
18700else
18701  case $STAT in
18702  [\\/]* | ?:[\\/]*)
18703  ac_cv_path_STAT="$STAT" # 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_STAT="$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
18724STAT=$ac_cv_path_STAT
18725if test -n "$STAT"; then
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18727$as_echo "$STAT" >&6; }
18728else
18729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18730$as_echo "no" >&6; }
18731fi
18732
18733
18734  test -n "$STAT" && 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 !STAT! from our list.
18741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
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 "xSTAT" != xBASH; then
18746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18747$as_echo "$as_me: WARNING: Ignoring value of STAT 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 stat
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_STAT+:} false; then :
18757  $as_echo_n "(cached) " >&6
18758else
18759  case $STAT in
18760  [\\/]* | ?:[\\/]*)
18761  ac_cv_path_STAT="$STAT" # 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_STAT="$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
18782STAT=$ac_cv_path_STAT
18783if test -n "$STAT"; then
18784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18785$as_echo "$STAT" >&6; }
18786else
18787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18788$as_echo "no" >&6; }
18789fi
18790
18791
18792  test -n "$STAT" && 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="$STAT"
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 STAT=$tool_basename" >&5
18809$as_echo "$as_me: Will search for user supplied tool STAT=$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_STAT+:} false; then :
18815  $as_echo_n "(cached) " >&6
18816else
18817  case $STAT in
18818  [\\/]* | ?:[\\/]*)
18819  ac_cv_path_STAT="$STAT" # 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_STAT="$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
18840STAT=$ac_cv_path_STAT
18841if test -n "$STAT"; then
18842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18843$as_echo "$STAT" >&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$STAT" = 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 STAT=$tool_specified" >&5
18856$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18857        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18858$as_echo_n "checking for STAT... " >&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 STAT=$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$TIME" = x; then
18877    # The variable is not set by user, try to locate tool using the code snippet
18878    for ac_prog in time
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_TIME+:} false; then :
18885  $as_echo_n "(cached) " >&6
18886else
18887  case $TIME in
18888  [\\/]* | ?:[\\/]*)
18889  ac_cv_path_TIME="$TIME" # 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_TIME="$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
18910TIME=$ac_cv_path_TIME
18911if test -n "$TIME"; then
18912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18913$as_echo "$TIME" >&6; }
18914else
18915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18916$as_echo "no" >&6; }
18917fi
18918
18919
18920  test -n "$TIME" && 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 !TIME! from our list.
18927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
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 "xTIME" != xBASH; then
18932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18933$as_echo "$as_me: WARNING: Ignoring value of TIME 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 time
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_TIME+:} false; then :
18943  $as_echo_n "(cached) " >&6
18944else
18945  case $TIME in
18946  [\\/]* | ?:[\\/]*)
18947  ac_cv_path_TIME="$TIME" # 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_TIME="$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
18968TIME=$ac_cv_path_TIME
18969if test -n "$TIME"; then
18970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18971$as_echo "$TIME" >&6; }
18972else
18973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18974$as_echo "no" >&6; }
18975fi
18976
18977
18978  test -n "$TIME" && 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="$TIME"
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 TIME=$tool_basename" >&5
18995$as_echo "$as_me: Will search for user supplied tool TIME=$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_TIME+:} false; then :
19001  $as_echo_n "(cached) " >&6
19002else
19003  case $TIME in
19004  [\\/]* | ?:[\\/]*)
19005  ac_cv_path_TIME="$TIME" # 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_TIME="$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
19026TIME=$ac_cv_path_TIME
19027if test -n "$TIME"; then
19028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
19029$as_echo "$TIME" >&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$TIME" = 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 TIME=$tool_specified" >&5
19042$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
19043        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
19044$as_echo_n "checking for TIME... " >&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 TIME=$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  fi
19656
19657
19658  # Test if bash supports pipefail.
19659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19660$as_echo_n "checking if bash supports pipefail... " >&6; }
19661  if ${BASH} -c 'set -o pipefail'; then
19662    BASH_ARGS="$BASH_ARGS -o pipefail"
19663    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19664$as_echo "yes" >&6; }
19665  else
19666    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19667$as_echo "no" >&6; }
19668  fi
19669
19670  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19671$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19672  if ${BASH} -e -c 'true'; then
19673    BASH_ARGS="$BASH_ARGS -e"
19674    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19675$as_echo "yes" >&6; }
19676  else
19677    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19678$as_echo "no" >&6; }
19679  fi
19680
19681
19682
19683
19684# Check if pkg-config is available.
19685
19686
19687if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19688	if test -n "$ac_tool_prefix"; then
19689  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19690set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19692$as_echo_n "checking for $ac_word... " >&6; }
19693if ${ac_cv_path_PKG_CONFIG+:} false; then :
19694  $as_echo_n "(cached) " >&6
19695else
19696  case $PKG_CONFIG in
19697  [\\/]* | ?:[\\/]*)
19698  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19699  ;;
19700  *)
19701  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19702for as_dir in $PATH
19703do
19704  IFS=$as_save_IFS
19705  test -z "$as_dir" && as_dir=.
19706    for ac_exec_ext in '' $ac_executable_extensions; do
19707  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19708    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19709    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19710    break 2
19711  fi
19712done
19713  done
19714IFS=$as_save_IFS
19715
19716  ;;
19717esac
19718fi
19719PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19720if test -n "$PKG_CONFIG"; then
19721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19722$as_echo "$PKG_CONFIG" >&6; }
19723else
19724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19725$as_echo "no" >&6; }
19726fi
19727
19728
19729fi
19730if test -z "$ac_cv_path_PKG_CONFIG"; then
19731  ac_pt_PKG_CONFIG=$PKG_CONFIG
19732  # Extract the first word of "pkg-config", so it can be a program name with args.
19733set dummy pkg-config; ac_word=$2
19734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19735$as_echo_n "checking for $ac_word... " >&6; }
19736if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19737  $as_echo_n "(cached) " >&6
19738else
19739  case $ac_pt_PKG_CONFIG in
19740  [\\/]* | ?:[\\/]*)
19741  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19742  ;;
19743  *)
19744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19745for as_dir in $PATH
19746do
19747  IFS=$as_save_IFS
19748  test -z "$as_dir" && as_dir=.
19749    for ac_exec_ext in '' $ac_executable_extensions; do
19750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19751    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19753    break 2
19754  fi
19755done
19756  done
19757IFS=$as_save_IFS
19758
19759  ;;
19760esac
19761fi
19762ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19763if test -n "$ac_pt_PKG_CONFIG"; then
19764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19765$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19766else
19767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19768$as_echo "no" >&6; }
19769fi
19770
19771  if test "x$ac_pt_PKG_CONFIG" = x; then
19772    PKG_CONFIG=""
19773  else
19774    case $cross_compiling:$ac_tool_warned in
19775yes:)
19776{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19777$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19778ac_tool_warned=yes ;;
19779esac
19780    PKG_CONFIG=$ac_pt_PKG_CONFIG
19781  fi
19782else
19783  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19784fi
19785
19786fi
19787if test -n "$PKG_CONFIG"; then
19788	_pkg_min_version=0.9.0
19789	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19790$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19791	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19792		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19793$as_echo "yes" >&6; }
19794	else
19795		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19796$as_echo "no" >&6; }
19797		PKG_CONFIG=""
19798	fi
19799
19800fi
19801
19802# After basic tools have been setup, we can check build os specific details.
19803
19804  ###############################################################################
19805
19806  # Note that this is the build platform OS version!
19807
19808  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19809  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19810  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19811  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19812
19813
19814
19815
19816
19817# Setup builddeps, for automatic downloading of tools we need.
19818# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19819# boot-jdk setup, but we need to have basic tools setup first.
19820
19821
19822# Check whether --with-builddeps-conf was given.
19823if test "${with_builddeps_conf+set}" = set; then :
19824  withval=$with_builddeps_conf;
19825fi
19826
19827
19828
19829# Check whether --with-builddeps-server was given.
19830if test "${with_builddeps_server+set}" = set; then :
19831  withval=$with_builddeps_server;
19832fi
19833
19834
19835
19836# Check whether --with-builddeps-dir was given.
19837if test "${with_builddeps_dir+set}" = set; then :
19838  withval=$with_builddeps_dir;
19839else
19840  with_builddeps_dir=/localhome/builddeps
19841fi
19842
19843
19844
19845# Check whether --with-builddeps-group was given.
19846if test "${with_builddeps_group+set}" = set; then :
19847  withval=$with_builddeps_group;
19848fi
19849
19850
19851
19852
19853  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19854    if test "x$with_builddeps_conf" != x; then
19855      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19856$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19857      builddepsfile=$with_builddeps_conf
19858      if test -s $builddepsfile; then
19859        . $builddepsfile
19860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19861$as_echo "loaded!" >&6; }
19862      else
19863        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19864      fi
19865    else
19866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19867$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19868      builddepsfile=`mktemp`
19869      touch $builddepsfile
19870      # Put all found confs into a single file.
19871      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19872      # Source the file to acquire the variables
19873      if test -s $builddepsfile; then
19874        . $builddepsfile
19875        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19876$as_echo "found at least one!" >&6; }
19877      else
19878        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19879      fi
19880    fi
19881    # Create build and target names that use _ instead of "-" and ".".
19882    # This is necessary to use them in variable names.
19883    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19884    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19885    # Extract rewrite information for build and target
19886    eval rewritten_build=\${REWRITE_${build_var}}
19887    if test "x$rewritten_build" = x; then
19888      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19889      echo Build stays the same $rewritten_build
19890    else
19891      echo Rewriting build for builddeps into $rewritten_build
19892    fi
19893    eval rewritten_target=\${REWRITE_${target_var}}
19894    if test "x$rewritten_target" = x; then
19895      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19896      echo Target stays the same $rewritten_target
19897    else
19898      echo Rewriting target for builddeps into $rewritten_target
19899    fi
19900    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19901    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19902  fi
19903  for ac_prog in 7z unzip
19904do
19905  # Extract the first word of "$ac_prog", so it can be a program name with args.
19906set dummy $ac_prog; ac_word=$2
19907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19908$as_echo_n "checking for $ac_word... " >&6; }
19909if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19910  $as_echo_n "(cached) " >&6
19911else
19912  if test -n "$BDEPS_UNZIP"; then
19913  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19914else
19915as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19916for as_dir in $PATH
19917do
19918  IFS=$as_save_IFS
19919  test -z "$as_dir" && as_dir=.
19920    for ac_exec_ext in '' $ac_executable_extensions; do
19921  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19922    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19923    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19924    break 2
19925  fi
19926done
19927  done
19928IFS=$as_save_IFS
19929
19930fi
19931fi
19932BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19933if test -n "$BDEPS_UNZIP"; then
19934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19935$as_echo "$BDEPS_UNZIP" >&6; }
19936else
19937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19938$as_echo "no" >&6; }
19939fi
19940
19941
19942  test -n "$BDEPS_UNZIP" && break
19943done
19944
19945  if test "x$BDEPS_UNZIP" = x7z; then
19946    BDEPS_UNZIP="7z x"
19947  fi
19948
19949  for ac_prog in wget lftp ftp
19950do
19951  # Extract the first word of "$ac_prog", so it can be a program name with args.
19952set dummy $ac_prog; ac_word=$2
19953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19954$as_echo_n "checking for $ac_word... " >&6; }
19955if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19956  $as_echo_n "(cached) " >&6
19957else
19958  if test -n "$BDEPS_FTP"; then
19959  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19960else
19961as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19962for as_dir in $PATH
19963do
19964  IFS=$as_save_IFS
19965  test -z "$as_dir" && as_dir=.
19966    for ac_exec_ext in '' $ac_executable_extensions; do
19967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19968    ac_cv_prog_BDEPS_FTP="$ac_prog"
19969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19970    break 2
19971  fi
19972done
19973  done
19974IFS=$as_save_IFS
19975
19976fi
19977fi
19978BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19979if test -n "$BDEPS_FTP"; then
19980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19981$as_echo "$BDEPS_FTP" >&6; }
19982else
19983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19984$as_echo "no" >&6; }
19985fi
19986
19987
19988  test -n "$BDEPS_FTP" && break
19989done
19990
19991
19992
19993###############################################################################
19994#
19995# Determine OpenJDK variants, options and version numbers.
19996#
19997###############################################################################
19998
19999# We need build & target for this.
20000
20001
20002  ###############################################################################
20003  #
20004  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
20005  # We always build headless support.
20006  #
20007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
20008$as_echo_n "checking headful support... " >&6; }
20009  # Check whether --enable-headful was given.
20010if test "${enable_headful+set}" = set; then :
20011  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
20012else
20013  SUPPORT_HEADFUL=yes
20014fi
20015
20016
20017  SUPPORT_HEADLESS=yes
20018  BUILD_HEADLESS="BUILD_HEADLESS:=true"
20019
20020  if test "x$SUPPORT_HEADFUL" = xyes; then
20021    # We are building both headful and headless.
20022    headful_msg="include support for both headful and headless"
20023  fi
20024
20025  if test "x$SUPPORT_HEADFUL" = xno; then
20026    # Thus we are building headless only.
20027    BUILD_HEADLESS="BUILD_HEADLESS:=true"
20028    headful_msg="headless only"
20029  fi
20030
20031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
20032$as_echo "$headful_msg" >&6; }
20033
20034
20035
20036
20037
20038  # Control wether Hotspot runs Queens test after build.
20039  # Check whether --enable-hotspot-test-in-build was given.
20040if test "${enable_hotspot_test_in_build+set}" = set; then :
20041  enableval=$enable_hotspot_test_in_build;
20042else
20043  enable_hotspot_test_in_build=no
20044fi
20045
20046  if test "x$enable_hotspot_test_in_build" = "xyes"; then
20047    TEST_IN_BUILD=true
20048  else
20049    TEST_IN_BUILD=false
20050  fi
20051
20052
20053  ###############################################################################
20054  #
20055  # Choose cacerts source file
20056  #
20057
20058# Check whether --with-cacerts-file was given.
20059if test "${with_cacerts_file+set}" = set; then :
20060  withval=$with_cacerts_file;
20061fi
20062
20063  if test "x$with_cacerts_file" != x; then
20064    CACERTS_FILE=$with_cacerts_file
20065  fi
20066
20067
20068  ###############################################################################
20069  #
20070  # Enable or disable unlimited crypto
20071  #
20072  # Check whether --enable-unlimited-crypto was given.
20073if test "${enable_unlimited_crypto+set}" = set; then :
20074  enableval=$enable_unlimited_crypto;
20075else
20076  enable_unlimited_crypto=no
20077fi
20078
20079  if test "x$enable_unlimited_crypto" = "xyes"; then
20080    UNLIMITED_CRYPTO=true
20081  else
20082    UNLIMITED_CRYPTO=false
20083  fi
20084
20085
20086  ###############################################################################
20087  #
20088  # Enable or disable the elliptic curve crypto implementation
20089  #
20090
20091
20092  ###############################################################################
20093  #
20094  # --enable-rmiconnector-iiop
20095  #
20096  # Check whether --enable-rmiconnector-iiop was given.
20097if test "${enable_rmiconnector_iiop+set}" = set; then :
20098  enableval=$enable_rmiconnector_iiop;
20099fi
20100
20101  if test "x$enable_rmiconnector_iiop" = "xyes"; then
20102    RMICONNECTOR_IIOP=true
20103  else
20104    RMICONNECTOR_IIOP=false
20105  fi
20106
20107
20108  ###############################################################################
20109  #
20110  # Compress jars
20111  #
20112  COMPRESS_JARS=false
20113
20114
20115
20116
20117  # Source the version numbers
20118  . $AUTOCONF_DIR/version-numbers
20119
20120  # Get the settings from parameters
20121
20122# Check whether --with-milestone was given.
20123if test "${with_milestone+set}" = set; then :
20124  withval=$with_milestone;
20125fi
20126
20127  if test "x$with_milestone" = xyes; then
20128    as_fn_error $? "Milestone must have a value" "$LINENO" 5
20129  elif test "x$with_milestone" != x; then
20130    MILESTONE="$with_milestone"
20131  fi
20132  if test "x$MILESTONE" = x; then
20133    MILESTONE=internal
20134  fi
20135
20136
20137# Check whether --with-update-version was given.
20138if test "${with_update_version+set}" = set; then :
20139  withval=$with_update_version;
20140fi
20141
20142  if test "x$with_update_version" = xyes; then
20143    as_fn_error $? "Update version must have a value" "$LINENO" 5
20144  elif test "x$with_update_version" != x; then
20145    JDK_UPDATE_VERSION="$with_update_version"
20146    # On macosx 10.7, it's not possible to set --with-update-version=0X due
20147    # to a bug in expr (which reduces it to just X). To work around this, we
20148    # always add a 0 to one digit update versions.
20149    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20150      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20151    fi
20152  fi
20153
20154
20155# Check whether --with-user-release-suffix was given.
20156if test "${with_user_release_suffix+set}" = set; then :
20157  withval=$with_user_release_suffix;
20158fi
20159
20160  if test "x$with_user_release_suffix" = xyes; then
20161    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20162  elif test "x$with_user_release_suffix" != x; then
20163    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20164  fi
20165
20166
20167# Check whether --with-build-number was given.
20168if test "${with_build_number+set}" = set; then :
20169  withval=$with_build_number;
20170fi
20171
20172  if test "x$with_build_number" = xyes; then
20173    as_fn_error $? "Build number must have a value" "$LINENO" 5
20174  elif test "x$with_build_number" != x; then
20175    JDK_BUILD_NUMBER="$with_build_number"
20176  fi
20177  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20178  if test "x$JDK_BUILD_NUMBER" = x; then
20179    JDK_BUILD_NUMBER=b00
20180    if test "x$USER_RELEASE_SUFFIX" = x; then
20181      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20182      # Avoid [:alnum:] since it depends on the locale.
20183      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20184      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20185    fi
20186  fi
20187
20188  # Now set the JDK version, milestone, build number etc.
20189
20190
20191
20192
20193
20194
20195
20196
20197
20198
20199
20200
20201
20202
20203
20204
20205# Check whether --with-copyright-year was given.
20206if test "${with_copyright_year+set}" = set; then :
20207  withval=$with_copyright_year;
20208fi
20209
20210  if test "x$with_copyright_year" = xyes; then
20211    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20212  elif test "x$with_copyright_year" != x; then
20213    COPYRIGHT_YEAR="$with_copyright_year"
20214  else
20215    COPYRIGHT_YEAR=`date +'%Y'`
20216  fi
20217
20218
20219  if test "x$JDK_UPDATE_VERSION" != x; then
20220    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20221  else
20222    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20223  fi
20224
20225
20226  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20227
20228
20229
20230###############################################################################
20231#
20232# Setup BootJDK, used to bootstrap the build.
20233#
20234###############################################################################
20235
20236
20237  BOOT_JDK_FOUND=no
20238
20239# Check whether --with-boot-jdk was given.
20240if test "${with_boot_jdk+set}" = set; then :
20241  withval=$with_boot_jdk;
20242fi
20243
20244
20245  # We look for the Boot JDK through various means, going from more certain to
20246  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20247  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20248  # must check if this is indeed valid; otherwise we'll continue looking.
20249
20250  # Test: Is bootjdk explicitely set by command line arguments?
20251
20252  if test "x$BOOT_JDK_FOUND" = xno; then
20253    # Now execute the test
20254
20255  if test "x$with_boot_jdk" != x; then
20256    BOOT_JDK=$with_boot_jdk
20257    BOOT_JDK_FOUND=maybe
20258    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20259$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20260  fi
20261
20262
20263    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20264    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20265      # Do we have a bin/java?
20266      if test ! -x "$BOOT_JDK/bin/java"; then
20267        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20269        BOOT_JDK_FOUND=no
20270      else
20271        # Do we have a bin/javac?
20272        if test ! -x "$BOOT_JDK/bin/javac"; then
20273          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20274$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20275          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20276$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20277          BOOT_JDK_FOUND=no
20278        else
20279          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20280          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20281
20282          # Extra M4 quote needed to protect [] in grep expression.
20283          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20284          if test "x$FOUND_CORRECT_VERSION" = x; then
20285            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20286$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20287            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20288$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20289            BOOT_JDK_FOUND=no
20290          else
20291            # We're done! :-)
20292            BOOT_JDK_FOUND=yes
20293
20294  # Only process if variable expands to non-empty
20295
20296  if test "x$BOOT_JDK" != x; then
20297    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20298
20299  # Input might be given as Windows format, start by converting to
20300  # unix format.
20301  path="$BOOT_JDK"
20302  new_path=`$CYGPATH -u "$path"`
20303
20304  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20305  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20306  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20307  # "foo.exe" is OK but "foo" is an error.
20308  #
20309  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20310  # It is also a way to make sure we got the proper file name for the real test later on.
20311  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20312  if test "x$test_shortpath" = x; then
20313    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20314$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20315    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20316  fi
20317
20318  # Call helper function which possibly converts this using DOS-style short mode.
20319  # If so, the updated path is stored in $new_path.
20320
20321  input_path="$new_path"
20322  # Check if we need to convert this using DOS-style short mode. If the path
20323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20324  # take no chances and rewrite it.
20325  # Note: m4 eats our [], so we need to use [ and ] instead.
20326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20327  if test "x$has_forbidden_chars" != x; then
20328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20329    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20330    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20331    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20332      # Going to short mode and back again did indeed matter. Since short mode is
20333      # case insensitive, let's make it lowercase to improve readability.
20334      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20335      # Now convert it back to Unix-style (cygpath)
20336      input_path=`$CYGPATH -u "$shortmode_path"`
20337      new_path="$input_path"
20338    fi
20339  fi
20340
20341  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20342  if test "x$test_cygdrive_prefix" = x; then
20343    # As a simple fix, exclude /usr/bin since it's not a real path.
20344    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20345      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20346      # a path prefixed by /cygdrive for fixpath to work.
20347      new_path="$CYGWIN_ROOT_PATH$input_path"
20348    fi
20349  fi
20350
20351
20352  if test "x$path" != "x$new_path"; then
20353    BOOT_JDK="$new_path"
20354    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20355$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20356  fi
20357
20358    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20359
20360  path="$BOOT_JDK"
20361  has_colon=`$ECHO $path | $GREP ^.:`
20362  new_path="$path"
20363  if test "x$has_colon" = x; then
20364    # Not in mixed or Windows style, start by that.
20365    new_path=`cmd //c echo $path`
20366  fi
20367
20368
20369  input_path="$new_path"
20370  # Check if we need to convert this using DOS-style short mode. If the path
20371  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20372  # take no chances and rewrite it.
20373  # Note: m4 eats our [], so we need to use [ and ] instead.
20374  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20375  if test "x$has_forbidden_chars" != x; then
20376    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20377    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20378  fi
20379
20380
20381  windows_path="$new_path"
20382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20383    unix_path=`$CYGPATH -u "$windows_path"`
20384    new_path="$unix_path"
20385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20387    new_path="$unix_path"
20388  fi
20389
20390  if test "x$path" != "x$new_path"; then
20391    BOOT_JDK="$new_path"
20392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20393$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20394  fi
20395
20396  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20397  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20398
20399    else
20400      # We're on a unix platform. Hooray! :)
20401      path="$BOOT_JDK"
20402      has_space=`$ECHO "$path" | $GREP " "`
20403      if test "x$has_space" != x; then
20404        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20405$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20406        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20407      fi
20408
20409      # Use eval to expand a potential ~
20410      eval path="$path"
20411      if test ! -f "$path" && test ! -d "$path"; then
20412        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20413      fi
20414
20415      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20416    fi
20417  fi
20418
20419            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20420$as_echo_n "checking for Boot JDK... " >&6; }
20421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20422$as_echo "$BOOT_JDK" >&6; }
20423            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20424$as_echo_n "checking Boot JDK version... " >&6; }
20425            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20426            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20427$as_echo "$BOOT_JDK_VERSION" >&6; }
20428          fi # end check jdk version
20429        fi # end check javac
20430      fi # end check java
20431    fi # end check boot jdk found
20432  fi
20433
20434  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20435    # Having specified an argument which is incorrect will produce an instant failure;
20436    # we should not go on looking
20437    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20438  fi
20439
20440  # Test: Is bootjdk available from builddeps?
20441
20442  if test "x$BOOT_JDK_FOUND" = xno; then
20443    # Now execute the test
20444
20445
20446
20447  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20448    # Source the builddeps file again, to make sure it uses the latest variables!
20449    . $builddepsfile
20450    # Look for a target and build machine specific resource!
20451    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20452    if test "x$resource" = x; then
20453      # Ok, lets instead look for a target specific resource
20454      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20455    fi
20456    if test "x$resource" = x; then
20457      # Ok, lets instead look for a build specific resource
20458      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20459    fi
20460    if test "x$resource" = x; then
20461      # Ok, lets instead look for a generic resource
20462      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20463      resource=${builddep_bootjdk}
20464    fi
20465    if test "x$resource" != x; then
20466      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20467$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20468      # If the resource in the builddeps.conf file is an existing directory,
20469      # for example /java/linux/cups
20470      if test -d ${resource}; then
20471        depdir=${resource}
20472      else
20473
20474  # bootjdk is for example mymodule
20475  # $resource is for example libs/general/libmymod_1_2_3.zip
20476  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20477  # $with_builddeps_dir is for example /localhome/builddeps
20478  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20479  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20480  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20481  filename=`basename $resource`
20482  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20483  filebase=${filename%%.*}
20484  extension=${filename#*.}
20485  installdir=$with_builddeps_dir/$filebase
20486  if test ! -f $installdir/$filename.unpacked; then
20487    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20488$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20489    if test ! -d $installdir; then
20490      mkdir -p $installdir
20491    fi
20492    if test ! -d $installdir; then
20493      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20494    fi
20495    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20496    touch $tmpfile
20497    if test ! -f $tmpfile; then
20498      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20499    fi
20500
20501  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20502  # $tmpfile is the local file name for the downloaded file.
20503  VALID_TOOL=no
20504  if test "x$BDEPS_FTP" = xwget; then
20505    VALID_TOOL=yes
20506    wget -O $tmpfile $with_builddeps_server/$resource
20507  fi
20508  if test "x$BDEPS_FTP" = xlftp; then
20509    VALID_TOOL=yes
20510    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20511  fi
20512  if test "x$BDEPS_FTP" = xftp; then
20513    VALID_TOOL=yes
20514    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20515    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20516    FTPUSERPWD=${FTPSERVER%%@*}
20517    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20518      FTPUSER=${userpwd%%:*}
20519      FTPPWD=${userpwd#*@}
20520      FTPSERVER=${FTPSERVER#*@}
20521    else
20522      FTPUSER=ftp
20523      FTPPWD=ftp
20524    fi
20525    # the "pass" command does not work on some
20526    # ftp clients (read ftp.exe) but if it works,
20527    # passive mode is better!
20528    ( \
20529        echo "user $FTPUSER $FTPPWD"        ; \
20530        echo "pass"                         ; \
20531        echo "bin"                          ; \
20532        echo "get $FTPPATH $tmpfile"              ; \
20533    ) | ftp -in $FTPSERVER
20534  fi
20535  if test "x$VALID_TOOL" != xyes; then
20536    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20537  fi
20538
20539    mv $tmpfile $installdir/$filename
20540    if test ! -s $installdir/$filename; then
20541      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20542    fi
20543    case "$extension" in
20544      zip)  echo "Unzipping $installdir/$filename..."
20545        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20546        ;;
20547      tar.gz) echo "Untaring $installdir/$filename..."
20548        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20549        ;;
20550      tgz) echo "Untaring $installdir/$filename..."
20551        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20552        ;;
20553      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20554        ;;
20555    esac
20556  fi
20557  if test -f $installdir/$filename.unpacked; then
20558    depdir=$installdir
20559  fi
20560
20561      fi
20562      # Source the builddeps file again, because in the previous command, the depdir
20563      # was updated to point at the current build dependency install directory.
20564      . $builddepsfile
20565      # Now extract variables from the builddeps.conf files.
20566      theroot=${builddep_bootjdk_ROOT}
20567      thecflags=${builddep_bootjdk_CFLAGS}
20568      thelibs=${builddep_bootjdk_LIBS}
20569      if test "x$depdir" = x; then
20570        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20571      fi
20572      BOOT_JDK=$depdir
20573      if test "x$theroot" != x; then
20574        BOOT_JDK="$theroot"
20575      fi
20576      if test "x$thecflags" != x; then
20577        BOOT_JDK_CFLAGS="$thecflags"
20578      fi
20579      if test "x$thelibs" != x; then
20580        BOOT_JDK_LIBS="$thelibs"
20581      fi
20582      BOOT_JDK_FOUND=maybe
20583      else BOOT_JDK_FOUND=no
20584
20585    fi
20586    else BOOT_JDK_FOUND=no
20587
20588  fi
20589
20590
20591
20592    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20593    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20594      # Do we have a bin/java?
20595      if test ! -x "$BOOT_JDK/bin/java"; then
20596        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20598        BOOT_JDK_FOUND=no
20599      else
20600        # Do we have a bin/javac?
20601        if test ! -x "$BOOT_JDK/bin/javac"; then
20602          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20603$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20604          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20605$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20606          BOOT_JDK_FOUND=no
20607        else
20608          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20609          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20610
20611          # Extra M4 quote needed to protect [] in grep expression.
20612          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20613          if test "x$FOUND_CORRECT_VERSION" = x; then
20614            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20615$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20616            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20617$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20618            BOOT_JDK_FOUND=no
20619          else
20620            # We're done! :-)
20621            BOOT_JDK_FOUND=yes
20622
20623  # Only process if variable expands to non-empty
20624
20625  if test "x$BOOT_JDK" != x; then
20626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20627
20628  # Input might be given as Windows format, start by converting to
20629  # unix format.
20630  path="$BOOT_JDK"
20631  new_path=`$CYGPATH -u "$path"`
20632
20633  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20634  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20635  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20636  # "foo.exe" is OK but "foo" is an error.
20637  #
20638  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20639  # It is also a way to make sure we got the proper file name for the real test later on.
20640  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20641  if test "x$test_shortpath" = x; then
20642    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20643$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20644    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20645  fi
20646
20647  # Call helper function which possibly converts this using DOS-style short mode.
20648  # If so, the updated path is stored in $new_path.
20649
20650  input_path="$new_path"
20651  # Check if we need to convert this using DOS-style short mode. If the path
20652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20653  # take no chances and rewrite it.
20654  # Note: m4 eats our [], so we need to use [ and ] instead.
20655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20656  if test "x$has_forbidden_chars" != x; then
20657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20658    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20659    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20660    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20661      # Going to short mode and back again did indeed matter. Since short mode is
20662      # case insensitive, let's make it lowercase to improve readability.
20663      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20664      # Now convert it back to Unix-style (cygpath)
20665      input_path=`$CYGPATH -u "$shortmode_path"`
20666      new_path="$input_path"
20667    fi
20668  fi
20669
20670  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20671  if test "x$test_cygdrive_prefix" = x; then
20672    # As a simple fix, exclude /usr/bin since it's not a real path.
20673    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20674      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20675      # a path prefixed by /cygdrive for fixpath to work.
20676      new_path="$CYGWIN_ROOT_PATH$input_path"
20677    fi
20678  fi
20679
20680
20681  if test "x$path" != "x$new_path"; then
20682    BOOT_JDK="$new_path"
20683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20684$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20685  fi
20686
20687    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20688
20689  path="$BOOT_JDK"
20690  has_colon=`$ECHO $path | $GREP ^.:`
20691  new_path="$path"
20692  if test "x$has_colon" = x; then
20693    # Not in mixed or Windows style, start by that.
20694    new_path=`cmd //c echo $path`
20695  fi
20696
20697
20698  input_path="$new_path"
20699  # Check if we need to convert this using DOS-style short mode. If the path
20700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20701  # take no chances and rewrite it.
20702  # Note: m4 eats our [], so we need to use [ and ] instead.
20703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20704  if test "x$has_forbidden_chars" != x; then
20705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20706    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20707  fi
20708
20709
20710  windows_path="$new_path"
20711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20712    unix_path=`$CYGPATH -u "$windows_path"`
20713    new_path="$unix_path"
20714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20716    new_path="$unix_path"
20717  fi
20718
20719  if test "x$path" != "x$new_path"; then
20720    BOOT_JDK="$new_path"
20721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20722$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20723  fi
20724
20725  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20726  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20727
20728    else
20729      # We're on a unix platform. Hooray! :)
20730      path="$BOOT_JDK"
20731      has_space=`$ECHO "$path" | $GREP " "`
20732      if test "x$has_space" != x; then
20733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20734$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20735        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20736      fi
20737
20738      # Use eval to expand a potential ~
20739      eval path="$path"
20740      if test ! -f "$path" && test ! -d "$path"; then
20741        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20742      fi
20743
20744      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20745    fi
20746  fi
20747
20748            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20749$as_echo_n "checking for Boot JDK... " >&6; }
20750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20751$as_echo "$BOOT_JDK" >&6; }
20752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20753$as_echo_n "checking Boot JDK version... " >&6; }
20754            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20756$as_echo "$BOOT_JDK_VERSION" >&6; }
20757          fi # end check jdk version
20758        fi # end check javac
20759      fi # end check java
20760    fi # end check boot jdk found
20761  fi
20762
20763
20764  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20765
20766  if test "x$BOOT_JDK_FOUND" = xno; then
20767    # Now execute the test
20768
20769  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20770    # First check at user selected default
20771
20772  if test "x$BOOT_JDK_FOUND" = xno; then
20773    # Now execute the test
20774
20775  if test -x /usr/libexec/java_home; then
20776    BOOT_JDK=`/usr/libexec/java_home `
20777    BOOT_JDK_FOUND=maybe
20778    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20779$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20780  fi
20781
20782
20783    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20784    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20785      # Do we have a bin/java?
20786      if test ! -x "$BOOT_JDK/bin/java"; then
20787        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20789        BOOT_JDK_FOUND=no
20790      else
20791        # Do we have a bin/javac?
20792        if test ! -x "$BOOT_JDK/bin/javac"; then
20793          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20794$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20795          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20796$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20797          BOOT_JDK_FOUND=no
20798        else
20799          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20800          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20801
20802          # Extra M4 quote needed to protect [] in grep expression.
20803          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20804          if test "x$FOUND_CORRECT_VERSION" = x; then
20805            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20806$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20807            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20808$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20809            BOOT_JDK_FOUND=no
20810          else
20811            # We're done! :-)
20812            BOOT_JDK_FOUND=yes
20813
20814  # Only process if variable expands to non-empty
20815
20816  if test "x$BOOT_JDK" != x; then
20817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20818
20819  # Input might be given as Windows format, start by converting to
20820  # unix format.
20821  path="$BOOT_JDK"
20822  new_path=`$CYGPATH -u "$path"`
20823
20824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20827  # "foo.exe" is OK but "foo" is an error.
20828  #
20829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20830  # It is also a way to make sure we got the proper file name for the real test later on.
20831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20832  if test "x$test_shortpath" = x; then
20833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20834$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20835    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20836  fi
20837
20838  # Call helper function which possibly converts this using DOS-style short mode.
20839  # If so, the updated path is stored in $new_path.
20840
20841  input_path="$new_path"
20842  # Check if we need to convert this using DOS-style short mode. If the path
20843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20844  # take no chances and rewrite it.
20845  # Note: m4 eats our [], so we need to use [ and ] instead.
20846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20847  if test "x$has_forbidden_chars" != x; then
20848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20852      # Going to short mode and back again did indeed matter. Since short mode is
20853      # case insensitive, let's make it lowercase to improve readability.
20854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20855      # Now convert it back to Unix-style (cygpath)
20856      input_path=`$CYGPATH -u "$shortmode_path"`
20857      new_path="$input_path"
20858    fi
20859  fi
20860
20861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20862  if test "x$test_cygdrive_prefix" = x; then
20863    # As a simple fix, exclude /usr/bin since it's not a real path.
20864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20866      # a path prefixed by /cygdrive for fixpath to work.
20867      new_path="$CYGWIN_ROOT_PATH$input_path"
20868    fi
20869  fi
20870
20871
20872  if test "x$path" != "x$new_path"; then
20873    BOOT_JDK="$new_path"
20874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20876  fi
20877
20878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20879
20880  path="$BOOT_JDK"
20881  has_colon=`$ECHO $path | $GREP ^.:`
20882  new_path="$path"
20883  if test "x$has_colon" = x; then
20884    # Not in mixed or Windows style, start by that.
20885    new_path=`cmd //c echo $path`
20886  fi
20887
20888
20889  input_path="$new_path"
20890  # Check if we need to convert this using DOS-style short mode. If the path
20891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20892  # take no chances and rewrite it.
20893  # Note: m4 eats our [], so we need to use [ and ] instead.
20894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20895  if test "x$has_forbidden_chars" != x; then
20896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20898  fi
20899
20900
20901  windows_path="$new_path"
20902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20903    unix_path=`$CYGPATH -u "$windows_path"`
20904    new_path="$unix_path"
20905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20907    new_path="$unix_path"
20908  fi
20909
20910  if test "x$path" != "x$new_path"; then
20911    BOOT_JDK="$new_path"
20912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20913$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20914  fi
20915
20916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20918
20919    else
20920      # We're on a unix platform. Hooray! :)
20921      path="$BOOT_JDK"
20922      has_space=`$ECHO "$path" | $GREP " "`
20923      if test "x$has_space" != x; then
20924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20925$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20927      fi
20928
20929      # Use eval to expand a potential ~
20930      eval path="$path"
20931      if test ! -f "$path" && test ! -d "$path"; then
20932        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20933      fi
20934
20935      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20936    fi
20937  fi
20938
20939            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20940$as_echo_n "checking for Boot JDK... " >&6; }
20941            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20942$as_echo "$BOOT_JDK" >&6; }
20943            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20944$as_echo_n "checking Boot JDK version... " >&6; }
20945            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20947$as_echo "$BOOT_JDK_VERSION" >&6; }
20948          fi # end check jdk version
20949        fi # end check javac
20950      fi # end check java
20951    fi # end check boot jdk found
20952  fi
20953
20954    # If that did not work out (e.g. too old), try explicit versions instead
20955
20956  if test "x$BOOT_JDK_FOUND" = xno; then
20957    # Now execute the test
20958
20959  if test -x /usr/libexec/java_home; then
20960    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20961    BOOT_JDK_FOUND=maybe
20962    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20963$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20964  fi
20965
20966
20967    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20968    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20969      # Do we have a bin/java?
20970      if test ! -x "$BOOT_JDK/bin/java"; then
20971        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20972$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20973        BOOT_JDK_FOUND=no
20974      else
20975        # Do we have a bin/javac?
20976        if test ! -x "$BOOT_JDK/bin/javac"; then
20977          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20978$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20979          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20980$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20981          BOOT_JDK_FOUND=no
20982        else
20983          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20984          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20985
20986          # Extra M4 quote needed to protect [] in grep expression.
20987          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20988          if test "x$FOUND_CORRECT_VERSION" = x; then
20989            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20991            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20992$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20993            BOOT_JDK_FOUND=no
20994          else
20995            # We're done! :-)
20996            BOOT_JDK_FOUND=yes
20997
20998  # Only process if variable expands to non-empty
20999
21000  if test "x$BOOT_JDK" != x; then
21001    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21002
21003  # Input might be given as Windows format, start by converting to
21004  # unix format.
21005  path="$BOOT_JDK"
21006  new_path=`$CYGPATH -u "$path"`
21007
21008  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21009  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21010  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21011  # "foo.exe" is OK but "foo" is an error.
21012  #
21013  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21014  # It is also a way to make sure we got the proper file name for the real test later on.
21015  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21016  if test "x$test_shortpath" = x; then
21017    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21018$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21019    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21020  fi
21021
21022  # Call helper function which possibly converts this using DOS-style short mode.
21023  # If so, the updated path is stored in $new_path.
21024
21025  input_path="$new_path"
21026  # Check if we need to convert this using DOS-style short mode. If the path
21027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21028  # take no chances and rewrite it.
21029  # Note: m4 eats our [], so we need to use [ and ] instead.
21030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21031  if test "x$has_forbidden_chars" != x; then
21032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21036      # Going to short mode and back again did indeed matter. Since short mode is
21037      # case insensitive, let's make it lowercase to improve readability.
21038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21039      # Now convert it back to Unix-style (cygpath)
21040      input_path=`$CYGPATH -u "$shortmode_path"`
21041      new_path="$input_path"
21042    fi
21043  fi
21044
21045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21046  if test "x$test_cygdrive_prefix" = x; then
21047    # As a simple fix, exclude /usr/bin since it's not a real path.
21048    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21050      # a path prefixed by /cygdrive for fixpath to work.
21051      new_path="$CYGWIN_ROOT_PATH$input_path"
21052    fi
21053  fi
21054
21055
21056  if test "x$path" != "x$new_path"; then
21057    BOOT_JDK="$new_path"
21058    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21059$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21060  fi
21061
21062    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21063
21064  path="$BOOT_JDK"
21065  has_colon=`$ECHO $path | $GREP ^.:`
21066  new_path="$path"
21067  if test "x$has_colon" = x; then
21068    # Not in mixed or Windows style, start by that.
21069    new_path=`cmd //c echo $path`
21070  fi
21071
21072
21073  input_path="$new_path"
21074  # Check if we need to convert this using DOS-style short mode. If the path
21075  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21076  # take no chances and rewrite it.
21077  # Note: m4 eats our [], so we need to use [ and ] instead.
21078  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21079  if test "x$has_forbidden_chars" != x; then
21080    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21081    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21082  fi
21083
21084
21085  windows_path="$new_path"
21086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21087    unix_path=`$CYGPATH -u "$windows_path"`
21088    new_path="$unix_path"
21089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21091    new_path="$unix_path"
21092  fi
21093
21094  if test "x$path" != "x$new_path"; then
21095    BOOT_JDK="$new_path"
21096    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21097$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21098  fi
21099
21100  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21101  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21102
21103    else
21104      # We're on a unix platform. Hooray! :)
21105      path="$BOOT_JDK"
21106      has_space=`$ECHO "$path" | $GREP " "`
21107      if test "x$has_space" != x; then
21108        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21109$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21110        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21111      fi
21112
21113      # Use eval to expand a potential ~
21114      eval path="$path"
21115      if test ! -f "$path" && test ! -d "$path"; then
21116        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21117      fi
21118
21119      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21120    fi
21121  fi
21122
21123            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21124$as_echo_n "checking for Boot JDK... " >&6; }
21125            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21126$as_echo "$BOOT_JDK" >&6; }
21127            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21128$as_echo_n "checking Boot JDK version... " >&6; }
21129            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21130            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21131$as_echo "$BOOT_JDK_VERSION" >&6; }
21132          fi # end check jdk version
21133        fi # end check javac
21134      fi # end check java
21135    fi # end check boot jdk found
21136  fi
21137
21138
21139  if test "x$BOOT_JDK_FOUND" = xno; then
21140    # Now execute the test
21141
21142  if test -x /usr/libexec/java_home; then
21143    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
21144    BOOT_JDK_FOUND=maybe
21145    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
21146$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
21147  fi
21148
21149
21150    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21151    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21152      # Do we have a bin/java?
21153      if test ! -x "$BOOT_JDK/bin/java"; then
21154        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21156        BOOT_JDK_FOUND=no
21157      else
21158        # Do we have a bin/javac?
21159        if test ! -x "$BOOT_JDK/bin/javac"; then
21160          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21162          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21163$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21164          BOOT_JDK_FOUND=no
21165        else
21166          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21167          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21168
21169          # Extra M4 quote needed to protect [] in grep expression.
21170          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21171          if test "x$FOUND_CORRECT_VERSION" = x; then
21172            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21174            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21175$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21176            BOOT_JDK_FOUND=no
21177          else
21178            # We're done! :-)
21179            BOOT_JDK_FOUND=yes
21180
21181  # Only process if variable expands to non-empty
21182
21183  if test "x$BOOT_JDK" != x; then
21184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21185
21186  # Input might be given as Windows format, start by converting to
21187  # unix format.
21188  path="$BOOT_JDK"
21189  new_path=`$CYGPATH -u "$path"`
21190
21191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21194  # "foo.exe" is OK but "foo" is an error.
21195  #
21196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21197  # It is also a way to make sure we got the proper file name for the real test later on.
21198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21199  if test "x$test_shortpath" = x; then
21200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21203  fi
21204
21205  # Call helper function which possibly converts this using DOS-style short mode.
21206  # If so, the updated path is stored in $new_path.
21207
21208  input_path="$new_path"
21209  # Check if we need to convert this using DOS-style short mode. If the path
21210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21211  # take no chances and rewrite it.
21212  # Note: m4 eats our [], so we need to use [ and ] instead.
21213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21214  if test "x$has_forbidden_chars" != x; then
21215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21219      # Going to short mode and back again did indeed matter. Since short mode is
21220      # case insensitive, let's make it lowercase to improve readability.
21221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21222      # Now convert it back to Unix-style (cygpath)
21223      input_path=`$CYGPATH -u "$shortmode_path"`
21224      new_path="$input_path"
21225    fi
21226  fi
21227
21228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21229  if test "x$test_cygdrive_prefix" = x; then
21230    # As a simple fix, exclude /usr/bin since it's not a real path.
21231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21233      # a path prefixed by /cygdrive for fixpath to work.
21234      new_path="$CYGWIN_ROOT_PATH$input_path"
21235    fi
21236  fi
21237
21238
21239  if test "x$path" != "x$new_path"; then
21240    BOOT_JDK="$new_path"
21241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21243  fi
21244
21245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21246
21247  path="$BOOT_JDK"
21248  has_colon=`$ECHO $path | $GREP ^.:`
21249  new_path="$path"
21250  if test "x$has_colon" = x; then
21251    # Not in mixed or Windows style, start by that.
21252    new_path=`cmd //c echo $path`
21253  fi
21254
21255
21256  input_path="$new_path"
21257  # Check if we need to convert this using DOS-style short mode. If the path
21258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21259  # take no chances and rewrite it.
21260  # Note: m4 eats our [], so we need to use [ and ] instead.
21261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21262  if test "x$has_forbidden_chars" != x; then
21263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21265  fi
21266
21267
21268  windows_path="$new_path"
21269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21270    unix_path=`$CYGPATH -u "$windows_path"`
21271    new_path="$unix_path"
21272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21274    new_path="$unix_path"
21275  fi
21276
21277  if test "x$path" != "x$new_path"; then
21278    BOOT_JDK="$new_path"
21279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21281  fi
21282
21283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21285
21286    else
21287      # We're on a unix platform. Hooray! :)
21288      path="$BOOT_JDK"
21289      has_space=`$ECHO "$path" | $GREP " "`
21290      if test "x$has_space" != x; then
21291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21294      fi
21295
21296      # Use eval to expand a potential ~
21297      eval path="$path"
21298      if test ! -f "$path" && test ! -d "$path"; then
21299        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21300      fi
21301
21302      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21303    fi
21304  fi
21305
21306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21307$as_echo_n "checking for Boot JDK... " >&6; }
21308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21309$as_echo "$BOOT_JDK" >&6; }
21310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21311$as_echo_n "checking Boot JDK version... " >&6; }
21312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21314$as_echo "$BOOT_JDK_VERSION" >&6; }
21315          fi # end check jdk version
21316        fi # end check javac
21317      fi # end check java
21318    fi # end check boot jdk found
21319  fi
21320
21321
21322  if test "x$BOOT_JDK_FOUND" = xno; then
21323    # Now execute the test
21324
21325  if test -x /usr/libexec/java_home; then
21326    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21327    BOOT_JDK_FOUND=maybe
21328    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21329$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21330  fi
21331
21332
21333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21335      # Do we have a bin/java?
21336      if test ! -x "$BOOT_JDK/bin/java"; then
21337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21339        BOOT_JDK_FOUND=no
21340      else
21341        # Do we have a bin/javac?
21342        if test ! -x "$BOOT_JDK/bin/javac"; then
21343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21347          BOOT_JDK_FOUND=no
21348        else
21349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21351
21352          # Extra M4 quote needed to protect [] in grep expression.
21353          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21354          if test "x$FOUND_CORRECT_VERSION" = x; then
21355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21359            BOOT_JDK_FOUND=no
21360          else
21361            # We're done! :-)
21362            BOOT_JDK_FOUND=yes
21363
21364  # Only process if variable expands to non-empty
21365
21366  if test "x$BOOT_JDK" != x; then
21367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21368
21369  # Input might be given as Windows format, start by converting to
21370  # unix format.
21371  path="$BOOT_JDK"
21372  new_path=`$CYGPATH -u "$path"`
21373
21374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21377  # "foo.exe" is OK but "foo" is an error.
21378  #
21379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21380  # It is also a way to make sure we got the proper file name for the real test later on.
21381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21382  if test "x$test_shortpath" = x; then
21383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21386  fi
21387
21388  # Call helper function which possibly converts this using DOS-style short mode.
21389  # If so, the updated path is stored in $new_path.
21390
21391  input_path="$new_path"
21392  # Check if we need to convert this using DOS-style short mode. If the path
21393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21394  # take no chances and rewrite it.
21395  # Note: m4 eats our [], so we need to use [ and ] instead.
21396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21397  if test "x$has_forbidden_chars" != x; then
21398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21402      # Going to short mode and back again did indeed matter. Since short mode is
21403      # case insensitive, let's make it lowercase to improve readability.
21404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21405      # Now convert it back to Unix-style (cygpath)
21406      input_path=`$CYGPATH -u "$shortmode_path"`
21407      new_path="$input_path"
21408    fi
21409  fi
21410
21411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21412  if test "x$test_cygdrive_prefix" = x; then
21413    # As a simple fix, exclude /usr/bin since it's not a real path.
21414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21416      # a path prefixed by /cygdrive for fixpath to work.
21417      new_path="$CYGWIN_ROOT_PATH$input_path"
21418    fi
21419  fi
21420
21421
21422  if test "x$path" != "x$new_path"; then
21423    BOOT_JDK="$new_path"
21424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21426  fi
21427
21428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21429
21430  path="$BOOT_JDK"
21431  has_colon=`$ECHO $path | $GREP ^.:`
21432  new_path="$path"
21433  if test "x$has_colon" = x; then
21434    # Not in mixed or Windows style, start by that.
21435    new_path=`cmd //c echo $path`
21436  fi
21437
21438
21439  input_path="$new_path"
21440  # Check if we need to convert this using DOS-style short mode. If the path
21441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21442  # take no chances and rewrite it.
21443  # Note: m4 eats our [], so we need to use [ and ] instead.
21444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21445  if test "x$has_forbidden_chars" != x; then
21446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21448  fi
21449
21450
21451  windows_path="$new_path"
21452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21453    unix_path=`$CYGPATH -u "$windows_path"`
21454    new_path="$unix_path"
21455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21457    new_path="$unix_path"
21458  fi
21459
21460  if test "x$path" != "x$new_path"; then
21461    BOOT_JDK="$new_path"
21462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21464  fi
21465
21466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21468
21469    else
21470      # We're on a unix platform. Hooray! :)
21471      path="$BOOT_JDK"
21472      has_space=`$ECHO "$path" | $GREP " "`
21473      if test "x$has_space" != x; then
21474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21477      fi
21478
21479      # Use eval to expand a potential ~
21480      eval path="$path"
21481      if test ! -f "$path" && test ! -d "$path"; then
21482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21483      fi
21484
21485      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21486    fi
21487  fi
21488
21489            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21490$as_echo_n "checking for Boot JDK... " >&6; }
21491            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21492$as_echo "$BOOT_JDK" >&6; }
21493            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21494$as_echo_n "checking Boot JDK version... " >&6; }
21495            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21497$as_echo "$BOOT_JDK_VERSION" >&6; }
21498          fi # end check jdk version
21499        fi # end check javac
21500      fi # end check java
21501    fi # end check boot jdk found
21502  fi
21503
21504  fi
21505
21506
21507    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21508    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21509      # Do we have a bin/java?
21510      if test ! -x "$BOOT_JDK/bin/java"; then
21511        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21512$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21513        BOOT_JDK_FOUND=no
21514      else
21515        # Do we have a bin/javac?
21516        if test ! -x "$BOOT_JDK/bin/javac"; then
21517          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21518$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21519          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21520$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21521          BOOT_JDK_FOUND=no
21522        else
21523          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21524          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21525
21526          # Extra M4 quote needed to protect [] in grep expression.
21527          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21528          if test "x$FOUND_CORRECT_VERSION" = x; then
21529            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21531            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21532$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21533            BOOT_JDK_FOUND=no
21534          else
21535            # We're done! :-)
21536            BOOT_JDK_FOUND=yes
21537
21538  # Only process if variable expands to non-empty
21539
21540  if test "x$BOOT_JDK" != x; then
21541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21542
21543  # Input might be given as Windows format, start by converting to
21544  # unix format.
21545  path="$BOOT_JDK"
21546  new_path=`$CYGPATH -u "$path"`
21547
21548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21551  # "foo.exe" is OK but "foo" is an error.
21552  #
21553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21554  # It is also a way to make sure we got the proper file name for the real test later on.
21555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21556  if test "x$test_shortpath" = x; then
21557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21558$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21559    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21560  fi
21561
21562  # Call helper function which possibly converts this using DOS-style short mode.
21563  # If so, the updated path is stored in $new_path.
21564
21565  input_path="$new_path"
21566  # Check if we need to convert this using DOS-style short mode. If the path
21567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21568  # take no chances and rewrite it.
21569  # Note: m4 eats our [], so we need to use [ and ] instead.
21570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21571  if test "x$has_forbidden_chars" != x; then
21572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21576      # Going to short mode and back again did indeed matter. Since short mode is
21577      # case insensitive, let's make it lowercase to improve readability.
21578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21579      # Now convert it back to Unix-style (cygpath)
21580      input_path=`$CYGPATH -u "$shortmode_path"`
21581      new_path="$input_path"
21582    fi
21583  fi
21584
21585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21586  if test "x$test_cygdrive_prefix" = x; then
21587    # As a simple fix, exclude /usr/bin since it's not a real path.
21588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21590      # a path prefixed by /cygdrive for fixpath to work.
21591      new_path="$CYGWIN_ROOT_PATH$input_path"
21592    fi
21593  fi
21594
21595
21596  if test "x$path" != "x$new_path"; then
21597    BOOT_JDK="$new_path"
21598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21600  fi
21601
21602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21603
21604  path="$BOOT_JDK"
21605  has_colon=`$ECHO $path | $GREP ^.:`
21606  new_path="$path"
21607  if test "x$has_colon" = x; then
21608    # Not in mixed or Windows style, start by that.
21609    new_path=`cmd //c echo $path`
21610  fi
21611
21612
21613  input_path="$new_path"
21614  # Check if we need to convert this using DOS-style short mode. If the path
21615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21616  # take no chances and rewrite it.
21617  # Note: m4 eats our [], so we need to use [ and ] instead.
21618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21619  if test "x$has_forbidden_chars" != x; then
21620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21622  fi
21623
21624
21625  windows_path="$new_path"
21626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21627    unix_path=`$CYGPATH -u "$windows_path"`
21628    new_path="$unix_path"
21629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21631    new_path="$unix_path"
21632  fi
21633
21634  if test "x$path" != "x$new_path"; then
21635    BOOT_JDK="$new_path"
21636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21637$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21638  fi
21639
21640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21642
21643    else
21644      # We're on a unix platform. Hooray! :)
21645      path="$BOOT_JDK"
21646      has_space=`$ECHO "$path" | $GREP " "`
21647      if test "x$has_space" != x; then
21648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21649$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21651      fi
21652
21653      # Use eval to expand a potential ~
21654      eval path="$path"
21655      if test ! -f "$path" && test ! -d "$path"; then
21656        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21657      fi
21658
21659      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21660    fi
21661  fi
21662
21663            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21664$as_echo_n "checking for Boot JDK... " >&6; }
21665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21666$as_echo "$BOOT_JDK" >&6; }
21667            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21668$as_echo_n "checking Boot JDK version... " >&6; }
21669            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21670            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21671$as_echo "$BOOT_JDK_VERSION" >&6; }
21672          fi # end check jdk version
21673        fi # end check javac
21674      fi # end check java
21675    fi # end check boot jdk found
21676  fi
21677
21678
21679  # Test: Is $JAVA_HOME set?
21680
21681  if test "x$BOOT_JDK_FOUND" = xno; then
21682    # Now execute the test
21683
21684  if test "x$JAVA_HOME" != x; then
21685    JAVA_HOME_PROCESSED="$JAVA_HOME"
21686
21687  # Only process if variable expands to non-empty
21688
21689  if test "x$JAVA_HOME_PROCESSED" != x; then
21690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21691
21692  # Input might be given as Windows format, start by converting to
21693  # unix format.
21694  path="$JAVA_HOME_PROCESSED"
21695  new_path=`$CYGPATH -u "$path"`
21696
21697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21700  # "foo.exe" is OK but "foo" is an error.
21701  #
21702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21703  # It is also a way to make sure we got the proper file name for the real test later on.
21704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21705  if test "x$test_shortpath" = x; then
21706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21707$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21708    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21709  fi
21710
21711  # Call helper function which possibly converts this using DOS-style short mode.
21712  # If so, the updated path is stored in $new_path.
21713
21714  input_path="$new_path"
21715  # Check if we need to convert this using DOS-style short mode. If the path
21716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21717  # take no chances and rewrite it.
21718  # Note: m4 eats our [], so we need to use [ and ] instead.
21719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21720  if test "x$has_forbidden_chars" != x; then
21721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21725      # Going to short mode and back again did indeed matter. Since short mode is
21726      # case insensitive, let's make it lowercase to improve readability.
21727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21728      # Now convert it back to Unix-style (cygpath)
21729      input_path=`$CYGPATH -u "$shortmode_path"`
21730      new_path="$input_path"
21731    fi
21732  fi
21733
21734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21735  if test "x$test_cygdrive_prefix" = x; then
21736    # As a simple fix, exclude /usr/bin since it's not a real path.
21737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21739      # a path prefixed by /cygdrive for fixpath to work.
21740      new_path="$CYGWIN_ROOT_PATH$input_path"
21741    fi
21742  fi
21743
21744
21745  if test "x$path" != "x$new_path"; then
21746    JAVA_HOME_PROCESSED="$new_path"
21747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21748$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21749  fi
21750
21751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21752
21753  path="$JAVA_HOME_PROCESSED"
21754  has_colon=`$ECHO $path | $GREP ^.:`
21755  new_path="$path"
21756  if test "x$has_colon" = x; then
21757    # Not in mixed or Windows style, start by that.
21758    new_path=`cmd //c echo $path`
21759  fi
21760
21761
21762  input_path="$new_path"
21763  # Check if we need to convert this using DOS-style short mode. If the path
21764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21765  # take no chances and rewrite it.
21766  # Note: m4 eats our [], so we need to use [ and ] instead.
21767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21768  if test "x$has_forbidden_chars" != x; then
21769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21771  fi
21772
21773
21774  windows_path="$new_path"
21775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21776    unix_path=`$CYGPATH -u "$windows_path"`
21777    new_path="$unix_path"
21778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21780    new_path="$unix_path"
21781  fi
21782
21783  if test "x$path" != "x$new_path"; then
21784    JAVA_HOME_PROCESSED="$new_path"
21785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21786$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21787  fi
21788
21789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21791
21792    else
21793      # We're on a unix platform. Hooray! :)
21794      path="$JAVA_HOME_PROCESSED"
21795      has_space=`$ECHO "$path" | $GREP " "`
21796      if test "x$has_space" != x; then
21797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21798$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21800      fi
21801
21802      # Use eval to expand a potential ~
21803      eval path="$path"
21804      if test ! -f "$path" && test ! -d "$path"; then
21805        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21806      fi
21807
21808      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21809    fi
21810  fi
21811
21812    if test ! -d "$JAVA_HOME_PROCESSED"; then
21813      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21814$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21815    else
21816      # Aha, the user has set a JAVA_HOME
21817      # let us use that as the Boot JDK.
21818      BOOT_JDK="$JAVA_HOME_PROCESSED"
21819      BOOT_JDK_FOUND=maybe
21820      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21821$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21822    fi
21823  fi
21824
21825
21826    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21827    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21828      # Do we have a bin/java?
21829      if test ! -x "$BOOT_JDK/bin/java"; then
21830        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21832        BOOT_JDK_FOUND=no
21833      else
21834        # Do we have a bin/javac?
21835        if test ! -x "$BOOT_JDK/bin/javac"; then
21836          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21839$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21840          BOOT_JDK_FOUND=no
21841        else
21842          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21843          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21844
21845          # Extra M4 quote needed to protect [] in grep expression.
21846          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21847          if test "x$FOUND_CORRECT_VERSION" = x; then
21848            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21850            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21851$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21852            BOOT_JDK_FOUND=no
21853          else
21854            # We're done! :-)
21855            BOOT_JDK_FOUND=yes
21856
21857  # Only process if variable expands to non-empty
21858
21859  if test "x$BOOT_JDK" != x; then
21860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21861
21862  # Input might be given as Windows format, start by converting to
21863  # unix format.
21864  path="$BOOT_JDK"
21865  new_path=`$CYGPATH -u "$path"`
21866
21867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21870  # "foo.exe" is OK but "foo" is an error.
21871  #
21872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21873  # It is also a way to make sure we got the proper file name for the real test later on.
21874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21875  if test "x$test_shortpath" = x; then
21876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21877$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21878    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21879  fi
21880
21881  # Call helper function which possibly converts this using DOS-style short mode.
21882  # If so, the updated path is stored in $new_path.
21883
21884  input_path="$new_path"
21885  # Check if we need to convert this using DOS-style short mode. If the path
21886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21887  # take no chances and rewrite it.
21888  # Note: m4 eats our [], so we need to use [ and ] instead.
21889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21890  if test "x$has_forbidden_chars" != x; then
21891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21895      # Going to short mode and back again did indeed matter. Since short mode is
21896      # case insensitive, let's make it lowercase to improve readability.
21897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21898      # Now convert it back to Unix-style (cygpath)
21899      input_path=`$CYGPATH -u "$shortmode_path"`
21900      new_path="$input_path"
21901    fi
21902  fi
21903
21904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21905  if test "x$test_cygdrive_prefix" = x; then
21906    # As a simple fix, exclude /usr/bin since it's not a real path.
21907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21909      # a path prefixed by /cygdrive for fixpath to work.
21910      new_path="$CYGWIN_ROOT_PATH$input_path"
21911    fi
21912  fi
21913
21914
21915  if test "x$path" != "x$new_path"; then
21916    BOOT_JDK="$new_path"
21917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21919  fi
21920
21921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21922
21923  path="$BOOT_JDK"
21924  has_colon=`$ECHO $path | $GREP ^.:`
21925  new_path="$path"
21926  if test "x$has_colon" = x; then
21927    # Not in mixed or Windows style, start by that.
21928    new_path=`cmd //c echo $path`
21929  fi
21930
21931
21932  input_path="$new_path"
21933  # Check if we need to convert this using DOS-style short mode. If the path
21934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21935  # take no chances and rewrite it.
21936  # Note: m4 eats our [], so we need to use [ and ] instead.
21937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21938  if test "x$has_forbidden_chars" != x; then
21939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21941  fi
21942
21943
21944  windows_path="$new_path"
21945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21946    unix_path=`$CYGPATH -u "$windows_path"`
21947    new_path="$unix_path"
21948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21950    new_path="$unix_path"
21951  fi
21952
21953  if test "x$path" != "x$new_path"; then
21954    BOOT_JDK="$new_path"
21955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21956$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21957  fi
21958
21959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21961
21962    else
21963      # We're on a unix platform. Hooray! :)
21964      path="$BOOT_JDK"
21965      has_space=`$ECHO "$path" | $GREP " "`
21966      if test "x$has_space" != x; then
21967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21968$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21969        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21970      fi
21971
21972      # Use eval to expand a potential ~
21973      eval path="$path"
21974      if test ! -f "$path" && test ! -d "$path"; then
21975        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21976      fi
21977
21978      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21979    fi
21980  fi
21981
21982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21983$as_echo_n "checking for Boot JDK... " >&6; }
21984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21985$as_echo "$BOOT_JDK" >&6; }
21986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21987$as_echo_n "checking Boot JDK version... " >&6; }
21988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21989            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21990$as_echo "$BOOT_JDK_VERSION" >&6; }
21991          fi # end check jdk version
21992        fi # end check javac
21993      fi # end check java
21994    fi # end check boot jdk found
21995  fi
21996
21997
21998  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21999
22000  if test "x$BOOT_JDK_FOUND" = xno; then
22001    # Now execute the test
22002
22003  # Extract the first word of "javac", so it can be a program name with args.
22004set dummy javac; ac_word=$2
22005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22006$as_echo_n "checking for $ac_word... " >&6; }
22007if ${ac_cv_path_JAVAC_CHECK+:} false; then :
22008  $as_echo_n "(cached) " >&6
22009else
22010  case $JAVAC_CHECK in
22011  [\\/]* | ?:[\\/]*)
22012  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
22013  ;;
22014  *)
22015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22016for as_dir in $PATH
22017do
22018  IFS=$as_save_IFS
22019  test -z "$as_dir" && as_dir=.
22020    for ac_exec_ext in '' $ac_executable_extensions; do
22021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22022    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
22023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22024    break 2
22025  fi
22026done
22027  done
22028IFS=$as_save_IFS
22029
22030  ;;
22031esac
22032fi
22033JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
22034if test -n "$JAVAC_CHECK"; then
22035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
22036$as_echo "$JAVAC_CHECK" >&6; }
22037else
22038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22039$as_echo "no" >&6; }
22040fi
22041
22042
22043  # Extract the first word of "java", so it can be a program name with args.
22044set dummy java; ac_word=$2
22045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22046$as_echo_n "checking for $ac_word... " >&6; }
22047if ${ac_cv_path_JAVA_CHECK+:} false; then :
22048  $as_echo_n "(cached) " >&6
22049else
22050  case $JAVA_CHECK in
22051  [\\/]* | ?:[\\/]*)
22052  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
22053  ;;
22054  *)
22055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22056for as_dir in $PATH
22057do
22058  IFS=$as_save_IFS
22059  test -z "$as_dir" && as_dir=.
22060    for ac_exec_ext in '' $ac_executable_extensions; do
22061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22062    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
22063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22064    break 2
22065  fi
22066done
22067  done
22068IFS=$as_save_IFS
22069
22070  ;;
22071esac
22072fi
22073JAVA_CHECK=$ac_cv_path_JAVA_CHECK
22074if test -n "$JAVA_CHECK"; then
22075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
22076$as_echo "$JAVA_CHECK" >&6; }
22077else
22078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22079$as_echo "no" >&6; }
22080fi
22081
22082
22083  BINARY="$JAVAC_CHECK"
22084  if test "x$JAVAC_CHECK" = x; then
22085    BINARY="$JAVA_CHECK"
22086  fi
22087  if test "x$BINARY" != x; then
22088    # So there is a java(c) binary, it might be part of a JDK.
22089    # Lets find the JDK/JRE directory by following symbolic links.
22090    # Linux/GNU systems often have links from /usr/bin/java to
22091    # /etc/alternatives/java to the real JDK binary.
22092
22093  if test "x$OPENJDK_BUILD_OS" != xwindows; then
22094    # Follow a chain of symbolic links. Use readlink
22095    # where it exists, else fall back to horribly
22096    # complicated shell code.
22097    if test "x$READLINK_TESTED" != yes; then
22098      # On MacOSX there is a readlink tool with a different
22099      # purpose than the GNU readlink tool. Check the found readlink.
22100      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
22101      if test "x$ISGNU" = x; then
22102        # A readlink that we do not know how to use.
22103        # Are there other non-GNU readlinks out there?
22104        READLINK_TESTED=yes
22105        READLINK=
22106      fi
22107    fi
22108
22109    if test "x$READLINK" != x; then
22110      BINARY=`$READLINK -f $BINARY`
22111    else
22112      # Save the current directory for restoring afterwards
22113      STARTDIR=$PWD
22114      COUNTER=0
22115      sym_link_dir=`$DIRNAME $BINARY`
22116      sym_link_file=`$BASENAME $BINARY`
22117      cd $sym_link_dir
22118      # Use -P flag to resolve symlinks in directories.
22119      cd `$THEPWDCMD -P`
22120      sym_link_dir=`$THEPWDCMD -P`
22121      # Resolve file symlinks
22122      while test $COUNTER -lt 20; do
22123        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
22124        if test "x$ISLINK" == x; then
22125          # This is not a symbolic link! We are done!
22126          break
22127        fi
22128        # Again resolve directory symlinks since the target of the just found
22129        # link could be in a different directory
22130        cd `$DIRNAME $ISLINK`
22131        sym_link_dir=`$THEPWDCMD -P`
22132        sym_link_file=`$BASENAME $ISLINK`
22133        let COUNTER=COUNTER+1
22134      done
22135      cd $STARTDIR
22136      BINARY=$sym_link_dir/$sym_link_file
22137    fi
22138  fi
22139
22140    BOOT_JDK=`dirname "$BINARY"`
22141    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
22142    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
22143      # Looks like we found ourselves an JDK
22144      BOOT_JDK_FOUND=maybe
22145      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
22146$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
22147    fi
22148  fi
22149
22150
22151    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22152    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22153      # Do we have a bin/java?
22154      if test ! -x "$BOOT_JDK/bin/java"; then
22155        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22156$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22157        BOOT_JDK_FOUND=no
22158      else
22159        # Do we have a bin/javac?
22160        if test ! -x "$BOOT_JDK/bin/javac"; then
22161          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22162$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22163          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22164$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22165          BOOT_JDK_FOUND=no
22166        else
22167          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22168          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22169
22170          # Extra M4 quote needed to protect [] in grep expression.
22171          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22172          if test "x$FOUND_CORRECT_VERSION" = x; then
22173            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22174$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22175            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22176$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22177            BOOT_JDK_FOUND=no
22178          else
22179            # We're done! :-)
22180            BOOT_JDK_FOUND=yes
22181
22182  # Only process if variable expands to non-empty
22183
22184  if test "x$BOOT_JDK" != x; then
22185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22186
22187  # Input might be given as Windows format, start by converting to
22188  # unix format.
22189  path="$BOOT_JDK"
22190  new_path=`$CYGPATH -u "$path"`
22191
22192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22195  # "foo.exe" is OK but "foo" is an error.
22196  #
22197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22198  # It is also a way to make sure we got the proper file name for the real test later on.
22199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22200  if test "x$test_shortpath" = x; then
22201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22203    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22204  fi
22205
22206  # Call helper function which possibly converts this using DOS-style short mode.
22207  # If so, the updated path is stored in $new_path.
22208
22209  input_path="$new_path"
22210  # Check if we need to convert this using DOS-style short mode. If the path
22211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22212  # take no chances and rewrite it.
22213  # Note: m4 eats our [], so we need to use [ and ] instead.
22214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22215  if test "x$has_forbidden_chars" != x; then
22216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22220      # Going to short mode and back again did indeed matter. Since short mode is
22221      # case insensitive, let's make it lowercase to improve readability.
22222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22223      # Now convert it back to Unix-style (cygpath)
22224      input_path=`$CYGPATH -u "$shortmode_path"`
22225      new_path="$input_path"
22226    fi
22227  fi
22228
22229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22230  if test "x$test_cygdrive_prefix" = x; then
22231    # As a simple fix, exclude /usr/bin since it's not a real path.
22232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22234      # a path prefixed by /cygdrive for fixpath to work.
22235      new_path="$CYGWIN_ROOT_PATH$input_path"
22236    fi
22237  fi
22238
22239
22240  if test "x$path" != "x$new_path"; then
22241    BOOT_JDK="$new_path"
22242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22243$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22244  fi
22245
22246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22247
22248  path="$BOOT_JDK"
22249  has_colon=`$ECHO $path | $GREP ^.:`
22250  new_path="$path"
22251  if test "x$has_colon" = x; then
22252    # Not in mixed or Windows style, start by that.
22253    new_path=`cmd //c echo $path`
22254  fi
22255
22256
22257  input_path="$new_path"
22258  # Check if we need to convert this using DOS-style short mode. If the path
22259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22260  # take no chances and rewrite it.
22261  # Note: m4 eats our [], so we need to use [ and ] instead.
22262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22263  if test "x$has_forbidden_chars" != x; then
22264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22266  fi
22267
22268
22269  windows_path="$new_path"
22270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22271    unix_path=`$CYGPATH -u "$windows_path"`
22272    new_path="$unix_path"
22273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22275    new_path="$unix_path"
22276  fi
22277
22278  if test "x$path" != "x$new_path"; then
22279    BOOT_JDK="$new_path"
22280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22281$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22282  fi
22283
22284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22286
22287    else
22288      # We're on a unix platform. Hooray! :)
22289      path="$BOOT_JDK"
22290      has_space=`$ECHO "$path" | $GREP " "`
22291      if test "x$has_space" != x; then
22292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22295      fi
22296
22297      # Use eval to expand a potential ~
22298      eval path="$path"
22299      if test ! -f "$path" && test ! -d "$path"; then
22300        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22301      fi
22302
22303      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22304    fi
22305  fi
22306
22307            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22308$as_echo_n "checking for Boot JDK... " >&6; }
22309            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22310$as_echo "$BOOT_JDK" >&6; }
22311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22312$as_echo_n "checking Boot JDK version... " >&6; }
22313            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22315$as_echo "$BOOT_JDK_VERSION" >&6; }
22316          fi # end check jdk version
22317        fi # end check javac
22318      fi # end check java
22319    fi # end check boot jdk found
22320  fi
22321
22322
22323  # Test: Is there a JDK installed in default, well-known locations?
22324
22325  if test "x$BOOT_JDK_FOUND" = xno; then
22326    # Now execute the test
22327
22328  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22329
22330  if test "x$BOOT_JDK_FOUND" = xno; then
22331    # Now execute the test
22332
22333  if test "x$ProgramW6432" != x; then
22334    VIRTUAL_DIR="$ProgramW6432/Java"
22335
22336  windows_path="$VIRTUAL_DIR"
22337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22338    unix_path=`$CYGPATH -u "$windows_path"`
22339    VIRTUAL_DIR="$unix_path"
22340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22342    VIRTUAL_DIR="$unix_path"
22343  fi
22344
22345
22346  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22347  BOOT_JDK_SUFFIX=""
22348  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22349  if test "x$ALL_JDKS_FOUND" != x; then
22350    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22351
22352  if test "x$BOOT_JDK_FOUND" = xno; then
22353    # Now execute the test
22354
22355        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22356        if test -d "$BOOT_JDK"; then
22357          BOOT_JDK_FOUND=maybe
22358          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22359$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22360        fi
22361
22362
22363    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22364    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22365      # Do we have a bin/java?
22366      if test ! -x "$BOOT_JDK/bin/java"; then
22367        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22368$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22369        BOOT_JDK_FOUND=no
22370      else
22371        # Do we have a bin/javac?
22372        if test ! -x "$BOOT_JDK/bin/javac"; then
22373          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22374$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22375          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22376$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22377          BOOT_JDK_FOUND=no
22378        else
22379          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22380          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22381
22382          # Extra M4 quote needed to protect [] in grep expression.
22383          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22384          if test "x$FOUND_CORRECT_VERSION" = x; then
22385            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22387            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22388$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22389            BOOT_JDK_FOUND=no
22390          else
22391            # We're done! :-)
22392            BOOT_JDK_FOUND=yes
22393
22394  # Only process if variable expands to non-empty
22395
22396  if test "x$BOOT_JDK" != x; then
22397    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22398
22399  # Input might be given as Windows format, start by converting to
22400  # unix format.
22401  path="$BOOT_JDK"
22402  new_path=`$CYGPATH -u "$path"`
22403
22404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22407  # "foo.exe" is OK but "foo" is an error.
22408  #
22409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22410  # It is also a way to make sure we got the proper file name for the real test later on.
22411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22412  if test "x$test_shortpath" = x; then
22413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22415    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22416  fi
22417
22418  # Call helper function which possibly converts this using DOS-style short mode.
22419  # If so, the updated path is stored in $new_path.
22420
22421  input_path="$new_path"
22422  # Check if we need to convert this using DOS-style short mode. If the path
22423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22424  # take no chances and rewrite it.
22425  # Note: m4 eats our [], so we need to use [ and ] instead.
22426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22427  if test "x$has_forbidden_chars" != x; then
22428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22432      # Going to short mode and back again did indeed matter. Since short mode is
22433      # case insensitive, let's make it lowercase to improve readability.
22434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22435      # Now convert it back to Unix-style (cygpath)
22436      input_path=`$CYGPATH -u "$shortmode_path"`
22437      new_path="$input_path"
22438    fi
22439  fi
22440
22441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22442  if test "x$test_cygdrive_prefix" = x; then
22443    # As a simple fix, exclude /usr/bin since it's not a real path.
22444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22446      # a path prefixed by /cygdrive for fixpath to work.
22447      new_path="$CYGWIN_ROOT_PATH$input_path"
22448    fi
22449  fi
22450
22451
22452  if test "x$path" != "x$new_path"; then
22453    BOOT_JDK="$new_path"
22454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22456  fi
22457
22458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22459
22460  path="$BOOT_JDK"
22461  has_colon=`$ECHO $path | $GREP ^.:`
22462  new_path="$path"
22463  if test "x$has_colon" = x; then
22464    # Not in mixed or Windows style, start by that.
22465    new_path=`cmd //c echo $path`
22466  fi
22467
22468
22469  input_path="$new_path"
22470  # Check if we need to convert this using DOS-style short mode. If the path
22471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22472  # take no chances and rewrite it.
22473  # Note: m4 eats our [], so we need to use [ and ] instead.
22474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22475  if test "x$has_forbidden_chars" != x; then
22476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22478  fi
22479
22480
22481  windows_path="$new_path"
22482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22483    unix_path=`$CYGPATH -u "$windows_path"`
22484    new_path="$unix_path"
22485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22487    new_path="$unix_path"
22488  fi
22489
22490  if test "x$path" != "x$new_path"; then
22491    BOOT_JDK="$new_path"
22492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22494  fi
22495
22496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22498
22499    else
22500      # We're on a unix platform. Hooray! :)
22501      path="$BOOT_JDK"
22502      has_space=`$ECHO "$path" | $GREP " "`
22503      if test "x$has_space" != x; then
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22505$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22506        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22507      fi
22508
22509      # Use eval to expand a potential ~
22510      eval path="$path"
22511      if test ! -f "$path" && test ! -d "$path"; then
22512        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22513      fi
22514
22515      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22516    fi
22517  fi
22518
22519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22520$as_echo_n "checking for Boot JDK... " >&6; }
22521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22522$as_echo "$BOOT_JDK" >&6; }
22523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22524$as_echo_n "checking Boot JDK version... " >&6; }
22525            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22527$as_echo "$BOOT_JDK_VERSION" >&6; }
22528          fi # end check jdk version
22529        fi # end check javac
22530      fi # end check java
22531    fi # end check boot jdk found
22532  fi
22533
22534    done
22535  fi
22536
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
22712  if test "x$BOOT_JDK_FOUND" = xno; then
22713    # Now execute the test
22714
22715  if test "x$PROGRAMW6432" != x; then
22716    VIRTUAL_DIR="$PROGRAMW6432/Java"
22717
22718  windows_path="$VIRTUAL_DIR"
22719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22720    unix_path=`$CYGPATH -u "$windows_path"`
22721    VIRTUAL_DIR="$unix_path"
22722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22724    VIRTUAL_DIR="$unix_path"
22725  fi
22726
22727
22728  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22729  BOOT_JDK_SUFFIX=""
22730  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22731  if test "x$ALL_JDKS_FOUND" != x; then
22732    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22733
22734  if test "x$BOOT_JDK_FOUND" = xno; then
22735    # Now execute the test
22736
22737        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22738        if test -d "$BOOT_JDK"; then
22739          BOOT_JDK_FOUND=maybe
22740          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22741$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22742        fi
22743
22744
22745    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22746    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22747      # Do we have a bin/java?
22748      if test ! -x "$BOOT_JDK/bin/java"; then
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22751        BOOT_JDK_FOUND=no
22752      else
22753        # Do we have a bin/javac?
22754        if test ! -x "$BOOT_JDK/bin/javac"; then
22755          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22756$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22757          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22758$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22759          BOOT_JDK_FOUND=no
22760        else
22761          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22762          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22763
22764          # Extra M4 quote needed to protect [] in grep expression.
22765          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22766          if test "x$FOUND_CORRECT_VERSION" = x; then
22767            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22769            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22770$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22771            BOOT_JDK_FOUND=no
22772          else
22773            # We're done! :-)
22774            BOOT_JDK_FOUND=yes
22775
22776  # Only process if variable expands to non-empty
22777
22778  if test "x$BOOT_JDK" != x; then
22779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22780
22781  # Input might be given as Windows format, start by converting to
22782  # unix format.
22783  path="$BOOT_JDK"
22784  new_path=`$CYGPATH -u "$path"`
22785
22786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22789  # "foo.exe" is OK but "foo" is an error.
22790  #
22791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22792  # It is also a way to make sure we got the proper file name for the real test later on.
22793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22794  if test "x$test_shortpath" = x; then
22795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22797    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22798  fi
22799
22800  # Call helper function which possibly converts this using DOS-style short mode.
22801  # If so, the updated path is stored in $new_path.
22802
22803  input_path="$new_path"
22804  # Check if we need to convert this using DOS-style short mode. If the path
22805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22806  # take no chances and rewrite it.
22807  # Note: m4 eats our [], so we need to use [ and ] instead.
22808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22809  if test "x$has_forbidden_chars" != x; then
22810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22814      # Going to short mode and back again did indeed matter. Since short mode is
22815      # case insensitive, let's make it lowercase to improve readability.
22816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22817      # Now convert it back to Unix-style (cygpath)
22818      input_path=`$CYGPATH -u "$shortmode_path"`
22819      new_path="$input_path"
22820    fi
22821  fi
22822
22823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22824  if test "x$test_cygdrive_prefix" = x; then
22825    # As a simple fix, exclude /usr/bin since it's not a real path.
22826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22828      # a path prefixed by /cygdrive for fixpath to work.
22829      new_path="$CYGWIN_ROOT_PATH$input_path"
22830    fi
22831  fi
22832
22833
22834  if test "x$path" != "x$new_path"; then
22835    BOOT_JDK="$new_path"
22836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22837$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22838  fi
22839
22840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22841
22842  path="$BOOT_JDK"
22843  has_colon=`$ECHO $path | $GREP ^.:`
22844  new_path="$path"
22845  if test "x$has_colon" = x; then
22846    # Not in mixed or Windows style, start by that.
22847    new_path=`cmd //c echo $path`
22848  fi
22849
22850
22851  input_path="$new_path"
22852  # Check if we need to convert this using DOS-style short mode. If the path
22853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22854  # take no chances and rewrite it.
22855  # Note: m4 eats our [], so we need to use [ and ] instead.
22856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22857  if test "x$has_forbidden_chars" != x; then
22858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22860  fi
22861
22862
22863  windows_path="$new_path"
22864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22865    unix_path=`$CYGPATH -u "$windows_path"`
22866    new_path="$unix_path"
22867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22869    new_path="$unix_path"
22870  fi
22871
22872  if test "x$path" != "x$new_path"; then
22873    BOOT_JDK="$new_path"
22874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22875$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22876  fi
22877
22878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22880
22881    else
22882      # We're on a unix platform. Hooray! :)
22883      path="$BOOT_JDK"
22884      has_space=`$ECHO "$path" | $GREP " "`
22885      if test "x$has_space" != x; then
22886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22887$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22889      fi
22890
22891      # Use eval to expand a potential ~
22892      eval path="$path"
22893      if test ! -f "$path" && test ! -d "$path"; then
22894        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22895      fi
22896
22897      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22898    fi
22899  fi
22900
22901            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22902$as_echo_n "checking for Boot JDK... " >&6; }
22903            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22904$as_echo "$BOOT_JDK" >&6; }
22905            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22906$as_echo_n "checking Boot JDK version... " >&6; }
22907            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22908            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22909$as_echo "$BOOT_JDK_VERSION" >&6; }
22910          fi # end check jdk version
22911        fi # end check javac
22912      fi # end check java
22913    fi # end check boot jdk found
22914  fi
22915
22916    done
22917  fi
22918
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
23094  if test "x$BOOT_JDK_FOUND" = xno; then
23095    # Now execute the test
23096
23097  if test "x$PROGRAMFILES" != x; then
23098    VIRTUAL_DIR="$PROGRAMFILES/Java"
23099
23100  windows_path="$VIRTUAL_DIR"
23101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23102    unix_path=`$CYGPATH -u "$windows_path"`
23103    VIRTUAL_DIR="$unix_path"
23104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23106    VIRTUAL_DIR="$unix_path"
23107  fi
23108
23109
23110  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23111  BOOT_JDK_SUFFIX=""
23112  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23113  if test "x$ALL_JDKS_FOUND" != x; then
23114    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23115
23116  if test "x$BOOT_JDK_FOUND" = xno; then
23117    # Now execute the test
23118
23119        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23120        if test -d "$BOOT_JDK"; then
23121          BOOT_JDK_FOUND=maybe
23122          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23123$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23124        fi
23125
23126
23127    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23128    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23129      # Do we have a bin/java?
23130      if test ! -x "$BOOT_JDK/bin/java"; then
23131        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23133        BOOT_JDK_FOUND=no
23134      else
23135        # Do we have a bin/javac?
23136        if test ! -x "$BOOT_JDK/bin/javac"; then
23137          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23139          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23140$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23141          BOOT_JDK_FOUND=no
23142        else
23143          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23144          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23145
23146          # Extra M4 quote needed to protect [] in grep expression.
23147          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23148          if test "x$FOUND_CORRECT_VERSION" = x; then
23149            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23150$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23151            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23152$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23153            BOOT_JDK_FOUND=no
23154          else
23155            # We're done! :-)
23156            BOOT_JDK_FOUND=yes
23157
23158  # Only process if variable expands to non-empty
23159
23160  if test "x$BOOT_JDK" != x; then
23161    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23162
23163  # Input might be given as Windows format, start by converting to
23164  # unix format.
23165  path="$BOOT_JDK"
23166  new_path=`$CYGPATH -u "$path"`
23167
23168  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23169  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23170  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23171  # "foo.exe" is OK but "foo" is an error.
23172  #
23173  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23174  # It is also a way to make sure we got the proper file name for the real test later on.
23175  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23176  if test "x$test_shortpath" = x; then
23177    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23178$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23179    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23180  fi
23181
23182  # Call helper function which possibly converts this using DOS-style short mode.
23183  # If so, the updated path is stored in $new_path.
23184
23185  input_path="$new_path"
23186  # Check if we need to convert this using DOS-style short mode. If the path
23187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23188  # take no chances and rewrite it.
23189  # Note: m4 eats our [], so we need to use [ and ] instead.
23190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23191  if test "x$has_forbidden_chars" != x; then
23192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23196      # Going to short mode and back again did indeed matter. Since short mode is
23197      # case insensitive, let's make it lowercase to improve readability.
23198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23199      # Now convert it back to Unix-style (cygpath)
23200      input_path=`$CYGPATH -u "$shortmode_path"`
23201      new_path="$input_path"
23202    fi
23203  fi
23204
23205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23206  if test "x$test_cygdrive_prefix" = x; then
23207    # As a simple fix, exclude /usr/bin since it's not a real path.
23208    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23210      # a path prefixed by /cygdrive for fixpath to work.
23211      new_path="$CYGWIN_ROOT_PATH$input_path"
23212    fi
23213  fi
23214
23215
23216  if test "x$path" != "x$new_path"; then
23217    BOOT_JDK="$new_path"
23218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23219$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23220  fi
23221
23222    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23223
23224  path="$BOOT_JDK"
23225  has_colon=`$ECHO $path | $GREP ^.:`
23226  new_path="$path"
23227  if test "x$has_colon" = x; then
23228    # Not in mixed or Windows style, start by that.
23229    new_path=`cmd //c echo $path`
23230  fi
23231
23232
23233  input_path="$new_path"
23234  # Check if we need to convert this using DOS-style short mode. If the path
23235  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23236  # take no chances and rewrite it.
23237  # Note: m4 eats our [], so we need to use [ and ] instead.
23238  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23239  if test "x$has_forbidden_chars" != x; then
23240    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23241    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23242  fi
23243
23244
23245  windows_path="$new_path"
23246  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23247    unix_path=`$CYGPATH -u "$windows_path"`
23248    new_path="$unix_path"
23249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23250    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23251    new_path="$unix_path"
23252  fi
23253
23254  if test "x$path" != "x$new_path"; then
23255    BOOT_JDK="$new_path"
23256    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23257$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23258  fi
23259
23260  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23261  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23262
23263    else
23264      # We're on a unix platform. Hooray! :)
23265      path="$BOOT_JDK"
23266      has_space=`$ECHO "$path" | $GREP " "`
23267      if test "x$has_space" != x; then
23268        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23270        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23271      fi
23272
23273      # Use eval to expand a potential ~
23274      eval path="$path"
23275      if test ! -f "$path" && test ! -d "$path"; then
23276        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23277      fi
23278
23279      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23280    fi
23281  fi
23282
23283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23284$as_echo_n "checking for Boot JDK... " >&6; }
23285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23286$as_echo "$BOOT_JDK" >&6; }
23287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23288$as_echo_n "checking Boot JDK version... " >&6; }
23289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23291$as_echo "$BOOT_JDK_VERSION" >&6; }
23292          fi # end check jdk version
23293        fi # end check javac
23294      fi # end check java
23295    fi # end check boot jdk found
23296  fi
23297
23298    done
23299  fi
23300
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
23476  if test "x$BOOT_JDK_FOUND" = xno; then
23477    # Now execute the test
23478
23479  if test "x$ProgramFiles" != x; then
23480    VIRTUAL_DIR="$ProgramFiles/Java"
23481
23482  windows_path="$VIRTUAL_DIR"
23483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23484    unix_path=`$CYGPATH -u "$windows_path"`
23485    VIRTUAL_DIR="$unix_path"
23486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23488    VIRTUAL_DIR="$unix_path"
23489  fi
23490
23491
23492  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23493  BOOT_JDK_SUFFIX=""
23494  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23495  if test "x$ALL_JDKS_FOUND" != x; then
23496    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23497
23498  if test "x$BOOT_JDK_FOUND" = xno; then
23499    # Now execute the test
23500
23501        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23502        if test -d "$BOOT_JDK"; then
23503          BOOT_JDK_FOUND=maybe
23504          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23505$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23506        fi
23507
23508
23509    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23510    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23511      # Do we have a bin/java?
23512      if test ! -x "$BOOT_JDK/bin/java"; then
23513        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23514$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23515        BOOT_JDK_FOUND=no
23516      else
23517        # Do we have a bin/javac?
23518        if test ! -x "$BOOT_JDK/bin/javac"; then
23519          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23521          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23522$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23523          BOOT_JDK_FOUND=no
23524        else
23525          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23526          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23527
23528          # Extra M4 quote needed to protect [] in grep expression.
23529          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23530          if test "x$FOUND_CORRECT_VERSION" = x; then
23531            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23532$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23533            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23534$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23535            BOOT_JDK_FOUND=no
23536          else
23537            # We're done! :-)
23538            BOOT_JDK_FOUND=yes
23539
23540  # Only process if variable expands to non-empty
23541
23542  if test "x$BOOT_JDK" != x; then
23543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23544
23545  # Input might be given as Windows format, start by converting to
23546  # unix format.
23547  path="$BOOT_JDK"
23548  new_path=`$CYGPATH -u "$path"`
23549
23550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23553  # "foo.exe" is OK but "foo" is an error.
23554  #
23555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23556  # It is also a way to make sure we got the proper file name for the real test later on.
23557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23558  if test "x$test_shortpath" = x; then
23559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23560$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23561    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23562  fi
23563
23564  # Call helper function which possibly converts this using DOS-style short mode.
23565  # If so, the updated path is stored in $new_path.
23566
23567  input_path="$new_path"
23568  # Check if we need to convert this using DOS-style short mode. If the path
23569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23570  # take no chances and rewrite it.
23571  # Note: m4 eats our [], so we need to use [ and ] instead.
23572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23573  if test "x$has_forbidden_chars" != x; then
23574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23578      # Going to short mode and back again did indeed matter. Since short mode is
23579      # case insensitive, let's make it lowercase to improve readability.
23580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23581      # Now convert it back to Unix-style (cygpath)
23582      input_path=`$CYGPATH -u "$shortmode_path"`
23583      new_path="$input_path"
23584    fi
23585  fi
23586
23587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23588  if test "x$test_cygdrive_prefix" = x; then
23589    # As a simple fix, exclude /usr/bin since it's not a real path.
23590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23592      # a path prefixed by /cygdrive for fixpath to work.
23593      new_path="$CYGWIN_ROOT_PATH$input_path"
23594    fi
23595  fi
23596
23597
23598  if test "x$path" != "x$new_path"; then
23599    BOOT_JDK="$new_path"
23600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23601$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23602  fi
23603
23604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23605
23606  path="$BOOT_JDK"
23607  has_colon=`$ECHO $path | $GREP ^.:`
23608  new_path="$path"
23609  if test "x$has_colon" = x; then
23610    # Not in mixed or Windows style, start by that.
23611    new_path=`cmd //c echo $path`
23612  fi
23613
23614
23615  input_path="$new_path"
23616  # Check if we need to convert this using DOS-style short mode. If the path
23617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23618  # take no chances and rewrite it.
23619  # Note: m4 eats our [], so we need to use [ and ] instead.
23620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23621  if test "x$has_forbidden_chars" != x; then
23622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23624  fi
23625
23626
23627  windows_path="$new_path"
23628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23629    unix_path=`$CYGPATH -u "$windows_path"`
23630    new_path="$unix_path"
23631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23633    new_path="$unix_path"
23634  fi
23635
23636  if test "x$path" != "x$new_path"; then
23637    BOOT_JDK="$new_path"
23638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23639$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23640  fi
23641
23642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23644
23645    else
23646      # We're on a unix platform. Hooray! :)
23647      path="$BOOT_JDK"
23648      has_space=`$ECHO "$path" | $GREP " "`
23649      if test "x$has_space" != x; then
23650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23651$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23653      fi
23654
23655      # Use eval to expand a potential ~
23656      eval path="$path"
23657      if test ! -f "$path" && test ! -d "$path"; then
23658        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23659      fi
23660
23661      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23662    fi
23663  fi
23664
23665            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23666$as_echo_n "checking for Boot JDK... " >&6; }
23667            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23668$as_echo "$BOOT_JDK" >&6; }
23669            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23670$as_echo_n "checking Boot JDK version... " >&6; }
23671            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23672            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23673$as_echo "$BOOT_JDK_VERSION" >&6; }
23674          fi # end check jdk version
23675        fi # end check javac
23676      fi # end check java
23677    fi # end check boot jdk found
23678  fi
23679
23680    done
23681  fi
23682
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
23858  if test "x$BOOT_JDK_FOUND" = xno; then
23859    # Now execute the test
23860
23861  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23862  BOOT_JDK_SUFFIX=""
23863  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23864  if test "x$ALL_JDKS_FOUND" != x; then
23865    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23866
23867  if test "x$BOOT_JDK_FOUND" = xno; then
23868    # Now execute the test
23869
23870        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23871        if test -d "$BOOT_JDK"; then
23872          BOOT_JDK_FOUND=maybe
23873          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23874$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23875        fi
23876
23877
23878    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23879    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23880      # Do we have a bin/java?
23881      if test ! -x "$BOOT_JDK/bin/java"; then
23882        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23883$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23884        BOOT_JDK_FOUND=no
23885      else
23886        # Do we have a bin/javac?
23887        if test ! -x "$BOOT_JDK/bin/javac"; then
23888          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23889$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23890          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23891$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23892          BOOT_JDK_FOUND=no
23893        else
23894          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23895          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23896
23897          # Extra M4 quote needed to protect [] in grep expression.
23898          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23899          if test "x$FOUND_CORRECT_VERSION" = x; then
23900            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23901$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23902            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23903$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23904            BOOT_JDK_FOUND=no
23905          else
23906            # We're done! :-)
23907            BOOT_JDK_FOUND=yes
23908
23909  # Only process if variable expands to non-empty
23910
23911  if test "x$BOOT_JDK" != x; then
23912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23913
23914  # Input might be given as Windows format, start by converting to
23915  # unix format.
23916  path="$BOOT_JDK"
23917  new_path=`$CYGPATH -u "$path"`
23918
23919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23922  # "foo.exe" is OK but "foo" is an error.
23923  #
23924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23925  # It is also a way to make sure we got the proper file name for the real test later on.
23926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23927  if test "x$test_shortpath" = x; then
23928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23930    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23931  fi
23932
23933  # Call helper function which possibly converts this using DOS-style short mode.
23934  # If so, the updated path is stored in $new_path.
23935
23936  input_path="$new_path"
23937  # Check if we need to convert this using DOS-style short mode. If the path
23938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23939  # take no chances and rewrite it.
23940  # Note: m4 eats our [], so we need to use [ and ] instead.
23941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23942  if test "x$has_forbidden_chars" != x; then
23943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23947      # Going to short mode and back again did indeed matter. Since short mode is
23948      # case insensitive, let's make it lowercase to improve readability.
23949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23950      # Now convert it back to Unix-style (cygpath)
23951      input_path=`$CYGPATH -u "$shortmode_path"`
23952      new_path="$input_path"
23953    fi
23954  fi
23955
23956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23957  if test "x$test_cygdrive_prefix" = x; then
23958    # As a simple fix, exclude /usr/bin since it's not a real path.
23959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23961      # a path prefixed by /cygdrive for fixpath to work.
23962      new_path="$CYGWIN_ROOT_PATH$input_path"
23963    fi
23964  fi
23965
23966
23967  if test "x$path" != "x$new_path"; then
23968    BOOT_JDK="$new_path"
23969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23971  fi
23972
23973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23974
23975  path="$BOOT_JDK"
23976  has_colon=`$ECHO $path | $GREP ^.:`
23977  new_path="$path"
23978  if test "x$has_colon" = x; then
23979    # Not in mixed or Windows style, start by that.
23980    new_path=`cmd //c echo $path`
23981  fi
23982
23983
23984  input_path="$new_path"
23985  # Check if we need to convert this using DOS-style short mode. If the path
23986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23987  # take no chances and rewrite it.
23988  # Note: m4 eats our [], so we need to use [ and ] instead.
23989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23990  if test "x$has_forbidden_chars" != x; then
23991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23993  fi
23994
23995
23996  windows_path="$new_path"
23997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23998    unix_path=`$CYGPATH -u "$windows_path"`
23999    new_path="$unix_path"
24000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24002    new_path="$unix_path"
24003  fi
24004
24005  if test "x$path" != "x$new_path"; then
24006    BOOT_JDK="$new_path"
24007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24008$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24009  fi
24010
24011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24013
24014    else
24015      # We're on a unix platform. Hooray! :)
24016      path="$BOOT_JDK"
24017      has_space=`$ECHO "$path" | $GREP " "`
24018      if test "x$has_space" != x; then
24019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24020$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24022      fi
24023
24024      # Use eval to expand a potential ~
24025      eval path="$path"
24026      if test ! -f "$path" && test ! -d "$path"; then
24027        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24028      fi
24029
24030      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24031    fi
24032  fi
24033
24034            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24035$as_echo_n "checking for Boot JDK... " >&6; }
24036            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24037$as_echo "$BOOT_JDK" >&6; }
24038            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24039$as_echo_n "checking Boot JDK version... " >&6; }
24040            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24041            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24042$as_echo "$BOOT_JDK_VERSION" >&6; }
24043          fi # end check jdk version
24044        fi # end check javac
24045      fi # end check java
24046    fi # end check boot jdk found
24047  fi
24048
24049    done
24050  fi
24051
24052
24053    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24054    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24055      # Do we have a bin/java?
24056      if test ! -x "$BOOT_JDK/bin/java"; then
24057        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24059        BOOT_JDK_FOUND=no
24060      else
24061        # Do we have a bin/javac?
24062        if test ! -x "$BOOT_JDK/bin/javac"; then
24063          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24065          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24066$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24067          BOOT_JDK_FOUND=no
24068        else
24069          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24070          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24071
24072          # Extra M4 quote needed to protect [] in grep expression.
24073          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24074          if test "x$FOUND_CORRECT_VERSION" = x; then
24075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24077            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24078$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24079            BOOT_JDK_FOUND=no
24080          else
24081            # We're done! :-)
24082            BOOT_JDK_FOUND=yes
24083
24084  # Only process if variable expands to non-empty
24085
24086  if test "x$BOOT_JDK" != x; then
24087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24088
24089  # Input might be given as Windows format, start by converting to
24090  # unix format.
24091  path="$BOOT_JDK"
24092  new_path=`$CYGPATH -u "$path"`
24093
24094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24097  # "foo.exe" is OK but "foo" is an error.
24098  #
24099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24100  # It is also a way to make sure we got the proper file name for the real test later on.
24101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24102  if test "x$test_shortpath" = x; then
24103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24104$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24105    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24106  fi
24107
24108  # Call helper function which possibly converts this using DOS-style short mode.
24109  # If so, the updated path is stored in $new_path.
24110
24111  input_path="$new_path"
24112  # Check if we need to convert this using DOS-style short mode. If the path
24113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24114  # take no chances and rewrite it.
24115  # Note: m4 eats our [], so we need to use [ and ] instead.
24116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24117  if test "x$has_forbidden_chars" != x; then
24118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24122      # Going to short mode and back again did indeed matter. Since short mode is
24123      # case insensitive, let's make it lowercase to improve readability.
24124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24125      # Now convert it back to Unix-style (cygpath)
24126      input_path=`$CYGPATH -u "$shortmode_path"`
24127      new_path="$input_path"
24128    fi
24129  fi
24130
24131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24132  if test "x$test_cygdrive_prefix" = x; then
24133    # As a simple fix, exclude /usr/bin since it's not a real path.
24134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24136      # a path prefixed by /cygdrive for fixpath to work.
24137      new_path="$CYGWIN_ROOT_PATH$input_path"
24138    fi
24139  fi
24140
24141
24142  if test "x$path" != "x$new_path"; then
24143    BOOT_JDK="$new_path"
24144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24145$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24146  fi
24147
24148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24149
24150  path="$BOOT_JDK"
24151  has_colon=`$ECHO $path | $GREP ^.:`
24152  new_path="$path"
24153  if test "x$has_colon" = x; then
24154    # Not in mixed or Windows style, start by that.
24155    new_path=`cmd //c echo $path`
24156  fi
24157
24158
24159  input_path="$new_path"
24160  # Check if we need to convert this using DOS-style short mode. If the path
24161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24162  # take no chances and rewrite it.
24163  # Note: m4 eats our [], so we need to use [ and ] instead.
24164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24165  if test "x$has_forbidden_chars" != x; then
24166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24168  fi
24169
24170
24171  windows_path="$new_path"
24172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24173    unix_path=`$CYGPATH -u "$windows_path"`
24174    new_path="$unix_path"
24175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24177    new_path="$unix_path"
24178  fi
24179
24180  if test "x$path" != "x$new_path"; then
24181    BOOT_JDK="$new_path"
24182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24183$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24184  fi
24185
24186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24188
24189    else
24190      # We're on a unix platform. Hooray! :)
24191      path="$BOOT_JDK"
24192      has_space=`$ECHO "$path" | $GREP " "`
24193      if test "x$has_space" != x; then
24194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24197      fi
24198
24199      # Use eval to expand a potential ~
24200      eval path="$path"
24201      if test ! -f "$path" && test ! -d "$path"; then
24202        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24203      fi
24204
24205      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24206    fi
24207  fi
24208
24209            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24210$as_echo_n "checking for Boot JDK... " >&6; }
24211            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24212$as_echo "$BOOT_JDK" >&6; }
24213            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24214$as_echo_n "checking Boot JDK version... " >&6; }
24215            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24217$as_echo "$BOOT_JDK_VERSION" >&6; }
24218          fi # end check jdk version
24219        fi # end check javac
24220      fi # end check java
24221    fi # end check boot jdk found
24222  fi
24223
24224  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24225
24226  if test "x$BOOT_JDK_FOUND" = xno; then
24227    # Now execute the test
24228
24229  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24230  BOOT_JDK_SUFFIX="/Contents/Home"
24231  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24232  if test "x$ALL_JDKS_FOUND" != x; then
24233    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24234
24235  if test "x$BOOT_JDK_FOUND" = xno; then
24236    # Now execute the test
24237
24238        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24239        if test -d "$BOOT_JDK"; then
24240          BOOT_JDK_FOUND=maybe
24241          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24242$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24243        fi
24244
24245
24246    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24247    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24248      # Do we have a bin/java?
24249      if test ! -x "$BOOT_JDK/bin/java"; then
24250        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24251$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24252        BOOT_JDK_FOUND=no
24253      else
24254        # Do we have a bin/javac?
24255        if test ! -x "$BOOT_JDK/bin/javac"; then
24256          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24257$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24258          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24259$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24260          BOOT_JDK_FOUND=no
24261        else
24262          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24263          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24264
24265          # Extra M4 quote needed to protect [] in grep expression.
24266          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24267          if test "x$FOUND_CORRECT_VERSION" = x; then
24268            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24269$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24270            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24271$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24272            BOOT_JDK_FOUND=no
24273          else
24274            # We're done! :-)
24275            BOOT_JDK_FOUND=yes
24276
24277  # Only process if variable expands to non-empty
24278
24279  if test "x$BOOT_JDK" != x; then
24280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24281
24282  # Input might be given as Windows format, start by converting to
24283  # unix format.
24284  path="$BOOT_JDK"
24285  new_path=`$CYGPATH -u "$path"`
24286
24287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24290  # "foo.exe" is OK but "foo" is an error.
24291  #
24292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24293  # It is also a way to make sure we got the proper file name for the real test later on.
24294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24295  if test "x$test_shortpath" = x; then
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24298    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24299  fi
24300
24301  # Call helper function which possibly converts this using DOS-style short mode.
24302  # If so, the updated path is stored in $new_path.
24303
24304  input_path="$new_path"
24305  # Check if we need to convert this using DOS-style short mode. If the path
24306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24307  # take no chances and rewrite it.
24308  # Note: m4 eats our [], so we need to use [ and ] instead.
24309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24310  if test "x$has_forbidden_chars" != x; then
24311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24315      # Going to short mode and back again did indeed matter. Since short mode is
24316      # case insensitive, let's make it lowercase to improve readability.
24317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24318      # Now convert it back to Unix-style (cygpath)
24319      input_path=`$CYGPATH -u "$shortmode_path"`
24320      new_path="$input_path"
24321    fi
24322  fi
24323
24324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24325  if test "x$test_cygdrive_prefix" = x; then
24326    # As a simple fix, exclude /usr/bin since it's not a real path.
24327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24329      # a path prefixed by /cygdrive for fixpath to work.
24330      new_path="$CYGWIN_ROOT_PATH$input_path"
24331    fi
24332  fi
24333
24334
24335  if test "x$path" != "x$new_path"; then
24336    BOOT_JDK="$new_path"
24337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24338$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24339  fi
24340
24341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24342
24343  path="$BOOT_JDK"
24344  has_colon=`$ECHO $path | $GREP ^.:`
24345  new_path="$path"
24346  if test "x$has_colon" = x; then
24347    # Not in mixed or Windows style, start by that.
24348    new_path=`cmd //c echo $path`
24349  fi
24350
24351
24352  input_path="$new_path"
24353  # Check if we need to convert this using DOS-style short mode. If the path
24354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24355  # take no chances and rewrite it.
24356  # Note: m4 eats our [], so we need to use [ and ] instead.
24357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24358  if test "x$has_forbidden_chars" != x; then
24359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24361  fi
24362
24363
24364  windows_path="$new_path"
24365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24366    unix_path=`$CYGPATH -u "$windows_path"`
24367    new_path="$unix_path"
24368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24370    new_path="$unix_path"
24371  fi
24372
24373  if test "x$path" != "x$new_path"; then
24374    BOOT_JDK="$new_path"
24375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24376$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24377  fi
24378
24379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24381
24382    else
24383      # We're on a unix platform. Hooray! :)
24384      path="$BOOT_JDK"
24385      has_space=`$ECHO "$path" | $GREP " "`
24386      if test "x$has_space" != x; then
24387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24388$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24390      fi
24391
24392      # Use eval to expand a potential ~
24393      eval path="$path"
24394      if test ! -f "$path" && test ! -d "$path"; then
24395        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24396      fi
24397
24398      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24399    fi
24400  fi
24401
24402            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24403$as_echo_n "checking for Boot JDK... " >&6; }
24404            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24405$as_echo "$BOOT_JDK" >&6; }
24406            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24407$as_echo_n "checking Boot JDK version... " >&6; }
24408            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24410$as_echo "$BOOT_JDK_VERSION" >&6; }
24411          fi # end check jdk version
24412        fi # end check javac
24413      fi # end check java
24414    fi # end check boot jdk found
24415  fi
24416
24417    done
24418  fi
24419
24420
24421    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24422    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24423      # Do we have a bin/java?
24424      if test ! -x "$BOOT_JDK/bin/java"; then
24425        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24426$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24427        BOOT_JDK_FOUND=no
24428      else
24429        # Do we have a bin/javac?
24430        if test ! -x "$BOOT_JDK/bin/javac"; then
24431          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24432$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24433          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24434$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24435          BOOT_JDK_FOUND=no
24436        else
24437          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24438          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24439
24440          # Extra M4 quote needed to protect [] in grep expression.
24441          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24442          if test "x$FOUND_CORRECT_VERSION" = x; then
24443            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24444$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24445            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24446$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24447            BOOT_JDK_FOUND=no
24448          else
24449            # We're done! :-)
24450            BOOT_JDK_FOUND=yes
24451
24452  # Only process if variable expands to non-empty
24453
24454  if test "x$BOOT_JDK" != x; then
24455    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24456
24457  # Input might be given as Windows format, start by converting to
24458  # unix format.
24459  path="$BOOT_JDK"
24460  new_path=`$CYGPATH -u "$path"`
24461
24462  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24463  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24464  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24465  # "foo.exe" is OK but "foo" is an error.
24466  #
24467  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24468  # It is also a way to make sure we got the proper file name for the real test later on.
24469  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24470  if test "x$test_shortpath" = x; then
24471    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24473    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24474  fi
24475
24476  # Call helper function which possibly converts this using DOS-style short mode.
24477  # If so, the updated path is stored in $new_path.
24478
24479  input_path="$new_path"
24480  # Check if we need to convert this using DOS-style short mode. If the path
24481  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24482  # take no chances and rewrite it.
24483  # Note: m4 eats our [], so we need to use [ and ] instead.
24484  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24485  if test "x$has_forbidden_chars" != x; then
24486    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24487    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24488    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24489    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24490      # Going to short mode and back again did indeed matter. Since short mode is
24491      # case insensitive, let's make it lowercase to improve readability.
24492      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24493      # Now convert it back to Unix-style (cygpath)
24494      input_path=`$CYGPATH -u "$shortmode_path"`
24495      new_path="$input_path"
24496    fi
24497  fi
24498
24499  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24500  if test "x$test_cygdrive_prefix" = x; then
24501    # As a simple fix, exclude /usr/bin since it's not a real path.
24502    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24503      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24504      # a path prefixed by /cygdrive for fixpath to work.
24505      new_path="$CYGWIN_ROOT_PATH$input_path"
24506    fi
24507  fi
24508
24509
24510  if test "x$path" != "x$new_path"; then
24511    BOOT_JDK="$new_path"
24512    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24513$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24514  fi
24515
24516    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24517
24518  path="$BOOT_JDK"
24519  has_colon=`$ECHO $path | $GREP ^.:`
24520  new_path="$path"
24521  if test "x$has_colon" = x; then
24522    # Not in mixed or Windows style, start by that.
24523    new_path=`cmd //c echo $path`
24524  fi
24525
24526
24527  input_path="$new_path"
24528  # Check if we need to convert this using DOS-style short mode. If the path
24529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24530  # take no chances and rewrite it.
24531  # Note: m4 eats our [], so we need to use [ and ] instead.
24532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24533  if test "x$has_forbidden_chars" != x; then
24534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24535    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24536  fi
24537
24538
24539  windows_path="$new_path"
24540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24541    unix_path=`$CYGPATH -u "$windows_path"`
24542    new_path="$unix_path"
24543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24545    new_path="$unix_path"
24546  fi
24547
24548  if test "x$path" != "x$new_path"; then
24549    BOOT_JDK="$new_path"
24550    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24551$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24552  fi
24553
24554  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24555  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24556
24557    else
24558      # We're on a unix platform. Hooray! :)
24559      path="$BOOT_JDK"
24560      has_space=`$ECHO "$path" | $GREP " "`
24561      if test "x$has_space" != x; then
24562        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24563$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24564        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24565      fi
24566
24567      # Use eval to expand a potential ~
24568      eval path="$path"
24569      if test ! -f "$path" && test ! -d "$path"; then
24570        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24571      fi
24572
24573      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24574    fi
24575  fi
24576
24577            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24578$as_echo_n "checking for Boot JDK... " >&6; }
24579            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24580$as_echo "$BOOT_JDK" >&6; }
24581            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24582$as_echo_n "checking Boot JDK version... " >&6; }
24583            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24585$as_echo "$BOOT_JDK_VERSION" >&6; }
24586          fi # end check jdk version
24587        fi # end check javac
24588      fi # end check java
24589    fi # end check boot jdk found
24590  fi
24591
24592
24593  if test "x$BOOT_JDK_FOUND" = xno; then
24594    # Now execute the test
24595
24596  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24597  BOOT_JDK_SUFFIX="/Contents/Home"
24598  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24599  if test "x$ALL_JDKS_FOUND" != x; then
24600    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24601
24602  if test "x$BOOT_JDK_FOUND" = xno; then
24603    # Now execute the test
24604
24605        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24606        if test -d "$BOOT_JDK"; then
24607          BOOT_JDK_FOUND=maybe
24608          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24609$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24610        fi
24611
24612
24613    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24614    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24615      # Do we have a bin/java?
24616      if test ! -x "$BOOT_JDK/bin/java"; then
24617        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24618$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24619        BOOT_JDK_FOUND=no
24620      else
24621        # Do we have a bin/javac?
24622        if test ! -x "$BOOT_JDK/bin/javac"; then
24623          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24625          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24626$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24627          BOOT_JDK_FOUND=no
24628        else
24629          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24630          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24631
24632          # Extra M4 quote needed to protect [] in grep expression.
24633          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24634          if test "x$FOUND_CORRECT_VERSION" = x; then
24635            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24636$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24637            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24638$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24639            BOOT_JDK_FOUND=no
24640          else
24641            # We're done! :-)
24642            BOOT_JDK_FOUND=yes
24643
24644  # Only process if variable expands to non-empty
24645
24646  if test "x$BOOT_JDK" != x; then
24647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24648
24649  # Input might be given as Windows format, start by converting to
24650  # unix format.
24651  path="$BOOT_JDK"
24652  new_path=`$CYGPATH -u "$path"`
24653
24654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24657  # "foo.exe" is OK but "foo" is an error.
24658  #
24659  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24660  # It is also a way to make sure we got the proper file name for the real test later on.
24661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24662  if test "x$test_shortpath" = x; then
24663    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24665    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24666  fi
24667
24668  # Call helper function which possibly converts this using DOS-style short mode.
24669  # If so, the updated path is stored in $new_path.
24670
24671  input_path="$new_path"
24672  # Check if we need to convert this using DOS-style short mode. If the path
24673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24674  # take no chances and rewrite it.
24675  # Note: m4 eats our [], so we need to use [ and ] instead.
24676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24677  if test "x$has_forbidden_chars" != x; then
24678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24679    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24680    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24681    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24682      # Going to short mode and back again did indeed matter. Since short mode is
24683      # case insensitive, let's make it lowercase to improve readability.
24684      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24685      # Now convert it back to Unix-style (cygpath)
24686      input_path=`$CYGPATH -u "$shortmode_path"`
24687      new_path="$input_path"
24688    fi
24689  fi
24690
24691  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24692  if test "x$test_cygdrive_prefix" = x; then
24693    # As a simple fix, exclude /usr/bin since it's not a real path.
24694    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24695      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24696      # a path prefixed by /cygdrive for fixpath to work.
24697      new_path="$CYGWIN_ROOT_PATH$input_path"
24698    fi
24699  fi
24700
24701
24702  if test "x$path" != "x$new_path"; then
24703    BOOT_JDK="$new_path"
24704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24706  fi
24707
24708    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24709
24710  path="$BOOT_JDK"
24711  has_colon=`$ECHO $path | $GREP ^.:`
24712  new_path="$path"
24713  if test "x$has_colon" = x; then
24714    # Not in mixed or Windows style, start by that.
24715    new_path=`cmd //c echo $path`
24716  fi
24717
24718
24719  input_path="$new_path"
24720  # Check if we need to convert this using DOS-style short mode. If the path
24721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24722  # take no chances and rewrite it.
24723  # Note: m4 eats our [], so we need to use [ and ] instead.
24724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24725  if test "x$has_forbidden_chars" != x; then
24726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24727    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24728  fi
24729
24730
24731  windows_path="$new_path"
24732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24733    unix_path=`$CYGPATH -u "$windows_path"`
24734    new_path="$unix_path"
24735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24737    new_path="$unix_path"
24738  fi
24739
24740  if test "x$path" != "x$new_path"; then
24741    BOOT_JDK="$new_path"
24742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24743$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24744  fi
24745
24746  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24747  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24748
24749    else
24750      # We're on a unix platform. Hooray! :)
24751      path="$BOOT_JDK"
24752      has_space=`$ECHO "$path" | $GREP " "`
24753      if test "x$has_space" != x; then
24754        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24756        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24757      fi
24758
24759      # Use eval to expand a potential ~
24760      eval path="$path"
24761      if test ! -f "$path" && test ! -d "$path"; then
24762        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24763      fi
24764
24765      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24766    fi
24767  fi
24768
24769            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24770$as_echo_n "checking for Boot JDK... " >&6; }
24771            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24772$as_echo "$BOOT_JDK" >&6; }
24773            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24774$as_echo_n "checking Boot JDK version... " >&6; }
24775            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24777$as_echo "$BOOT_JDK_VERSION" >&6; }
24778          fi # end check jdk version
24779        fi # end check javac
24780      fi # end check java
24781    fi # end check boot jdk found
24782  fi
24783
24784    done
24785  fi
24786
24787
24788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24790      # Do we have a bin/java?
24791      if test ! -x "$BOOT_JDK/bin/java"; then
24792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24794        BOOT_JDK_FOUND=no
24795      else
24796        # Do we have a bin/javac?
24797        if test ! -x "$BOOT_JDK/bin/javac"; then
24798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24802          BOOT_JDK_FOUND=no
24803        else
24804          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24805          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24806
24807          # Extra M4 quote needed to protect [] in grep expression.
24808          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24809          if test "x$FOUND_CORRECT_VERSION" = x; then
24810            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24812            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24813$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24814            BOOT_JDK_FOUND=no
24815          else
24816            # We're done! :-)
24817            BOOT_JDK_FOUND=yes
24818
24819  # Only process if variable expands to non-empty
24820
24821  if test "x$BOOT_JDK" != x; then
24822    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24823
24824  # Input might be given as Windows format, start by converting to
24825  # unix format.
24826  path="$BOOT_JDK"
24827  new_path=`$CYGPATH -u "$path"`
24828
24829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24832  # "foo.exe" is OK but "foo" is an error.
24833  #
24834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24835  # It is also a way to make sure we got the proper file name for the real test later on.
24836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24837  if test "x$test_shortpath" = x; then
24838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24839$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24840    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24841  fi
24842
24843  # Call helper function which possibly converts this using DOS-style short mode.
24844  # If so, the updated path is stored in $new_path.
24845
24846  input_path="$new_path"
24847  # Check if we need to convert this using DOS-style short mode. If the path
24848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24849  # take no chances and rewrite it.
24850  # Note: m4 eats our [], so we need to use [ and ] instead.
24851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24852  if test "x$has_forbidden_chars" != x; then
24853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24857      # Going to short mode and back again did indeed matter. Since short mode is
24858      # case insensitive, let's make it lowercase to improve readability.
24859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24860      # Now convert it back to Unix-style (cygpath)
24861      input_path=`$CYGPATH -u "$shortmode_path"`
24862      new_path="$input_path"
24863    fi
24864  fi
24865
24866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24867  if test "x$test_cygdrive_prefix" = x; then
24868    # As a simple fix, exclude /usr/bin since it's not a real path.
24869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24871      # a path prefixed by /cygdrive for fixpath to work.
24872      new_path="$CYGWIN_ROOT_PATH$input_path"
24873    fi
24874  fi
24875
24876
24877  if test "x$path" != "x$new_path"; then
24878    BOOT_JDK="$new_path"
24879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24880$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24881  fi
24882
24883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24884
24885  path="$BOOT_JDK"
24886  has_colon=`$ECHO $path | $GREP ^.:`
24887  new_path="$path"
24888  if test "x$has_colon" = x; then
24889    # Not in mixed or Windows style, start by that.
24890    new_path=`cmd //c echo $path`
24891  fi
24892
24893
24894  input_path="$new_path"
24895  # Check if we need to convert this using DOS-style short mode. If the path
24896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24897  # take no chances and rewrite it.
24898  # Note: m4 eats our [], so we need to use [ and ] instead.
24899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24900  if test "x$has_forbidden_chars" != x; then
24901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24903  fi
24904
24905
24906  windows_path="$new_path"
24907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24908    unix_path=`$CYGPATH -u "$windows_path"`
24909    new_path="$unix_path"
24910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24912    new_path="$unix_path"
24913  fi
24914
24915  if test "x$path" != "x$new_path"; then
24916    BOOT_JDK="$new_path"
24917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24918$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24919  fi
24920
24921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24923
24924    else
24925      # We're on a unix platform. Hooray! :)
24926      path="$BOOT_JDK"
24927      has_space=`$ECHO "$path" | $GREP " "`
24928      if test "x$has_space" != x; then
24929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24930$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24931        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24932      fi
24933
24934      # Use eval to expand a potential ~
24935      eval path="$path"
24936      if test ! -f "$path" && test ! -d "$path"; then
24937        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24938      fi
24939
24940      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24941    fi
24942  fi
24943
24944            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24945$as_echo_n "checking for Boot JDK... " >&6; }
24946            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24947$as_echo "$BOOT_JDK" >&6; }
24948            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24949$as_echo_n "checking Boot JDK version... " >&6; }
24950            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24952$as_echo "$BOOT_JDK_VERSION" >&6; }
24953          fi # end check jdk version
24954        fi # end check javac
24955      fi # end check java
24956    fi # end check boot jdk found
24957  fi
24958
24959  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24960
24961  if test "x$BOOT_JDK_FOUND" = xno; then
24962    # Now execute the test
24963
24964  BOOT_JDK_PREFIX="/usr/lib/jvm"
24965  BOOT_JDK_SUFFIX=""
24966  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24967  if test "x$ALL_JDKS_FOUND" != x; then
24968    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24969
24970  if test "x$BOOT_JDK_FOUND" = xno; then
24971    # Now execute the test
24972
24973        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24974        if test -d "$BOOT_JDK"; then
24975          BOOT_JDK_FOUND=maybe
24976          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24977$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24978        fi
24979
24980
24981    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24982    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24983      # Do we have a bin/java?
24984      if test ! -x "$BOOT_JDK/bin/java"; then
24985        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24987        BOOT_JDK_FOUND=no
24988      else
24989        # Do we have a bin/javac?
24990        if test ! -x "$BOOT_JDK/bin/javac"; then
24991          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24992$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24993          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24994$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24995          BOOT_JDK_FOUND=no
24996        else
24997          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24998          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24999
25000          # Extra M4 quote needed to protect [] in grep expression.
25001          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25002          if test "x$FOUND_CORRECT_VERSION" = x; then
25003            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25005            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25006$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25007            BOOT_JDK_FOUND=no
25008          else
25009            # We're done! :-)
25010            BOOT_JDK_FOUND=yes
25011
25012  # Only process if variable expands to non-empty
25013
25014  if test "x$BOOT_JDK" != x; then
25015    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25016
25017  # Input might be given as Windows format, start by converting to
25018  # unix format.
25019  path="$BOOT_JDK"
25020  new_path=`$CYGPATH -u "$path"`
25021
25022  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25023  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25024  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25025  # "foo.exe" is OK but "foo" is an error.
25026  #
25027  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25028  # It is also a way to make sure we got the proper file name for the real test later on.
25029  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25030  if test "x$test_shortpath" = x; then
25031    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25032$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25033    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25034  fi
25035
25036  # Call helper function which possibly converts this using DOS-style short mode.
25037  # If so, the updated path is stored in $new_path.
25038
25039  input_path="$new_path"
25040  # Check if we need to convert this using DOS-style short mode. If the path
25041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25042  # take no chances and rewrite it.
25043  # Note: m4 eats our [], so we need to use [ and ] instead.
25044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25045  if test "x$has_forbidden_chars" != x; then
25046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25050      # Going to short mode and back again did indeed matter. Since short mode is
25051      # case insensitive, let's make it lowercase to improve readability.
25052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25053      # Now convert it back to Unix-style (cygpath)
25054      input_path=`$CYGPATH -u "$shortmode_path"`
25055      new_path="$input_path"
25056    fi
25057  fi
25058
25059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25060  if test "x$test_cygdrive_prefix" = x; then
25061    # As a simple fix, exclude /usr/bin since it's not a real path.
25062    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25064      # a path prefixed by /cygdrive for fixpath to work.
25065      new_path="$CYGWIN_ROOT_PATH$input_path"
25066    fi
25067  fi
25068
25069
25070  if test "x$path" != "x$new_path"; then
25071    BOOT_JDK="$new_path"
25072    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25073$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25074  fi
25075
25076    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25077
25078  path="$BOOT_JDK"
25079  has_colon=`$ECHO $path | $GREP ^.:`
25080  new_path="$path"
25081  if test "x$has_colon" = x; then
25082    # Not in mixed or Windows style, start by that.
25083    new_path=`cmd //c echo $path`
25084  fi
25085
25086
25087  input_path="$new_path"
25088  # Check if we need to convert this using DOS-style short mode. If the path
25089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25090  # take no chances and rewrite it.
25091  # Note: m4 eats our [], so we need to use [ and ] instead.
25092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25093  if test "x$has_forbidden_chars" != x; then
25094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25095    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25096  fi
25097
25098
25099  windows_path="$new_path"
25100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25101    unix_path=`$CYGPATH -u "$windows_path"`
25102    new_path="$unix_path"
25103  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25104    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25105    new_path="$unix_path"
25106  fi
25107
25108  if test "x$path" != "x$new_path"; then
25109    BOOT_JDK="$new_path"
25110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25112  fi
25113
25114  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25115  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25116
25117    else
25118      # We're on a unix platform. Hooray! :)
25119      path="$BOOT_JDK"
25120      has_space=`$ECHO "$path" | $GREP " "`
25121      if test "x$has_space" != x; then
25122        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25123$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25124        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25125      fi
25126
25127      # Use eval to expand a potential ~
25128      eval path="$path"
25129      if test ! -f "$path" && test ! -d "$path"; then
25130        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25131      fi
25132
25133      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25134    fi
25135  fi
25136
25137            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25138$as_echo_n "checking for Boot JDK... " >&6; }
25139            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25140$as_echo "$BOOT_JDK" >&6; }
25141            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25142$as_echo_n "checking Boot JDK version... " >&6; }
25143            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25145$as_echo "$BOOT_JDK_VERSION" >&6; }
25146          fi # end check jdk version
25147        fi # end check javac
25148      fi # end check java
25149    fi # end check boot jdk found
25150  fi
25151
25152    done
25153  fi
25154
25155
25156    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25157    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25158      # Do we have a bin/java?
25159      if test ! -x "$BOOT_JDK/bin/java"; then
25160        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25162        BOOT_JDK_FOUND=no
25163      else
25164        # Do we have a bin/javac?
25165        if test ! -x "$BOOT_JDK/bin/javac"; then
25166          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25168          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25169$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25170          BOOT_JDK_FOUND=no
25171        else
25172          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25173          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25174
25175          # Extra M4 quote needed to protect [] in grep expression.
25176          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25177          if test "x$FOUND_CORRECT_VERSION" = x; then
25178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25180            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25181$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25182            BOOT_JDK_FOUND=no
25183          else
25184            # We're done! :-)
25185            BOOT_JDK_FOUND=yes
25186
25187  # Only process if variable expands to non-empty
25188
25189  if test "x$BOOT_JDK" != x; then
25190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25191
25192  # Input might be given as Windows format, start by converting to
25193  # unix format.
25194  path="$BOOT_JDK"
25195  new_path=`$CYGPATH -u "$path"`
25196
25197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25200  # "foo.exe" is OK but "foo" is an error.
25201  #
25202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25203  # It is also a way to make sure we got the proper file name for the real test later on.
25204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25205  if test "x$test_shortpath" = x; then
25206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25208    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25209  fi
25210
25211  # Call helper function which possibly converts this using DOS-style short mode.
25212  # If so, the updated path is stored in $new_path.
25213
25214  input_path="$new_path"
25215  # Check if we need to convert this using DOS-style short mode. If the path
25216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25217  # take no chances and rewrite it.
25218  # Note: m4 eats our [], so we need to use [ and ] instead.
25219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25220  if test "x$has_forbidden_chars" != x; then
25221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25225      # Going to short mode and back again did indeed matter. Since short mode is
25226      # case insensitive, let's make it lowercase to improve readability.
25227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25228      # Now convert it back to Unix-style (cygpath)
25229      input_path=`$CYGPATH -u "$shortmode_path"`
25230      new_path="$input_path"
25231    fi
25232  fi
25233
25234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25235  if test "x$test_cygdrive_prefix" = x; then
25236    # As a simple fix, exclude /usr/bin since it's not a real path.
25237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25239      # a path prefixed by /cygdrive for fixpath to work.
25240      new_path="$CYGWIN_ROOT_PATH$input_path"
25241    fi
25242  fi
25243
25244
25245  if test "x$path" != "x$new_path"; then
25246    BOOT_JDK="$new_path"
25247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25249  fi
25250
25251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25252
25253  path="$BOOT_JDK"
25254  has_colon=`$ECHO $path | $GREP ^.:`
25255  new_path="$path"
25256  if test "x$has_colon" = x; then
25257    # Not in mixed or Windows style, start by that.
25258    new_path=`cmd //c echo $path`
25259  fi
25260
25261
25262  input_path="$new_path"
25263  # Check if we need to convert this using DOS-style short mode. If the path
25264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25265  # take no chances and rewrite it.
25266  # Note: m4 eats our [], so we need to use [ and ] instead.
25267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25268  if test "x$has_forbidden_chars" != x; then
25269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25271  fi
25272
25273
25274  windows_path="$new_path"
25275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25276    unix_path=`$CYGPATH -u "$windows_path"`
25277    new_path="$unix_path"
25278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25280    new_path="$unix_path"
25281  fi
25282
25283  if test "x$path" != "x$new_path"; then
25284    BOOT_JDK="$new_path"
25285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25287  fi
25288
25289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25291
25292    else
25293      # We're on a unix platform. Hooray! :)
25294      path="$BOOT_JDK"
25295      has_space=`$ECHO "$path" | $GREP " "`
25296      if test "x$has_space" != x; then
25297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25300      fi
25301
25302      # Use eval to expand a potential ~
25303      eval path="$path"
25304      if test ! -f "$path" && test ! -d "$path"; then
25305        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25306      fi
25307
25308      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25309    fi
25310  fi
25311
25312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25313$as_echo_n "checking for Boot JDK... " >&6; }
25314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25315$as_echo "$BOOT_JDK" >&6; }
25316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25317$as_echo_n "checking Boot JDK version... " >&6; }
25318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25320$as_echo "$BOOT_JDK_VERSION" >&6; }
25321          fi # end check jdk version
25322        fi # end check javac
25323      fi # end check java
25324    fi # end check boot jdk found
25325  fi
25326
25327  fi
25328
25329
25330    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25331    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25332      # Do we have a bin/java?
25333      if test ! -x "$BOOT_JDK/bin/java"; then
25334        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25336        BOOT_JDK_FOUND=no
25337      else
25338        # Do we have a bin/javac?
25339        if test ! -x "$BOOT_JDK/bin/javac"; then
25340          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25341$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25342          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25343$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25344          BOOT_JDK_FOUND=no
25345        else
25346          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25347          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25348
25349          # Extra M4 quote needed to protect [] in grep expression.
25350          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25351          if test "x$FOUND_CORRECT_VERSION" = x; then
25352            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25353$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25354            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25355$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25356            BOOT_JDK_FOUND=no
25357          else
25358            # We're done! :-)
25359            BOOT_JDK_FOUND=yes
25360
25361  # Only process if variable expands to non-empty
25362
25363  if test "x$BOOT_JDK" != x; then
25364    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25365
25366  # Input might be given as Windows format, start by converting to
25367  # unix format.
25368  path="$BOOT_JDK"
25369  new_path=`$CYGPATH -u "$path"`
25370
25371  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25372  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25373  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25374  # "foo.exe" is OK but "foo" is an error.
25375  #
25376  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25377  # It is also a way to make sure we got the proper file name for the real test later on.
25378  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25379  if test "x$test_shortpath" = x; then
25380    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25381$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25382    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25383  fi
25384
25385  # Call helper function which possibly converts this using DOS-style short mode.
25386  # If so, the updated path is stored in $new_path.
25387
25388  input_path="$new_path"
25389  # Check if we need to convert this using DOS-style short mode. If the path
25390  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25391  # take no chances and rewrite it.
25392  # Note: m4 eats our [], so we need to use [ and ] instead.
25393  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25394  if test "x$has_forbidden_chars" != x; then
25395    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25396    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25397    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25398    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25399      # Going to short mode and back again did indeed matter. Since short mode is
25400      # case insensitive, let's make it lowercase to improve readability.
25401      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25402      # Now convert it back to Unix-style (cygpath)
25403      input_path=`$CYGPATH -u "$shortmode_path"`
25404      new_path="$input_path"
25405    fi
25406  fi
25407
25408  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25409  if test "x$test_cygdrive_prefix" = x; then
25410    # As a simple fix, exclude /usr/bin since it's not a real path.
25411    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25412      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25413      # a path prefixed by /cygdrive for fixpath to work.
25414      new_path="$CYGWIN_ROOT_PATH$input_path"
25415    fi
25416  fi
25417
25418
25419  if test "x$path" != "x$new_path"; then
25420    BOOT_JDK="$new_path"
25421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25422$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25423  fi
25424
25425    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25426
25427  path="$BOOT_JDK"
25428  has_colon=`$ECHO $path | $GREP ^.:`
25429  new_path="$path"
25430  if test "x$has_colon" = x; then
25431    # Not in mixed or Windows style, start by that.
25432    new_path=`cmd //c echo $path`
25433  fi
25434
25435
25436  input_path="$new_path"
25437  # Check if we need to convert this using DOS-style short mode. If the path
25438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25439  # take no chances and rewrite it.
25440  # Note: m4 eats our [], so we need to use [ and ] instead.
25441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25442  if test "x$has_forbidden_chars" != x; then
25443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25445  fi
25446
25447
25448  windows_path="$new_path"
25449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25450    unix_path=`$CYGPATH -u "$windows_path"`
25451    new_path="$unix_path"
25452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25454    new_path="$unix_path"
25455  fi
25456
25457  if test "x$path" != "x$new_path"; then
25458    BOOT_JDK="$new_path"
25459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25461  fi
25462
25463  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25464  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25465
25466    else
25467      # We're on a unix platform. Hooray! :)
25468      path="$BOOT_JDK"
25469      has_space=`$ECHO "$path" | $GREP " "`
25470      if test "x$has_space" != x; then
25471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25472$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25473        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25474      fi
25475
25476      # Use eval to expand a potential ~
25477      eval path="$path"
25478      if test ! -f "$path" && test ! -d "$path"; then
25479        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25480      fi
25481
25482      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25483    fi
25484  fi
25485
25486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25487$as_echo_n "checking for Boot JDK... " >&6; }
25488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25489$as_echo "$BOOT_JDK" >&6; }
25490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25491$as_echo_n "checking Boot JDK version... " >&6; }
25492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25494$as_echo "$BOOT_JDK_VERSION" >&6; }
25495          fi # end check jdk version
25496        fi # end check javac
25497      fi # end check java
25498    fi # end check boot jdk found
25499  fi
25500
25501
25502  # If we haven't found anything yet, we've truly lost. Give up.
25503  if test "x$BOOT_JDK_FOUND" = xno; then
25504
25505  # Print a helpful message on how to acquire the necessary build dependency.
25506  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25507  MISSING_DEPENDENCY=openjdk
25508
25509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25510    cygwin_help $MISSING_DEPENDENCY
25511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25512    msys_help $MISSING_DEPENDENCY
25513  else
25514    PKGHANDLER_COMMAND=
25515
25516    case $PKGHANDLER in
25517      apt-get)
25518        apt_help     $MISSING_DEPENDENCY ;;
25519      yum)
25520        yum_help     $MISSING_DEPENDENCY ;;
25521      port)
25522        port_help    $MISSING_DEPENDENCY ;;
25523      pkgutil)
25524        pkgutil_help $MISSING_DEPENDENCY ;;
25525      pkgadd)
25526        pkgadd_help  $MISSING_DEPENDENCY ;;
25527    esac
25528
25529    if test "x$PKGHANDLER_COMMAND" != x; then
25530      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25531    fi
25532  fi
25533
25534    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25535$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25536    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25537$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25538    as_fn_error $? "Cannot continue" "$LINENO" 5
25539  fi
25540
25541
25542
25543  # Setup tools from the Boot JDK.
25544
25545  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25546
25547  # Publish this variable in the help.
25548
25549
25550  if test "x$JAVA" = x; then
25551    # The variable is not set by user, try to locate tool using the code snippet
25552
25553      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25554$as_echo_n "checking for java in Boot JDK... " >&6; }
25555      JAVA=$BOOT_JDK/bin/java
25556      if test ! -x $JAVA; then
25557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25558$as_echo "not found" >&6; }
25559        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25560$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25561        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25562      fi
25563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25564$as_echo "ok" >&6; }
25565
25566
25567  else
25568    # The variable is set, but is it from the command line or the environment?
25569
25570    # Try to remove the string !JAVA! from our list.
25571    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25572    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25573      # If it failed, the variable was not from the command line. Ignore it,
25574      # but warn the user (except for BASH, which is always set by the calling BASH).
25575      if test "xJAVA" != xBASH; then
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25577$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25578      fi
25579      # Try to locate tool using the code snippet
25580
25581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25582$as_echo_n "checking for java in Boot JDK... " >&6; }
25583      JAVA=$BOOT_JDK/bin/java
25584      if test ! -x $JAVA; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25586$as_echo "not found" >&6; }
25587        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25588$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25589        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25590      fi
25591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25592$as_echo "ok" >&6; }
25593
25594
25595    else
25596      # If it succeeded, then it was overridden by the user. We will use it
25597      # for the tool.
25598
25599      # First remove it from the list of overridden variables, so we can test
25600      # for unknown variables in the end.
25601      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25602
25603      # Check if the provided tool contains a complete path.
25604      tool_specified="$JAVA"
25605      tool_basename="${tool_specified##*/}"
25606      if test "x$tool_basename" = "x$tool_specified"; then
25607        # A command without a complete path is provided, search $PATH.
25608        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25609$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25610        # Extract the first word of "$tool_basename", so it can be a program name with args.
25611set dummy $tool_basename; ac_word=$2
25612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25613$as_echo_n "checking for $ac_word... " >&6; }
25614if ${ac_cv_path_JAVA+:} false; then :
25615  $as_echo_n "(cached) " >&6
25616else
25617  case $JAVA in
25618  [\\/]* | ?:[\\/]*)
25619  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25620  ;;
25621  *)
25622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25623for as_dir in $PATH
25624do
25625  IFS=$as_save_IFS
25626  test -z "$as_dir" && as_dir=.
25627    for ac_exec_ext in '' $ac_executable_extensions; do
25628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25629    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25631    break 2
25632  fi
25633done
25634  done
25635IFS=$as_save_IFS
25636
25637  ;;
25638esac
25639fi
25640JAVA=$ac_cv_path_JAVA
25641if test -n "$JAVA"; then
25642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25643$as_echo "$JAVA" >&6; }
25644else
25645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25646$as_echo "no" >&6; }
25647fi
25648
25649
25650        if test "x$JAVA" = x; then
25651          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25652        fi
25653      else
25654        # Otherwise we believe it is a complete path. Use it as it is.
25655        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25656$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25658$as_echo_n "checking for JAVA... " >&6; }
25659        if test ! -x "$tool_specified"; then
25660          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25661$as_echo "not found" >&6; }
25662          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25663        fi
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25665$as_echo "$tool_specified" >&6; }
25666      fi
25667    fi
25668  fi
25669
25670
25671
25672  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25673
25674  # Publish this variable in the help.
25675
25676
25677  if test "x$JAVAC" = x; then
25678    # The variable is not set by user, try to locate tool using the code snippet
25679
25680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25681$as_echo_n "checking for javac in Boot JDK... " >&6; }
25682      JAVAC=$BOOT_JDK/bin/javac
25683      if test ! -x $JAVAC; then
25684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25685$as_echo "not found" >&6; }
25686        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25687$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25688        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25689      fi
25690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25691$as_echo "ok" >&6; }
25692
25693
25694  else
25695    # The variable is set, but is it from the command line or the environment?
25696
25697    # Try to remove the string !JAVAC! from our list.
25698    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25699    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25700      # If it failed, the variable was not from the command line. Ignore it,
25701      # but warn the user (except for BASH, which is always set by the calling BASH).
25702      if test "xJAVAC" != xBASH; then
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25704$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25705      fi
25706      # Try to locate tool using the code snippet
25707
25708      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25709$as_echo_n "checking for javac in Boot JDK... " >&6; }
25710      JAVAC=$BOOT_JDK/bin/javac
25711      if test ! -x $JAVAC; then
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25713$as_echo "not found" >&6; }
25714        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25715$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25716        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25717      fi
25718      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25719$as_echo "ok" >&6; }
25720
25721
25722    else
25723      # If it succeeded, then it was overridden by the user. We will use it
25724      # for the tool.
25725
25726      # First remove it from the list of overridden variables, so we can test
25727      # for unknown variables in the end.
25728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25729
25730      # Check if the provided tool contains a complete path.
25731      tool_specified="$JAVAC"
25732      tool_basename="${tool_specified##*/}"
25733      if test "x$tool_basename" = "x$tool_specified"; then
25734        # A command without a complete path is provided, search $PATH.
25735        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25736$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25737        # Extract the first word of "$tool_basename", so it can be a program name with args.
25738set dummy $tool_basename; ac_word=$2
25739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25740$as_echo_n "checking for $ac_word... " >&6; }
25741if ${ac_cv_path_JAVAC+:} false; then :
25742  $as_echo_n "(cached) " >&6
25743else
25744  case $JAVAC in
25745  [\\/]* | ?:[\\/]*)
25746  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25747  ;;
25748  *)
25749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25750for as_dir in $PATH
25751do
25752  IFS=$as_save_IFS
25753  test -z "$as_dir" && as_dir=.
25754    for ac_exec_ext in '' $ac_executable_extensions; do
25755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25756    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25758    break 2
25759  fi
25760done
25761  done
25762IFS=$as_save_IFS
25763
25764  ;;
25765esac
25766fi
25767JAVAC=$ac_cv_path_JAVAC
25768if test -n "$JAVAC"; then
25769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25770$as_echo "$JAVAC" >&6; }
25771else
25772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25773$as_echo "no" >&6; }
25774fi
25775
25776
25777        if test "x$JAVAC" = x; then
25778          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25779        fi
25780      else
25781        # Otherwise we believe it is a complete path. Use it as it is.
25782        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25783$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25784        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25785$as_echo_n "checking for JAVAC... " >&6; }
25786        if test ! -x "$tool_specified"; then
25787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25788$as_echo "not found" >&6; }
25789          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25790        fi
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25792$as_echo "$tool_specified" >&6; }
25793      fi
25794    fi
25795  fi
25796
25797
25798
25799  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25800
25801  # Publish this variable in the help.
25802
25803
25804  if test "x$JAVAH" = x; then
25805    # The variable is not set by user, try to locate tool using the code snippet
25806
25807      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25808$as_echo_n "checking for javah in Boot JDK... " >&6; }
25809      JAVAH=$BOOT_JDK/bin/javah
25810      if test ! -x $JAVAH; then
25811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25812$as_echo "not found" >&6; }
25813        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25814$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25815        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25816      fi
25817      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25818$as_echo "ok" >&6; }
25819
25820
25821  else
25822    # The variable is set, but is it from the command line or the environment?
25823
25824    # Try to remove the string !JAVAH! from our list.
25825    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25826    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25827      # If it failed, the variable was not from the command line. Ignore it,
25828      # but warn the user (except for BASH, which is always set by the calling BASH).
25829      if test "xJAVAH" != xBASH; then
25830        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25831$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25832      fi
25833      # Try to locate tool using the code snippet
25834
25835      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25836$as_echo_n "checking for javah in Boot JDK... " >&6; }
25837      JAVAH=$BOOT_JDK/bin/javah
25838      if test ! -x $JAVAH; then
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25840$as_echo "not found" >&6; }
25841        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25842$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25843        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25844      fi
25845      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25846$as_echo "ok" >&6; }
25847
25848
25849    else
25850      # If it succeeded, then it was overridden by the user. We will use it
25851      # for the tool.
25852
25853      # First remove it from the list of overridden variables, so we can test
25854      # for unknown variables in the end.
25855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25856
25857      # Check if the provided tool contains a complete path.
25858      tool_specified="$JAVAH"
25859      tool_basename="${tool_specified##*/}"
25860      if test "x$tool_basename" = "x$tool_specified"; then
25861        # A command without a complete path is provided, search $PATH.
25862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25863$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25864        # Extract the first word of "$tool_basename", so it can be a program name with args.
25865set dummy $tool_basename; ac_word=$2
25866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25867$as_echo_n "checking for $ac_word... " >&6; }
25868if ${ac_cv_path_JAVAH+:} false; then :
25869  $as_echo_n "(cached) " >&6
25870else
25871  case $JAVAH in
25872  [\\/]* | ?:[\\/]*)
25873  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25874  ;;
25875  *)
25876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25877for as_dir in $PATH
25878do
25879  IFS=$as_save_IFS
25880  test -z "$as_dir" && as_dir=.
25881    for ac_exec_ext in '' $ac_executable_extensions; do
25882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25883    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25885    break 2
25886  fi
25887done
25888  done
25889IFS=$as_save_IFS
25890
25891  ;;
25892esac
25893fi
25894JAVAH=$ac_cv_path_JAVAH
25895if test -n "$JAVAH"; then
25896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25897$as_echo "$JAVAH" >&6; }
25898else
25899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25900$as_echo "no" >&6; }
25901fi
25902
25903
25904        if test "x$JAVAH" = x; then
25905          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25906        fi
25907      else
25908        # Otherwise we believe it is a complete path. Use it as it is.
25909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25910$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25912$as_echo_n "checking for JAVAH... " >&6; }
25913        if test ! -x "$tool_specified"; then
25914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25915$as_echo "not found" >&6; }
25916          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25917        fi
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25919$as_echo "$tool_specified" >&6; }
25920      fi
25921    fi
25922  fi
25923
25924
25925
25926  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25927
25928  # Publish this variable in the help.
25929
25930
25931  if test "x$JAR" = x; then
25932    # The variable is not set by user, try to locate tool using the code snippet
25933
25934      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25935$as_echo_n "checking for jar in Boot JDK... " >&6; }
25936      JAR=$BOOT_JDK/bin/jar
25937      if test ! -x $JAR; then
25938        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25939$as_echo "not found" >&6; }
25940        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25941$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25942        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25943      fi
25944      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25945$as_echo "ok" >&6; }
25946
25947
25948  else
25949    # The variable is set, but is it from the command line or the environment?
25950
25951    # Try to remove the string !JAR! from our list.
25952    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25953    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25954      # If it failed, the variable was not from the command line. Ignore it,
25955      # but warn the user (except for BASH, which is always set by the calling BASH).
25956      if test "xJAR" != xBASH; then
25957        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25958$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25959      fi
25960      # Try to locate tool using the code snippet
25961
25962      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25963$as_echo_n "checking for jar in Boot JDK... " >&6; }
25964      JAR=$BOOT_JDK/bin/jar
25965      if test ! -x $JAR; then
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25967$as_echo "not found" >&6; }
25968        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25969$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25970        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25971      fi
25972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25973$as_echo "ok" >&6; }
25974
25975
25976    else
25977      # If it succeeded, then it was overridden by the user. We will use it
25978      # for the tool.
25979
25980      # First remove it from the list of overridden variables, so we can test
25981      # for unknown variables in the end.
25982      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25983
25984      # Check if the provided tool contains a complete path.
25985      tool_specified="$JAR"
25986      tool_basename="${tool_specified##*/}"
25987      if test "x$tool_basename" = "x$tool_specified"; then
25988        # A command without a complete path is provided, search $PATH.
25989        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25990$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25991        # Extract the first word of "$tool_basename", so it can be a program name with args.
25992set dummy $tool_basename; ac_word=$2
25993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25994$as_echo_n "checking for $ac_word... " >&6; }
25995if ${ac_cv_path_JAR+:} false; then :
25996  $as_echo_n "(cached) " >&6
25997else
25998  case $JAR in
25999  [\\/]* | ?:[\\/]*)
26000  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
26001  ;;
26002  *)
26003  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26004for as_dir in $PATH
26005do
26006  IFS=$as_save_IFS
26007  test -z "$as_dir" && as_dir=.
26008    for ac_exec_ext in '' $ac_executable_extensions; do
26009  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26010    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
26011    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26012    break 2
26013  fi
26014done
26015  done
26016IFS=$as_save_IFS
26017
26018  ;;
26019esac
26020fi
26021JAR=$ac_cv_path_JAR
26022if test -n "$JAR"; then
26023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
26024$as_echo "$JAR" >&6; }
26025else
26026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26027$as_echo "no" >&6; }
26028fi
26029
26030
26031        if test "x$JAR" = x; then
26032          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26033        fi
26034      else
26035        # Otherwise we believe it is a complete path. Use it as it is.
26036        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
26037$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
26038        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
26039$as_echo_n "checking for JAR... " >&6; }
26040        if test ! -x "$tool_specified"; then
26041          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26042$as_echo "not found" >&6; }
26043          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
26044        fi
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26046$as_echo "$tool_specified" >&6; }
26047      fi
26048    fi
26049  fi
26050
26051
26052
26053  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26054
26055  # Publish this variable in the help.
26056
26057
26058  if test "x$JARSIGNER" = x; then
26059    # The variable is not set by user, try to locate tool using the code snippet
26060
26061      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26062$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26063      JARSIGNER=$BOOT_JDK/bin/jarsigner
26064      if test ! -x $JARSIGNER; then
26065        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26066$as_echo "not found" >&6; }
26067        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26068$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26069        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26070      fi
26071      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26072$as_echo "ok" >&6; }
26073
26074
26075  else
26076    # The variable is set, but is it from the command line or the environment?
26077
26078    # Try to remove the string !JARSIGNER! from our list.
26079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26081      # If it failed, the variable was not from the command line. Ignore it,
26082      # but warn the user (except for BASH, which is always set by the calling BASH).
26083      if test "xJARSIGNER" != xBASH; then
26084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26085$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26086      fi
26087      # Try to locate tool using the code snippet
26088
26089      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26090$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26091      JARSIGNER=$BOOT_JDK/bin/jarsigner
26092      if test ! -x $JARSIGNER; then
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26094$as_echo "not found" >&6; }
26095        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26096$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26097        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26098      fi
26099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26100$as_echo "ok" >&6; }
26101
26102
26103    else
26104      # If it succeeded, then it was overridden by the user. We will use it
26105      # for the tool.
26106
26107      # First remove it from the list of overridden variables, so we can test
26108      # for unknown variables in the end.
26109      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26110
26111      # Check if the provided tool contains a complete path.
26112      tool_specified="$JARSIGNER"
26113      tool_basename="${tool_specified##*/}"
26114      if test "x$tool_basename" = "x$tool_specified"; then
26115        # A command without a complete path is provided, search $PATH.
26116        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26117$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26118        # Extract the first word of "$tool_basename", so it can be a program name with args.
26119set dummy $tool_basename; ac_word=$2
26120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26121$as_echo_n "checking for $ac_word... " >&6; }
26122if ${ac_cv_path_JARSIGNER+:} false; then :
26123  $as_echo_n "(cached) " >&6
26124else
26125  case $JARSIGNER in
26126  [\\/]* | ?:[\\/]*)
26127  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26128  ;;
26129  *)
26130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26131for as_dir in $PATH
26132do
26133  IFS=$as_save_IFS
26134  test -z "$as_dir" && as_dir=.
26135    for ac_exec_ext in '' $ac_executable_extensions; do
26136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26137    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26139    break 2
26140  fi
26141done
26142  done
26143IFS=$as_save_IFS
26144
26145  ;;
26146esac
26147fi
26148JARSIGNER=$ac_cv_path_JARSIGNER
26149if test -n "$JARSIGNER"; then
26150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26151$as_echo "$JARSIGNER" >&6; }
26152else
26153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26154$as_echo "no" >&6; }
26155fi
26156
26157
26158        if test "x$JARSIGNER" = x; then
26159          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26160        fi
26161      else
26162        # Otherwise we believe it is a complete path. Use it as it is.
26163        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26164$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26165        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26166$as_echo_n "checking for JARSIGNER... " >&6; }
26167        if test ! -x "$tool_specified"; then
26168          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26169$as_echo "not found" >&6; }
26170          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26171        fi
26172        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26173$as_echo "$tool_specified" >&6; }
26174      fi
26175    fi
26176  fi
26177
26178
26179
26180  # Finally, set some other options...
26181
26182  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26183  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26184
26185
26186
26187
26188###############################################################################
26189#
26190# Configure the sources to use. We can add or override individual directories.
26191#
26192###############################################################################
26193
26194
26195  # Where are the sources. Any of these can be overridden
26196  # using --with-override-corba and the likes.
26197  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26198  CORBA_TOPDIR="$SRC_ROOT/corba"
26199  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26200  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26201  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26202  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26203  JDK_TOPDIR="$SRC_ROOT/jdk"
26204
26205
26206
26207
26208
26209
26210
26211
26212
26213
26214  ###############################################################################
26215  #
26216  # Pickup additional source for a component from outside of the source root
26217  # or override source for a component.
26218  #
26219
26220# Check whether --with-add-source-root was given.
26221if test "${with_add_source_root+set}" = set; then :
26222  withval=$with_add_source_root;
26223fi
26224
26225
26226
26227# Check whether --with-override-source-root was given.
26228if test "${with_override_source_root+set}" = set; then :
26229  withval=$with_override_source_root;
26230fi
26231
26232
26233
26234# Check whether --with-adds-and-overrides was given.
26235if test "${with_adds_and_overrides+set}" = set; then :
26236  withval=$with_adds_and_overrides;
26237fi
26238
26239
26240  if test "x$with_adds_and_overrides" != x; then
26241    with_add_source_root="$with_adds_and_overrides/adds"
26242    with_override_source_root="$with_adds_and_overrides/overrides"
26243  fi
26244
26245  if test "x$with_add_source_root" != x; then
26246    if ! test -d $with_add_source_root; then
26247      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26248    fi
26249    CURDIR="$PWD"
26250    cd "$with_add_source_root"
26251    ADD_SRC_ROOT="`pwd`"
26252    cd "$CURDIR"
26253    # Verify that the addon source root does not have any root makefiles.
26254    # If it does, then it is usually an error, prevent this.
26255    if test -f $with_add_source_root/langtools/make/Makefile; then
26256      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
26257    fi
26258    if test -f $with_add_source_root/corba/make/Makefile; then
26259      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
26260    fi
26261    if test -f $with_add_source_root/jaxp/make/Makefile; then
26262      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
26263    fi
26264    if test -f $with_add_source_root/jaxws/make/Makefile; then
26265      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
26266    fi
26267    if test -f $with_add_source_root/hotspot/make/Makefile; then
26268      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
26269    fi
26270    if test -f $with_add_source_root/nashorn/make/Makefile; then
26271      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
26272    fi
26273    if test -f $with_add_source_root/jdk/make/Makefile; then
26274      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
26275    fi
26276  fi
26277
26278
26279  if test "x$with_override_source_root" != x; then
26280    if ! test -d $with_override_source_root; then
26281      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26282    fi
26283    CURDIR="$PWD"
26284    cd "$with_override_source_root"
26285    OVERRIDE_SRC_ROOT="`pwd`"
26286    cd "$CURDIR"
26287    if test -f $with_override_source_root/langtools/make/Makefile; then
26288      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
26289    fi
26290    if test -f $with_override_source_root/corba/make/Makefile; then
26291      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
26292    fi
26293    if test -f $with_override_source_root/jaxp/make/Makefile; then
26294      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
26295    fi
26296    if test -f $with_override_source_root/jaxws/make/Makefile; then
26297      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
26298    fi
26299    if test -f $with_override_source_root/hotspot/make/Makefile; then
26300      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
26301    fi
26302    if test -f $with_override_source_root/nashorn/make/Makefile; then
26303      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
26304    fi
26305    if test -f $with_override_source_root/jdk/make/Makefile; then
26306      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
26307    fi
26308  fi
26309
26310
26311  ###############################################################################
26312  #
26313  # Override a repo completely, this is used for example when you have 3 small
26314  # development sandboxes of the langtools sources and want to avoid having 3 full
26315  # OpenJDK sources checked out on disk.
26316  #
26317  # Assuming that the 3 langtools sandboxes are located here:
26318  # /home/fredrik/sandbox1/langtools
26319  # /home/fredrik/sandbox2/langtools
26320  # /home/fredrik/sandbox3/langtools
26321  #
26322  # From the source root you create build subdirs manually:
26323  #     mkdir -p build1 build2 build3
26324  # in each build directory run:
26325  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26326  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26327  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26328  #
26329
26330
26331# Check whether --with-override-langtools was given.
26332if test "${with_override_langtools+set}" = set; then :
26333  withval=$with_override_langtools;
26334fi
26335
26336
26337
26338# Check whether --with-override-corba was given.
26339if test "${with_override_corba+set}" = set; then :
26340  withval=$with_override_corba;
26341fi
26342
26343
26344
26345# Check whether --with-override-jaxp was given.
26346if test "${with_override_jaxp+set}" = set; then :
26347  withval=$with_override_jaxp;
26348fi
26349
26350
26351
26352# Check whether --with-override-jaxws was given.
26353if test "${with_override_jaxws+set}" = set; then :
26354  withval=$with_override_jaxws;
26355fi
26356
26357
26358
26359# Check whether --with-override-hotspot was given.
26360if test "${with_override_hotspot+set}" = set; then :
26361  withval=$with_override_hotspot;
26362fi
26363
26364
26365
26366# Check whether --with-override-nashorn was given.
26367if test "${with_override_nashorn+set}" = set; then :
26368  withval=$with_override_nashorn;
26369fi
26370
26371
26372
26373# Check whether --with-override-jdk was given.
26374if test "${with_override_jdk+set}" = set; then :
26375  withval=$with_override_jdk;
26376fi
26377
26378
26379  if test "x$with_override_langtools" != x; then
26380    CURDIR="$PWD"
26381    cd "$with_override_langtools"
26382    LANGTOOLS_TOPDIR="`pwd`"
26383    cd "$CURDIR"
26384    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26385      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26386    fi
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26388$as_echo_n "checking if langtools should be overridden... " >&6; }
26389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26390$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26391  fi
26392  if test "x$with_override_corba" != x; then
26393    CURDIR="$PWD"
26394    cd "$with_override_corba"
26395    CORBA_TOPDIR="`pwd`"
26396    cd "$CURDIR"
26397    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26398      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26399    fi
26400    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26401$as_echo_n "checking if corba should be overridden... " >&6; }
26402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26403$as_echo "yes with $CORBA_TOPDIR" >&6; }
26404  fi
26405  if test "x$with_override_jaxp" != x; then
26406    CURDIR="$PWD"
26407    cd "$with_override_jaxp"
26408    JAXP_TOPDIR="`pwd`"
26409    cd "$CURDIR"
26410    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26411      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26412    fi
26413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26414$as_echo_n "checking if jaxp should be overridden... " >&6; }
26415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26416$as_echo "yes with $JAXP_TOPDIR" >&6; }
26417  fi
26418  if test "x$with_override_jaxws" != x; then
26419    CURDIR="$PWD"
26420    cd "$with_override_jaxws"
26421    JAXWS_TOPDIR="`pwd`"
26422    cd "$CURDIR"
26423    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26424      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26425    fi
26426    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26427$as_echo_n "checking if jaxws should be overridden... " >&6; }
26428    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26429$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26430  fi
26431  if test "x$with_override_hotspot" != x; then
26432    CURDIR="$PWD"
26433    cd "$with_override_hotspot"
26434    HOTSPOT_TOPDIR="`pwd`"
26435    cd "$CURDIR"
26436    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26437      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26438    fi
26439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26440$as_echo_n "checking if hotspot should be overridden... " >&6; }
26441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26442$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26443  fi
26444  if test "x$with_override_nashorn" != x; then
26445    CURDIR="$PWD"
26446    cd "$with_override_nashorn"
26447    NASHORN_TOPDIR="`pwd`"
26448    cd "$CURDIR"
26449    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26450      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26451    fi
26452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26453$as_echo_n "checking if nashorn should be overridden... " >&6; }
26454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26455$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26456  fi
26457  if test "x$with_override_jdk" != x; then
26458    CURDIR="$PWD"
26459    cd "$with_override_jdk"
26460    JDK_TOPDIR="`pwd`"
26461    cd "$CURDIR"
26462    if ! test -f $JDK_TOPDIR/make/Makefile; then
26463      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26464    fi
26465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26466$as_echo_n "checking if JDK should be overridden... " >&6; }
26467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26468$as_echo "yes with $JDK_TOPDIR" >&6; }
26469  fi
26470
26471
26472  BUILD_OUTPUT="$OUTPUT_ROOT"
26473
26474
26475  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26476  BUILD_HOTSPOT=true
26477
26478
26479
26480# Check whether --with-import-hotspot was given.
26481if test "${with_import_hotspot+set}" = set; then :
26482  withval=$with_import_hotspot;
26483fi
26484
26485  if test "x$with_import_hotspot" != x; then
26486    CURDIR="$PWD"
26487    cd "$with_import_hotspot"
26488    HOTSPOT_DIST="`pwd`"
26489    cd "$CURDIR"
26490    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26491      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26492    fi
26493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26494$as_echo_n "checking if hotspot should be imported... " >&6; }
26495    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26496$as_echo "yes from $HOTSPOT_DIST" >&6; }
26497    BUILD_HOTSPOT=false
26498  fi
26499
26500  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26501
26502
26503###############################################################################
26504#
26505# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26506# native code.
26507#
26508###############################################################################
26509
26510# First determine the toolchain type (compiler family)
26511
26512
26513# Check whether --with-toolchain-type was given.
26514if test "${with_toolchain_type+set}" = set; then :
26515  withval=$with_toolchain_type;
26516fi
26517
26518
26519  # Use indirect variable referencing
26520  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26521  VALID_TOOLCHAINS=${!toolchain_var_name}
26522
26523  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26524    if test -n "$XCODEBUILD"; then
26525      # On Mac OS X, default toolchain to clang after Xcode 5
26526      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26527      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26528      if test $? -ne 0; then
26529        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26530      fi
26531      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26532          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26533          $CUT -f 1 -d .`
26534      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26535$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26536      if test $XCODE_MAJOR_VERSION -ge 5; then
26537          DEFAULT_TOOLCHAIN="clang"
26538      else
26539          DEFAULT_TOOLCHAIN="gcc"
26540      fi
26541    else
26542      # If Xcode is not installed, but the command line tools are
26543      # then we can't run xcodebuild. On these systems we should
26544      # default to clang
26545      DEFAULT_TOOLCHAIN="clang"
26546    fi
26547  else
26548    # First toolchain type in the list is the default
26549    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26550  fi
26551
26552  if test "x$with_toolchain_type" = xlist; then
26553    # List all toolchains
26554    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26555$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26556    for toolchain in $VALID_TOOLCHAINS; do
26557      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26558      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26559      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26560    done
26561
26562    exit 0
26563  elif test "x$with_toolchain_type" != x; then
26564    # User override; check that it is valid
26565    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26566      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26567$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26568      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26569$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26570      as_fn_error $? "Cannot continue." "$LINENO" 5
26571    fi
26572    TOOLCHAIN_TYPE=$with_toolchain_type
26573  else
26574    # No flag given, use default
26575    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26576  fi
26577
26578
26579  TOOLCHAIN_CC_BINARY_clang="clang"
26580  TOOLCHAIN_CC_BINARY_gcc="gcc"
26581  TOOLCHAIN_CC_BINARY_microsoft="cl"
26582  TOOLCHAIN_CC_BINARY_solstudio="cc"
26583  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26584
26585  TOOLCHAIN_CXX_BINARY_clang="clang++"
26586  TOOLCHAIN_CXX_BINARY_gcc="g++"
26587  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26588  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26589  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26590
26591  # Use indirect variable referencing
26592  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26593  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26594  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26595  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26596  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26597  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26598
26599
26600  # Define filename patterns
26601  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26602    LIBRARY_PREFIX=
26603    SHARED_LIBRARY_SUFFIX='.dll'
26604    STATIC_LIBRARY_SUFFIX='.lib'
26605    SHARED_LIBRARY='$1.dll'
26606    STATIC_LIBRARY='$1.lib'
26607    OBJ_SUFFIX='.obj'
26608    EXE_SUFFIX='.exe'
26609  else
26610    LIBRARY_PREFIX=lib
26611    SHARED_LIBRARY_SUFFIX='.so'
26612    STATIC_LIBRARY_SUFFIX='.a'
26613    SHARED_LIBRARY='lib$1.so'
26614    STATIC_LIBRARY='lib$1.a'
26615    OBJ_SUFFIX='.o'
26616    EXE_SUFFIX=''
26617    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26618      SHARED_LIBRARY='lib$1.dylib'
26619      SHARED_LIBRARY_SUFFIX='.dylib'
26620    fi
26621  fi
26622
26623
26624
26625
26626
26627
26628
26629
26630
26631
26632  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26633    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26634$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26635  else
26636    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26637$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26638  fi
26639
26640
26641# Then detect the actual binaries needed
26642
26643  # FIXME: Is this needed?
26644  ac_ext=cpp
26645ac_cpp='$CXXCPP $CPPFLAGS'
26646ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26647ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26648ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26649
26650
26651  # Store the CFLAGS etc passed to the configure script.
26652  ORG_CFLAGS="$CFLAGS"
26653  ORG_CXXFLAGS="$CXXFLAGS"
26654
26655  # autoconf magic only relies on PATH, so update it if tools dir is specified
26656  OLD_PATH="$PATH"
26657
26658  # On Windows, we need to detect the visual studio installation first.
26659  # This will change the PATH, but we need to keep that new PATH even
26660  # after toolchain detection is done, since the compiler (on x86) uses
26661  # it for DLL resolution in runtime.
26662  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
26663      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26664
26665  # Store path to cygwin link.exe to help excluding it when searching for
26666  # VS linker. This must be done before changing the PATH when looking for VS.
26667  # Extract the first word of "link", so it can be a program name with args.
26668set dummy link; ac_word=$2
26669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26670$as_echo_n "checking for $ac_word... " >&6; }
26671if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26672  $as_echo_n "(cached) " >&6
26673else
26674  case $CYGWIN_LINK in
26675  [\\/]* | ?:[\\/]*)
26676  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26677  ;;
26678  *)
26679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26680for as_dir in $PATH
26681do
26682  IFS=$as_save_IFS
26683  test -z "$as_dir" && as_dir=.
26684    for ac_exec_ext in '' $ac_executable_extensions; do
26685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26686    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26688    break 2
26689  fi
26690done
26691  done
26692IFS=$as_save_IFS
26693
26694  ;;
26695esac
26696fi
26697CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26698if test -n "$CYGWIN_LINK"; then
26699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26700$as_echo "$CYGWIN_LINK" >&6; }
26701else
26702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26703$as_echo "no" >&6; }
26704fi
26705
26706
26707  if test "x$CYGWIN_LINK" != x; then
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26709$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26710    "$CYGWIN_LINK" --version > /dev/null
26711    if test $? -eq 0 ; then
26712      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26713$as_echo "yes" >&6; }
26714    else
26715      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26716$as_echo "no" >&6; }
26717      # This might be the VS linker. Don't exclude it later on.
26718      CYGWIN_LINK=""
26719    fi
26720  fi
26721
26722  # First-hand choice is to locate and run the vsvars bat file.
26723
26724
26725# Check whether --with-toolchain-version was given.
26726if test "${with_toolchain_version+set}" = set; then :
26727  withval=$with_toolchain_version;
26728fi
26729
26730
26731  if test "x$with_toolchain_version" = xlist; then
26732    # List all toolchains
26733    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26734$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26735    for version in $VALID_VS_VERSIONS; do
26736      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26737      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26738    done
26739
26740    exit 0
26741  elif test "x$DEVKIT_VS_VERSION" != x; then
26742    VS_VERSION=$DEVKIT_VS_VERSION
26743    TOOLCHAIN_VERSION=$VS_VERSION
26744    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
26745    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
26746    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
26747    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
26748    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26749    VS_PATH="$TOOLCHAIN_PATH:$PATH"
26750
26751    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
26752    # can still be exported as INCLUDE for compiler invocations without
26753    # SYSROOT_CFLAGS
26754    OLDIFS="$IFS"
26755    IFS=";"
26756    for i in $DEVKIT_VS_INCLUDE; do
26757      ipath=$i
26758
26759  unix_path="$ipath"
26760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26761    windows_path=`$CYGPATH -m "$unix_path"`
26762    ipath="$windows_path"
26763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26764    windows_path=`cmd //c echo $unix_path`
26765    ipath="$windows_path"
26766  fi
26767
26768      VS_INCLUDE="$VS_INCLUDE;$ipath"
26769    done
26770    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
26771    # as LIB for compiler invocations without SYSROOT_LDFLAGS
26772    for i in $DEVKIT_VS_LIB; do
26773      libpath=$i
26774
26775  unix_path="$libpath"
26776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26777    windows_path=`$CYGPATH -m "$unix_path"`
26778    libpath="$windows_path"
26779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26780    windows_path=`cmd //c echo $unix_path`
26781    libpath="$windows_path"
26782  fi
26783
26784      VS_LIB="$VS_LIB;$libpath"
26785    done
26786    IFS="$OLDIFS"
26787
26788    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
26789$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
26790
26791  elif test "x$with_toolchain_version" != x; then
26792    # User override; check that it is valid
26793    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26794      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26795$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26796      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26797$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26798      as_fn_error $? "Cannot continue." "$LINENO" 5
26799    fi
26800    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26801  else
26802    # No flag given, use default
26803    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26804  fi
26805
26806  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26807
26808  VS_VERSION="$VS_VERSION"
26809  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26810  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26811  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26812  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26813
26814  # When using --with-tools-dir, assume it points to the correct and default
26815  # version of Visual Studio or that --with-toolchain-version was also set.
26816  if test "x$with_tools_dir" != x; then
26817
26818  if test "x$VS_ENV_CMD" = x; then
26819    VS_VERSION="${VS_VERSION}"
26820    VS_BASE="$with_tools_dir/../.."
26821    METHOD="--with-tools-dir"
26822
26823    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26824      VCVARSFILE="vc/bin/vcvars32.bat"
26825    else
26826      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26827    fi
26828
26829
26830  windows_path="$VS_BASE"
26831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26832    unix_path=`$CYGPATH -u "$windows_path"`
26833    VS_BASE="$unix_path"
26834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26836    VS_BASE="$unix_path"
26837  fi
26838
26839    if test -d "$VS_BASE"; then
26840      if test -f "$VS_BASE/$VCVARSFILE"; then
26841        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26842$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26843        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26844        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26845        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26846        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26847      else
26848        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26849$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26850        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26851$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26852      fi
26853    fi
26854  fi
26855
26856
26857  if test "x$VS_ENV_CMD" = x; then
26858    VS_VERSION="${VS_VERSION}"
26859    VS_BASE="$with_tools_dir/../../.."
26860    METHOD="--with-tools-dir"
26861
26862    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26863      VCVARSFILE="vc/bin/vcvars32.bat"
26864    else
26865      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26866    fi
26867
26868
26869  windows_path="$VS_BASE"
26870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26871    unix_path=`$CYGPATH -u "$windows_path"`
26872    VS_BASE="$unix_path"
26873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26875    VS_BASE="$unix_path"
26876  fi
26877
26878    if test -d "$VS_BASE"; then
26879      if test -f "$VS_BASE/$VCVARSFILE"; then
26880        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26881$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26882        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26883        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26884        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26885        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26886      else
26887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26888$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26890$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26891      fi
26892    fi
26893  fi
26894
26895    if test "x$VS_ENV_CMD" = x; then
26896      # Having specified an argument which is incorrect will produce an instant failure;
26897      # we should not go on looking
26898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26899$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26900      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26901$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26902      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26903$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26904      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26905    fi
26906  fi
26907
26908  VS_ENV_CMD=""
26909  VS_ENV_ARGS=""
26910
26911  if test "x$VS_COMNTOOLS" != x; then
26912
26913  if test "x$VS_ENV_CMD" = x; then
26914    VS_VERSION="${VS_VERSION}"
26915    VS_BASE="$VS_COMNTOOLS/../.."
26916    METHOD="$VS_COMNTOOLS_VAR variable"
26917
26918    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26919      VCVARSFILE="vc/bin/vcvars32.bat"
26920    else
26921      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26922    fi
26923
26924
26925  windows_path="$VS_BASE"
26926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26927    unix_path=`$CYGPATH -u "$windows_path"`
26928    VS_BASE="$unix_path"
26929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26931    VS_BASE="$unix_path"
26932  fi
26933
26934    if test -d "$VS_BASE"; then
26935      if test -f "$VS_BASE/$VCVARSFILE"; then
26936        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26937$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26938        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26939        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26940        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26941        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26942      else
26943        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26944$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26945        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26946$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26947      fi
26948    fi
26949  fi
26950
26951  fi
26952  if test "x$PROGRAMFILES" != x; then
26953
26954  if test "x$VS_ENV_CMD" = x; then
26955    VS_VERSION="${VS_VERSION}"
26956    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26957    METHOD="well-known name"
26958
26959    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26960      VCVARSFILE="vc/bin/vcvars32.bat"
26961    else
26962      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26963    fi
26964
26965
26966  windows_path="$VS_BASE"
26967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26968    unix_path=`$CYGPATH -u "$windows_path"`
26969    VS_BASE="$unix_path"
26970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26972    VS_BASE="$unix_path"
26973  fi
26974
26975    if test -d "$VS_BASE"; then
26976      if test -f "$VS_BASE/$VCVARSFILE"; then
26977        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26978$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26979        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26980        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26981        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26982        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26983      else
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26985$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26986        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26987$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26988      fi
26989    fi
26990  fi
26991
26992  fi
26993  # Work around the insanely named ProgramFiles(x86) env variable
26994  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26995  if test "x$PROGRAMFILES_X86" != x; then
26996
26997  if test "x$VS_ENV_CMD" = x; then
26998    VS_VERSION="${VS_VERSION}"
26999    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
27000    METHOD="well-known name"
27001
27002    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27003      VCVARSFILE="vc/bin/vcvars32.bat"
27004    else
27005      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27006    fi
27007
27008
27009  windows_path="$VS_BASE"
27010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27011    unix_path=`$CYGPATH -u "$windows_path"`
27012    VS_BASE="$unix_path"
27013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27015    VS_BASE="$unix_path"
27016  fi
27017
27018    if test -d "$VS_BASE"; then
27019      if test -f "$VS_BASE/$VCVARSFILE"; then
27020        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27021$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27022        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27023        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27024        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27025        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27026      else
27027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27028$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27029        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27030$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27031      fi
27032    fi
27033  fi
27034
27035  fi
27036
27037  if test "x$VS_ENV_CMD" = x; then
27038    VS_VERSION="${VS_VERSION}"
27039    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
27040    METHOD="well-known name"
27041
27042    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27043      VCVARSFILE="vc/bin/vcvars32.bat"
27044    else
27045      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27046    fi
27047
27048
27049  windows_path="$VS_BASE"
27050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27051    unix_path=`$CYGPATH -u "$windows_path"`
27052    VS_BASE="$unix_path"
27053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27055    VS_BASE="$unix_path"
27056  fi
27057
27058    if test -d "$VS_BASE"; then
27059      if test -f "$VS_BASE/$VCVARSFILE"; then
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27061$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27062        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27063        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27064        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27065        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27066      else
27067        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27068$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27069        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27070$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27071      fi
27072    fi
27073  fi
27074
27075
27076  if test "x$VS_ENV_CMD" = x; then
27077    VS_VERSION="${VS_VERSION}"
27078    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27079    METHOD="well-known name"
27080
27081    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27082      VCVARSFILE="vc/bin/vcvars32.bat"
27083    else
27084      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27085    fi
27086
27087
27088  windows_path="$VS_BASE"
27089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27090    unix_path=`$CYGPATH -u "$windows_path"`
27091    VS_BASE="$unix_path"
27092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27094    VS_BASE="$unix_path"
27095  fi
27096
27097    if test -d "$VS_BASE"; then
27098      if test -f "$VS_BASE/$VCVARSFILE"; then
27099        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27100$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27101        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27102        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27103        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27104        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27105      else
27106        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27107$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27108        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27109$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27110      fi
27111    fi
27112  fi
27113
27114
27115  if test "x$SDK_INSTALL_DIR" != x; then
27116    if test "x$ProgramW6432" != x; then
27117
27118  if test "x$VS_ENV_CMD" = x; then
27119    VS_VERSION="${VS_VERSION}"
27120    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27121    METHOD="well-known name"
27122
27123  windows_path="$WIN_SDK_BASE"
27124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27125    unix_path=`$CYGPATH -u "$windows_path"`
27126    WIN_SDK_BASE="$unix_path"
27127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27129    WIN_SDK_BASE="$unix_path"
27130  fi
27131
27132    if test -d "$WIN_SDK_BASE"; then
27133      # There have been cases of partial or broken SDK installations. A missing
27134      # lib dir is not going to work.
27135      if test ! -d "$WIN_SDK_BASE/lib"; then
27136        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27137$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27138        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27139$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27140      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27142$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27143        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27144        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27145          VS_ENV_ARGS="/x86"
27146        else
27147          VS_ENV_ARGS="/x64"
27148        fi
27149        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27150        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27151        # TODO: improve detection for other versions of SDK
27152        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27153      else
27154        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27155$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27156        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27157$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27158      fi
27159    fi
27160  fi
27161
27162    fi
27163    if test "x$PROGRAMW6432" != x; then
27164
27165  if test "x$VS_ENV_CMD" = x; then
27166    VS_VERSION="${VS_VERSION}"
27167    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27168    METHOD="well-known name"
27169
27170  windows_path="$WIN_SDK_BASE"
27171  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27172    unix_path=`$CYGPATH -u "$windows_path"`
27173    WIN_SDK_BASE="$unix_path"
27174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27175    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27176    WIN_SDK_BASE="$unix_path"
27177  fi
27178
27179    if test -d "$WIN_SDK_BASE"; then
27180      # There have been cases of partial or broken SDK installations. A missing
27181      # lib dir is not going to work.
27182      if test ! -d "$WIN_SDK_BASE/lib"; then
27183        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27184$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27185        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27186$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27187      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27190        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27191        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27192          VS_ENV_ARGS="/x86"
27193        else
27194          VS_ENV_ARGS="/x64"
27195        fi
27196        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27197        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27198        # TODO: improve detection for other versions of SDK
27199        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27200      else
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27204$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27205      fi
27206    fi
27207  fi
27208
27209    fi
27210    if test "x$PROGRAMFILES" != x; then
27211
27212  if test "x$VS_ENV_CMD" = x; then
27213    VS_VERSION="${VS_VERSION}"
27214    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27215    METHOD="well-known name"
27216
27217  windows_path="$WIN_SDK_BASE"
27218  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27219    unix_path=`$CYGPATH -u "$windows_path"`
27220    WIN_SDK_BASE="$unix_path"
27221  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27222    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27223    WIN_SDK_BASE="$unix_path"
27224  fi
27225
27226    if test -d "$WIN_SDK_BASE"; then
27227      # There have been cases of partial or broken SDK installations. A missing
27228      # lib dir is not going to work.
27229      if test ! -d "$WIN_SDK_BASE/lib"; then
27230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27231$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27233$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27234      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27235        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27236$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27237        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27238        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27239          VS_ENV_ARGS="/x86"
27240        else
27241          VS_ENV_ARGS="/x64"
27242        fi
27243        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27244        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27245        # TODO: improve detection for other versions of SDK
27246        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27247      else
27248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27249$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27251$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27252      fi
27253    fi
27254  fi
27255
27256    fi
27257
27258  if test "x$VS_ENV_CMD" = x; then
27259    VS_VERSION="${VS_VERSION}"
27260    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27261    METHOD="well-known name"
27262
27263  windows_path="$WIN_SDK_BASE"
27264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27265    unix_path=`$CYGPATH -u "$windows_path"`
27266    WIN_SDK_BASE="$unix_path"
27267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27269    WIN_SDK_BASE="$unix_path"
27270  fi
27271
27272    if test -d "$WIN_SDK_BASE"; then
27273      # There have been cases of partial or broken SDK installations. A missing
27274      # lib dir is not going to work.
27275      if test ! -d "$WIN_SDK_BASE/lib"; then
27276        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27277$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27278        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27279$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27280      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27281        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27282$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27283        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27284        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27285          VS_ENV_ARGS="/x86"
27286        else
27287          VS_ENV_ARGS="/x64"
27288        fi
27289        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27290        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27291        # TODO: improve detection for other versions of SDK
27292        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27293      else
27294        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27295$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27296        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27297$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27298      fi
27299    fi
27300  fi
27301
27302
27303  if test "x$VS_ENV_CMD" = x; then
27304    VS_VERSION="${VS_VERSION}"
27305    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27306    METHOD="well-known name"
27307
27308  windows_path="$WIN_SDK_BASE"
27309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27310    unix_path=`$CYGPATH -u "$windows_path"`
27311    WIN_SDK_BASE="$unix_path"
27312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27314    WIN_SDK_BASE="$unix_path"
27315  fi
27316
27317    if test -d "$WIN_SDK_BASE"; then
27318      # There have been cases of partial or broken SDK installations. A missing
27319      # lib dir is not going to work.
27320      if test ! -d "$WIN_SDK_BASE/lib"; then
27321        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27322$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27323        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27324$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27325      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27326        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27327$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27328        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27329        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27330          VS_ENV_ARGS="/x86"
27331        else
27332          VS_ENV_ARGS="/x64"
27333        fi
27334        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27335        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27336        # TODO: improve detection for other versions of SDK
27337        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27338      else
27339        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27340$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27341        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27342$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27343      fi
27344    fi
27345  fi
27346
27347  fi
27348
27349    if test "x$VS_ENV_CMD" != x; then
27350      TOOLCHAIN_VERSION=$VS_VERSION
27351      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27352      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27353      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27354      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27355      # The rest of the variables are already evaled while probing
27356      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27357$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27358      break
27359    fi
27360  done
27361
27362
27363  # If we have a devkit, skip all of the below.
27364  if test "x$DEVKIT_VS_VERSION" = x; then
27365    if test "x$VS_ENV_CMD" != x; then
27366      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27367
27368  # Only process if variable expands to non-empty
27369
27370  if test "x$VS_ENV_CMD" != x; then
27371    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27372
27373  # First separate the path from the arguments. This will split at the first
27374  # space.
27375  complete="$VS_ENV_CMD"
27376  path="${complete%% *}"
27377  tmp="$complete EOL"
27378  arguments="${tmp#* }"
27379
27380  # Input might be given as Windows format, start by converting to
27381  # unix format.
27382  new_path=`$CYGPATH -u "$path"`
27383
27384  # Now try to locate executable using which
27385  new_path=`$WHICH "$new_path" 2> /dev/null`
27386  # bat and cmd files are not always considered executable in cygwin causing which
27387  # to not find them
27388  if test "x$new_path" = x \
27389      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27390      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27391    new_path=`$CYGPATH -u "$path"`
27392  fi
27393  if test "x$new_path" = x; then
27394    # Oops. Which didn't find the executable.
27395    # The splitting of arguments from the executable at a space might have been incorrect,
27396    # since paths with space are more likely in Windows. Give it another try with the whole
27397    # argument.
27398    path="$complete"
27399    arguments="EOL"
27400    new_path=`$CYGPATH -u "$path"`
27401    new_path=`$WHICH "$new_path" 2> /dev/null`
27402    # bat and cmd files are not always considered executable in cygwin causing which
27403    # to not find them
27404    if test "x$new_path" = x \
27405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27407      new_path=`$CYGPATH -u "$path"`
27408    fi
27409    if test "x$new_path" = x; then
27410      # It's still not found. Now this is an unrecoverable error.
27411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27412$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27413      has_space=`$ECHO "$complete" | $GREP " "`
27414      if test "x$has_space" != x; then
27415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27417      fi
27418      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27419    fi
27420  fi
27421
27422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27425  # "foo.exe" is OK but "foo" is an error.
27426  #
27427  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27428  # It is also a way to make sure we got the proper file name for the real test later on.
27429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27430  if test "x$test_shortpath" = x; then
27431    # Short path failed, file does not exist as specified.
27432    # Try adding .exe or .cmd
27433    if test -f "${new_path}.exe"; then
27434      input_to_shortpath="${new_path}.exe"
27435    elif test -f "${new_path}.cmd"; then
27436      input_to_shortpath="${new_path}.cmd"
27437    else
27438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27439$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27440      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27441$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27442      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27443    fi
27444  else
27445    input_to_shortpath="$new_path"
27446  fi
27447
27448  # Call helper function which possibly converts this using DOS-style short mode.
27449  # If so, the updated path is stored in $new_path.
27450  new_path="$input_to_shortpath"
27451
27452  input_path="$input_to_shortpath"
27453  # Check if we need to convert this using DOS-style short mode. If the path
27454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27455  # take no chances and rewrite it.
27456  # Note: m4 eats our [], so we need to use [ and ] instead.
27457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27458  if test "x$has_forbidden_chars" != x; then
27459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27460    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27461    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27462    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27463      # Going to short mode and back again did indeed matter. Since short mode is
27464      # case insensitive, let's make it lowercase to improve readability.
27465      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27466      # Now convert it back to Unix-style (cygpath)
27467      input_path=`$CYGPATH -u "$shortmode_path"`
27468      new_path="$input_path"
27469    fi
27470  fi
27471
27472  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27473  if test "x$test_cygdrive_prefix" = x; then
27474    # As a simple fix, exclude /usr/bin since it's not a real path.
27475    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27476      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27477      # a path prefixed by /cygdrive for fixpath to work.
27478      new_path="$CYGWIN_ROOT_PATH$input_path"
27479    fi
27480  fi
27481
27482  # remove trailing .exe if any
27483  new_path="${new_path/%.exe/}"
27484
27485    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27486
27487  # First separate the path from the arguments. This will split at the first
27488  # space.
27489  complete="$VS_ENV_CMD"
27490  path="${complete%% *}"
27491  tmp="$complete EOL"
27492  arguments="${tmp#* }"
27493
27494  # Input might be given as Windows format, start by converting to
27495  # unix format.
27496  new_path="$path"
27497
27498  windows_path="$new_path"
27499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27500    unix_path=`$CYGPATH -u "$windows_path"`
27501    new_path="$unix_path"
27502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27504    new_path="$unix_path"
27505  fi
27506
27507
27508  # Now try to locate executable using which
27509  new_path=`$WHICH "$new_path" 2> /dev/null`
27510
27511  if test "x$new_path" = x; then
27512    # Oops. Which didn't find the executable.
27513    # The splitting of arguments from the executable at a space might have been incorrect,
27514    # since paths with space are more likely in Windows. Give it another try with the whole
27515    # argument.
27516    path="$complete"
27517    arguments="EOL"
27518    new_path="$path"
27519
27520  windows_path="$new_path"
27521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27522    unix_path=`$CYGPATH -u "$windows_path"`
27523    new_path="$unix_path"
27524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27526    new_path="$unix_path"
27527  fi
27528
27529
27530    new_path=`$WHICH "$new_path" 2> /dev/null`
27531    # bat and cmd files are not always considered executable in MSYS causing which
27532    # to not find them
27533    if test "x$new_path" = x \
27534        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27535        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27536      new_path="$path"
27537
27538  windows_path="$new_path"
27539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27540    unix_path=`$CYGPATH -u "$windows_path"`
27541    new_path="$unix_path"
27542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27544    new_path="$unix_path"
27545  fi
27546
27547    fi
27548
27549    if test "x$new_path" = x; then
27550      # It's still not found. Now this is an unrecoverable error.
27551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27552$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27553      has_space=`$ECHO "$complete" | $GREP " "`
27554      if test "x$has_space" != x; then
27555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27557      fi
27558      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27559    fi
27560  fi
27561
27562  # Now new_path has a complete unix path to the binary
27563  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27564    # Keep paths in /bin as-is, but remove trailing .exe if any
27565    new_path="${new_path/%.exe/}"
27566    # Do not save /bin paths to all_fixpath_prefixes!
27567  else
27568    # Not in mixed or Windows style, start by that.
27569    new_path=`cmd //c echo $new_path`
27570
27571  input_path="$new_path"
27572  # Check if we need to convert this using DOS-style short mode. If the path
27573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27574  # take no chances and rewrite it.
27575  # Note: m4 eats our [], so we need to use [ and ] instead.
27576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27577  if test "x$has_forbidden_chars" != x; then
27578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27580  fi
27581
27582    # Output is in $new_path
27583
27584  windows_path="$new_path"
27585  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27586    unix_path=`$CYGPATH -u "$windows_path"`
27587    new_path="$unix_path"
27588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27589    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27590    new_path="$unix_path"
27591  fi
27592
27593    # remove trailing .exe if any
27594    new_path="${new_path/%.exe/}"
27595
27596    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27597    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27598  fi
27599
27600    else
27601      # We're on a unix platform. Hooray! :)
27602      # First separate the path from the arguments. This will split at the first
27603      # space.
27604      complete="$VS_ENV_CMD"
27605      path="${complete%% *}"
27606      tmp="$complete EOL"
27607      arguments="${tmp#* }"
27608
27609      # Cannot rely on the command "which" here since it doesn't always work.
27610      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27611      if test -z "$is_absolute_path"; then
27612        # Path to executable is not absolute. Find it.
27613        IFS_save="$IFS"
27614        IFS=:
27615        for p in $PATH; do
27616          if test -f "$p/$path" && test -x "$p/$path"; then
27617            new_path="$p/$path"
27618            break
27619          fi
27620        done
27621        IFS="$IFS_save"
27622      else
27623        # This is an absolute path, we can use it without further modifications.
27624        new_path="$path"
27625      fi
27626
27627      if test "x$new_path" = x; then
27628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27629$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27630        has_space=`$ECHO "$complete" | $GREP " "`
27631        if test "x$has_space" != x; then
27632          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27633$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27634        fi
27635        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27636      fi
27637    fi
27638
27639    # Now join together the path and the arguments once again
27640    if test "x$arguments" != xEOL; then
27641      new_complete="$new_path ${arguments% *}"
27642    else
27643      new_complete="$new_path"
27644    fi
27645
27646    if test "x$complete" != "x$new_complete"; then
27647      VS_ENV_CMD="$new_complete"
27648      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27649$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27650    fi
27651  fi
27652
27653
27654      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27655      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27656$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27657
27658      # We need to create a couple of temporary files.
27659      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
27660      $MKDIR -p $VS_ENV_TMP_DIR
27661
27662      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27663      # Instead create a shell script which will set the relevant variables when run.
27664      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27665
27666  unix_path="$WINPATH_VS_ENV_CMD"
27667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27668    windows_path=`$CYGPATH -m "$unix_path"`
27669    WINPATH_VS_ENV_CMD="$windows_path"
27670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27671    windows_path=`cmd //c echo $unix_path`
27672    WINPATH_VS_ENV_CMD="$windows_path"
27673  fi
27674
27675      WINPATH_BASH="$BASH"
27676
27677  unix_path="$WINPATH_BASH"
27678  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27679    windows_path=`$CYGPATH -m "$unix_path"`
27680    WINPATH_BASH="$windows_path"
27681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27682    windows_path=`cmd //c echo $unix_path`
27683    WINPATH_BASH="$windows_path"
27684  fi
27685
27686
27687      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27688      # script (executable by bash) that will setup the important variables.
27689      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27690      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27691      # This will end up something like:
27692      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27693      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27694      # These will end up something like:
27695      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27696      # The trailing space for everyone except PATH is no typo, but is needed due
27697      # to trailing \ in the Windows paths. These will be stripped later.
27698      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
27699          >> $EXTRACT_VC_ENV_BAT_FILE
27700      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
27701          >> $EXTRACT_VC_ENV_BAT_FILE
27702      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
27703          >> $EXTRACT_VC_ENV_BAT_FILE
27704      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
27705          >> $EXTRACT_VC_ENV_BAT_FILE
27706      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
27707          >> $EXTRACT_VC_ENV_BAT_FILE
27708      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
27709          >> $EXTRACT_VC_ENV_BAT_FILE
27710
27711      # Now execute the newly created bat file.
27712      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27713      # Change directory so we don't need to mess with Windows paths in redirects.
27714      cd $VS_ENV_TMP_DIR
27715      cmd /c extract-vs-env.bat | $CAT
27716      cd $CURDIR
27717
27718      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27719        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27720$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27721        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27722$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27723        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27724$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27725        as_fn_error $? "Cannot continue" "$LINENO" 5
27726      fi
27727
27728      # Now set all paths and other env variables. This will allow the rest of
27729      # the configure script to find and run the compiler in the proper way.
27730      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27731$as_echo "$as_me: Setting extracted environment variables" >&6;}
27732      . $VS_ENV_TMP_DIR/set-vs-env.sh
27733      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27734      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27735    else
27736      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27737      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27738$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27739    fi
27740  fi
27741
27742  # At this point, we should have correct variables in the environment, or we can't continue.
27743  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27744$as_echo_n "checking for Visual Studio variables... " >&6; }
27745
27746  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
27747      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
27748    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27749      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27750$as_echo "present but broken" >&6; }
27751      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27752    else
27753      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27754$as_echo "ok" >&6; }
27755      # Remove any trailing "\" ";" and " " from the variables.
27756      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27757      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27758      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27759      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27760      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27761      # Remove any paths containing # (typically F#) as that messes up make. This
27762      # is needed if visual studio was installed with F# support.
27763      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27764
27765
27766
27767
27768
27769      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27770      OLDIFS="$IFS"
27771      IFS=";"
27772      for i in $VS_INCLUDE; do
27773        ipath=$i
27774        # Only process non-empty elements
27775        if test "x$ipath" != x; then
27776          IFS="$OLDIFS"
27777          # Check that directory exists before calling fixup_path
27778          testpath=$ipath
27779
27780  windows_path="$testpath"
27781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27782    unix_path=`$CYGPATH -u "$windows_path"`
27783    testpath="$unix_path"
27784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27786    testpath="$unix_path"
27787  fi
27788
27789          if test -d "$testpath"; then
27790
27791  # Only process if variable expands to non-empty
27792
27793  if test "x$ipath" != x; then
27794    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27795
27796  # Input might be given as Windows format, start by converting to
27797  # unix format.
27798  path="$ipath"
27799  new_path=`$CYGPATH -u "$path"`
27800
27801  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27802  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27803  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27804  # "foo.exe" is OK but "foo" is an error.
27805  #
27806  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27807  # It is also a way to make sure we got the proper file name for the real test later on.
27808  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27809  if test "x$test_shortpath" = x; then
27810    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27811$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27812    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27813  fi
27814
27815  # Call helper function which possibly converts this using DOS-style short mode.
27816  # If so, the updated path is stored in $new_path.
27817
27818  input_path="$new_path"
27819  # Check if we need to convert this using DOS-style short mode. If the path
27820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27821  # take no chances and rewrite it.
27822  # Note: m4 eats our [], so we need to use [ and ] instead.
27823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27824  if test "x$has_forbidden_chars" != x; then
27825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27826    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27827    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27828    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27829      # Going to short mode and back again did indeed matter. Since short mode is
27830      # case insensitive, let's make it lowercase to improve readability.
27831      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27832      # Now convert it back to Unix-style (cygpath)
27833      input_path=`$CYGPATH -u "$shortmode_path"`
27834      new_path="$input_path"
27835    fi
27836  fi
27837
27838  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27839  if test "x$test_cygdrive_prefix" = x; then
27840    # As a simple fix, exclude /usr/bin since it's not a real path.
27841    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27842      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27843      # a path prefixed by /cygdrive for fixpath to work.
27844      new_path="$CYGWIN_ROOT_PATH$input_path"
27845    fi
27846  fi
27847
27848
27849  if test "x$path" != "x$new_path"; then
27850    ipath="$new_path"
27851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27852$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27853  fi
27854
27855    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27856
27857  path="$ipath"
27858  has_colon=`$ECHO $path | $GREP ^.:`
27859  new_path="$path"
27860  if test "x$has_colon" = x; then
27861    # Not in mixed or Windows style, start by that.
27862    new_path=`cmd //c echo $path`
27863  fi
27864
27865
27866  input_path="$new_path"
27867  # Check if we need to convert this using DOS-style short mode. If the path
27868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27869  # take no chances and rewrite it.
27870  # Note: m4 eats our [], so we need to use [ and ] instead.
27871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27872  if test "x$has_forbidden_chars" != x; then
27873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27875  fi
27876
27877
27878  windows_path="$new_path"
27879  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27880    unix_path=`$CYGPATH -u "$windows_path"`
27881    new_path="$unix_path"
27882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27883    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27884    new_path="$unix_path"
27885  fi
27886
27887  if test "x$path" != "x$new_path"; then
27888    ipath="$new_path"
27889    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27890$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27891  fi
27892
27893  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27894  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27895
27896    else
27897      # We're on a unix platform. Hooray! :)
27898      path="$ipath"
27899      has_space=`$ECHO "$path" | $GREP " "`
27900      if test "x$has_space" != x; then
27901        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27902$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27903        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27904      fi
27905
27906      # Use eval to expand a potential ~
27907      eval path="$path"
27908      if test ! -f "$path" && test ! -d "$path"; then
27909        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27910      fi
27911
27912      ipath="`cd "$path"; $THEPWDCMD -L`"
27913    fi
27914  fi
27915
27916            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27917          fi
27918          IFS=";"
27919        fi
27920      done
27921      # Convert VS_LIB into SYSROOT_LDFLAGS
27922      for i in $VS_LIB; do
27923        libpath=$i
27924        # Only process non-empty elements
27925        if test "x$libpath" != x; then
27926          IFS="$OLDIFS"
27927          # Check that directory exists before calling fixup_path
27928          testpath=$libpath
27929
27930  windows_path="$testpath"
27931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27932    unix_path=`$CYGPATH -u "$windows_path"`
27933    testpath="$unix_path"
27934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27936    testpath="$unix_path"
27937  fi
27938
27939          if test -d "$testpath"; then
27940
27941  # Only process if variable expands to non-empty
27942
27943  if test "x$libpath" != x; then
27944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27945
27946  # Input might be given as Windows format, start by converting to
27947  # unix format.
27948  path="$libpath"
27949  new_path=`$CYGPATH -u "$path"`
27950
27951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27954  # "foo.exe" is OK but "foo" is an error.
27955  #
27956  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27957  # It is also a way to make sure we got the proper file name for the real test later on.
27958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27959  if test "x$test_shortpath" = x; then
27960    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27961$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27962    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27963  fi
27964
27965  # Call helper function which possibly converts this using DOS-style short mode.
27966  # If so, the updated path is stored in $new_path.
27967
27968  input_path="$new_path"
27969  # Check if we need to convert this using DOS-style short mode. If the path
27970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27971  # take no chances and rewrite it.
27972  # Note: m4 eats our [], so we need to use [ and ] instead.
27973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27974  if test "x$has_forbidden_chars" != x; then
27975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27976    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27977    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27978    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27979      # Going to short mode and back again did indeed matter. Since short mode is
27980      # case insensitive, let's make it lowercase to improve readability.
27981      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27982      # Now convert it back to Unix-style (cygpath)
27983      input_path=`$CYGPATH -u "$shortmode_path"`
27984      new_path="$input_path"
27985    fi
27986  fi
27987
27988  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27989  if test "x$test_cygdrive_prefix" = x; then
27990    # As a simple fix, exclude /usr/bin since it's not a real path.
27991    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27992      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27993      # a path prefixed by /cygdrive for fixpath to work.
27994      new_path="$CYGWIN_ROOT_PATH$input_path"
27995    fi
27996  fi
27997
27998
27999  if test "x$path" != "x$new_path"; then
28000    libpath="$new_path"
28001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28002$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28003  fi
28004
28005    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28006
28007  path="$libpath"
28008  has_colon=`$ECHO $path | $GREP ^.:`
28009  new_path="$path"
28010  if test "x$has_colon" = x; then
28011    # Not in mixed or Windows style, start by that.
28012    new_path=`cmd //c echo $path`
28013  fi
28014
28015
28016  input_path="$new_path"
28017  # Check if we need to convert this using DOS-style short mode. If the path
28018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28019  # take no chances and rewrite it.
28020  # Note: m4 eats our [], so we need to use [ and ] instead.
28021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28022  if test "x$has_forbidden_chars" != x; then
28023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28024    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28025  fi
28026
28027
28028  windows_path="$new_path"
28029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28030    unix_path=`$CYGPATH -u "$windows_path"`
28031    new_path="$unix_path"
28032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28034    new_path="$unix_path"
28035  fi
28036
28037  if test "x$path" != "x$new_path"; then
28038    libpath="$new_path"
28039    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
28040$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
28041  fi
28042
28043  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28044  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28045
28046    else
28047      # We're on a unix platform. Hooray! :)
28048      path="$libpath"
28049      has_space=`$ECHO "$path" | $GREP " "`
28050      if test "x$has_space" != x; then
28051        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
28052$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
28053        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28054      fi
28055
28056      # Use eval to expand a potential ~
28057      eval path="$path"
28058      if test ! -f "$path" && test ! -d "$path"; then
28059        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
28060      fi
28061
28062      libpath="`cd "$path"; $THEPWDCMD -L`"
28063    fi
28064  fi
28065
28066            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
28067          fi
28068          IFS=";"
28069        fi
28070      done
28071      IFS="$OLDIFS"
28072    fi
28073  else
28074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
28075$as_echo "not found" >&6; }
28076
28077    if test "x$VS_ENV_CMD" = x; then
28078      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
28079$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
28080      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
28081$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
28082    else
28083      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
28084$as_echo "$as_me: Running the extraction script failed." >&6;}
28085    fi
28086    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28087$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28088    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28089$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28090    as_fn_error $? "Cannot continue" "$LINENO" 5
28091  fi
28092
28093    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28094    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28095    PATH="$VS_PATH"
28096    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28097    export INCLUDE="$VS_INCLUDE"
28098    export LIB="$VS_LIB"
28099  fi
28100
28101  # For solaris we really need solaris tools, and not the GNU equivalent.
28102  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28103  # so add that to path before starting to probe.
28104  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
28105  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28106    PATH="/usr/ccs/bin:$PATH"
28107  fi
28108
28109  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28110  # override all other locations.
28111  if test "x$TOOLCHAIN_PATH" != x; then
28112    PATH=$TOOLCHAIN_PATH:$PATH
28113  fi
28114
28115
28116  #
28117  # Setup the compilers (CC and CXX)
28118  #
28119
28120  COMPILER_NAME=C
28121  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28122
28123  if test "x$CC" != x; then
28124    # User has supplied compiler name already, always let that override.
28125    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28126$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28127    if test "x`basename $CC`" = "x$CC"; then
28128      # A command without a complete path is provided, search $PATH.
28129
28130      for ac_prog in $CC
28131do
28132  # Extract the first word of "$ac_prog", so it can be a program name with args.
28133set dummy $ac_prog; ac_word=$2
28134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28135$as_echo_n "checking for $ac_word... " >&6; }
28136if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28137  $as_echo_n "(cached) " >&6
28138else
28139  case $POTENTIAL_CC in
28140  [\\/]* | ?:[\\/]*)
28141  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28142  ;;
28143  *)
28144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28145for as_dir in $PATH
28146do
28147  IFS=$as_save_IFS
28148  test -z "$as_dir" && as_dir=.
28149    for ac_exec_ext in '' $ac_executable_extensions; do
28150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28151    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28153    break 2
28154  fi
28155done
28156  done
28157IFS=$as_save_IFS
28158
28159  ;;
28160esac
28161fi
28162POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28163if test -n "$POTENTIAL_CC"; then
28164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28165$as_echo "$POTENTIAL_CC" >&6; }
28166else
28167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28168$as_echo "no" >&6; }
28169fi
28170
28171
28172  test -n "$POTENTIAL_CC" && break
28173done
28174
28175      if test "x$POTENTIAL_CC" != x; then
28176        CC=$POTENTIAL_CC
28177      else
28178        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28179      fi
28180    else
28181      # Otherwise it might already be a complete path
28182      if test ! -x "$CC"; then
28183        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28184      fi
28185    fi
28186  else
28187    # No user supplied value. Locate compiler ourselves.
28188
28189    # If we are cross compiling, assume cross compilation tools follows the
28190    # cross compilation standard where they are prefixed with the autoconf
28191    # standard name for the target. For example the binary
28192    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28193    # If we are not cross compiling, then the default compiler name will be
28194    # used.
28195
28196    CC=
28197    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28198    # before checking the rest of the PATH.
28199    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28200    # step, this should not be necessary.
28201    if test -n "$TOOLCHAIN_PATH"; then
28202      PATH_save="$PATH"
28203      PATH="$TOOLCHAIN_PATH"
28204      for ac_prog in $SEARCH_LIST
28205do
28206  # Extract the first word of "$ac_prog", so it can be a program name with args.
28207set dummy $ac_prog; ac_word=$2
28208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28209$as_echo_n "checking for $ac_word... " >&6; }
28210if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28211  $as_echo_n "(cached) " >&6
28212else
28213  case $TOOLCHAIN_PATH_CC in
28214  [\\/]* | ?:[\\/]*)
28215  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28216  ;;
28217  *)
28218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28219for as_dir in $PATH
28220do
28221  IFS=$as_save_IFS
28222  test -z "$as_dir" && as_dir=.
28223    for ac_exec_ext in '' $ac_executable_extensions; do
28224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28225    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28227    break 2
28228  fi
28229done
28230  done
28231IFS=$as_save_IFS
28232
28233  ;;
28234esac
28235fi
28236TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28237if test -n "$TOOLCHAIN_PATH_CC"; then
28238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28239$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28240else
28241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28242$as_echo "no" >&6; }
28243fi
28244
28245
28246  test -n "$TOOLCHAIN_PATH_CC" && break
28247done
28248
28249      CC=$TOOLCHAIN_PATH_CC
28250      PATH="$PATH_save"
28251    fi
28252
28253    # AC_PATH_PROGS can't be run multiple times with the same variable,
28254    # so create a new name for this run.
28255    if test "x$CC" = x; then
28256      for ac_prog in $SEARCH_LIST
28257do
28258  # Extract the first word of "$ac_prog", so it can be a program name with args.
28259set dummy $ac_prog; ac_word=$2
28260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28261$as_echo_n "checking for $ac_word... " >&6; }
28262if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28263  $as_echo_n "(cached) " >&6
28264else
28265  case $POTENTIAL_CC in
28266  [\\/]* | ?:[\\/]*)
28267  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28268  ;;
28269  *)
28270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28271for as_dir in $PATH
28272do
28273  IFS=$as_save_IFS
28274  test -z "$as_dir" && as_dir=.
28275    for ac_exec_ext in '' $ac_executable_extensions; do
28276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28277    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28279    break 2
28280  fi
28281done
28282  done
28283IFS=$as_save_IFS
28284
28285  ;;
28286esac
28287fi
28288POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28289if test -n "$POTENTIAL_CC"; then
28290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28291$as_echo "$POTENTIAL_CC" >&6; }
28292else
28293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28294$as_echo "no" >&6; }
28295fi
28296
28297
28298  test -n "$POTENTIAL_CC" && break
28299done
28300
28301      CC=$POTENTIAL_CC
28302    fi
28303
28304    if test "x$CC" = x; then
28305
28306  # Print a helpful message on how to acquire the necessary build dependency.
28307  # devkit is the help tag: freetype, cups, pulse, alsa etc
28308  MISSING_DEPENDENCY=devkit
28309
28310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28311    cygwin_help $MISSING_DEPENDENCY
28312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28313    msys_help $MISSING_DEPENDENCY
28314  else
28315    PKGHANDLER_COMMAND=
28316
28317    case $PKGHANDLER in
28318      apt-get)
28319        apt_help     $MISSING_DEPENDENCY ;;
28320      yum)
28321        yum_help     $MISSING_DEPENDENCY ;;
28322      port)
28323        port_help    $MISSING_DEPENDENCY ;;
28324      pkgutil)
28325        pkgutil_help $MISSING_DEPENDENCY ;;
28326      pkgadd)
28327        pkgadd_help  $MISSING_DEPENDENCY ;;
28328    esac
28329
28330    if test "x$PKGHANDLER_COMMAND" != x; then
28331      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28332    fi
28333  fi
28334
28335      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28336    fi
28337  fi
28338
28339  # Now we have a compiler binary in CC. Make sure it's okay.
28340
28341  # Only process if variable expands to non-empty
28342
28343  if test "x$CC" != x; then
28344    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28345
28346  # First separate the path from the arguments. This will split at the first
28347  # space.
28348  complete="$CC"
28349  path="${complete%% *}"
28350  tmp="$complete EOL"
28351  arguments="${tmp#* }"
28352
28353  # Input might be given as Windows format, start by converting to
28354  # unix format.
28355  new_path=`$CYGPATH -u "$path"`
28356
28357  # Now try to locate executable using which
28358  new_path=`$WHICH "$new_path" 2> /dev/null`
28359  # bat and cmd files are not always considered executable in cygwin causing which
28360  # to not find them
28361  if test "x$new_path" = x \
28362      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28363      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28364    new_path=`$CYGPATH -u "$path"`
28365  fi
28366  if test "x$new_path" = x; then
28367    # Oops. Which didn't find the executable.
28368    # The splitting of arguments from the executable at a space might have been incorrect,
28369    # since paths with space are more likely in Windows. Give it another try with the whole
28370    # argument.
28371    path="$complete"
28372    arguments="EOL"
28373    new_path=`$CYGPATH -u "$path"`
28374    new_path=`$WHICH "$new_path" 2> /dev/null`
28375    # bat and cmd files are not always considered executable in cygwin causing which
28376    # to not find them
28377    if test "x$new_path" = x \
28378        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28379        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28380      new_path=`$CYGPATH -u "$path"`
28381    fi
28382    if test "x$new_path" = x; then
28383      # It's still not found. Now this is an unrecoverable error.
28384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28385$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28386      has_space=`$ECHO "$complete" | $GREP " "`
28387      if test "x$has_space" != x; then
28388        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28389$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28390      fi
28391      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28392    fi
28393  fi
28394
28395  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28396  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28397  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28398  # "foo.exe" is OK but "foo" is an error.
28399  #
28400  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28401  # It is also a way to make sure we got the proper file name for the real test later on.
28402  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28403  if test "x$test_shortpath" = x; then
28404    # Short path failed, file does not exist as specified.
28405    # Try adding .exe or .cmd
28406    if test -f "${new_path}.exe"; then
28407      input_to_shortpath="${new_path}.exe"
28408    elif test -f "${new_path}.cmd"; then
28409      input_to_shortpath="${new_path}.cmd"
28410    else
28411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28412$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28413      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28414$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28415      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28416    fi
28417  else
28418    input_to_shortpath="$new_path"
28419  fi
28420
28421  # Call helper function which possibly converts this using DOS-style short mode.
28422  # If so, the updated path is stored in $new_path.
28423  new_path="$input_to_shortpath"
28424
28425  input_path="$input_to_shortpath"
28426  # Check if we need to convert this using DOS-style short mode. If the path
28427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28428  # take no chances and rewrite it.
28429  # Note: m4 eats our [], so we need to use [ and ] instead.
28430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28431  if test "x$has_forbidden_chars" != x; then
28432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28433    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28434    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28435    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28436      # Going to short mode and back again did indeed matter. Since short mode is
28437      # case insensitive, let's make it lowercase to improve readability.
28438      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28439      # Now convert it back to Unix-style (cygpath)
28440      input_path=`$CYGPATH -u "$shortmode_path"`
28441      new_path="$input_path"
28442    fi
28443  fi
28444
28445  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28446  if test "x$test_cygdrive_prefix" = x; then
28447    # As a simple fix, exclude /usr/bin since it's not a real path.
28448    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28449      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28450      # a path prefixed by /cygdrive for fixpath to work.
28451      new_path="$CYGWIN_ROOT_PATH$input_path"
28452    fi
28453  fi
28454
28455  # remove trailing .exe if any
28456  new_path="${new_path/%.exe/}"
28457
28458    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28459
28460  # First separate the path from the arguments. This will split at the first
28461  # space.
28462  complete="$CC"
28463  path="${complete%% *}"
28464  tmp="$complete EOL"
28465  arguments="${tmp#* }"
28466
28467  # Input might be given as Windows format, start by converting to
28468  # unix format.
28469  new_path="$path"
28470
28471  windows_path="$new_path"
28472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28473    unix_path=`$CYGPATH -u "$windows_path"`
28474    new_path="$unix_path"
28475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28477    new_path="$unix_path"
28478  fi
28479
28480
28481  # Now try to locate executable using which
28482  new_path=`$WHICH "$new_path" 2> /dev/null`
28483
28484  if test "x$new_path" = x; then
28485    # Oops. Which didn't find the executable.
28486    # The splitting of arguments from the executable at a space might have been incorrect,
28487    # since paths with space are more likely in Windows. Give it another try with the whole
28488    # argument.
28489    path="$complete"
28490    arguments="EOL"
28491    new_path="$path"
28492
28493  windows_path="$new_path"
28494  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28495    unix_path=`$CYGPATH -u "$windows_path"`
28496    new_path="$unix_path"
28497  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28498    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28499    new_path="$unix_path"
28500  fi
28501
28502
28503    new_path=`$WHICH "$new_path" 2> /dev/null`
28504    # bat and cmd files are not always considered executable in MSYS causing which
28505    # to not find them
28506    if test "x$new_path" = x \
28507        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28508        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28509      new_path="$path"
28510
28511  windows_path="$new_path"
28512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28513    unix_path=`$CYGPATH -u "$windows_path"`
28514    new_path="$unix_path"
28515  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28516    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28517    new_path="$unix_path"
28518  fi
28519
28520    fi
28521
28522    if test "x$new_path" = x; then
28523      # It's still not found. Now this is an unrecoverable error.
28524      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28525$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28526      has_space=`$ECHO "$complete" | $GREP " "`
28527      if test "x$has_space" != x; then
28528        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28529$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28530      fi
28531      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28532    fi
28533  fi
28534
28535  # Now new_path has a complete unix path to the binary
28536  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28537    # Keep paths in /bin as-is, but remove trailing .exe if any
28538    new_path="${new_path/%.exe/}"
28539    # Do not save /bin paths to all_fixpath_prefixes!
28540  else
28541    # Not in mixed or Windows style, start by that.
28542    new_path=`cmd //c echo $new_path`
28543
28544  input_path="$new_path"
28545  # Check if we need to convert this using DOS-style short mode. If the path
28546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28547  # take no chances and rewrite it.
28548  # Note: m4 eats our [], so we need to use [ and ] instead.
28549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28550  if test "x$has_forbidden_chars" != x; then
28551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28552    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28553  fi
28554
28555    # Output is in $new_path
28556
28557  windows_path="$new_path"
28558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28559    unix_path=`$CYGPATH -u "$windows_path"`
28560    new_path="$unix_path"
28561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28563    new_path="$unix_path"
28564  fi
28565
28566    # remove trailing .exe if any
28567    new_path="${new_path/%.exe/}"
28568
28569    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28570    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28571  fi
28572
28573    else
28574      # We're on a unix platform. Hooray! :)
28575      # First separate the path from the arguments. This will split at the first
28576      # space.
28577      complete="$CC"
28578      path="${complete%% *}"
28579      tmp="$complete EOL"
28580      arguments="${tmp#* }"
28581
28582      # Cannot rely on the command "which" here since it doesn't always work.
28583      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28584      if test -z "$is_absolute_path"; then
28585        # Path to executable is not absolute. Find it.
28586        IFS_save="$IFS"
28587        IFS=:
28588        for p in $PATH; do
28589          if test -f "$p/$path" && test -x "$p/$path"; then
28590            new_path="$p/$path"
28591            break
28592          fi
28593        done
28594        IFS="$IFS_save"
28595      else
28596        # This is an absolute path, we can use it without further modifications.
28597        new_path="$path"
28598      fi
28599
28600      if test "x$new_path" = x; then
28601        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28602$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28603        has_space=`$ECHO "$complete" | $GREP " "`
28604        if test "x$has_space" != x; then
28605          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28606$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28607        fi
28608        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28609      fi
28610    fi
28611
28612    # Now join together the path and the arguments once again
28613    if test "x$arguments" != xEOL; then
28614      new_complete="$new_path ${arguments% *}"
28615    else
28616      new_complete="$new_path"
28617    fi
28618
28619    if test "x$complete" != "x$new_complete"; then
28620      CC="$new_complete"
28621      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28622$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28623    fi
28624  fi
28625
28626  TEST_COMPILER="$CC"
28627  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28628  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28629  if test "x$OPENJDK_BUILD_OS" != xaix; then
28630    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28632$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28633
28634  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28635    # Follow a chain of symbolic links. Use readlink
28636    # where it exists, else fall back to horribly
28637    # complicated shell code.
28638    if test "x$READLINK_TESTED" != yes; then
28639      # On MacOSX there is a readlink tool with a different
28640      # purpose than the GNU readlink tool. Check the found readlink.
28641      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28642      if test "x$ISGNU" = x; then
28643        # A readlink that we do not know how to use.
28644        # Are there other non-GNU readlinks out there?
28645        READLINK_TESTED=yes
28646        READLINK=
28647      fi
28648    fi
28649
28650    if test "x$READLINK" != x; then
28651      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28652    else
28653      # Save the current directory for restoring afterwards
28654      STARTDIR=$PWD
28655      COUNTER=0
28656      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28657      sym_link_file=`$BASENAME $TEST_COMPILER`
28658      cd $sym_link_dir
28659      # Use -P flag to resolve symlinks in directories.
28660      cd `$THEPWDCMD -P`
28661      sym_link_dir=`$THEPWDCMD -P`
28662      # Resolve file symlinks
28663      while test $COUNTER -lt 20; do
28664        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28665        if test "x$ISLINK" == x; then
28666          # This is not a symbolic link! We are done!
28667          break
28668        fi
28669        # Again resolve directory symlinks since the target of the just found
28670        # link could be in a different directory
28671        cd `$DIRNAME $ISLINK`
28672        sym_link_dir=`$THEPWDCMD -P`
28673        sym_link_file=`$BASENAME $ISLINK`
28674        let COUNTER=COUNTER+1
28675      done
28676      cd $STARTDIR
28677      TEST_COMPILER=$sym_link_dir/$sym_link_file
28678    fi
28679  fi
28680
28681    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28682$as_echo "$TEST_COMPILER" >&6; }
28683  fi
28684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28685$as_echo_n "checking if CC is disguised ccache... " >&6; }
28686
28687  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28688  if test "x$COMPILER_BASENAME" = "xccache"; then
28689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28690$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28691    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28692    # We want to control ccache invocation ourselves, so ignore this cc and try
28693    # searching again.
28694
28695    # Remove the path to the fake ccache cc from the PATH
28696    RETRY_COMPILER_SAVED_PATH="$PATH"
28697    COMPILER_DIRNAME=`$DIRNAME $CC`
28698    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28699
28700    # Try again looking for our compiler
28701    if test -n "$ac_tool_prefix"; then
28702  for ac_prog in $TOOLCHAIN_CC_BINARY
28703  do
28704    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28705set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28707$as_echo_n "checking for $ac_word... " >&6; }
28708if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28709  $as_echo_n "(cached) " >&6
28710else
28711  if test -n "$PROPER_COMPILER_CC"; then
28712  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28713else
28714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28715for as_dir in $PATH
28716do
28717  IFS=$as_save_IFS
28718  test -z "$as_dir" && as_dir=.
28719    for ac_exec_ext in '' $ac_executable_extensions; do
28720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28721    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28723    break 2
28724  fi
28725done
28726  done
28727IFS=$as_save_IFS
28728
28729fi
28730fi
28731PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28732if test -n "$PROPER_COMPILER_CC"; then
28733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28734$as_echo "$PROPER_COMPILER_CC" >&6; }
28735else
28736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28737$as_echo "no" >&6; }
28738fi
28739
28740
28741    test -n "$PROPER_COMPILER_CC" && break
28742  done
28743fi
28744if test -z "$PROPER_COMPILER_CC"; then
28745  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28746  for ac_prog in $TOOLCHAIN_CC_BINARY
28747do
28748  # Extract the first word of "$ac_prog", so it can be a program name with args.
28749set dummy $ac_prog; ac_word=$2
28750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28751$as_echo_n "checking for $ac_word... " >&6; }
28752if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28753  $as_echo_n "(cached) " >&6
28754else
28755  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28756  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28757else
28758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28759for as_dir in $PATH
28760do
28761  IFS=$as_save_IFS
28762  test -z "$as_dir" && as_dir=.
28763    for ac_exec_ext in '' $ac_executable_extensions; do
28764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28765    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28767    break 2
28768  fi
28769done
28770  done
28771IFS=$as_save_IFS
28772
28773fi
28774fi
28775ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28776if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28778$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28779else
28780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28781$as_echo "no" >&6; }
28782fi
28783
28784
28785  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28786done
28787
28788  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28789    PROPER_COMPILER_CC=""
28790  else
28791    case $cross_compiling:$ac_tool_warned in
28792yes:)
28793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28795ac_tool_warned=yes ;;
28796esac
28797    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28798  fi
28799fi
28800
28801
28802  # Only process if variable expands to non-empty
28803
28804  if test "x$PROPER_COMPILER_CC" != x; then
28805    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28806
28807  # First separate the path from the arguments. This will split at the first
28808  # space.
28809  complete="$PROPER_COMPILER_CC"
28810  path="${complete%% *}"
28811  tmp="$complete EOL"
28812  arguments="${tmp#* }"
28813
28814  # Input might be given as Windows format, start by converting to
28815  # unix format.
28816  new_path=`$CYGPATH -u "$path"`
28817
28818  # Now try to locate executable using which
28819  new_path=`$WHICH "$new_path" 2> /dev/null`
28820  # bat and cmd files are not always considered executable in cygwin causing which
28821  # to not find them
28822  if test "x$new_path" = x \
28823      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28824      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28825    new_path=`$CYGPATH -u "$path"`
28826  fi
28827  if test "x$new_path" = x; then
28828    # Oops. Which didn't find the executable.
28829    # The splitting of arguments from the executable at a space might have been incorrect,
28830    # since paths with space are more likely in Windows. Give it another try with the whole
28831    # argument.
28832    path="$complete"
28833    arguments="EOL"
28834    new_path=`$CYGPATH -u "$path"`
28835    new_path=`$WHICH "$new_path" 2> /dev/null`
28836    # bat and cmd files are not always considered executable in cygwin causing which
28837    # to not find them
28838    if test "x$new_path" = x \
28839        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28840        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28841      new_path=`$CYGPATH -u "$path"`
28842    fi
28843    if test "x$new_path" = x; then
28844      # It's still not found. Now this is an unrecoverable error.
28845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28846$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28847      has_space=`$ECHO "$complete" | $GREP " "`
28848      if test "x$has_space" != x; then
28849        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28850$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28851      fi
28852      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28853    fi
28854  fi
28855
28856  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28857  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28858  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28859  # "foo.exe" is OK but "foo" is an error.
28860  #
28861  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28862  # It is also a way to make sure we got the proper file name for the real test later on.
28863  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28864  if test "x$test_shortpath" = x; then
28865    # Short path failed, file does not exist as specified.
28866    # Try adding .exe or .cmd
28867    if test -f "${new_path}.exe"; then
28868      input_to_shortpath="${new_path}.exe"
28869    elif test -f "${new_path}.cmd"; then
28870      input_to_shortpath="${new_path}.cmd"
28871    else
28872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28873$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28874      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28875$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28876      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28877    fi
28878  else
28879    input_to_shortpath="$new_path"
28880  fi
28881
28882  # Call helper function which possibly converts this using DOS-style short mode.
28883  # If so, the updated path is stored in $new_path.
28884  new_path="$input_to_shortpath"
28885
28886  input_path="$input_to_shortpath"
28887  # Check if we need to convert this using DOS-style short mode. If the path
28888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28889  # take no chances and rewrite it.
28890  # Note: m4 eats our [], so we need to use [ and ] instead.
28891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28892  if test "x$has_forbidden_chars" != x; then
28893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28897      # Going to short mode and back again did indeed matter. Since short mode is
28898      # case insensitive, let's make it lowercase to improve readability.
28899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28900      # Now convert it back to Unix-style (cygpath)
28901      input_path=`$CYGPATH -u "$shortmode_path"`
28902      new_path="$input_path"
28903    fi
28904  fi
28905
28906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28907  if test "x$test_cygdrive_prefix" = x; then
28908    # As a simple fix, exclude /usr/bin since it's not a real path.
28909    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28911      # a path prefixed by /cygdrive for fixpath to work.
28912      new_path="$CYGWIN_ROOT_PATH$input_path"
28913    fi
28914  fi
28915
28916  # remove trailing .exe if any
28917  new_path="${new_path/%.exe/}"
28918
28919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28920
28921  # First separate the path from the arguments. This will split at the first
28922  # space.
28923  complete="$PROPER_COMPILER_CC"
28924  path="${complete%% *}"
28925  tmp="$complete EOL"
28926  arguments="${tmp#* }"
28927
28928  # Input might be given as Windows format, start by converting to
28929  # unix format.
28930  new_path="$path"
28931
28932  windows_path="$new_path"
28933  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28934    unix_path=`$CYGPATH -u "$windows_path"`
28935    new_path="$unix_path"
28936  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28937    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28938    new_path="$unix_path"
28939  fi
28940
28941
28942  # Now try to locate executable using which
28943  new_path=`$WHICH "$new_path" 2> /dev/null`
28944
28945  if test "x$new_path" = x; then
28946    # Oops. Which didn't find the executable.
28947    # The splitting of arguments from the executable at a space might have been incorrect,
28948    # since paths with space are more likely in Windows. Give it another try with the whole
28949    # argument.
28950    path="$complete"
28951    arguments="EOL"
28952    new_path="$path"
28953
28954  windows_path="$new_path"
28955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28956    unix_path=`$CYGPATH -u "$windows_path"`
28957    new_path="$unix_path"
28958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28960    new_path="$unix_path"
28961  fi
28962
28963
28964    new_path=`$WHICH "$new_path" 2> /dev/null`
28965    # bat and cmd files are not always considered executable in MSYS causing which
28966    # to not find them
28967    if test "x$new_path" = x \
28968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28970      new_path="$path"
28971
28972  windows_path="$new_path"
28973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28974    unix_path=`$CYGPATH -u "$windows_path"`
28975    new_path="$unix_path"
28976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28978    new_path="$unix_path"
28979  fi
28980
28981    fi
28982
28983    if test "x$new_path" = x; then
28984      # It's still not found. Now this is an unrecoverable error.
28985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28986$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28987      has_space=`$ECHO "$complete" | $GREP " "`
28988      if test "x$has_space" != x; then
28989        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28990$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28991      fi
28992      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28993    fi
28994  fi
28995
28996  # Now new_path has a complete unix path to the binary
28997  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28998    # Keep paths in /bin as-is, but remove trailing .exe if any
28999    new_path="${new_path/%.exe/}"
29000    # Do not save /bin paths to all_fixpath_prefixes!
29001  else
29002    # Not in mixed or Windows style, start by that.
29003    new_path=`cmd //c echo $new_path`
29004
29005  input_path="$new_path"
29006  # Check if we need to convert this using DOS-style short mode. If the path
29007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29008  # take no chances and rewrite it.
29009  # Note: m4 eats our [], so we need to use [ and ] instead.
29010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29011  if test "x$has_forbidden_chars" != x; then
29012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29013    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29014  fi
29015
29016    # Output is in $new_path
29017
29018  windows_path="$new_path"
29019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29020    unix_path=`$CYGPATH -u "$windows_path"`
29021    new_path="$unix_path"
29022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29024    new_path="$unix_path"
29025  fi
29026
29027    # remove trailing .exe if any
29028    new_path="${new_path/%.exe/}"
29029
29030    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29031    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29032  fi
29033
29034    else
29035      # We're on a unix platform. Hooray! :)
29036      # First separate the path from the arguments. This will split at the first
29037      # space.
29038      complete="$PROPER_COMPILER_CC"
29039      path="${complete%% *}"
29040      tmp="$complete EOL"
29041      arguments="${tmp#* }"
29042
29043      # Cannot rely on the command "which" here since it doesn't always work.
29044      is_absolute_path=`$ECHO "$path" | $GREP ^/`
29045      if test -z "$is_absolute_path"; then
29046        # Path to executable is not absolute. Find it.
29047        IFS_save="$IFS"
29048        IFS=:
29049        for p in $PATH; do
29050          if test -f "$p/$path" && test -x "$p/$path"; then
29051            new_path="$p/$path"
29052            break
29053          fi
29054        done
29055        IFS="$IFS_save"
29056      else
29057        # This is an absolute path, we can use it without further modifications.
29058        new_path="$path"
29059      fi
29060
29061      if test "x$new_path" = x; then
29062        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
29063$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
29064        has_space=`$ECHO "$complete" | $GREP " "`
29065        if test "x$has_space" != x; then
29066          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29067$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29068        fi
29069        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
29070      fi
29071    fi
29072
29073    # Now join together the path and the arguments once again
29074    if test "x$arguments" != xEOL; then
29075      new_complete="$new_path ${arguments% *}"
29076    else
29077      new_complete="$new_path"
29078    fi
29079
29080    if test "x$complete" != "x$new_complete"; then
29081      PROPER_COMPILER_CC="$new_complete"
29082      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29083$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29084    fi
29085  fi
29086
29087    PATH="$RETRY_COMPILER_SAVED_PATH"
29088
29089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29090$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29091
29092  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29093    # Follow a chain of symbolic links. Use readlink
29094    # where it exists, else fall back to horribly
29095    # complicated shell code.
29096    if test "x$READLINK_TESTED" != yes; then
29097      # On MacOSX there is a readlink tool with a different
29098      # purpose than the GNU readlink tool. Check the found readlink.
29099      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29100      if test "x$ISGNU" = x; then
29101        # A readlink that we do not know how to use.
29102        # Are there other non-GNU readlinks out there?
29103        READLINK_TESTED=yes
29104        READLINK=
29105      fi
29106    fi
29107
29108    if test "x$READLINK" != x; then
29109      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29110    else
29111      # Save the current directory for restoring afterwards
29112      STARTDIR=$PWD
29113      COUNTER=0
29114      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29115      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29116      cd $sym_link_dir
29117      # Use -P flag to resolve symlinks in directories.
29118      cd `$THEPWDCMD -P`
29119      sym_link_dir=`$THEPWDCMD -P`
29120      # Resolve file symlinks
29121      while test $COUNTER -lt 20; do
29122        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29123        if test "x$ISLINK" == x; then
29124          # This is not a symbolic link! We are done!
29125          break
29126        fi
29127        # Again resolve directory symlinks since the target of the just found
29128        # link could be in a different directory
29129        cd `$DIRNAME $ISLINK`
29130        sym_link_dir=`$THEPWDCMD -P`
29131        sym_link_file=`$BASENAME $ISLINK`
29132        let COUNTER=COUNTER+1
29133      done
29134      cd $STARTDIR
29135      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29136    fi
29137  fi
29138
29139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29140$as_echo "$PROPER_COMPILER_CC" >&6; }
29141    CC="$PROPER_COMPILER_CC"
29142  else
29143    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29144$as_echo "no, keeping CC" >&6; }
29145  fi
29146
29147
29148  COMPILER=$CC
29149  COMPILER_NAME=$COMPILER_NAME
29150
29151  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29152    # cc -V output typically looks like
29153    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29154    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29155    # Check that this is likely to be the Solaris Studio cc.
29156    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29157    if test $? -ne 0; then
29158      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29159      { $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
29160$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29162$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29163      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29164$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29165      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29166    fi
29167    # Remove usage instructions (if present), and
29168    # collapse compiler output into a single line
29169    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29170        $SED -e 's/ *[Uu]sage:.*//'`
29171    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29172        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29173  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29174    # xlc -qversion output typically looks like
29175    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29176    #     Version: 11.01.0000.0015
29177    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29178    # Check that this is likely to be the IBM XL C compiler.
29179    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29180    if test $? -ne 0; then
29181      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29182      { $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
29183$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29184      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29185$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29186      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29187$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29188      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29189    fi
29190    # Collapse compiler output into a single line
29191    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29192    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29193        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29194  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29195    # There is no specific version flag, but all output starts with a version string.
29196    # First line typically looks something like:
29197    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29198    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29199    # Check that this is likely to be Microsoft CL.EXE.
29200    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29201    if test $? -ne 0; then
29202      { $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
29203$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29204      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29205$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29206      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29207    fi
29208    # Collapse compiler output into a single line
29209    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29210    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29211        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29212  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29213    # gcc --version output typically looks like
29214    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29215    #     Copyright (C) 2013 Free Software Foundation, Inc.
29216    #     This is free software; see the source for copying conditions.  There is NO
29217    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29218    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29219    # Check that this is likely to be GCC.
29220    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29221    if test $? -ne 0; then
29222      { $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
29223$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29224      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29225$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29226      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29227    fi
29228    # Remove Copyright and legalese from version string, and
29229    # collapse into a single line
29230    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29231        $SED -e 's/ *Copyright .*//'`
29232    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29233        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29234  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29235    # clang --version output typically looks like
29236    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29237    #    clang version 3.3 (tags/RELEASE_33/final)
29238    # or
29239    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29240    #    Target: x86_64-pc-linux-gnu
29241    #    Thread model: posix
29242    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29243    # Check that this is likely to be clang
29244    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29245    if test $? -ne 0; then
29246      { $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
29247$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29248      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29249$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29250      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29251    fi
29252    # Collapse compiler output into a single line
29253    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29254    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29255        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29256  else
29257      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29258  fi
29259  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29260  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29261  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29262  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29263
29264  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29265$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29266
29267
29268  # Now that we have resolved CC ourself, let autoconf have its go at it
29269  ac_ext=c
29270ac_cpp='$CPP $CPPFLAGS'
29271ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29272ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29273ac_compiler_gnu=$ac_cv_c_compiler_gnu
29274if test -n "$ac_tool_prefix"; then
29275  for ac_prog in $CC
29276  do
29277    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29278set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29280$as_echo_n "checking for $ac_word... " >&6; }
29281if ${ac_cv_prog_CC+:} false; then :
29282  $as_echo_n "(cached) " >&6
29283else
29284  if test -n "$CC"; then
29285  ac_cv_prog_CC="$CC" # Let the user override the test.
29286else
29287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29288for as_dir in $PATH
29289do
29290  IFS=$as_save_IFS
29291  test -z "$as_dir" && as_dir=.
29292    for ac_exec_ext in '' $ac_executable_extensions; do
29293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29294    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29296    break 2
29297  fi
29298done
29299  done
29300IFS=$as_save_IFS
29301
29302fi
29303fi
29304CC=$ac_cv_prog_CC
29305if test -n "$CC"; then
29306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29307$as_echo "$CC" >&6; }
29308else
29309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29310$as_echo "no" >&6; }
29311fi
29312
29313
29314    test -n "$CC" && break
29315  done
29316fi
29317if test -z "$CC"; then
29318  ac_ct_CC=$CC
29319  for ac_prog in $CC
29320do
29321  # Extract the first word of "$ac_prog", so it can be a program name with args.
29322set dummy $ac_prog; ac_word=$2
29323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29324$as_echo_n "checking for $ac_word... " >&6; }
29325if ${ac_cv_prog_ac_ct_CC+:} false; then :
29326  $as_echo_n "(cached) " >&6
29327else
29328  if test -n "$ac_ct_CC"; then
29329  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29330else
29331as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29332for as_dir in $PATH
29333do
29334  IFS=$as_save_IFS
29335  test -z "$as_dir" && as_dir=.
29336    for ac_exec_ext in '' $ac_executable_extensions; do
29337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29338    ac_cv_prog_ac_ct_CC="$ac_prog"
29339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29340    break 2
29341  fi
29342done
29343  done
29344IFS=$as_save_IFS
29345
29346fi
29347fi
29348ac_ct_CC=$ac_cv_prog_ac_ct_CC
29349if test -n "$ac_ct_CC"; then
29350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29351$as_echo "$ac_ct_CC" >&6; }
29352else
29353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29354$as_echo "no" >&6; }
29355fi
29356
29357
29358  test -n "$ac_ct_CC" && break
29359done
29360
29361  if test "x$ac_ct_CC" = x; then
29362    CC=""
29363  else
29364    case $cross_compiling:$ac_tool_warned in
29365yes:)
29366{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29367$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29368ac_tool_warned=yes ;;
29369esac
29370    CC=$ac_ct_CC
29371  fi
29372fi
29373
29374
29375test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29376$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29377as_fn_error $? "no acceptable C compiler found in \$PATH
29378See \`config.log' for more details" "$LINENO" 5; }
29379
29380# Provide some information about the compiler.
29381$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29382set X $ac_compile
29383ac_compiler=$2
29384for ac_option in --version -v -V -qversion; do
29385  { { ac_try="$ac_compiler $ac_option >&5"
29386case "(($ac_try" in
29387  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29388  *) ac_try_echo=$ac_try;;
29389esac
29390eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29391$as_echo "$ac_try_echo"; } >&5
29392  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29393  ac_status=$?
29394  if test -s conftest.err; then
29395    sed '10a\
29396... rest of stderr output deleted ...
29397         10q' conftest.err >conftest.er1
29398    cat conftest.er1 >&5
29399  fi
29400  rm -f conftest.er1 conftest.err
29401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29402  test $ac_status = 0; }
29403done
29404
29405cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29406/* end confdefs.h.  */
29407
29408int
29409main ()
29410{
29411
29412  ;
29413  return 0;
29414}
29415_ACEOF
29416ac_clean_files_save=$ac_clean_files
29417ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29418# Try to create an executable without -o first, disregard a.out.
29419# It will help us diagnose broken compilers, and finding out an intuition
29420# of exeext.
29421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29422$as_echo_n "checking whether the C compiler works... " >&6; }
29423ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29424
29425# The possible output files:
29426ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29427
29428ac_rmfiles=
29429for ac_file in $ac_files
29430do
29431  case $ac_file in
29432    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29433    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29434  esac
29435done
29436rm -f $ac_rmfiles
29437
29438if { { ac_try="$ac_link_default"
29439case "(($ac_try" in
29440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29441  *) ac_try_echo=$ac_try;;
29442esac
29443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29444$as_echo "$ac_try_echo"; } >&5
29445  (eval "$ac_link_default") 2>&5
29446  ac_status=$?
29447  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29448  test $ac_status = 0; }; then :
29449  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29450# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29451# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29452# so that the user can short-circuit this test for compilers unknown to
29453# Autoconf.
29454for ac_file in $ac_files ''
29455do
29456  test -f "$ac_file" || continue
29457  case $ac_file in
29458    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29459	;;
29460    [ab].out )
29461	# We found the default executable, but exeext='' is most
29462	# certainly right.
29463	break;;
29464    *.* )
29465	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29466	then :; else
29467	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29468	fi
29469	# We set ac_cv_exeext here because the later test for it is not
29470	# safe: cross compilers may not add the suffix if given an `-o'
29471	# argument, so we may need to know it at that point already.
29472	# Even if this section looks crufty: it has the advantage of
29473	# actually working.
29474	break;;
29475    * )
29476	break;;
29477  esac
29478done
29479test "$ac_cv_exeext" = no && ac_cv_exeext=
29480
29481else
29482  ac_file=''
29483fi
29484if test -z "$ac_file"; then :
29485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29486$as_echo "no" >&6; }
29487$as_echo "$as_me: failed program was:" >&5
29488sed 's/^/| /' conftest.$ac_ext >&5
29489
29490{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29491$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29492as_fn_error 77 "C compiler cannot create executables
29493See \`config.log' for more details" "$LINENO" 5; }
29494else
29495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29496$as_echo "yes" >&6; }
29497fi
29498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29499$as_echo_n "checking for C compiler default output file name... " >&6; }
29500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29501$as_echo "$ac_file" >&6; }
29502ac_exeext=$ac_cv_exeext
29503
29504rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29505ac_clean_files=$ac_clean_files_save
29506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29507$as_echo_n "checking for suffix of executables... " >&6; }
29508if { { ac_try="$ac_link"
29509case "(($ac_try" in
29510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29511  *) ac_try_echo=$ac_try;;
29512esac
29513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29514$as_echo "$ac_try_echo"; } >&5
29515  (eval "$ac_link") 2>&5
29516  ac_status=$?
29517  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29518  test $ac_status = 0; }; then :
29519  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29520# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29521# work properly (i.e., refer to `conftest.exe'), while it won't with
29522# `rm'.
29523for ac_file in conftest.exe conftest conftest.*; do
29524  test -f "$ac_file" || continue
29525  case $ac_file in
29526    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29527    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29528	  break;;
29529    * ) break;;
29530  esac
29531done
29532else
29533  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29535as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29536See \`config.log' for more details" "$LINENO" 5; }
29537fi
29538rm -f conftest conftest$ac_cv_exeext
29539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29540$as_echo "$ac_cv_exeext" >&6; }
29541
29542rm -f conftest.$ac_ext
29543EXEEXT=$ac_cv_exeext
29544ac_exeext=$EXEEXT
29545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29546/* end confdefs.h.  */
29547#include <stdio.h>
29548int
29549main ()
29550{
29551FILE *f = fopen ("conftest.out", "w");
29552 return ferror (f) || fclose (f) != 0;
29553
29554  ;
29555  return 0;
29556}
29557_ACEOF
29558ac_clean_files="$ac_clean_files conftest.out"
29559# Check that the compiler produces executables we can run.  If not, either
29560# the compiler is broken, or we cross compile.
29561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29562$as_echo_n "checking whether we are cross compiling... " >&6; }
29563if test "$cross_compiling" != yes; then
29564  { { ac_try="$ac_link"
29565case "(($ac_try" in
29566  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29567  *) ac_try_echo=$ac_try;;
29568esac
29569eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29570$as_echo "$ac_try_echo"; } >&5
29571  (eval "$ac_link") 2>&5
29572  ac_status=$?
29573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29574  test $ac_status = 0; }
29575  if { ac_try='./conftest$ac_cv_exeext'
29576  { { case "(($ac_try" in
29577  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29578  *) ac_try_echo=$ac_try;;
29579esac
29580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29581$as_echo "$ac_try_echo"; } >&5
29582  (eval "$ac_try") 2>&5
29583  ac_status=$?
29584  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29585  test $ac_status = 0; }; }; then
29586    cross_compiling=no
29587  else
29588    if test "$cross_compiling" = maybe; then
29589	cross_compiling=yes
29590    else
29591	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29593as_fn_error $? "cannot run C compiled programs.
29594If you meant to cross compile, use \`--host'.
29595See \`config.log' for more details" "$LINENO" 5; }
29596    fi
29597  fi
29598fi
29599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29600$as_echo "$cross_compiling" >&6; }
29601
29602rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29603ac_clean_files=$ac_clean_files_save
29604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29605$as_echo_n "checking for suffix of object files... " >&6; }
29606if ${ac_cv_objext+:} false; then :
29607  $as_echo_n "(cached) " >&6
29608else
29609  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29610/* end confdefs.h.  */
29611
29612int
29613main ()
29614{
29615
29616  ;
29617  return 0;
29618}
29619_ACEOF
29620rm -f conftest.o conftest.obj
29621if { { ac_try="$ac_compile"
29622case "(($ac_try" in
29623  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29624  *) ac_try_echo=$ac_try;;
29625esac
29626eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29627$as_echo "$ac_try_echo"; } >&5
29628  (eval "$ac_compile") 2>&5
29629  ac_status=$?
29630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29631  test $ac_status = 0; }; then :
29632  for ac_file in conftest.o conftest.obj conftest.*; do
29633  test -f "$ac_file" || continue;
29634  case $ac_file in
29635    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29636    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29637       break;;
29638  esac
29639done
29640else
29641  $as_echo "$as_me: failed program was:" >&5
29642sed 's/^/| /' conftest.$ac_ext >&5
29643
29644{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29645$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29646as_fn_error $? "cannot compute suffix of object files: cannot compile
29647See \`config.log' for more details" "$LINENO" 5; }
29648fi
29649rm -f conftest.$ac_cv_objext conftest.$ac_ext
29650fi
29651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29652$as_echo "$ac_cv_objext" >&6; }
29653OBJEXT=$ac_cv_objext
29654ac_objext=$OBJEXT
29655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29656$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29657if ${ac_cv_c_compiler_gnu+:} false; then :
29658  $as_echo_n "(cached) " >&6
29659else
29660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29661/* end confdefs.h.  */
29662
29663int
29664main ()
29665{
29666#ifndef __GNUC__
29667       choke me
29668#endif
29669
29670  ;
29671  return 0;
29672}
29673_ACEOF
29674if ac_fn_c_try_compile "$LINENO"; then :
29675  ac_compiler_gnu=yes
29676else
29677  ac_compiler_gnu=no
29678fi
29679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29680ac_cv_c_compiler_gnu=$ac_compiler_gnu
29681
29682fi
29683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29684$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29685if test $ac_compiler_gnu = yes; then
29686  GCC=yes
29687else
29688  GCC=
29689fi
29690ac_test_CFLAGS=${CFLAGS+set}
29691ac_save_CFLAGS=$CFLAGS
29692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29693$as_echo_n "checking whether $CC accepts -g... " >&6; }
29694if ${ac_cv_prog_cc_g+:} false; then :
29695  $as_echo_n "(cached) " >&6
29696else
29697  ac_save_c_werror_flag=$ac_c_werror_flag
29698   ac_c_werror_flag=yes
29699   ac_cv_prog_cc_g=no
29700   CFLAGS="-g"
29701   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29702/* end confdefs.h.  */
29703
29704int
29705main ()
29706{
29707
29708  ;
29709  return 0;
29710}
29711_ACEOF
29712if ac_fn_c_try_compile "$LINENO"; then :
29713  ac_cv_prog_cc_g=yes
29714else
29715  CFLAGS=""
29716      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29717/* end confdefs.h.  */
29718
29719int
29720main ()
29721{
29722
29723  ;
29724  return 0;
29725}
29726_ACEOF
29727if ac_fn_c_try_compile "$LINENO"; then :
29728
29729else
29730  ac_c_werror_flag=$ac_save_c_werror_flag
29731	 CFLAGS="-g"
29732	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29733/* end confdefs.h.  */
29734
29735int
29736main ()
29737{
29738
29739  ;
29740  return 0;
29741}
29742_ACEOF
29743if ac_fn_c_try_compile "$LINENO"; then :
29744  ac_cv_prog_cc_g=yes
29745fi
29746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29747fi
29748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29749fi
29750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29751   ac_c_werror_flag=$ac_save_c_werror_flag
29752fi
29753{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29754$as_echo "$ac_cv_prog_cc_g" >&6; }
29755if test "$ac_test_CFLAGS" = set; then
29756  CFLAGS=$ac_save_CFLAGS
29757elif test $ac_cv_prog_cc_g = yes; then
29758  if test "$GCC" = yes; then
29759    CFLAGS="-g -O2"
29760  else
29761    CFLAGS="-g"
29762  fi
29763else
29764  if test "$GCC" = yes; then
29765    CFLAGS="-O2"
29766  else
29767    CFLAGS=
29768  fi
29769fi
29770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29771$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29772if ${ac_cv_prog_cc_c89+:} false; then :
29773  $as_echo_n "(cached) " >&6
29774else
29775  ac_cv_prog_cc_c89=no
29776ac_save_CC=$CC
29777cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29778/* end confdefs.h.  */
29779#include <stdarg.h>
29780#include <stdio.h>
29781struct stat;
29782/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29783struct buf { int x; };
29784FILE * (*rcsopen) (struct buf *, struct stat *, int);
29785static char *e (p, i)
29786     char **p;
29787     int i;
29788{
29789  return p[i];
29790}
29791static char *f (char * (*g) (char **, int), char **p, ...)
29792{
29793  char *s;
29794  va_list v;
29795  va_start (v,p);
29796  s = g (p, va_arg (v,int));
29797  va_end (v);
29798  return s;
29799}
29800
29801/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29802   function prototypes and stuff, but not '\xHH' hex character constants.
29803   These don't provoke an error unfortunately, instead are silently treated
29804   as 'x'.  The following induces an error, until -std is added to get
29805   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29806   array size at least.  It's necessary to write '\x00'==0 to get something
29807   that's true only with -std.  */
29808int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29809
29810/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29811   inside strings and character constants.  */
29812#define FOO(x) 'x'
29813int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29814
29815int test (int i, double x);
29816struct s1 {int (*f) (int a);};
29817struct s2 {int (*f) (double a);};
29818int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29819int argc;
29820char **argv;
29821int
29822main ()
29823{
29824return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29825  ;
29826  return 0;
29827}
29828_ACEOF
29829for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29830	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29831do
29832  CC="$ac_save_CC $ac_arg"
29833  if ac_fn_c_try_compile "$LINENO"; then :
29834  ac_cv_prog_cc_c89=$ac_arg
29835fi
29836rm -f core conftest.err conftest.$ac_objext
29837  test "x$ac_cv_prog_cc_c89" != "xno" && break
29838done
29839rm -f conftest.$ac_ext
29840CC=$ac_save_CC
29841
29842fi
29843# AC_CACHE_VAL
29844case "x$ac_cv_prog_cc_c89" in
29845  x)
29846    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29847$as_echo "none needed" >&6; } ;;
29848  xno)
29849    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29850$as_echo "unsupported" >&6; } ;;
29851  *)
29852    CC="$CC $ac_cv_prog_cc_c89"
29853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29854$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29855esac
29856if test "x$ac_cv_prog_cc_c89" != xno; then :
29857
29858fi
29859
29860ac_ext=cpp
29861ac_cpp='$CXXCPP $CPPFLAGS'
29862ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29863ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29864ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29865
29866
29867
29868  COMPILER_NAME=C++
29869  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29870
29871  if test "x$CXX" != x; then
29872    # User has supplied compiler name already, always let that override.
29873    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29874$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29875    if test "x`basename $CXX`" = "x$CXX"; then
29876      # A command without a complete path is provided, search $PATH.
29877
29878      for ac_prog in $CXX
29879do
29880  # Extract the first word of "$ac_prog", so it can be a program name with args.
29881set dummy $ac_prog; ac_word=$2
29882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29883$as_echo_n "checking for $ac_word... " >&6; }
29884if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29885  $as_echo_n "(cached) " >&6
29886else
29887  case $POTENTIAL_CXX in
29888  [\\/]* | ?:[\\/]*)
29889  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29890  ;;
29891  *)
29892  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29893for as_dir in $PATH
29894do
29895  IFS=$as_save_IFS
29896  test -z "$as_dir" && as_dir=.
29897    for ac_exec_ext in '' $ac_executable_extensions; do
29898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29899    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29901    break 2
29902  fi
29903done
29904  done
29905IFS=$as_save_IFS
29906
29907  ;;
29908esac
29909fi
29910POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29911if test -n "$POTENTIAL_CXX"; then
29912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29913$as_echo "$POTENTIAL_CXX" >&6; }
29914else
29915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29916$as_echo "no" >&6; }
29917fi
29918
29919
29920  test -n "$POTENTIAL_CXX" && break
29921done
29922
29923      if test "x$POTENTIAL_CXX" != x; then
29924        CXX=$POTENTIAL_CXX
29925      else
29926        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29927      fi
29928    else
29929      # Otherwise it might already be a complete path
29930      if test ! -x "$CXX"; then
29931        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29932      fi
29933    fi
29934  else
29935    # No user supplied value. Locate compiler ourselves.
29936
29937    # If we are cross compiling, assume cross compilation tools follows the
29938    # cross compilation standard where they are prefixed with the autoconf
29939    # standard name for the target. For example the binary
29940    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29941    # If we are not cross compiling, then the default compiler name will be
29942    # used.
29943
29944    CXX=
29945    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29946    # before checking the rest of the PATH.
29947    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29948    # step, this should not be necessary.
29949    if test -n "$TOOLCHAIN_PATH"; then
29950      PATH_save="$PATH"
29951      PATH="$TOOLCHAIN_PATH"
29952      for ac_prog in $SEARCH_LIST
29953do
29954  # Extract the first word of "$ac_prog", so it can be a program name with args.
29955set dummy $ac_prog; ac_word=$2
29956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29957$as_echo_n "checking for $ac_word... " >&6; }
29958if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29959  $as_echo_n "(cached) " >&6
29960else
29961  case $TOOLCHAIN_PATH_CXX in
29962  [\\/]* | ?:[\\/]*)
29963  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29964  ;;
29965  *)
29966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29967for as_dir in $PATH
29968do
29969  IFS=$as_save_IFS
29970  test -z "$as_dir" && as_dir=.
29971    for ac_exec_ext in '' $ac_executable_extensions; do
29972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29973    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29975    break 2
29976  fi
29977done
29978  done
29979IFS=$as_save_IFS
29980
29981  ;;
29982esac
29983fi
29984TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29985if test -n "$TOOLCHAIN_PATH_CXX"; then
29986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29987$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29988else
29989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29990$as_echo "no" >&6; }
29991fi
29992
29993
29994  test -n "$TOOLCHAIN_PATH_CXX" && break
29995done
29996
29997      CXX=$TOOLCHAIN_PATH_CXX
29998      PATH="$PATH_save"
29999    fi
30000
30001    # AC_PATH_PROGS can't be run multiple times with the same variable,
30002    # so create a new name for this run.
30003    if test "x$CXX" = x; then
30004      for ac_prog in $SEARCH_LIST
30005do
30006  # Extract the first word of "$ac_prog", so it can be a program name with args.
30007set dummy $ac_prog; ac_word=$2
30008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30009$as_echo_n "checking for $ac_word... " >&6; }
30010if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
30011  $as_echo_n "(cached) " >&6
30012else
30013  case $POTENTIAL_CXX in
30014  [\\/]* | ?:[\\/]*)
30015  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
30016  ;;
30017  *)
30018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30019for as_dir in $PATH
30020do
30021  IFS=$as_save_IFS
30022  test -z "$as_dir" && as_dir=.
30023    for ac_exec_ext in '' $ac_executable_extensions; do
30024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30025    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
30026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30027    break 2
30028  fi
30029done
30030  done
30031IFS=$as_save_IFS
30032
30033  ;;
30034esac
30035fi
30036POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
30037if test -n "$POTENTIAL_CXX"; then
30038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
30039$as_echo "$POTENTIAL_CXX" >&6; }
30040else
30041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30042$as_echo "no" >&6; }
30043fi
30044
30045
30046  test -n "$POTENTIAL_CXX" && break
30047done
30048
30049      CXX=$POTENTIAL_CXX
30050    fi
30051
30052    if test "x$CXX" = x; then
30053
30054  # Print a helpful message on how to acquire the necessary build dependency.
30055  # devkit is the help tag: freetype, cups, pulse, alsa etc
30056  MISSING_DEPENDENCY=devkit
30057
30058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30059    cygwin_help $MISSING_DEPENDENCY
30060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30061    msys_help $MISSING_DEPENDENCY
30062  else
30063    PKGHANDLER_COMMAND=
30064
30065    case $PKGHANDLER in
30066      apt-get)
30067        apt_help     $MISSING_DEPENDENCY ;;
30068      yum)
30069        yum_help     $MISSING_DEPENDENCY ;;
30070      port)
30071        port_help    $MISSING_DEPENDENCY ;;
30072      pkgutil)
30073        pkgutil_help $MISSING_DEPENDENCY ;;
30074      pkgadd)
30075        pkgadd_help  $MISSING_DEPENDENCY ;;
30076    esac
30077
30078    if test "x$PKGHANDLER_COMMAND" != x; then
30079      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30080    fi
30081  fi
30082
30083      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30084    fi
30085  fi
30086
30087  # Now we have a compiler binary in CXX. Make sure it's okay.
30088
30089  # Only process if variable expands to non-empty
30090
30091  if test "x$CXX" != x; then
30092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30093
30094  # First separate the path from the arguments. This will split at the first
30095  # space.
30096  complete="$CXX"
30097  path="${complete%% *}"
30098  tmp="$complete EOL"
30099  arguments="${tmp#* }"
30100
30101  # Input might be given as Windows format, start by converting to
30102  # unix format.
30103  new_path=`$CYGPATH -u "$path"`
30104
30105  # Now try to locate executable using which
30106  new_path=`$WHICH "$new_path" 2> /dev/null`
30107  # bat and cmd files are not always considered executable in cygwin causing which
30108  # to not find them
30109  if test "x$new_path" = x \
30110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30112    new_path=`$CYGPATH -u "$path"`
30113  fi
30114  if test "x$new_path" = x; then
30115    # Oops. Which didn't find the executable.
30116    # The splitting of arguments from the executable at a space might have been incorrect,
30117    # since paths with space are more likely in Windows. Give it another try with the whole
30118    # argument.
30119    path="$complete"
30120    arguments="EOL"
30121    new_path=`$CYGPATH -u "$path"`
30122    new_path=`$WHICH "$new_path" 2> /dev/null`
30123    # bat and cmd files are not always considered executable in cygwin causing which
30124    # to not find them
30125    if test "x$new_path" = x \
30126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30128      new_path=`$CYGPATH -u "$path"`
30129    fi
30130    if test "x$new_path" = x; then
30131      # It's still not found. Now this is an unrecoverable error.
30132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30133$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30134      has_space=`$ECHO "$complete" | $GREP " "`
30135      if test "x$has_space" != x; then
30136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30138      fi
30139      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30140    fi
30141  fi
30142
30143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30146  # "foo.exe" is OK but "foo" is an error.
30147  #
30148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30149  # It is also a way to make sure we got the proper file name for the real test later on.
30150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30151  if test "x$test_shortpath" = x; then
30152    # Short path failed, file does not exist as specified.
30153    # Try adding .exe or .cmd
30154    if test -f "${new_path}.exe"; then
30155      input_to_shortpath="${new_path}.exe"
30156    elif test -f "${new_path}.cmd"; then
30157      input_to_shortpath="${new_path}.cmd"
30158    else
30159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30160$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30163      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30164    fi
30165  else
30166    input_to_shortpath="$new_path"
30167  fi
30168
30169  # Call helper function which possibly converts this using DOS-style short mode.
30170  # If so, the updated path is stored in $new_path.
30171  new_path="$input_to_shortpath"
30172
30173  input_path="$input_to_shortpath"
30174  # Check if we need to convert this using DOS-style short mode. If the path
30175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30176  # take no chances and rewrite it.
30177  # Note: m4 eats our [], so we need to use [ and ] instead.
30178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30179  if test "x$has_forbidden_chars" != x; then
30180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30184      # Going to short mode and back again did indeed matter. Since short mode is
30185      # case insensitive, let's make it lowercase to improve readability.
30186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30187      # Now convert it back to Unix-style (cygpath)
30188      input_path=`$CYGPATH -u "$shortmode_path"`
30189      new_path="$input_path"
30190    fi
30191  fi
30192
30193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30194  if test "x$test_cygdrive_prefix" = x; then
30195    # As a simple fix, exclude /usr/bin since it's not a real path.
30196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30198      # a path prefixed by /cygdrive for fixpath to work.
30199      new_path="$CYGWIN_ROOT_PATH$input_path"
30200    fi
30201  fi
30202
30203  # remove trailing .exe if any
30204  new_path="${new_path/%.exe/}"
30205
30206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30207
30208  # First separate the path from the arguments. This will split at the first
30209  # space.
30210  complete="$CXX"
30211  path="${complete%% *}"
30212  tmp="$complete EOL"
30213  arguments="${tmp#* }"
30214
30215  # Input might be given as Windows format, start by converting to
30216  # unix format.
30217  new_path="$path"
30218
30219  windows_path="$new_path"
30220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30221    unix_path=`$CYGPATH -u "$windows_path"`
30222    new_path="$unix_path"
30223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30225    new_path="$unix_path"
30226  fi
30227
30228
30229  # Now try to locate executable using which
30230  new_path=`$WHICH "$new_path" 2> /dev/null`
30231
30232  if test "x$new_path" = x; then
30233    # Oops. Which didn't find the executable.
30234    # The splitting of arguments from the executable at a space might have been incorrect,
30235    # since paths with space are more likely in Windows. Give it another try with the whole
30236    # argument.
30237    path="$complete"
30238    arguments="EOL"
30239    new_path="$path"
30240
30241  windows_path="$new_path"
30242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30243    unix_path=`$CYGPATH -u "$windows_path"`
30244    new_path="$unix_path"
30245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30247    new_path="$unix_path"
30248  fi
30249
30250
30251    new_path=`$WHICH "$new_path" 2> /dev/null`
30252    # bat and cmd files are not always considered executable in MSYS causing which
30253    # to not find them
30254    if test "x$new_path" = x \
30255        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30256        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30257      new_path="$path"
30258
30259  windows_path="$new_path"
30260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30261    unix_path=`$CYGPATH -u "$windows_path"`
30262    new_path="$unix_path"
30263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30265    new_path="$unix_path"
30266  fi
30267
30268    fi
30269
30270    if test "x$new_path" = x; then
30271      # It's still not found. Now this is an unrecoverable error.
30272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30273$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30274      has_space=`$ECHO "$complete" | $GREP " "`
30275      if test "x$has_space" != x; then
30276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30278      fi
30279      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30280    fi
30281  fi
30282
30283  # Now new_path has a complete unix path to the binary
30284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30285    # Keep paths in /bin as-is, but remove trailing .exe if any
30286    new_path="${new_path/%.exe/}"
30287    # Do not save /bin paths to all_fixpath_prefixes!
30288  else
30289    # Not in mixed or Windows style, start by that.
30290    new_path=`cmd //c echo $new_path`
30291
30292  input_path="$new_path"
30293  # Check if we need to convert this using DOS-style short mode. If the path
30294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30295  # take no chances and rewrite it.
30296  # Note: m4 eats our [], so we need to use [ and ] instead.
30297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30298  if test "x$has_forbidden_chars" != x; then
30299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30301  fi
30302
30303    # Output is in $new_path
30304
30305  windows_path="$new_path"
30306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30307    unix_path=`$CYGPATH -u "$windows_path"`
30308    new_path="$unix_path"
30309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30311    new_path="$unix_path"
30312  fi
30313
30314    # remove trailing .exe if any
30315    new_path="${new_path/%.exe/}"
30316
30317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30319  fi
30320
30321    else
30322      # We're on a unix platform. Hooray! :)
30323      # First separate the path from the arguments. This will split at the first
30324      # space.
30325      complete="$CXX"
30326      path="${complete%% *}"
30327      tmp="$complete EOL"
30328      arguments="${tmp#* }"
30329
30330      # Cannot rely on the command "which" here since it doesn't always work.
30331      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30332      if test -z "$is_absolute_path"; then
30333        # Path to executable is not absolute. Find it.
30334        IFS_save="$IFS"
30335        IFS=:
30336        for p in $PATH; do
30337          if test -f "$p/$path" && test -x "$p/$path"; then
30338            new_path="$p/$path"
30339            break
30340          fi
30341        done
30342        IFS="$IFS_save"
30343      else
30344        # This is an absolute path, we can use it without further modifications.
30345        new_path="$path"
30346      fi
30347
30348      if test "x$new_path" = x; then
30349        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30350$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30351        has_space=`$ECHO "$complete" | $GREP " "`
30352        if test "x$has_space" != x; then
30353          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30355        fi
30356        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30357      fi
30358    fi
30359
30360    # Now join together the path and the arguments once again
30361    if test "x$arguments" != xEOL; then
30362      new_complete="$new_path ${arguments% *}"
30363    else
30364      new_complete="$new_path"
30365    fi
30366
30367    if test "x$complete" != "x$new_complete"; then
30368      CXX="$new_complete"
30369      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30370$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30371    fi
30372  fi
30373
30374  TEST_COMPILER="$CXX"
30375  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30376  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30377  if test "x$OPENJDK_BUILD_OS" != xaix; then
30378    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30380$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30381
30382  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30383    # Follow a chain of symbolic links. Use readlink
30384    # where it exists, else fall back to horribly
30385    # complicated shell code.
30386    if test "x$READLINK_TESTED" != yes; then
30387      # On MacOSX there is a readlink tool with a different
30388      # purpose than the GNU readlink tool. Check the found readlink.
30389      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30390      if test "x$ISGNU" = x; then
30391        # A readlink that we do not know how to use.
30392        # Are there other non-GNU readlinks out there?
30393        READLINK_TESTED=yes
30394        READLINK=
30395      fi
30396    fi
30397
30398    if test "x$READLINK" != x; then
30399      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30400    else
30401      # Save the current directory for restoring afterwards
30402      STARTDIR=$PWD
30403      COUNTER=0
30404      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30405      sym_link_file=`$BASENAME $TEST_COMPILER`
30406      cd $sym_link_dir
30407      # Use -P flag to resolve symlinks in directories.
30408      cd `$THEPWDCMD -P`
30409      sym_link_dir=`$THEPWDCMD -P`
30410      # Resolve file symlinks
30411      while test $COUNTER -lt 20; do
30412        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30413        if test "x$ISLINK" == x; then
30414          # This is not a symbolic link! We are done!
30415          break
30416        fi
30417        # Again resolve directory symlinks since the target of the just found
30418        # link could be in a different directory
30419        cd `$DIRNAME $ISLINK`
30420        sym_link_dir=`$THEPWDCMD -P`
30421        sym_link_file=`$BASENAME $ISLINK`
30422        let COUNTER=COUNTER+1
30423      done
30424      cd $STARTDIR
30425      TEST_COMPILER=$sym_link_dir/$sym_link_file
30426    fi
30427  fi
30428
30429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30430$as_echo "$TEST_COMPILER" >&6; }
30431  fi
30432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30433$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30434
30435  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30436  if test "x$COMPILER_BASENAME" = "xccache"; then
30437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30438$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30439    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30440    # We want to control ccache invocation ourselves, so ignore this cc and try
30441    # searching again.
30442
30443    # Remove the path to the fake ccache cc from the PATH
30444    RETRY_COMPILER_SAVED_PATH="$PATH"
30445    COMPILER_DIRNAME=`$DIRNAME $CXX`
30446    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30447
30448    # Try again looking for our compiler
30449    if test -n "$ac_tool_prefix"; then
30450  for ac_prog in $TOOLCHAIN_CXX_BINARY
30451  do
30452    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30453set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30455$as_echo_n "checking for $ac_word... " >&6; }
30456if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30457  $as_echo_n "(cached) " >&6
30458else
30459  if test -n "$PROPER_COMPILER_CXX"; then
30460  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30461else
30462as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30463for as_dir in $PATH
30464do
30465  IFS=$as_save_IFS
30466  test -z "$as_dir" && as_dir=.
30467    for ac_exec_ext in '' $ac_executable_extensions; do
30468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30469    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30471    break 2
30472  fi
30473done
30474  done
30475IFS=$as_save_IFS
30476
30477fi
30478fi
30479PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30480if test -n "$PROPER_COMPILER_CXX"; then
30481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30482$as_echo "$PROPER_COMPILER_CXX" >&6; }
30483else
30484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30485$as_echo "no" >&6; }
30486fi
30487
30488
30489    test -n "$PROPER_COMPILER_CXX" && break
30490  done
30491fi
30492if test -z "$PROPER_COMPILER_CXX"; then
30493  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30494  for ac_prog in $TOOLCHAIN_CXX_BINARY
30495do
30496  # Extract the first word of "$ac_prog", so it can be a program name with args.
30497set dummy $ac_prog; ac_word=$2
30498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30499$as_echo_n "checking for $ac_word... " >&6; }
30500if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30501  $as_echo_n "(cached) " >&6
30502else
30503  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30504  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30505else
30506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30507for as_dir in $PATH
30508do
30509  IFS=$as_save_IFS
30510  test -z "$as_dir" && as_dir=.
30511    for ac_exec_ext in '' $ac_executable_extensions; do
30512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30513    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30515    break 2
30516  fi
30517done
30518  done
30519IFS=$as_save_IFS
30520
30521fi
30522fi
30523ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30524if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30526$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30527else
30528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30529$as_echo "no" >&6; }
30530fi
30531
30532
30533  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30534done
30535
30536  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30537    PROPER_COMPILER_CXX=""
30538  else
30539    case $cross_compiling:$ac_tool_warned in
30540yes:)
30541{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30542$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30543ac_tool_warned=yes ;;
30544esac
30545    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30546  fi
30547fi
30548
30549
30550  # Only process if variable expands to non-empty
30551
30552  if test "x$PROPER_COMPILER_CXX" != x; then
30553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30554
30555  # First separate the path from the arguments. This will split at the first
30556  # space.
30557  complete="$PROPER_COMPILER_CXX"
30558  path="${complete%% *}"
30559  tmp="$complete EOL"
30560  arguments="${tmp#* }"
30561
30562  # Input might be given as Windows format, start by converting to
30563  # unix format.
30564  new_path=`$CYGPATH -u "$path"`
30565
30566  # Now try to locate executable using which
30567  new_path=`$WHICH "$new_path" 2> /dev/null`
30568  # bat and cmd files are not always considered executable in cygwin causing which
30569  # to not find them
30570  if test "x$new_path" = x \
30571      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30572      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30573    new_path=`$CYGPATH -u "$path"`
30574  fi
30575  if test "x$new_path" = x; then
30576    # Oops. Which didn't find the executable.
30577    # The splitting of arguments from the executable at a space might have been incorrect,
30578    # since paths with space are more likely in Windows. Give it another try with the whole
30579    # argument.
30580    path="$complete"
30581    arguments="EOL"
30582    new_path=`$CYGPATH -u "$path"`
30583    new_path=`$WHICH "$new_path" 2> /dev/null`
30584    # bat and cmd files are not always considered executable in cygwin causing which
30585    # to not find them
30586    if test "x$new_path" = x \
30587        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30588        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30589      new_path=`$CYGPATH -u "$path"`
30590    fi
30591    if test "x$new_path" = x; then
30592      # It's still not found. Now this is an unrecoverable error.
30593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30594$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30595      has_space=`$ECHO "$complete" | $GREP " "`
30596      if test "x$has_space" != x; then
30597        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30598$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30599      fi
30600      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30601    fi
30602  fi
30603
30604  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30605  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30606  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30607  # "foo.exe" is OK but "foo" is an error.
30608  #
30609  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30610  # It is also a way to make sure we got the proper file name for the real test later on.
30611  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30612  if test "x$test_shortpath" = x; then
30613    # Short path failed, file does not exist as specified.
30614    # Try adding .exe or .cmd
30615    if test -f "${new_path}.exe"; then
30616      input_to_shortpath="${new_path}.exe"
30617    elif test -f "${new_path}.cmd"; then
30618      input_to_shortpath="${new_path}.cmd"
30619    else
30620      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30621$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30622      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30623$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30624      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30625    fi
30626  else
30627    input_to_shortpath="$new_path"
30628  fi
30629
30630  # Call helper function which possibly converts this using DOS-style short mode.
30631  # If so, the updated path is stored in $new_path.
30632  new_path="$input_to_shortpath"
30633
30634  input_path="$input_to_shortpath"
30635  # Check if we need to convert this using DOS-style short mode. If the path
30636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30637  # take no chances and rewrite it.
30638  # Note: m4 eats our [], so we need to use [ and ] instead.
30639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30640  if test "x$has_forbidden_chars" != x; then
30641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30645      # Going to short mode and back again did indeed matter. Since short mode is
30646      # case insensitive, let's make it lowercase to improve readability.
30647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30648      # Now convert it back to Unix-style (cygpath)
30649      input_path=`$CYGPATH -u "$shortmode_path"`
30650      new_path="$input_path"
30651    fi
30652  fi
30653
30654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30655  if test "x$test_cygdrive_prefix" = x; then
30656    # As a simple fix, exclude /usr/bin since it's not a real path.
30657    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30659      # a path prefixed by /cygdrive for fixpath to work.
30660      new_path="$CYGWIN_ROOT_PATH$input_path"
30661    fi
30662  fi
30663
30664  # remove trailing .exe if any
30665  new_path="${new_path/%.exe/}"
30666
30667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30668
30669  # First separate the path from the arguments. This will split at the first
30670  # space.
30671  complete="$PROPER_COMPILER_CXX"
30672  path="${complete%% *}"
30673  tmp="$complete EOL"
30674  arguments="${tmp#* }"
30675
30676  # Input might be given as Windows format, start by converting to
30677  # unix format.
30678  new_path="$path"
30679
30680  windows_path="$new_path"
30681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30682    unix_path=`$CYGPATH -u "$windows_path"`
30683    new_path="$unix_path"
30684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30686    new_path="$unix_path"
30687  fi
30688
30689
30690  # Now try to locate executable using which
30691  new_path=`$WHICH "$new_path" 2> /dev/null`
30692
30693  if test "x$new_path" = x; then
30694    # Oops. Which didn't find the executable.
30695    # The splitting of arguments from the executable at a space might have been incorrect,
30696    # since paths with space are more likely in Windows. Give it another try with the whole
30697    # argument.
30698    path="$complete"
30699    arguments="EOL"
30700    new_path="$path"
30701
30702  windows_path="$new_path"
30703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30704    unix_path=`$CYGPATH -u "$windows_path"`
30705    new_path="$unix_path"
30706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30708    new_path="$unix_path"
30709  fi
30710
30711
30712    new_path=`$WHICH "$new_path" 2> /dev/null`
30713    # bat and cmd files are not always considered executable in MSYS causing which
30714    # to not find them
30715    if test "x$new_path" = x \
30716        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30717        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30718      new_path="$path"
30719
30720  windows_path="$new_path"
30721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30722    unix_path=`$CYGPATH -u "$windows_path"`
30723    new_path="$unix_path"
30724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30726    new_path="$unix_path"
30727  fi
30728
30729    fi
30730
30731    if test "x$new_path" = x; then
30732      # It's still not found. Now this is an unrecoverable error.
30733      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30734$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30735      has_space=`$ECHO "$complete" | $GREP " "`
30736      if test "x$has_space" != x; then
30737        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30738$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30739      fi
30740      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30741    fi
30742  fi
30743
30744  # Now new_path has a complete unix path to the binary
30745  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30746    # Keep paths in /bin as-is, but remove trailing .exe if any
30747    new_path="${new_path/%.exe/}"
30748    # Do not save /bin paths to all_fixpath_prefixes!
30749  else
30750    # Not in mixed or Windows style, start by that.
30751    new_path=`cmd //c echo $new_path`
30752
30753  input_path="$new_path"
30754  # Check if we need to convert this using DOS-style short mode. If the path
30755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30756  # take no chances and rewrite it.
30757  # Note: m4 eats our [], so we need to use [ and ] instead.
30758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30759  if test "x$has_forbidden_chars" != x; then
30760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30762  fi
30763
30764    # Output is in $new_path
30765
30766  windows_path="$new_path"
30767  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30768    unix_path=`$CYGPATH -u "$windows_path"`
30769    new_path="$unix_path"
30770  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30771    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30772    new_path="$unix_path"
30773  fi
30774
30775    # remove trailing .exe if any
30776    new_path="${new_path/%.exe/}"
30777
30778    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30779    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30780  fi
30781
30782    else
30783      # We're on a unix platform. Hooray! :)
30784      # First separate the path from the arguments. This will split at the first
30785      # space.
30786      complete="$PROPER_COMPILER_CXX"
30787      path="${complete%% *}"
30788      tmp="$complete EOL"
30789      arguments="${tmp#* }"
30790
30791      # Cannot rely on the command "which" here since it doesn't always work.
30792      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30793      if test -z "$is_absolute_path"; then
30794        # Path to executable is not absolute. Find it.
30795        IFS_save="$IFS"
30796        IFS=:
30797        for p in $PATH; do
30798          if test -f "$p/$path" && test -x "$p/$path"; then
30799            new_path="$p/$path"
30800            break
30801          fi
30802        done
30803        IFS="$IFS_save"
30804      else
30805        # This is an absolute path, we can use it without further modifications.
30806        new_path="$path"
30807      fi
30808
30809      if test "x$new_path" = x; then
30810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30811$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30812        has_space=`$ECHO "$complete" | $GREP " "`
30813        if test "x$has_space" != x; then
30814          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30815$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30816        fi
30817        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30818      fi
30819    fi
30820
30821    # Now join together the path and the arguments once again
30822    if test "x$arguments" != xEOL; then
30823      new_complete="$new_path ${arguments% *}"
30824    else
30825      new_complete="$new_path"
30826    fi
30827
30828    if test "x$complete" != "x$new_complete"; then
30829      PROPER_COMPILER_CXX="$new_complete"
30830      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30831$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30832    fi
30833  fi
30834
30835    PATH="$RETRY_COMPILER_SAVED_PATH"
30836
30837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30838$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30839
30840  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30841    # Follow a chain of symbolic links. Use readlink
30842    # where it exists, else fall back to horribly
30843    # complicated shell code.
30844    if test "x$READLINK_TESTED" != yes; then
30845      # On MacOSX there is a readlink tool with a different
30846      # purpose than the GNU readlink tool. Check the found readlink.
30847      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30848      if test "x$ISGNU" = x; then
30849        # A readlink that we do not know how to use.
30850        # Are there other non-GNU readlinks out there?
30851        READLINK_TESTED=yes
30852        READLINK=
30853      fi
30854    fi
30855
30856    if test "x$READLINK" != x; then
30857      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30858    else
30859      # Save the current directory for restoring afterwards
30860      STARTDIR=$PWD
30861      COUNTER=0
30862      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30863      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30864      cd $sym_link_dir
30865      # Use -P flag to resolve symlinks in directories.
30866      cd `$THEPWDCMD -P`
30867      sym_link_dir=`$THEPWDCMD -P`
30868      # Resolve file symlinks
30869      while test $COUNTER -lt 20; do
30870        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30871        if test "x$ISLINK" == x; then
30872          # This is not a symbolic link! We are done!
30873          break
30874        fi
30875        # Again resolve directory symlinks since the target of the just found
30876        # link could be in a different directory
30877        cd `$DIRNAME $ISLINK`
30878        sym_link_dir=`$THEPWDCMD -P`
30879        sym_link_file=`$BASENAME $ISLINK`
30880        let COUNTER=COUNTER+1
30881      done
30882      cd $STARTDIR
30883      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30884    fi
30885  fi
30886
30887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30888$as_echo "$PROPER_COMPILER_CXX" >&6; }
30889    CXX="$PROPER_COMPILER_CXX"
30890  else
30891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30892$as_echo "no, keeping CXX" >&6; }
30893  fi
30894
30895
30896  COMPILER=$CXX
30897  COMPILER_NAME=$COMPILER_NAME
30898
30899  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30900    # cc -V output typically looks like
30901    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30902    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30903    # Check that this is likely to be the Solaris Studio cc.
30904    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30905    if test $? -ne 0; then
30906      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30907      { $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
30908$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30909      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30910$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30911      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30912$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30913      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30914    fi
30915    # Remove usage instructions (if present), and
30916    # collapse compiler output into a single line
30917    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30918        $SED -e 's/ *[Uu]sage:.*//'`
30919    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30920        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30921  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30922    # xlc -qversion output typically looks like
30923    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30924    #     Version: 11.01.0000.0015
30925    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30926    # Check that this is likely to be the IBM XL C compiler.
30927    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30928    if test $? -ne 0; then
30929      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30930      { $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
30931$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30932      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30933$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30934      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30935$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30936      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30937    fi
30938    # Collapse compiler output into a single line
30939    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30940    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30941        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30942  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30943    # There is no specific version flag, but all output starts with a version string.
30944    # First line typically looks something like:
30945    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30946    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30947    # Check that this is likely to be Microsoft CL.EXE.
30948    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30949    if test $? -ne 0; then
30950      { $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
30951$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30952      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30953$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30954      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30955    fi
30956    # Collapse compiler output into a single line
30957    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30958    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30959        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30960  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30961    # gcc --version output typically looks like
30962    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30963    #     Copyright (C) 2013 Free Software Foundation, Inc.
30964    #     This is free software; see the source for copying conditions.  There is NO
30965    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30966    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30967    # Check that this is likely to be GCC.
30968    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30969    if test $? -ne 0; then
30970      { $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
30971$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30972      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30973$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30974      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30975    fi
30976    # Remove Copyright and legalese from version string, and
30977    # collapse into a single line
30978    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30979        $SED -e 's/ *Copyright .*//'`
30980    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30981        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30982  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30983    # clang --version output typically looks like
30984    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30985    #    clang version 3.3 (tags/RELEASE_33/final)
30986    # or
30987    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30988    #    Target: x86_64-pc-linux-gnu
30989    #    Thread model: posix
30990    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30991    # Check that this is likely to be clang
30992    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30993    if test $? -ne 0; then
30994      { $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
30995$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30997$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30998      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30999    fi
31000    # Collapse compiler output into a single line
31001    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
31002    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
31003        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
31004  else
31005      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
31006  fi
31007  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
31008  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
31009  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
31010  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
31011
31012  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
31013$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
31014
31015
31016  # Now that we have resolved CXX ourself, let autoconf have its go at it
31017  ac_ext=cpp
31018ac_cpp='$CXXCPP $CPPFLAGS'
31019ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31020ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31021ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31022if test -z "$CXX"; then
31023  if test -n "$CCC"; then
31024    CXX=$CCC
31025  else
31026    if test -n "$ac_tool_prefix"; then
31027  for ac_prog in $CXX
31028  do
31029    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
31030set dummy $ac_tool_prefix$ac_prog; ac_word=$2
31031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31032$as_echo_n "checking for $ac_word... " >&6; }
31033if ${ac_cv_prog_CXX+:} false; then :
31034  $as_echo_n "(cached) " >&6
31035else
31036  if test -n "$CXX"; then
31037  ac_cv_prog_CXX="$CXX" # Let the user override the test.
31038else
31039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31040for as_dir in $PATH
31041do
31042  IFS=$as_save_IFS
31043  test -z "$as_dir" && as_dir=.
31044    for ac_exec_ext in '' $ac_executable_extensions; do
31045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31046    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
31047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31048    break 2
31049  fi
31050done
31051  done
31052IFS=$as_save_IFS
31053
31054fi
31055fi
31056CXX=$ac_cv_prog_CXX
31057if test -n "$CXX"; then
31058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
31059$as_echo "$CXX" >&6; }
31060else
31061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31062$as_echo "no" >&6; }
31063fi
31064
31065
31066    test -n "$CXX" && break
31067  done
31068fi
31069if test -z "$CXX"; then
31070  ac_ct_CXX=$CXX
31071  for ac_prog in $CXX
31072do
31073  # Extract the first word of "$ac_prog", so it can be a program name with args.
31074set dummy $ac_prog; ac_word=$2
31075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31076$as_echo_n "checking for $ac_word... " >&6; }
31077if ${ac_cv_prog_ac_ct_CXX+:} false; then :
31078  $as_echo_n "(cached) " >&6
31079else
31080  if test -n "$ac_ct_CXX"; then
31081  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31082else
31083as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31084for as_dir in $PATH
31085do
31086  IFS=$as_save_IFS
31087  test -z "$as_dir" && as_dir=.
31088    for ac_exec_ext in '' $ac_executable_extensions; do
31089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31090    ac_cv_prog_ac_ct_CXX="$ac_prog"
31091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31092    break 2
31093  fi
31094done
31095  done
31096IFS=$as_save_IFS
31097
31098fi
31099fi
31100ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31101if test -n "$ac_ct_CXX"; then
31102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31103$as_echo "$ac_ct_CXX" >&6; }
31104else
31105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31106$as_echo "no" >&6; }
31107fi
31108
31109
31110  test -n "$ac_ct_CXX" && break
31111done
31112
31113  if test "x$ac_ct_CXX" = x; then
31114    CXX="g++"
31115  else
31116    case $cross_compiling:$ac_tool_warned in
31117yes:)
31118{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31119$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31120ac_tool_warned=yes ;;
31121esac
31122    CXX=$ac_ct_CXX
31123  fi
31124fi
31125
31126  fi
31127fi
31128# Provide some information about the compiler.
31129$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31130set X $ac_compile
31131ac_compiler=$2
31132for ac_option in --version -v -V -qversion; do
31133  { { ac_try="$ac_compiler $ac_option >&5"
31134case "(($ac_try" in
31135  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31136  *) ac_try_echo=$ac_try;;
31137esac
31138eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31139$as_echo "$ac_try_echo"; } >&5
31140  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31141  ac_status=$?
31142  if test -s conftest.err; then
31143    sed '10a\
31144... rest of stderr output deleted ...
31145         10q' conftest.err >conftest.er1
31146    cat conftest.er1 >&5
31147  fi
31148  rm -f conftest.er1 conftest.err
31149  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31150  test $ac_status = 0; }
31151done
31152
31153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31154$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31155if ${ac_cv_cxx_compiler_gnu+:} false; then :
31156  $as_echo_n "(cached) " >&6
31157else
31158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31159/* end confdefs.h.  */
31160
31161int
31162main ()
31163{
31164#ifndef __GNUC__
31165       choke me
31166#endif
31167
31168  ;
31169  return 0;
31170}
31171_ACEOF
31172if ac_fn_cxx_try_compile "$LINENO"; then :
31173  ac_compiler_gnu=yes
31174else
31175  ac_compiler_gnu=no
31176fi
31177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31178ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31179
31180fi
31181{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31182$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31183if test $ac_compiler_gnu = yes; then
31184  GXX=yes
31185else
31186  GXX=
31187fi
31188ac_test_CXXFLAGS=${CXXFLAGS+set}
31189ac_save_CXXFLAGS=$CXXFLAGS
31190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31191$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31192if ${ac_cv_prog_cxx_g+:} false; then :
31193  $as_echo_n "(cached) " >&6
31194else
31195  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31196   ac_cxx_werror_flag=yes
31197   ac_cv_prog_cxx_g=no
31198   CXXFLAGS="-g"
31199   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31200/* end confdefs.h.  */
31201
31202int
31203main ()
31204{
31205
31206  ;
31207  return 0;
31208}
31209_ACEOF
31210if ac_fn_cxx_try_compile "$LINENO"; then :
31211  ac_cv_prog_cxx_g=yes
31212else
31213  CXXFLAGS=""
31214      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31215/* end confdefs.h.  */
31216
31217int
31218main ()
31219{
31220
31221  ;
31222  return 0;
31223}
31224_ACEOF
31225if ac_fn_cxx_try_compile "$LINENO"; then :
31226
31227else
31228  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31229	 CXXFLAGS="-g"
31230	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31231/* end confdefs.h.  */
31232
31233int
31234main ()
31235{
31236
31237  ;
31238  return 0;
31239}
31240_ACEOF
31241if ac_fn_cxx_try_compile "$LINENO"; then :
31242  ac_cv_prog_cxx_g=yes
31243fi
31244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31245fi
31246rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31247fi
31248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31249   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31250fi
31251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31252$as_echo "$ac_cv_prog_cxx_g" >&6; }
31253if test "$ac_test_CXXFLAGS" = set; then
31254  CXXFLAGS=$ac_save_CXXFLAGS
31255elif test $ac_cv_prog_cxx_g = yes; then
31256  if test "$GXX" = yes; then
31257    CXXFLAGS="-g -O2"
31258  else
31259    CXXFLAGS="-g"
31260  fi
31261else
31262  if test "$GXX" = yes; then
31263    CXXFLAGS="-O2"
31264  else
31265    CXXFLAGS=
31266  fi
31267fi
31268ac_ext=cpp
31269ac_cpp='$CXXCPP $CPPFLAGS'
31270ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31271ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31272ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31273
31274
31275  #
31276  # Setup the preprocessor (CPP and CXXCPP)
31277  #
31278  ac_ext=c
31279ac_cpp='$CPP $CPPFLAGS'
31280ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31281ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31282ac_compiler_gnu=$ac_cv_c_compiler_gnu
31283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31284$as_echo_n "checking how to run the C preprocessor... " >&6; }
31285# On Suns, sometimes $CPP names a directory.
31286if test -n "$CPP" && test -d "$CPP"; then
31287  CPP=
31288fi
31289if test -z "$CPP"; then
31290  if ${ac_cv_prog_CPP+:} false; then :
31291  $as_echo_n "(cached) " >&6
31292else
31293      # Double quotes because CPP needs to be expanded
31294    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31295    do
31296      ac_preproc_ok=false
31297for ac_c_preproc_warn_flag in '' yes
31298do
31299  # Use a header file that comes with gcc, so configuring glibc
31300  # with a fresh cross-compiler works.
31301  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31302  # <limits.h> exists even on freestanding compilers.
31303  # On the NeXT, cc -E runs the code through the compiler's parser,
31304  # not just through cpp. "Syntax error" is here to catch this case.
31305  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31306/* end confdefs.h.  */
31307#ifdef __STDC__
31308# include <limits.h>
31309#else
31310# include <assert.h>
31311#endif
31312		     Syntax error
31313_ACEOF
31314if ac_fn_c_try_cpp "$LINENO"; then :
31315
31316else
31317  # Broken: fails on valid input.
31318continue
31319fi
31320rm -f conftest.err conftest.i conftest.$ac_ext
31321
31322  # OK, works on sane cases.  Now check whether nonexistent headers
31323  # can be detected and how.
31324  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31325/* end confdefs.h.  */
31326#include <ac_nonexistent.h>
31327_ACEOF
31328if ac_fn_c_try_cpp "$LINENO"; then :
31329  # Broken: success on invalid input.
31330continue
31331else
31332  # Passes both tests.
31333ac_preproc_ok=:
31334break
31335fi
31336rm -f conftest.err conftest.i conftest.$ac_ext
31337
31338done
31339# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31340rm -f conftest.i conftest.err conftest.$ac_ext
31341if $ac_preproc_ok; then :
31342  break
31343fi
31344
31345    done
31346    ac_cv_prog_CPP=$CPP
31347
31348fi
31349  CPP=$ac_cv_prog_CPP
31350else
31351  ac_cv_prog_CPP=$CPP
31352fi
31353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31354$as_echo "$CPP" >&6; }
31355ac_preproc_ok=false
31356for ac_c_preproc_warn_flag in '' yes
31357do
31358  # Use a header file that comes with gcc, so configuring glibc
31359  # with a fresh cross-compiler works.
31360  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31361  # <limits.h> exists even on freestanding compilers.
31362  # On the NeXT, cc -E runs the code through the compiler's parser,
31363  # not just through cpp. "Syntax error" is here to catch this case.
31364  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31365/* end confdefs.h.  */
31366#ifdef __STDC__
31367# include <limits.h>
31368#else
31369# include <assert.h>
31370#endif
31371		     Syntax error
31372_ACEOF
31373if ac_fn_c_try_cpp "$LINENO"; then :
31374
31375else
31376  # Broken: fails on valid input.
31377continue
31378fi
31379rm -f conftest.err conftest.i conftest.$ac_ext
31380
31381  # OK, works on sane cases.  Now check whether nonexistent headers
31382  # can be detected and how.
31383  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31384/* end confdefs.h.  */
31385#include <ac_nonexistent.h>
31386_ACEOF
31387if ac_fn_c_try_cpp "$LINENO"; then :
31388  # Broken: success on invalid input.
31389continue
31390else
31391  # Passes both tests.
31392ac_preproc_ok=:
31393break
31394fi
31395rm -f conftest.err conftest.i conftest.$ac_ext
31396
31397done
31398# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31399rm -f conftest.i conftest.err conftest.$ac_ext
31400if $ac_preproc_ok; then :
31401
31402else
31403  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31404$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31405as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31406See \`config.log' for more details" "$LINENO" 5; }
31407fi
31408
31409ac_ext=cpp
31410ac_cpp='$CXXCPP $CPPFLAGS'
31411ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31412ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31413ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31414
31415
31416  # Only process if variable expands to non-empty
31417
31418  if test "x$CPP" != x; then
31419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31420
31421  # First separate the path from the arguments. This will split at the first
31422  # space.
31423  complete="$CPP"
31424  path="${complete%% *}"
31425  tmp="$complete EOL"
31426  arguments="${tmp#* }"
31427
31428  # Input might be given as Windows format, start by converting to
31429  # unix format.
31430  new_path=`$CYGPATH -u "$path"`
31431
31432  # Now try to locate executable using which
31433  new_path=`$WHICH "$new_path" 2> /dev/null`
31434  # bat and cmd files are not always considered executable in cygwin causing which
31435  # to not find them
31436  if test "x$new_path" = x \
31437      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31438      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31439    new_path=`$CYGPATH -u "$path"`
31440  fi
31441  if test "x$new_path" = x; then
31442    # Oops. Which didn't find the executable.
31443    # The splitting of arguments from the executable at a space might have been incorrect,
31444    # since paths with space are more likely in Windows. Give it another try with the whole
31445    # argument.
31446    path="$complete"
31447    arguments="EOL"
31448    new_path=`$CYGPATH -u "$path"`
31449    new_path=`$WHICH "$new_path" 2> /dev/null`
31450    # bat and cmd files are not always considered executable in cygwin causing which
31451    # to not find them
31452    if test "x$new_path" = x \
31453        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31454        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31455      new_path=`$CYGPATH -u "$path"`
31456    fi
31457    if test "x$new_path" = x; then
31458      # It's still not found. Now this is an unrecoverable error.
31459      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31460$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31461      has_space=`$ECHO "$complete" | $GREP " "`
31462      if test "x$has_space" != x; then
31463        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31464$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31465      fi
31466      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31467    fi
31468  fi
31469
31470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31473  # "foo.exe" is OK but "foo" is an error.
31474  #
31475  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31476  # It is also a way to make sure we got the proper file name for the real test later on.
31477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31478  if test "x$test_shortpath" = x; then
31479    # Short path failed, file does not exist as specified.
31480    # Try adding .exe or .cmd
31481    if test -f "${new_path}.exe"; then
31482      input_to_shortpath="${new_path}.exe"
31483    elif test -f "${new_path}.cmd"; then
31484      input_to_shortpath="${new_path}.cmd"
31485    else
31486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31487$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31488      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31489$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31490      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31491    fi
31492  else
31493    input_to_shortpath="$new_path"
31494  fi
31495
31496  # Call helper function which possibly converts this using DOS-style short mode.
31497  # If so, the updated path is stored in $new_path.
31498  new_path="$input_to_shortpath"
31499
31500  input_path="$input_to_shortpath"
31501  # Check if we need to convert this using DOS-style short mode. If the path
31502  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31503  # take no chances and rewrite it.
31504  # Note: m4 eats our [], so we need to use [ and ] instead.
31505  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31506  if test "x$has_forbidden_chars" != x; then
31507    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31508    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31509    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31510    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31511      # Going to short mode and back again did indeed matter. Since short mode is
31512      # case insensitive, let's make it lowercase to improve readability.
31513      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31514      # Now convert it back to Unix-style (cygpath)
31515      input_path=`$CYGPATH -u "$shortmode_path"`
31516      new_path="$input_path"
31517    fi
31518  fi
31519
31520  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31521  if test "x$test_cygdrive_prefix" = x; then
31522    # As a simple fix, exclude /usr/bin since it's not a real path.
31523    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31524      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31525      # a path prefixed by /cygdrive for fixpath to work.
31526      new_path="$CYGWIN_ROOT_PATH$input_path"
31527    fi
31528  fi
31529
31530  # remove trailing .exe if any
31531  new_path="${new_path/%.exe/}"
31532
31533    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534
31535  # First separate the path from the arguments. This will split at the first
31536  # space.
31537  complete="$CPP"
31538  path="${complete%% *}"
31539  tmp="$complete EOL"
31540  arguments="${tmp#* }"
31541
31542  # Input might be given as Windows format, start by converting to
31543  # unix format.
31544  new_path="$path"
31545
31546  windows_path="$new_path"
31547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31548    unix_path=`$CYGPATH -u "$windows_path"`
31549    new_path="$unix_path"
31550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31552    new_path="$unix_path"
31553  fi
31554
31555
31556  # Now try to locate executable using which
31557  new_path=`$WHICH "$new_path" 2> /dev/null`
31558
31559  if test "x$new_path" = x; then
31560    # Oops. Which didn't find the executable.
31561    # The splitting of arguments from the executable at a space might have been incorrect,
31562    # since paths with space are more likely in Windows. Give it another try with the whole
31563    # argument.
31564    path="$complete"
31565    arguments="EOL"
31566    new_path="$path"
31567
31568  windows_path="$new_path"
31569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31570    unix_path=`$CYGPATH -u "$windows_path"`
31571    new_path="$unix_path"
31572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31574    new_path="$unix_path"
31575  fi
31576
31577
31578    new_path=`$WHICH "$new_path" 2> /dev/null`
31579    # bat and cmd files are not always considered executable in MSYS causing which
31580    # to not find them
31581    if test "x$new_path" = x \
31582        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31583        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31584      new_path="$path"
31585
31586  windows_path="$new_path"
31587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31588    unix_path=`$CYGPATH -u "$windows_path"`
31589    new_path="$unix_path"
31590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31592    new_path="$unix_path"
31593  fi
31594
31595    fi
31596
31597    if test "x$new_path" = x; then
31598      # It's still not found. Now this is an unrecoverable error.
31599      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31600$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31601      has_space=`$ECHO "$complete" | $GREP " "`
31602      if test "x$has_space" != x; then
31603        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31604$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31605      fi
31606      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31607    fi
31608  fi
31609
31610  # Now new_path has a complete unix path to the binary
31611  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31612    # Keep paths in /bin as-is, but remove trailing .exe if any
31613    new_path="${new_path/%.exe/}"
31614    # Do not save /bin paths to all_fixpath_prefixes!
31615  else
31616    # Not in mixed or Windows style, start by that.
31617    new_path=`cmd //c echo $new_path`
31618
31619  input_path="$new_path"
31620  # Check if we need to convert this using DOS-style short mode. If the path
31621  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31622  # take no chances and rewrite it.
31623  # Note: m4 eats our [], so we need to use [ and ] instead.
31624  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31625  if test "x$has_forbidden_chars" != x; then
31626    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31627    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31628  fi
31629
31630    # Output is in $new_path
31631
31632  windows_path="$new_path"
31633  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31634    unix_path=`$CYGPATH -u "$windows_path"`
31635    new_path="$unix_path"
31636  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31637    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31638    new_path="$unix_path"
31639  fi
31640
31641    # remove trailing .exe if any
31642    new_path="${new_path/%.exe/}"
31643
31644    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31645    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31646  fi
31647
31648    else
31649      # We're on a unix platform. Hooray! :)
31650      # First separate the path from the arguments. This will split at the first
31651      # space.
31652      complete="$CPP"
31653      path="${complete%% *}"
31654      tmp="$complete EOL"
31655      arguments="${tmp#* }"
31656
31657      # Cannot rely on the command "which" here since it doesn't always work.
31658      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31659      if test -z "$is_absolute_path"; then
31660        # Path to executable is not absolute. Find it.
31661        IFS_save="$IFS"
31662        IFS=:
31663        for p in $PATH; do
31664          if test -f "$p/$path" && test -x "$p/$path"; then
31665            new_path="$p/$path"
31666            break
31667          fi
31668        done
31669        IFS="$IFS_save"
31670      else
31671        # This is an absolute path, we can use it without further modifications.
31672        new_path="$path"
31673      fi
31674
31675      if test "x$new_path" = x; then
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31677$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31678        has_space=`$ECHO "$complete" | $GREP " "`
31679        if test "x$has_space" != x; then
31680          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31681$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31682        fi
31683        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31684      fi
31685    fi
31686
31687    # Now join together the path and the arguments once again
31688    if test "x$arguments" != xEOL; then
31689      new_complete="$new_path ${arguments% *}"
31690    else
31691      new_complete="$new_path"
31692    fi
31693
31694    if test "x$complete" != "x$new_complete"; then
31695      CPP="$new_complete"
31696      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31697$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31698    fi
31699  fi
31700
31701  ac_ext=cpp
31702ac_cpp='$CXXCPP $CPPFLAGS'
31703ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31704ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31705ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31707$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31708if test -z "$CXXCPP"; then
31709  if ${ac_cv_prog_CXXCPP+:} false; then :
31710  $as_echo_n "(cached) " >&6
31711else
31712      # Double quotes because CXXCPP needs to be expanded
31713    for CXXCPP in "$CXX -E" "/lib/cpp"
31714    do
31715      ac_preproc_ok=false
31716for ac_cxx_preproc_warn_flag in '' yes
31717do
31718  # Use a header file that comes with gcc, so configuring glibc
31719  # with a fresh cross-compiler works.
31720  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31721  # <limits.h> exists even on freestanding compilers.
31722  # On the NeXT, cc -E runs the code through the compiler's parser,
31723  # not just through cpp. "Syntax error" is here to catch this case.
31724  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31725/* end confdefs.h.  */
31726#ifdef __STDC__
31727# include <limits.h>
31728#else
31729# include <assert.h>
31730#endif
31731		     Syntax error
31732_ACEOF
31733if ac_fn_cxx_try_cpp "$LINENO"; then :
31734
31735else
31736  # Broken: fails on valid input.
31737continue
31738fi
31739rm -f conftest.err conftest.i conftest.$ac_ext
31740
31741  # OK, works on sane cases.  Now check whether nonexistent headers
31742  # can be detected and how.
31743  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31744/* end confdefs.h.  */
31745#include <ac_nonexistent.h>
31746_ACEOF
31747if ac_fn_cxx_try_cpp "$LINENO"; then :
31748  # Broken: success on invalid input.
31749continue
31750else
31751  # Passes both tests.
31752ac_preproc_ok=:
31753break
31754fi
31755rm -f conftest.err conftest.i conftest.$ac_ext
31756
31757done
31758# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31759rm -f conftest.i conftest.err conftest.$ac_ext
31760if $ac_preproc_ok; then :
31761  break
31762fi
31763
31764    done
31765    ac_cv_prog_CXXCPP=$CXXCPP
31766
31767fi
31768  CXXCPP=$ac_cv_prog_CXXCPP
31769else
31770  ac_cv_prog_CXXCPP=$CXXCPP
31771fi
31772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31773$as_echo "$CXXCPP" >&6; }
31774ac_preproc_ok=false
31775for ac_cxx_preproc_warn_flag in '' yes
31776do
31777  # Use a header file that comes with gcc, so configuring glibc
31778  # with a fresh cross-compiler works.
31779  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31780  # <limits.h> exists even on freestanding compilers.
31781  # On the NeXT, cc -E runs the code through the compiler's parser,
31782  # not just through cpp. "Syntax error" is here to catch this case.
31783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31784/* end confdefs.h.  */
31785#ifdef __STDC__
31786# include <limits.h>
31787#else
31788# include <assert.h>
31789#endif
31790		     Syntax error
31791_ACEOF
31792if ac_fn_cxx_try_cpp "$LINENO"; then :
31793
31794else
31795  # Broken: fails on valid input.
31796continue
31797fi
31798rm -f conftest.err conftest.i conftest.$ac_ext
31799
31800  # OK, works on sane cases.  Now check whether nonexistent headers
31801  # can be detected and how.
31802  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31803/* end confdefs.h.  */
31804#include <ac_nonexistent.h>
31805_ACEOF
31806if ac_fn_cxx_try_cpp "$LINENO"; then :
31807  # Broken: success on invalid input.
31808continue
31809else
31810  # Passes both tests.
31811ac_preproc_ok=:
31812break
31813fi
31814rm -f conftest.err conftest.i conftest.$ac_ext
31815
31816done
31817# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31818rm -f conftest.i conftest.err conftest.$ac_ext
31819if $ac_preproc_ok; then :
31820
31821else
31822  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31823$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31824as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31825See \`config.log' for more details" "$LINENO" 5; }
31826fi
31827
31828ac_ext=cpp
31829ac_cpp='$CXXCPP $CPPFLAGS'
31830ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31831ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31832ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31833
31834
31835  # Only process if variable expands to non-empty
31836
31837  if test "x$CXXCPP" != x; then
31838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31839
31840  # First separate the path from the arguments. This will split at the first
31841  # space.
31842  complete="$CXXCPP"
31843  path="${complete%% *}"
31844  tmp="$complete EOL"
31845  arguments="${tmp#* }"
31846
31847  # Input might be given as Windows format, start by converting to
31848  # unix format.
31849  new_path=`$CYGPATH -u "$path"`
31850
31851  # Now try to locate executable using which
31852  new_path=`$WHICH "$new_path" 2> /dev/null`
31853  # bat and cmd files are not always considered executable in cygwin causing which
31854  # to not find them
31855  if test "x$new_path" = x \
31856      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31857      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31858    new_path=`$CYGPATH -u "$path"`
31859  fi
31860  if test "x$new_path" = x; then
31861    # Oops. Which didn't find the executable.
31862    # The splitting of arguments from the executable at a space might have been incorrect,
31863    # since paths with space are more likely in Windows. Give it another try with the whole
31864    # argument.
31865    path="$complete"
31866    arguments="EOL"
31867    new_path=`$CYGPATH -u "$path"`
31868    new_path=`$WHICH "$new_path" 2> /dev/null`
31869    # bat and cmd files are not always considered executable in cygwin causing which
31870    # to not find them
31871    if test "x$new_path" = x \
31872        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31873        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31874      new_path=`$CYGPATH -u "$path"`
31875    fi
31876    if test "x$new_path" = x; then
31877      # It's still not found. Now this is an unrecoverable error.
31878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31879$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31880      has_space=`$ECHO "$complete" | $GREP " "`
31881      if test "x$has_space" != x; then
31882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31884      fi
31885      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31886    fi
31887  fi
31888
31889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31892  # "foo.exe" is OK but "foo" is an error.
31893  #
31894  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31895  # It is also a way to make sure we got the proper file name for the real test later on.
31896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31897  if test "x$test_shortpath" = x; then
31898    # Short path failed, file does not exist as specified.
31899    # Try adding .exe or .cmd
31900    if test -f "${new_path}.exe"; then
31901      input_to_shortpath="${new_path}.exe"
31902    elif test -f "${new_path}.cmd"; then
31903      input_to_shortpath="${new_path}.cmd"
31904    else
31905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31906$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31907      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31908$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31909      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31910    fi
31911  else
31912    input_to_shortpath="$new_path"
31913  fi
31914
31915  # Call helper function which possibly converts this using DOS-style short mode.
31916  # If so, the updated path is stored in $new_path.
31917  new_path="$input_to_shortpath"
31918
31919  input_path="$input_to_shortpath"
31920  # Check if we need to convert this using DOS-style short mode. If the path
31921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31922  # take no chances and rewrite it.
31923  # Note: m4 eats our [], so we need to use [ and ] instead.
31924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31925  if test "x$has_forbidden_chars" != x; then
31926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31930      # Going to short mode and back again did indeed matter. Since short mode is
31931      # case insensitive, let's make it lowercase to improve readability.
31932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31933      # Now convert it back to Unix-style (cygpath)
31934      input_path=`$CYGPATH -u "$shortmode_path"`
31935      new_path="$input_path"
31936    fi
31937  fi
31938
31939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31940  if test "x$test_cygdrive_prefix" = x; then
31941    # As a simple fix, exclude /usr/bin since it's not a real path.
31942    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31944      # a path prefixed by /cygdrive for fixpath to work.
31945      new_path="$CYGWIN_ROOT_PATH$input_path"
31946    fi
31947  fi
31948
31949  # remove trailing .exe if any
31950  new_path="${new_path/%.exe/}"
31951
31952    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31953
31954  # First separate the path from the arguments. This will split at the first
31955  # space.
31956  complete="$CXXCPP"
31957  path="${complete%% *}"
31958  tmp="$complete EOL"
31959  arguments="${tmp#* }"
31960
31961  # Input might be given as Windows format, start by converting to
31962  # unix format.
31963  new_path="$path"
31964
31965  windows_path="$new_path"
31966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31967    unix_path=`$CYGPATH -u "$windows_path"`
31968    new_path="$unix_path"
31969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31971    new_path="$unix_path"
31972  fi
31973
31974
31975  # Now try to locate executable using which
31976  new_path=`$WHICH "$new_path" 2> /dev/null`
31977
31978  if test "x$new_path" = x; then
31979    # Oops. Which didn't find the executable.
31980    # The splitting of arguments from the executable at a space might have been incorrect,
31981    # since paths with space are more likely in Windows. Give it another try with the whole
31982    # argument.
31983    path="$complete"
31984    arguments="EOL"
31985    new_path="$path"
31986
31987  windows_path="$new_path"
31988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31989    unix_path=`$CYGPATH -u "$windows_path"`
31990    new_path="$unix_path"
31991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31993    new_path="$unix_path"
31994  fi
31995
31996
31997    new_path=`$WHICH "$new_path" 2> /dev/null`
31998    # bat and cmd files are not always considered executable in MSYS causing which
31999    # to not find them
32000    if test "x$new_path" = x \
32001        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32002        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32003      new_path="$path"
32004
32005  windows_path="$new_path"
32006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32007    unix_path=`$CYGPATH -u "$windows_path"`
32008    new_path="$unix_path"
32009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32011    new_path="$unix_path"
32012  fi
32013
32014    fi
32015
32016    if test "x$new_path" = x; then
32017      # It's still not found. Now this is an unrecoverable error.
32018      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32019$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32020      has_space=`$ECHO "$complete" | $GREP " "`
32021      if test "x$has_space" != x; then
32022        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32023$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32024      fi
32025      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32026    fi
32027  fi
32028
32029  # Now new_path has a complete unix path to the binary
32030  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32031    # Keep paths in /bin as-is, but remove trailing .exe if any
32032    new_path="${new_path/%.exe/}"
32033    # Do not save /bin paths to all_fixpath_prefixes!
32034  else
32035    # Not in mixed or Windows style, start by that.
32036    new_path=`cmd //c echo $new_path`
32037
32038  input_path="$new_path"
32039  # Check if we need to convert this using DOS-style short mode. If the path
32040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32041  # take no chances and rewrite it.
32042  # Note: m4 eats our [], so we need to use [ and ] instead.
32043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32044  if test "x$has_forbidden_chars" != x; then
32045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32047  fi
32048
32049    # Output is in $new_path
32050
32051  windows_path="$new_path"
32052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32053    unix_path=`$CYGPATH -u "$windows_path"`
32054    new_path="$unix_path"
32055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32057    new_path="$unix_path"
32058  fi
32059
32060    # remove trailing .exe if any
32061    new_path="${new_path/%.exe/}"
32062
32063    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32064    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32065  fi
32066
32067    else
32068      # We're on a unix platform. Hooray! :)
32069      # First separate the path from the arguments. This will split at the first
32070      # space.
32071      complete="$CXXCPP"
32072      path="${complete%% *}"
32073      tmp="$complete EOL"
32074      arguments="${tmp#* }"
32075
32076      # Cannot rely on the command "which" here since it doesn't always work.
32077      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32078      if test -z "$is_absolute_path"; then
32079        # Path to executable is not absolute. Find it.
32080        IFS_save="$IFS"
32081        IFS=:
32082        for p in $PATH; do
32083          if test -f "$p/$path" && test -x "$p/$path"; then
32084            new_path="$p/$path"
32085            break
32086          fi
32087        done
32088        IFS="$IFS_save"
32089      else
32090        # This is an absolute path, we can use it without further modifications.
32091        new_path="$path"
32092      fi
32093
32094      if test "x$new_path" = x; then
32095        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32096$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32097        has_space=`$ECHO "$complete" | $GREP " "`
32098        if test "x$has_space" != x; then
32099          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32100$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32101        fi
32102        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32103      fi
32104    fi
32105
32106    # Now join together the path and the arguments once again
32107    if test "x$arguments" != xEOL; then
32108      new_complete="$new_path ${arguments% *}"
32109    else
32110      new_complete="$new_path"
32111    fi
32112
32113    if test "x$complete" != "x$new_complete"; then
32114      CXXCPP="$new_complete"
32115      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32116$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32117    fi
32118  fi
32119
32120
32121  #
32122  # Setup the linker (LD)
32123  #
32124  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32125    # In the Microsoft toolchain we have a separate LD command "link".
32126    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32127    # a cygwin program for something completely different.
32128    # Extract the first word of "link", so it can be a program name with args.
32129set dummy link; ac_word=$2
32130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32131$as_echo_n "checking for $ac_word... " >&6; }
32132if ${ac_cv_prog_LD+:} false; then :
32133  $as_echo_n "(cached) " >&6
32134else
32135  if test -n "$LD"; then
32136  ac_cv_prog_LD="$LD" # Let the user override the test.
32137else
32138  ac_prog_rejected=no
32139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32140for as_dir in $PATH
32141do
32142  IFS=$as_save_IFS
32143  test -z "$as_dir" && as_dir=.
32144    for ac_exec_ext in '' $ac_executable_extensions; do
32145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32146    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32147       ac_prog_rejected=yes
32148       continue
32149     fi
32150    ac_cv_prog_LD="link"
32151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32152    break 2
32153  fi
32154done
32155  done
32156IFS=$as_save_IFS
32157
32158if test $ac_prog_rejected = yes; then
32159  # We found a bogon in the path, so make sure we never use it.
32160  set dummy $ac_cv_prog_LD
32161  shift
32162  if test $# != 0; then
32163    # We chose a different compiler from the bogus one.
32164    # However, it has the same basename, so the bogon will be chosen
32165    # first if we set LD to just the basename; use the full file name.
32166    shift
32167    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32168  fi
32169fi
32170fi
32171fi
32172LD=$ac_cv_prog_LD
32173if test -n "$LD"; then
32174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32175$as_echo "$LD" >&6; }
32176else
32177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32178$as_echo "no" >&6; }
32179fi
32180
32181
32182
32183  # Only process if variable expands to non-empty
32184
32185  if test "x$LD" != x; then
32186    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32187
32188  # First separate the path from the arguments. This will split at the first
32189  # space.
32190  complete="$LD"
32191  path="${complete%% *}"
32192  tmp="$complete EOL"
32193  arguments="${tmp#* }"
32194
32195  # Input might be given as Windows format, start by converting to
32196  # unix format.
32197  new_path=`$CYGPATH -u "$path"`
32198
32199  # Now try to locate executable using which
32200  new_path=`$WHICH "$new_path" 2> /dev/null`
32201  # bat and cmd files are not always considered executable in cygwin causing which
32202  # to not find them
32203  if test "x$new_path" = x \
32204      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32205      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32206    new_path=`$CYGPATH -u "$path"`
32207  fi
32208  if test "x$new_path" = x; then
32209    # Oops. Which didn't find the executable.
32210    # The splitting of arguments from the executable at a space might have been incorrect,
32211    # since paths with space are more likely in Windows. Give it another try with the whole
32212    # argument.
32213    path="$complete"
32214    arguments="EOL"
32215    new_path=`$CYGPATH -u "$path"`
32216    new_path=`$WHICH "$new_path" 2> /dev/null`
32217    # bat and cmd files are not always considered executable in cygwin causing which
32218    # to not find them
32219    if test "x$new_path" = x \
32220        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32221        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32222      new_path=`$CYGPATH -u "$path"`
32223    fi
32224    if test "x$new_path" = x; then
32225      # It's still not found. Now this is an unrecoverable error.
32226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32227$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32228      has_space=`$ECHO "$complete" | $GREP " "`
32229      if test "x$has_space" != x; then
32230        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32231$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32232      fi
32233      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32234    fi
32235  fi
32236
32237  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32238  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32239  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32240  # "foo.exe" is OK but "foo" is an error.
32241  #
32242  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32243  # It is also a way to make sure we got the proper file name for the real test later on.
32244  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32245  if test "x$test_shortpath" = x; then
32246    # Short path failed, file does not exist as specified.
32247    # Try adding .exe or .cmd
32248    if test -f "${new_path}.exe"; then
32249      input_to_shortpath="${new_path}.exe"
32250    elif test -f "${new_path}.cmd"; then
32251      input_to_shortpath="${new_path}.cmd"
32252    else
32253      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32254$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32255      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32256$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32257      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32258    fi
32259  else
32260    input_to_shortpath="$new_path"
32261  fi
32262
32263  # Call helper function which possibly converts this using DOS-style short mode.
32264  # If so, the updated path is stored in $new_path.
32265  new_path="$input_to_shortpath"
32266
32267  input_path="$input_to_shortpath"
32268  # Check if we need to convert this using DOS-style short mode. If the path
32269  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32270  # take no chances and rewrite it.
32271  # Note: m4 eats our [], so we need to use [ and ] instead.
32272  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32273  if test "x$has_forbidden_chars" != x; then
32274    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32275    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32276    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32277    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32278      # Going to short mode and back again did indeed matter. Since short mode is
32279      # case insensitive, let's make it lowercase to improve readability.
32280      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32281      # Now convert it back to Unix-style (cygpath)
32282      input_path=`$CYGPATH -u "$shortmode_path"`
32283      new_path="$input_path"
32284    fi
32285  fi
32286
32287  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32288  if test "x$test_cygdrive_prefix" = x; then
32289    # As a simple fix, exclude /usr/bin since it's not a real path.
32290    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32291      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32292      # a path prefixed by /cygdrive for fixpath to work.
32293      new_path="$CYGWIN_ROOT_PATH$input_path"
32294    fi
32295  fi
32296
32297  # remove trailing .exe if any
32298  new_path="${new_path/%.exe/}"
32299
32300    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32301
32302  # First separate the path from the arguments. This will split at the first
32303  # space.
32304  complete="$LD"
32305  path="${complete%% *}"
32306  tmp="$complete EOL"
32307  arguments="${tmp#* }"
32308
32309  # Input might be given as Windows format, start by converting to
32310  # unix format.
32311  new_path="$path"
32312
32313  windows_path="$new_path"
32314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32315    unix_path=`$CYGPATH -u "$windows_path"`
32316    new_path="$unix_path"
32317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32319    new_path="$unix_path"
32320  fi
32321
32322
32323  # Now try to locate executable using which
32324  new_path=`$WHICH "$new_path" 2> /dev/null`
32325
32326  if test "x$new_path" = x; then
32327    # Oops. Which didn't find the executable.
32328    # The splitting of arguments from the executable at a space might have been incorrect,
32329    # since paths with space are more likely in Windows. Give it another try with the whole
32330    # argument.
32331    path="$complete"
32332    arguments="EOL"
32333    new_path="$path"
32334
32335  windows_path="$new_path"
32336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32337    unix_path=`$CYGPATH -u "$windows_path"`
32338    new_path="$unix_path"
32339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32341    new_path="$unix_path"
32342  fi
32343
32344
32345    new_path=`$WHICH "$new_path" 2> /dev/null`
32346    # bat and cmd files are not always considered executable in MSYS causing which
32347    # to not find them
32348    if test "x$new_path" = x \
32349        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32350        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32351      new_path="$path"
32352
32353  windows_path="$new_path"
32354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32355    unix_path=`$CYGPATH -u "$windows_path"`
32356    new_path="$unix_path"
32357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32359    new_path="$unix_path"
32360  fi
32361
32362    fi
32363
32364    if test "x$new_path" = x; then
32365      # It's still not found. Now this is an unrecoverable error.
32366      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32367$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32368      has_space=`$ECHO "$complete" | $GREP " "`
32369      if test "x$has_space" != x; then
32370        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32371$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32372      fi
32373      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32374    fi
32375  fi
32376
32377  # Now new_path has a complete unix path to the binary
32378  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32379    # Keep paths in /bin as-is, but remove trailing .exe if any
32380    new_path="${new_path/%.exe/}"
32381    # Do not save /bin paths to all_fixpath_prefixes!
32382  else
32383    # Not in mixed or Windows style, start by that.
32384    new_path=`cmd //c echo $new_path`
32385
32386  input_path="$new_path"
32387  # Check if we need to convert this using DOS-style short mode. If the path
32388  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32389  # take no chances and rewrite it.
32390  # Note: m4 eats our [], so we need to use [ and ] instead.
32391  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32392  if test "x$has_forbidden_chars" != x; then
32393    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32394    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32395  fi
32396
32397    # Output is in $new_path
32398
32399  windows_path="$new_path"
32400  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32401    unix_path=`$CYGPATH -u "$windows_path"`
32402    new_path="$unix_path"
32403  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32404    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32405    new_path="$unix_path"
32406  fi
32407
32408    # remove trailing .exe if any
32409    new_path="${new_path/%.exe/}"
32410
32411    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32412    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32413  fi
32414
32415    else
32416      # We're on a unix platform. Hooray! :)
32417      # First separate the path from the arguments. This will split at the first
32418      # space.
32419      complete="$LD"
32420      path="${complete%% *}"
32421      tmp="$complete EOL"
32422      arguments="${tmp#* }"
32423
32424      # Cannot rely on the command "which" here since it doesn't always work.
32425      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32426      if test -z "$is_absolute_path"; then
32427        # Path to executable is not absolute. Find it.
32428        IFS_save="$IFS"
32429        IFS=:
32430        for p in $PATH; do
32431          if test -f "$p/$path" && test -x "$p/$path"; then
32432            new_path="$p/$path"
32433            break
32434          fi
32435        done
32436        IFS="$IFS_save"
32437      else
32438        # This is an absolute path, we can use it without further modifications.
32439        new_path="$path"
32440      fi
32441
32442      if test "x$new_path" = x; then
32443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32444$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32445        has_space=`$ECHO "$complete" | $GREP " "`
32446        if test "x$has_space" != x; then
32447          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32448$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32449        fi
32450        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32451      fi
32452    fi
32453
32454    # Now join together the path and the arguments once again
32455    if test "x$arguments" != xEOL; then
32456      new_complete="$new_path ${arguments% *}"
32457    else
32458      new_complete="$new_path"
32459    fi
32460
32461    if test "x$complete" != "x$new_complete"; then
32462      LD="$new_complete"
32463      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32464$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32465    fi
32466  fi
32467
32468    # Verify that we indeed succeeded with this trick.
32469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32470$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32471    "$LD" --version > /dev/null
32472    if test $? -eq 0 ; then
32473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32474$as_echo "no" >&6; }
32475      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32476    else
32477      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32478$as_echo "yes" >&6; }
32479    fi
32480    LDCXX="$LD"
32481  else
32482    # All other toolchains use the compiler to link.
32483    LD="$CC"
32484    LDCXX="$CXX"
32485  fi
32486
32487  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32488
32489
32490  #
32491  # Setup the assembler (AS)
32492  #
32493  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32494    # FIXME: should this really be solaris, or solstudio?
32495
32496
32497  # Publish this variable in the help.
32498
32499
32500  if test "x$AS" = x; then
32501    # The variable is not set by user, try to locate tool using the code snippet
32502    for ac_prog in as
32503do
32504  # Extract the first word of "$ac_prog", so it can be a program name with args.
32505set dummy $ac_prog; ac_word=$2
32506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32507$as_echo_n "checking for $ac_word... " >&6; }
32508if ${ac_cv_path_AS+:} false; then :
32509  $as_echo_n "(cached) " >&6
32510else
32511  case $AS in
32512  [\\/]* | ?:[\\/]*)
32513  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32514  ;;
32515  *)
32516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32517for as_dir in $PATH
32518do
32519  IFS=$as_save_IFS
32520  test -z "$as_dir" && as_dir=.
32521    for ac_exec_ext in '' $ac_executable_extensions; do
32522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32523    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32525    break 2
32526  fi
32527done
32528  done
32529IFS=$as_save_IFS
32530
32531  ;;
32532esac
32533fi
32534AS=$ac_cv_path_AS
32535if test -n "$AS"; then
32536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32537$as_echo "$AS" >&6; }
32538else
32539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32540$as_echo "no" >&6; }
32541fi
32542
32543
32544  test -n "$AS" && break
32545done
32546
32547  else
32548    # The variable is set, but is it from the command line or the environment?
32549
32550    # Try to remove the string !AS! from our list.
32551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32553      # If it failed, the variable was not from the command line. Ignore it,
32554      # but warn the user (except for BASH, which is always set by the calling BASH).
32555      if test "xAS" != xBASH; then
32556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32557$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32558      fi
32559      # Try to locate tool using the code snippet
32560      for ac_prog in as
32561do
32562  # Extract the first word of "$ac_prog", so it can be a program name with args.
32563set dummy $ac_prog; ac_word=$2
32564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32565$as_echo_n "checking for $ac_word... " >&6; }
32566if ${ac_cv_path_AS+:} false; then :
32567  $as_echo_n "(cached) " >&6
32568else
32569  case $AS in
32570  [\\/]* | ?:[\\/]*)
32571  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32572  ;;
32573  *)
32574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32575for as_dir in $PATH
32576do
32577  IFS=$as_save_IFS
32578  test -z "$as_dir" && as_dir=.
32579    for ac_exec_ext in '' $ac_executable_extensions; do
32580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32581    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32583    break 2
32584  fi
32585done
32586  done
32587IFS=$as_save_IFS
32588
32589  ;;
32590esac
32591fi
32592AS=$ac_cv_path_AS
32593if test -n "$AS"; then
32594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32595$as_echo "$AS" >&6; }
32596else
32597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32598$as_echo "no" >&6; }
32599fi
32600
32601
32602  test -n "$AS" && break
32603done
32604
32605    else
32606      # If it succeeded, then it was overridden by the user. We will use it
32607      # for the tool.
32608
32609      # First remove it from the list of overridden variables, so we can test
32610      # for unknown variables in the end.
32611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32612
32613      # Check if the provided tool contains a complete path.
32614      tool_specified="$AS"
32615      tool_basename="${tool_specified##*/}"
32616      if test "x$tool_basename" = "x$tool_specified"; then
32617        # A command without a complete path is provided, search $PATH.
32618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32619$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32620        # Extract the first word of "$tool_basename", so it can be a program name with args.
32621set dummy $tool_basename; ac_word=$2
32622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32623$as_echo_n "checking for $ac_word... " >&6; }
32624if ${ac_cv_path_AS+:} false; then :
32625  $as_echo_n "(cached) " >&6
32626else
32627  case $AS in
32628  [\\/]* | ?:[\\/]*)
32629  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32630  ;;
32631  *)
32632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32633for as_dir in $PATH
32634do
32635  IFS=$as_save_IFS
32636  test -z "$as_dir" && as_dir=.
32637    for ac_exec_ext in '' $ac_executable_extensions; do
32638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32639    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32641    break 2
32642  fi
32643done
32644  done
32645IFS=$as_save_IFS
32646
32647  ;;
32648esac
32649fi
32650AS=$ac_cv_path_AS
32651if test -n "$AS"; then
32652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32653$as_echo "$AS" >&6; }
32654else
32655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32656$as_echo "no" >&6; }
32657fi
32658
32659
32660        if test "x$AS" = x; then
32661          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32662        fi
32663      else
32664        # Otherwise we believe it is a complete path. Use it as it is.
32665        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32666$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32667        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32668$as_echo_n "checking for AS... " >&6; }
32669        if test ! -x "$tool_specified"; then
32670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32671$as_echo "not found" >&6; }
32672          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32673        fi
32674        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32675$as_echo "$tool_specified" >&6; }
32676      fi
32677    fi
32678  fi
32679
32680
32681
32682  # Only process if variable expands to non-empty
32683
32684  if test "x$AS" != x; then
32685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32686
32687  # First separate the path from the arguments. This will split at the first
32688  # space.
32689  complete="$AS"
32690  path="${complete%% *}"
32691  tmp="$complete EOL"
32692  arguments="${tmp#* }"
32693
32694  # Input might be given as Windows format, start by converting to
32695  # unix format.
32696  new_path=`$CYGPATH -u "$path"`
32697
32698  # Now try to locate executable using which
32699  new_path=`$WHICH "$new_path" 2> /dev/null`
32700  # bat and cmd files are not always considered executable in cygwin causing which
32701  # to not find them
32702  if test "x$new_path" = x \
32703      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32704      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32705    new_path=`$CYGPATH -u "$path"`
32706  fi
32707  if test "x$new_path" = x; then
32708    # Oops. Which didn't find the executable.
32709    # The splitting of arguments from the executable at a space might have been incorrect,
32710    # since paths with space are more likely in Windows. Give it another try with the whole
32711    # argument.
32712    path="$complete"
32713    arguments="EOL"
32714    new_path=`$CYGPATH -u "$path"`
32715    new_path=`$WHICH "$new_path" 2> /dev/null`
32716    # bat and cmd files are not always considered executable in cygwin causing which
32717    # to not find them
32718    if test "x$new_path" = x \
32719        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32720        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32721      new_path=`$CYGPATH -u "$path"`
32722    fi
32723    if test "x$new_path" = x; then
32724      # It's still not found. Now this is an unrecoverable error.
32725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32726$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32727      has_space=`$ECHO "$complete" | $GREP " "`
32728      if test "x$has_space" != x; then
32729        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32730$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32731      fi
32732      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32733    fi
32734  fi
32735
32736  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32737  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32738  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32739  # "foo.exe" is OK but "foo" is an error.
32740  #
32741  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32742  # It is also a way to make sure we got the proper file name for the real test later on.
32743  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32744  if test "x$test_shortpath" = x; then
32745    # Short path failed, file does not exist as specified.
32746    # Try adding .exe or .cmd
32747    if test -f "${new_path}.exe"; then
32748      input_to_shortpath="${new_path}.exe"
32749    elif test -f "${new_path}.cmd"; then
32750      input_to_shortpath="${new_path}.cmd"
32751    else
32752      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32753$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32754      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32755$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32756      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32757    fi
32758  else
32759    input_to_shortpath="$new_path"
32760  fi
32761
32762  # Call helper function which possibly converts this using DOS-style short mode.
32763  # If so, the updated path is stored in $new_path.
32764  new_path="$input_to_shortpath"
32765
32766  input_path="$input_to_shortpath"
32767  # Check if we need to convert this using DOS-style short mode. If the path
32768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32769  # take no chances and rewrite it.
32770  # Note: m4 eats our [], so we need to use [ and ] instead.
32771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32772  if test "x$has_forbidden_chars" != x; then
32773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32774    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32775    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32776    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32777      # Going to short mode and back again did indeed matter. Since short mode is
32778      # case insensitive, let's make it lowercase to improve readability.
32779      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32780      # Now convert it back to Unix-style (cygpath)
32781      input_path=`$CYGPATH -u "$shortmode_path"`
32782      new_path="$input_path"
32783    fi
32784  fi
32785
32786  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32787  if test "x$test_cygdrive_prefix" = x; then
32788    # As a simple fix, exclude /usr/bin since it's not a real path.
32789    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32790      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32791      # a path prefixed by /cygdrive for fixpath to work.
32792      new_path="$CYGWIN_ROOT_PATH$input_path"
32793    fi
32794  fi
32795
32796  # remove trailing .exe if any
32797  new_path="${new_path/%.exe/}"
32798
32799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32800
32801  # First separate the path from the arguments. This will split at the first
32802  # space.
32803  complete="$AS"
32804  path="${complete%% *}"
32805  tmp="$complete EOL"
32806  arguments="${tmp#* }"
32807
32808  # Input might be given as Windows format, start by converting to
32809  # unix format.
32810  new_path="$path"
32811
32812  windows_path="$new_path"
32813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32814    unix_path=`$CYGPATH -u "$windows_path"`
32815    new_path="$unix_path"
32816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32818    new_path="$unix_path"
32819  fi
32820
32821
32822  # Now try to locate executable using which
32823  new_path=`$WHICH "$new_path" 2> /dev/null`
32824
32825  if test "x$new_path" = x; then
32826    # Oops. Which didn't find the executable.
32827    # The splitting of arguments from the executable at a space might have been incorrect,
32828    # since paths with space are more likely in Windows. Give it another try with the whole
32829    # argument.
32830    path="$complete"
32831    arguments="EOL"
32832    new_path="$path"
32833
32834  windows_path="$new_path"
32835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32836    unix_path=`$CYGPATH -u "$windows_path"`
32837    new_path="$unix_path"
32838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32840    new_path="$unix_path"
32841  fi
32842
32843
32844    new_path=`$WHICH "$new_path" 2> /dev/null`
32845    # bat and cmd files are not always considered executable in MSYS causing which
32846    # to not find them
32847    if test "x$new_path" = x \
32848        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32849        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32850      new_path="$path"
32851
32852  windows_path="$new_path"
32853  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32854    unix_path=`$CYGPATH -u "$windows_path"`
32855    new_path="$unix_path"
32856  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32857    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32858    new_path="$unix_path"
32859  fi
32860
32861    fi
32862
32863    if test "x$new_path" = x; then
32864      # It's still not found. Now this is an unrecoverable error.
32865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32866$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32867      has_space=`$ECHO "$complete" | $GREP " "`
32868      if test "x$has_space" != x; then
32869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32871      fi
32872      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32873    fi
32874  fi
32875
32876  # Now new_path has a complete unix path to the binary
32877  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32878    # Keep paths in /bin as-is, but remove trailing .exe if any
32879    new_path="${new_path/%.exe/}"
32880    # Do not save /bin paths to all_fixpath_prefixes!
32881  else
32882    # Not in mixed or Windows style, start by that.
32883    new_path=`cmd //c echo $new_path`
32884
32885  input_path="$new_path"
32886  # Check if we need to convert this using DOS-style short mode. If the path
32887  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32888  # take no chances and rewrite it.
32889  # Note: m4 eats our [], so we need to use [ and ] instead.
32890  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32891  if test "x$has_forbidden_chars" != x; then
32892    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32893    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32894  fi
32895
32896    # Output is in $new_path
32897
32898  windows_path="$new_path"
32899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32900    unix_path=`$CYGPATH -u "$windows_path"`
32901    new_path="$unix_path"
32902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32904    new_path="$unix_path"
32905  fi
32906
32907    # remove trailing .exe if any
32908    new_path="${new_path/%.exe/}"
32909
32910    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32911    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32912  fi
32913
32914    else
32915      # We're on a unix platform. Hooray! :)
32916      # First separate the path from the arguments. This will split at the first
32917      # space.
32918      complete="$AS"
32919      path="${complete%% *}"
32920      tmp="$complete EOL"
32921      arguments="${tmp#* }"
32922
32923      # Cannot rely on the command "which" here since it doesn't always work.
32924      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32925      if test -z "$is_absolute_path"; then
32926        # Path to executable is not absolute. Find it.
32927        IFS_save="$IFS"
32928        IFS=:
32929        for p in $PATH; do
32930          if test -f "$p/$path" && test -x "$p/$path"; then
32931            new_path="$p/$path"
32932            break
32933          fi
32934        done
32935        IFS="$IFS_save"
32936      else
32937        # This is an absolute path, we can use it without further modifications.
32938        new_path="$path"
32939      fi
32940
32941      if test "x$new_path" = x; then
32942        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32943$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32944        has_space=`$ECHO "$complete" | $GREP " "`
32945        if test "x$has_space" != x; then
32946          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32947$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32948        fi
32949        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32950      fi
32951    fi
32952
32953    # Now join together the path and the arguments once again
32954    if test "x$arguments" != xEOL; then
32955      new_complete="$new_path ${arguments% *}"
32956    else
32957      new_complete="$new_path"
32958    fi
32959
32960    if test "x$complete" != "x$new_complete"; then
32961      AS="$new_complete"
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32963$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32964    fi
32965  fi
32966
32967  else
32968    # FIXME: is this correct for microsoft?
32969    AS="$CC -c"
32970  fi
32971
32972
32973  #
32974  # Setup the archiver (AR)
32975  #
32976  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32977    # The corresponding ar tool is lib.exe (used to create static libraries)
32978    # Extract the first word of "lib", so it can be a program name with args.
32979set dummy lib; ac_word=$2
32980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32981$as_echo_n "checking for $ac_word... " >&6; }
32982if ${ac_cv_prog_AR+:} false; then :
32983  $as_echo_n "(cached) " >&6
32984else
32985  if test -n "$AR"; then
32986  ac_cv_prog_AR="$AR" # Let the user override the test.
32987else
32988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32989for as_dir in $PATH
32990do
32991  IFS=$as_save_IFS
32992  test -z "$as_dir" && as_dir=.
32993    for ac_exec_ext in '' $ac_executable_extensions; do
32994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32995    ac_cv_prog_AR="lib"
32996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32997    break 2
32998  fi
32999done
33000  done
33001IFS=$as_save_IFS
33002
33003fi
33004fi
33005AR=$ac_cv_prog_AR
33006if test -n "$AR"; then
33007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33008$as_echo "$AR" >&6; }
33009else
33010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33011$as_echo "no" >&6; }
33012fi
33013
33014
33015  else
33016
33017
33018  # Publish this variable in the help.
33019
33020
33021  if test "x$AR" = x; then
33022    # The variable is not set by user, try to locate tool using the code snippet
33023    if test -n "$ac_tool_prefix"; then
33024  for ac_prog in ar
33025  do
33026    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33027set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33029$as_echo_n "checking for $ac_word... " >&6; }
33030if ${ac_cv_prog_AR+:} false; then :
33031  $as_echo_n "(cached) " >&6
33032else
33033  if test -n "$AR"; then
33034  ac_cv_prog_AR="$AR" # Let the user override the test.
33035else
33036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33037for as_dir in $PATH
33038do
33039  IFS=$as_save_IFS
33040  test -z "$as_dir" && as_dir=.
33041    for ac_exec_ext in '' $ac_executable_extensions; do
33042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33043    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33045    break 2
33046  fi
33047done
33048  done
33049IFS=$as_save_IFS
33050
33051fi
33052fi
33053AR=$ac_cv_prog_AR
33054if test -n "$AR"; then
33055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33056$as_echo "$AR" >&6; }
33057else
33058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33059$as_echo "no" >&6; }
33060fi
33061
33062
33063    test -n "$AR" && break
33064  done
33065fi
33066if test -z "$AR"; then
33067  ac_ct_AR=$AR
33068  for ac_prog in ar
33069do
33070  # Extract the first word of "$ac_prog", so it can be a program name with args.
33071set dummy $ac_prog; ac_word=$2
33072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33073$as_echo_n "checking for $ac_word... " >&6; }
33074if ${ac_cv_prog_ac_ct_AR+:} false; then :
33075  $as_echo_n "(cached) " >&6
33076else
33077  if test -n "$ac_ct_AR"; then
33078  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33079else
33080as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33081for as_dir in $PATH
33082do
33083  IFS=$as_save_IFS
33084  test -z "$as_dir" && as_dir=.
33085    for ac_exec_ext in '' $ac_executable_extensions; do
33086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33087    ac_cv_prog_ac_ct_AR="$ac_prog"
33088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33089    break 2
33090  fi
33091done
33092  done
33093IFS=$as_save_IFS
33094
33095fi
33096fi
33097ac_ct_AR=$ac_cv_prog_ac_ct_AR
33098if test -n "$ac_ct_AR"; then
33099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33100$as_echo "$ac_ct_AR" >&6; }
33101else
33102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33103$as_echo "no" >&6; }
33104fi
33105
33106
33107  test -n "$ac_ct_AR" && break
33108done
33109
33110  if test "x$ac_ct_AR" = x; then
33111    AR=""
33112  else
33113    case $cross_compiling:$ac_tool_warned in
33114yes:)
33115{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33116$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33117ac_tool_warned=yes ;;
33118esac
33119    AR=$ac_ct_AR
33120  fi
33121fi
33122
33123  else
33124    # The variable is set, but is it from the command line or the environment?
33125
33126    # Try to remove the string !AR! from our list.
33127    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33128    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33129      # If it failed, the variable was not from the command line. Ignore it,
33130      # but warn the user (except for BASH, which is always set by the calling BASH).
33131      if test "xAR" != xBASH; then
33132        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33133$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33134      fi
33135      # Try to locate tool using the code snippet
33136      if test -n "$ac_tool_prefix"; then
33137  for ac_prog in ar
33138  do
33139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33142$as_echo_n "checking for $ac_word... " >&6; }
33143if ${ac_cv_prog_AR+:} false; then :
33144  $as_echo_n "(cached) " >&6
33145else
33146  if test -n "$AR"; then
33147  ac_cv_prog_AR="$AR" # Let the user override the test.
33148else
33149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33150for as_dir in $PATH
33151do
33152  IFS=$as_save_IFS
33153  test -z "$as_dir" && as_dir=.
33154    for ac_exec_ext in '' $ac_executable_extensions; do
33155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33156    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33158    break 2
33159  fi
33160done
33161  done
33162IFS=$as_save_IFS
33163
33164fi
33165fi
33166AR=$ac_cv_prog_AR
33167if test -n "$AR"; then
33168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33169$as_echo "$AR" >&6; }
33170else
33171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33172$as_echo "no" >&6; }
33173fi
33174
33175
33176    test -n "$AR" && break
33177  done
33178fi
33179if test -z "$AR"; then
33180  ac_ct_AR=$AR
33181  for ac_prog in ar
33182do
33183  # Extract the first word of "$ac_prog", so it can be a program name with args.
33184set dummy $ac_prog; ac_word=$2
33185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33186$as_echo_n "checking for $ac_word... " >&6; }
33187if ${ac_cv_prog_ac_ct_AR+:} false; then :
33188  $as_echo_n "(cached) " >&6
33189else
33190  if test -n "$ac_ct_AR"; then
33191  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33192else
33193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33194for as_dir in $PATH
33195do
33196  IFS=$as_save_IFS
33197  test -z "$as_dir" && as_dir=.
33198    for ac_exec_ext in '' $ac_executable_extensions; do
33199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33200    ac_cv_prog_ac_ct_AR="$ac_prog"
33201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33202    break 2
33203  fi
33204done
33205  done
33206IFS=$as_save_IFS
33207
33208fi
33209fi
33210ac_ct_AR=$ac_cv_prog_ac_ct_AR
33211if test -n "$ac_ct_AR"; then
33212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33213$as_echo "$ac_ct_AR" >&6; }
33214else
33215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33216$as_echo "no" >&6; }
33217fi
33218
33219
33220  test -n "$ac_ct_AR" && break
33221done
33222
33223  if test "x$ac_ct_AR" = x; then
33224    AR=""
33225  else
33226    case $cross_compiling:$ac_tool_warned in
33227yes:)
33228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33230ac_tool_warned=yes ;;
33231esac
33232    AR=$ac_ct_AR
33233  fi
33234fi
33235
33236    else
33237      # If it succeeded, then it was overridden by the user. We will use it
33238      # for the tool.
33239
33240      # First remove it from the list of overridden variables, so we can test
33241      # for unknown variables in the end.
33242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33243
33244      # Check if the provided tool contains a complete path.
33245      tool_specified="$AR"
33246      tool_basename="${tool_specified##*/}"
33247      if test "x$tool_basename" = "x$tool_specified"; then
33248        # A command without a complete path is provided, search $PATH.
33249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33250$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33251        # Extract the first word of "$tool_basename", so it can be a program name with args.
33252set dummy $tool_basename; ac_word=$2
33253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33254$as_echo_n "checking for $ac_word... " >&6; }
33255if ${ac_cv_path_AR+:} false; then :
33256  $as_echo_n "(cached) " >&6
33257else
33258  case $AR in
33259  [\\/]* | ?:[\\/]*)
33260  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33261  ;;
33262  *)
33263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33264for as_dir in $PATH
33265do
33266  IFS=$as_save_IFS
33267  test -z "$as_dir" && as_dir=.
33268    for ac_exec_ext in '' $ac_executable_extensions; do
33269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33270    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33272    break 2
33273  fi
33274done
33275  done
33276IFS=$as_save_IFS
33277
33278  ;;
33279esac
33280fi
33281AR=$ac_cv_path_AR
33282if test -n "$AR"; then
33283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33284$as_echo "$AR" >&6; }
33285else
33286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33287$as_echo "no" >&6; }
33288fi
33289
33290
33291        if test "x$AR" = x; then
33292          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33293        fi
33294      else
33295        # Otherwise we believe it is a complete path. Use it as it is.
33296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33297$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33299$as_echo_n "checking for AR... " >&6; }
33300        if test ! -x "$tool_specified"; then
33301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33302$as_echo "not found" >&6; }
33303          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33304        fi
33305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33306$as_echo "$tool_specified" >&6; }
33307      fi
33308    fi
33309  fi
33310
33311
33312  fi
33313
33314  # Only process if variable expands to non-empty
33315
33316  if test "x$AR" != x; then
33317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33318
33319  # First separate the path from the arguments. This will split at the first
33320  # space.
33321  complete="$AR"
33322  path="${complete%% *}"
33323  tmp="$complete EOL"
33324  arguments="${tmp#* }"
33325
33326  # Input might be given as Windows format, start by converting to
33327  # unix format.
33328  new_path=`$CYGPATH -u "$path"`
33329
33330  # Now try to locate executable using which
33331  new_path=`$WHICH "$new_path" 2> /dev/null`
33332  # bat and cmd files are not always considered executable in cygwin causing which
33333  # to not find them
33334  if test "x$new_path" = x \
33335      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33336      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33337    new_path=`$CYGPATH -u "$path"`
33338  fi
33339  if test "x$new_path" = x; then
33340    # Oops. Which didn't find the executable.
33341    # The splitting of arguments from the executable at a space might have been incorrect,
33342    # since paths with space are more likely in Windows. Give it another try with the whole
33343    # argument.
33344    path="$complete"
33345    arguments="EOL"
33346    new_path=`$CYGPATH -u "$path"`
33347    new_path=`$WHICH "$new_path" 2> /dev/null`
33348    # bat and cmd files are not always considered executable in cygwin causing which
33349    # to not find them
33350    if test "x$new_path" = x \
33351        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33352        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33353      new_path=`$CYGPATH -u "$path"`
33354    fi
33355    if test "x$new_path" = x; then
33356      # It's still not found. Now this is an unrecoverable error.
33357      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33358$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33359      has_space=`$ECHO "$complete" | $GREP " "`
33360      if test "x$has_space" != x; then
33361        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33362$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33363      fi
33364      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33365    fi
33366  fi
33367
33368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33371  # "foo.exe" is OK but "foo" is an error.
33372  #
33373  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33374  # It is also a way to make sure we got the proper file name for the real test later on.
33375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33376  if test "x$test_shortpath" = x; then
33377    # Short path failed, file does not exist as specified.
33378    # Try adding .exe or .cmd
33379    if test -f "${new_path}.exe"; then
33380      input_to_shortpath="${new_path}.exe"
33381    elif test -f "${new_path}.cmd"; then
33382      input_to_shortpath="${new_path}.cmd"
33383    else
33384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33385$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33386      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33387$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33388      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33389    fi
33390  else
33391    input_to_shortpath="$new_path"
33392  fi
33393
33394  # Call helper function which possibly converts this using DOS-style short mode.
33395  # If so, the updated path is stored in $new_path.
33396  new_path="$input_to_shortpath"
33397
33398  input_path="$input_to_shortpath"
33399  # Check if we need to convert this using DOS-style short mode. If the path
33400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33401  # take no chances and rewrite it.
33402  # Note: m4 eats our [], so we need to use [ and ] instead.
33403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33404  if test "x$has_forbidden_chars" != x; then
33405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33406    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33407    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33408    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33409      # Going to short mode and back again did indeed matter. Since short mode is
33410      # case insensitive, let's make it lowercase to improve readability.
33411      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33412      # Now convert it back to Unix-style (cygpath)
33413      input_path=`$CYGPATH -u "$shortmode_path"`
33414      new_path="$input_path"
33415    fi
33416  fi
33417
33418  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33419  if test "x$test_cygdrive_prefix" = x; then
33420    # As a simple fix, exclude /usr/bin since it's not a real path.
33421    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33422      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33423      # a path prefixed by /cygdrive for fixpath to work.
33424      new_path="$CYGWIN_ROOT_PATH$input_path"
33425    fi
33426  fi
33427
33428  # remove trailing .exe if any
33429  new_path="${new_path/%.exe/}"
33430
33431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33432
33433  # First separate the path from the arguments. This will split at the first
33434  # space.
33435  complete="$AR"
33436  path="${complete%% *}"
33437  tmp="$complete EOL"
33438  arguments="${tmp#* }"
33439
33440  # Input might be given as Windows format, start by converting to
33441  # unix format.
33442  new_path="$path"
33443
33444  windows_path="$new_path"
33445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33446    unix_path=`$CYGPATH -u "$windows_path"`
33447    new_path="$unix_path"
33448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33450    new_path="$unix_path"
33451  fi
33452
33453
33454  # Now try to locate executable using which
33455  new_path=`$WHICH "$new_path" 2> /dev/null`
33456
33457  if test "x$new_path" = x; then
33458    # Oops. Which didn't find the executable.
33459    # The splitting of arguments from the executable at a space might have been incorrect,
33460    # since paths with space are more likely in Windows. Give it another try with the whole
33461    # argument.
33462    path="$complete"
33463    arguments="EOL"
33464    new_path="$path"
33465
33466  windows_path="$new_path"
33467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33468    unix_path=`$CYGPATH -u "$windows_path"`
33469    new_path="$unix_path"
33470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33472    new_path="$unix_path"
33473  fi
33474
33475
33476    new_path=`$WHICH "$new_path" 2> /dev/null`
33477    # bat and cmd files are not always considered executable in MSYS causing which
33478    # to not find them
33479    if test "x$new_path" = x \
33480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33482      new_path="$path"
33483
33484  windows_path="$new_path"
33485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33486    unix_path=`$CYGPATH -u "$windows_path"`
33487    new_path="$unix_path"
33488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33490    new_path="$unix_path"
33491  fi
33492
33493    fi
33494
33495    if test "x$new_path" = x; then
33496      # It's still not found. Now this is an unrecoverable error.
33497      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33498$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33499      has_space=`$ECHO "$complete" | $GREP " "`
33500      if test "x$has_space" != x; then
33501        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33502$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33503      fi
33504      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33505    fi
33506  fi
33507
33508  # Now new_path has a complete unix path to the binary
33509  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33510    # Keep paths in /bin as-is, but remove trailing .exe if any
33511    new_path="${new_path/%.exe/}"
33512    # Do not save /bin paths to all_fixpath_prefixes!
33513  else
33514    # Not in mixed or Windows style, start by that.
33515    new_path=`cmd //c echo $new_path`
33516
33517  input_path="$new_path"
33518  # Check if we need to convert this using DOS-style short mode. If the path
33519  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33520  # take no chances and rewrite it.
33521  # Note: m4 eats our [], so we need to use [ and ] instead.
33522  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33523  if test "x$has_forbidden_chars" != x; then
33524    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33525    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33526  fi
33527
33528    # Output is in $new_path
33529
33530  windows_path="$new_path"
33531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33532    unix_path=`$CYGPATH -u "$windows_path"`
33533    new_path="$unix_path"
33534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33536    new_path="$unix_path"
33537  fi
33538
33539    # remove trailing .exe if any
33540    new_path="${new_path/%.exe/}"
33541
33542    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33543    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33544  fi
33545
33546    else
33547      # We're on a unix platform. Hooray! :)
33548      # First separate the path from the arguments. This will split at the first
33549      # space.
33550      complete="$AR"
33551      path="${complete%% *}"
33552      tmp="$complete EOL"
33553      arguments="${tmp#* }"
33554
33555      # Cannot rely on the command "which" here since it doesn't always work.
33556      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33557      if test -z "$is_absolute_path"; then
33558        # Path to executable is not absolute. Find it.
33559        IFS_save="$IFS"
33560        IFS=:
33561        for p in $PATH; do
33562          if test -f "$p/$path" && test -x "$p/$path"; then
33563            new_path="$p/$path"
33564            break
33565          fi
33566        done
33567        IFS="$IFS_save"
33568      else
33569        # This is an absolute path, we can use it without further modifications.
33570        new_path="$path"
33571      fi
33572
33573      if test "x$new_path" = x; then
33574        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33575$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33576        has_space=`$ECHO "$complete" | $GREP " "`
33577        if test "x$has_space" != x; then
33578          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33579$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33580        fi
33581        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33582      fi
33583    fi
33584
33585    # Now join together the path and the arguments once again
33586    if test "x$arguments" != xEOL; then
33587      new_complete="$new_path ${arguments% *}"
33588    else
33589      new_complete="$new_path"
33590    fi
33591
33592    if test "x$complete" != "x$new_complete"; then
33593      AR="$new_complete"
33594      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33595$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33596    fi
33597  fi
33598
33599
33600
33601  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33602
33603
33604  # Publish this variable in the help.
33605
33606
33607  if test "x$LIPO" = x; then
33608    # The variable is not set by user, try to locate tool using the code snippet
33609    for ac_prog in lipo
33610do
33611  # Extract the first word of "$ac_prog", so it can be a program name with args.
33612set dummy $ac_prog; ac_word=$2
33613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33614$as_echo_n "checking for $ac_word... " >&6; }
33615if ${ac_cv_path_LIPO+:} false; then :
33616  $as_echo_n "(cached) " >&6
33617else
33618  case $LIPO in
33619  [\\/]* | ?:[\\/]*)
33620  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33621  ;;
33622  *)
33623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33624for as_dir in $PATH
33625do
33626  IFS=$as_save_IFS
33627  test -z "$as_dir" && as_dir=.
33628    for ac_exec_ext in '' $ac_executable_extensions; do
33629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33630    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33632    break 2
33633  fi
33634done
33635  done
33636IFS=$as_save_IFS
33637
33638  ;;
33639esac
33640fi
33641LIPO=$ac_cv_path_LIPO
33642if test -n "$LIPO"; then
33643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33644$as_echo "$LIPO" >&6; }
33645else
33646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33647$as_echo "no" >&6; }
33648fi
33649
33650
33651  test -n "$LIPO" && break
33652done
33653
33654  else
33655    # The variable is set, but is it from the command line or the environment?
33656
33657    # Try to remove the string !LIPO! from our list.
33658    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33659    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33660      # If it failed, the variable was not from the command line. Ignore it,
33661      # but warn the user (except for BASH, which is always set by the calling BASH).
33662      if test "xLIPO" != xBASH; then
33663        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33664$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33665      fi
33666      # Try to locate tool using the code snippet
33667      for ac_prog in lipo
33668do
33669  # Extract the first word of "$ac_prog", so it can be a program name with args.
33670set dummy $ac_prog; ac_word=$2
33671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33672$as_echo_n "checking for $ac_word... " >&6; }
33673if ${ac_cv_path_LIPO+:} false; then :
33674  $as_echo_n "(cached) " >&6
33675else
33676  case $LIPO in
33677  [\\/]* | ?:[\\/]*)
33678  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33679  ;;
33680  *)
33681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33682for as_dir in $PATH
33683do
33684  IFS=$as_save_IFS
33685  test -z "$as_dir" && as_dir=.
33686    for ac_exec_ext in '' $ac_executable_extensions; do
33687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33688    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33690    break 2
33691  fi
33692done
33693  done
33694IFS=$as_save_IFS
33695
33696  ;;
33697esac
33698fi
33699LIPO=$ac_cv_path_LIPO
33700if test -n "$LIPO"; then
33701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33702$as_echo "$LIPO" >&6; }
33703else
33704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33705$as_echo "no" >&6; }
33706fi
33707
33708
33709  test -n "$LIPO" && break
33710done
33711
33712    else
33713      # If it succeeded, then it was overridden by the user. We will use it
33714      # for the tool.
33715
33716      # First remove it from the list of overridden variables, so we can test
33717      # for unknown variables in the end.
33718      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33719
33720      # Check if the provided tool contains a complete path.
33721      tool_specified="$LIPO"
33722      tool_basename="${tool_specified##*/}"
33723      if test "x$tool_basename" = "x$tool_specified"; then
33724        # A command without a complete path is provided, search $PATH.
33725        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33726$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33727        # Extract the first word of "$tool_basename", so it can be a program name with args.
33728set dummy $tool_basename; ac_word=$2
33729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33730$as_echo_n "checking for $ac_word... " >&6; }
33731if ${ac_cv_path_LIPO+:} false; then :
33732  $as_echo_n "(cached) " >&6
33733else
33734  case $LIPO in
33735  [\\/]* | ?:[\\/]*)
33736  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33737  ;;
33738  *)
33739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33740for as_dir in $PATH
33741do
33742  IFS=$as_save_IFS
33743  test -z "$as_dir" && as_dir=.
33744    for ac_exec_ext in '' $ac_executable_extensions; do
33745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33746    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33748    break 2
33749  fi
33750done
33751  done
33752IFS=$as_save_IFS
33753
33754  ;;
33755esac
33756fi
33757LIPO=$ac_cv_path_LIPO
33758if test -n "$LIPO"; then
33759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33760$as_echo "$LIPO" >&6; }
33761else
33762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33763$as_echo "no" >&6; }
33764fi
33765
33766
33767        if test "x$LIPO" = x; then
33768          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33769        fi
33770      else
33771        # Otherwise we believe it is a complete path. Use it as it is.
33772        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33773$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33774        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33775$as_echo_n "checking for LIPO... " >&6; }
33776        if test ! -x "$tool_specified"; then
33777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33778$as_echo "not found" >&6; }
33779          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33780        fi
33781        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33782$as_echo "$tool_specified" >&6; }
33783      fi
33784    fi
33785  fi
33786
33787
33788
33789  # Only process if variable expands to non-empty
33790
33791  if test "x$LIPO" != x; then
33792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33793
33794  # First separate the path from the arguments. This will split at the first
33795  # space.
33796  complete="$LIPO"
33797  path="${complete%% *}"
33798  tmp="$complete EOL"
33799  arguments="${tmp#* }"
33800
33801  # Input might be given as Windows format, start by converting to
33802  # unix format.
33803  new_path=`$CYGPATH -u "$path"`
33804
33805  # Now try to locate executable using which
33806  new_path=`$WHICH "$new_path" 2> /dev/null`
33807  # bat and cmd files are not always considered executable in cygwin causing which
33808  # to not find them
33809  if test "x$new_path" = x \
33810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33812    new_path=`$CYGPATH -u "$path"`
33813  fi
33814  if test "x$new_path" = x; then
33815    # Oops. Which didn't find the executable.
33816    # The splitting of arguments from the executable at a space might have been incorrect,
33817    # since paths with space are more likely in Windows. Give it another try with the whole
33818    # argument.
33819    path="$complete"
33820    arguments="EOL"
33821    new_path=`$CYGPATH -u "$path"`
33822    new_path=`$WHICH "$new_path" 2> /dev/null`
33823    # bat and cmd files are not always considered executable in cygwin causing which
33824    # to not find them
33825    if test "x$new_path" = x \
33826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33828      new_path=`$CYGPATH -u "$path"`
33829    fi
33830    if test "x$new_path" = x; then
33831      # It's still not found. Now this is an unrecoverable error.
33832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33833$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33834      has_space=`$ECHO "$complete" | $GREP " "`
33835      if test "x$has_space" != x; then
33836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33838      fi
33839      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33840    fi
33841  fi
33842
33843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33846  # "foo.exe" is OK but "foo" is an error.
33847  #
33848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33849  # It is also a way to make sure we got the proper file name for the real test later on.
33850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33851  if test "x$test_shortpath" = x; then
33852    # Short path failed, file does not exist as specified.
33853    # Try adding .exe or .cmd
33854    if test -f "${new_path}.exe"; then
33855      input_to_shortpath="${new_path}.exe"
33856    elif test -f "${new_path}.cmd"; then
33857      input_to_shortpath="${new_path}.cmd"
33858    else
33859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33860$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33863      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33864    fi
33865  else
33866    input_to_shortpath="$new_path"
33867  fi
33868
33869  # Call helper function which possibly converts this using DOS-style short mode.
33870  # If so, the updated path is stored in $new_path.
33871  new_path="$input_to_shortpath"
33872
33873  input_path="$input_to_shortpath"
33874  # Check if we need to convert this using DOS-style short mode. If the path
33875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33876  # take no chances and rewrite it.
33877  # Note: m4 eats our [], so we need to use [ and ] instead.
33878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33879  if test "x$has_forbidden_chars" != x; then
33880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33884      # Going to short mode and back again did indeed matter. Since short mode is
33885      # case insensitive, let's make it lowercase to improve readability.
33886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33887      # Now convert it back to Unix-style (cygpath)
33888      input_path=`$CYGPATH -u "$shortmode_path"`
33889      new_path="$input_path"
33890    fi
33891  fi
33892
33893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33894  if test "x$test_cygdrive_prefix" = x; then
33895    # As a simple fix, exclude /usr/bin since it's not a real path.
33896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33898      # a path prefixed by /cygdrive for fixpath to work.
33899      new_path="$CYGWIN_ROOT_PATH$input_path"
33900    fi
33901  fi
33902
33903  # remove trailing .exe if any
33904  new_path="${new_path/%.exe/}"
33905
33906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33907
33908  # First separate the path from the arguments. This will split at the first
33909  # space.
33910  complete="$LIPO"
33911  path="${complete%% *}"
33912  tmp="$complete EOL"
33913  arguments="${tmp#* }"
33914
33915  # Input might be given as Windows format, start by converting to
33916  # unix format.
33917  new_path="$path"
33918
33919  windows_path="$new_path"
33920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33921    unix_path=`$CYGPATH -u "$windows_path"`
33922    new_path="$unix_path"
33923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33925    new_path="$unix_path"
33926  fi
33927
33928
33929  # Now try to locate executable using which
33930  new_path=`$WHICH "$new_path" 2> /dev/null`
33931
33932  if test "x$new_path" = x; then
33933    # Oops. Which didn't find the executable.
33934    # The splitting of arguments from the executable at a space might have been incorrect,
33935    # since paths with space are more likely in Windows. Give it another try with the whole
33936    # argument.
33937    path="$complete"
33938    arguments="EOL"
33939    new_path="$path"
33940
33941  windows_path="$new_path"
33942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33943    unix_path=`$CYGPATH -u "$windows_path"`
33944    new_path="$unix_path"
33945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33947    new_path="$unix_path"
33948  fi
33949
33950
33951    new_path=`$WHICH "$new_path" 2> /dev/null`
33952    # bat and cmd files are not always considered executable in MSYS causing which
33953    # to not find them
33954    if test "x$new_path" = x \
33955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33957      new_path="$path"
33958
33959  windows_path="$new_path"
33960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33961    unix_path=`$CYGPATH -u "$windows_path"`
33962    new_path="$unix_path"
33963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33965    new_path="$unix_path"
33966  fi
33967
33968    fi
33969
33970    if test "x$new_path" = x; then
33971      # It's still not found. Now this is an unrecoverable error.
33972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33973$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33974      has_space=`$ECHO "$complete" | $GREP " "`
33975      if test "x$has_space" != x; then
33976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33978      fi
33979      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33980    fi
33981  fi
33982
33983  # Now new_path has a complete unix path to the binary
33984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33985    # Keep paths in /bin as-is, but remove trailing .exe if any
33986    new_path="${new_path/%.exe/}"
33987    # Do not save /bin paths to all_fixpath_prefixes!
33988  else
33989    # Not in mixed or Windows style, start by that.
33990    new_path=`cmd //c echo $new_path`
33991
33992  input_path="$new_path"
33993  # Check if we need to convert this using DOS-style short mode. If the path
33994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33995  # take no chances and rewrite it.
33996  # Note: m4 eats our [], so we need to use [ and ] instead.
33997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33998  if test "x$has_forbidden_chars" != x; then
33999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34001  fi
34002
34003    # Output is in $new_path
34004
34005  windows_path="$new_path"
34006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34007    unix_path=`$CYGPATH -u "$windows_path"`
34008    new_path="$unix_path"
34009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34011    new_path="$unix_path"
34012  fi
34013
34014    # remove trailing .exe if any
34015    new_path="${new_path/%.exe/}"
34016
34017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34019  fi
34020
34021    else
34022      # We're on a unix platform. Hooray! :)
34023      # First separate the path from the arguments. This will split at the first
34024      # space.
34025      complete="$LIPO"
34026      path="${complete%% *}"
34027      tmp="$complete EOL"
34028      arguments="${tmp#* }"
34029
34030      # Cannot rely on the command "which" here since it doesn't always work.
34031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34032      if test -z "$is_absolute_path"; then
34033        # Path to executable is not absolute. Find it.
34034        IFS_save="$IFS"
34035        IFS=:
34036        for p in $PATH; do
34037          if test -f "$p/$path" && test -x "$p/$path"; then
34038            new_path="$p/$path"
34039            break
34040          fi
34041        done
34042        IFS="$IFS_save"
34043      else
34044        # This is an absolute path, we can use it without further modifications.
34045        new_path="$path"
34046      fi
34047
34048      if test "x$new_path" = x; then
34049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
34050$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
34051        has_space=`$ECHO "$complete" | $GREP " "`
34052        if test "x$has_space" != x; then
34053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34055        fi
34056        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
34057      fi
34058    fi
34059
34060    # Now join together the path and the arguments once again
34061    if test "x$arguments" != xEOL; then
34062      new_complete="$new_path ${arguments% *}"
34063    else
34064      new_complete="$new_path"
34065    fi
34066
34067    if test "x$complete" != "x$new_complete"; then
34068      LIPO="$new_complete"
34069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
34070$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
34071    fi
34072  fi
34073
34074  fi
34075
34076  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34077    # Extract the first word of "mt", so it can be a program name with args.
34078set dummy mt; ac_word=$2
34079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34080$as_echo_n "checking for $ac_word... " >&6; }
34081if ${ac_cv_prog_MT+:} false; then :
34082  $as_echo_n "(cached) " >&6
34083else
34084  if test -n "$MT"; then
34085  ac_cv_prog_MT="$MT" # Let the user override the test.
34086else
34087  ac_prog_rejected=no
34088as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34089for as_dir in $PATH
34090do
34091  IFS=$as_save_IFS
34092  test -z "$as_dir" && as_dir=.
34093    for ac_exec_ext in '' $ac_executable_extensions; do
34094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34095    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34096       ac_prog_rejected=yes
34097       continue
34098     fi
34099    ac_cv_prog_MT="mt"
34100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34101    break 2
34102  fi
34103done
34104  done
34105IFS=$as_save_IFS
34106
34107if test $ac_prog_rejected = yes; then
34108  # We found a bogon in the path, so make sure we never use it.
34109  set dummy $ac_cv_prog_MT
34110  shift
34111  if test $# != 0; then
34112    # We chose a different compiler from the bogus one.
34113    # However, it has the same basename, so the bogon will be chosen
34114    # first if we set MT to just the basename; use the full file name.
34115    shift
34116    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34117  fi
34118fi
34119fi
34120fi
34121MT=$ac_cv_prog_MT
34122if test -n "$MT"; then
34123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34124$as_echo "$MT" >&6; }
34125else
34126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34127$as_echo "no" >&6; }
34128fi
34129
34130
34131
34132  # Only process if variable expands to non-empty
34133
34134  if test "x$MT" != x; then
34135    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34136
34137  # First separate the path from the arguments. This will split at the first
34138  # space.
34139  complete="$MT"
34140  path="${complete%% *}"
34141  tmp="$complete EOL"
34142  arguments="${tmp#* }"
34143
34144  # Input might be given as Windows format, start by converting to
34145  # unix format.
34146  new_path=`$CYGPATH -u "$path"`
34147
34148  # Now try to locate executable using which
34149  new_path=`$WHICH "$new_path" 2> /dev/null`
34150  # bat and cmd files are not always considered executable in cygwin causing which
34151  # to not find them
34152  if test "x$new_path" = x \
34153      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34154      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34155    new_path=`$CYGPATH -u "$path"`
34156  fi
34157  if test "x$new_path" = x; then
34158    # Oops. Which didn't find the executable.
34159    # The splitting of arguments from the executable at a space might have been incorrect,
34160    # since paths with space are more likely in Windows. Give it another try with the whole
34161    # argument.
34162    path="$complete"
34163    arguments="EOL"
34164    new_path=`$CYGPATH -u "$path"`
34165    new_path=`$WHICH "$new_path" 2> /dev/null`
34166    # bat and cmd files are not always considered executable in cygwin causing which
34167    # to not find them
34168    if test "x$new_path" = x \
34169        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34170        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34171      new_path=`$CYGPATH -u "$path"`
34172    fi
34173    if test "x$new_path" = x; then
34174      # It's still not found. Now this is an unrecoverable error.
34175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34176$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34177      has_space=`$ECHO "$complete" | $GREP " "`
34178      if test "x$has_space" != x; then
34179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34181      fi
34182      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34183    fi
34184  fi
34185
34186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34189  # "foo.exe" is OK but "foo" is an error.
34190  #
34191  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34192  # It is also a way to make sure we got the proper file name for the real test later on.
34193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34194  if test "x$test_shortpath" = x; then
34195    # Short path failed, file does not exist as specified.
34196    # Try adding .exe or .cmd
34197    if test -f "${new_path}.exe"; then
34198      input_to_shortpath="${new_path}.exe"
34199    elif test -f "${new_path}.cmd"; then
34200      input_to_shortpath="${new_path}.cmd"
34201    else
34202      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34203$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34204      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34205$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34206      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34207    fi
34208  else
34209    input_to_shortpath="$new_path"
34210  fi
34211
34212  # Call helper function which possibly converts this using DOS-style short mode.
34213  # If so, the updated path is stored in $new_path.
34214  new_path="$input_to_shortpath"
34215
34216  input_path="$input_to_shortpath"
34217  # Check if we need to convert this using DOS-style short mode. If the path
34218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34219  # take no chances and rewrite it.
34220  # Note: m4 eats our [], so we need to use [ and ] instead.
34221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34222  if test "x$has_forbidden_chars" != x; then
34223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34224    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34225    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34226    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34227      # Going to short mode and back again did indeed matter. Since short mode is
34228      # case insensitive, let's make it lowercase to improve readability.
34229      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34230      # Now convert it back to Unix-style (cygpath)
34231      input_path=`$CYGPATH -u "$shortmode_path"`
34232      new_path="$input_path"
34233    fi
34234  fi
34235
34236  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34237  if test "x$test_cygdrive_prefix" = x; then
34238    # As a simple fix, exclude /usr/bin since it's not a real path.
34239    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34240      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34241      # a path prefixed by /cygdrive for fixpath to work.
34242      new_path="$CYGWIN_ROOT_PATH$input_path"
34243    fi
34244  fi
34245
34246  # remove trailing .exe if any
34247  new_path="${new_path/%.exe/}"
34248
34249    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34250
34251  # First separate the path from the arguments. This will split at the first
34252  # space.
34253  complete="$MT"
34254  path="${complete%% *}"
34255  tmp="$complete EOL"
34256  arguments="${tmp#* }"
34257
34258  # Input might be given as Windows format, start by converting to
34259  # unix format.
34260  new_path="$path"
34261
34262  windows_path="$new_path"
34263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34264    unix_path=`$CYGPATH -u "$windows_path"`
34265    new_path="$unix_path"
34266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34268    new_path="$unix_path"
34269  fi
34270
34271
34272  # Now try to locate executable using which
34273  new_path=`$WHICH "$new_path" 2> /dev/null`
34274
34275  if test "x$new_path" = x; then
34276    # Oops. Which didn't find the executable.
34277    # The splitting of arguments from the executable at a space might have been incorrect,
34278    # since paths with space are more likely in Windows. Give it another try with the whole
34279    # argument.
34280    path="$complete"
34281    arguments="EOL"
34282    new_path="$path"
34283
34284  windows_path="$new_path"
34285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34286    unix_path=`$CYGPATH -u "$windows_path"`
34287    new_path="$unix_path"
34288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34290    new_path="$unix_path"
34291  fi
34292
34293
34294    new_path=`$WHICH "$new_path" 2> /dev/null`
34295    # bat and cmd files are not always considered executable in MSYS causing which
34296    # to not find them
34297    if test "x$new_path" = x \
34298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34300      new_path="$path"
34301
34302  windows_path="$new_path"
34303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34304    unix_path=`$CYGPATH -u "$windows_path"`
34305    new_path="$unix_path"
34306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34308    new_path="$unix_path"
34309  fi
34310
34311    fi
34312
34313    if test "x$new_path" = x; then
34314      # It's still not found. Now this is an unrecoverable error.
34315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34316$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34317      has_space=`$ECHO "$complete" | $GREP " "`
34318      if test "x$has_space" != x; then
34319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34321      fi
34322      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34323    fi
34324  fi
34325
34326  # Now new_path has a complete unix path to the binary
34327  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34328    # Keep paths in /bin as-is, but remove trailing .exe if any
34329    new_path="${new_path/%.exe/}"
34330    # Do not save /bin paths to all_fixpath_prefixes!
34331  else
34332    # Not in mixed or Windows style, start by that.
34333    new_path=`cmd //c echo $new_path`
34334
34335  input_path="$new_path"
34336  # Check if we need to convert this using DOS-style short mode. If the path
34337  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34338  # take no chances and rewrite it.
34339  # Note: m4 eats our [], so we need to use [ and ] instead.
34340  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34341  if test "x$has_forbidden_chars" != x; then
34342    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34343    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34344  fi
34345
34346    # Output is in $new_path
34347
34348  windows_path="$new_path"
34349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34350    unix_path=`$CYGPATH -u "$windows_path"`
34351    new_path="$unix_path"
34352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34354    new_path="$unix_path"
34355  fi
34356
34357    # remove trailing .exe if any
34358    new_path="${new_path/%.exe/}"
34359
34360    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34361    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34362  fi
34363
34364    else
34365      # We're on a unix platform. Hooray! :)
34366      # First separate the path from the arguments. This will split at the first
34367      # space.
34368      complete="$MT"
34369      path="${complete%% *}"
34370      tmp="$complete EOL"
34371      arguments="${tmp#* }"
34372
34373      # Cannot rely on the command "which" here since it doesn't always work.
34374      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34375      if test -z "$is_absolute_path"; then
34376        # Path to executable is not absolute. Find it.
34377        IFS_save="$IFS"
34378        IFS=:
34379        for p in $PATH; do
34380          if test -f "$p/$path" && test -x "$p/$path"; then
34381            new_path="$p/$path"
34382            break
34383          fi
34384        done
34385        IFS="$IFS_save"
34386      else
34387        # This is an absolute path, we can use it without further modifications.
34388        new_path="$path"
34389      fi
34390
34391      if test "x$new_path" = x; then
34392        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34393$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34394        has_space=`$ECHO "$complete" | $GREP " "`
34395        if test "x$has_space" != x; then
34396          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34397$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34398        fi
34399        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34400      fi
34401    fi
34402
34403    # Now join together the path and the arguments once again
34404    if test "x$arguments" != xEOL; then
34405      new_complete="$new_path ${arguments% *}"
34406    else
34407      new_complete="$new_path"
34408    fi
34409
34410    if test "x$complete" != "x$new_complete"; then
34411      MT="$new_complete"
34412      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34413$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34414    fi
34415  fi
34416
34417    # Setup the resource compiler (RC)
34418    # Extract the first word of "rc", so it can be a program name with args.
34419set dummy rc; ac_word=$2
34420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34421$as_echo_n "checking for $ac_word... " >&6; }
34422if ${ac_cv_prog_RC+:} false; then :
34423  $as_echo_n "(cached) " >&6
34424else
34425  if test -n "$RC"; then
34426  ac_cv_prog_RC="$RC" # Let the user override the test.
34427else
34428  ac_prog_rejected=no
34429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34430for as_dir in $PATH
34431do
34432  IFS=$as_save_IFS
34433  test -z "$as_dir" && as_dir=.
34434    for ac_exec_ext in '' $ac_executable_extensions; do
34435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34436    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34437       ac_prog_rejected=yes
34438       continue
34439     fi
34440    ac_cv_prog_RC="rc"
34441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34442    break 2
34443  fi
34444done
34445  done
34446IFS=$as_save_IFS
34447
34448if test $ac_prog_rejected = yes; then
34449  # We found a bogon in the path, so make sure we never use it.
34450  set dummy $ac_cv_prog_RC
34451  shift
34452  if test $# != 0; then
34453    # We chose a different compiler from the bogus one.
34454    # However, it has the same basename, so the bogon will be chosen
34455    # first if we set RC to just the basename; use the full file name.
34456    shift
34457    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34458  fi
34459fi
34460fi
34461fi
34462RC=$ac_cv_prog_RC
34463if test -n "$RC"; then
34464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34465$as_echo "$RC" >&6; }
34466else
34467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34468$as_echo "no" >&6; }
34469fi
34470
34471
34472
34473  # Only process if variable expands to non-empty
34474
34475  if test "x$RC" != x; then
34476    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34477
34478  # First separate the path from the arguments. This will split at the first
34479  # space.
34480  complete="$RC"
34481  path="${complete%% *}"
34482  tmp="$complete EOL"
34483  arguments="${tmp#* }"
34484
34485  # Input might be given as Windows format, start by converting to
34486  # unix format.
34487  new_path=`$CYGPATH -u "$path"`
34488
34489  # Now try to locate executable using which
34490  new_path=`$WHICH "$new_path" 2> /dev/null`
34491  # bat and cmd files are not always considered executable in cygwin causing which
34492  # to not find them
34493  if test "x$new_path" = x \
34494      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34495      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34496    new_path=`$CYGPATH -u "$path"`
34497  fi
34498  if test "x$new_path" = x; then
34499    # Oops. Which didn't find the executable.
34500    # The splitting of arguments from the executable at a space might have been incorrect,
34501    # since paths with space are more likely in Windows. Give it another try with the whole
34502    # argument.
34503    path="$complete"
34504    arguments="EOL"
34505    new_path=`$CYGPATH -u "$path"`
34506    new_path=`$WHICH "$new_path" 2> /dev/null`
34507    # bat and cmd files are not always considered executable in cygwin causing which
34508    # to not find them
34509    if test "x$new_path" = x \
34510        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34511        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34512      new_path=`$CYGPATH -u "$path"`
34513    fi
34514    if test "x$new_path" = x; then
34515      # It's still not found. Now this is an unrecoverable error.
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34517$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34518      has_space=`$ECHO "$complete" | $GREP " "`
34519      if test "x$has_space" != x; then
34520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34522      fi
34523      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34524    fi
34525  fi
34526
34527  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34528  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34529  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34530  # "foo.exe" is OK but "foo" is an error.
34531  #
34532  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34533  # It is also a way to make sure we got the proper file name for the real test later on.
34534  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34535  if test "x$test_shortpath" = x; then
34536    # Short path failed, file does not exist as specified.
34537    # Try adding .exe or .cmd
34538    if test -f "${new_path}.exe"; then
34539      input_to_shortpath="${new_path}.exe"
34540    elif test -f "${new_path}.cmd"; then
34541      input_to_shortpath="${new_path}.cmd"
34542    else
34543      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34544$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34545      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34546$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34547      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34548    fi
34549  else
34550    input_to_shortpath="$new_path"
34551  fi
34552
34553  # Call helper function which possibly converts this using DOS-style short mode.
34554  # If so, the updated path is stored in $new_path.
34555  new_path="$input_to_shortpath"
34556
34557  input_path="$input_to_shortpath"
34558  # Check if we need to convert this using DOS-style short mode. If the path
34559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34560  # take no chances and rewrite it.
34561  # Note: m4 eats our [], so we need to use [ and ] instead.
34562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34563  if test "x$has_forbidden_chars" != x; then
34564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34568      # Going to short mode and back again did indeed matter. Since short mode is
34569      # case insensitive, let's make it lowercase to improve readability.
34570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34571      # Now convert it back to Unix-style (cygpath)
34572      input_path=`$CYGPATH -u "$shortmode_path"`
34573      new_path="$input_path"
34574    fi
34575  fi
34576
34577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34578  if test "x$test_cygdrive_prefix" = x; then
34579    # As a simple fix, exclude /usr/bin since it's not a real path.
34580    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34582      # a path prefixed by /cygdrive for fixpath to work.
34583      new_path="$CYGWIN_ROOT_PATH$input_path"
34584    fi
34585  fi
34586
34587  # remove trailing .exe if any
34588  new_path="${new_path/%.exe/}"
34589
34590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34591
34592  # First separate the path from the arguments. This will split at the first
34593  # space.
34594  complete="$RC"
34595  path="${complete%% *}"
34596  tmp="$complete EOL"
34597  arguments="${tmp#* }"
34598
34599  # Input might be given as Windows format, start by converting to
34600  # unix format.
34601  new_path="$path"
34602
34603  windows_path="$new_path"
34604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34605    unix_path=`$CYGPATH -u "$windows_path"`
34606    new_path="$unix_path"
34607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34609    new_path="$unix_path"
34610  fi
34611
34612
34613  # Now try to locate executable using which
34614  new_path=`$WHICH "$new_path" 2> /dev/null`
34615
34616  if test "x$new_path" = x; then
34617    # Oops. Which didn't find the executable.
34618    # The splitting of arguments from the executable at a space might have been incorrect,
34619    # since paths with space are more likely in Windows. Give it another try with the whole
34620    # argument.
34621    path="$complete"
34622    arguments="EOL"
34623    new_path="$path"
34624
34625  windows_path="$new_path"
34626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34627    unix_path=`$CYGPATH -u "$windows_path"`
34628    new_path="$unix_path"
34629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34631    new_path="$unix_path"
34632  fi
34633
34634
34635    new_path=`$WHICH "$new_path" 2> /dev/null`
34636    # bat and cmd files are not always considered executable in MSYS causing which
34637    # to not find them
34638    if test "x$new_path" = x \
34639        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34640        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34641      new_path="$path"
34642
34643  windows_path="$new_path"
34644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34645    unix_path=`$CYGPATH -u "$windows_path"`
34646    new_path="$unix_path"
34647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34649    new_path="$unix_path"
34650  fi
34651
34652    fi
34653
34654    if test "x$new_path" = x; then
34655      # It's still not found. Now this is an unrecoverable error.
34656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34657$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34658      has_space=`$ECHO "$complete" | $GREP " "`
34659      if test "x$has_space" != x; then
34660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34662      fi
34663      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34664    fi
34665  fi
34666
34667  # Now new_path has a complete unix path to the binary
34668  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34669    # Keep paths in /bin as-is, but remove trailing .exe if any
34670    new_path="${new_path/%.exe/}"
34671    # Do not save /bin paths to all_fixpath_prefixes!
34672  else
34673    # Not in mixed or Windows style, start by that.
34674    new_path=`cmd //c echo $new_path`
34675
34676  input_path="$new_path"
34677  # Check if we need to convert this using DOS-style short mode. If the path
34678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34679  # take no chances and rewrite it.
34680  # Note: m4 eats our [], so we need to use [ and ] instead.
34681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34682  if test "x$has_forbidden_chars" != x; then
34683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34685  fi
34686
34687    # Output is in $new_path
34688
34689  windows_path="$new_path"
34690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34691    unix_path=`$CYGPATH -u "$windows_path"`
34692    new_path="$unix_path"
34693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34695    new_path="$unix_path"
34696  fi
34697
34698    # remove trailing .exe if any
34699    new_path="${new_path/%.exe/}"
34700
34701    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34702    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34703  fi
34704
34705    else
34706      # We're on a unix platform. Hooray! :)
34707      # First separate the path from the arguments. This will split at the first
34708      # space.
34709      complete="$RC"
34710      path="${complete%% *}"
34711      tmp="$complete EOL"
34712      arguments="${tmp#* }"
34713
34714      # Cannot rely on the command "which" here since it doesn't always work.
34715      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34716      if test -z "$is_absolute_path"; then
34717        # Path to executable is not absolute. Find it.
34718        IFS_save="$IFS"
34719        IFS=:
34720        for p in $PATH; do
34721          if test -f "$p/$path" && test -x "$p/$path"; then
34722            new_path="$p/$path"
34723            break
34724          fi
34725        done
34726        IFS="$IFS_save"
34727      else
34728        # This is an absolute path, we can use it without further modifications.
34729        new_path="$path"
34730      fi
34731
34732      if test "x$new_path" = x; then
34733        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34734$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34735        has_space=`$ECHO "$complete" | $GREP " "`
34736        if test "x$has_space" != x; then
34737          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34738$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34739        fi
34740        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34741      fi
34742    fi
34743
34744    # Now join together the path and the arguments once again
34745    if test "x$arguments" != xEOL; then
34746      new_complete="$new_path ${arguments% *}"
34747    else
34748      new_complete="$new_path"
34749    fi
34750
34751    if test "x$complete" != "x$new_complete"; then
34752      RC="$new_complete"
34753      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34754$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34755    fi
34756  fi
34757
34758    # Extract the first word of "dumpbin", so it can be a program name with args.
34759set dummy dumpbin; ac_word=$2
34760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34761$as_echo_n "checking for $ac_word... " >&6; }
34762if ${ac_cv_prog_DUMPBIN+:} false; then :
34763  $as_echo_n "(cached) " >&6
34764else
34765  if test -n "$DUMPBIN"; then
34766  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34767else
34768as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34769for as_dir in $PATH
34770do
34771  IFS=$as_save_IFS
34772  test -z "$as_dir" && as_dir=.
34773    for ac_exec_ext in '' $ac_executable_extensions; do
34774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34775    ac_cv_prog_DUMPBIN="dumpbin"
34776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34777    break 2
34778  fi
34779done
34780  done
34781IFS=$as_save_IFS
34782
34783fi
34784fi
34785DUMPBIN=$ac_cv_prog_DUMPBIN
34786if test -n "$DUMPBIN"; then
34787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34788$as_echo "$DUMPBIN" >&6; }
34789else
34790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34791$as_echo "no" >&6; }
34792fi
34793
34794
34795
34796  # Only process if variable expands to non-empty
34797
34798  if test "x$DUMPBIN" != x; then
34799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34800
34801  # First separate the path from the arguments. This will split at the first
34802  # space.
34803  complete="$DUMPBIN"
34804  path="${complete%% *}"
34805  tmp="$complete EOL"
34806  arguments="${tmp#* }"
34807
34808  # Input might be given as Windows format, start by converting to
34809  # unix format.
34810  new_path=`$CYGPATH -u "$path"`
34811
34812  # Now try to locate executable using which
34813  new_path=`$WHICH "$new_path" 2> /dev/null`
34814  # bat and cmd files are not always considered executable in cygwin causing which
34815  # to not find them
34816  if test "x$new_path" = x \
34817      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34818      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34819    new_path=`$CYGPATH -u "$path"`
34820  fi
34821  if test "x$new_path" = x; then
34822    # Oops. Which didn't find the executable.
34823    # The splitting of arguments from the executable at a space might have been incorrect,
34824    # since paths with space are more likely in Windows. Give it another try with the whole
34825    # argument.
34826    path="$complete"
34827    arguments="EOL"
34828    new_path=`$CYGPATH -u "$path"`
34829    new_path=`$WHICH "$new_path" 2> /dev/null`
34830    # bat and cmd files are not always considered executable in cygwin causing which
34831    # to not find them
34832    if test "x$new_path" = x \
34833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34835      new_path=`$CYGPATH -u "$path"`
34836    fi
34837    if test "x$new_path" = x; then
34838      # It's still not found. Now this is an unrecoverable error.
34839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34840$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34841      has_space=`$ECHO "$complete" | $GREP " "`
34842      if test "x$has_space" != x; then
34843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34845      fi
34846      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34847    fi
34848  fi
34849
34850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34853  # "foo.exe" is OK but "foo" is an error.
34854  #
34855  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34856  # It is also a way to make sure we got the proper file name for the real test later on.
34857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34858  if test "x$test_shortpath" = x; then
34859    # Short path failed, file does not exist as specified.
34860    # Try adding .exe or .cmd
34861    if test -f "${new_path}.exe"; then
34862      input_to_shortpath="${new_path}.exe"
34863    elif test -f "${new_path}.cmd"; then
34864      input_to_shortpath="${new_path}.cmd"
34865    else
34866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34867$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34870      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34871    fi
34872  else
34873    input_to_shortpath="$new_path"
34874  fi
34875
34876  # Call helper function which possibly converts this using DOS-style short mode.
34877  # If so, the updated path is stored in $new_path.
34878  new_path="$input_to_shortpath"
34879
34880  input_path="$input_to_shortpath"
34881  # Check if we need to convert this using DOS-style short mode. If the path
34882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34883  # take no chances and rewrite it.
34884  # Note: m4 eats our [], so we need to use [ and ] instead.
34885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34886  if test "x$has_forbidden_chars" != x; then
34887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34891      # Going to short mode and back again did indeed matter. Since short mode is
34892      # case insensitive, let's make it lowercase to improve readability.
34893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34894      # Now convert it back to Unix-style (cygpath)
34895      input_path=`$CYGPATH -u "$shortmode_path"`
34896      new_path="$input_path"
34897    fi
34898  fi
34899
34900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34901  if test "x$test_cygdrive_prefix" = x; then
34902    # As a simple fix, exclude /usr/bin since it's not a real path.
34903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34905      # a path prefixed by /cygdrive for fixpath to work.
34906      new_path="$CYGWIN_ROOT_PATH$input_path"
34907    fi
34908  fi
34909
34910  # remove trailing .exe if any
34911  new_path="${new_path/%.exe/}"
34912
34913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34914
34915  # First separate the path from the arguments. This will split at the first
34916  # space.
34917  complete="$DUMPBIN"
34918  path="${complete%% *}"
34919  tmp="$complete EOL"
34920  arguments="${tmp#* }"
34921
34922  # Input might be given as Windows format, start by converting to
34923  # unix format.
34924  new_path="$path"
34925
34926  windows_path="$new_path"
34927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34928    unix_path=`$CYGPATH -u "$windows_path"`
34929    new_path="$unix_path"
34930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34932    new_path="$unix_path"
34933  fi
34934
34935
34936  # Now try to locate executable using which
34937  new_path=`$WHICH "$new_path" 2> /dev/null`
34938
34939  if test "x$new_path" = x; then
34940    # Oops. Which didn't find the executable.
34941    # The splitting of arguments from the executable at a space might have been incorrect,
34942    # since paths with space are more likely in Windows. Give it another try with the whole
34943    # argument.
34944    path="$complete"
34945    arguments="EOL"
34946    new_path="$path"
34947
34948  windows_path="$new_path"
34949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34950    unix_path=`$CYGPATH -u "$windows_path"`
34951    new_path="$unix_path"
34952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34954    new_path="$unix_path"
34955  fi
34956
34957
34958    new_path=`$WHICH "$new_path" 2> /dev/null`
34959    # bat and cmd files are not always considered executable in MSYS causing which
34960    # to not find them
34961    if test "x$new_path" = x \
34962        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34963        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34964      new_path="$path"
34965
34966  windows_path="$new_path"
34967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34968    unix_path=`$CYGPATH -u "$windows_path"`
34969    new_path="$unix_path"
34970  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34971    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34972    new_path="$unix_path"
34973  fi
34974
34975    fi
34976
34977    if test "x$new_path" = x; then
34978      # It's still not found. Now this is an unrecoverable error.
34979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34980$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34981      has_space=`$ECHO "$complete" | $GREP " "`
34982      if test "x$has_space" != x; then
34983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34985      fi
34986      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34987    fi
34988  fi
34989
34990  # Now new_path has a complete unix path to the binary
34991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34992    # Keep paths in /bin as-is, but remove trailing .exe if any
34993    new_path="${new_path/%.exe/}"
34994    # Do not save /bin paths to all_fixpath_prefixes!
34995  else
34996    # Not in mixed or Windows style, start by that.
34997    new_path=`cmd //c echo $new_path`
34998
34999  input_path="$new_path"
35000  # Check if we need to convert this using DOS-style short mode. If the path
35001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35002  # take no chances and rewrite it.
35003  # Note: m4 eats our [], so we need to use [ and ] instead.
35004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35005  if test "x$has_forbidden_chars" != x; then
35006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35008  fi
35009
35010    # Output is in $new_path
35011
35012  windows_path="$new_path"
35013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35014    unix_path=`$CYGPATH -u "$windows_path"`
35015    new_path="$unix_path"
35016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35018    new_path="$unix_path"
35019  fi
35020
35021    # remove trailing .exe if any
35022    new_path="${new_path/%.exe/}"
35023
35024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35026  fi
35027
35028    else
35029      # We're on a unix platform. Hooray! :)
35030      # First separate the path from the arguments. This will split at the first
35031      # space.
35032      complete="$DUMPBIN"
35033      path="${complete%% *}"
35034      tmp="$complete EOL"
35035      arguments="${tmp#* }"
35036
35037      # Cannot rely on the command "which" here since it doesn't always work.
35038      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35039      if test -z "$is_absolute_path"; then
35040        # Path to executable is not absolute. Find it.
35041        IFS_save="$IFS"
35042        IFS=:
35043        for p in $PATH; do
35044          if test -f "$p/$path" && test -x "$p/$path"; then
35045            new_path="$p/$path"
35046            break
35047          fi
35048        done
35049        IFS="$IFS_save"
35050      else
35051        # This is an absolute path, we can use it without further modifications.
35052        new_path="$path"
35053      fi
35054
35055      if test "x$new_path" = x; then
35056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
35057$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
35058        has_space=`$ECHO "$complete" | $GREP " "`
35059        if test "x$has_space" != x; then
35060          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35062        fi
35063        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
35064      fi
35065    fi
35066
35067    # Now join together the path and the arguments once again
35068    if test "x$arguments" != xEOL; then
35069      new_complete="$new_path ${arguments% *}"
35070    else
35071      new_complete="$new_path"
35072    fi
35073
35074    if test "x$complete" != "x$new_complete"; then
35075      DUMPBIN="$new_complete"
35076      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
35077$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
35078    fi
35079  fi
35080
35081    # We need to check for 'msbuild.exe' because at the place where we expect to
35082    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35083    # won't find the 'msbuild.exe' executable in that case (and the
35084    # 'ac_executable_extensions' is unusable due to performance reasons).
35085    # Notice that we intentionally don't fix up the path to MSBUILD because we
35086    # will call it in a DOS shell during freetype detection on Windows (see
35087    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35088    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35089set dummy msbuild.exe; ac_word=$2
35090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35091$as_echo_n "checking for $ac_word... " >&6; }
35092if ${ac_cv_prog_MSBUILD+:} false; then :
35093  $as_echo_n "(cached) " >&6
35094else
35095  if test -n "$MSBUILD"; then
35096  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35097else
35098as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35099for as_dir in $PATH
35100do
35101  IFS=$as_save_IFS
35102  test -z "$as_dir" && as_dir=.
35103    for ac_exec_ext in '' $ac_executable_extensions; do
35104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35105    ac_cv_prog_MSBUILD="msbuild.exe"
35106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35107    break 2
35108  fi
35109done
35110  done
35111IFS=$as_save_IFS
35112
35113fi
35114fi
35115MSBUILD=$ac_cv_prog_MSBUILD
35116if test -n "$MSBUILD"; then
35117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35118$as_echo "$MSBUILD" >&6; }
35119else
35120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35121$as_echo "no" >&6; }
35122fi
35123
35124
35125  fi
35126
35127  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35128
35129
35130  # Publish this variable in the help.
35131
35132
35133  if test "x$STRIP" = x; then
35134    # The variable is not set by user, try to locate tool using the code snippet
35135    for ac_prog in strip
35136do
35137  # Extract the first word of "$ac_prog", so it can be a program name with args.
35138set dummy $ac_prog; ac_word=$2
35139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35140$as_echo_n "checking for $ac_word... " >&6; }
35141if ${ac_cv_path_STRIP+:} false; then :
35142  $as_echo_n "(cached) " >&6
35143else
35144  case $STRIP in
35145  [\\/]* | ?:[\\/]*)
35146  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35147  ;;
35148  *)
35149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35150for as_dir in $PATH
35151do
35152  IFS=$as_save_IFS
35153  test -z "$as_dir" && as_dir=.
35154    for ac_exec_ext in '' $ac_executable_extensions; do
35155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35156    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35158    break 2
35159  fi
35160done
35161  done
35162IFS=$as_save_IFS
35163
35164  ;;
35165esac
35166fi
35167STRIP=$ac_cv_path_STRIP
35168if test -n "$STRIP"; then
35169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35170$as_echo "$STRIP" >&6; }
35171else
35172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35173$as_echo "no" >&6; }
35174fi
35175
35176
35177  test -n "$STRIP" && break
35178done
35179
35180  else
35181    # The variable is set, but is it from the command line or the environment?
35182
35183    # Try to remove the string !STRIP! from our list.
35184    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35185    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35186      # If it failed, the variable was not from the command line. Ignore it,
35187      # but warn the user (except for BASH, which is always set by the calling BASH).
35188      if test "xSTRIP" != xBASH; then
35189        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35190$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35191      fi
35192      # Try to locate tool using the code snippet
35193      for ac_prog in strip
35194do
35195  # Extract the first word of "$ac_prog", so it can be a program name with args.
35196set dummy $ac_prog; ac_word=$2
35197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35198$as_echo_n "checking for $ac_word... " >&6; }
35199if ${ac_cv_path_STRIP+:} false; then :
35200  $as_echo_n "(cached) " >&6
35201else
35202  case $STRIP in
35203  [\\/]* | ?:[\\/]*)
35204  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35205  ;;
35206  *)
35207  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35208for as_dir in $PATH
35209do
35210  IFS=$as_save_IFS
35211  test -z "$as_dir" && as_dir=.
35212    for ac_exec_ext in '' $ac_executable_extensions; do
35213  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35214    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35215    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35216    break 2
35217  fi
35218done
35219  done
35220IFS=$as_save_IFS
35221
35222  ;;
35223esac
35224fi
35225STRIP=$ac_cv_path_STRIP
35226if test -n "$STRIP"; then
35227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35228$as_echo "$STRIP" >&6; }
35229else
35230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35231$as_echo "no" >&6; }
35232fi
35233
35234
35235  test -n "$STRIP" && break
35236done
35237
35238    else
35239      # If it succeeded, then it was overridden by the user. We will use it
35240      # for the tool.
35241
35242      # First remove it from the list of overridden variables, so we can test
35243      # for unknown variables in the end.
35244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35245
35246      # Check if the provided tool contains a complete path.
35247      tool_specified="$STRIP"
35248      tool_basename="${tool_specified##*/}"
35249      if test "x$tool_basename" = "x$tool_specified"; then
35250        # A command without a complete path is provided, search $PATH.
35251        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35252$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35253        # Extract the first word of "$tool_basename", so it can be a program name with args.
35254set dummy $tool_basename; ac_word=$2
35255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35256$as_echo_n "checking for $ac_word... " >&6; }
35257if ${ac_cv_path_STRIP+:} false; then :
35258  $as_echo_n "(cached) " >&6
35259else
35260  case $STRIP in
35261  [\\/]* | ?:[\\/]*)
35262  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35263  ;;
35264  *)
35265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35266for as_dir in $PATH
35267do
35268  IFS=$as_save_IFS
35269  test -z "$as_dir" && as_dir=.
35270    for ac_exec_ext in '' $ac_executable_extensions; do
35271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35272    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35274    break 2
35275  fi
35276done
35277  done
35278IFS=$as_save_IFS
35279
35280  ;;
35281esac
35282fi
35283STRIP=$ac_cv_path_STRIP
35284if test -n "$STRIP"; then
35285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35286$as_echo "$STRIP" >&6; }
35287else
35288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35289$as_echo "no" >&6; }
35290fi
35291
35292
35293        if test "x$STRIP" = x; then
35294          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35295        fi
35296      else
35297        # Otherwise we believe it is a complete path. Use it as it is.
35298        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35299$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35301$as_echo_n "checking for STRIP... " >&6; }
35302        if test ! -x "$tool_specified"; then
35303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35304$as_echo "not found" >&6; }
35305          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35306        fi
35307        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35308$as_echo "$tool_specified" >&6; }
35309      fi
35310    fi
35311  fi
35312
35313
35314
35315  # Only process if variable expands to non-empty
35316
35317  if test "x$STRIP" != x; then
35318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35319
35320  # First separate the path from the arguments. This will split at the first
35321  # space.
35322  complete="$STRIP"
35323  path="${complete%% *}"
35324  tmp="$complete EOL"
35325  arguments="${tmp#* }"
35326
35327  # Input might be given as Windows format, start by converting to
35328  # unix format.
35329  new_path=`$CYGPATH -u "$path"`
35330
35331  # Now try to locate executable using which
35332  new_path=`$WHICH "$new_path" 2> /dev/null`
35333  # bat and cmd files are not always considered executable in cygwin causing which
35334  # to not find them
35335  if test "x$new_path" = x \
35336      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35337      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35338    new_path=`$CYGPATH -u "$path"`
35339  fi
35340  if test "x$new_path" = x; then
35341    # Oops. Which didn't find the executable.
35342    # The splitting of arguments from the executable at a space might have been incorrect,
35343    # since paths with space are more likely in Windows. Give it another try with the whole
35344    # argument.
35345    path="$complete"
35346    arguments="EOL"
35347    new_path=`$CYGPATH -u "$path"`
35348    new_path=`$WHICH "$new_path" 2> /dev/null`
35349    # bat and cmd files are not always considered executable in cygwin causing which
35350    # to not find them
35351    if test "x$new_path" = x \
35352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35354      new_path=`$CYGPATH -u "$path"`
35355    fi
35356    if test "x$new_path" = x; then
35357      # It's still not found. Now this is an unrecoverable error.
35358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35359$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35360      has_space=`$ECHO "$complete" | $GREP " "`
35361      if test "x$has_space" != x; then
35362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35364      fi
35365      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35366    fi
35367  fi
35368
35369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35372  # "foo.exe" is OK but "foo" is an error.
35373  #
35374  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35375  # It is also a way to make sure we got the proper file name for the real test later on.
35376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35377  if test "x$test_shortpath" = x; then
35378    # Short path failed, file does not exist as specified.
35379    # Try adding .exe or .cmd
35380    if test -f "${new_path}.exe"; then
35381      input_to_shortpath="${new_path}.exe"
35382    elif test -f "${new_path}.cmd"; then
35383      input_to_shortpath="${new_path}.cmd"
35384    else
35385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35386$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35389      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35390    fi
35391  else
35392    input_to_shortpath="$new_path"
35393  fi
35394
35395  # Call helper function which possibly converts this using DOS-style short mode.
35396  # If so, the updated path is stored in $new_path.
35397  new_path="$input_to_shortpath"
35398
35399  input_path="$input_to_shortpath"
35400  # Check if we need to convert this using DOS-style short mode. If the path
35401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35402  # take no chances and rewrite it.
35403  # Note: m4 eats our [], so we need to use [ and ] instead.
35404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35405  if test "x$has_forbidden_chars" != x; then
35406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35410      # Going to short mode and back again did indeed matter. Since short mode is
35411      # case insensitive, let's make it lowercase to improve readability.
35412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35413      # Now convert it back to Unix-style (cygpath)
35414      input_path=`$CYGPATH -u "$shortmode_path"`
35415      new_path="$input_path"
35416    fi
35417  fi
35418
35419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35420  if test "x$test_cygdrive_prefix" = x; then
35421    # As a simple fix, exclude /usr/bin since it's not a real path.
35422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35424      # a path prefixed by /cygdrive for fixpath to work.
35425      new_path="$CYGWIN_ROOT_PATH$input_path"
35426    fi
35427  fi
35428
35429  # remove trailing .exe if any
35430  new_path="${new_path/%.exe/}"
35431
35432    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35433
35434  # First separate the path from the arguments. This will split at the first
35435  # space.
35436  complete="$STRIP"
35437  path="${complete%% *}"
35438  tmp="$complete EOL"
35439  arguments="${tmp#* }"
35440
35441  # Input might be given as Windows format, start by converting to
35442  # unix format.
35443  new_path="$path"
35444
35445  windows_path="$new_path"
35446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35447    unix_path=`$CYGPATH -u "$windows_path"`
35448    new_path="$unix_path"
35449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35451    new_path="$unix_path"
35452  fi
35453
35454
35455  # Now try to locate executable using which
35456  new_path=`$WHICH "$new_path" 2> /dev/null`
35457
35458  if test "x$new_path" = x; then
35459    # Oops. Which didn't find the executable.
35460    # The splitting of arguments from the executable at a space might have been incorrect,
35461    # since paths with space are more likely in Windows. Give it another try with the whole
35462    # argument.
35463    path="$complete"
35464    arguments="EOL"
35465    new_path="$path"
35466
35467  windows_path="$new_path"
35468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35469    unix_path=`$CYGPATH -u "$windows_path"`
35470    new_path="$unix_path"
35471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35473    new_path="$unix_path"
35474  fi
35475
35476
35477    new_path=`$WHICH "$new_path" 2> /dev/null`
35478    # bat and cmd files are not always considered executable in MSYS causing which
35479    # to not find them
35480    if test "x$new_path" = x \
35481        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35482        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35483      new_path="$path"
35484
35485  windows_path="$new_path"
35486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35487    unix_path=`$CYGPATH -u "$windows_path"`
35488    new_path="$unix_path"
35489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35491    new_path="$unix_path"
35492  fi
35493
35494    fi
35495
35496    if test "x$new_path" = x; then
35497      # It's still not found. Now this is an unrecoverable error.
35498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35499$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35500      has_space=`$ECHO "$complete" | $GREP " "`
35501      if test "x$has_space" != x; then
35502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35504      fi
35505      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35506    fi
35507  fi
35508
35509  # Now new_path has a complete unix path to the binary
35510  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35511    # Keep paths in /bin as-is, but remove trailing .exe if any
35512    new_path="${new_path/%.exe/}"
35513    # Do not save /bin paths to all_fixpath_prefixes!
35514  else
35515    # Not in mixed or Windows style, start by that.
35516    new_path=`cmd //c echo $new_path`
35517
35518  input_path="$new_path"
35519  # Check if we need to convert this using DOS-style short mode. If the path
35520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35521  # take no chances and rewrite it.
35522  # Note: m4 eats our [], so we need to use [ and ] instead.
35523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35524  if test "x$has_forbidden_chars" != x; then
35525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35526    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35527  fi
35528
35529    # Output is in $new_path
35530
35531  windows_path="$new_path"
35532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35533    unix_path=`$CYGPATH -u "$windows_path"`
35534    new_path="$unix_path"
35535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35537    new_path="$unix_path"
35538  fi
35539
35540    # remove trailing .exe if any
35541    new_path="${new_path/%.exe/}"
35542
35543    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35544    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35545  fi
35546
35547    else
35548      # We're on a unix platform. Hooray! :)
35549      # First separate the path from the arguments. This will split at the first
35550      # space.
35551      complete="$STRIP"
35552      path="${complete%% *}"
35553      tmp="$complete EOL"
35554      arguments="${tmp#* }"
35555
35556      # Cannot rely on the command "which" here since it doesn't always work.
35557      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35558      if test -z "$is_absolute_path"; then
35559        # Path to executable is not absolute. Find it.
35560        IFS_save="$IFS"
35561        IFS=:
35562        for p in $PATH; do
35563          if test -f "$p/$path" && test -x "$p/$path"; then
35564            new_path="$p/$path"
35565            break
35566          fi
35567        done
35568        IFS="$IFS_save"
35569      else
35570        # This is an absolute path, we can use it without further modifications.
35571        new_path="$path"
35572      fi
35573
35574      if test "x$new_path" = x; then
35575        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35576$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35577        has_space=`$ECHO "$complete" | $GREP " "`
35578        if test "x$has_space" != x; then
35579          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35580$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35581        fi
35582        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35583      fi
35584    fi
35585
35586    # Now join together the path and the arguments once again
35587    if test "x$arguments" != xEOL; then
35588      new_complete="$new_path ${arguments% *}"
35589    else
35590      new_complete="$new_path"
35591    fi
35592
35593    if test "x$complete" != "x$new_complete"; then
35594      STRIP="$new_complete"
35595      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35596$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35597    fi
35598  fi
35599
35600
35601
35602  # Publish this variable in the help.
35603
35604
35605  if test "x$NM" = x; then
35606    # The variable is not set by user, try to locate tool using the code snippet
35607    for ac_prog in nm
35608do
35609  # Extract the first word of "$ac_prog", so it can be a program name with args.
35610set dummy $ac_prog; ac_word=$2
35611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35612$as_echo_n "checking for $ac_word... " >&6; }
35613if ${ac_cv_path_NM+:} false; then :
35614  $as_echo_n "(cached) " >&6
35615else
35616  case $NM in
35617  [\\/]* | ?:[\\/]*)
35618  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35619  ;;
35620  *)
35621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35622for as_dir in $PATH
35623do
35624  IFS=$as_save_IFS
35625  test -z "$as_dir" && as_dir=.
35626    for ac_exec_ext in '' $ac_executable_extensions; do
35627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35628    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35630    break 2
35631  fi
35632done
35633  done
35634IFS=$as_save_IFS
35635
35636  ;;
35637esac
35638fi
35639NM=$ac_cv_path_NM
35640if test -n "$NM"; then
35641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35642$as_echo "$NM" >&6; }
35643else
35644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35645$as_echo "no" >&6; }
35646fi
35647
35648
35649  test -n "$NM" && break
35650done
35651
35652  else
35653    # The variable is set, but is it from the command line or the environment?
35654
35655    # Try to remove the string !NM! from our list.
35656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35658      # If it failed, the variable was not from the command line. Ignore it,
35659      # but warn the user (except for BASH, which is always set by the calling BASH).
35660      if test "xNM" != xBASH; then
35661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35662$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35663      fi
35664      # Try to locate tool using the code snippet
35665      for ac_prog in nm
35666do
35667  # Extract the first word of "$ac_prog", so it can be a program name with args.
35668set dummy $ac_prog; ac_word=$2
35669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35670$as_echo_n "checking for $ac_word... " >&6; }
35671if ${ac_cv_path_NM+:} false; then :
35672  $as_echo_n "(cached) " >&6
35673else
35674  case $NM in
35675  [\\/]* | ?:[\\/]*)
35676  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35677  ;;
35678  *)
35679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35680for as_dir in $PATH
35681do
35682  IFS=$as_save_IFS
35683  test -z "$as_dir" && as_dir=.
35684    for ac_exec_ext in '' $ac_executable_extensions; do
35685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35686    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35688    break 2
35689  fi
35690done
35691  done
35692IFS=$as_save_IFS
35693
35694  ;;
35695esac
35696fi
35697NM=$ac_cv_path_NM
35698if test -n "$NM"; then
35699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35700$as_echo "$NM" >&6; }
35701else
35702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35703$as_echo "no" >&6; }
35704fi
35705
35706
35707  test -n "$NM" && break
35708done
35709
35710    else
35711      # If it succeeded, then it was overridden by the user. We will use it
35712      # for the tool.
35713
35714      # First remove it from the list of overridden variables, so we can test
35715      # for unknown variables in the end.
35716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35717
35718      # Check if the provided tool contains a complete path.
35719      tool_specified="$NM"
35720      tool_basename="${tool_specified##*/}"
35721      if test "x$tool_basename" = "x$tool_specified"; then
35722        # A command without a complete path is provided, search $PATH.
35723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35724$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35725        # Extract the first word of "$tool_basename", so it can be a program name with args.
35726set dummy $tool_basename; ac_word=$2
35727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35728$as_echo_n "checking for $ac_word... " >&6; }
35729if ${ac_cv_path_NM+:} false; then :
35730  $as_echo_n "(cached) " >&6
35731else
35732  case $NM in
35733  [\\/]* | ?:[\\/]*)
35734  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35735  ;;
35736  *)
35737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35738for as_dir in $PATH
35739do
35740  IFS=$as_save_IFS
35741  test -z "$as_dir" && as_dir=.
35742    for ac_exec_ext in '' $ac_executable_extensions; do
35743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35744    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35746    break 2
35747  fi
35748done
35749  done
35750IFS=$as_save_IFS
35751
35752  ;;
35753esac
35754fi
35755NM=$ac_cv_path_NM
35756if test -n "$NM"; then
35757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35758$as_echo "$NM" >&6; }
35759else
35760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35761$as_echo "no" >&6; }
35762fi
35763
35764
35765        if test "x$NM" = x; then
35766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35767        fi
35768      else
35769        # Otherwise we believe it is a complete path. Use it as it is.
35770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35771$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35773$as_echo_n "checking for NM... " >&6; }
35774        if test ! -x "$tool_specified"; then
35775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35776$as_echo "not found" >&6; }
35777          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35778        fi
35779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35780$as_echo "$tool_specified" >&6; }
35781      fi
35782    fi
35783  fi
35784
35785
35786
35787  # Only process if variable expands to non-empty
35788
35789  if test "x$NM" != x; then
35790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35791
35792  # First separate the path from the arguments. This will split at the first
35793  # space.
35794  complete="$NM"
35795  path="${complete%% *}"
35796  tmp="$complete EOL"
35797  arguments="${tmp#* }"
35798
35799  # Input might be given as Windows format, start by converting to
35800  # unix format.
35801  new_path=`$CYGPATH -u "$path"`
35802
35803  # Now try to locate executable using which
35804  new_path=`$WHICH "$new_path" 2> /dev/null`
35805  # bat and cmd files are not always considered executable in cygwin causing which
35806  # to not find them
35807  if test "x$new_path" = x \
35808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35810    new_path=`$CYGPATH -u "$path"`
35811  fi
35812  if test "x$new_path" = x; then
35813    # Oops. Which didn't find the executable.
35814    # The splitting of arguments from the executable at a space might have been incorrect,
35815    # since paths with space are more likely in Windows. Give it another try with the whole
35816    # argument.
35817    path="$complete"
35818    arguments="EOL"
35819    new_path=`$CYGPATH -u "$path"`
35820    new_path=`$WHICH "$new_path" 2> /dev/null`
35821    # bat and cmd files are not always considered executable in cygwin causing which
35822    # to not find them
35823    if test "x$new_path" = x \
35824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35826      new_path=`$CYGPATH -u "$path"`
35827    fi
35828    if test "x$new_path" = x; then
35829      # It's still not found. Now this is an unrecoverable error.
35830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35831$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35832      has_space=`$ECHO "$complete" | $GREP " "`
35833      if test "x$has_space" != x; then
35834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35836      fi
35837      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35838    fi
35839  fi
35840
35841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35844  # "foo.exe" is OK but "foo" is an error.
35845  #
35846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35847  # It is also a way to make sure we got the proper file name for the real test later on.
35848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35849  if test "x$test_shortpath" = x; then
35850    # Short path failed, file does not exist as specified.
35851    # Try adding .exe or .cmd
35852    if test -f "${new_path}.exe"; then
35853      input_to_shortpath="${new_path}.exe"
35854    elif test -f "${new_path}.cmd"; then
35855      input_to_shortpath="${new_path}.cmd"
35856    else
35857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35858$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35861      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35862    fi
35863  else
35864    input_to_shortpath="$new_path"
35865  fi
35866
35867  # Call helper function which possibly converts this using DOS-style short mode.
35868  # If so, the updated path is stored in $new_path.
35869  new_path="$input_to_shortpath"
35870
35871  input_path="$input_to_shortpath"
35872  # Check if we need to convert this using DOS-style short mode. If the path
35873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35874  # take no chances and rewrite it.
35875  # Note: m4 eats our [], so we need to use [ and ] instead.
35876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35877  if test "x$has_forbidden_chars" != x; then
35878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35882      # Going to short mode and back again did indeed matter. Since short mode is
35883      # case insensitive, let's make it lowercase to improve readability.
35884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35885      # Now convert it back to Unix-style (cygpath)
35886      input_path=`$CYGPATH -u "$shortmode_path"`
35887      new_path="$input_path"
35888    fi
35889  fi
35890
35891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35892  if test "x$test_cygdrive_prefix" = x; then
35893    # As a simple fix, exclude /usr/bin since it's not a real path.
35894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35896      # a path prefixed by /cygdrive for fixpath to work.
35897      new_path="$CYGWIN_ROOT_PATH$input_path"
35898    fi
35899  fi
35900
35901  # remove trailing .exe if any
35902  new_path="${new_path/%.exe/}"
35903
35904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35905
35906  # First separate the path from the arguments. This will split at the first
35907  # space.
35908  complete="$NM"
35909  path="${complete%% *}"
35910  tmp="$complete EOL"
35911  arguments="${tmp#* }"
35912
35913  # Input might be given as Windows format, start by converting to
35914  # unix format.
35915  new_path="$path"
35916
35917  windows_path="$new_path"
35918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35919    unix_path=`$CYGPATH -u "$windows_path"`
35920    new_path="$unix_path"
35921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35923    new_path="$unix_path"
35924  fi
35925
35926
35927  # Now try to locate executable using which
35928  new_path=`$WHICH "$new_path" 2> /dev/null`
35929
35930  if test "x$new_path" = x; then
35931    # Oops. Which didn't find the executable.
35932    # The splitting of arguments from the executable at a space might have been incorrect,
35933    # since paths with space are more likely in Windows. Give it another try with the whole
35934    # argument.
35935    path="$complete"
35936    arguments="EOL"
35937    new_path="$path"
35938
35939  windows_path="$new_path"
35940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35941    unix_path=`$CYGPATH -u "$windows_path"`
35942    new_path="$unix_path"
35943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35945    new_path="$unix_path"
35946  fi
35947
35948
35949    new_path=`$WHICH "$new_path" 2> /dev/null`
35950    # bat and cmd files are not always considered executable in MSYS causing which
35951    # to not find them
35952    if test "x$new_path" = x \
35953        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35954        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35955      new_path="$path"
35956
35957  windows_path="$new_path"
35958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35959    unix_path=`$CYGPATH -u "$windows_path"`
35960    new_path="$unix_path"
35961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35963    new_path="$unix_path"
35964  fi
35965
35966    fi
35967
35968    if test "x$new_path" = x; then
35969      # It's still not found. Now this is an unrecoverable error.
35970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35971$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35972      has_space=`$ECHO "$complete" | $GREP " "`
35973      if test "x$has_space" != x; then
35974        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35975$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35976      fi
35977      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35978    fi
35979  fi
35980
35981  # Now new_path has a complete unix path to the binary
35982  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35983    # Keep paths in /bin as-is, but remove trailing .exe if any
35984    new_path="${new_path/%.exe/}"
35985    # Do not save /bin paths to all_fixpath_prefixes!
35986  else
35987    # Not in mixed or Windows style, start by that.
35988    new_path=`cmd //c echo $new_path`
35989
35990  input_path="$new_path"
35991  # Check if we need to convert this using DOS-style short mode. If the path
35992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35993  # take no chances and rewrite it.
35994  # Note: m4 eats our [], so we need to use [ and ] instead.
35995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35996  if test "x$has_forbidden_chars" != x; then
35997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35998    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35999  fi
36000
36001    # Output is in $new_path
36002
36003  windows_path="$new_path"
36004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36005    unix_path=`$CYGPATH -u "$windows_path"`
36006    new_path="$unix_path"
36007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36009    new_path="$unix_path"
36010  fi
36011
36012    # remove trailing .exe if any
36013    new_path="${new_path/%.exe/}"
36014
36015    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36016    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36017  fi
36018
36019    else
36020      # We're on a unix platform. Hooray! :)
36021      # First separate the path from the arguments. This will split at the first
36022      # space.
36023      complete="$NM"
36024      path="${complete%% *}"
36025      tmp="$complete EOL"
36026      arguments="${tmp#* }"
36027
36028      # Cannot rely on the command "which" here since it doesn't always work.
36029      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36030      if test -z "$is_absolute_path"; then
36031        # Path to executable is not absolute. Find it.
36032        IFS_save="$IFS"
36033        IFS=:
36034        for p in $PATH; do
36035          if test -f "$p/$path" && test -x "$p/$path"; then
36036            new_path="$p/$path"
36037            break
36038          fi
36039        done
36040        IFS="$IFS_save"
36041      else
36042        # This is an absolute path, we can use it without further modifications.
36043        new_path="$path"
36044      fi
36045
36046      if test "x$new_path" = x; then
36047        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
36048$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
36049        has_space=`$ECHO "$complete" | $GREP " "`
36050        if test "x$has_space" != x; then
36051          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36052$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36053        fi
36054        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
36055      fi
36056    fi
36057
36058    # Now join together the path and the arguments once again
36059    if test "x$arguments" != xEOL; then
36060      new_complete="$new_path ${arguments% *}"
36061    else
36062      new_complete="$new_path"
36063    fi
36064
36065    if test "x$complete" != "x$new_complete"; then
36066      NM="$new_complete"
36067      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
36068$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
36069    fi
36070  fi
36071
36072
36073
36074  # Publish this variable in the help.
36075
36076
36077  if test "x$GNM" = x; then
36078    # The variable is not set by user, try to locate tool using the code snippet
36079    for ac_prog in gnm
36080do
36081  # Extract the first word of "$ac_prog", so it can be a program name with args.
36082set dummy $ac_prog; ac_word=$2
36083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36084$as_echo_n "checking for $ac_word... " >&6; }
36085if ${ac_cv_path_GNM+:} false; then :
36086  $as_echo_n "(cached) " >&6
36087else
36088  case $GNM in
36089  [\\/]* | ?:[\\/]*)
36090  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36091  ;;
36092  *)
36093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36094for as_dir in $PATH
36095do
36096  IFS=$as_save_IFS
36097  test -z "$as_dir" && as_dir=.
36098    for ac_exec_ext in '' $ac_executable_extensions; do
36099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36100    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36102    break 2
36103  fi
36104done
36105  done
36106IFS=$as_save_IFS
36107
36108  ;;
36109esac
36110fi
36111GNM=$ac_cv_path_GNM
36112if test -n "$GNM"; then
36113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36114$as_echo "$GNM" >&6; }
36115else
36116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36117$as_echo "no" >&6; }
36118fi
36119
36120
36121  test -n "$GNM" && break
36122done
36123
36124  else
36125    # The variable is set, but is it from the command line or the environment?
36126
36127    # Try to remove the string !GNM! from our list.
36128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36130      # If it failed, the variable was not from the command line. Ignore it,
36131      # but warn the user (except for BASH, which is always set by the calling BASH).
36132      if test "xGNM" != xBASH; then
36133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36134$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36135      fi
36136      # Try to locate tool using the code snippet
36137      for ac_prog in gnm
36138do
36139  # Extract the first word of "$ac_prog", so it can be a program name with args.
36140set dummy $ac_prog; ac_word=$2
36141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36142$as_echo_n "checking for $ac_word... " >&6; }
36143if ${ac_cv_path_GNM+:} false; then :
36144  $as_echo_n "(cached) " >&6
36145else
36146  case $GNM in
36147  [\\/]* | ?:[\\/]*)
36148  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36149  ;;
36150  *)
36151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36152for as_dir in $PATH
36153do
36154  IFS=$as_save_IFS
36155  test -z "$as_dir" && as_dir=.
36156    for ac_exec_ext in '' $ac_executable_extensions; do
36157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36158    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36160    break 2
36161  fi
36162done
36163  done
36164IFS=$as_save_IFS
36165
36166  ;;
36167esac
36168fi
36169GNM=$ac_cv_path_GNM
36170if test -n "$GNM"; then
36171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36172$as_echo "$GNM" >&6; }
36173else
36174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36175$as_echo "no" >&6; }
36176fi
36177
36178
36179  test -n "$GNM" && break
36180done
36181
36182    else
36183      # If it succeeded, then it was overridden by the user. We will use it
36184      # for the tool.
36185
36186      # First remove it from the list of overridden variables, so we can test
36187      # for unknown variables in the end.
36188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36189
36190      # Check if the provided tool contains a complete path.
36191      tool_specified="$GNM"
36192      tool_basename="${tool_specified##*/}"
36193      if test "x$tool_basename" = "x$tool_specified"; then
36194        # A command without a complete path is provided, search $PATH.
36195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36196$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36197        # Extract the first word of "$tool_basename", so it can be a program name with args.
36198set dummy $tool_basename; ac_word=$2
36199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36200$as_echo_n "checking for $ac_word... " >&6; }
36201if ${ac_cv_path_GNM+:} false; then :
36202  $as_echo_n "(cached) " >&6
36203else
36204  case $GNM in
36205  [\\/]* | ?:[\\/]*)
36206  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36207  ;;
36208  *)
36209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36210for as_dir in $PATH
36211do
36212  IFS=$as_save_IFS
36213  test -z "$as_dir" && as_dir=.
36214    for ac_exec_ext in '' $ac_executable_extensions; do
36215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36216    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36218    break 2
36219  fi
36220done
36221  done
36222IFS=$as_save_IFS
36223
36224  ;;
36225esac
36226fi
36227GNM=$ac_cv_path_GNM
36228if test -n "$GNM"; then
36229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36230$as_echo "$GNM" >&6; }
36231else
36232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36233$as_echo "no" >&6; }
36234fi
36235
36236
36237        if test "x$GNM" = x; then
36238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36239        fi
36240      else
36241        # Otherwise we believe it is a complete path. Use it as it is.
36242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36243$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36245$as_echo_n "checking for GNM... " >&6; }
36246        if test ! -x "$tool_specified"; then
36247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36248$as_echo "not found" >&6; }
36249          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36250        fi
36251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36252$as_echo "$tool_specified" >&6; }
36253      fi
36254    fi
36255  fi
36256
36257
36258
36259  # Only process if variable expands to non-empty
36260
36261  if test "x$GNM" != x; then
36262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36263
36264  # First separate the path from the arguments. This will split at the first
36265  # space.
36266  complete="$GNM"
36267  path="${complete%% *}"
36268  tmp="$complete EOL"
36269  arguments="${tmp#* }"
36270
36271  # Input might be given as Windows format, start by converting to
36272  # unix format.
36273  new_path=`$CYGPATH -u "$path"`
36274
36275  # Now try to locate executable using which
36276  new_path=`$WHICH "$new_path" 2> /dev/null`
36277  # bat and cmd files are not always considered executable in cygwin causing which
36278  # to not find them
36279  if test "x$new_path" = x \
36280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36282    new_path=`$CYGPATH -u "$path"`
36283  fi
36284  if test "x$new_path" = x; then
36285    # Oops. Which didn't find the executable.
36286    # The splitting of arguments from the executable at a space might have been incorrect,
36287    # since paths with space are more likely in Windows. Give it another try with the whole
36288    # argument.
36289    path="$complete"
36290    arguments="EOL"
36291    new_path=`$CYGPATH -u "$path"`
36292    new_path=`$WHICH "$new_path" 2> /dev/null`
36293    # bat and cmd files are not always considered executable in cygwin causing which
36294    # to not find them
36295    if test "x$new_path" = x \
36296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36298      new_path=`$CYGPATH -u "$path"`
36299    fi
36300    if test "x$new_path" = x; then
36301      # It's still not found. Now this is an unrecoverable error.
36302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36303$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36304      has_space=`$ECHO "$complete" | $GREP " "`
36305      if test "x$has_space" != x; then
36306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36308      fi
36309      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36310    fi
36311  fi
36312
36313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36316  # "foo.exe" is OK but "foo" is an error.
36317  #
36318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36319  # It is also a way to make sure we got the proper file name for the real test later on.
36320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36321  if test "x$test_shortpath" = x; then
36322    # Short path failed, file does not exist as specified.
36323    # Try adding .exe or .cmd
36324    if test -f "${new_path}.exe"; then
36325      input_to_shortpath="${new_path}.exe"
36326    elif test -f "${new_path}.cmd"; then
36327      input_to_shortpath="${new_path}.cmd"
36328    else
36329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36330$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36333      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36334    fi
36335  else
36336    input_to_shortpath="$new_path"
36337  fi
36338
36339  # Call helper function which possibly converts this using DOS-style short mode.
36340  # If so, the updated path is stored in $new_path.
36341  new_path="$input_to_shortpath"
36342
36343  input_path="$input_to_shortpath"
36344  # Check if we need to convert this using DOS-style short mode. If the path
36345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36346  # take no chances and rewrite it.
36347  # Note: m4 eats our [], so we need to use [ and ] instead.
36348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36349  if test "x$has_forbidden_chars" != x; then
36350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36354      # Going to short mode and back again did indeed matter. Since short mode is
36355      # case insensitive, let's make it lowercase to improve readability.
36356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36357      # Now convert it back to Unix-style (cygpath)
36358      input_path=`$CYGPATH -u "$shortmode_path"`
36359      new_path="$input_path"
36360    fi
36361  fi
36362
36363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36364  if test "x$test_cygdrive_prefix" = x; then
36365    # As a simple fix, exclude /usr/bin since it's not a real path.
36366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36368      # a path prefixed by /cygdrive for fixpath to work.
36369      new_path="$CYGWIN_ROOT_PATH$input_path"
36370    fi
36371  fi
36372
36373  # remove trailing .exe if any
36374  new_path="${new_path/%.exe/}"
36375
36376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36377
36378  # First separate the path from the arguments. This will split at the first
36379  # space.
36380  complete="$GNM"
36381  path="${complete%% *}"
36382  tmp="$complete EOL"
36383  arguments="${tmp#* }"
36384
36385  # Input might be given as Windows format, start by converting to
36386  # unix format.
36387  new_path="$path"
36388
36389  windows_path="$new_path"
36390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36391    unix_path=`$CYGPATH -u "$windows_path"`
36392    new_path="$unix_path"
36393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36395    new_path="$unix_path"
36396  fi
36397
36398
36399  # Now try to locate executable using which
36400  new_path=`$WHICH "$new_path" 2> /dev/null`
36401
36402  if test "x$new_path" = x; then
36403    # Oops. Which didn't find the executable.
36404    # The splitting of arguments from the executable at a space might have been incorrect,
36405    # since paths with space are more likely in Windows. Give it another try with the whole
36406    # argument.
36407    path="$complete"
36408    arguments="EOL"
36409    new_path="$path"
36410
36411  windows_path="$new_path"
36412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36413    unix_path=`$CYGPATH -u "$windows_path"`
36414    new_path="$unix_path"
36415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36417    new_path="$unix_path"
36418  fi
36419
36420
36421    new_path=`$WHICH "$new_path" 2> /dev/null`
36422    # bat and cmd files are not always considered executable in MSYS causing which
36423    # to not find them
36424    if test "x$new_path" = x \
36425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36427      new_path="$path"
36428
36429  windows_path="$new_path"
36430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36431    unix_path=`$CYGPATH -u "$windows_path"`
36432    new_path="$unix_path"
36433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36435    new_path="$unix_path"
36436  fi
36437
36438    fi
36439
36440    if test "x$new_path" = x; then
36441      # It's still not found. Now this is an unrecoverable error.
36442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36443$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36444      has_space=`$ECHO "$complete" | $GREP " "`
36445      if test "x$has_space" != x; then
36446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36448      fi
36449      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36450    fi
36451  fi
36452
36453  # Now new_path has a complete unix path to the binary
36454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36455    # Keep paths in /bin as-is, but remove trailing .exe if any
36456    new_path="${new_path/%.exe/}"
36457    # Do not save /bin paths to all_fixpath_prefixes!
36458  else
36459    # Not in mixed or Windows style, start by that.
36460    new_path=`cmd //c echo $new_path`
36461
36462  input_path="$new_path"
36463  # Check if we need to convert this using DOS-style short mode. If the path
36464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36465  # take no chances and rewrite it.
36466  # Note: m4 eats our [], so we need to use [ and ] instead.
36467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36468  if test "x$has_forbidden_chars" != x; then
36469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36471  fi
36472
36473    # Output is in $new_path
36474
36475  windows_path="$new_path"
36476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36477    unix_path=`$CYGPATH -u "$windows_path"`
36478    new_path="$unix_path"
36479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36481    new_path="$unix_path"
36482  fi
36483
36484    # remove trailing .exe if any
36485    new_path="${new_path/%.exe/}"
36486
36487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36489  fi
36490
36491    else
36492      # We're on a unix platform. Hooray! :)
36493      # First separate the path from the arguments. This will split at the first
36494      # space.
36495      complete="$GNM"
36496      path="${complete%% *}"
36497      tmp="$complete EOL"
36498      arguments="${tmp#* }"
36499
36500      # Cannot rely on the command "which" here since it doesn't always work.
36501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36502      if test -z "$is_absolute_path"; then
36503        # Path to executable is not absolute. Find it.
36504        IFS_save="$IFS"
36505        IFS=:
36506        for p in $PATH; do
36507          if test -f "$p/$path" && test -x "$p/$path"; then
36508            new_path="$p/$path"
36509            break
36510          fi
36511        done
36512        IFS="$IFS_save"
36513      else
36514        # This is an absolute path, we can use it without further modifications.
36515        new_path="$path"
36516      fi
36517
36518      if test "x$new_path" = x; then
36519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36520$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36521        has_space=`$ECHO "$complete" | $GREP " "`
36522        if test "x$has_space" != x; then
36523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36525        fi
36526        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36527      fi
36528    fi
36529
36530    # Now join together the path and the arguments once again
36531    if test "x$arguments" != xEOL; then
36532      new_complete="$new_path ${arguments% *}"
36533    else
36534      new_complete="$new_path"
36535    fi
36536
36537    if test "x$complete" != "x$new_complete"; then
36538      GNM="$new_complete"
36539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36540$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36541    fi
36542  fi
36543
36544  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36545    # FIXME: we should unify this with the solaris case above.
36546
36547
36548  # Publish this variable in the help.
36549
36550
36551  if test "x$STRIP" = x; then
36552    # The variable is not set by user, try to locate tool using the code snippet
36553    if test -n "$ac_tool_prefix"; then
36554  for ac_prog in strip
36555  do
36556    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36557set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36559$as_echo_n "checking for $ac_word... " >&6; }
36560if ${ac_cv_prog_STRIP+:} false; then :
36561  $as_echo_n "(cached) " >&6
36562else
36563  if test -n "$STRIP"; then
36564  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36565else
36566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36567for as_dir in $PATH
36568do
36569  IFS=$as_save_IFS
36570  test -z "$as_dir" && as_dir=.
36571    for ac_exec_ext in '' $ac_executable_extensions; do
36572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36573    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36575    break 2
36576  fi
36577done
36578  done
36579IFS=$as_save_IFS
36580
36581fi
36582fi
36583STRIP=$ac_cv_prog_STRIP
36584if test -n "$STRIP"; then
36585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36586$as_echo "$STRIP" >&6; }
36587else
36588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36589$as_echo "no" >&6; }
36590fi
36591
36592
36593    test -n "$STRIP" && break
36594  done
36595fi
36596if test -z "$STRIP"; then
36597  ac_ct_STRIP=$STRIP
36598  for ac_prog in strip
36599do
36600  # Extract the first word of "$ac_prog", so it can be a program name with args.
36601set dummy $ac_prog; ac_word=$2
36602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36603$as_echo_n "checking for $ac_word... " >&6; }
36604if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36605  $as_echo_n "(cached) " >&6
36606else
36607  if test -n "$ac_ct_STRIP"; then
36608  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36609else
36610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36611for as_dir in $PATH
36612do
36613  IFS=$as_save_IFS
36614  test -z "$as_dir" && as_dir=.
36615    for ac_exec_ext in '' $ac_executable_extensions; do
36616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36617    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36619    break 2
36620  fi
36621done
36622  done
36623IFS=$as_save_IFS
36624
36625fi
36626fi
36627ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36628if test -n "$ac_ct_STRIP"; then
36629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36630$as_echo "$ac_ct_STRIP" >&6; }
36631else
36632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36633$as_echo "no" >&6; }
36634fi
36635
36636
36637  test -n "$ac_ct_STRIP" && break
36638done
36639
36640  if test "x$ac_ct_STRIP" = x; then
36641    STRIP=""
36642  else
36643    case $cross_compiling:$ac_tool_warned in
36644yes:)
36645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36647ac_tool_warned=yes ;;
36648esac
36649    STRIP=$ac_ct_STRIP
36650  fi
36651fi
36652
36653  else
36654    # The variable is set, but is it from the command line or the environment?
36655
36656    # Try to remove the string !STRIP! from our list.
36657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36659      # If it failed, the variable was not from the command line. Ignore it,
36660      # but warn the user (except for BASH, which is always set by the calling BASH).
36661      if test "xSTRIP" != xBASH; then
36662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36663$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36664      fi
36665      # Try to locate tool using the code snippet
36666      if test -n "$ac_tool_prefix"; then
36667  for ac_prog in strip
36668  do
36669    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36670set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36672$as_echo_n "checking for $ac_word... " >&6; }
36673if ${ac_cv_prog_STRIP+:} false; then :
36674  $as_echo_n "(cached) " >&6
36675else
36676  if test -n "$STRIP"; then
36677  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36678else
36679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36680for as_dir in $PATH
36681do
36682  IFS=$as_save_IFS
36683  test -z "$as_dir" && as_dir=.
36684    for ac_exec_ext in '' $ac_executable_extensions; do
36685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36686    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36688    break 2
36689  fi
36690done
36691  done
36692IFS=$as_save_IFS
36693
36694fi
36695fi
36696STRIP=$ac_cv_prog_STRIP
36697if test -n "$STRIP"; then
36698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36699$as_echo "$STRIP" >&6; }
36700else
36701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36702$as_echo "no" >&6; }
36703fi
36704
36705
36706    test -n "$STRIP" && break
36707  done
36708fi
36709if test -z "$STRIP"; then
36710  ac_ct_STRIP=$STRIP
36711  for ac_prog in strip
36712do
36713  # Extract the first word of "$ac_prog", so it can be a program name with args.
36714set dummy $ac_prog; ac_word=$2
36715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36716$as_echo_n "checking for $ac_word... " >&6; }
36717if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36718  $as_echo_n "(cached) " >&6
36719else
36720  if test -n "$ac_ct_STRIP"; then
36721  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36722else
36723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36724for as_dir in $PATH
36725do
36726  IFS=$as_save_IFS
36727  test -z "$as_dir" && as_dir=.
36728    for ac_exec_ext in '' $ac_executable_extensions; do
36729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36730    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36732    break 2
36733  fi
36734done
36735  done
36736IFS=$as_save_IFS
36737
36738fi
36739fi
36740ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36741if test -n "$ac_ct_STRIP"; then
36742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36743$as_echo "$ac_ct_STRIP" >&6; }
36744else
36745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36746$as_echo "no" >&6; }
36747fi
36748
36749
36750  test -n "$ac_ct_STRIP" && break
36751done
36752
36753  if test "x$ac_ct_STRIP" = x; then
36754    STRIP=""
36755  else
36756    case $cross_compiling:$ac_tool_warned in
36757yes:)
36758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36760ac_tool_warned=yes ;;
36761esac
36762    STRIP=$ac_ct_STRIP
36763  fi
36764fi
36765
36766    else
36767      # If it succeeded, then it was overridden by the user. We will use it
36768      # for the tool.
36769
36770      # First remove it from the list of overridden variables, so we can test
36771      # for unknown variables in the end.
36772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36773
36774      # Check if the provided tool contains a complete path.
36775      tool_specified="$STRIP"
36776      tool_basename="${tool_specified##*/}"
36777      if test "x$tool_basename" = "x$tool_specified"; then
36778        # A command without a complete path is provided, search $PATH.
36779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36780$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36781        # Extract the first word of "$tool_basename", so it can be a program name with args.
36782set dummy $tool_basename; ac_word=$2
36783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36784$as_echo_n "checking for $ac_word... " >&6; }
36785if ${ac_cv_path_STRIP+:} false; then :
36786  $as_echo_n "(cached) " >&6
36787else
36788  case $STRIP in
36789  [\\/]* | ?:[\\/]*)
36790  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36791  ;;
36792  *)
36793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36794for as_dir in $PATH
36795do
36796  IFS=$as_save_IFS
36797  test -z "$as_dir" && as_dir=.
36798    for ac_exec_ext in '' $ac_executable_extensions; do
36799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36800    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36802    break 2
36803  fi
36804done
36805  done
36806IFS=$as_save_IFS
36807
36808  ;;
36809esac
36810fi
36811STRIP=$ac_cv_path_STRIP
36812if test -n "$STRIP"; then
36813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36814$as_echo "$STRIP" >&6; }
36815else
36816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36817$as_echo "no" >&6; }
36818fi
36819
36820
36821        if test "x$STRIP" = x; then
36822          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36823        fi
36824      else
36825        # Otherwise we believe it is a complete path. Use it as it is.
36826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36827$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36829$as_echo_n "checking for STRIP... " >&6; }
36830        if test ! -x "$tool_specified"; then
36831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36832$as_echo "not found" >&6; }
36833          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36834        fi
36835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36836$as_echo "$tool_specified" >&6; }
36837      fi
36838    fi
36839  fi
36840
36841
36842
36843  # Only process if variable expands to non-empty
36844
36845  if test "x$STRIP" != x; then
36846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36847
36848  # First separate the path from the arguments. This will split at the first
36849  # space.
36850  complete="$STRIP"
36851  path="${complete%% *}"
36852  tmp="$complete EOL"
36853  arguments="${tmp#* }"
36854
36855  # Input might be given as Windows format, start by converting to
36856  # unix format.
36857  new_path=`$CYGPATH -u "$path"`
36858
36859  # Now try to locate executable using which
36860  new_path=`$WHICH "$new_path" 2> /dev/null`
36861  # bat and cmd files are not always considered executable in cygwin causing which
36862  # to not find them
36863  if test "x$new_path" = x \
36864      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36865      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36866    new_path=`$CYGPATH -u "$path"`
36867  fi
36868  if test "x$new_path" = x; then
36869    # Oops. Which didn't find the executable.
36870    # The splitting of arguments from the executable at a space might have been incorrect,
36871    # since paths with space are more likely in Windows. Give it another try with the whole
36872    # argument.
36873    path="$complete"
36874    arguments="EOL"
36875    new_path=`$CYGPATH -u "$path"`
36876    new_path=`$WHICH "$new_path" 2> /dev/null`
36877    # bat and cmd files are not always considered executable in cygwin causing which
36878    # to not find them
36879    if test "x$new_path" = x \
36880        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36881        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36882      new_path=`$CYGPATH -u "$path"`
36883    fi
36884    if test "x$new_path" = x; then
36885      # It's still not found. Now this is an unrecoverable error.
36886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36887$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36888      has_space=`$ECHO "$complete" | $GREP " "`
36889      if test "x$has_space" != x; then
36890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36892      fi
36893      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36894    fi
36895  fi
36896
36897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36900  # "foo.exe" is OK but "foo" is an error.
36901  #
36902  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36903  # It is also a way to make sure we got the proper file name for the real test later on.
36904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36905  if test "x$test_shortpath" = x; then
36906    # Short path failed, file does not exist as specified.
36907    # Try adding .exe or .cmd
36908    if test -f "${new_path}.exe"; then
36909      input_to_shortpath="${new_path}.exe"
36910    elif test -f "${new_path}.cmd"; then
36911      input_to_shortpath="${new_path}.cmd"
36912    else
36913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36914$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36915      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36916$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36917      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36918    fi
36919  else
36920    input_to_shortpath="$new_path"
36921  fi
36922
36923  # Call helper function which possibly converts this using DOS-style short mode.
36924  # If so, the updated path is stored in $new_path.
36925  new_path="$input_to_shortpath"
36926
36927  input_path="$input_to_shortpath"
36928  # Check if we need to convert this using DOS-style short mode. If the path
36929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36930  # take no chances and rewrite it.
36931  # Note: m4 eats our [], so we need to use [ and ] instead.
36932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36933  if test "x$has_forbidden_chars" != x; then
36934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36938      # Going to short mode and back again did indeed matter. Since short mode is
36939      # case insensitive, let's make it lowercase to improve readability.
36940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36941      # Now convert it back to Unix-style (cygpath)
36942      input_path=`$CYGPATH -u "$shortmode_path"`
36943      new_path="$input_path"
36944    fi
36945  fi
36946
36947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36948  if test "x$test_cygdrive_prefix" = x; then
36949    # As a simple fix, exclude /usr/bin since it's not a real path.
36950    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36952      # a path prefixed by /cygdrive for fixpath to work.
36953      new_path="$CYGWIN_ROOT_PATH$input_path"
36954    fi
36955  fi
36956
36957  # remove trailing .exe if any
36958  new_path="${new_path/%.exe/}"
36959
36960    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36961
36962  # First separate the path from the arguments. This will split at the first
36963  # space.
36964  complete="$STRIP"
36965  path="${complete%% *}"
36966  tmp="$complete EOL"
36967  arguments="${tmp#* }"
36968
36969  # Input might be given as Windows format, start by converting to
36970  # unix format.
36971  new_path="$path"
36972
36973  windows_path="$new_path"
36974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36975    unix_path=`$CYGPATH -u "$windows_path"`
36976    new_path="$unix_path"
36977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36979    new_path="$unix_path"
36980  fi
36981
36982
36983  # Now try to locate executable using which
36984  new_path=`$WHICH "$new_path" 2> /dev/null`
36985
36986  if test "x$new_path" = x; then
36987    # Oops. Which didn't find the executable.
36988    # The splitting of arguments from the executable at a space might have been incorrect,
36989    # since paths with space are more likely in Windows. Give it another try with the whole
36990    # argument.
36991    path="$complete"
36992    arguments="EOL"
36993    new_path="$path"
36994
36995  windows_path="$new_path"
36996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36997    unix_path=`$CYGPATH -u "$windows_path"`
36998    new_path="$unix_path"
36999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37001    new_path="$unix_path"
37002  fi
37003
37004
37005    new_path=`$WHICH "$new_path" 2> /dev/null`
37006    # bat and cmd files are not always considered executable in MSYS causing which
37007    # to not find them
37008    if test "x$new_path" = x \
37009        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37010        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37011      new_path="$path"
37012
37013  windows_path="$new_path"
37014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37015    unix_path=`$CYGPATH -u "$windows_path"`
37016    new_path="$unix_path"
37017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37019    new_path="$unix_path"
37020  fi
37021
37022    fi
37023
37024    if test "x$new_path" = x; then
37025      # It's still not found. Now this is an unrecoverable error.
37026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37027$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37028      has_space=`$ECHO "$complete" | $GREP " "`
37029      if test "x$has_space" != x; then
37030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37032      fi
37033      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37034    fi
37035  fi
37036
37037  # Now new_path has a complete unix path to the binary
37038  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37039    # Keep paths in /bin as-is, but remove trailing .exe if any
37040    new_path="${new_path/%.exe/}"
37041    # Do not save /bin paths to all_fixpath_prefixes!
37042  else
37043    # Not in mixed or Windows style, start by that.
37044    new_path=`cmd //c echo $new_path`
37045
37046  input_path="$new_path"
37047  # Check if we need to convert this using DOS-style short mode. If the path
37048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37049  # take no chances and rewrite it.
37050  # Note: m4 eats our [], so we need to use [ and ] instead.
37051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37052  if test "x$has_forbidden_chars" != x; then
37053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37055  fi
37056
37057    # Output is in $new_path
37058
37059  windows_path="$new_path"
37060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37061    unix_path=`$CYGPATH -u "$windows_path"`
37062    new_path="$unix_path"
37063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37065    new_path="$unix_path"
37066  fi
37067
37068    # remove trailing .exe if any
37069    new_path="${new_path/%.exe/}"
37070
37071    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37072    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37073  fi
37074
37075    else
37076      # We're on a unix platform. Hooray! :)
37077      # First separate the path from the arguments. This will split at the first
37078      # space.
37079      complete="$STRIP"
37080      path="${complete%% *}"
37081      tmp="$complete EOL"
37082      arguments="${tmp#* }"
37083
37084      # Cannot rely on the command "which" here since it doesn't always work.
37085      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37086      if test -z "$is_absolute_path"; then
37087        # Path to executable is not absolute. Find it.
37088        IFS_save="$IFS"
37089        IFS=:
37090        for p in $PATH; do
37091          if test -f "$p/$path" && test -x "$p/$path"; then
37092            new_path="$p/$path"
37093            break
37094          fi
37095        done
37096        IFS="$IFS_save"
37097      else
37098        # This is an absolute path, we can use it without further modifications.
37099        new_path="$path"
37100      fi
37101
37102      if test "x$new_path" = x; then
37103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37104$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37105        has_space=`$ECHO "$complete" | $GREP " "`
37106        if test "x$has_space" != x; then
37107          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37108$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37109        fi
37110        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37111      fi
37112    fi
37113
37114    # Now join together the path and the arguments once again
37115    if test "x$arguments" != xEOL; then
37116      new_complete="$new_path ${arguments% *}"
37117    else
37118      new_complete="$new_path"
37119    fi
37120
37121    if test "x$complete" != "x$new_complete"; then
37122      STRIP="$new_complete"
37123      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37124$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37125    fi
37126  fi
37127
37128
37129
37130  # Publish this variable in the help.
37131
37132
37133  if test "x$NM" = x; then
37134    # The variable is not set by user, try to locate tool using the code snippet
37135    if test -n "$ac_tool_prefix"; then
37136  for ac_prog in nm
37137  do
37138    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37139set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37141$as_echo_n "checking for $ac_word... " >&6; }
37142if ${ac_cv_prog_NM+:} false; then :
37143  $as_echo_n "(cached) " >&6
37144else
37145  if test -n "$NM"; then
37146  ac_cv_prog_NM="$NM" # Let the user override the test.
37147else
37148as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37149for as_dir in $PATH
37150do
37151  IFS=$as_save_IFS
37152  test -z "$as_dir" && as_dir=.
37153    for ac_exec_ext in '' $ac_executable_extensions; do
37154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37155    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37157    break 2
37158  fi
37159done
37160  done
37161IFS=$as_save_IFS
37162
37163fi
37164fi
37165NM=$ac_cv_prog_NM
37166if test -n "$NM"; then
37167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37168$as_echo "$NM" >&6; }
37169else
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37171$as_echo "no" >&6; }
37172fi
37173
37174
37175    test -n "$NM" && break
37176  done
37177fi
37178if test -z "$NM"; then
37179  ac_ct_NM=$NM
37180  for ac_prog in nm
37181do
37182  # Extract the first word of "$ac_prog", so it can be a program name with args.
37183set dummy $ac_prog; ac_word=$2
37184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37185$as_echo_n "checking for $ac_word... " >&6; }
37186if ${ac_cv_prog_ac_ct_NM+:} false; then :
37187  $as_echo_n "(cached) " >&6
37188else
37189  if test -n "$ac_ct_NM"; then
37190  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37191else
37192as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37193for as_dir in $PATH
37194do
37195  IFS=$as_save_IFS
37196  test -z "$as_dir" && as_dir=.
37197    for ac_exec_ext in '' $ac_executable_extensions; do
37198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37199    ac_cv_prog_ac_ct_NM="$ac_prog"
37200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37201    break 2
37202  fi
37203done
37204  done
37205IFS=$as_save_IFS
37206
37207fi
37208fi
37209ac_ct_NM=$ac_cv_prog_ac_ct_NM
37210if test -n "$ac_ct_NM"; then
37211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37212$as_echo "$ac_ct_NM" >&6; }
37213else
37214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37215$as_echo "no" >&6; }
37216fi
37217
37218
37219  test -n "$ac_ct_NM" && break
37220done
37221
37222  if test "x$ac_ct_NM" = x; then
37223    NM=""
37224  else
37225    case $cross_compiling:$ac_tool_warned in
37226yes:)
37227{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37228$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37229ac_tool_warned=yes ;;
37230esac
37231    NM=$ac_ct_NM
37232  fi
37233fi
37234
37235  else
37236    # The variable is set, but is it from the command line or the environment?
37237
37238    # Try to remove the string !NM! from our list.
37239    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37240    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37241      # If it failed, the variable was not from the command line. Ignore it,
37242      # but warn the user (except for BASH, which is always set by the calling BASH).
37243      if test "xNM" != xBASH; then
37244        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37245$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37246      fi
37247      # Try to locate tool using the code snippet
37248      if test -n "$ac_tool_prefix"; then
37249  for ac_prog in nm
37250  do
37251    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37252set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37254$as_echo_n "checking for $ac_word... " >&6; }
37255if ${ac_cv_prog_NM+:} false; then :
37256  $as_echo_n "(cached) " >&6
37257else
37258  if test -n "$NM"; then
37259  ac_cv_prog_NM="$NM" # Let the user override the test.
37260else
37261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37262for as_dir in $PATH
37263do
37264  IFS=$as_save_IFS
37265  test -z "$as_dir" && as_dir=.
37266    for ac_exec_ext in '' $ac_executable_extensions; do
37267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37268    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37270    break 2
37271  fi
37272done
37273  done
37274IFS=$as_save_IFS
37275
37276fi
37277fi
37278NM=$ac_cv_prog_NM
37279if test -n "$NM"; then
37280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37281$as_echo "$NM" >&6; }
37282else
37283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37284$as_echo "no" >&6; }
37285fi
37286
37287
37288    test -n "$NM" && break
37289  done
37290fi
37291if test -z "$NM"; then
37292  ac_ct_NM=$NM
37293  for ac_prog in nm
37294do
37295  # Extract the first word of "$ac_prog", so it can be a program name with args.
37296set dummy $ac_prog; ac_word=$2
37297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37298$as_echo_n "checking for $ac_word... " >&6; }
37299if ${ac_cv_prog_ac_ct_NM+:} false; then :
37300  $as_echo_n "(cached) " >&6
37301else
37302  if test -n "$ac_ct_NM"; then
37303  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37304else
37305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37306for as_dir in $PATH
37307do
37308  IFS=$as_save_IFS
37309  test -z "$as_dir" && as_dir=.
37310    for ac_exec_ext in '' $ac_executable_extensions; do
37311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37312    ac_cv_prog_ac_ct_NM="$ac_prog"
37313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37314    break 2
37315  fi
37316done
37317  done
37318IFS=$as_save_IFS
37319
37320fi
37321fi
37322ac_ct_NM=$ac_cv_prog_ac_ct_NM
37323if test -n "$ac_ct_NM"; then
37324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37325$as_echo "$ac_ct_NM" >&6; }
37326else
37327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37328$as_echo "no" >&6; }
37329fi
37330
37331
37332  test -n "$ac_ct_NM" && break
37333done
37334
37335  if test "x$ac_ct_NM" = x; then
37336    NM=""
37337  else
37338    case $cross_compiling:$ac_tool_warned in
37339yes:)
37340{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37341$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37342ac_tool_warned=yes ;;
37343esac
37344    NM=$ac_ct_NM
37345  fi
37346fi
37347
37348    else
37349      # If it succeeded, then it was overridden by the user. We will use it
37350      # for the tool.
37351
37352      # First remove it from the list of overridden variables, so we can test
37353      # for unknown variables in the end.
37354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37355
37356      # Check if the provided tool contains a complete path.
37357      tool_specified="$NM"
37358      tool_basename="${tool_specified##*/}"
37359      if test "x$tool_basename" = "x$tool_specified"; then
37360        # A command without a complete path is provided, search $PATH.
37361        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37362$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37363        # Extract the first word of "$tool_basename", so it can be a program name with args.
37364set dummy $tool_basename; ac_word=$2
37365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37366$as_echo_n "checking for $ac_word... " >&6; }
37367if ${ac_cv_path_NM+:} false; then :
37368  $as_echo_n "(cached) " >&6
37369else
37370  case $NM in
37371  [\\/]* | ?:[\\/]*)
37372  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37373  ;;
37374  *)
37375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37376for as_dir in $PATH
37377do
37378  IFS=$as_save_IFS
37379  test -z "$as_dir" && as_dir=.
37380    for ac_exec_ext in '' $ac_executable_extensions; do
37381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37382    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37384    break 2
37385  fi
37386done
37387  done
37388IFS=$as_save_IFS
37389
37390  ;;
37391esac
37392fi
37393NM=$ac_cv_path_NM
37394if test -n "$NM"; then
37395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37396$as_echo "$NM" >&6; }
37397else
37398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37399$as_echo "no" >&6; }
37400fi
37401
37402
37403        if test "x$NM" = x; then
37404          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37405        fi
37406      else
37407        # Otherwise we believe it is a complete path. Use it as it is.
37408        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37409$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37410        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37411$as_echo_n "checking for NM... " >&6; }
37412        if test ! -x "$tool_specified"; then
37413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37414$as_echo "not found" >&6; }
37415          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37416        fi
37417        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37418$as_echo "$tool_specified" >&6; }
37419      fi
37420    fi
37421  fi
37422
37423
37424
37425  # Only process if variable expands to non-empty
37426
37427  if test "x$NM" != x; then
37428    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37429
37430  # First separate the path from the arguments. This will split at the first
37431  # space.
37432  complete="$NM"
37433  path="${complete%% *}"
37434  tmp="$complete EOL"
37435  arguments="${tmp#* }"
37436
37437  # Input might be given as Windows format, start by converting to
37438  # unix format.
37439  new_path=`$CYGPATH -u "$path"`
37440
37441  # Now try to locate executable using which
37442  new_path=`$WHICH "$new_path" 2> /dev/null`
37443  # bat and cmd files are not always considered executable in cygwin causing which
37444  # to not find them
37445  if test "x$new_path" = x \
37446      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37447      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37448    new_path=`$CYGPATH -u "$path"`
37449  fi
37450  if test "x$new_path" = x; then
37451    # Oops. Which didn't find the executable.
37452    # The splitting of arguments from the executable at a space might have been incorrect,
37453    # since paths with space are more likely in Windows. Give it another try with the whole
37454    # argument.
37455    path="$complete"
37456    arguments="EOL"
37457    new_path=`$CYGPATH -u "$path"`
37458    new_path=`$WHICH "$new_path" 2> /dev/null`
37459    # bat and cmd files are not always considered executable in cygwin causing which
37460    # to not find them
37461    if test "x$new_path" = x \
37462        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37463        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37464      new_path=`$CYGPATH -u "$path"`
37465    fi
37466    if test "x$new_path" = x; then
37467      # It's still not found. Now this is an unrecoverable error.
37468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37469$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37470      has_space=`$ECHO "$complete" | $GREP " "`
37471      if test "x$has_space" != x; then
37472        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37473$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37474      fi
37475      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37476    fi
37477  fi
37478
37479  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37480  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37481  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37482  # "foo.exe" is OK but "foo" is an error.
37483  #
37484  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37485  # It is also a way to make sure we got the proper file name for the real test later on.
37486  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37487  if test "x$test_shortpath" = x; then
37488    # Short path failed, file does not exist as specified.
37489    # Try adding .exe or .cmd
37490    if test -f "${new_path}.exe"; then
37491      input_to_shortpath="${new_path}.exe"
37492    elif test -f "${new_path}.cmd"; then
37493      input_to_shortpath="${new_path}.cmd"
37494    else
37495      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37496$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37497      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37498$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37499      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37500    fi
37501  else
37502    input_to_shortpath="$new_path"
37503  fi
37504
37505  # Call helper function which possibly converts this using DOS-style short mode.
37506  # If so, the updated path is stored in $new_path.
37507  new_path="$input_to_shortpath"
37508
37509  input_path="$input_to_shortpath"
37510  # Check if we need to convert this using DOS-style short mode. If the path
37511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37512  # take no chances and rewrite it.
37513  # Note: m4 eats our [], so we need to use [ and ] instead.
37514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37515  if test "x$has_forbidden_chars" != x; then
37516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37517    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37518    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37519    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37520      # Going to short mode and back again did indeed matter. Since short mode is
37521      # case insensitive, let's make it lowercase to improve readability.
37522      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37523      # Now convert it back to Unix-style (cygpath)
37524      input_path=`$CYGPATH -u "$shortmode_path"`
37525      new_path="$input_path"
37526    fi
37527  fi
37528
37529  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37530  if test "x$test_cygdrive_prefix" = x; then
37531    # As a simple fix, exclude /usr/bin since it's not a real path.
37532    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37533      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37534      # a path prefixed by /cygdrive for fixpath to work.
37535      new_path="$CYGWIN_ROOT_PATH$input_path"
37536    fi
37537  fi
37538
37539  # remove trailing .exe if any
37540  new_path="${new_path/%.exe/}"
37541
37542    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37543
37544  # First separate the path from the arguments. This will split at the first
37545  # space.
37546  complete="$NM"
37547  path="${complete%% *}"
37548  tmp="$complete EOL"
37549  arguments="${tmp#* }"
37550
37551  # Input might be given as Windows format, start by converting to
37552  # unix format.
37553  new_path="$path"
37554
37555  windows_path="$new_path"
37556  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37557    unix_path=`$CYGPATH -u "$windows_path"`
37558    new_path="$unix_path"
37559  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37560    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37561    new_path="$unix_path"
37562  fi
37563
37564
37565  # Now try to locate executable using which
37566  new_path=`$WHICH "$new_path" 2> /dev/null`
37567
37568  if test "x$new_path" = x; then
37569    # Oops. Which didn't find the executable.
37570    # The splitting of arguments from the executable at a space might have been incorrect,
37571    # since paths with space are more likely in Windows. Give it another try with the whole
37572    # argument.
37573    path="$complete"
37574    arguments="EOL"
37575    new_path="$path"
37576
37577  windows_path="$new_path"
37578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37579    unix_path=`$CYGPATH -u "$windows_path"`
37580    new_path="$unix_path"
37581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37583    new_path="$unix_path"
37584  fi
37585
37586
37587    new_path=`$WHICH "$new_path" 2> /dev/null`
37588    # bat and cmd files are not always considered executable in MSYS causing which
37589    # to not find them
37590    if test "x$new_path" = x \
37591        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37592        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37593      new_path="$path"
37594
37595  windows_path="$new_path"
37596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37597    unix_path=`$CYGPATH -u "$windows_path"`
37598    new_path="$unix_path"
37599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37601    new_path="$unix_path"
37602  fi
37603
37604    fi
37605
37606    if test "x$new_path" = x; then
37607      # It's still not found. Now this is an unrecoverable error.
37608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37609$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37610      has_space=`$ECHO "$complete" | $GREP " "`
37611      if test "x$has_space" != x; then
37612        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37613$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37614      fi
37615      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37616    fi
37617  fi
37618
37619  # Now new_path has a complete unix path to the binary
37620  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37621    # Keep paths in /bin as-is, but remove trailing .exe if any
37622    new_path="${new_path/%.exe/}"
37623    # Do not save /bin paths to all_fixpath_prefixes!
37624  else
37625    # Not in mixed or Windows style, start by that.
37626    new_path=`cmd //c echo $new_path`
37627
37628  input_path="$new_path"
37629  # Check if we need to convert this using DOS-style short mode. If the path
37630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37631  # take no chances and rewrite it.
37632  # Note: m4 eats our [], so we need to use [ and ] instead.
37633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37634  if test "x$has_forbidden_chars" != x; then
37635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37637  fi
37638
37639    # Output is in $new_path
37640
37641  windows_path="$new_path"
37642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37643    unix_path=`$CYGPATH -u "$windows_path"`
37644    new_path="$unix_path"
37645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37647    new_path="$unix_path"
37648  fi
37649
37650    # remove trailing .exe if any
37651    new_path="${new_path/%.exe/}"
37652
37653    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37654    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37655  fi
37656
37657    else
37658      # We're on a unix platform. Hooray! :)
37659      # First separate the path from the arguments. This will split at the first
37660      # space.
37661      complete="$NM"
37662      path="${complete%% *}"
37663      tmp="$complete EOL"
37664      arguments="${tmp#* }"
37665
37666      # Cannot rely on the command "which" here since it doesn't always work.
37667      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37668      if test -z "$is_absolute_path"; then
37669        # Path to executable is not absolute. Find it.
37670        IFS_save="$IFS"
37671        IFS=:
37672        for p in $PATH; do
37673          if test -f "$p/$path" && test -x "$p/$path"; then
37674            new_path="$p/$path"
37675            break
37676          fi
37677        done
37678        IFS="$IFS_save"
37679      else
37680        # This is an absolute path, we can use it without further modifications.
37681        new_path="$path"
37682      fi
37683
37684      if test "x$new_path" = x; then
37685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37686$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37687        has_space=`$ECHO "$complete" | $GREP " "`
37688        if test "x$has_space" != x; then
37689          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37690$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37691        fi
37692        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37693      fi
37694    fi
37695
37696    # Now join together the path and the arguments once again
37697    if test "x$arguments" != xEOL; then
37698      new_complete="$new_path ${arguments% *}"
37699    else
37700      new_complete="$new_path"
37701    fi
37702
37703    if test "x$complete" != "x$new_complete"; then
37704      NM="$new_complete"
37705      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37706$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37707    fi
37708  fi
37709
37710    GNM="$NM"
37711
37712  fi
37713
37714  # objcopy is used for moving debug symbols to separate files when
37715  # full debug symbols are enabled.
37716  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37717
37718
37719  # Publish this variable in the help.
37720
37721
37722  if test "x$OBJCOPY" = x; then
37723    # The variable is not set by user, try to locate tool using the code snippet
37724    if test -n "$ac_tool_prefix"; then
37725  for ac_prog in gobjcopy objcopy
37726  do
37727    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37728set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37730$as_echo_n "checking for $ac_word... " >&6; }
37731if ${ac_cv_prog_OBJCOPY+:} false; then :
37732  $as_echo_n "(cached) " >&6
37733else
37734  if test -n "$OBJCOPY"; then
37735  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37736else
37737as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37738for as_dir in $PATH
37739do
37740  IFS=$as_save_IFS
37741  test -z "$as_dir" && as_dir=.
37742    for ac_exec_ext in '' $ac_executable_extensions; do
37743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37744    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37746    break 2
37747  fi
37748done
37749  done
37750IFS=$as_save_IFS
37751
37752fi
37753fi
37754OBJCOPY=$ac_cv_prog_OBJCOPY
37755if test -n "$OBJCOPY"; then
37756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37757$as_echo "$OBJCOPY" >&6; }
37758else
37759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37760$as_echo "no" >&6; }
37761fi
37762
37763
37764    test -n "$OBJCOPY" && break
37765  done
37766fi
37767if test -z "$OBJCOPY"; then
37768  ac_ct_OBJCOPY=$OBJCOPY
37769  for ac_prog in gobjcopy objcopy
37770do
37771  # Extract the first word of "$ac_prog", so it can be a program name with args.
37772set dummy $ac_prog; ac_word=$2
37773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37774$as_echo_n "checking for $ac_word... " >&6; }
37775if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37776  $as_echo_n "(cached) " >&6
37777else
37778  if test -n "$ac_ct_OBJCOPY"; then
37779  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37780else
37781as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37782for as_dir in $PATH
37783do
37784  IFS=$as_save_IFS
37785  test -z "$as_dir" && as_dir=.
37786    for ac_exec_ext in '' $ac_executable_extensions; do
37787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37788    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37790    break 2
37791  fi
37792done
37793  done
37794IFS=$as_save_IFS
37795
37796fi
37797fi
37798ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37799if test -n "$ac_ct_OBJCOPY"; then
37800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37801$as_echo "$ac_ct_OBJCOPY" >&6; }
37802else
37803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37804$as_echo "no" >&6; }
37805fi
37806
37807
37808  test -n "$ac_ct_OBJCOPY" && break
37809done
37810
37811  if test "x$ac_ct_OBJCOPY" = x; then
37812    OBJCOPY=""
37813  else
37814    case $cross_compiling:$ac_tool_warned in
37815yes:)
37816{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37817$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37818ac_tool_warned=yes ;;
37819esac
37820    OBJCOPY=$ac_ct_OBJCOPY
37821  fi
37822fi
37823
37824  else
37825    # The variable is set, but is it from the command line or the environment?
37826
37827    # Try to remove the string !OBJCOPY! from our list.
37828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37830      # If it failed, the variable was not from the command line. Ignore it,
37831      # but warn the user (except for BASH, which is always set by the calling BASH).
37832      if test "xOBJCOPY" != xBASH; then
37833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37834$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37835      fi
37836      # Try to locate tool using the code snippet
37837      if test -n "$ac_tool_prefix"; then
37838  for ac_prog in gobjcopy objcopy
37839  do
37840    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37841set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37843$as_echo_n "checking for $ac_word... " >&6; }
37844if ${ac_cv_prog_OBJCOPY+:} false; then :
37845  $as_echo_n "(cached) " >&6
37846else
37847  if test -n "$OBJCOPY"; then
37848  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37849else
37850as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37851for as_dir in $PATH
37852do
37853  IFS=$as_save_IFS
37854  test -z "$as_dir" && as_dir=.
37855    for ac_exec_ext in '' $ac_executable_extensions; do
37856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37857    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37859    break 2
37860  fi
37861done
37862  done
37863IFS=$as_save_IFS
37864
37865fi
37866fi
37867OBJCOPY=$ac_cv_prog_OBJCOPY
37868if test -n "$OBJCOPY"; then
37869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37870$as_echo "$OBJCOPY" >&6; }
37871else
37872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37873$as_echo "no" >&6; }
37874fi
37875
37876
37877    test -n "$OBJCOPY" && break
37878  done
37879fi
37880if test -z "$OBJCOPY"; then
37881  ac_ct_OBJCOPY=$OBJCOPY
37882  for ac_prog in gobjcopy objcopy
37883do
37884  # Extract the first word of "$ac_prog", so it can be a program name with args.
37885set dummy $ac_prog; ac_word=$2
37886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37887$as_echo_n "checking for $ac_word... " >&6; }
37888if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37889  $as_echo_n "(cached) " >&6
37890else
37891  if test -n "$ac_ct_OBJCOPY"; then
37892  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37893else
37894as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37895for as_dir in $PATH
37896do
37897  IFS=$as_save_IFS
37898  test -z "$as_dir" && as_dir=.
37899    for ac_exec_ext in '' $ac_executable_extensions; do
37900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37901    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37903    break 2
37904  fi
37905done
37906  done
37907IFS=$as_save_IFS
37908
37909fi
37910fi
37911ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37912if test -n "$ac_ct_OBJCOPY"; then
37913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37914$as_echo "$ac_ct_OBJCOPY" >&6; }
37915else
37916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37917$as_echo "no" >&6; }
37918fi
37919
37920
37921  test -n "$ac_ct_OBJCOPY" && break
37922done
37923
37924  if test "x$ac_ct_OBJCOPY" = x; then
37925    OBJCOPY=""
37926  else
37927    case $cross_compiling:$ac_tool_warned in
37928yes:)
37929{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37930$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37931ac_tool_warned=yes ;;
37932esac
37933    OBJCOPY=$ac_ct_OBJCOPY
37934  fi
37935fi
37936
37937    else
37938      # If it succeeded, then it was overridden by the user. We will use it
37939      # for the tool.
37940
37941      # First remove it from the list of overridden variables, so we can test
37942      # for unknown variables in the end.
37943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37944
37945      # Check if the provided tool contains a complete path.
37946      tool_specified="$OBJCOPY"
37947      tool_basename="${tool_specified##*/}"
37948      if test "x$tool_basename" = "x$tool_specified"; then
37949        # A command without a complete path is provided, search $PATH.
37950        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37951$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37952        # Extract the first word of "$tool_basename", so it can be a program name with args.
37953set dummy $tool_basename; ac_word=$2
37954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37955$as_echo_n "checking for $ac_word... " >&6; }
37956if ${ac_cv_path_OBJCOPY+:} false; then :
37957  $as_echo_n "(cached) " >&6
37958else
37959  case $OBJCOPY in
37960  [\\/]* | ?:[\\/]*)
37961  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37962  ;;
37963  *)
37964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37965for as_dir in $PATH
37966do
37967  IFS=$as_save_IFS
37968  test -z "$as_dir" && as_dir=.
37969    for ac_exec_ext in '' $ac_executable_extensions; do
37970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37971    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37973    break 2
37974  fi
37975done
37976  done
37977IFS=$as_save_IFS
37978
37979  ;;
37980esac
37981fi
37982OBJCOPY=$ac_cv_path_OBJCOPY
37983if test -n "$OBJCOPY"; then
37984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37985$as_echo "$OBJCOPY" >&6; }
37986else
37987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37988$as_echo "no" >&6; }
37989fi
37990
37991
37992        if test "x$OBJCOPY" = x; then
37993          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37994        fi
37995      else
37996        # Otherwise we believe it is a complete path. Use it as it is.
37997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37998$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38000$as_echo_n "checking for OBJCOPY... " >&6; }
38001        if test ! -x "$tool_specified"; then
38002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38003$as_echo "not found" >&6; }
38004          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38005        fi
38006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38007$as_echo "$tool_specified" >&6; }
38008      fi
38009    fi
38010  fi
38011
38012
38013    # Only call fixup if objcopy was found.
38014    if test -n "$OBJCOPY"; then
38015
38016  # Only process if variable expands to non-empty
38017
38018  if test "x$OBJCOPY" != x; then
38019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38020
38021  # First separate the path from the arguments. This will split at the first
38022  # space.
38023  complete="$OBJCOPY"
38024  path="${complete%% *}"
38025  tmp="$complete EOL"
38026  arguments="${tmp#* }"
38027
38028  # Input might be given as Windows format, start by converting to
38029  # unix format.
38030  new_path=`$CYGPATH -u "$path"`
38031
38032  # Now try to locate executable using which
38033  new_path=`$WHICH "$new_path" 2> /dev/null`
38034  # bat and cmd files are not always considered executable in cygwin causing which
38035  # to not find them
38036  if test "x$new_path" = x \
38037      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38038      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38039    new_path=`$CYGPATH -u "$path"`
38040  fi
38041  if test "x$new_path" = x; then
38042    # Oops. Which didn't find the executable.
38043    # The splitting of arguments from the executable at a space might have been incorrect,
38044    # since paths with space are more likely in Windows. Give it another try with the whole
38045    # argument.
38046    path="$complete"
38047    arguments="EOL"
38048    new_path=`$CYGPATH -u "$path"`
38049    new_path=`$WHICH "$new_path" 2> /dev/null`
38050    # bat and cmd files are not always considered executable in cygwin causing which
38051    # to not find them
38052    if test "x$new_path" = x \
38053        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38054        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38055      new_path=`$CYGPATH -u "$path"`
38056    fi
38057    if test "x$new_path" = x; then
38058      # It's still not found. Now this is an unrecoverable error.
38059      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38060$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38061      has_space=`$ECHO "$complete" | $GREP " "`
38062      if test "x$has_space" != x; then
38063        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38064$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38065      fi
38066      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38067    fi
38068  fi
38069
38070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38073  # "foo.exe" is OK but "foo" is an error.
38074  #
38075  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38076  # It is also a way to make sure we got the proper file name for the real test later on.
38077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38078  if test "x$test_shortpath" = x; then
38079    # Short path failed, file does not exist as specified.
38080    # Try adding .exe or .cmd
38081    if test -f "${new_path}.exe"; then
38082      input_to_shortpath="${new_path}.exe"
38083    elif test -f "${new_path}.cmd"; then
38084      input_to_shortpath="${new_path}.cmd"
38085    else
38086      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38087$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38088      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38089$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38090      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38091    fi
38092  else
38093    input_to_shortpath="$new_path"
38094  fi
38095
38096  # Call helper function which possibly converts this using DOS-style short mode.
38097  # If so, the updated path is stored in $new_path.
38098  new_path="$input_to_shortpath"
38099
38100  input_path="$input_to_shortpath"
38101  # Check if we need to convert this using DOS-style short mode. If the path
38102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38103  # take no chances and rewrite it.
38104  # Note: m4 eats our [], so we need to use [ and ] instead.
38105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38106  if test "x$has_forbidden_chars" != x; then
38107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38111      # Going to short mode and back again did indeed matter. Since short mode is
38112      # case insensitive, let's make it lowercase to improve readability.
38113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38114      # Now convert it back to Unix-style (cygpath)
38115      input_path=`$CYGPATH -u "$shortmode_path"`
38116      new_path="$input_path"
38117    fi
38118  fi
38119
38120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38121  if test "x$test_cygdrive_prefix" = x; then
38122    # As a simple fix, exclude /usr/bin since it's not a real path.
38123    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38125      # a path prefixed by /cygdrive for fixpath to work.
38126      new_path="$CYGWIN_ROOT_PATH$input_path"
38127    fi
38128  fi
38129
38130  # remove trailing .exe if any
38131  new_path="${new_path/%.exe/}"
38132
38133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38134
38135  # First separate the path from the arguments. This will split at the first
38136  # space.
38137  complete="$OBJCOPY"
38138  path="${complete%% *}"
38139  tmp="$complete EOL"
38140  arguments="${tmp#* }"
38141
38142  # Input might be given as Windows format, start by converting to
38143  # unix format.
38144  new_path="$path"
38145
38146  windows_path="$new_path"
38147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38148    unix_path=`$CYGPATH -u "$windows_path"`
38149    new_path="$unix_path"
38150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38152    new_path="$unix_path"
38153  fi
38154
38155
38156  # Now try to locate executable using which
38157  new_path=`$WHICH "$new_path" 2> /dev/null`
38158
38159  if test "x$new_path" = x; then
38160    # Oops. Which didn't find the executable.
38161    # The splitting of arguments from the executable at a space might have been incorrect,
38162    # since paths with space are more likely in Windows. Give it another try with the whole
38163    # argument.
38164    path="$complete"
38165    arguments="EOL"
38166    new_path="$path"
38167
38168  windows_path="$new_path"
38169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38170    unix_path=`$CYGPATH -u "$windows_path"`
38171    new_path="$unix_path"
38172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38174    new_path="$unix_path"
38175  fi
38176
38177
38178    new_path=`$WHICH "$new_path" 2> /dev/null`
38179    # bat and cmd files are not always considered executable in MSYS causing which
38180    # to not find them
38181    if test "x$new_path" = x \
38182        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38183        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38184      new_path="$path"
38185
38186  windows_path="$new_path"
38187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38188    unix_path=`$CYGPATH -u "$windows_path"`
38189    new_path="$unix_path"
38190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38192    new_path="$unix_path"
38193  fi
38194
38195    fi
38196
38197    if test "x$new_path" = x; then
38198      # It's still not found. Now this is an unrecoverable error.
38199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38200$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38201      has_space=`$ECHO "$complete" | $GREP " "`
38202      if test "x$has_space" != x; then
38203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38205      fi
38206      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38207    fi
38208  fi
38209
38210  # Now new_path has a complete unix path to the binary
38211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38212    # Keep paths in /bin as-is, but remove trailing .exe if any
38213    new_path="${new_path/%.exe/}"
38214    # Do not save /bin paths to all_fixpath_prefixes!
38215  else
38216    # Not in mixed or Windows style, start by that.
38217    new_path=`cmd //c echo $new_path`
38218
38219  input_path="$new_path"
38220  # Check if we need to convert this using DOS-style short mode. If the path
38221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38222  # take no chances and rewrite it.
38223  # Note: m4 eats our [], so we need to use [ and ] instead.
38224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38225  if test "x$has_forbidden_chars" != x; then
38226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38228  fi
38229
38230    # Output is in $new_path
38231
38232  windows_path="$new_path"
38233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38234    unix_path=`$CYGPATH -u "$windows_path"`
38235    new_path="$unix_path"
38236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38238    new_path="$unix_path"
38239  fi
38240
38241    # remove trailing .exe if any
38242    new_path="${new_path/%.exe/}"
38243
38244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38246  fi
38247
38248    else
38249      # We're on a unix platform. Hooray! :)
38250      # First separate the path from the arguments. This will split at the first
38251      # space.
38252      complete="$OBJCOPY"
38253      path="${complete%% *}"
38254      tmp="$complete EOL"
38255      arguments="${tmp#* }"
38256
38257      # Cannot rely on the command "which" here since it doesn't always work.
38258      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38259      if test -z "$is_absolute_path"; then
38260        # Path to executable is not absolute. Find it.
38261        IFS_save="$IFS"
38262        IFS=:
38263        for p in $PATH; do
38264          if test -f "$p/$path" && test -x "$p/$path"; then
38265            new_path="$p/$path"
38266            break
38267          fi
38268        done
38269        IFS="$IFS_save"
38270      else
38271        # This is an absolute path, we can use it without further modifications.
38272        new_path="$path"
38273      fi
38274
38275      if test "x$new_path" = x; then
38276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38277$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38278        has_space=`$ECHO "$complete" | $GREP " "`
38279        if test "x$has_space" != x; then
38280          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38282        fi
38283        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38284      fi
38285    fi
38286
38287    # Now join together the path and the arguments once again
38288    if test "x$arguments" != xEOL; then
38289      new_complete="$new_path ${arguments% *}"
38290    else
38291      new_complete="$new_path"
38292    fi
38293
38294    if test "x$complete" != "x$new_complete"; then
38295      OBJCOPY="$new_complete"
38296      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38297$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38298    fi
38299  fi
38300
38301    fi
38302  fi
38303
38304
38305
38306  # Publish this variable in the help.
38307
38308
38309  if test "x$OBJDUMP" = x; then
38310    # The variable is not set by user, try to locate tool using the code snippet
38311    if test -n "$ac_tool_prefix"; then
38312  for ac_prog in gobjdump objdump
38313  do
38314    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38315set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38317$as_echo_n "checking for $ac_word... " >&6; }
38318if ${ac_cv_prog_OBJDUMP+:} false; then :
38319  $as_echo_n "(cached) " >&6
38320else
38321  if test -n "$OBJDUMP"; then
38322  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38323else
38324as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38325for as_dir in $PATH
38326do
38327  IFS=$as_save_IFS
38328  test -z "$as_dir" && as_dir=.
38329    for ac_exec_ext in '' $ac_executable_extensions; do
38330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38331    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38333    break 2
38334  fi
38335done
38336  done
38337IFS=$as_save_IFS
38338
38339fi
38340fi
38341OBJDUMP=$ac_cv_prog_OBJDUMP
38342if test -n "$OBJDUMP"; then
38343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38344$as_echo "$OBJDUMP" >&6; }
38345else
38346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38347$as_echo "no" >&6; }
38348fi
38349
38350
38351    test -n "$OBJDUMP" && break
38352  done
38353fi
38354if test -z "$OBJDUMP"; then
38355  ac_ct_OBJDUMP=$OBJDUMP
38356  for ac_prog in gobjdump objdump
38357do
38358  # Extract the first word of "$ac_prog", so it can be a program name with args.
38359set dummy $ac_prog; ac_word=$2
38360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38361$as_echo_n "checking for $ac_word... " >&6; }
38362if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38363  $as_echo_n "(cached) " >&6
38364else
38365  if test -n "$ac_ct_OBJDUMP"; then
38366  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38367else
38368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38369for as_dir in $PATH
38370do
38371  IFS=$as_save_IFS
38372  test -z "$as_dir" && as_dir=.
38373    for ac_exec_ext in '' $ac_executable_extensions; do
38374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38375    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38377    break 2
38378  fi
38379done
38380  done
38381IFS=$as_save_IFS
38382
38383fi
38384fi
38385ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38386if test -n "$ac_ct_OBJDUMP"; then
38387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38388$as_echo "$ac_ct_OBJDUMP" >&6; }
38389else
38390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38391$as_echo "no" >&6; }
38392fi
38393
38394
38395  test -n "$ac_ct_OBJDUMP" && break
38396done
38397
38398  if test "x$ac_ct_OBJDUMP" = x; then
38399    OBJDUMP=""
38400  else
38401    case $cross_compiling:$ac_tool_warned in
38402yes:)
38403{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38404$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38405ac_tool_warned=yes ;;
38406esac
38407    OBJDUMP=$ac_ct_OBJDUMP
38408  fi
38409fi
38410
38411  else
38412    # The variable is set, but is it from the command line or the environment?
38413
38414    # Try to remove the string !OBJDUMP! from our list.
38415    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38416    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38417      # If it failed, the variable was not from the command line. Ignore it,
38418      # but warn the user (except for BASH, which is always set by the calling BASH).
38419      if test "xOBJDUMP" != xBASH; then
38420        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38421$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38422      fi
38423      # Try to locate tool using the code snippet
38424      if test -n "$ac_tool_prefix"; then
38425  for ac_prog in gobjdump objdump
38426  do
38427    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38428set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38430$as_echo_n "checking for $ac_word... " >&6; }
38431if ${ac_cv_prog_OBJDUMP+:} false; then :
38432  $as_echo_n "(cached) " >&6
38433else
38434  if test -n "$OBJDUMP"; then
38435  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38436else
38437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38438for as_dir in $PATH
38439do
38440  IFS=$as_save_IFS
38441  test -z "$as_dir" && as_dir=.
38442    for ac_exec_ext in '' $ac_executable_extensions; do
38443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38444    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38446    break 2
38447  fi
38448done
38449  done
38450IFS=$as_save_IFS
38451
38452fi
38453fi
38454OBJDUMP=$ac_cv_prog_OBJDUMP
38455if test -n "$OBJDUMP"; then
38456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38457$as_echo "$OBJDUMP" >&6; }
38458else
38459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38460$as_echo "no" >&6; }
38461fi
38462
38463
38464    test -n "$OBJDUMP" && break
38465  done
38466fi
38467if test -z "$OBJDUMP"; then
38468  ac_ct_OBJDUMP=$OBJDUMP
38469  for ac_prog in gobjdump objdump
38470do
38471  # Extract the first word of "$ac_prog", so it can be a program name with args.
38472set dummy $ac_prog; ac_word=$2
38473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38474$as_echo_n "checking for $ac_word... " >&6; }
38475if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38476  $as_echo_n "(cached) " >&6
38477else
38478  if test -n "$ac_ct_OBJDUMP"; then
38479  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38480else
38481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38482for as_dir in $PATH
38483do
38484  IFS=$as_save_IFS
38485  test -z "$as_dir" && as_dir=.
38486    for ac_exec_ext in '' $ac_executable_extensions; do
38487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38488    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38490    break 2
38491  fi
38492done
38493  done
38494IFS=$as_save_IFS
38495
38496fi
38497fi
38498ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38499if test -n "$ac_ct_OBJDUMP"; then
38500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38501$as_echo "$ac_ct_OBJDUMP" >&6; }
38502else
38503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38504$as_echo "no" >&6; }
38505fi
38506
38507
38508  test -n "$ac_ct_OBJDUMP" && break
38509done
38510
38511  if test "x$ac_ct_OBJDUMP" = x; then
38512    OBJDUMP=""
38513  else
38514    case $cross_compiling:$ac_tool_warned in
38515yes:)
38516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38518ac_tool_warned=yes ;;
38519esac
38520    OBJDUMP=$ac_ct_OBJDUMP
38521  fi
38522fi
38523
38524    else
38525      # If it succeeded, then it was overridden by the user. We will use it
38526      # for the tool.
38527
38528      # First remove it from the list of overridden variables, so we can test
38529      # for unknown variables in the end.
38530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38531
38532      # Check if the provided tool contains a complete path.
38533      tool_specified="$OBJDUMP"
38534      tool_basename="${tool_specified##*/}"
38535      if test "x$tool_basename" = "x$tool_specified"; then
38536        # A command without a complete path is provided, search $PATH.
38537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38538$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38539        # Extract the first word of "$tool_basename", so it can be a program name with args.
38540set dummy $tool_basename; ac_word=$2
38541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38542$as_echo_n "checking for $ac_word... " >&6; }
38543if ${ac_cv_path_OBJDUMP+:} false; then :
38544  $as_echo_n "(cached) " >&6
38545else
38546  case $OBJDUMP in
38547  [\\/]* | ?:[\\/]*)
38548  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38549  ;;
38550  *)
38551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38552for as_dir in $PATH
38553do
38554  IFS=$as_save_IFS
38555  test -z "$as_dir" && as_dir=.
38556    for ac_exec_ext in '' $ac_executable_extensions; do
38557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38558    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38560    break 2
38561  fi
38562done
38563  done
38564IFS=$as_save_IFS
38565
38566  ;;
38567esac
38568fi
38569OBJDUMP=$ac_cv_path_OBJDUMP
38570if test -n "$OBJDUMP"; then
38571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38572$as_echo "$OBJDUMP" >&6; }
38573else
38574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38575$as_echo "no" >&6; }
38576fi
38577
38578
38579        if test "x$OBJDUMP" = x; then
38580          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38581        fi
38582      else
38583        # Otherwise we believe it is a complete path. Use it as it is.
38584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38585$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38587$as_echo_n "checking for OBJDUMP... " >&6; }
38588        if test ! -x "$tool_specified"; then
38589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38590$as_echo "not found" >&6; }
38591          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38592        fi
38593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38594$as_echo "$tool_specified" >&6; }
38595      fi
38596    fi
38597  fi
38598
38599
38600  if test "x$OBJDUMP" != x; then
38601    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38602    # bails if argument is missing.
38603
38604  # Only process if variable expands to non-empty
38605
38606  if test "x$OBJDUMP" != x; then
38607    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38608
38609  # First separate the path from the arguments. This will split at the first
38610  # space.
38611  complete="$OBJDUMP"
38612  path="${complete%% *}"
38613  tmp="$complete EOL"
38614  arguments="${tmp#* }"
38615
38616  # Input might be given as Windows format, start by converting to
38617  # unix format.
38618  new_path=`$CYGPATH -u "$path"`
38619
38620  # Now try to locate executable using which
38621  new_path=`$WHICH "$new_path" 2> /dev/null`
38622  # bat and cmd files are not always considered executable in cygwin causing which
38623  # to not find them
38624  if test "x$new_path" = x \
38625      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38626      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38627    new_path=`$CYGPATH -u "$path"`
38628  fi
38629  if test "x$new_path" = x; then
38630    # Oops. Which didn't find the executable.
38631    # The splitting of arguments from the executable at a space might have been incorrect,
38632    # since paths with space are more likely in Windows. Give it another try with the whole
38633    # argument.
38634    path="$complete"
38635    arguments="EOL"
38636    new_path=`$CYGPATH -u "$path"`
38637    new_path=`$WHICH "$new_path" 2> /dev/null`
38638    # bat and cmd files are not always considered executable in cygwin causing which
38639    # to not find them
38640    if test "x$new_path" = x \
38641        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38642        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38643      new_path=`$CYGPATH -u "$path"`
38644    fi
38645    if test "x$new_path" = x; then
38646      # It's still not found. Now this is an unrecoverable error.
38647      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38648$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38649      has_space=`$ECHO "$complete" | $GREP " "`
38650      if test "x$has_space" != x; then
38651        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38652$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38653      fi
38654      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38655    fi
38656  fi
38657
38658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38661  # "foo.exe" is OK but "foo" is an error.
38662  #
38663  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38664  # It is also a way to make sure we got the proper file name for the real test later on.
38665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38666  if test "x$test_shortpath" = x; then
38667    # Short path failed, file does not exist as specified.
38668    # Try adding .exe or .cmd
38669    if test -f "${new_path}.exe"; then
38670      input_to_shortpath="${new_path}.exe"
38671    elif test -f "${new_path}.cmd"; then
38672      input_to_shortpath="${new_path}.cmd"
38673    else
38674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38675$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38676      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38677$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38678      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38679    fi
38680  else
38681    input_to_shortpath="$new_path"
38682  fi
38683
38684  # Call helper function which possibly converts this using DOS-style short mode.
38685  # If so, the updated path is stored in $new_path.
38686  new_path="$input_to_shortpath"
38687
38688  input_path="$input_to_shortpath"
38689  # Check if we need to convert this using DOS-style short mode. If the path
38690  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38691  # take no chances and rewrite it.
38692  # Note: m4 eats our [], so we need to use [ and ] instead.
38693  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38694  if test "x$has_forbidden_chars" != x; then
38695    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38696    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38697    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38698    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38699      # Going to short mode and back again did indeed matter. Since short mode is
38700      # case insensitive, let's make it lowercase to improve readability.
38701      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38702      # Now convert it back to Unix-style (cygpath)
38703      input_path=`$CYGPATH -u "$shortmode_path"`
38704      new_path="$input_path"
38705    fi
38706  fi
38707
38708  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38709  if test "x$test_cygdrive_prefix" = x; then
38710    # As a simple fix, exclude /usr/bin since it's not a real path.
38711    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38712      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38713      # a path prefixed by /cygdrive for fixpath to work.
38714      new_path="$CYGWIN_ROOT_PATH$input_path"
38715    fi
38716  fi
38717
38718  # remove trailing .exe if any
38719  new_path="${new_path/%.exe/}"
38720
38721    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38722
38723  # First separate the path from the arguments. This will split at the first
38724  # space.
38725  complete="$OBJDUMP"
38726  path="${complete%% *}"
38727  tmp="$complete EOL"
38728  arguments="${tmp#* }"
38729
38730  # Input might be given as Windows format, start by converting to
38731  # unix format.
38732  new_path="$path"
38733
38734  windows_path="$new_path"
38735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38736    unix_path=`$CYGPATH -u "$windows_path"`
38737    new_path="$unix_path"
38738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38740    new_path="$unix_path"
38741  fi
38742
38743
38744  # Now try to locate executable using which
38745  new_path=`$WHICH "$new_path" 2> /dev/null`
38746
38747  if test "x$new_path" = x; then
38748    # Oops. Which didn't find the executable.
38749    # The splitting of arguments from the executable at a space might have been incorrect,
38750    # since paths with space are more likely in Windows. Give it another try with the whole
38751    # argument.
38752    path="$complete"
38753    arguments="EOL"
38754    new_path="$path"
38755
38756  windows_path="$new_path"
38757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38758    unix_path=`$CYGPATH -u "$windows_path"`
38759    new_path="$unix_path"
38760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38762    new_path="$unix_path"
38763  fi
38764
38765
38766    new_path=`$WHICH "$new_path" 2> /dev/null`
38767    # bat and cmd files are not always considered executable in MSYS causing which
38768    # to not find them
38769    if test "x$new_path" = x \
38770        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38771        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38772      new_path="$path"
38773
38774  windows_path="$new_path"
38775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38776    unix_path=`$CYGPATH -u "$windows_path"`
38777    new_path="$unix_path"
38778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38780    new_path="$unix_path"
38781  fi
38782
38783    fi
38784
38785    if test "x$new_path" = x; then
38786      # It's still not found. Now this is an unrecoverable error.
38787      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38788$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38789      has_space=`$ECHO "$complete" | $GREP " "`
38790      if test "x$has_space" != x; then
38791        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38792$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38793      fi
38794      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38795    fi
38796  fi
38797
38798  # Now new_path has a complete unix path to the binary
38799  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38800    # Keep paths in /bin as-is, but remove trailing .exe if any
38801    new_path="${new_path/%.exe/}"
38802    # Do not save /bin paths to all_fixpath_prefixes!
38803  else
38804    # Not in mixed or Windows style, start by that.
38805    new_path=`cmd //c echo $new_path`
38806
38807  input_path="$new_path"
38808  # Check if we need to convert this using DOS-style short mode. If the path
38809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38810  # take no chances and rewrite it.
38811  # Note: m4 eats our [], so we need to use [ and ] instead.
38812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38813  if test "x$has_forbidden_chars" != x; then
38814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38815    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38816  fi
38817
38818    # Output is in $new_path
38819
38820  windows_path="$new_path"
38821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38822    unix_path=`$CYGPATH -u "$windows_path"`
38823    new_path="$unix_path"
38824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38826    new_path="$unix_path"
38827  fi
38828
38829    # remove trailing .exe if any
38830    new_path="${new_path/%.exe/}"
38831
38832    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38833    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38834  fi
38835
38836    else
38837      # We're on a unix platform. Hooray! :)
38838      # First separate the path from the arguments. This will split at the first
38839      # space.
38840      complete="$OBJDUMP"
38841      path="${complete%% *}"
38842      tmp="$complete EOL"
38843      arguments="${tmp#* }"
38844
38845      # Cannot rely on the command "which" here since it doesn't always work.
38846      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38847      if test -z "$is_absolute_path"; then
38848        # Path to executable is not absolute. Find it.
38849        IFS_save="$IFS"
38850        IFS=:
38851        for p in $PATH; do
38852          if test -f "$p/$path" && test -x "$p/$path"; then
38853            new_path="$p/$path"
38854            break
38855          fi
38856        done
38857        IFS="$IFS_save"
38858      else
38859        # This is an absolute path, we can use it without further modifications.
38860        new_path="$path"
38861      fi
38862
38863      if test "x$new_path" = x; then
38864        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38865$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38866        has_space=`$ECHO "$complete" | $GREP " "`
38867        if test "x$has_space" != x; then
38868          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38869$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38870        fi
38871        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38872      fi
38873    fi
38874
38875    # Now join together the path and the arguments once again
38876    if test "x$arguments" != xEOL; then
38877      new_complete="$new_path ${arguments% *}"
38878    else
38879      new_complete="$new_path"
38880    fi
38881
38882    if test "x$complete" != "x$new_complete"; then
38883      OBJDUMP="$new_complete"
38884      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38885$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38886    fi
38887  fi
38888
38889  fi
38890
38891
38892  # Restore old path.
38893  PATH="$OLD_PATH"
38894
38895  # Restore the flags to the user specified values.
38896  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38897  CFLAGS="$ORG_CFLAGS"
38898  CXXFLAGS="$ORG_CXXFLAGS"
38899
38900
38901# Finally do some processing after the detection phase
38902
38903  if test "x$COMPILE_TYPE" = "xcross"; then
38904    # Now we need to find a C/C++ compiler that can build executables for the
38905    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38906    # used once. Also, we need to do this without adding a tools dir to the
38907    # path, otherwise we might pick up cross-compilers which don't use standard
38908    # naming.
38909
38910    # FIXME: we should list the discovered compilers as an exclude pattern!
38911    # If we do that, we can do this detection before POST_DETECTION, and still
38912    # find the build compilers in the tools dir, if needed.
38913
38914
38915  # Publish this variable in the help.
38916
38917
38918  if test "x$BUILD_CC" = x; then
38919    # The variable is not set by user, try to locate tool using the code snippet
38920    for ac_prog in cl cc gcc
38921do
38922  # Extract the first word of "$ac_prog", so it can be a program name with args.
38923set dummy $ac_prog; ac_word=$2
38924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38925$as_echo_n "checking for $ac_word... " >&6; }
38926if ${ac_cv_path_BUILD_CC+:} false; then :
38927  $as_echo_n "(cached) " >&6
38928else
38929  case $BUILD_CC in
38930  [\\/]* | ?:[\\/]*)
38931  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38932  ;;
38933  *)
38934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38935for as_dir in $PATH
38936do
38937  IFS=$as_save_IFS
38938  test -z "$as_dir" && as_dir=.
38939    for ac_exec_ext in '' $ac_executable_extensions; do
38940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38941    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38943    break 2
38944  fi
38945done
38946  done
38947IFS=$as_save_IFS
38948
38949  ;;
38950esac
38951fi
38952BUILD_CC=$ac_cv_path_BUILD_CC
38953if test -n "$BUILD_CC"; then
38954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38955$as_echo "$BUILD_CC" >&6; }
38956else
38957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38958$as_echo "no" >&6; }
38959fi
38960
38961
38962  test -n "$BUILD_CC" && break
38963done
38964
38965  else
38966    # The variable is set, but is it from the command line or the environment?
38967
38968    # Try to remove the string !BUILD_CC! from our list.
38969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38971      # If it failed, the variable was not from the command line. Ignore it,
38972      # but warn the user (except for BASH, which is always set by the calling BASH).
38973      if test "xBUILD_CC" != xBASH; then
38974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38975$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38976      fi
38977      # Try to locate tool using the code snippet
38978      for ac_prog in cl cc gcc
38979do
38980  # Extract the first word of "$ac_prog", so it can be a program name with args.
38981set dummy $ac_prog; ac_word=$2
38982{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38983$as_echo_n "checking for $ac_word... " >&6; }
38984if ${ac_cv_path_BUILD_CC+:} false; then :
38985  $as_echo_n "(cached) " >&6
38986else
38987  case $BUILD_CC in
38988  [\\/]* | ?:[\\/]*)
38989  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38990  ;;
38991  *)
38992  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38993for as_dir in $PATH
38994do
38995  IFS=$as_save_IFS
38996  test -z "$as_dir" && as_dir=.
38997    for ac_exec_ext in '' $ac_executable_extensions; do
38998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38999    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39001    break 2
39002  fi
39003done
39004  done
39005IFS=$as_save_IFS
39006
39007  ;;
39008esac
39009fi
39010BUILD_CC=$ac_cv_path_BUILD_CC
39011if test -n "$BUILD_CC"; then
39012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39013$as_echo "$BUILD_CC" >&6; }
39014else
39015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39016$as_echo "no" >&6; }
39017fi
39018
39019
39020  test -n "$BUILD_CC" && break
39021done
39022
39023    else
39024      # If it succeeded, then it was overridden by the user. We will use it
39025      # for the tool.
39026
39027      # First remove it from the list of overridden variables, so we can test
39028      # for unknown variables in the end.
39029      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39030
39031      # Check if the provided tool contains a complete path.
39032      tool_specified="$BUILD_CC"
39033      tool_basename="${tool_specified##*/}"
39034      if test "x$tool_basename" = "x$tool_specified"; then
39035        # A command without a complete path is provided, search $PATH.
39036        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39037$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39038        # Extract the first word of "$tool_basename", so it can be a program name with args.
39039set dummy $tool_basename; ac_word=$2
39040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39041$as_echo_n "checking for $ac_word... " >&6; }
39042if ${ac_cv_path_BUILD_CC+:} false; then :
39043  $as_echo_n "(cached) " >&6
39044else
39045  case $BUILD_CC in
39046  [\\/]* | ?:[\\/]*)
39047  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39048  ;;
39049  *)
39050  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39051for as_dir in $PATH
39052do
39053  IFS=$as_save_IFS
39054  test -z "$as_dir" && as_dir=.
39055    for ac_exec_ext in '' $ac_executable_extensions; do
39056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39057    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39059    break 2
39060  fi
39061done
39062  done
39063IFS=$as_save_IFS
39064
39065  ;;
39066esac
39067fi
39068BUILD_CC=$ac_cv_path_BUILD_CC
39069if test -n "$BUILD_CC"; then
39070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39071$as_echo "$BUILD_CC" >&6; }
39072else
39073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39074$as_echo "no" >&6; }
39075fi
39076
39077
39078        if test "x$BUILD_CC" = x; then
39079          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39080        fi
39081      else
39082        # Otherwise we believe it is a complete path. Use it as it is.
39083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39084$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39085        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39086$as_echo_n "checking for BUILD_CC... " >&6; }
39087        if test ! -x "$tool_specified"; then
39088          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39089$as_echo "not found" >&6; }
39090          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39091        fi
39092        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39093$as_echo "$tool_specified" >&6; }
39094      fi
39095    fi
39096  fi
39097
39098
39099
39100  # Only process if variable expands to non-empty
39101
39102  if test "x$BUILD_CC" != x; then
39103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39104
39105  # First separate the path from the arguments. This will split at the first
39106  # space.
39107  complete="$BUILD_CC"
39108  path="${complete%% *}"
39109  tmp="$complete EOL"
39110  arguments="${tmp#* }"
39111
39112  # Input might be given as Windows format, start by converting to
39113  # unix format.
39114  new_path=`$CYGPATH -u "$path"`
39115
39116  # Now try to locate executable using which
39117  new_path=`$WHICH "$new_path" 2> /dev/null`
39118  # bat and cmd files are not always considered executable in cygwin causing which
39119  # to not find them
39120  if test "x$new_path" = x \
39121      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39122      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39123    new_path=`$CYGPATH -u "$path"`
39124  fi
39125  if test "x$new_path" = x; then
39126    # Oops. Which didn't find the executable.
39127    # The splitting of arguments from the executable at a space might have been incorrect,
39128    # since paths with space are more likely in Windows. Give it another try with the whole
39129    # argument.
39130    path="$complete"
39131    arguments="EOL"
39132    new_path=`$CYGPATH -u "$path"`
39133    new_path=`$WHICH "$new_path" 2> /dev/null`
39134    # bat and cmd files are not always considered executable in cygwin causing which
39135    # to not find them
39136    if test "x$new_path" = x \
39137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39139      new_path=`$CYGPATH -u "$path"`
39140    fi
39141    if test "x$new_path" = x; then
39142      # It's still not found. Now this is an unrecoverable error.
39143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39144$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39145      has_space=`$ECHO "$complete" | $GREP " "`
39146      if test "x$has_space" != x; then
39147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39149      fi
39150      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39151    fi
39152  fi
39153
39154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39157  # "foo.exe" is OK but "foo" is an error.
39158  #
39159  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39160  # It is also a way to make sure we got the proper file name for the real test later on.
39161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39162  if test "x$test_shortpath" = x; then
39163    # Short path failed, file does not exist as specified.
39164    # Try adding .exe or .cmd
39165    if test -f "${new_path}.exe"; then
39166      input_to_shortpath="${new_path}.exe"
39167    elif test -f "${new_path}.cmd"; then
39168      input_to_shortpath="${new_path}.cmd"
39169    else
39170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39171$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39172      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39173$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39174      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39175    fi
39176  else
39177    input_to_shortpath="$new_path"
39178  fi
39179
39180  # Call helper function which possibly converts this using DOS-style short mode.
39181  # If so, the updated path is stored in $new_path.
39182  new_path="$input_to_shortpath"
39183
39184  input_path="$input_to_shortpath"
39185  # Check if we need to convert this using DOS-style short mode. If the path
39186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39187  # take no chances and rewrite it.
39188  # Note: m4 eats our [], so we need to use [ and ] instead.
39189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39190  if test "x$has_forbidden_chars" != x; then
39191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39195      # Going to short mode and back again did indeed matter. Since short mode is
39196      # case insensitive, let's make it lowercase to improve readability.
39197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39198      # Now convert it back to Unix-style (cygpath)
39199      input_path=`$CYGPATH -u "$shortmode_path"`
39200      new_path="$input_path"
39201    fi
39202  fi
39203
39204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39205  if test "x$test_cygdrive_prefix" = x; then
39206    # As a simple fix, exclude /usr/bin since it's not a real path.
39207    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39209      # a path prefixed by /cygdrive for fixpath to work.
39210      new_path="$CYGWIN_ROOT_PATH$input_path"
39211    fi
39212  fi
39213
39214  # remove trailing .exe if any
39215  new_path="${new_path/%.exe/}"
39216
39217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39218
39219  # First separate the path from the arguments. This will split at the first
39220  # space.
39221  complete="$BUILD_CC"
39222  path="${complete%% *}"
39223  tmp="$complete EOL"
39224  arguments="${tmp#* }"
39225
39226  # Input might be given as Windows format, start by converting to
39227  # unix format.
39228  new_path="$path"
39229
39230  windows_path="$new_path"
39231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39232    unix_path=`$CYGPATH -u "$windows_path"`
39233    new_path="$unix_path"
39234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39236    new_path="$unix_path"
39237  fi
39238
39239
39240  # Now try to locate executable using which
39241  new_path=`$WHICH "$new_path" 2> /dev/null`
39242
39243  if test "x$new_path" = x; then
39244    # Oops. Which didn't find the executable.
39245    # The splitting of arguments from the executable at a space might have been incorrect,
39246    # since paths with space are more likely in Windows. Give it another try with the whole
39247    # argument.
39248    path="$complete"
39249    arguments="EOL"
39250    new_path="$path"
39251
39252  windows_path="$new_path"
39253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39254    unix_path=`$CYGPATH -u "$windows_path"`
39255    new_path="$unix_path"
39256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39258    new_path="$unix_path"
39259  fi
39260
39261
39262    new_path=`$WHICH "$new_path" 2> /dev/null`
39263    # bat and cmd files are not always considered executable in MSYS causing which
39264    # to not find them
39265    if test "x$new_path" = x \
39266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39268      new_path="$path"
39269
39270  windows_path="$new_path"
39271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39272    unix_path=`$CYGPATH -u "$windows_path"`
39273    new_path="$unix_path"
39274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39276    new_path="$unix_path"
39277  fi
39278
39279    fi
39280
39281    if test "x$new_path" = x; then
39282      # It's still not found. Now this is an unrecoverable error.
39283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39284$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39285      has_space=`$ECHO "$complete" | $GREP " "`
39286      if test "x$has_space" != x; then
39287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39289      fi
39290      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39291    fi
39292  fi
39293
39294  # Now new_path has a complete unix path to the binary
39295  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39296    # Keep paths in /bin as-is, but remove trailing .exe if any
39297    new_path="${new_path/%.exe/}"
39298    # Do not save /bin paths to all_fixpath_prefixes!
39299  else
39300    # Not in mixed or Windows style, start by that.
39301    new_path=`cmd //c echo $new_path`
39302
39303  input_path="$new_path"
39304  # Check if we need to convert this using DOS-style short mode. If the path
39305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39306  # take no chances and rewrite it.
39307  # Note: m4 eats our [], so we need to use [ and ] instead.
39308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39309  if test "x$has_forbidden_chars" != x; then
39310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39312  fi
39313
39314    # Output is in $new_path
39315
39316  windows_path="$new_path"
39317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39318    unix_path=`$CYGPATH -u "$windows_path"`
39319    new_path="$unix_path"
39320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39322    new_path="$unix_path"
39323  fi
39324
39325    # remove trailing .exe if any
39326    new_path="${new_path/%.exe/}"
39327
39328    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39329    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39330  fi
39331
39332    else
39333      # We're on a unix platform. Hooray! :)
39334      # First separate the path from the arguments. This will split at the first
39335      # space.
39336      complete="$BUILD_CC"
39337      path="${complete%% *}"
39338      tmp="$complete EOL"
39339      arguments="${tmp#* }"
39340
39341      # Cannot rely on the command "which" here since it doesn't always work.
39342      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39343      if test -z "$is_absolute_path"; then
39344        # Path to executable is not absolute. Find it.
39345        IFS_save="$IFS"
39346        IFS=:
39347        for p in $PATH; do
39348          if test -f "$p/$path" && test -x "$p/$path"; then
39349            new_path="$p/$path"
39350            break
39351          fi
39352        done
39353        IFS="$IFS_save"
39354      else
39355        # This is an absolute path, we can use it without further modifications.
39356        new_path="$path"
39357      fi
39358
39359      if test "x$new_path" = x; then
39360        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39361$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39362        has_space=`$ECHO "$complete" | $GREP " "`
39363        if test "x$has_space" != x; then
39364          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39365$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39366        fi
39367        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39368      fi
39369    fi
39370
39371    # Now join together the path and the arguments once again
39372    if test "x$arguments" != xEOL; then
39373      new_complete="$new_path ${arguments% *}"
39374    else
39375      new_complete="$new_path"
39376    fi
39377
39378    if test "x$complete" != "x$new_complete"; then
39379      BUILD_CC="$new_complete"
39380      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39381$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39382    fi
39383  fi
39384
39385
39386
39387  # Publish this variable in the help.
39388
39389
39390  if test "x$BUILD_CXX" = x; then
39391    # The variable is not set by user, try to locate tool using the code snippet
39392    for ac_prog in cl CC g++
39393do
39394  # Extract the first word of "$ac_prog", so it can be a program name with args.
39395set dummy $ac_prog; ac_word=$2
39396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39397$as_echo_n "checking for $ac_word... " >&6; }
39398if ${ac_cv_path_BUILD_CXX+:} false; then :
39399  $as_echo_n "(cached) " >&6
39400else
39401  case $BUILD_CXX in
39402  [\\/]* | ?:[\\/]*)
39403  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39404  ;;
39405  *)
39406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39407for as_dir in $PATH
39408do
39409  IFS=$as_save_IFS
39410  test -z "$as_dir" && as_dir=.
39411    for ac_exec_ext in '' $ac_executable_extensions; do
39412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39413    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39415    break 2
39416  fi
39417done
39418  done
39419IFS=$as_save_IFS
39420
39421  ;;
39422esac
39423fi
39424BUILD_CXX=$ac_cv_path_BUILD_CXX
39425if test -n "$BUILD_CXX"; then
39426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39427$as_echo "$BUILD_CXX" >&6; }
39428else
39429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39430$as_echo "no" >&6; }
39431fi
39432
39433
39434  test -n "$BUILD_CXX" && break
39435done
39436
39437  else
39438    # The variable is set, but is it from the command line or the environment?
39439
39440    # Try to remove the string !BUILD_CXX! from our list.
39441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39443      # If it failed, the variable was not from the command line. Ignore it,
39444      # but warn the user (except for BASH, which is always set by the calling BASH).
39445      if test "xBUILD_CXX" != xBASH; then
39446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39447$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39448      fi
39449      # Try to locate tool using the code snippet
39450      for ac_prog in cl CC g++
39451do
39452  # Extract the first word of "$ac_prog", so it can be a program name with args.
39453set dummy $ac_prog; ac_word=$2
39454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39455$as_echo_n "checking for $ac_word... " >&6; }
39456if ${ac_cv_path_BUILD_CXX+:} false; then :
39457  $as_echo_n "(cached) " >&6
39458else
39459  case $BUILD_CXX in
39460  [\\/]* | ?:[\\/]*)
39461  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39462  ;;
39463  *)
39464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39465for as_dir in $PATH
39466do
39467  IFS=$as_save_IFS
39468  test -z "$as_dir" && as_dir=.
39469    for ac_exec_ext in '' $ac_executable_extensions; do
39470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39471    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39473    break 2
39474  fi
39475done
39476  done
39477IFS=$as_save_IFS
39478
39479  ;;
39480esac
39481fi
39482BUILD_CXX=$ac_cv_path_BUILD_CXX
39483if test -n "$BUILD_CXX"; then
39484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39485$as_echo "$BUILD_CXX" >&6; }
39486else
39487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39488$as_echo "no" >&6; }
39489fi
39490
39491
39492  test -n "$BUILD_CXX" && break
39493done
39494
39495    else
39496      # If it succeeded, then it was overridden by the user. We will use it
39497      # for the tool.
39498
39499      # First remove it from the list of overridden variables, so we can test
39500      # for unknown variables in the end.
39501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39502
39503      # Check if the provided tool contains a complete path.
39504      tool_specified="$BUILD_CXX"
39505      tool_basename="${tool_specified##*/}"
39506      if test "x$tool_basename" = "x$tool_specified"; then
39507        # A command without a complete path is provided, search $PATH.
39508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39509$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39510        # Extract the first word of "$tool_basename", so it can be a program name with args.
39511set dummy $tool_basename; ac_word=$2
39512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39513$as_echo_n "checking for $ac_word... " >&6; }
39514if ${ac_cv_path_BUILD_CXX+:} false; then :
39515  $as_echo_n "(cached) " >&6
39516else
39517  case $BUILD_CXX in
39518  [\\/]* | ?:[\\/]*)
39519  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39520  ;;
39521  *)
39522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39523for as_dir in $PATH
39524do
39525  IFS=$as_save_IFS
39526  test -z "$as_dir" && as_dir=.
39527    for ac_exec_ext in '' $ac_executable_extensions; do
39528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39529    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39531    break 2
39532  fi
39533done
39534  done
39535IFS=$as_save_IFS
39536
39537  ;;
39538esac
39539fi
39540BUILD_CXX=$ac_cv_path_BUILD_CXX
39541if test -n "$BUILD_CXX"; then
39542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39543$as_echo "$BUILD_CXX" >&6; }
39544else
39545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39546$as_echo "no" >&6; }
39547fi
39548
39549
39550        if test "x$BUILD_CXX" = x; then
39551          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39552        fi
39553      else
39554        # Otherwise we believe it is a complete path. Use it as it is.
39555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39556$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39557        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39558$as_echo_n "checking for BUILD_CXX... " >&6; }
39559        if test ! -x "$tool_specified"; then
39560          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39561$as_echo "not found" >&6; }
39562          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39563        fi
39564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39565$as_echo "$tool_specified" >&6; }
39566      fi
39567    fi
39568  fi
39569
39570
39571
39572  # Only process if variable expands to non-empty
39573
39574  if test "x$BUILD_CXX" != x; then
39575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39576
39577  # First separate the path from the arguments. This will split at the first
39578  # space.
39579  complete="$BUILD_CXX"
39580  path="${complete%% *}"
39581  tmp="$complete EOL"
39582  arguments="${tmp#* }"
39583
39584  # Input might be given as Windows format, start by converting to
39585  # unix format.
39586  new_path=`$CYGPATH -u "$path"`
39587
39588  # Now try to locate executable using which
39589  new_path=`$WHICH "$new_path" 2> /dev/null`
39590  # bat and cmd files are not always considered executable in cygwin causing which
39591  # to not find them
39592  if test "x$new_path" = x \
39593      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39594      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39595    new_path=`$CYGPATH -u "$path"`
39596  fi
39597  if test "x$new_path" = x; then
39598    # Oops. Which didn't find the executable.
39599    # The splitting of arguments from the executable at a space might have been incorrect,
39600    # since paths with space are more likely in Windows. Give it another try with the whole
39601    # argument.
39602    path="$complete"
39603    arguments="EOL"
39604    new_path=`$CYGPATH -u "$path"`
39605    new_path=`$WHICH "$new_path" 2> /dev/null`
39606    # bat and cmd files are not always considered executable in cygwin causing which
39607    # to not find them
39608    if test "x$new_path" = x \
39609        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39610        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39611      new_path=`$CYGPATH -u "$path"`
39612    fi
39613    if test "x$new_path" = x; then
39614      # It's still not found. Now this is an unrecoverable error.
39615      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39616$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39617      has_space=`$ECHO "$complete" | $GREP " "`
39618      if test "x$has_space" != x; then
39619        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39620$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39621      fi
39622      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39623    fi
39624  fi
39625
39626  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39627  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39628  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39629  # "foo.exe" is OK but "foo" is an error.
39630  #
39631  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39632  # It is also a way to make sure we got the proper file name for the real test later on.
39633  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39634  if test "x$test_shortpath" = x; then
39635    # Short path failed, file does not exist as specified.
39636    # Try adding .exe or .cmd
39637    if test -f "${new_path}.exe"; then
39638      input_to_shortpath="${new_path}.exe"
39639    elif test -f "${new_path}.cmd"; then
39640      input_to_shortpath="${new_path}.cmd"
39641    else
39642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39643$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39644      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39645$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39646      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39647    fi
39648  else
39649    input_to_shortpath="$new_path"
39650  fi
39651
39652  # Call helper function which possibly converts this using DOS-style short mode.
39653  # If so, the updated path is stored in $new_path.
39654  new_path="$input_to_shortpath"
39655
39656  input_path="$input_to_shortpath"
39657  # Check if we need to convert this using DOS-style short mode. If the path
39658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39659  # take no chances and rewrite it.
39660  # Note: m4 eats our [], so we need to use [ and ] instead.
39661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39662  if test "x$has_forbidden_chars" != x; then
39663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39664    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39665    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39666    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39667      # Going to short mode and back again did indeed matter. Since short mode is
39668      # case insensitive, let's make it lowercase to improve readability.
39669      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39670      # Now convert it back to Unix-style (cygpath)
39671      input_path=`$CYGPATH -u "$shortmode_path"`
39672      new_path="$input_path"
39673    fi
39674  fi
39675
39676  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39677  if test "x$test_cygdrive_prefix" = x; then
39678    # As a simple fix, exclude /usr/bin since it's not a real path.
39679    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39680      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39681      # a path prefixed by /cygdrive for fixpath to work.
39682      new_path="$CYGWIN_ROOT_PATH$input_path"
39683    fi
39684  fi
39685
39686  # remove trailing .exe if any
39687  new_path="${new_path/%.exe/}"
39688
39689    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39690
39691  # First separate the path from the arguments. This will split at the first
39692  # space.
39693  complete="$BUILD_CXX"
39694  path="${complete%% *}"
39695  tmp="$complete EOL"
39696  arguments="${tmp#* }"
39697
39698  # Input might be given as Windows format, start by converting to
39699  # unix format.
39700  new_path="$path"
39701
39702  windows_path="$new_path"
39703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39704    unix_path=`$CYGPATH -u "$windows_path"`
39705    new_path="$unix_path"
39706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39708    new_path="$unix_path"
39709  fi
39710
39711
39712  # Now try to locate executable using which
39713  new_path=`$WHICH "$new_path" 2> /dev/null`
39714
39715  if test "x$new_path" = x; then
39716    # Oops. Which didn't find the executable.
39717    # The splitting of arguments from the executable at a space might have been incorrect,
39718    # since paths with space are more likely in Windows. Give it another try with the whole
39719    # argument.
39720    path="$complete"
39721    arguments="EOL"
39722    new_path="$path"
39723
39724  windows_path="$new_path"
39725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39726    unix_path=`$CYGPATH -u "$windows_path"`
39727    new_path="$unix_path"
39728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39730    new_path="$unix_path"
39731  fi
39732
39733
39734    new_path=`$WHICH "$new_path" 2> /dev/null`
39735    # bat and cmd files are not always considered executable in MSYS causing which
39736    # to not find them
39737    if test "x$new_path" = x \
39738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39740      new_path="$path"
39741
39742  windows_path="$new_path"
39743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39744    unix_path=`$CYGPATH -u "$windows_path"`
39745    new_path="$unix_path"
39746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39748    new_path="$unix_path"
39749  fi
39750
39751    fi
39752
39753    if test "x$new_path" = x; then
39754      # It's still not found. Now this is an unrecoverable error.
39755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39756$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39757      has_space=`$ECHO "$complete" | $GREP " "`
39758      if test "x$has_space" != x; then
39759        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39760$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39761      fi
39762      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39763    fi
39764  fi
39765
39766  # Now new_path has a complete unix path to the binary
39767  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39768    # Keep paths in /bin as-is, but remove trailing .exe if any
39769    new_path="${new_path/%.exe/}"
39770    # Do not save /bin paths to all_fixpath_prefixes!
39771  else
39772    # Not in mixed or Windows style, start by that.
39773    new_path=`cmd //c echo $new_path`
39774
39775  input_path="$new_path"
39776  # Check if we need to convert this using DOS-style short mode. If the path
39777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39778  # take no chances and rewrite it.
39779  # Note: m4 eats our [], so we need to use [ and ] instead.
39780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39781  if test "x$has_forbidden_chars" != x; then
39782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39784  fi
39785
39786    # Output is in $new_path
39787
39788  windows_path="$new_path"
39789  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39790    unix_path=`$CYGPATH -u "$windows_path"`
39791    new_path="$unix_path"
39792  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39793    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39794    new_path="$unix_path"
39795  fi
39796
39797    # remove trailing .exe if any
39798    new_path="${new_path/%.exe/}"
39799
39800    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39801    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39802  fi
39803
39804    else
39805      # We're on a unix platform. Hooray! :)
39806      # First separate the path from the arguments. This will split at the first
39807      # space.
39808      complete="$BUILD_CXX"
39809      path="${complete%% *}"
39810      tmp="$complete EOL"
39811      arguments="${tmp#* }"
39812
39813      # Cannot rely on the command "which" here since it doesn't always work.
39814      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39815      if test -z "$is_absolute_path"; then
39816        # Path to executable is not absolute. Find it.
39817        IFS_save="$IFS"
39818        IFS=:
39819        for p in $PATH; do
39820          if test -f "$p/$path" && test -x "$p/$path"; then
39821            new_path="$p/$path"
39822            break
39823          fi
39824        done
39825        IFS="$IFS_save"
39826      else
39827        # This is an absolute path, we can use it without further modifications.
39828        new_path="$path"
39829      fi
39830
39831      if test "x$new_path" = x; then
39832        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39833$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39834        has_space=`$ECHO "$complete" | $GREP " "`
39835        if test "x$has_space" != x; then
39836          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39837$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39838        fi
39839        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39840      fi
39841    fi
39842
39843    # Now join together the path and the arguments once again
39844    if test "x$arguments" != xEOL; then
39845      new_complete="$new_path ${arguments% *}"
39846    else
39847      new_complete="$new_path"
39848    fi
39849
39850    if test "x$complete" != "x$new_complete"; then
39851      BUILD_CXX="$new_complete"
39852      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39853$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39854    fi
39855  fi
39856
39857
39858
39859  # Publish this variable in the help.
39860
39861
39862  if test "x$BUILD_LD" = x; then
39863    # The variable is not set by user, try to locate tool using the code snippet
39864    for ac_prog in ld
39865do
39866  # Extract the first word of "$ac_prog", so it can be a program name with args.
39867set dummy $ac_prog; ac_word=$2
39868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39869$as_echo_n "checking for $ac_word... " >&6; }
39870if ${ac_cv_path_BUILD_LD+:} false; then :
39871  $as_echo_n "(cached) " >&6
39872else
39873  case $BUILD_LD in
39874  [\\/]* | ?:[\\/]*)
39875  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39876  ;;
39877  *)
39878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39879for as_dir in $PATH
39880do
39881  IFS=$as_save_IFS
39882  test -z "$as_dir" && as_dir=.
39883    for ac_exec_ext in '' $ac_executable_extensions; do
39884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39885    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39887    break 2
39888  fi
39889done
39890  done
39891IFS=$as_save_IFS
39892
39893  ;;
39894esac
39895fi
39896BUILD_LD=$ac_cv_path_BUILD_LD
39897if test -n "$BUILD_LD"; then
39898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39899$as_echo "$BUILD_LD" >&6; }
39900else
39901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39902$as_echo "no" >&6; }
39903fi
39904
39905
39906  test -n "$BUILD_LD" && break
39907done
39908
39909  else
39910    # The variable is set, but is it from the command line or the environment?
39911
39912    # Try to remove the string !BUILD_LD! from our list.
39913    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39914    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39915      # If it failed, the variable was not from the command line. Ignore it,
39916      # but warn the user (except for BASH, which is always set by the calling BASH).
39917      if test "xBUILD_LD" != xBASH; then
39918        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39919$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39920      fi
39921      # Try to locate tool using the code snippet
39922      for ac_prog in ld
39923do
39924  # Extract the first word of "$ac_prog", so it can be a program name with args.
39925set dummy $ac_prog; ac_word=$2
39926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39927$as_echo_n "checking for $ac_word... " >&6; }
39928if ${ac_cv_path_BUILD_LD+:} false; then :
39929  $as_echo_n "(cached) " >&6
39930else
39931  case $BUILD_LD in
39932  [\\/]* | ?:[\\/]*)
39933  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39934  ;;
39935  *)
39936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39937for as_dir in $PATH
39938do
39939  IFS=$as_save_IFS
39940  test -z "$as_dir" && as_dir=.
39941    for ac_exec_ext in '' $ac_executable_extensions; do
39942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39943    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39945    break 2
39946  fi
39947done
39948  done
39949IFS=$as_save_IFS
39950
39951  ;;
39952esac
39953fi
39954BUILD_LD=$ac_cv_path_BUILD_LD
39955if test -n "$BUILD_LD"; then
39956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39957$as_echo "$BUILD_LD" >&6; }
39958else
39959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39960$as_echo "no" >&6; }
39961fi
39962
39963
39964  test -n "$BUILD_LD" && break
39965done
39966
39967    else
39968      # If it succeeded, then it was overridden by the user. We will use it
39969      # for the tool.
39970
39971      # First remove it from the list of overridden variables, so we can test
39972      # for unknown variables in the end.
39973      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39974
39975      # Check if the provided tool contains a complete path.
39976      tool_specified="$BUILD_LD"
39977      tool_basename="${tool_specified##*/}"
39978      if test "x$tool_basename" = "x$tool_specified"; then
39979        # A command without a complete path is provided, search $PATH.
39980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39981$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39982        # Extract the first word of "$tool_basename", so it can be a program name with args.
39983set dummy $tool_basename; ac_word=$2
39984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39985$as_echo_n "checking for $ac_word... " >&6; }
39986if ${ac_cv_path_BUILD_LD+:} false; then :
39987  $as_echo_n "(cached) " >&6
39988else
39989  case $BUILD_LD in
39990  [\\/]* | ?:[\\/]*)
39991  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39992  ;;
39993  *)
39994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39995for as_dir in $PATH
39996do
39997  IFS=$as_save_IFS
39998  test -z "$as_dir" && as_dir=.
39999    for ac_exec_ext in '' $ac_executable_extensions; do
40000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40001    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40003    break 2
40004  fi
40005done
40006  done
40007IFS=$as_save_IFS
40008
40009  ;;
40010esac
40011fi
40012BUILD_LD=$ac_cv_path_BUILD_LD
40013if test -n "$BUILD_LD"; then
40014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40015$as_echo "$BUILD_LD" >&6; }
40016else
40017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40018$as_echo "no" >&6; }
40019fi
40020
40021
40022        if test "x$BUILD_LD" = x; then
40023          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40024        fi
40025      else
40026        # Otherwise we believe it is a complete path. Use it as it is.
40027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40028$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40029        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40030$as_echo_n "checking for BUILD_LD... " >&6; }
40031        if test ! -x "$tool_specified"; then
40032          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40033$as_echo "not found" >&6; }
40034          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40035        fi
40036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40037$as_echo "$tool_specified" >&6; }
40038      fi
40039    fi
40040  fi
40041
40042
40043
40044  # Only process if variable expands to non-empty
40045
40046  if test "x$BUILD_LD" != x; then
40047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40048
40049  # First separate the path from the arguments. This will split at the first
40050  # space.
40051  complete="$BUILD_LD"
40052  path="${complete%% *}"
40053  tmp="$complete EOL"
40054  arguments="${tmp#* }"
40055
40056  # Input might be given as Windows format, start by converting to
40057  # unix format.
40058  new_path=`$CYGPATH -u "$path"`
40059
40060  # Now try to locate executable using which
40061  new_path=`$WHICH "$new_path" 2> /dev/null`
40062  # bat and cmd files are not always considered executable in cygwin causing which
40063  # to not find them
40064  if test "x$new_path" = x \
40065      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40066      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40067    new_path=`$CYGPATH -u "$path"`
40068  fi
40069  if test "x$new_path" = x; then
40070    # Oops. Which didn't find the executable.
40071    # The splitting of arguments from the executable at a space might have been incorrect,
40072    # since paths with space are more likely in Windows. Give it another try with the whole
40073    # argument.
40074    path="$complete"
40075    arguments="EOL"
40076    new_path=`$CYGPATH -u "$path"`
40077    new_path=`$WHICH "$new_path" 2> /dev/null`
40078    # bat and cmd files are not always considered executable in cygwin causing which
40079    # to not find them
40080    if test "x$new_path" = x \
40081        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40082        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40083      new_path=`$CYGPATH -u "$path"`
40084    fi
40085    if test "x$new_path" = x; then
40086      # It's still not found. Now this is an unrecoverable error.
40087      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40088$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40089      has_space=`$ECHO "$complete" | $GREP " "`
40090      if test "x$has_space" != x; then
40091        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40092$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40093      fi
40094      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40095    fi
40096  fi
40097
40098  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40099  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40100  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40101  # "foo.exe" is OK but "foo" is an error.
40102  #
40103  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40104  # It is also a way to make sure we got the proper file name for the real test later on.
40105  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40106  if test "x$test_shortpath" = x; then
40107    # Short path failed, file does not exist as specified.
40108    # Try adding .exe or .cmd
40109    if test -f "${new_path}.exe"; then
40110      input_to_shortpath="${new_path}.exe"
40111    elif test -f "${new_path}.cmd"; then
40112      input_to_shortpath="${new_path}.cmd"
40113    else
40114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40115$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40116      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40117$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40118      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40119    fi
40120  else
40121    input_to_shortpath="$new_path"
40122  fi
40123
40124  # Call helper function which possibly converts this using DOS-style short mode.
40125  # If so, the updated path is stored in $new_path.
40126  new_path="$input_to_shortpath"
40127
40128  input_path="$input_to_shortpath"
40129  # Check if we need to convert this using DOS-style short mode. If the path
40130  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40131  # take no chances and rewrite it.
40132  # Note: m4 eats our [], so we need to use [ and ] instead.
40133  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40134  if test "x$has_forbidden_chars" != x; then
40135    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40136    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40137    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40138    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40139      # Going to short mode and back again did indeed matter. Since short mode is
40140      # case insensitive, let's make it lowercase to improve readability.
40141      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40142      # Now convert it back to Unix-style (cygpath)
40143      input_path=`$CYGPATH -u "$shortmode_path"`
40144      new_path="$input_path"
40145    fi
40146  fi
40147
40148  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40149  if test "x$test_cygdrive_prefix" = x; then
40150    # As a simple fix, exclude /usr/bin since it's not a real path.
40151    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40152      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40153      # a path prefixed by /cygdrive for fixpath to work.
40154      new_path="$CYGWIN_ROOT_PATH$input_path"
40155    fi
40156  fi
40157
40158  # remove trailing .exe if any
40159  new_path="${new_path/%.exe/}"
40160
40161    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40162
40163  # First separate the path from the arguments. This will split at the first
40164  # space.
40165  complete="$BUILD_LD"
40166  path="${complete%% *}"
40167  tmp="$complete EOL"
40168  arguments="${tmp#* }"
40169
40170  # Input might be given as Windows format, start by converting to
40171  # unix format.
40172  new_path="$path"
40173
40174  windows_path="$new_path"
40175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40176    unix_path=`$CYGPATH -u "$windows_path"`
40177    new_path="$unix_path"
40178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40180    new_path="$unix_path"
40181  fi
40182
40183
40184  # Now try to locate executable using which
40185  new_path=`$WHICH "$new_path" 2> /dev/null`
40186
40187  if test "x$new_path" = x; then
40188    # Oops. Which didn't find the executable.
40189    # The splitting of arguments from the executable at a space might have been incorrect,
40190    # since paths with space are more likely in Windows. Give it another try with the whole
40191    # argument.
40192    path="$complete"
40193    arguments="EOL"
40194    new_path="$path"
40195
40196  windows_path="$new_path"
40197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40198    unix_path=`$CYGPATH -u "$windows_path"`
40199    new_path="$unix_path"
40200  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40201    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40202    new_path="$unix_path"
40203  fi
40204
40205
40206    new_path=`$WHICH "$new_path" 2> /dev/null`
40207    # bat and cmd files are not always considered executable in MSYS causing which
40208    # to not find them
40209    if test "x$new_path" = x \
40210        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40211        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40212      new_path="$path"
40213
40214  windows_path="$new_path"
40215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40216    unix_path=`$CYGPATH -u "$windows_path"`
40217    new_path="$unix_path"
40218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40220    new_path="$unix_path"
40221  fi
40222
40223    fi
40224
40225    if test "x$new_path" = x; then
40226      # It's still not found. Now this is an unrecoverable error.
40227      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40228$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40229      has_space=`$ECHO "$complete" | $GREP " "`
40230      if test "x$has_space" != x; then
40231        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40232$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40233      fi
40234      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40235    fi
40236  fi
40237
40238  # Now new_path has a complete unix path to the binary
40239  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40240    # Keep paths in /bin as-is, but remove trailing .exe if any
40241    new_path="${new_path/%.exe/}"
40242    # Do not save /bin paths to all_fixpath_prefixes!
40243  else
40244    # Not in mixed or Windows style, start by that.
40245    new_path=`cmd //c echo $new_path`
40246
40247  input_path="$new_path"
40248  # Check if we need to convert this using DOS-style short mode. If the path
40249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40250  # take no chances and rewrite it.
40251  # Note: m4 eats our [], so we need to use [ and ] instead.
40252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40253  if test "x$has_forbidden_chars" != x; then
40254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40256  fi
40257
40258    # Output is in $new_path
40259
40260  windows_path="$new_path"
40261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40262    unix_path=`$CYGPATH -u "$windows_path"`
40263    new_path="$unix_path"
40264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40266    new_path="$unix_path"
40267  fi
40268
40269    # remove trailing .exe if any
40270    new_path="${new_path/%.exe/}"
40271
40272    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40273    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40274  fi
40275
40276    else
40277      # We're on a unix platform. Hooray! :)
40278      # First separate the path from the arguments. This will split at the first
40279      # space.
40280      complete="$BUILD_LD"
40281      path="${complete%% *}"
40282      tmp="$complete EOL"
40283      arguments="${tmp#* }"
40284
40285      # Cannot rely on the command "which" here since it doesn't always work.
40286      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40287      if test -z "$is_absolute_path"; then
40288        # Path to executable is not absolute. Find it.
40289        IFS_save="$IFS"
40290        IFS=:
40291        for p in $PATH; do
40292          if test -f "$p/$path" && test -x "$p/$path"; then
40293            new_path="$p/$path"
40294            break
40295          fi
40296        done
40297        IFS="$IFS_save"
40298      else
40299        # This is an absolute path, we can use it without further modifications.
40300        new_path="$path"
40301      fi
40302
40303      if test "x$new_path" = x; then
40304        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40305$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40306        has_space=`$ECHO "$complete" | $GREP " "`
40307        if test "x$has_space" != x; then
40308          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40309$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40310        fi
40311        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40312      fi
40313    fi
40314
40315    # Now join together the path and the arguments once again
40316    if test "x$arguments" != xEOL; then
40317      new_complete="$new_path ${arguments% *}"
40318    else
40319      new_complete="$new_path"
40320    fi
40321
40322    if test "x$complete" != "x$new_complete"; then
40323      BUILD_LD="$new_complete"
40324      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40325$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40326    fi
40327  fi
40328
40329  else
40330    # If we are not cross compiling, use the normal target compilers for
40331    # building the build platform executables.
40332    BUILD_CC="$CC"
40333    BUILD_CXX="$CXX"
40334    BUILD_LD="$LD"
40335  fi
40336
40337
40338
40339
40340
40341
40342  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40343    # For hotspot, we need these in Windows mixed path,
40344    # so rewrite them all. Need added .exe suffix.
40345    HOTSPOT_CXX="$CXX.exe"
40346    HOTSPOT_LD="$LD.exe"
40347    HOTSPOT_MT="$MT.exe"
40348    HOTSPOT_RC="$RC.exe"
40349
40350  unix_path="$HOTSPOT_CXX"
40351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40352    windows_path=`$CYGPATH -m "$unix_path"`
40353    HOTSPOT_CXX="$windows_path"
40354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40355    windows_path=`cmd //c echo $unix_path`
40356    HOTSPOT_CXX="$windows_path"
40357  fi
40358
40359
40360  unix_path="$HOTSPOT_LD"
40361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40362    windows_path=`$CYGPATH -m "$unix_path"`
40363    HOTSPOT_LD="$windows_path"
40364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40365    windows_path=`cmd //c echo $unix_path`
40366    HOTSPOT_LD="$windows_path"
40367  fi
40368
40369
40370  unix_path="$HOTSPOT_MT"
40371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40372    windows_path=`$CYGPATH -m "$unix_path"`
40373    HOTSPOT_MT="$windows_path"
40374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40375    windows_path=`cmd //c echo $unix_path`
40376    HOTSPOT_MT="$windows_path"
40377  fi
40378
40379
40380  unix_path="$HOTSPOT_RC"
40381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40382    windows_path=`$CYGPATH -m "$unix_path"`
40383    HOTSPOT_RC="$windows_path"
40384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40385    windows_path=`cmd //c echo $unix_path`
40386    HOTSPOT_RC="$windows_path"
40387  fi
40388
40389
40390
40391  else
40392    HOTSPOT_CXX="$CXX"
40393    HOTSPOT_LD="$LD"
40394  fi
40395
40396
40397
40398  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40399    USE_CLANG=true
40400  fi
40401
40402
40403
40404
40405
40406  # The package path is used only on macosx?
40407  # FIXME: clean this up, and/or move it elsewhere.
40408  PACKAGE_PATH=/opt/local
40409
40410
40411  # Check for extra potential brokenness.
40412  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40413    # On Windows, double-check that we got the right compiler.
40414    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40415    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40416    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40417      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40418        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
40419      fi
40420    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40421      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40422        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40423      fi
40424    fi
40425  fi
40426
40427  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40428    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40429    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40430    # This is later checked when setting flags.
40431
40432    # "-Og" suppported for GCC 4.8 and later
40433    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40434
40435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40436$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40437  supports=yes
40438
40439  saved_cflags="$CFLAGS"
40440  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40441  ac_ext=c
40442ac_cpp='$CPP $CPPFLAGS'
40443ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40444ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40445ac_compiler_gnu=$ac_cv_c_compiler_gnu
40446
40447  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40448/* end confdefs.h.  */
40449int i;
40450_ACEOF
40451if ac_fn_c_try_compile "$LINENO"; then :
40452
40453else
40454  supports=no
40455fi
40456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40457  ac_ext=cpp
40458ac_cpp='$CXXCPP $CPPFLAGS'
40459ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40460ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40461ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40462
40463  CFLAGS="$saved_cflags"
40464
40465  saved_cxxflags="$CXXFLAGS"
40466  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40467  ac_ext=cpp
40468ac_cpp='$CXXCPP $CPPFLAGS'
40469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40472
40473  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40474/* end confdefs.h.  */
40475int i;
40476_ACEOF
40477if ac_fn_cxx_try_compile "$LINENO"; then :
40478
40479else
40480  supports=no
40481fi
40482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40483  ac_ext=cpp
40484ac_cpp='$CXXCPP $CPPFLAGS'
40485ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40486ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40487ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40488
40489  CXXFLAGS="$saved_cxxflags"
40490
40491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40492$as_echo "$supports" >&6; }
40493  if test "x$supports" = "xyes" ; then
40494    HAS_CFLAG_OPTIMIZE_DEBUG=true
40495  else
40496    HAS_CFLAG_OPTIMIZE_DEBUG=false
40497  fi
40498
40499
40500    # "-z relro" supported in GNU binutils 2.17 and later
40501    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40502
40503  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40504$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40505  supports=yes
40506
40507  saved_ldflags="$LDFLAGS"
40508  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40509  ac_ext=c
40510ac_cpp='$CPP $CPPFLAGS'
40511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40513ac_compiler_gnu=$ac_cv_c_compiler_gnu
40514
40515  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40516/* end confdefs.h.  */
40517
40518int
40519main ()
40520{
40521
40522  ;
40523  return 0;
40524}
40525_ACEOF
40526if ac_fn_c_try_link "$LINENO"; then :
40527
40528else
40529  supports=no
40530fi
40531rm -f core conftest.err conftest.$ac_objext \
40532    conftest$ac_exeext conftest.$ac_ext
40533  ac_ext=cpp
40534ac_cpp='$CXXCPP $CPPFLAGS'
40535ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40536ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40537ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40538
40539  LDFLAGS="$saved_ldflags"
40540
40541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40542$as_echo "$supports" >&6; }
40543  if test "x$supports" = "xyes" ; then
40544    HAS_LINKER_RELRO=true
40545  else
40546    HAS_LINKER_RELRO=false
40547  fi
40548
40549
40550    # "-z now" supported in GNU binutils 2.11 and later
40551    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40552
40553  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40554$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40555  supports=yes
40556
40557  saved_ldflags="$LDFLAGS"
40558  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40559  ac_ext=c
40560ac_cpp='$CPP $CPPFLAGS'
40561ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40562ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40563ac_compiler_gnu=$ac_cv_c_compiler_gnu
40564
40565  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40566/* end confdefs.h.  */
40567
40568int
40569main ()
40570{
40571
40572  ;
40573  return 0;
40574}
40575_ACEOF
40576if ac_fn_c_try_link "$LINENO"; then :
40577
40578else
40579  supports=no
40580fi
40581rm -f core conftest.err conftest.$ac_objext \
40582    conftest$ac_exeext conftest.$ac_ext
40583  ac_ext=cpp
40584ac_cpp='$CXXCPP $CPPFLAGS'
40585ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40586ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40587ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40588
40589  LDFLAGS="$saved_ldflags"
40590
40591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40592$as_echo "$supports" >&6; }
40593  if test "x$supports" = "xyes" ; then
40594    HAS_LINKER_NOW=true
40595  else
40596    HAS_LINKER_NOW=false
40597  fi
40598
40599  fi
40600
40601  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40602  # in executable.'
40603  USING_BROKEN_SUSE_LD=no
40604  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40605    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40606$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40607    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40608    $ECHO "int main() { }" > main.c
40609    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40610      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40611$as_echo "no" >&6; }
40612      USING_BROKEN_SUSE_LD=no
40613    else
40614      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40615$as_echo "yes" >&6; }
40616      USING_BROKEN_SUSE_LD=yes
40617    fi
40618    rm -rf version-script.map main.c a.out
40619  fi
40620
40621
40622
40623# Setup the JTReg Regression Test Harness.
40624
40625
40626# Check whether --with-jtreg was given.
40627if test "${with_jtreg+set}" = set; then :
40628  withval=$with_jtreg;
40629else
40630  with_jtreg=no
40631fi
40632
40633
40634  if test "x$with_jtreg" = xno; then
40635    # jtreg disabled
40636    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40637$as_echo_n "checking for jtreg... " >&6; }
40638    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40639$as_echo "no" >&6; }
40640  else
40641    if test "x$with_jtreg" != xyes; then
40642      # with path specified.
40643      JT_HOME="$with_jtreg"
40644    fi
40645
40646    if test "x$JT_HOME" != x; then
40647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40648$as_echo_n "checking for jtreg... " >&6; }
40649
40650      # use JT_HOME enviroment var.
40651
40652  # Only process if variable expands to non-empty
40653
40654  if test "x$JT_HOME" != x; then
40655    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40656
40657  # Input might be given as Windows format, start by converting to
40658  # unix format.
40659  path="$JT_HOME"
40660  new_path=`$CYGPATH -u "$path"`
40661
40662  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40663  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40664  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40665  # "foo.exe" is OK but "foo" is an error.
40666  #
40667  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40668  # It is also a way to make sure we got the proper file name for the real test later on.
40669  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40670  if test "x$test_shortpath" = x; then
40671    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40672$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40673    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40674  fi
40675
40676  # Call helper function which possibly converts this using DOS-style short mode.
40677  # If so, the updated path is stored in $new_path.
40678
40679  input_path="$new_path"
40680  # Check if we need to convert this using DOS-style short mode. If the path
40681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40682  # take no chances and rewrite it.
40683  # Note: m4 eats our [], so we need to use [ and ] instead.
40684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40685  if test "x$has_forbidden_chars" != x; then
40686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40690      # Going to short mode and back again did indeed matter. Since short mode is
40691      # case insensitive, let's make it lowercase to improve readability.
40692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40693      # Now convert it back to Unix-style (cygpath)
40694      input_path=`$CYGPATH -u "$shortmode_path"`
40695      new_path="$input_path"
40696    fi
40697  fi
40698
40699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40700  if test "x$test_cygdrive_prefix" = x; then
40701    # As a simple fix, exclude /usr/bin since it's not a real path.
40702    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40704      # a path prefixed by /cygdrive for fixpath to work.
40705      new_path="$CYGWIN_ROOT_PATH$input_path"
40706    fi
40707  fi
40708
40709
40710  if test "x$path" != "x$new_path"; then
40711    JT_HOME="$new_path"
40712    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40713$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40714  fi
40715
40716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40717
40718  path="$JT_HOME"
40719  has_colon=`$ECHO $path | $GREP ^.:`
40720  new_path="$path"
40721  if test "x$has_colon" = x; then
40722    # Not in mixed or Windows style, start by that.
40723    new_path=`cmd //c echo $path`
40724  fi
40725
40726
40727  input_path="$new_path"
40728  # Check if we need to convert this using DOS-style short mode. If the path
40729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40730  # take no chances and rewrite it.
40731  # Note: m4 eats our [], so we need to use [ and ] instead.
40732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40733  if test "x$has_forbidden_chars" != x; then
40734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40735    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40736  fi
40737
40738
40739  windows_path="$new_path"
40740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40741    unix_path=`$CYGPATH -u "$windows_path"`
40742    new_path="$unix_path"
40743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40745    new_path="$unix_path"
40746  fi
40747
40748  if test "x$path" != "x$new_path"; then
40749    JT_HOME="$new_path"
40750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40751$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40752  fi
40753
40754  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40755  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40756
40757    else
40758      # We're on a unix platform. Hooray! :)
40759      path="$JT_HOME"
40760      has_space=`$ECHO "$path" | $GREP " "`
40761      if test "x$has_space" != x; then
40762        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40763$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40764        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40765      fi
40766
40767      # Use eval to expand a potential ~
40768      eval path="$path"
40769      if test ! -f "$path" && test ! -d "$path"; then
40770        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40771      fi
40772
40773      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40774    fi
40775  fi
40776
40777
40778      # jtreg win32 script works for everybody
40779      JTREGEXE="$JT_HOME/bin/jtreg"
40780
40781      if test ! -f "$JTREGEXE"; then
40782        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40783      fi
40784
40785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40786$as_echo "$JTREGEXE" >&6; }
40787    else
40788      # try to find jtreg on path
40789
40790
40791
40792  # Publish this variable in the help.
40793
40794
40795  if test "x$JTREGEXE" = x; then
40796    # The variable is not set by user, try to locate tool using the code snippet
40797    for ac_prog in jtreg
40798do
40799  # Extract the first word of "$ac_prog", so it can be a program name with args.
40800set dummy $ac_prog; ac_word=$2
40801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40802$as_echo_n "checking for $ac_word... " >&6; }
40803if ${ac_cv_path_JTREGEXE+:} false; then :
40804  $as_echo_n "(cached) " >&6
40805else
40806  case $JTREGEXE in
40807  [\\/]* | ?:[\\/]*)
40808  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40809  ;;
40810  *)
40811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40812for as_dir in $PATH
40813do
40814  IFS=$as_save_IFS
40815  test -z "$as_dir" && as_dir=.
40816    for ac_exec_ext in '' $ac_executable_extensions; do
40817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40818    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40820    break 2
40821  fi
40822done
40823  done
40824IFS=$as_save_IFS
40825
40826  ;;
40827esac
40828fi
40829JTREGEXE=$ac_cv_path_JTREGEXE
40830if test -n "$JTREGEXE"; then
40831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40832$as_echo "$JTREGEXE" >&6; }
40833else
40834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40835$as_echo "no" >&6; }
40836fi
40837
40838
40839  test -n "$JTREGEXE" && break
40840done
40841
40842  else
40843    # The variable is set, but is it from the command line or the environment?
40844
40845    # Try to remove the string !JTREGEXE! from our list.
40846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40848      # If it failed, the variable was not from the command line. Ignore it,
40849      # but warn the user (except for BASH, which is always set by the calling BASH).
40850      if test "xJTREGEXE" != xBASH; then
40851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40852$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40853      fi
40854      # Try to locate tool using the code snippet
40855      for ac_prog in jtreg
40856do
40857  # Extract the first word of "$ac_prog", so it can be a program name with args.
40858set dummy $ac_prog; ac_word=$2
40859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40860$as_echo_n "checking for $ac_word... " >&6; }
40861if ${ac_cv_path_JTREGEXE+:} false; then :
40862  $as_echo_n "(cached) " >&6
40863else
40864  case $JTREGEXE in
40865  [\\/]* | ?:[\\/]*)
40866  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40867  ;;
40868  *)
40869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40870for as_dir in $PATH
40871do
40872  IFS=$as_save_IFS
40873  test -z "$as_dir" && as_dir=.
40874    for ac_exec_ext in '' $ac_executable_extensions; do
40875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40876    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40878    break 2
40879  fi
40880done
40881  done
40882IFS=$as_save_IFS
40883
40884  ;;
40885esac
40886fi
40887JTREGEXE=$ac_cv_path_JTREGEXE
40888if test -n "$JTREGEXE"; then
40889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40890$as_echo "$JTREGEXE" >&6; }
40891else
40892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40893$as_echo "no" >&6; }
40894fi
40895
40896
40897  test -n "$JTREGEXE" && break
40898done
40899
40900    else
40901      # If it succeeded, then it was overridden by the user. We will use it
40902      # for the tool.
40903
40904      # First remove it from the list of overridden variables, so we can test
40905      # for unknown variables in the end.
40906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40907
40908      # Check if the provided tool contains a complete path.
40909      tool_specified="$JTREGEXE"
40910      tool_basename="${tool_specified##*/}"
40911      if test "x$tool_basename" = "x$tool_specified"; then
40912        # A command without a complete path is provided, search $PATH.
40913        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40914$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40915        # Extract the first word of "$tool_basename", so it can be a program name with args.
40916set dummy $tool_basename; ac_word=$2
40917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40918$as_echo_n "checking for $ac_word... " >&6; }
40919if ${ac_cv_path_JTREGEXE+:} false; then :
40920  $as_echo_n "(cached) " >&6
40921else
40922  case $JTREGEXE in
40923  [\\/]* | ?:[\\/]*)
40924  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40925  ;;
40926  *)
40927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40928for as_dir in $PATH
40929do
40930  IFS=$as_save_IFS
40931  test -z "$as_dir" && as_dir=.
40932    for ac_exec_ext in '' $ac_executable_extensions; do
40933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40934    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40936    break 2
40937  fi
40938done
40939  done
40940IFS=$as_save_IFS
40941
40942  ;;
40943esac
40944fi
40945JTREGEXE=$ac_cv_path_JTREGEXE
40946if test -n "$JTREGEXE"; then
40947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40948$as_echo "$JTREGEXE" >&6; }
40949else
40950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40951$as_echo "no" >&6; }
40952fi
40953
40954
40955        if test "x$JTREGEXE" = x; then
40956          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40957        fi
40958      else
40959        # Otherwise we believe it is a complete path. Use it as it is.
40960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40961$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40962        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40963$as_echo_n "checking for JTREGEXE... " >&6; }
40964        if test ! -x "$tool_specified"; then
40965          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40966$as_echo "not found" >&6; }
40967          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40968        fi
40969        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40970$as_echo "$tool_specified" >&6; }
40971      fi
40972    fi
40973  fi
40974
40975
40976
40977  if test "x$JTREGEXE" = x; then
40978    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40979  fi
40980
40981
40982      JT_HOME="`$DIRNAME $JTREGEXE`"
40983    fi
40984  fi
40985
40986
40987
40988
40989
40990
40991  # Option used to tell the compiler whether to create 32- or 64-bit executables
40992  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40993    COMPILER_TARGET_BITS_FLAG="-q"
40994  else
40995    COMPILER_TARGET_BITS_FLAG="-m"
40996  fi
40997
40998
40999  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41000  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41001    ARFLAGS="-r"
41002  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41003    ARFLAGS="-X64"
41004  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41005    # lib.exe is used as AR to create static libraries.
41006    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41007  else
41008    ARFLAGS=""
41009  fi
41010
41011
41012  ## Setup strip.
41013  # FIXME: should this really be per platform, or should it be per toolchain type?
41014  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41015  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41016  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41017    STRIPFLAGS="-g"
41018  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41019    STRIPFLAGS="-x"
41020  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41021    STRIPFLAGS="-S"
41022  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41023    STRIPFLAGS="-X32_64"
41024  fi
41025
41026  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41027    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41028  fi
41029
41030
41031  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41032    CC_OUT_OPTION=-Fo
41033    EXE_OUT_OPTION=-out:
41034    LD_OUT_OPTION=-out:
41035    AR_OUT_OPTION=-out:
41036  else
41037    # The option used to specify the target .o,.a or .so file.
41038    # When compiling, how to specify the to be created object file.
41039    CC_OUT_OPTION='-o$(SPACE)'
41040    # When linking, how to specify the to be created executable.
41041    EXE_OUT_OPTION='-o$(SPACE)'
41042    # When linking, how to specify the to be created dynamically linkable library.
41043    LD_OUT_OPTION='-o$(SPACE)'
41044    # When archiving, how to specify the to be create static archive for object files.
41045    AR_OUT_OPTION='rcs$(SPACE)'
41046  fi
41047
41048
41049
41050
41051
41052  # On Windows, we need to set RC flags.
41053  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41054    RC_FLAGS="-nologo -l0x409"
41055    if test "x$VARIANT" = xOPT; then
41056      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41057    fi
41058
41059    # The version variables used to create RC_FLAGS may be overridden
41060    # in a custom configure script, or possibly the command line.
41061    # Let those variables be expanded at make time in spec.gmk.
41062    # The \$ are escaped to the shell, and the $(...) variables
41063    # are evaluated by make.
41064    RC_FLAGS="$RC_FLAGS \
41065        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41066        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41067        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41068        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41069        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41070        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41071        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41072  fi
41073
41074
41075  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41076    # silence copyright notice and other headers.
41077    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41078  fi
41079
41080  if test "x$SYSROOT" != "x"; then
41081    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41082      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41083        # Solaris Studio does not have a concept of sysroot. Instead we must
41084        # make sure the default include and lib dirs are appended to each
41085        # compile and link command line.
41086        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41087        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41088            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41089            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41090      fi
41091    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41092      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41093      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41094      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41095    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41096      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41097      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41098    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41099      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41100      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41101    fi
41102    # Propagate the sysroot args to hotspot
41103    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41104    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41105    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41106  fi
41107
41108  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41109  # set this here so it doesn't have to be peppered throughout the forest
41110  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41111    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41112    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41113  fi
41114
41115
41116
41117
41118
41119# FIXME: Currently we must test this after toolchain but before flags. Fix!
41120
41121# Now we can test some aspects on the target using configure macros.
41122
41123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41124$as_echo_n "checking for ANSI C header files... " >&6; }
41125if ${ac_cv_header_stdc+:} false; then :
41126  $as_echo_n "(cached) " >&6
41127else
41128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41129/* end confdefs.h.  */
41130#include <stdlib.h>
41131#include <stdarg.h>
41132#include <string.h>
41133#include <float.h>
41134
41135int
41136main ()
41137{
41138
41139  ;
41140  return 0;
41141}
41142_ACEOF
41143if ac_fn_cxx_try_compile "$LINENO"; then :
41144  ac_cv_header_stdc=yes
41145else
41146  ac_cv_header_stdc=no
41147fi
41148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41149
41150if test $ac_cv_header_stdc = yes; then
41151  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41152  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41153/* end confdefs.h.  */
41154#include <string.h>
41155
41156_ACEOF
41157if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41158  $EGREP "memchr" >/dev/null 2>&1; then :
41159
41160else
41161  ac_cv_header_stdc=no
41162fi
41163rm -f conftest*
41164
41165fi
41166
41167if test $ac_cv_header_stdc = yes; then
41168  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41170/* end confdefs.h.  */
41171#include <stdlib.h>
41172
41173_ACEOF
41174if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41175  $EGREP "free" >/dev/null 2>&1; then :
41176
41177else
41178  ac_cv_header_stdc=no
41179fi
41180rm -f conftest*
41181
41182fi
41183
41184if test $ac_cv_header_stdc = yes; then
41185  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41186  if test "$cross_compiling" = yes; then :
41187  :
41188else
41189  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41190/* end confdefs.h.  */
41191#include <ctype.h>
41192#include <stdlib.h>
41193#if ((' ' & 0x0FF) == 0x020)
41194# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41195# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41196#else
41197# define ISLOWER(c) \
41198		   (('a' <= (c) && (c) <= 'i') \
41199		     || ('j' <= (c) && (c) <= 'r') \
41200		     || ('s' <= (c) && (c) <= 'z'))
41201# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41202#endif
41203
41204#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41205int
41206main ()
41207{
41208  int i;
41209  for (i = 0; i < 256; i++)
41210    if (XOR (islower (i), ISLOWER (i))
41211	|| toupper (i) != TOUPPER (i))
41212      return 2;
41213  return 0;
41214}
41215_ACEOF
41216if ac_fn_cxx_try_run "$LINENO"; then :
41217
41218else
41219  ac_cv_header_stdc=no
41220fi
41221rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41222  conftest.$ac_objext conftest.beam conftest.$ac_ext
41223fi
41224
41225fi
41226fi
41227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41228$as_echo "$ac_cv_header_stdc" >&6; }
41229if test $ac_cv_header_stdc = yes; then
41230
41231$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41232
41233fi
41234
41235# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41236for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41237		  inttypes.h stdint.h unistd.h
41238do :
41239  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41240ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41241"
41242if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41243  cat >>confdefs.h <<_ACEOF
41244#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41245_ACEOF
41246
41247fi
41248
41249done
41250
41251
41252
41253  ###############################################################################
41254  #
41255  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41256  # (The JVM can use 32 or 64 bit Java pointers but that decision
41257  # is made at runtime.)
41258  #
41259
41260  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41261    # Always specify -m flag on Solaris
41262    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41263
41264  # When we add flags to the "official" CFLAGS etc, we need to
41265  # keep track of these additions in ADDED_CFLAGS etc. These
41266  # will later be checked to make sure only controlled additions
41267  # have been made to CFLAGS etc.
41268  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41269  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41270  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41271
41272  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41273  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41274  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41275
41276  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41277  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41278  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41279
41280  elif test "x$COMPILE_TYPE" = xreduced; then
41281    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41282      # Specify -m if running reduced on unix platforms
41283
41284  # When we add flags to the "official" CFLAGS etc, we need to
41285  # keep track of these additions in ADDED_CFLAGS etc. These
41286  # will later be checked to make sure only controlled additions
41287  # have been made to CFLAGS etc.
41288  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41289  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41290  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41291
41292  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41293  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41294  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41295
41296  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41297  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41298  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41299
41300    fi
41301  fi
41302
41303  # Make compilation sanity check
41304  for ac_header in stdio.h
41305do :
41306  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41307if test "x$ac_cv_header_stdio_h" = xyes; then :
41308  cat >>confdefs.h <<_ACEOF
41309#define HAVE_STDIO_H 1
41310_ACEOF
41311
41312else
41313
41314    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41315$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41316    if test "x$COMPILE_TYPE" = xreduced; then
41317      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41318$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41319    elif test "x$COMPILE_TYPE" = xcross; then
41320      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41321$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41322    fi
41323    as_fn_error $? "Cannot continue." "$LINENO" 5
41324
41325fi
41326
41327done
41328
41329
41330  # The cast to long int works around a bug in the HP C Compiler
41331# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41332# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41333# This bug is HP SR number 8606223364.
41334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41335$as_echo_n "checking size of int *... " >&6; }
41336if ${ac_cv_sizeof_int_p+:} false; then :
41337  $as_echo_n "(cached) " >&6
41338else
41339  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41340
41341else
41342  if test "$ac_cv_type_int_p" = yes; then
41343     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41344$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41345as_fn_error 77 "cannot compute sizeof (int *)
41346See \`config.log' for more details" "$LINENO" 5; }
41347   else
41348     ac_cv_sizeof_int_p=0
41349   fi
41350fi
41351
41352fi
41353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41354$as_echo "$ac_cv_sizeof_int_p" >&6; }
41355
41356
41357
41358cat >>confdefs.h <<_ACEOF
41359#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41360_ACEOF
41361
41362
41363
41364  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41365  if test "x$ac_cv_sizeof_int_p" = x; then
41366    # The test failed, lets stick to the assumed value.
41367    { $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
41368$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41369  else
41370    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41371
41372    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41373      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41374      # Let's try to implicitely set the compilers target architecture and retry the test
41375      { $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
41376$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;}
41377      { $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
41378$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;}
41379
41380  # When we add flags to the "official" CFLAGS etc, we need to
41381  # keep track of these additions in ADDED_CFLAGS etc. These
41382  # will later be checked to make sure only controlled additions
41383  # have been made to CFLAGS etc.
41384  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41385  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41386  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41387
41388  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41389  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41390  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41391
41392  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41393  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41394  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41395
41396
41397      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41398      unset ac_cv_sizeof_int_p
41399      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41400      cat >>confdefs.h <<_ACEOF
41401#undef SIZEOF_INT_P
41402_ACEOF
41403
41404      # The cast to long int works around a bug in the HP C Compiler
41405# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41406# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41407# This bug is HP SR number 8606223364.
41408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41409$as_echo_n "checking size of int *... " >&6; }
41410if ${ac_cv_sizeof_int_p+:} false; then :
41411  $as_echo_n "(cached) " >&6
41412else
41413  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41414
41415else
41416  if test "$ac_cv_type_int_p" = yes; then
41417     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41418$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41419as_fn_error 77 "cannot compute sizeof (int *)
41420See \`config.log' for more details" "$LINENO" 5; }
41421   else
41422     ac_cv_sizeof_int_p=0
41423   fi
41424fi
41425
41426fi
41427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41428$as_echo "$ac_cv_sizeof_int_p" >&6; }
41429
41430
41431
41432cat >>confdefs.h <<_ACEOF
41433#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41434_ACEOF
41435
41436
41437
41438      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41439
41440      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41441        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
41442      fi
41443    fi
41444  fi
41445
41446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41447$as_echo_n "checking for target address size... " >&6; }
41448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41449$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41450
41451
41452  ###############################################################################
41453  #
41454  # Is the target little of big endian?
41455  #
41456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41457$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41458if ${ac_cv_c_bigendian+:} false; then :
41459  $as_echo_n "(cached) " >&6
41460else
41461  ac_cv_c_bigendian=unknown
41462    # See if we're dealing with a universal compiler.
41463    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41464/* end confdefs.h.  */
41465#ifndef __APPLE_CC__
41466	       not a universal capable compiler
41467	     #endif
41468	     typedef int dummy;
41469
41470_ACEOF
41471if ac_fn_cxx_try_compile "$LINENO"; then :
41472
41473	# Check for potential -arch flags.  It is not universal unless
41474	# there are at least two -arch flags with different values.
41475	ac_arch=
41476	ac_prev=
41477	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41478	 if test -n "$ac_prev"; then
41479	   case $ac_word in
41480	     i?86 | x86_64 | ppc | ppc64)
41481	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41482		 ac_arch=$ac_word
41483	       else
41484		 ac_cv_c_bigendian=universal
41485		 break
41486	       fi
41487	       ;;
41488	   esac
41489	   ac_prev=
41490	 elif test "x$ac_word" = "x-arch"; then
41491	   ac_prev=arch
41492	 fi
41493       done
41494fi
41495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41496    if test $ac_cv_c_bigendian = unknown; then
41497      # See if sys/param.h defines the BYTE_ORDER macro.
41498      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41499/* end confdefs.h.  */
41500#include <sys/types.h>
41501	     #include <sys/param.h>
41502
41503int
41504main ()
41505{
41506#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41507		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41508		     && LITTLE_ENDIAN)
41509	      bogus endian macros
41510	     #endif
41511
41512  ;
41513  return 0;
41514}
41515_ACEOF
41516if ac_fn_cxx_try_compile "$LINENO"; then :
41517  # It does; now see whether it defined to BIG_ENDIAN or not.
41518	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41519/* end confdefs.h.  */
41520#include <sys/types.h>
41521		#include <sys/param.h>
41522
41523int
41524main ()
41525{
41526#if BYTE_ORDER != BIG_ENDIAN
41527		 not big endian
41528		#endif
41529
41530  ;
41531  return 0;
41532}
41533_ACEOF
41534if ac_fn_cxx_try_compile "$LINENO"; then :
41535  ac_cv_c_bigendian=yes
41536else
41537  ac_cv_c_bigendian=no
41538fi
41539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41540fi
41541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41542    fi
41543    if test $ac_cv_c_bigendian = unknown; then
41544      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41545      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41546/* end confdefs.h.  */
41547#include <limits.h>
41548
41549int
41550main ()
41551{
41552#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41553	      bogus endian macros
41554	     #endif
41555
41556  ;
41557  return 0;
41558}
41559_ACEOF
41560if ac_fn_cxx_try_compile "$LINENO"; then :
41561  # It does; now see whether it defined to _BIG_ENDIAN or not.
41562	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41563/* end confdefs.h.  */
41564#include <limits.h>
41565
41566int
41567main ()
41568{
41569#ifndef _BIG_ENDIAN
41570		 not big endian
41571		#endif
41572
41573  ;
41574  return 0;
41575}
41576_ACEOF
41577if ac_fn_cxx_try_compile "$LINENO"; then :
41578  ac_cv_c_bigendian=yes
41579else
41580  ac_cv_c_bigendian=no
41581fi
41582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41583fi
41584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41585    fi
41586    if test $ac_cv_c_bigendian = unknown; then
41587      # Compile a test program.
41588      if test "$cross_compiling" = yes; then :
41589  # Try to guess by grepping values from an object file.
41590	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41591/* end confdefs.h.  */
41592short int ascii_mm[] =
41593		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41594		short int ascii_ii[] =
41595		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41596		int use_ascii (int i) {
41597		  return ascii_mm[i] + ascii_ii[i];
41598		}
41599		short int ebcdic_ii[] =
41600		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41601		short int ebcdic_mm[] =
41602		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41603		int use_ebcdic (int i) {
41604		  return ebcdic_mm[i] + ebcdic_ii[i];
41605		}
41606		extern int foo;
41607
41608int
41609main ()
41610{
41611return use_ascii (foo) == use_ebcdic (foo);
41612  ;
41613  return 0;
41614}
41615_ACEOF
41616if ac_fn_cxx_try_compile "$LINENO"; then :
41617  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41618	      ac_cv_c_bigendian=yes
41619	    fi
41620	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41621	      if test "$ac_cv_c_bigendian" = unknown; then
41622		ac_cv_c_bigendian=no
41623	      else
41624		# finding both strings is unlikely to happen, but who knows?
41625		ac_cv_c_bigendian=unknown
41626	      fi
41627	    fi
41628fi
41629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41630else
41631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41632/* end confdefs.h.  */
41633$ac_includes_default
41634int
41635main ()
41636{
41637
41638	     /* Are we little or big endian?  From Harbison&Steele.  */
41639	     union
41640	     {
41641	       long int l;
41642	       char c[sizeof (long int)];
41643	     } u;
41644	     u.l = 1;
41645	     return u.c[sizeof (long int) - 1] == 1;
41646
41647  ;
41648  return 0;
41649}
41650_ACEOF
41651if ac_fn_cxx_try_run "$LINENO"; then :
41652  ac_cv_c_bigendian=no
41653else
41654  ac_cv_c_bigendian=yes
41655fi
41656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41657  conftest.$ac_objext conftest.beam conftest.$ac_ext
41658fi
41659
41660    fi
41661fi
41662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41663$as_echo "$ac_cv_c_bigendian" >&6; }
41664 case $ac_cv_c_bigendian in #(
41665   yes)
41666     ENDIAN="big";; #(
41667   no)
41668     ENDIAN="little" ;; #(
41669   universal)
41670     ENDIAN="universal_endianness"
41671     ;; #(
41672   *)
41673     ENDIAN="unknown" ;;
41674 esac
41675
41676
41677  if test "x$ENDIAN" = xuniversal_endianness; then
41678    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41679  fi
41680  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41681    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
41682  fi
41683
41684
41685# Configure flags for the tools
41686
41687  ###############################################################################
41688  #
41689  # How to compile shared libraries.
41690  #
41691
41692  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41693    PICFLAG="-fPIC"
41694    C_FLAG_REORDER=''
41695    CXX_FLAG_REORDER=''
41696
41697    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41698      # Linking is different on MacOSX
41699      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41700      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41701      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41702      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41703      SET_SHARED_LIBRARY_MAPFILE=''
41704    else
41705      # Default works for linux, might work on other platforms as well.
41706      SHARED_LIBRARY_FLAGS='-shared'
41707      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41708      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41709      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41710      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41711    fi
41712  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41713    PICFLAG=''
41714    C_FLAG_REORDER=''
41715    CXX_FLAG_REORDER=''
41716
41717    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41718      # Linking is different on MacOSX
41719      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41720      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41721      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41722      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41723      SET_SHARED_LIBRARY_MAPFILE=''
41724    else
41725      # Default works for linux, might work on other platforms as well.
41726      SHARED_LIBRARY_FLAGS='-shared'
41727      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41728      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41729      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41730      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41731    fi
41732  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41733    PICFLAG="-KPIC"
41734    C_FLAG_REORDER='-xF'
41735    CXX_FLAG_REORDER='-xF'
41736    SHARED_LIBRARY_FLAGS="-G"
41737    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41738    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41739    SET_SHARED_LIBRARY_NAME=''
41740    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41741  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41742    PICFLAG="-qpic=large"
41743    C_FLAG_REORDER=''
41744    CXX_FLAG_REORDER=''
41745    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41746    SET_EXECUTABLE_ORIGIN=""
41747    SET_SHARED_LIBRARY_ORIGIN=''
41748    SET_SHARED_LIBRARY_NAME=''
41749    SET_SHARED_LIBRARY_MAPFILE=''
41750  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41751    PICFLAG=""
41752    C_FLAG_REORDER=''
41753    CXX_FLAG_REORDER=''
41754    SHARED_LIBRARY_FLAGS="-LD"
41755    SET_EXECUTABLE_ORIGIN=''
41756    SET_SHARED_LIBRARY_ORIGIN=''
41757    SET_SHARED_LIBRARY_NAME=''
41758    SET_SHARED_LIBRARY_MAPFILE=''
41759  fi
41760
41761
41762
41763
41764
41765
41766
41767
41768  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41769    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41770    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41771    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41772  fi
41773  # The (cross) compiler is now configured, we can now test capabilities
41774  # of the target platform.
41775
41776
41777
41778  ###############################################################################
41779  #
41780  # Setup the opt flags for different compilers
41781  # and different operating systems.
41782  #
41783
41784  # FIXME: this was indirectly the old default, but just inherited.
41785  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41786  #   C_FLAG_DEPS="-MMD -MF"
41787  # fi
41788
41789  # Generate make dependency files
41790  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41791    C_FLAG_DEPS="-MMD -MF"
41792  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41793    C_FLAG_DEPS="-MMD -MF"
41794  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41795    C_FLAG_DEPS="-xMMD -xMF"
41796  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41797    C_FLAG_DEPS="-qmakedep=gcc -MF"
41798  fi
41799  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41800
41801
41802
41803  # Debug symbols
41804  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41805    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41806      # reduce from default "-g2" option to save space
41807      CFLAGS_DEBUG_SYMBOLS="-g1"
41808      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41809    else
41810      CFLAGS_DEBUG_SYMBOLS="-g"
41811      CXXFLAGS_DEBUG_SYMBOLS="-g"
41812    fi
41813  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41814    CFLAGS_DEBUG_SYMBOLS="-g"
41815    CXXFLAGS_DEBUG_SYMBOLS="-g"
41816  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41817    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41818    # FIXME: likely a bug, this disables debug symbols rather than enables them
41819    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41820  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41821    CFLAGS_DEBUG_SYMBOLS="-g"
41822    CXXFLAGS_DEBUG_SYMBOLS="-g"
41823  fi
41824
41825
41826
41827  # bounds, memory and behavior checking options
41828  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41829    case $DEBUG_LEVEL in
41830    release )
41831      # no adjustment
41832      ;;
41833    fastdebug )
41834      # no adjustment
41835      ;;
41836    slowdebug )
41837      # Add runtime stack smashing and undefined behavior checks
41838      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41839      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
41840      ;;
41841    esac
41842  fi
41843
41844
41845
41846  # Optimization levels
41847  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41848    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41849
41850    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41851      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41852      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41853      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41854      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41855      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41856      C_O_FLAG_NONE="-xregs=no%frameptr"
41857      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41858      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41859      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41860      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41861      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41862      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41863        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41864        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41865      fi
41866    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41867      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41868      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41869      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41870      C_O_FLAG_DEBUG=""
41871      C_O_FLAG_NONE=""
41872      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41873      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41874      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41875      C_O_FLAG_DEBUG=""
41876      CXX_O_FLAG_NONE=""
41877    fi
41878  else
41879    # The remaining toolchains share opt flags between CC and CXX;
41880    # setup for C and duplicate afterwards.
41881    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41882      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41883        # On MacOSX we optimize for size, something
41884        # we should do for all platforms?
41885        C_O_FLAG_HIGHEST="-Os"
41886        C_O_FLAG_HI="-Os"
41887        C_O_FLAG_NORM="-Os"
41888      else
41889        C_O_FLAG_HIGHEST="-O3"
41890        C_O_FLAG_HI="-O3"
41891        C_O_FLAG_NORM="-O2"
41892      fi
41893      C_O_FLAG_DEBUG="-O0"
41894      C_O_FLAG_NONE="-O0"
41895    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41896      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41897        # On MacOSX we optimize for size, something
41898        # we should do for all platforms?
41899        C_O_FLAG_HIGHEST="-Os"
41900        C_O_FLAG_HI="-Os"
41901        C_O_FLAG_NORM="-Os"
41902      else
41903        C_O_FLAG_HIGHEST="-O3"
41904        C_O_FLAG_HI="-O3"
41905        C_O_FLAG_NORM="-O2"
41906      fi
41907      C_O_FLAG_DEBUG="-O0"
41908      C_O_FLAG_NONE="-O0"
41909    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41910      C_O_FLAG_HIGHEST="-O3"
41911      C_O_FLAG_HI="-O3 -qstrict"
41912      C_O_FLAG_NORM="-O2"
41913      C_O_FLAG_DEBUG="-qnoopt"
41914      C_O_FLAG_NONE="-qnoop"
41915    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41916      C_O_FLAG_HIGHEST="-O2"
41917      C_O_FLAG_HI="-O1"
41918      C_O_FLAG_NORM="-O1"
41919      C_O_FLAG_DEBUG="-Od"
41920      C_O_FLAG_NONE="-Od"
41921    fi
41922    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41923    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41924    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41925    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
41926    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41927  fi
41928
41929  # Adjust optimization flags according to debug level.
41930  case $DEBUG_LEVEL in
41931    release )
41932      # no adjustment
41933      ;;
41934    fastdebug )
41935      # Not quite so much optimization
41936      C_O_FLAG_HI="$C_O_FLAG_NORM"
41937      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41938      ;;
41939    slowdebug )
41940      # Disable optimization
41941      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
41942      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
41943      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
41944      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
41945      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
41946      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
41947      ;;
41948  esac
41949
41950
41951
41952
41953
41954
41955
41956
41957
41958
41959
41960
41961
41962  # Special extras...
41963  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41964    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41965      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41966      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41967    fi
41968    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
41969    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
41970  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41971    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
41972    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
41973  fi
41974
41975  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41976    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41977$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41978  fi
41979
41980  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41981    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41982$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41983  fi
41984
41985  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41986    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41987$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41988  fi
41989
41990
41991# Check whether --with-extra-cflags was given.
41992if test "${with_extra_cflags+set}" = set; then :
41993  withval=$with_extra_cflags;
41994fi
41995
41996
41997
41998# Check whether --with-extra-cxxflags was given.
41999if test "${with_extra_cxxflags+set}" = set; then :
42000  withval=$with_extra_cxxflags;
42001fi
42002
42003
42004
42005# Check whether --with-extra-ldflags was given.
42006if test "${with_extra_ldflags+set}" = set; then :
42007  withval=$with_extra_ldflags;
42008fi
42009
42010
42011  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42012  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42013  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42014
42015  # Hotspot needs these set in their legacy form
42016  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42017  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42018  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42019
42020
42021
42022
42023
42024  ###############################################################################
42025  #
42026  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42027  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42028  #
42029
42030  # Setup compiler/platform specific flags into
42031  #    CFLAGS_JDK    - C Compiler flags
42032  #    CXXFLAGS_JDK  - C++ Compiler flags
42033  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42034  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42035    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42036        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42037    case $OPENJDK_TARGET_CPU_ARCH in
42038      arm )
42039        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42040        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42041        ;;
42042      ppc )
42043        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42044        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42045        ;;
42046      * )
42047        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42048        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42049        ;;
42050    esac
42051  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42052    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42053    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42054      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42055    fi
42056
42057    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42058    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42059  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42060    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42061    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42062  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42063    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42064        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42065        -DWIN32_LEAN_AND_MEAN \
42066        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42067        -DWIN32 -DIAL"
42068    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42069      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42070    else
42071      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42072    fi
42073    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42074    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42075    # studio.
42076    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42077      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42078          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42079    fi
42080  fi
42081
42082  ###############################################################################
42083
42084  # Adjust flags according to debug level.
42085  case $DEBUG_LEVEL in
42086    fastdebug | slowdebug )
42087      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42088      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42089      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42090      ;;
42091    release )
42092      ;;
42093    * )
42094      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42095      ;;
42096  esac
42097
42098  # Setup LP64
42099  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42100
42101  # Set some common defines. These works for all compilers, but assume
42102  # -D is universally accepted.
42103
42104  # Setup endianness
42105  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42106    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42107    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42108    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42109    #   Note: -Dmacro         is the same as    #define macro 1
42110    #         -Dmacro=        is the same as    #define macro
42111    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42112      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42113    else
42114      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42115    fi
42116  else
42117    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42118    # are defined in the system?
42119    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42120      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42121    else
42122      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42123    fi
42124  fi
42125
42126  # Setup target OS define. Use OS target name but in upper case.
42127  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42128  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42129
42130  # Setup target CPU
42131  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42132
42133  # Setup debug/release defines
42134  if test "x$DEBUG_LEVEL" = xrelease; then
42135    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42136    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42137      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42138    fi
42139  else
42140    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42141  fi
42142
42143  # Setup release name
42144  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42145
42146
42147  # Set some additional per-OS defines.
42148  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42149    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42150  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42151    # FIXME: PPC64 should not be here.
42152    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42153  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42154    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42155  fi
42156
42157  # Additional macosx handling
42158  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42159    # Setting these parameters makes it an error to link to macosx APIs that are
42160    # newer than the given OS version and makes the linked binaries compatible
42161    # even if built on a newer version of the OS.
42162    # The expected format is X.Y.Z
42163    MACOSX_VERSION_MIN=10.7.0
42164
42165
42166    # The macro takes the version with no dots, ex: 1070
42167    # Let the flags variables get resolved in make for easier override on make
42168    # command line.
42169    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42170    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42171  fi
42172
42173  # Setup some hard coded includes
42174  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42175      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42176      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42177      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42178
42179  # The shared libraries are compiled using the picflag.
42180  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42181  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42182
42183  # Executable flags
42184  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42185  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42186
42187
42188
42189
42190
42191
42192  # Flags for compiling test libraries
42193  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42194  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42195
42196  # Flags for compiling test executables
42197  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42198  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42199
42200
42201
42202
42203
42204
42205  # Setup LDFLAGS et al.
42206  #
42207
42208  # Now this is odd. The JDK native libraries have to link against libjvm.so
42209  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42210  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42211  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42212  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42213  # libraries will link to whatever is in memory. Yuck.
42214  #
42215  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42216  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42217    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42218    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42219      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42220    fi
42221    # TODO: make -debug optional "--disable-full-debug-symbols"
42222    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42223  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42224    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42225    # We have previously set HAS_GNU_HASH if this is the case
42226    if test -n "$HAS_GNU_HASH"; then
42227      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42228    fi
42229    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42230      # And since we now know that the linker is gnu, then add -z defs, to forbid
42231      # undefined symbols in object files.
42232      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42233      case $DEBUG_LEVEL in
42234        release )
42235          # tell linker to optimize libraries.
42236          # Should this be supplied to the OSS linker as well?
42237          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42238          ;;
42239        slowdebug )
42240          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42241            # do relocations at load
42242            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42243            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42244          fi
42245          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42246            # mark relocations read only
42247            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42248            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42249          fi
42250          ;;
42251        fastdebug )
42252          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42253            # mark relocations read only
42254            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42255            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42256          fi
42257          ;;
42258        * )
42259          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42260          ;;
42261        esac
42262    fi
42263  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42264    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42265    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42266  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42267    LDFLAGS_JDK="${LDFLAGS_JDK} -brtl -bnolibpath -liconv -bexpall -bernotok"
42268  fi
42269
42270  # Customize LDFLAGS for executables
42271
42272  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42273
42274  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42275    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42276      LDFLAGS_STACK_SIZE=1048576
42277    else
42278      LDFLAGS_STACK_SIZE=327680
42279    fi
42280    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42281  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42282    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42283  fi
42284
42285  # Customize LDFLAGS for libs
42286  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42287
42288  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42289    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42290    LDFLAGS_JDKLIB_SUFFIX=""
42291  else
42292    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42293        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42294
42295    # On some platforms (mac) the linker warns about non existing -L dirs.
42296    # Add server first if available. Linking aginst client does not always produce the same results.
42297    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42298    # Default to server for other variants.
42299    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42300      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42301    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42302      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42303    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42304      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42305    else
42306      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42307    fi
42308
42309    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42310    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42311      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42312    fi
42313  fi
42314
42315
42316
42317
42318
42319
42320
42321  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42322  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42323  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42324  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42325
42326
42327
42328
42329
42330
42331
42332  # Some Zero and Shark settings.
42333  # ZERO_ARCHFLAG tells the compiler which mode to build for
42334  case "${OPENJDK_TARGET_CPU}" in
42335    s390)
42336      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42337      ;;
42338    *)
42339      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42340  esac
42341
42342  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42343$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42344  supports=yes
42345
42346  saved_cflags="$CFLAGS"
42347  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42348  ac_ext=c
42349ac_cpp='$CPP $CPPFLAGS'
42350ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42351ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42352ac_compiler_gnu=$ac_cv_c_compiler_gnu
42353
42354  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42355/* end confdefs.h.  */
42356int i;
42357_ACEOF
42358if ac_fn_c_try_compile "$LINENO"; then :
42359
42360else
42361  supports=no
42362fi
42363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42364  ac_ext=cpp
42365ac_cpp='$CXXCPP $CPPFLAGS'
42366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42369
42370  CFLAGS="$saved_cflags"
42371
42372  saved_cxxflags="$CXXFLAGS"
42373  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42374  ac_ext=cpp
42375ac_cpp='$CXXCPP $CPPFLAGS'
42376ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42377ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42378ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42379
42380  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42381/* end confdefs.h.  */
42382int i;
42383_ACEOF
42384if ac_fn_cxx_try_compile "$LINENO"; then :
42385
42386else
42387  supports=no
42388fi
42389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42390  ac_ext=cpp
42391ac_cpp='$CXXCPP $CPPFLAGS'
42392ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42393ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42394ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42395
42396  CXXFLAGS="$saved_cxxflags"
42397
42398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42399$as_echo "$supports" >&6; }
42400  if test "x$supports" = "xyes" ; then
42401    :
42402  else
42403    ZERO_ARCHFLAG=""
42404  fi
42405
42406
42407
42408  # Check that the compiler supports -mX (or -qX on AIX) flags
42409  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42410
42411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42412$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42413  supports=yes
42414
42415  saved_cflags="$CFLAGS"
42416  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42417  ac_ext=c
42418ac_cpp='$CPP $CPPFLAGS'
42419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42421ac_compiler_gnu=$ac_cv_c_compiler_gnu
42422
42423  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42424/* end confdefs.h.  */
42425int i;
42426_ACEOF
42427if ac_fn_c_try_compile "$LINENO"; then :
42428
42429else
42430  supports=no
42431fi
42432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42433  ac_ext=cpp
42434ac_cpp='$CXXCPP $CPPFLAGS'
42435ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42436ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42437ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42438
42439  CFLAGS="$saved_cflags"
42440
42441  saved_cxxflags="$CXXFLAGS"
42442  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42443  ac_ext=cpp
42444ac_cpp='$CXXCPP $CPPFLAGS'
42445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42448
42449  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42450/* end confdefs.h.  */
42451int i;
42452_ACEOF
42453if ac_fn_cxx_try_compile "$LINENO"; then :
42454
42455else
42456  supports=no
42457fi
42458rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42459  ac_ext=cpp
42460ac_cpp='$CXXCPP $CPPFLAGS'
42461ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42462ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42463ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42464
42465  CXXFLAGS="$saved_cxxflags"
42466
42467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42468$as_echo "$supports" >&6; }
42469  if test "x$supports" = "xyes" ; then
42470    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42471  else
42472    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42473  fi
42474
42475
42476
42477  # Check whether --enable-warnings-as-errors was given.
42478if test "${enable_warnings_as_errors+set}" = set; then :
42479  enableval=$enable_warnings_as_errors;
42480fi
42481
42482
42483  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
42484$as_echo_n "checking if native warnings are errors... " >&6; }
42485  if test "x$enable_warnings_as_errors" = "xyes"; then
42486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
42487$as_echo "yes (explicitely set)" >&6; }
42488    WARNINGS_AS_ERRORS=true
42489  elif test "x$enable_warnings_as_errors" = "xno"; then
42490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42491$as_echo "no" >&6; }
42492    WARNINGS_AS_ERRORS=false
42493  elif test "x$enable_warnings_as_errors" = "x"; then
42494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
42495$as_echo "yes (default)" >&6; }
42496    WARNINGS_AS_ERRORS=true
42497  else
42498    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
42499  fi
42500
42501
42502  case "${TOOLCHAIN_TYPE}" in
42503    microsoft)
42504      DISABLE_WARNING_PREFIX="-wd"
42505      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42506      ;;
42507    solstudio)
42508      DISABLE_WARNING_PREFIX="-erroff="
42509      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42510      ;;
42511    gcc)
42512      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42513
42514  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42515$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42516  supports=yes
42517
42518  saved_cflags="$CFLAGS"
42519  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42520  ac_ext=c
42521ac_cpp='$CPP $CPPFLAGS'
42522ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42523ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42524ac_compiler_gnu=$ac_cv_c_compiler_gnu
42525
42526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42527/* end confdefs.h.  */
42528int i;
42529_ACEOF
42530if ac_fn_c_try_compile "$LINENO"; then :
42531
42532else
42533  supports=no
42534fi
42535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42536  ac_ext=cpp
42537ac_cpp='$CXXCPP $CPPFLAGS'
42538ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42539ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42540ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42541
42542  CFLAGS="$saved_cflags"
42543
42544  saved_cxxflags="$CXXFLAGS"
42545  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42546  ac_ext=cpp
42547ac_cpp='$CXXCPP $CPPFLAGS'
42548ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42549ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42550ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42551
42552  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42553/* end confdefs.h.  */
42554int i;
42555_ACEOF
42556if ac_fn_cxx_try_compile "$LINENO"; then :
42557
42558else
42559  supports=no
42560fi
42561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42562  ac_ext=cpp
42563ac_cpp='$CXXCPP $CPPFLAGS'
42564ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42565ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42566ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42567
42568  CXXFLAGS="$saved_cxxflags"
42569
42570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42571$as_echo "$supports" >&6; }
42572  if test "x$supports" = "xyes" ; then
42573    GCC_CAN_DISABLE_WARNINGS=true
42574  else
42575    GCC_CAN_DISABLE_WARNINGS=false
42576
42577  fi
42578
42579      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42580        DISABLE_WARNING_PREFIX="-Wno-"
42581      else
42582        DISABLE_WARNING_PREFIX=
42583      fi
42584      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42585      ;;
42586    clang)
42587      DISABLE_WARNING_PREFIX="-Wno-"
42588      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42589      ;;
42590  esac
42591
42592
42593
42594
42595# Setup debug symbols (need objcopy from the toolchain for that)
42596
42597  #
42598  # ENABLE_DEBUG_SYMBOLS
42599  # This must be done after the toolchain is setup, since we're looking at objcopy.
42600  #
42601  # Check whether --enable-debug-symbols was given.
42602if test "${enable_debug_symbols+set}" = set; then :
42603  enableval=$enable_debug_symbols;
42604fi
42605
42606
42607  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42608$as_echo_n "checking if we should generate debug symbols... " >&6; }
42609
42610  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42611    # explicit enabling of enable-debug-symbols and can't find objcopy
42612    #   this is an error
42613    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42614  fi
42615
42616  if test "x$enable_debug_symbols" = "xyes"; then
42617    ENABLE_DEBUG_SYMBOLS=true
42618  elif test "x$enable_debug_symbols" = "xno"; then
42619    ENABLE_DEBUG_SYMBOLS=false
42620  else
42621    # Default is on if objcopy is found
42622    if test "x$OBJCOPY" != x; then
42623      ENABLE_DEBUG_SYMBOLS=true
42624    # MacOS X and Windows don't use objcopy but default is on for those OSes
42625    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42626      ENABLE_DEBUG_SYMBOLS=true
42627    else
42628      ENABLE_DEBUG_SYMBOLS=false
42629    fi
42630  fi
42631
42632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42633$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42634
42635  #
42636  # ZIP_DEBUGINFO_FILES
42637  #
42638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42639$as_echo_n "checking if we should zip debug-info files... " >&6; }
42640  # Check whether --enable-zip-debug-info was given.
42641if test "${enable_zip_debug_info+set}" = set; then :
42642  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42643else
42644  enable_zip_debug_info="yes"
42645fi
42646
42647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42648$as_echo "${enable_zip_debug_info}" >&6; }
42649
42650  if test "x${enable_zip_debug_info}" = "xno"; then
42651    ZIP_DEBUGINFO_FILES=false
42652  else
42653    ZIP_DEBUGINFO_FILES=true
42654  fi
42655
42656
42657
42658
42659
42660  # Check whether --enable-native-coverage was given.
42661if test "${enable_native_coverage+set}" = set; then :
42662  enableval=$enable_native_coverage;
42663fi
42664
42665  GCOV_ENABLED="false"
42666  if test "x$enable_native_coverage" = "xyes"; then
42667    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
42668      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42669$as_echo_n "checking if native coverage is enabled... " >&6; }
42670      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42671$as_echo "yes" >&6; }
42672      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
42673      GCOV_LDFLAGS="-fprofile-arcs"
42674      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
42675      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
42676      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
42677      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
42678      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
42679      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
42680      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
42681      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
42682      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
42683      GCOV_ENABLED="true"
42684    else
42685      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
42686    fi
42687  elif test "x$enable_native_coverage" = "xno"; then
42688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
42689$as_echo_n "checking if native coverage is enabled... " >&6; }
42690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42691$as_echo "no" >&6; }
42692  elif test "x$enable_native_coverage" != "x"; then
42693    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
42694  fi
42695
42696
42697
42698
42699###############################################################################
42700#
42701# Check dependencies for external and internal libraries.
42702#
42703###############################################################################
42704
42705# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42706
42707  # When using cygwin or msys, we need a wrapper binary that renames
42708  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42709  # @files and rewrites these too! This wrapper binary is
42710  # called fixpath.
42711  FIXPATH=
42712  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42714$as_echo_n "checking if fixpath can be created... " >&6; }
42715    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42716    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
42717    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
42718    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42719      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42720      FIXPATH="$FIXPATH_BIN -c"
42721    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42722      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42723      # @ was chosen as separator to minimize risk of other tools messing around with it
42724      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
42725          | tr ' ' '\n' | grep '^/./' | sort | uniq`
42726      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42727      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
42728    fi
42729    FIXPATH_SRC_W="$FIXPATH_SRC"
42730    FIXPATH_BIN_W="$FIXPATH_BIN"
42731
42732  unix_path="$FIXPATH_SRC_W"
42733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42734    windows_path=`$CYGPATH -m "$unix_path"`
42735    FIXPATH_SRC_W="$windows_path"
42736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42737    windows_path=`cmd //c echo $unix_path`
42738    FIXPATH_SRC_W="$windows_path"
42739  fi
42740
42741
42742  unix_path="$FIXPATH_BIN_W"
42743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42744    windows_path=`$CYGPATH -m "$unix_path"`
42745    FIXPATH_BIN_W="$windows_path"
42746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42747    windows_path=`cmd //c echo $unix_path`
42748    FIXPATH_BIN_W="$windows_path"
42749  fi
42750
42751    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
42752    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
42753    cd $FIXPATH_DIR
42754    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
42755    cd $CURDIR
42756
42757    if test ! -x $FIXPATH_BIN; then
42758      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42759$as_echo "no" >&6; }
42760      cat $FIXPATH_DIR/fixpath1.log
42761      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
42762    fi
42763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42764$as_echo "yes" >&6; }
42765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42766$as_echo_n "checking if fixpath.exe works... " >&6; }
42767    cd $FIXPATH_DIR
42768    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
42769        > $FIXPATH_DIR/fixpath2.log 2>&1
42770    cd $CURDIR
42771    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
42772      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42773$as_echo "no" >&6; }
42774      cat $FIXPATH_DIR/fixpath2.log
42775      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42776    fi
42777    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42778$as_echo "yes" >&6; }
42779  fi
42780
42781
42782
42783
42784
42785
42786  ###############################################################################
42787  #
42788  # OS specific settings that we never will need to probe.
42789  #
42790  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42792$as_echo_n "checking what is not needed on Linux?... " >&6; }
42793    PULSE_NOT_NEEDED=yes
42794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42795$as_echo "pulse" >&6; }
42796  fi
42797
42798  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42800$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42801    ALSA_NOT_NEEDED=yes
42802    PULSE_NOT_NEEDED=yes
42803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42804$as_echo "alsa pulse" >&6; }
42805  fi
42806
42807  if test "x$OPENJDK_TARGET_OS" = xaix; then
42808    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42809$as_echo_n "checking what is not needed on AIX?... " >&6; }
42810    ALSA_NOT_NEEDED=yes
42811    PULSE_NOT_NEEDED=yes
42812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42813$as_echo "alsa pulse" >&6; }
42814  fi
42815
42816
42817  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42818    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42819$as_echo_n "checking what is not needed on Windows?... " >&6; }
42820    CUPS_NOT_NEEDED=yes
42821    ALSA_NOT_NEEDED=yes
42822    PULSE_NOT_NEEDED=yes
42823    X11_NOT_NEEDED=yes
42824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42825$as_echo "alsa cups pulse x11" >&6; }
42826  fi
42827
42828  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42830$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42831    ALSA_NOT_NEEDED=yes
42832    PULSE_NOT_NEEDED=yes
42833    X11_NOT_NEEDED=yes
42834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42835$as_echo "alsa pulse x11" >&6; }
42836  fi
42837
42838  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42839    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42840$as_echo_n "checking what is not needed on bsd?... " >&6; }
42841    ALSA_NOT_NEEDED=yes
42842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42843$as_echo "alsa" >&6; }
42844  fi
42845
42846  if test "x$OPENJDK" = "xfalse"; then
42847    FREETYPE_NOT_NEEDED=yes
42848  fi
42849
42850  if test "x$SUPPORT_HEADFUL" = xno; then
42851    X11_NOT_NEEDED=yes
42852  fi
42853
42854
42855
42856  ###############################################################################
42857  #
42858  # Check for X Windows
42859  #
42860
42861  if test "x$X11_NOT_NEEDED" = xyes; then
42862    if test "x${with_x}" != x; then
42863      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
42864$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
42865    fi
42866    X_CFLAGS=
42867    X_LIBS=
42868  else
42869    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42870    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42871    # --x-libraries for the sysroot, if that seems to be correct.
42872    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42873      if test "x$SYSROOT" != "x"; then
42874        if test "x$x_includes" = xNONE; then
42875          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42876            x_includes="$SYSROOT/usr/X11R6/include"
42877          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42878            x_includes="$SYSROOT/usr/include"
42879          fi
42880        fi
42881        if test "x$x_libraries" = xNONE; then
42882          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42883            x_libraries="$SYSROOT/usr/X11R6/lib"
42884          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42885            x_libraries="$SYSROOT/usr/lib64"
42886          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42887            x_libraries="$SYSROOT/usr/lib"
42888          fi
42889        fi
42890      fi
42891    fi
42892
42893    # Now let autoconf do it's magic
42894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42895$as_echo_n "checking for X... " >&6; }
42896
42897
42898# Check whether --with-x was given.
42899if test "${with_x+set}" = set; then :
42900  withval=$with_x;
42901fi
42902
42903# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42904if test "x$with_x" = xno; then
42905  # The user explicitly disabled X.
42906  have_x=disabled
42907else
42908  case $x_includes,$x_libraries in #(
42909    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42910    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42911  $as_echo_n "(cached) " >&6
42912else
42913  # One or both of the vars are not set, and there is no cached value.
42914ac_x_includes=no ac_x_libraries=no
42915rm -f -r conftest.dir
42916if mkdir conftest.dir; then
42917  cd conftest.dir
42918  cat >Imakefile <<'_ACEOF'
42919incroot:
42920	@echo incroot='${INCROOT}'
42921usrlibdir:
42922	@echo usrlibdir='${USRLIBDIR}'
42923libdir:
42924	@echo libdir='${LIBDIR}'
42925_ACEOF
42926  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42927    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42928    for ac_var in incroot usrlibdir libdir; do
42929      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42930    done
42931    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42932    for ac_extension in a so sl dylib la dll; do
42933      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42934	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42935	ac_im_usrlibdir=$ac_im_libdir; break
42936      fi
42937    done
42938    # Screen out bogus values from the imake configuration.  They are
42939    # bogus both because they are the default anyway, and because
42940    # using them would break gcc on systems where it needs fixed includes.
42941    case $ac_im_incroot in
42942	/usr/include) ac_x_includes= ;;
42943	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42944    esac
42945    case $ac_im_usrlibdir in
42946	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42947	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42948    esac
42949  fi
42950  cd ..
42951  rm -f -r conftest.dir
42952fi
42953
42954# Standard set of common directories for X headers.
42955# Check X11 before X11Rn because it is often a symlink to the current release.
42956ac_x_header_dirs='
42957/usr/X11/include
42958/usr/X11R7/include
42959/usr/X11R6/include
42960/usr/X11R5/include
42961/usr/X11R4/include
42962
42963/usr/include/X11
42964/usr/include/X11R7
42965/usr/include/X11R6
42966/usr/include/X11R5
42967/usr/include/X11R4
42968
42969/usr/local/X11/include
42970/usr/local/X11R7/include
42971/usr/local/X11R6/include
42972/usr/local/X11R5/include
42973/usr/local/X11R4/include
42974
42975/usr/local/include/X11
42976/usr/local/include/X11R7
42977/usr/local/include/X11R6
42978/usr/local/include/X11R5
42979/usr/local/include/X11R4
42980
42981/usr/X386/include
42982/usr/x386/include
42983/usr/XFree86/include/X11
42984
42985/usr/include
42986/usr/local/include
42987/usr/unsupported/include
42988/usr/athena/include
42989/usr/local/x11r5/include
42990/usr/lpp/Xamples/include
42991
42992/usr/openwin/include
42993/usr/openwin/share/include'
42994
42995if test "$ac_x_includes" = no; then
42996  # Guess where to find include files, by looking for Xlib.h.
42997  # First, try using that file with no special directory specified.
42998  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42999/* end confdefs.h.  */
43000#include <X11/Xlib.h>
43001_ACEOF
43002if ac_fn_cxx_try_cpp "$LINENO"; then :
43003  # We can compile using X headers with no special include directory.
43004ac_x_includes=
43005else
43006  for ac_dir in $ac_x_header_dirs; do
43007  if test -r "$ac_dir/X11/Xlib.h"; then
43008    ac_x_includes=$ac_dir
43009    break
43010  fi
43011done
43012fi
43013rm -f conftest.err conftest.i conftest.$ac_ext
43014fi # $ac_x_includes = no
43015
43016if test "$ac_x_libraries" = no; then
43017  # Check for the libraries.
43018  # See if we find them without any special options.
43019  # Don't add to $LIBS permanently.
43020  ac_save_LIBS=$LIBS
43021  LIBS="-lX11 $LIBS"
43022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43023/* end confdefs.h.  */
43024#include <X11/Xlib.h>
43025int
43026main ()
43027{
43028XrmInitialize ()
43029  ;
43030  return 0;
43031}
43032_ACEOF
43033if ac_fn_cxx_try_link "$LINENO"; then :
43034  LIBS=$ac_save_LIBS
43035# We can link X programs with no special library path.
43036ac_x_libraries=
43037else
43038  LIBS=$ac_save_LIBS
43039for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43040do
43041  # Don't even attempt the hair of trying to link an X program!
43042  for ac_extension in a so sl dylib la dll; do
43043    if test -r "$ac_dir/libX11.$ac_extension"; then
43044      ac_x_libraries=$ac_dir
43045      break 2
43046    fi
43047  done
43048done
43049fi
43050rm -f core conftest.err conftest.$ac_objext \
43051    conftest$ac_exeext conftest.$ac_ext
43052fi # $ac_x_libraries = no
43053
43054case $ac_x_includes,$ac_x_libraries in #(
43055  no,* | *,no | *\'*)
43056    # Didn't find X, or a directory has "'" in its name.
43057    ac_cv_have_x="have_x=no";; #(
43058  *)
43059    # Record where we found X for the cache.
43060    ac_cv_have_x="have_x=yes\
43061	ac_x_includes='$ac_x_includes'\
43062	ac_x_libraries='$ac_x_libraries'"
43063esac
43064fi
43065;; #(
43066    *) have_x=yes;;
43067  esac
43068  eval "$ac_cv_have_x"
43069fi # $with_x != no
43070
43071if test "$have_x" != yes; then
43072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43073$as_echo "$have_x" >&6; }
43074  no_x=yes
43075else
43076  # If each of the values was on the command line, it overrides each guess.
43077  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43078  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43079  # Update the cache value to reflect the command line values.
43080  ac_cv_have_x="have_x=yes\
43081	ac_x_includes='$x_includes'\
43082	ac_x_libraries='$x_libraries'"
43083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43084$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43085fi
43086
43087    if test "$no_x" = yes; then
43088  # Not all programs may use this symbol, but it does not hurt to define it.
43089
43090$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43091
43092  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43093else
43094  if test -n "$x_includes"; then
43095    X_CFLAGS="$X_CFLAGS -I$x_includes"
43096  fi
43097
43098  # It would also be nice to do this for all -L options, not just this one.
43099  if test -n "$x_libraries"; then
43100    X_LIBS="$X_LIBS -L$x_libraries"
43101    # For Solaris; some versions of Sun CC require a space after -R and
43102    # others require no space.  Words are not sufficient . . . .
43103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43104$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43105    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43106    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43107    ac_cxx_werror_flag=yes
43108    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43109/* end confdefs.h.  */
43110
43111int
43112main ()
43113{
43114
43115  ;
43116  return 0;
43117}
43118_ACEOF
43119if ac_fn_cxx_try_link "$LINENO"; then :
43120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43121$as_echo "no" >&6; }
43122       X_LIBS="$X_LIBS -R$x_libraries"
43123else
43124  LIBS="$ac_xsave_LIBS -R $x_libraries"
43125       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43126/* end confdefs.h.  */
43127
43128int
43129main ()
43130{
43131
43132  ;
43133  return 0;
43134}
43135_ACEOF
43136if ac_fn_cxx_try_link "$LINENO"; then :
43137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43138$as_echo "yes" >&6; }
43139	  X_LIBS="$X_LIBS -R $x_libraries"
43140else
43141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43142$as_echo "neither works" >&6; }
43143fi
43144rm -f core conftest.err conftest.$ac_objext \
43145    conftest$ac_exeext conftest.$ac_ext
43146fi
43147rm -f core conftest.err conftest.$ac_objext \
43148    conftest$ac_exeext conftest.$ac_ext
43149    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43150    LIBS=$ac_xsave_LIBS
43151  fi
43152
43153  # Check for system-dependent libraries X programs must link with.
43154  # Do this before checking for the system-independent R6 libraries
43155  # (-lICE), since we may need -lsocket or whatever for X linking.
43156
43157  if test "$ISC" = yes; then
43158    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43159  else
43160    # Martyn Johnson says this is needed for Ultrix, if the X
43161    # libraries were built with DECnet support.  And Karl Berry says
43162    # the Alpha needs dnet_stub (dnet does not exist).
43163    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43164    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43165/* end confdefs.h.  */
43166
43167/* Override any GCC internal prototype to avoid an error.
43168   Use char because int might match the return type of a GCC
43169   builtin and then its argument prototype would still apply.  */
43170#ifdef __cplusplus
43171extern "C"
43172#endif
43173char XOpenDisplay ();
43174int
43175main ()
43176{
43177return XOpenDisplay ();
43178  ;
43179  return 0;
43180}
43181_ACEOF
43182if ac_fn_cxx_try_link "$LINENO"; then :
43183
43184else
43185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43186$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43187if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43188  $as_echo_n "(cached) " >&6
43189else
43190  ac_check_lib_save_LIBS=$LIBS
43191LIBS="-ldnet  $LIBS"
43192cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43193/* end confdefs.h.  */
43194
43195/* Override any GCC internal prototype to avoid an error.
43196   Use char because int might match the return type of a GCC
43197   builtin and then its argument prototype would still apply.  */
43198#ifdef __cplusplus
43199extern "C"
43200#endif
43201char dnet_ntoa ();
43202int
43203main ()
43204{
43205return dnet_ntoa ();
43206  ;
43207  return 0;
43208}
43209_ACEOF
43210if ac_fn_cxx_try_link "$LINENO"; then :
43211  ac_cv_lib_dnet_dnet_ntoa=yes
43212else
43213  ac_cv_lib_dnet_dnet_ntoa=no
43214fi
43215rm -f core conftest.err conftest.$ac_objext \
43216    conftest$ac_exeext conftest.$ac_ext
43217LIBS=$ac_check_lib_save_LIBS
43218fi
43219{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43220$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43221if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43222  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43223fi
43224
43225    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43226      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43227$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43228if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43229  $as_echo_n "(cached) " >&6
43230else
43231  ac_check_lib_save_LIBS=$LIBS
43232LIBS="-ldnet_stub  $LIBS"
43233cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43234/* end confdefs.h.  */
43235
43236/* Override any GCC internal prototype to avoid an error.
43237   Use char because int might match the return type of a GCC
43238   builtin and then its argument prototype would still apply.  */
43239#ifdef __cplusplus
43240extern "C"
43241#endif
43242char dnet_ntoa ();
43243int
43244main ()
43245{
43246return dnet_ntoa ();
43247  ;
43248  return 0;
43249}
43250_ACEOF
43251if ac_fn_cxx_try_link "$LINENO"; then :
43252  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43253else
43254  ac_cv_lib_dnet_stub_dnet_ntoa=no
43255fi
43256rm -f core conftest.err conftest.$ac_objext \
43257    conftest$ac_exeext conftest.$ac_ext
43258LIBS=$ac_check_lib_save_LIBS
43259fi
43260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43261$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43262if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43263  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43264fi
43265
43266    fi
43267fi
43268rm -f core conftest.err conftest.$ac_objext \
43269    conftest$ac_exeext conftest.$ac_ext
43270    LIBS="$ac_xsave_LIBS"
43271
43272    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43273    # to get the SysV transport functions.
43274    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43275    # needs -lnsl.
43276    # The nsl library prevents programs from opening the X display
43277    # on Irix 5.2, according to T.E. Dickey.
43278    # The functions gethostbyname, getservbyname, and inet_addr are
43279    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43280    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43281if test "x$ac_cv_func_gethostbyname" = xyes; then :
43282
43283fi
43284
43285    if test $ac_cv_func_gethostbyname = no; then
43286      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43287$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43288if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43289  $as_echo_n "(cached) " >&6
43290else
43291  ac_check_lib_save_LIBS=$LIBS
43292LIBS="-lnsl  $LIBS"
43293cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43294/* end confdefs.h.  */
43295
43296/* Override any GCC internal prototype to avoid an error.
43297   Use char because int might match the return type of a GCC
43298   builtin and then its argument prototype would still apply.  */
43299#ifdef __cplusplus
43300extern "C"
43301#endif
43302char gethostbyname ();
43303int
43304main ()
43305{
43306return gethostbyname ();
43307  ;
43308  return 0;
43309}
43310_ACEOF
43311if ac_fn_cxx_try_link "$LINENO"; then :
43312  ac_cv_lib_nsl_gethostbyname=yes
43313else
43314  ac_cv_lib_nsl_gethostbyname=no
43315fi
43316rm -f core conftest.err conftest.$ac_objext \
43317    conftest$ac_exeext conftest.$ac_ext
43318LIBS=$ac_check_lib_save_LIBS
43319fi
43320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43321$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43322if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43323  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43324fi
43325
43326      if test $ac_cv_lib_nsl_gethostbyname = no; then
43327	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43328$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43329if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43330  $as_echo_n "(cached) " >&6
43331else
43332  ac_check_lib_save_LIBS=$LIBS
43333LIBS="-lbsd  $LIBS"
43334cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43335/* end confdefs.h.  */
43336
43337/* Override any GCC internal prototype to avoid an error.
43338   Use char because int might match the return type of a GCC
43339   builtin and then its argument prototype would still apply.  */
43340#ifdef __cplusplus
43341extern "C"
43342#endif
43343char gethostbyname ();
43344int
43345main ()
43346{
43347return gethostbyname ();
43348  ;
43349  return 0;
43350}
43351_ACEOF
43352if ac_fn_cxx_try_link "$LINENO"; then :
43353  ac_cv_lib_bsd_gethostbyname=yes
43354else
43355  ac_cv_lib_bsd_gethostbyname=no
43356fi
43357rm -f core conftest.err conftest.$ac_objext \
43358    conftest$ac_exeext conftest.$ac_ext
43359LIBS=$ac_check_lib_save_LIBS
43360fi
43361{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43362$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43363if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43364  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43365fi
43366
43367      fi
43368    fi
43369
43370    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43371    # socket/setsockopt and other routines are undefined under SCO ODT
43372    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43373    # on later versions), says Simon Leinen: it contains gethostby*
43374    # variants that don't use the name server (or something).  -lsocket
43375    # must be given before -lnsl if both are needed.  We assume that
43376    # if connect needs -lnsl, so does gethostbyname.
43377    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43378if test "x$ac_cv_func_connect" = xyes; then :
43379
43380fi
43381
43382    if test $ac_cv_func_connect = no; then
43383      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43384$as_echo_n "checking for connect in -lsocket... " >&6; }
43385if ${ac_cv_lib_socket_connect+:} false; then :
43386  $as_echo_n "(cached) " >&6
43387else
43388  ac_check_lib_save_LIBS=$LIBS
43389LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43390cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43391/* end confdefs.h.  */
43392
43393/* Override any GCC internal prototype to avoid an error.
43394   Use char because int might match the return type of a GCC
43395   builtin and then its argument prototype would still apply.  */
43396#ifdef __cplusplus
43397extern "C"
43398#endif
43399char connect ();
43400int
43401main ()
43402{
43403return connect ();
43404  ;
43405  return 0;
43406}
43407_ACEOF
43408if ac_fn_cxx_try_link "$LINENO"; then :
43409  ac_cv_lib_socket_connect=yes
43410else
43411  ac_cv_lib_socket_connect=no
43412fi
43413rm -f core conftest.err conftest.$ac_objext \
43414    conftest$ac_exeext conftest.$ac_ext
43415LIBS=$ac_check_lib_save_LIBS
43416fi
43417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43418$as_echo "$ac_cv_lib_socket_connect" >&6; }
43419if test "x$ac_cv_lib_socket_connect" = xyes; then :
43420  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43421fi
43422
43423    fi
43424
43425    # Guillermo Gomez says -lposix is necessary on A/UX.
43426    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43427if test "x$ac_cv_func_remove" = xyes; then :
43428
43429fi
43430
43431    if test $ac_cv_func_remove = no; then
43432      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43433$as_echo_n "checking for remove in -lposix... " >&6; }
43434if ${ac_cv_lib_posix_remove+:} false; then :
43435  $as_echo_n "(cached) " >&6
43436else
43437  ac_check_lib_save_LIBS=$LIBS
43438LIBS="-lposix  $LIBS"
43439cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43440/* end confdefs.h.  */
43441
43442/* Override any GCC internal prototype to avoid an error.
43443   Use char because int might match the return type of a GCC
43444   builtin and then its argument prototype would still apply.  */
43445#ifdef __cplusplus
43446extern "C"
43447#endif
43448char remove ();
43449int
43450main ()
43451{
43452return remove ();
43453  ;
43454  return 0;
43455}
43456_ACEOF
43457if ac_fn_cxx_try_link "$LINENO"; then :
43458  ac_cv_lib_posix_remove=yes
43459else
43460  ac_cv_lib_posix_remove=no
43461fi
43462rm -f core conftest.err conftest.$ac_objext \
43463    conftest$ac_exeext conftest.$ac_ext
43464LIBS=$ac_check_lib_save_LIBS
43465fi
43466{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43467$as_echo "$ac_cv_lib_posix_remove" >&6; }
43468if test "x$ac_cv_lib_posix_remove" = xyes; then :
43469  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43470fi
43471
43472    fi
43473
43474    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43475    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43476if test "x$ac_cv_func_shmat" = xyes; then :
43477
43478fi
43479
43480    if test $ac_cv_func_shmat = no; then
43481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43482$as_echo_n "checking for shmat in -lipc... " >&6; }
43483if ${ac_cv_lib_ipc_shmat+:} false; then :
43484  $as_echo_n "(cached) " >&6
43485else
43486  ac_check_lib_save_LIBS=$LIBS
43487LIBS="-lipc  $LIBS"
43488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43489/* end confdefs.h.  */
43490
43491/* Override any GCC internal prototype to avoid an error.
43492   Use char because int might match the return type of a GCC
43493   builtin and then its argument prototype would still apply.  */
43494#ifdef __cplusplus
43495extern "C"
43496#endif
43497char shmat ();
43498int
43499main ()
43500{
43501return shmat ();
43502  ;
43503  return 0;
43504}
43505_ACEOF
43506if ac_fn_cxx_try_link "$LINENO"; then :
43507  ac_cv_lib_ipc_shmat=yes
43508else
43509  ac_cv_lib_ipc_shmat=no
43510fi
43511rm -f core conftest.err conftest.$ac_objext \
43512    conftest$ac_exeext conftest.$ac_ext
43513LIBS=$ac_check_lib_save_LIBS
43514fi
43515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43516$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43517if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43518  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43519fi
43520
43521    fi
43522  fi
43523
43524  # Check for libraries that X11R6 Xt/Xaw programs need.
43525  ac_save_LDFLAGS=$LDFLAGS
43526  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43527  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43528  # check for ICE first), but we must link in the order -lSM -lICE or
43529  # we get undefined symbols.  So assume we have SM if we have ICE.
43530  # These have to be linked with before -lX11, unlike the other
43531  # libraries we check for below, so use a different variable.
43532  # John Interrante, Karl Berry
43533  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43534$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43535if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43536  $as_echo_n "(cached) " >&6
43537else
43538  ac_check_lib_save_LIBS=$LIBS
43539LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43541/* end confdefs.h.  */
43542
43543/* Override any GCC internal prototype to avoid an error.
43544   Use char because int might match the return type of a GCC
43545   builtin and then its argument prototype would still apply.  */
43546#ifdef __cplusplus
43547extern "C"
43548#endif
43549char IceConnectionNumber ();
43550int
43551main ()
43552{
43553return IceConnectionNumber ();
43554  ;
43555  return 0;
43556}
43557_ACEOF
43558if ac_fn_cxx_try_link "$LINENO"; then :
43559  ac_cv_lib_ICE_IceConnectionNumber=yes
43560else
43561  ac_cv_lib_ICE_IceConnectionNumber=no
43562fi
43563rm -f core conftest.err conftest.$ac_objext \
43564    conftest$ac_exeext conftest.$ac_ext
43565LIBS=$ac_check_lib_save_LIBS
43566fi
43567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43568$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43569if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43570  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43571fi
43572
43573  LDFLAGS=$ac_save_LDFLAGS
43574
43575fi
43576
43577
43578    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43579    # this doesn't make sense so we remove it.
43580    if test "x$COMPILE_TYPE" = xcross; then
43581      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43582    fi
43583
43584    if test "x$no_x" = xyes; then
43585
43586  # Print a helpful message on how to acquire the necessary build dependency.
43587  # x11 is the help tag: freetype, cups, pulse, alsa etc
43588  MISSING_DEPENDENCY=x11
43589
43590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43591    cygwin_help $MISSING_DEPENDENCY
43592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43593    msys_help $MISSING_DEPENDENCY
43594  else
43595    PKGHANDLER_COMMAND=
43596
43597    case $PKGHANDLER in
43598      apt-get)
43599        apt_help     $MISSING_DEPENDENCY ;;
43600      yum)
43601        yum_help     $MISSING_DEPENDENCY ;;
43602      port)
43603        port_help    $MISSING_DEPENDENCY ;;
43604      pkgutil)
43605        pkgutil_help $MISSING_DEPENDENCY ;;
43606      pkgadd)
43607        pkgadd_help  $MISSING_DEPENDENCY ;;
43608    esac
43609
43610    if test "x$PKGHANDLER_COMMAND" != x; then
43611      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43612    fi
43613  fi
43614
43615      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43616    fi
43617
43618    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43619      OPENWIN_HOME="/usr/openwin"
43620      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43621      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43622          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43623          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43624          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43625    fi
43626
43627    ac_ext=c
43628ac_cpp='$CPP $CPPFLAGS'
43629ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43630ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43631ac_compiler_gnu=$ac_cv_c_compiler_gnu
43632
43633    OLD_CFLAGS="$CFLAGS"
43634    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43635
43636    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43637    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43638do :
43639  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43640ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43641          # include <X11/Xlib.h>
43642          # include <X11/Xutil.h>
43643
43644
43645"
43646if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43647  cat >>confdefs.h <<_ACEOF
43648#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43649_ACEOF
43650 X11_HEADERS_OK=yes
43651else
43652  X11_HEADERS_OK=no; break
43653fi
43654
43655done
43656
43657
43658    if test "x$X11_HEADERS_OK" = xno; then
43659
43660  # Print a helpful message on how to acquire the necessary build dependency.
43661  # x11 is the help tag: freetype, cups, pulse, alsa etc
43662  MISSING_DEPENDENCY=x11
43663
43664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43665    cygwin_help $MISSING_DEPENDENCY
43666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43667    msys_help $MISSING_DEPENDENCY
43668  else
43669    PKGHANDLER_COMMAND=
43670
43671    case $PKGHANDLER in
43672      apt-get)
43673        apt_help     $MISSING_DEPENDENCY ;;
43674      yum)
43675        yum_help     $MISSING_DEPENDENCY ;;
43676      port)
43677        port_help    $MISSING_DEPENDENCY ;;
43678      pkgutil)
43679        pkgutil_help $MISSING_DEPENDENCY ;;
43680      pkgadd)
43681        pkgadd_help  $MISSING_DEPENDENCY ;;
43682    esac
43683
43684    if test "x$PKGHANDLER_COMMAND" != x; then
43685      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43686    fi
43687  fi
43688
43689      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43690    fi
43691
43692    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
43693    # defined in libawt_xawt.
43694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
43695$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
43696    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43697/* end confdefs.h.  */
43698#include <X11/extensions/Xrender.h>
43699int
43700main ()
43701{
43702XLinearGradient x;
43703  ;
43704  return 0;
43705}
43706_ACEOF
43707if ac_fn_c_try_compile "$LINENO"; then :
43708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43709$as_echo "yes" >&6; }
43710else
43711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43712$as_echo "no" >&6; }
43713         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
43714fi
43715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
43716
43717    CFLAGS="$OLD_CFLAGS"
43718    ac_ext=cpp
43719ac_cpp='$CXXCPP $CPPFLAGS'
43720ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43721ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43722ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43723
43724  fi # X11_NOT_NEEDED
43725
43726
43727
43728
43729
43730
43731  ###############################################################################
43732  #
43733  # The common unix printing system cups is used to print from java.
43734  #
43735
43736# Check whether --with-cups was given.
43737if test "${with_cups+set}" = set; then :
43738  withval=$with_cups;
43739fi
43740
43741
43742# Check whether --with-cups-include was given.
43743if test "${with_cups_include+set}" = set; then :
43744  withval=$with_cups_include;
43745fi
43746
43747
43748  if test "x$CUPS_NOT_NEEDED" = xyes; then
43749    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43750      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43751$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43752    fi
43753    CUPS_CFLAGS=
43754  else
43755    CUPS_FOUND=no
43756
43757    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43758      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43759    fi
43760
43761    if test "x${with_cups}" != x; then
43762      CUPS_CFLAGS="-I${with_cups}/include"
43763      CUPS_FOUND=yes
43764    fi
43765    if test "x${with_cups_include}" != x; then
43766      CUPS_CFLAGS="-I${with_cups_include}"
43767      CUPS_FOUND=yes
43768    fi
43769    if test "x$CUPS_FOUND" = xno; then
43770
43771
43772  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43773    # Source the builddeps file again, to make sure it uses the latest variables!
43774    . $builddepsfile
43775    # Look for a target and build machine specific resource!
43776    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43777    if test "x$resource" = x; then
43778      # Ok, lets instead look for a target specific resource
43779      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43780    fi
43781    if test "x$resource" = x; then
43782      # Ok, lets instead look for a build specific resource
43783      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43784    fi
43785    if test "x$resource" = x; then
43786      # Ok, lets instead look for a generic resource
43787      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43788      resource=${builddep_cups}
43789    fi
43790    if test "x$resource" != x; then
43791      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43792$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43793      # If the resource in the builddeps.conf file is an existing directory,
43794      # for example /java/linux/cups
43795      if test -d ${resource}; then
43796        depdir=${resource}
43797      else
43798
43799  # cups is for example mymodule
43800  # $resource is for example libs/general/libmymod_1_2_3.zip
43801  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43802  # $with_builddeps_dir is for example /localhome/builddeps
43803  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43804  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43805  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43806  filename=`basename $resource`
43807  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43808  filebase=${filename%%.*}
43809  extension=${filename#*.}
43810  installdir=$with_builddeps_dir/$filebase
43811  if test ! -f $installdir/$filename.unpacked; then
43812    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43813$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43814    if test ! -d $installdir; then
43815      mkdir -p $installdir
43816    fi
43817    if test ! -d $installdir; then
43818      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43819    fi
43820    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43821    touch $tmpfile
43822    if test ! -f $tmpfile; then
43823      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43824    fi
43825
43826  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43827  # $tmpfile is the local file name for the downloaded file.
43828  VALID_TOOL=no
43829  if test "x$BDEPS_FTP" = xwget; then
43830    VALID_TOOL=yes
43831    wget -O $tmpfile $with_builddeps_server/$resource
43832  fi
43833  if test "x$BDEPS_FTP" = xlftp; then
43834    VALID_TOOL=yes
43835    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43836  fi
43837  if test "x$BDEPS_FTP" = xftp; then
43838    VALID_TOOL=yes
43839    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43840    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43841    FTPUSERPWD=${FTPSERVER%%@*}
43842    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43843      FTPUSER=${userpwd%%:*}
43844      FTPPWD=${userpwd#*@}
43845      FTPSERVER=${FTPSERVER#*@}
43846    else
43847      FTPUSER=ftp
43848      FTPPWD=ftp
43849    fi
43850    # the "pass" command does not work on some
43851    # ftp clients (read ftp.exe) but if it works,
43852    # passive mode is better!
43853    ( \
43854        echo "user $FTPUSER $FTPPWD"        ; \
43855        echo "pass"                         ; \
43856        echo "bin"                          ; \
43857        echo "get $FTPPATH $tmpfile"              ; \
43858    ) | ftp -in $FTPSERVER
43859  fi
43860  if test "x$VALID_TOOL" != xyes; then
43861    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43862  fi
43863
43864    mv $tmpfile $installdir/$filename
43865    if test ! -s $installdir/$filename; then
43866      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43867    fi
43868    case "$extension" in
43869      zip)  echo "Unzipping $installdir/$filename..."
43870        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43871        ;;
43872      tar.gz) echo "Untaring $installdir/$filename..."
43873        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43874        ;;
43875      tgz) echo "Untaring $installdir/$filename..."
43876        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43877        ;;
43878      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43879        ;;
43880    esac
43881  fi
43882  if test -f $installdir/$filename.unpacked; then
43883    depdir=$installdir
43884  fi
43885
43886      fi
43887      # Source the builddeps file again, because in the previous command, the depdir
43888      # was updated to point at the current build dependency install directory.
43889      . $builddepsfile
43890      # Now extract variables from the builddeps.conf files.
43891      theroot=${builddep_cups_ROOT}
43892      thecflags=${builddep_cups_CFLAGS}
43893      thelibs=${builddep_cups_LIBS}
43894      if test "x$depdir" = x; then
43895        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43896      fi
43897      CUPS=$depdir
43898      if test "x$theroot" != x; then
43899        CUPS="$theroot"
43900      fi
43901      if test "x$thecflags" != x; then
43902        CUPS_CFLAGS="$thecflags"
43903      fi
43904      if test "x$thelibs" != x; then
43905        CUPS_LIBS="$thelibs"
43906      fi
43907      CUPS_FOUND=yes
43908
43909    fi
43910
43911  fi
43912
43913    fi
43914    if test "x$CUPS_FOUND" = xno; then
43915      # Are the cups headers installed in the default /usr/include location?
43916      for ac_header in cups/cups.h cups/ppd.h
43917do :
43918  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43919ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43920if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43921  cat >>confdefs.h <<_ACEOF
43922#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43923_ACEOF
43924
43925            CUPS_FOUND=yes
43926            CUPS_CFLAGS=
43927            DEFAULT_CUPS=yes
43928
43929
43930fi
43931
43932done
43933
43934    fi
43935    if test "x$CUPS_FOUND" = xno; then
43936      # Getting nervous now? Lets poke around for standard Solaris third-party
43937      # package installation locations.
43938      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43939$as_echo_n "checking for cups headers... " >&6; }
43940      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43941        # An SFW package seems to be installed!
43942        CUPS_FOUND=yes
43943        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43944      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43945        # A CSW package seems to be installed!
43946        CUPS_FOUND=yes
43947        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43948      fi
43949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43950$as_echo "$CUPS_FOUND" >&6; }
43951    fi
43952    if test "x$CUPS_FOUND" = xno; then
43953
43954  # Print a helpful message on how to acquire the necessary build dependency.
43955  # cups is the help tag: freetype, cups, pulse, alsa etc
43956  MISSING_DEPENDENCY=cups
43957
43958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43959    cygwin_help $MISSING_DEPENDENCY
43960  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43961    msys_help $MISSING_DEPENDENCY
43962  else
43963    PKGHANDLER_COMMAND=
43964
43965    case $PKGHANDLER in
43966      apt-get)
43967        apt_help     $MISSING_DEPENDENCY ;;
43968      yum)
43969        yum_help     $MISSING_DEPENDENCY ;;
43970      port)
43971        port_help    $MISSING_DEPENDENCY ;;
43972      pkgutil)
43973        pkgutil_help $MISSING_DEPENDENCY ;;
43974      pkgadd)
43975        pkgadd_help  $MISSING_DEPENDENCY ;;
43976    esac
43977
43978    if test "x$PKGHANDLER_COMMAND" != x; then
43979      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43980    fi
43981  fi
43982
43983      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43984    fi
43985  fi
43986
43987
43988
43989
43990
43991
43992  ###############################################################################
43993  #
43994  # The ubiquitous freetype library is used to render fonts.
43995  #
43996
43997# Check whether --with-freetype was given.
43998if test "${with_freetype+set}" = set; then :
43999  withval=$with_freetype;
44000fi
44001
44002
44003# Check whether --with-freetype-include was given.
44004if test "${with_freetype_include+set}" = set; then :
44005  withval=$with_freetype_include;
44006fi
44007
44008
44009# Check whether --with-freetype-lib was given.
44010if test "${with_freetype_lib+set}" = set; then :
44011  withval=$with_freetype_lib;
44012fi
44013
44014
44015# Check whether --with-freetype-src was given.
44016if test "${with_freetype_src+set}" = set; then :
44017  withval=$with_freetype_src;
44018fi
44019
44020  # Check whether --enable-freetype-bundling was given.
44021if test "${enable_freetype_bundling+set}" = set; then :
44022  enableval=$enable_freetype_bundling;
44023fi
44024
44025
44026  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44027  FREETYPE_BASE_NAME=freetype
44028  FREETYPE_CFLAGS=
44029  FREETYPE_LIBS=
44030  FREETYPE_BUNDLE_LIB_PATH=
44031
44032  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44033    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
44034      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44035$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44036    fi
44037    if test "x$enable_freetype_bundling" != x; then
44038      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44039$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44040    fi
44041  else
44042    # freetype is needed to build; go get it!
44043
44044    BUNDLE_FREETYPE="$enable_freetype_bundling"
44045
44046    if  test "x$with_freetype_src" != x; then
44047      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44048        # Try to build freetype if --with-freetype-src was given on Windows
44049
44050  FREETYPE_SRC_PATH="$with_freetype_src"
44051  BUILD_FREETYPE=yes
44052
44053  # Check if the freetype sources are acessible..
44054  if ! test -d $FREETYPE_SRC_PATH; then
44055    { $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
44056$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44057    BUILD_FREETYPE=no
44058  fi
44059  # ..and contain a vc2010 project file
44060  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44061  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44062    { $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
44063$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44064    BUILD_FREETYPE=no
44065  fi
44066  # Now check if configure found a version of 'msbuild.exe'
44067  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44068    { $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
44069$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;}
44070    BUILD_FREETYPE=no
44071  fi
44072
44073  # Ready to go..
44074  if test "x$BUILD_FREETYPE" = xyes; then
44075
44076    # msbuild requires trailing slashes for output directories
44077    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44078    freetype_lib_path_unix="$freetype_lib_path"
44079    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44080
44081  unix_path="$vcxproj_path"
44082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44083    windows_path=`$CYGPATH -m "$unix_path"`
44084    vcxproj_path="$windows_path"
44085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44086    windows_path=`cmd //c echo $unix_path`
44087    vcxproj_path="$windows_path"
44088  fi
44089
44090
44091  unix_path="$freetype_lib_path"
44092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44093    windows_path=`$CYGPATH -m "$unix_path"`
44094    freetype_lib_path="$windows_path"
44095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44096    windows_path=`cmd //c echo $unix_path`
44097    freetype_lib_path="$windows_path"
44098  fi
44099
44100
44101  unix_path="$freetype_obj_path"
44102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44103    windows_path=`$CYGPATH -m "$unix_path"`
44104    freetype_obj_path="$windows_path"
44105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44106    windows_path=`cmd //c echo $unix_path`
44107    freetype_obj_path="$windows_path"
44108  fi
44109
44110    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44111      freetype_platform=x64
44112    else
44113      freetype_platform=win32
44114    fi
44115
44116    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44117    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44118    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44119    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44120    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44121$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44122
44123    # First we try to build the freetype.dll
44124    $ECHO -e "@echo off\n"\
44125	     "$MSBUILD $vcxproj_path "\
44126		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44127		       "/p:Configuration=\"Release Multithreaded\" "\
44128		       "/p:Platform=$freetype_platform "\
44129		       "/p:ConfigurationType=DynamicLibrary "\
44130		       "/p:TargetName=freetype "\
44131		       "/p:OutDir=\"$freetype_lib_path\" "\
44132		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44133    cmd /c freetype.bat
44134
44135    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44136      # If that succeeds we also build freetype.lib
44137      $ECHO -e "@echo off\n"\
44138	       "$MSBUILD $vcxproj_path "\
44139			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44140			 "/p:Configuration=\"Release Multithreaded\" "\
44141			 "/p:Platform=$freetype_platform "\
44142			 "/p:ConfigurationType=StaticLibrary "\
44143			 "/p:TargetName=freetype "\
44144			 "/p:OutDir=\"$freetype_lib_path\" "\
44145			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44146      cmd /c freetype.bat
44147
44148      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44149	# Once we build both, lib and dll, set freetype lib and include path appropriately
44150	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44151	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44152	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44153$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44154      else
44155	BUILD_FREETYPE=no
44156      fi
44157    else
44158      BUILD_FREETYPE=no
44159    fi
44160  fi
44161
44162        if test "x$BUILD_FREETYPE" = xyes; then
44163          # Okay, we built it. Check that it works.
44164
44165  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44166  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44167  METHOD="--with-freetype-src"
44168
44169  # Let's start with an optimistic view of the world :-)
44170  FOUND_FREETYPE=yes
44171
44172  # First look for the canonical freetype main include file ft2build.h.
44173  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44174    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44175    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44176    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44177      # Fail.
44178      FOUND_FREETYPE=no
44179    fi
44180  fi
44181
44182  if test "x$FOUND_FREETYPE" = xyes; then
44183    # Include file found, let's continue the sanity check.
44184    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44185$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44186
44187    # Reset to default value
44188    FREETYPE_BASE_NAME=freetype
44189    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44190    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44191      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44192          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44193        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44194        # for the .6 version explicitly.
44195        FREETYPE_BASE_NAME=freetype.6
44196        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44197        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44198$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44199      else
44200        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44201$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44202        FOUND_FREETYPE=no
44203      fi
44204    else
44205      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44206        # On Windows, we will need both .lib and .dll file.
44207        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44208          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44209$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44210          FOUND_FREETYPE=no
44211        fi
44212      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44213          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44214        # Found lib in isa dir, use that instead.
44215        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44216        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44217$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44218      fi
44219    fi
44220  fi
44221
44222  if test "x$FOUND_FREETYPE" = xyes; then
44223
44224  # Only process if variable expands to non-empty
44225
44226  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44228
44229  # Input might be given as Windows format, start by converting to
44230  # unix format.
44231  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44232  new_path=`$CYGPATH -u "$path"`
44233
44234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44237  # "foo.exe" is OK but "foo" is an error.
44238  #
44239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44240  # It is also a way to make sure we got the proper file name for the real test later on.
44241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44242  if test "x$test_shortpath" = x; then
44243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44244$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44245    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44246  fi
44247
44248  # Call helper function which possibly converts this using DOS-style short mode.
44249  # If so, the updated path is stored in $new_path.
44250
44251  input_path="$new_path"
44252  # Check if we need to convert this using DOS-style short mode. If the path
44253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44254  # take no chances and rewrite it.
44255  # Note: m4 eats our [], so we need to use [ and ] instead.
44256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44257  if test "x$has_forbidden_chars" != x; then
44258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44262      # Going to short mode and back again did indeed matter. Since short mode is
44263      # case insensitive, let's make it lowercase to improve readability.
44264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44265      # Now convert it back to Unix-style (cygpath)
44266      input_path=`$CYGPATH -u "$shortmode_path"`
44267      new_path="$input_path"
44268    fi
44269  fi
44270
44271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44272  if test "x$test_cygdrive_prefix" = x; then
44273    # As a simple fix, exclude /usr/bin since it's not a real path.
44274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44276      # a path prefixed by /cygdrive for fixpath to work.
44277      new_path="$CYGWIN_ROOT_PATH$input_path"
44278    fi
44279  fi
44280
44281
44282  if test "x$path" != "x$new_path"; then
44283    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44285$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44286  fi
44287
44288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44289
44290  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44291  has_colon=`$ECHO $path | $GREP ^.:`
44292  new_path="$path"
44293  if test "x$has_colon" = x; then
44294    # Not in mixed or Windows style, start by that.
44295    new_path=`cmd //c echo $path`
44296  fi
44297
44298
44299  input_path="$new_path"
44300  # Check if we need to convert this using DOS-style short mode. If the path
44301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44302  # take no chances and rewrite it.
44303  # Note: m4 eats our [], so we need to use [ and ] instead.
44304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44305  if test "x$has_forbidden_chars" != x; then
44306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44308  fi
44309
44310
44311  windows_path="$new_path"
44312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44313    unix_path=`$CYGPATH -u "$windows_path"`
44314    new_path="$unix_path"
44315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44317    new_path="$unix_path"
44318  fi
44319
44320  if test "x$path" != "x$new_path"; then
44321    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44323$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44324  fi
44325
44326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44328
44329    else
44330      # We're on a unix platform. Hooray! :)
44331      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44332      has_space=`$ECHO "$path" | $GREP " "`
44333      if test "x$has_space" != x; then
44334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44335$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44337      fi
44338
44339      # Use eval to expand a potential ~
44340      eval path="$path"
44341      if test ! -f "$path" && test ! -d "$path"; then
44342        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44343      fi
44344
44345      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44346    fi
44347  fi
44348
44349
44350  # Only process if variable expands to non-empty
44351
44352  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44354
44355  # Input might be given as Windows format, start by converting to
44356  # unix format.
44357  path="$POTENTIAL_FREETYPE_LIB_PATH"
44358  new_path=`$CYGPATH -u "$path"`
44359
44360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44363  # "foo.exe" is OK but "foo" is an error.
44364  #
44365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44366  # It is also a way to make sure we got the proper file name for the real test later on.
44367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44368  if test "x$test_shortpath" = x; then
44369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44371    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44372  fi
44373
44374  # Call helper function which possibly converts this using DOS-style short mode.
44375  # If so, the updated path is stored in $new_path.
44376
44377  input_path="$new_path"
44378  # Check if we need to convert this using DOS-style short mode. If the path
44379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44380  # take no chances and rewrite it.
44381  # Note: m4 eats our [], so we need to use [ and ] instead.
44382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44383  if test "x$has_forbidden_chars" != x; then
44384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44388      # Going to short mode and back again did indeed matter. Since short mode is
44389      # case insensitive, let's make it lowercase to improve readability.
44390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44391      # Now convert it back to Unix-style (cygpath)
44392      input_path=`$CYGPATH -u "$shortmode_path"`
44393      new_path="$input_path"
44394    fi
44395  fi
44396
44397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44398  if test "x$test_cygdrive_prefix" = x; then
44399    # As a simple fix, exclude /usr/bin since it's not a real path.
44400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44402      # a path prefixed by /cygdrive for fixpath to work.
44403      new_path="$CYGWIN_ROOT_PATH$input_path"
44404    fi
44405  fi
44406
44407
44408  if test "x$path" != "x$new_path"; then
44409    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44411$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44412  fi
44413
44414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44415
44416  path="$POTENTIAL_FREETYPE_LIB_PATH"
44417  has_colon=`$ECHO $path | $GREP ^.:`
44418  new_path="$path"
44419  if test "x$has_colon" = x; then
44420    # Not in mixed or Windows style, start by that.
44421    new_path=`cmd //c echo $path`
44422  fi
44423
44424
44425  input_path="$new_path"
44426  # Check if we need to convert this using DOS-style short mode. If the path
44427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44428  # take no chances and rewrite it.
44429  # Note: m4 eats our [], so we need to use [ and ] instead.
44430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44431  if test "x$has_forbidden_chars" != x; then
44432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44434  fi
44435
44436
44437  windows_path="$new_path"
44438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44439    unix_path=`$CYGPATH -u "$windows_path"`
44440    new_path="$unix_path"
44441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44443    new_path="$unix_path"
44444  fi
44445
44446  if test "x$path" != "x$new_path"; then
44447    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44449$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44450  fi
44451
44452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44454
44455    else
44456      # We're on a unix platform. Hooray! :)
44457      path="$POTENTIAL_FREETYPE_LIB_PATH"
44458      has_space=`$ECHO "$path" | $GREP " "`
44459      if test "x$has_space" != x; then
44460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44461$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44463      fi
44464
44465      # Use eval to expand a potential ~
44466      eval path="$path"
44467      if test ! -f "$path" && test ! -d "$path"; then
44468        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44469      fi
44470
44471      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44472    fi
44473  fi
44474
44475
44476    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44478$as_echo_n "checking for freetype includes... " >&6; }
44479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44480$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44481    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44483$as_echo_n "checking for freetype libraries... " >&6; }
44484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44485$as_echo "$FREETYPE_LIB_PATH" >&6; }
44486  fi
44487
44488          if test "x$FOUND_FREETYPE" != xyes; then
44489            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44490          fi
44491        else
44492          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44493$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44494          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44495        fi
44496      else
44497        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44498$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44499      fi
44500    fi
44501
44502    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44503      # User has specified settings
44504
44505      if test "x$BUNDLE_FREETYPE" = x; then
44506        # If not specified, default is to bundle freetype
44507        BUNDLE_FREETYPE=yes
44508      fi
44509
44510      if test "x$with_freetype" != x; then
44511        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44512        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44513      fi
44514
44515      # Allow --with-freetype-lib and --with-freetype-include to override
44516      if test "x$with_freetype_include" != x; then
44517        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44518      fi
44519      if test "x$with_freetype_lib" != x; then
44520        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44521      fi
44522
44523      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44524        # Okay, we got it. Check that it works.
44525
44526  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44527  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44528  METHOD="--with-freetype"
44529
44530  # Let's start with an optimistic view of the world :-)
44531  FOUND_FREETYPE=yes
44532
44533  # First look for the canonical freetype main include file ft2build.h.
44534  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44535    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44536    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44537    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44538      # Fail.
44539      FOUND_FREETYPE=no
44540    fi
44541  fi
44542
44543  if test "x$FOUND_FREETYPE" = xyes; then
44544    # Include file found, let's continue the sanity check.
44545    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44546$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44547
44548    # Reset to default value
44549    FREETYPE_BASE_NAME=freetype
44550    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44551    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44552      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44553          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44554        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44555        # for the .6 version explicitly.
44556        FREETYPE_BASE_NAME=freetype.6
44557        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44558        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44559$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44560      else
44561        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44562$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44563        FOUND_FREETYPE=no
44564      fi
44565    else
44566      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44567        # On Windows, we will need both .lib and .dll file.
44568        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44569          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44570$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44571          FOUND_FREETYPE=no
44572        fi
44573      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44574          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44575        # Found lib in isa dir, use that instead.
44576        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44577        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44578$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44579      fi
44580    fi
44581  fi
44582
44583  if test "x$FOUND_FREETYPE" = xyes; then
44584
44585  # Only process if variable expands to non-empty
44586
44587  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44588    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44589
44590  # Input might be given as Windows format, start by converting to
44591  # unix format.
44592  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44593  new_path=`$CYGPATH -u "$path"`
44594
44595  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44596  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44597  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44598  # "foo.exe" is OK but "foo" is an error.
44599  #
44600  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44601  # It is also a way to make sure we got the proper file name for the real test later on.
44602  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44603  if test "x$test_shortpath" = x; then
44604    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44606    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44607  fi
44608
44609  # Call helper function which possibly converts this using DOS-style short mode.
44610  # If so, the updated path is stored in $new_path.
44611
44612  input_path="$new_path"
44613  # Check if we need to convert this using DOS-style short mode. If the path
44614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44615  # take no chances and rewrite it.
44616  # Note: m4 eats our [], so we need to use [ and ] instead.
44617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44618  if test "x$has_forbidden_chars" != x; then
44619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44620    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44621    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44622    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44623      # Going to short mode and back again did indeed matter. Since short mode is
44624      # case insensitive, let's make it lowercase to improve readability.
44625      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44626      # Now convert it back to Unix-style (cygpath)
44627      input_path=`$CYGPATH -u "$shortmode_path"`
44628      new_path="$input_path"
44629    fi
44630  fi
44631
44632  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44633  if test "x$test_cygdrive_prefix" = x; then
44634    # As a simple fix, exclude /usr/bin since it's not a real path.
44635    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44636      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44637      # a path prefixed by /cygdrive for fixpath to work.
44638      new_path="$CYGWIN_ROOT_PATH$input_path"
44639    fi
44640  fi
44641
44642
44643  if test "x$path" != "x$new_path"; then
44644    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44645    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44646$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44647  fi
44648
44649    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44650
44651  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44652  has_colon=`$ECHO $path | $GREP ^.:`
44653  new_path="$path"
44654  if test "x$has_colon" = x; then
44655    # Not in mixed or Windows style, start by that.
44656    new_path=`cmd //c echo $path`
44657  fi
44658
44659
44660  input_path="$new_path"
44661  # Check if we need to convert this using DOS-style short mode. If the path
44662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44663  # take no chances and rewrite it.
44664  # Note: m4 eats our [], so we need to use [ and ] instead.
44665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44666  if test "x$has_forbidden_chars" != x; then
44667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44668    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44669  fi
44670
44671
44672  windows_path="$new_path"
44673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44674    unix_path=`$CYGPATH -u "$windows_path"`
44675    new_path="$unix_path"
44676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44678    new_path="$unix_path"
44679  fi
44680
44681  if test "x$path" != "x$new_path"; then
44682    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44684$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44685  fi
44686
44687  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44688  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44689
44690    else
44691      # We're on a unix platform. Hooray! :)
44692      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44693      has_space=`$ECHO "$path" | $GREP " "`
44694      if test "x$has_space" != x; then
44695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44696$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44697        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44698      fi
44699
44700      # Use eval to expand a potential ~
44701      eval path="$path"
44702      if test ! -f "$path" && test ! -d "$path"; then
44703        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44704      fi
44705
44706      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44707    fi
44708  fi
44709
44710
44711  # Only process if variable expands to non-empty
44712
44713  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44715
44716  # Input might be given as Windows format, start by converting to
44717  # unix format.
44718  path="$POTENTIAL_FREETYPE_LIB_PATH"
44719  new_path=`$CYGPATH -u "$path"`
44720
44721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44724  # "foo.exe" is OK but "foo" is an error.
44725  #
44726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44727  # It is also a way to make sure we got the proper file name for the real test later on.
44728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44729  if test "x$test_shortpath" = x; then
44730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44731$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44732    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44733  fi
44734
44735  # Call helper function which possibly converts this using DOS-style short mode.
44736  # If so, the updated path is stored in $new_path.
44737
44738  input_path="$new_path"
44739  # Check if we need to convert this using DOS-style short mode. If the path
44740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44741  # take no chances and rewrite it.
44742  # Note: m4 eats our [], so we need to use [ and ] instead.
44743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44744  if test "x$has_forbidden_chars" != x; then
44745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44749      # Going to short mode and back again did indeed matter. Since short mode is
44750      # case insensitive, let's make it lowercase to improve readability.
44751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44752      # Now convert it back to Unix-style (cygpath)
44753      input_path=`$CYGPATH -u "$shortmode_path"`
44754      new_path="$input_path"
44755    fi
44756  fi
44757
44758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44759  if test "x$test_cygdrive_prefix" = x; then
44760    # As a simple fix, exclude /usr/bin since it's not a real path.
44761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44763      # a path prefixed by /cygdrive for fixpath to work.
44764      new_path="$CYGWIN_ROOT_PATH$input_path"
44765    fi
44766  fi
44767
44768
44769  if test "x$path" != "x$new_path"; then
44770    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44772$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44773  fi
44774
44775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44776
44777  path="$POTENTIAL_FREETYPE_LIB_PATH"
44778  has_colon=`$ECHO $path | $GREP ^.:`
44779  new_path="$path"
44780  if test "x$has_colon" = x; then
44781    # Not in mixed or Windows style, start by that.
44782    new_path=`cmd //c echo $path`
44783  fi
44784
44785
44786  input_path="$new_path"
44787  # Check if we need to convert this using DOS-style short mode. If the path
44788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44789  # take no chances and rewrite it.
44790  # Note: m4 eats our [], so we need to use [ and ] instead.
44791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44792  if test "x$has_forbidden_chars" != x; then
44793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44795  fi
44796
44797
44798  windows_path="$new_path"
44799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44800    unix_path=`$CYGPATH -u "$windows_path"`
44801    new_path="$unix_path"
44802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44804    new_path="$unix_path"
44805  fi
44806
44807  if test "x$path" != "x$new_path"; then
44808    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44811  fi
44812
44813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44815
44816    else
44817      # We're on a unix platform. Hooray! :)
44818      path="$POTENTIAL_FREETYPE_LIB_PATH"
44819      has_space=`$ECHO "$path" | $GREP " "`
44820      if test "x$has_space" != x; then
44821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44822$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44824      fi
44825
44826      # Use eval to expand a potential ~
44827      eval path="$path"
44828      if test ! -f "$path" && test ! -d "$path"; then
44829        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44830      fi
44831
44832      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44833    fi
44834  fi
44835
44836
44837    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44838    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44839$as_echo_n "checking for freetype includes... " >&6; }
44840    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44841$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44842    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44844$as_echo_n "checking for freetype libraries... " >&6; }
44845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44846$as_echo "$FREETYPE_LIB_PATH" >&6; }
44847  fi
44848
44849        if test "x$FOUND_FREETYPE" != xyes; then
44850          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44851        fi
44852      else
44853        # User specified only one of lib or include. This is an error.
44854        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44855          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44856$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44857          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44858        else
44859          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44860$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44861          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44862        fi
44863      fi
44864    else
44865      # User did not specify settings, but we need freetype. Try to locate it.
44866
44867      if test "x$BUNDLE_FREETYPE" = x; then
44868        # If not specified, default is to bundle freetype only on windows
44869        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44870          BUNDLE_FREETYPE=yes
44871        else
44872          BUNDLE_FREETYPE=no
44873        fi
44874      fi
44875
44876      if test "x$FOUND_FREETYPE" != xyes; then
44877        # Check builddeps
44878
44879
44880  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44881    # Source the builddeps file again, to make sure it uses the latest variables!
44882    . $builddepsfile
44883    # Look for a target and build machine specific resource!
44884    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44885    if test "x$resource" = x; then
44886      # Ok, lets instead look for a target specific resource
44887      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44888    fi
44889    if test "x$resource" = x; then
44890      # Ok, lets instead look for a build specific resource
44891      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44892    fi
44893    if test "x$resource" = x; then
44894      # Ok, lets instead look for a generic resource
44895      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44896      resource=${builddep_freetype2}
44897    fi
44898    if test "x$resource" != x; then
44899      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44900$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44901      # If the resource in the builddeps.conf file is an existing directory,
44902      # for example /java/linux/cups
44903      if test -d ${resource}; then
44904        depdir=${resource}
44905      else
44906
44907  # freetype2 is for example mymodule
44908  # $resource is for example libs/general/libmymod_1_2_3.zip
44909  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44910  # $with_builddeps_dir is for example /localhome/builddeps
44911  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44912  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44913  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44914  filename=`basename $resource`
44915  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44916  filebase=${filename%%.*}
44917  extension=${filename#*.}
44918  installdir=$with_builddeps_dir/$filebase
44919  if test ! -f $installdir/$filename.unpacked; then
44920    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44921$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44922    if test ! -d $installdir; then
44923      mkdir -p $installdir
44924    fi
44925    if test ! -d $installdir; then
44926      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44927    fi
44928    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44929    touch $tmpfile
44930    if test ! -f $tmpfile; then
44931      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44932    fi
44933
44934  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44935  # $tmpfile is the local file name for the downloaded file.
44936  VALID_TOOL=no
44937  if test "x$BDEPS_FTP" = xwget; then
44938    VALID_TOOL=yes
44939    wget -O $tmpfile $with_builddeps_server/$resource
44940  fi
44941  if test "x$BDEPS_FTP" = xlftp; then
44942    VALID_TOOL=yes
44943    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44944  fi
44945  if test "x$BDEPS_FTP" = xftp; then
44946    VALID_TOOL=yes
44947    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44948    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44949    FTPUSERPWD=${FTPSERVER%%@*}
44950    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44951      FTPUSER=${userpwd%%:*}
44952      FTPPWD=${userpwd#*@}
44953      FTPSERVER=${FTPSERVER#*@}
44954    else
44955      FTPUSER=ftp
44956      FTPPWD=ftp
44957    fi
44958    # the "pass" command does not work on some
44959    # ftp clients (read ftp.exe) but if it works,
44960    # passive mode is better!
44961    ( \
44962        echo "user $FTPUSER $FTPPWD"        ; \
44963        echo "pass"                         ; \
44964        echo "bin"                          ; \
44965        echo "get $FTPPATH $tmpfile"              ; \
44966    ) | ftp -in $FTPSERVER
44967  fi
44968  if test "x$VALID_TOOL" != xyes; then
44969    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44970  fi
44971
44972    mv $tmpfile $installdir/$filename
44973    if test ! -s $installdir/$filename; then
44974      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44975    fi
44976    case "$extension" in
44977      zip)  echo "Unzipping $installdir/$filename..."
44978        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44979        ;;
44980      tar.gz) echo "Untaring $installdir/$filename..."
44981        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44982        ;;
44983      tgz) echo "Untaring $installdir/$filename..."
44984        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44985        ;;
44986      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44987        ;;
44988    esac
44989  fi
44990  if test -f $installdir/$filename.unpacked; then
44991    depdir=$installdir
44992  fi
44993
44994      fi
44995      # Source the builddeps file again, because in the previous command, the depdir
44996      # was updated to point at the current build dependency install directory.
44997      . $builddepsfile
44998      # Now extract variables from the builddeps.conf files.
44999      theroot=${builddep_freetype2_ROOT}
45000      thecflags=${builddep_freetype2_CFLAGS}
45001      thelibs=${builddep_freetype2_LIBS}
45002      if test "x$depdir" = x; then
45003        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45004      fi
45005      FREETYPE=$depdir
45006      if test "x$theroot" != x; then
45007        FREETYPE="$theroot"
45008      fi
45009      if test "x$thecflags" != x; then
45010        FREETYPE_CFLAGS="$thecflags"
45011      fi
45012      if test "x$thelibs" != x; then
45013        FREETYPE_LIBS="$thelibs"
45014      fi
45015      FOUND_FREETYPE=yes
45016      else FOUND_FREETYPE=no
45017
45018    fi
45019    else FOUND_FREETYPE=no
45020
45021  fi
45022
45023        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45024        if test "x$FOUND_FREETYPE" = xyes; then
45025          if test "x$BUNDLE_FREETYPE" = xyes; then
45026            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45027$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45028            FOUND_FREETYPE=no
45029          else
45030            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45031$as_echo_n "checking for freetype... " >&6; }
45032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45033$as_echo "yes (using builddeps)" >&6; }
45034          fi
45035        fi
45036      fi
45037
45038      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45039      if test "x$SYSROOT" = x; then
45040        if test "x$FOUND_FREETYPE" != xyes; then
45041          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45042          if test "x$PKG_CONFIG" != x; then
45043
45044pkg_failed=no
45045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45046$as_echo_n "checking for FREETYPE... " >&6; }
45047
45048if test -n "$FREETYPE_CFLAGS"; then
45049    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45050 elif test -n "$PKG_CONFIG"; then
45051    if test -n "$PKG_CONFIG" && \
45052    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45053  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45054  ac_status=$?
45055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45056  test $ac_status = 0; }; then
45057  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45058else
45059  pkg_failed=yes
45060fi
45061 else
45062    pkg_failed=untried
45063fi
45064if test -n "$FREETYPE_LIBS"; then
45065    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45066 elif test -n "$PKG_CONFIG"; then
45067    if test -n "$PKG_CONFIG" && \
45068    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45069  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45070  ac_status=$?
45071  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45072  test $ac_status = 0; }; then
45073  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45074else
45075  pkg_failed=yes
45076fi
45077 else
45078    pkg_failed=untried
45079fi
45080
45081
45082
45083if test $pkg_failed = yes; then
45084
45085if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45086        _pkg_short_errors_supported=yes
45087else
45088        _pkg_short_errors_supported=no
45089fi
45090        if test $_pkg_short_errors_supported = yes; then
45091	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45092        else
45093	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45094        fi
45095	# Put the nasty error message in config.log where it belongs
45096	echo "$FREETYPE_PKG_ERRORS" >&5
45097
45098	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45099$as_echo "no" >&6; }
45100                FOUND_FREETYPE=no
45101elif test $pkg_failed = untried; then
45102	FOUND_FREETYPE=no
45103else
45104	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45105	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45106        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45107$as_echo "yes" >&6; }
45108	FOUND_FREETYPE=yes
45109fi
45110            if test "x$FOUND_FREETYPE" = xyes; then
45111              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45112              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45113              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45114              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45115                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45116              fi
45117              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45118              if test "x$BUNDLE_FREETYPE" = xyes; then
45119                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45120$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45121                FOUND_FREETYPE=no
45122              else
45123                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45124$as_echo_n "checking for freetype... " >&6; }
45125                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45126$as_echo "yes (using pkg-config)" >&6; }
45127              fi
45128            fi
45129          fi
45130        fi
45131      fi
45132
45133      if test "x$FOUND_FREETYPE" != xyes; then
45134        # Check in well-known locations
45135        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45136          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45137
45138  windows_path="$FREETYPE_BASE_DIR"
45139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45140    unix_path=`$CYGPATH -u "$windows_path"`
45141    FREETYPE_BASE_DIR="$unix_path"
45142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45144    FREETYPE_BASE_DIR="$unix_path"
45145  fi
45146
45147
45148  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45149  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45150  METHOD="well-known location"
45151
45152  # Let's start with an optimistic view of the world :-)
45153  FOUND_FREETYPE=yes
45154
45155  # First look for the canonical freetype main include file ft2build.h.
45156  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45157    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45158    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45159    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45160      # Fail.
45161      FOUND_FREETYPE=no
45162    fi
45163  fi
45164
45165  if test "x$FOUND_FREETYPE" = xyes; then
45166    # Include file found, let's continue the sanity check.
45167    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45168$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45169
45170    # Reset to default value
45171    FREETYPE_BASE_NAME=freetype
45172    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45173    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45174      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45175          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45176        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45177        # for the .6 version explicitly.
45178        FREETYPE_BASE_NAME=freetype.6
45179        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45180        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45181$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45182      else
45183        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45184$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45185        FOUND_FREETYPE=no
45186      fi
45187    else
45188      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45189        # On Windows, we will need both .lib and .dll file.
45190        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45191          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45192$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45193          FOUND_FREETYPE=no
45194        fi
45195      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45196          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45197        # Found lib in isa dir, use that instead.
45198        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45199        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45200$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45201      fi
45202    fi
45203  fi
45204
45205  if test "x$FOUND_FREETYPE" = xyes; then
45206
45207  # Only process if variable expands to non-empty
45208
45209  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45210    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45211
45212  # Input might be given as Windows format, start by converting to
45213  # unix format.
45214  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45215  new_path=`$CYGPATH -u "$path"`
45216
45217  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45218  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45219  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45220  # "foo.exe" is OK but "foo" is an error.
45221  #
45222  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45223  # It is also a way to make sure we got the proper file name for the real test later on.
45224  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45225  if test "x$test_shortpath" = x; then
45226    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45227$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45228    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45229  fi
45230
45231  # Call helper function which possibly converts this using DOS-style short mode.
45232  # If so, the updated path is stored in $new_path.
45233
45234  input_path="$new_path"
45235  # Check if we need to convert this using DOS-style short mode. If the path
45236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45237  # take no chances and rewrite it.
45238  # Note: m4 eats our [], so we need to use [ and ] instead.
45239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45240  if test "x$has_forbidden_chars" != x; then
45241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45242    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45243    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45244    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45245      # Going to short mode and back again did indeed matter. Since short mode is
45246      # case insensitive, let's make it lowercase to improve readability.
45247      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45248      # Now convert it back to Unix-style (cygpath)
45249      input_path=`$CYGPATH -u "$shortmode_path"`
45250      new_path="$input_path"
45251    fi
45252  fi
45253
45254  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45255  if test "x$test_cygdrive_prefix" = x; then
45256    # As a simple fix, exclude /usr/bin since it's not a real path.
45257    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45258      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45259      # a path prefixed by /cygdrive for fixpath to work.
45260      new_path="$CYGWIN_ROOT_PATH$input_path"
45261    fi
45262  fi
45263
45264
45265  if test "x$path" != "x$new_path"; then
45266    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45267    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45268$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45269  fi
45270
45271    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45272
45273  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45274  has_colon=`$ECHO $path | $GREP ^.:`
45275  new_path="$path"
45276  if test "x$has_colon" = x; then
45277    # Not in mixed or Windows style, start by that.
45278    new_path=`cmd //c echo $path`
45279  fi
45280
45281
45282  input_path="$new_path"
45283  # Check if we need to convert this using DOS-style short mode. If the path
45284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45285  # take no chances and rewrite it.
45286  # Note: m4 eats our [], so we need to use [ and ] instead.
45287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45288  if test "x$has_forbidden_chars" != x; then
45289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45290    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45291  fi
45292
45293
45294  windows_path="$new_path"
45295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45296    unix_path=`$CYGPATH -u "$windows_path"`
45297    new_path="$unix_path"
45298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45300    new_path="$unix_path"
45301  fi
45302
45303  if test "x$path" != "x$new_path"; then
45304    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45307  fi
45308
45309  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45310  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45311
45312    else
45313      # We're on a unix platform. Hooray! :)
45314      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45315      has_space=`$ECHO "$path" | $GREP " "`
45316      if test "x$has_space" != x; then
45317        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45318$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45319        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45320      fi
45321
45322      # Use eval to expand a potential ~
45323      eval path="$path"
45324      if test ! -f "$path" && test ! -d "$path"; then
45325        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45326      fi
45327
45328      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45329    fi
45330  fi
45331
45332
45333  # Only process if variable expands to non-empty
45334
45335  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45337
45338  # Input might be given as Windows format, start by converting to
45339  # unix format.
45340  path="$POTENTIAL_FREETYPE_LIB_PATH"
45341  new_path=`$CYGPATH -u "$path"`
45342
45343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45346  # "foo.exe" is OK but "foo" is an error.
45347  #
45348  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45349  # It is also a way to make sure we got the proper file name for the real test later on.
45350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45351  if test "x$test_shortpath" = x; then
45352    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45353$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45354    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45355  fi
45356
45357  # Call helper function which possibly converts this using DOS-style short mode.
45358  # If so, the updated path is stored in $new_path.
45359
45360  input_path="$new_path"
45361  # Check if we need to convert this using DOS-style short mode. If the path
45362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45363  # take no chances and rewrite it.
45364  # Note: m4 eats our [], so we need to use [ and ] instead.
45365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45366  if test "x$has_forbidden_chars" != x; then
45367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45368    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45369    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45370    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45371      # Going to short mode and back again did indeed matter. Since short mode is
45372      # case insensitive, let's make it lowercase to improve readability.
45373      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45374      # Now convert it back to Unix-style (cygpath)
45375      input_path=`$CYGPATH -u "$shortmode_path"`
45376      new_path="$input_path"
45377    fi
45378  fi
45379
45380  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45381  if test "x$test_cygdrive_prefix" = x; then
45382    # As a simple fix, exclude /usr/bin since it's not a real path.
45383    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45384      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45385      # a path prefixed by /cygdrive for fixpath to work.
45386      new_path="$CYGWIN_ROOT_PATH$input_path"
45387    fi
45388  fi
45389
45390
45391  if test "x$path" != "x$new_path"; then
45392    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45393    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45394$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45395  fi
45396
45397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45398
45399  path="$POTENTIAL_FREETYPE_LIB_PATH"
45400  has_colon=`$ECHO $path | $GREP ^.:`
45401  new_path="$path"
45402  if test "x$has_colon" = x; then
45403    # Not in mixed or Windows style, start by that.
45404    new_path=`cmd //c echo $path`
45405  fi
45406
45407
45408  input_path="$new_path"
45409  # Check if we need to convert this using DOS-style short mode. If the path
45410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45411  # take no chances and rewrite it.
45412  # Note: m4 eats our [], so we need to use [ and ] instead.
45413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45414  if test "x$has_forbidden_chars" != x; then
45415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45417  fi
45418
45419
45420  windows_path="$new_path"
45421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45422    unix_path=`$CYGPATH -u "$windows_path"`
45423    new_path="$unix_path"
45424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45426    new_path="$unix_path"
45427  fi
45428
45429  if test "x$path" != "x$new_path"; then
45430    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45431    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45432$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45433  fi
45434
45435  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45436  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45437
45438    else
45439      # We're on a unix platform. Hooray! :)
45440      path="$POTENTIAL_FREETYPE_LIB_PATH"
45441      has_space=`$ECHO "$path" | $GREP " "`
45442      if test "x$has_space" != x; then
45443        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45444$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45445        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45446      fi
45447
45448      # Use eval to expand a potential ~
45449      eval path="$path"
45450      if test ! -f "$path" && test ! -d "$path"; then
45451        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45452      fi
45453
45454      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45455    fi
45456  fi
45457
45458
45459    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45461$as_echo_n "checking for freetype includes... " >&6; }
45462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45463$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45464    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45466$as_echo_n "checking for freetype libraries... " >&6; }
45467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45468$as_echo "$FREETYPE_LIB_PATH" >&6; }
45469  fi
45470
45471          if test "x$FOUND_FREETYPE" != xyes; then
45472            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45473
45474  windows_path="$FREETYPE_BASE_DIR"
45475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45476    unix_path=`$CYGPATH -u "$windows_path"`
45477    FREETYPE_BASE_DIR="$unix_path"
45478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45480    FREETYPE_BASE_DIR="$unix_path"
45481  fi
45482
45483
45484  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45485  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45486  METHOD="well-known location"
45487
45488  # Let's start with an optimistic view of the world :-)
45489  FOUND_FREETYPE=yes
45490
45491  # First look for the canonical freetype main include file ft2build.h.
45492  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45493    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45494    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45495    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45496      # Fail.
45497      FOUND_FREETYPE=no
45498    fi
45499  fi
45500
45501  if test "x$FOUND_FREETYPE" = xyes; then
45502    # Include file found, let's continue the sanity check.
45503    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45504$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45505
45506    # Reset to default value
45507    FREETYPE_BASE_NAME=freetype
45508    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45509    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45510      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45511          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45512        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45513        # for the .6 version explicitly.
45514        FREETYPE_BASE_NAME=freetype.6
45515        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45516        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45517$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45518      else
45519        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45520$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45521        FOUND_FREETYPE=no
45522      fi
45523    else
45524      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45525        # On Windows, we will need both .lib and .dll file.
45526        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45527          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45528$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45529          FOUND_FREETYPE=no
45530        fi
45531      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45532          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45533        # Found lib in isa dir, use that instead.
45534        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45535        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45536$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45537      fi
45538    fi
45539  fi
45540
45541  if test "x$FOUND_FREETYPE" = xyes; then
45542
45543  # Only process if variable expands to non-empty
45544
45545  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45546    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45547
45548  # Input might be given as Windows format, start by converting to
45549  # unix format.
45550  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45551  new_path=`$CYGPATH -u "$path"`
45552
45553  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45554  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45555  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45556  # "foo.exe" is OK but "foo" is an error.
45557  #
45558  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45559  # It is also a way to make sure we got the proper file name for the real test later on.
45560  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45561  if test "x$test_shortpath" = x; then
45562    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45563$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45564    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45565  fi
45566
45567  # Call helper function which possibly converts this using DOS-style short mode.
45568  # If so, the updated path is stored in $new_path.
45569
45570  input_path="$new_path"
45571  # Check if we need to convert this using DOS-style short mode. If the path
45572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45573  # take no chances and rewrite it.
45574  # Note: m4 eats our [], so we need to use [ and ] instead.
45575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45576  if test "x$has_forbidden_chars" != x; then
45577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45578    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45579    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45580    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45581      # Going to short mode and back again did indeed matter. Since short mode is
45582      # case insensitive, let's make it lowercase to improve readability.
45583      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45584      # Now convert it back to Unix-style (cygpath)
45585      input_path=`$CYGPATH -u "$shortmode_path"`
45586      new_path="$input_path"
45587    fi
45588  fi
45589
45590  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45591  if test "x$test_cygdrive_prefix" = x; then
45592    # As a simple fix, exclude /usr/bin since it's not a real path.
45593    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45594      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45595      # a path prefixed by /cygdrive for fixpath to work.
45596      new_path="$CYGWIN_ROOT_PATH$input_path"
45597    fi
45598  fi
45599
45600
45601  if test "x$path" != "x$new_path"; then
45602    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45604$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45605  fi
45606
45607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45608
45609  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45610  has_colon=`$ECHO $path | $GREP ^.:`
45611  new_path="$path"
45612  if test "x$has_colon" = x; then
45613    # Not in mixed or Windows style, start by that.
45614    new_path=`cmd //c echo $path`
45615  fi
45616
45617
45618  input_path="$new_path"
45619  # Check if we need to convert this using DOS-style short mode. If the path
45620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45621  # take no chances and rewrite it.
45622  # Note: m4 eats our [], so we need to use [ and ] instead.
45623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45624  if test "x$has_forbidden_chars" != x; then
45625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45626    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45627  fi
45628
45629
45630  windows_path="$new_path"
45631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45632    unix_path=`$CYGPATH -u "$windows_path"`
45633    new_path="$unix_path"
45634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45636    new_path="$unix_path"
45637  fi
45638
45639  if test "x$path" != "x$new_path"; then
45640    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45641    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45642$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45643  fi
45644
45645  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45646  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45647
45648    else
45649      # We're on a unix platform. Hooray! :)
45650      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45651      has_space=`$ECHO "$path" | $GREP " "`
45652      if test "x$has_space" != x; then
45653        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45654$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45655        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45656      fi
45657
45658      # Use eval to expand a potential ~
45659      eval path="$path"
45660      if test ! -f "$path" && test ! -d "$path"; then
45661        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45662      fi
45663
45664      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45665    fi
45666  fi
45667
45668
45669  # Only process if variable expands to non-empty
45670
45671  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45673
45674  # Input might be given as Windows format, start by converting to
45675  # unix format.
45676  path="$POTENTIAL_FREETYPE_LIB_PATH"
45677  new_path=`$CYGPATH -u "$path"`
45678
45679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45682  # "foo.exe" is OK but "foo" is an error.
45683  #
45684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45685  # It is also a way to make sure we got the proper file name for the real test later on.
45686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45687  if test "x$test_shortpath" = x; then
45688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45689$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45690    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45691  fi
45692
45693  # Call helper function which possibly converts this using DOS-style short mode.
45694  # If so, the updated path is stored in $new_path.
45695
45696  input_path="$new_path"
45697  # Check if we need to convert this using DOS-style short mode. If the path
45698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45699  # take no chances and rewrite it.
45700  # Note: m4 eats our [], so we need to use [ and ] instead.
45701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45702  if test "x$has_forbidden_chars" != x; then
45703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45707      # Going to short mode and back again did indeed matter. Since short mode is
45708      # case insensitive, let's make it lowercase to improve readability.
45709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45710      # Now convert it back to Unix-style (cygpath)
45711      input_path=`$CYGPATH -u "$shortmode_path"`
45712      new_path="$input_path"
45713    fi
45714  fi
45715
45716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45717  if test "x$test_cygdrive_prefix" = x; then
45718    # As a simple fix, exclude /usr/bin since it's not a real path.
45719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45721      # a path prefixed by /cygdrive for fixpath to work.
45722      new_path="$CYGWIN_ROOT_PATH$input_path"
45723    fi
45724  fi
45725
45726
45727  if test "x$path" != "x$new_path"; then
45728    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45730$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45731  fi
45732
45733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45734
45735  path="$POTENTIAL_FREETYPE_LIB_PATH"
45736  has_colon=`$ECHO $path | $GREP ^.:`
45737  new_path="$path"
45738  if test "x$has_colon" = x; then
45739    # Not in mixed or Windows style, start by that.
45740    new_path=`cmd //c echo $path`
45741  fi
45742
45743
45744  input_path="$new_path"
45745  # Check if we need to convert this using DOS-style short mode. If the path
45746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45747  # take no chances and rewrite it.
45748  # Note: m4 eats our [], so we need to use [ and ] instead.
45749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45750  if test "x$has_forbidden_chars" != x; then
45751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45753  fi
45754
45755
45756  windows_path="$new_path"
45757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45758    unix_path=`$CYGPATH -u "$windows_path"`
45759    new_path="$unix_path"
45760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45762    new_path="$unix_path"
45763  fi
45764
45765  if test "x$path" != "x$new_path"; then
45766    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45768$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45769  fi
45770
45771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45773
45774    else
45775      # We're on a unix platform. Hooray! :)
45776      path="$POTENTIAL_FREETYPE_LIB_PATH"
45777      has_space=`$ECHO "$path" | $GREP " "`
45778      if test "x$has_space" != x; then
45779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45781        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45782      fi
45783
45784      # Use eval to expand a potential ~
45785      eval path="$path"
45786      if test ! -f "$path" && test ! -d "$path"; then
45787        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45788      fi
45789
45790      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45791    fi
45792  fi
45793
45794
45795    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45797$as_echo_n "checking for freetype includes... " >&6; }
45798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45799$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45800    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45802$as_echo_n "checking for freetype libraries... " >&6; }
45803    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45804$as_echo "$FREETYPE_LIB_PATH" >&6; }
45805  fi
45806
45807          fi
45808        else
45809          FREETYPE_BASE_DIR="$SYSROOT/usr"
45810
45811  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45812  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45813  METHOD="well-known location"
45814
45815  # Let's start with an optimistic view of the world :-)
45816  FOUND_FREETYPE=yes
45817
45818  # First look for the canonical freetype main include file ft2build.h.
45819  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45820    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45821    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45822    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45823      # Fail.
45824      FOUND_FREETYPE=no
45825    fi
45826  fi
45827
45828  if test "x$FOUND_FREETYPE" = xyes; then
45829    # Include file found, let's continue the sanity check.
45830    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45831$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45832
45833    # Reset to default value
45834    FREETYPE_BASE_NAME=freetype
45835    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45836    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45837      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45838          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45839        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45840        # for the .6 version explicitly.
45841        FREETYPE_BASE_NAME=freetype.6
45842        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45843        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45844$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45845      else
45846        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45847$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45848        FOUND_FREETYPE=no
45849      fi
45850    else
45851      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45852        # On Windows, we will need both .lib and .dll file.
45853        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45854          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45855$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45856          FOUND_FREETYPE=no
45857        fi
45858      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45859          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45860        # Found lib in isa dir, use that instead.
45861        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45862        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45863$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45864      fi
45865    fi
45866  fi
45867
45868  if test "x$FOUND_FREETYPE" = xyes; then
45869
45870  # Only process if variable expands to non-empty
45871
45872  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45874
45875  # Input might be given as Windows format, start by converting to
45876  # unix format.
45877  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45878  new_path=`$CYGPATH -u "$path"`
45879
45880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45883  # "foo.exe" is OK but "foo" is an error.
45884  #
45885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45886  # It is also a way to make sure we got the proper file name for the real test later on.
45887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45888  if test "x$test_shortpath" = x; then
45889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45890$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45891    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45892  fi
45893
45894  # Call helper function which possibly converts this using DOS-style short mode.
45895  # If so, the updated path is stored in $new_path.
45896
45897  input_path="$new_path"
45898  # Check if we need to convert this using DOS-style short mode. If the path
45899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45900  # take no chances and rewrite it.
45901  # Note: m4 eats our [], so we need to use [ and ] instead.
45902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45903  if test "x$has_forbidden_chars" != x; then
45904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45908      # Going to short mode and back again did indeed matter. Since short mode is
45909      # case insensitive, let's make it lowercase to improve readability.
45910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45911      # Now convert it back to Unix-style (cygpath)
45912      input_path=`$CYGPATH -u "$shortmode_path"`
45913      new_path="$input_path"
45914    fi
45915  fi
45916
45917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45918  if test "x$test_cygdrive_prefix" = x; then
45919    # As a simple fix, exclude /usr/bin since it's not a real path.
45920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45922      # a path prefixed by /cygdrive for fixpath to work.
45923      new_path="$CYGWIN_ROOT_PATH$input_path"
45924    fi
45925  fi
45926
45927
45928  if test "x$path" != "x$new_path"; then
45929    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45931$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45932  fi
45933
45934    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45935
45936  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45937  has_colon=`$ECHO $path | $GREP ^.:`
45938  new_path="$path"
45939  if test "x$has_colon" = x; then
45940    # Not in mixed or Windows style, start by that.
45941    new_path=`cmd //c echo $path`
45942  fi
45943
45944
45945  input_path="$new_path"
45946  # Check if we need to convert this using DOS-style short mode. If the path
45947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45948  # take no chances and rewrite it.
45949  # Note: m4 eats our [], so we need to use [ and ] instead.
45950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45951  if test "x$has_forbidden_chars" != x; then
45952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45954  fi
45955
45956
45957  windows_path="$new_path"
45958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45959    unix_path=`$CYGPATH -u "$windows_path"`
45960    new_path="$unix_path"
45961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45963    new_path="$unix_path"
45964  fi
45965
45966  if test "x$path" != "x$new_path"; then
45967    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45969$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45970  fi
45971
45972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45974
45975    else
45976      # We're on a unix platform. Hooray! :)
45977      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45978      has_space=`$ECHO "$path" | $GREP " "`
45979      if test "x$has_space" != x; then
45980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45981$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45982        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45983      fi
45984
45985      # Use eval to expand a potential ~
45986      eval path="$path"
45987      if test ! -f "$path" && test ! -d "$path"; then
45988        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45989      fi
45990
45991      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45992    fi
45993  fi
45994
45995
45996  # Only process if variable expands to non-empty
45997
45998  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45999    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46000
46001  # Input might be given as Windows format, start by converting to
46002  # unix format.
46003  path="$POTENTIAL_FREETYPE_LIB_PATH"
46004  new_path=`$CYGPATH -u "$path"`
46005
46006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46009  # "foo.exe" is OK but "foo" is an error.
46010  #
46011  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46012  # It is also a way to make sure we got the proper file name for the real test later on.
46013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46014  if test "x$test_shortpath" = x; then
46015    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46016$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46017    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46018  fi
46019
46020  # Call helper function which possibly converts this using DOS-style short mode.
46021  # If so, the updated path is stored in $new_path.
46022
46023  input_path="$new_path"
46024  # Check if we need to convert this using DOS-style short mode. If the path
46025  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46026  # take no chances and rewrite it.
46027  # Note: m4 eats our [], so we need to use [ and ] instead.
46028  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46029  if test "x$has_forbidden_chars" != x; then
46030    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46031    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46032    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46033    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46034      # Going to short mode and back again did indeed matter. Since short mode is
46035      # case insensitive, let's make it lowercase to improve readability.
46036      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46037      # Now convert it back to Unix-style (cygpath)
46038      input_path=`$CYGPATH -u "$shortmode_path"`
46039      new_path="$input_path"
46040    fi
46041  fi
46042
46043  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46044  if test "x$test_cygdrive_prefix" = x; then
46045    # As a simple fix, exclude /usr/bin since it's not a real path.
46046    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46047      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46048      # a path prefixed by /cygdrive for fixpath to work.
46049      new_path="$CYGWIN_ROOT_PATH$input_path"
46050    fi
46051  fi
46052
46053
46054  if test "x$path" != "x$new_path"; then
46055    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46056    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46057$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46058  fi
46059
46060    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46061
46062  path="$POTENTIAL_FREETYPE_LIB_PATH"
46063  has_colon=`$ECHO $path | $GREP ^.:`
46064  new_path="$path"
46065  if test "x$has_colon" = x; then
46066    # Not in mixed or Windows style, start by that.
46067    new_path=`cmd //c echo $path`
46068  fi
46069
46070
46071  input_path="$new_path"
46072  # Check if we need to convert this using DOS-style short mode. If the path
46073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46074  # take no chances and rewrite it.
46075  # Note: m4 eats our [], so we need to use [ and ] instead.
46076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46077  if test "x$has_forbidden_chars" != x; then
46078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46080  fi
46081
46082
46083  windows_path="$new_path"
46084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46085    unix_path=`$CYGPATH -u "$windows_path"`
46086    new_path="$unix_path"
46087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46089    new_path="$unix_path"
46090  fi
46091
46092  if test "x$path" != "x$new_path"; then
46093    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46095$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46096  fi
46097
46098  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46099  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46100
46101    else
46102      # We're on a unix platform. Hooray! :)
46103      path="$POTENTIAL_FREETYPE_LIB_PATH"
46104      has_space=`$ECHO "$path" | $GREP " "`
46105      if test "x$has_space" != x; then
46106        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46107$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46108        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46109      fi
46110
46111      # Use eval to expand a potential ~
46112      eval path="$path"
46113      if test ! -f "$path" && test ! -d "$path"; then
46114        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46115      fi
46116
46117      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46118    fi
46119  fi
46120
46121
46122    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46124$as_echo_n "checking for freetype includes... " >&6; }
46125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46126$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46127    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46129$as_echo_n "checking for freetype libraries... " >&6; }
46130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46131$as_echo "$FREETYPE_LIB_PATH" >&6; }
46132  fi
46133
46134
46135          if test "x$FOUND_FREETYPE" != xyes; then
46136            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46137
46138  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46139  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46140  METHOD="well-known location"
46141
46142  # Let's start with an optimistic view of the world :-)
46143  FOUND_FREETYPE=yes
46144
46145  # First look for the canonical freetype main include file ft2build.h.
46146  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46147    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46148    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46149    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46150      # Fail.
46151      FOUND_FREETYPE=no
46152    fi
46153  fi
46154
46155  if test "x$FOUND_FREETYPE" = xyes; then
46156    # Include file found, let's continue the sanity check.
46157    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46158$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46159
46160    # Reset to default value
46161    FREETYPE_BASE_NAME=freetype
46162    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46163    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46164      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46165          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46166        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46167        # for the .6 version explicitly.
46168        FREETYPE_BASE_NAME=freetype.6
46169        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46170        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46171$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46172      else
46173        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46174$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46175        FOUND_FREETYPE=no
46176      fi
46177    else
46178      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46179        # On Windows, we will need both .lib and .dll file.
46180        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46181          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46182$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46183          FOUND_FREETYPE=no
46184        fi
46185      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46186          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46187        # Found lib in isa dir, use that instead.
46188        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46189        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46190$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46191      fi
46192    fi
46193  fi
46194
46195  if test "x$FOUND_FREETYPE" = xyes; then
46196
46197  # Only process if variable expands to non-empty
46198
46199  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46201
46202  # Input might be given as Windows format, start by converting to
46203  # unix format.
46204  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46205  new_path=`$CYGPATH -u "$path"`
46206
46207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46210  # "foo.exe" is OK but "foo" is an error.
46211  #
46212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46213  # It is also a way to make sure we got the proper file name for the real test later on.
46214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46215  if test "x$test_shortpath" = x; then
46216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46218    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46219  fi
46220
46221  # Call helper function which possibly converts this using DOS-style short mode.
46222  # If so, the updated path is stored in $new_path.
46223
46224  input_path="$new_path"
46225  # Check if we need to convert this using DOS-style short mode. If the path
46226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46227  # take no chances and rewrite it.
46228  # Note: m4 eats our [], so we need to use [ and ] instead.
46229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46230  if test "x$has_forbidden_chars" != x; then
46231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46235      # Going to short mode and back again did indeed matter. Since short mode is
46236      # case insensitive, let's make it lowercase to improve readability.
46237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46238      # Now convert it back to Unix-style (cygpath)
46239      input_path=`$CYGPATH -u "$shortmode_path"`
46240      new_path="$input_path"
46241    fi
46242  fi
46243
46244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46245  if test "x$test_cygdrive_prefix" = x; then
46246    # As a simple fix, exclude /usr/bin since it's not a real path.
46247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46249      # a path prefixed by /cygdrive for fixpath to work.
46250      new_path="$CYGWIN_ROOT_PATH$input_path"
46251    fi
46252  fi
46253
46254
46255  if test "x$path" != "x$new_path"; then
46256    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46258$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46259  fi
46260
46261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46262
46263  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46264  has_colon=`$ECHO $path | $GREP ^.:`
46265  new_path="$path"
46266  if test "x$has_colon" = x; then
46267    # Not in mixed or Windows style, start by that.
46268    new_path=`cmd //c echo $path`
46269  fi
46270
46271
46272  input_path="$new_path"
46273  # Check if we need to convert this using DOS-style short mode. If the path
46274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46275  # take no chances and rewrite it.
46276  # Note: m4 eats our [], so we need to use [ and ] instead.
46277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46278  if test "x$has_forbidden_chars" != x; then
46279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46281  fi
46282
46283
46284  windows_path="$new_path"
46285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46286    unix_path=`$CYGPATH -u "$windows_path"`
46287    new_path="$unix_path"
46288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46290    new_path="$unix_path"
46291  fi
46292
46293  if test "x$path" != "x$new_path"; then
46294    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46296$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46297  fi
46298
46299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46301
46302    else
46303      # We're on a unix platform. Hooray! :)
46304      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46305      has_space=`$ECHO "$path" | $GREP " "`
46306      if test "x$has_space" != x; then
46307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46308$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46310      fi
46311
46312      # Use eval to expand a potential ~
46313      eval path="$path"
46314      if test ! -f "$path" && test ! -d "$path"; then
46315        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46316      fi
46317
46318      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46319    fi
46320  fi
46321
46322
46323  # Only process if variable expands to non-empty
46324
46325  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46327
46328  # Input might be given as Windows format, start by converting to
46329  # unix format.
46330  path="$POTENTIAL_FREETYPE_LIB_PATH"
46331  new_path=`$CYGPATH -u "$path"`
46332
46333  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46334  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46335  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46336  # "foo.exe" is OK but "foo" is an error.
46337  #
46338  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46339  # It is also a way to make sure we got the proper file name for the real test later on.
46340  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46341  if test "x$test_shortpath" = x; then
46342    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46343$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46344    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46345  fi
46346
46347  # Call helper function which possibly converts this using DOS-style short mode.
46348  # If so, the updated path is stored in $new_path.
46349
46350  input_path="$new_path"
46351  # Check if we need to convert this using DOS-style short mode. If the path
46352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46353  # take no chances and rewrite it.
46354  # Note: m4 eats our [], so we need to use [ and ] instead.
46355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46356  if test "x$has_forbidden_chars" != x; then
46357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46361      # Going to short mode and back again did indeed matter. Since short mode is
46362      # case insensitive, let's make it lowercase to improve readability.
46363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46364      # Now convert it back to Unix-style (cygpath)
46365      input_path=`$CYGPATH -u "$shortmode_path"`
46366      new_path="$input_path"
46367    fi
46368  fi
46369
46370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46371  if test "x$test_cygdrive_prefix" = x; then
46372    # As a simple fix, exclude /usr/bin since it's not a real path.
46373    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46375      # a path prefixed by /cygdrive for fixpath to work.
46376      new_path="$CYGWIN_ROOT_PATH$input_path"
46377    fi
46378  fi
46379
46380
46381  if test "x$path" != "x$new_path"; then
46382    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46385  fi
46386
46387    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46388
46389  path="$POTENTIAL_FREETYPE_LIB_PATH"
46390  has_colon=`$ECHO $path | $GREP ^.:`
46391  new_path="$path"
46392  if test "x$has_colon" = x; then
46393    # Not in mixed or Windows style, start by that.
46394    new_path=`cmd //c echo $path`
46395  fi
46396
46397
46398  input_path="$new_path"
46399  # Check if we need to convert this using DOS-style short mode. If the path
46400  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46401  # take no chances and rewrite it.
46402  # Note: m4 eats our [], so we need to use [ and ] instead.
46403  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46404  if test "x$has_forbidden_chars" != x; then
46405    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46406    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46407  fi
46408
46409
46410  windows_path="$new_path"
46411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46412    unix_path=`$CYGPATH -u "$windows_path"`
46413    new_path="$unix_path"
46414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46416    new_path="$unix_path"
46417  fi
46418
46419  if test "x$path" != "x$new_path"; then
46420    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46421    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46422$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46423  fi
46424
46425  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46426  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46427
46428    else
46429      # We're on a unix platform. Hooray! :)
46430      path="$POTENTIAL_FREETYPE_LIB_PATH"
46431      has_space=`$ECHO "$path" | $GREP " "`
46432      if test "x$has_space" != x; then
46433        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46434$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46435        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46436      fi
46437
46438      # Use eval to expand a potential ~
46439      eval path="$path"
46440      if test ! -f "$path" && test ! -d "$path"; then
46441        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46442      fi
46443
46444      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46445    fi
46446  fi
46447
46448
46449    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46450    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46451$as_echo_n "checking for freetype includes... " >&6; }
46452    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46453$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46454    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46456$as_echo_n "checking for freetype libraries... " >&6; }
46457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46458$as_echo "$FREETYPE_LIB_PATH" >&6; }
46459  fi
46460
46461          fi
46462
46463          if test "x$FOUND_FREETYPE" != xyes; then
46464            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46465
46466  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46467  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46468  METHOD="well-known location"
46469
46470  # Let's start with an optimistic view of the world :-)
46471  FOUND_FREETYPE=yes
46472
46473  # First look for the canonical freetype main include file ft2build.h.
46474  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46475    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46476    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46477    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46478      # Fail.
46479      FOUND_FREETYPE=no
46480    fi
46481  fi
46482
46483  if test "x$FOUND_FREETYPE" = xyes; then
46484    # Include file found, let's continue the sanity check.
46485    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46486$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46487
46488    # Reset to default value
46489    FREETYPE_BASE_NAME=freetype
46490    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46491    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46492      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46493          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46494        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46495        # for the .6 version explicitly.
46496        FREETYPE_BASE_NAME=freetype.6
46497        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46498        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46499$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46500      else
46501        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46502$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46503        FOUND_FREETYPE=no
46504      fi
46505    else
46506      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46507        # On Windows, we will need both .lib and .dll file.
46508        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46509          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46510$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46511          FOUND_FREETYPE=no
46512        fi
46513      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46514          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46515        # Found lib in isa dir, use that instead.
46516        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46517        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46518$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46519      fi
46520    fi
46521  fi
46522
46523  if test "x$FOUND_FREETYPE" = xyes; then
46524
46525  # Only process if variable expands to non-empty
46526
46527  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46528    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46529
46530  # Input might be given as Windows format, start by converting to
46531  # unix format.
46532  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46533  new_path=`$CYGPATH -u "$path"`
46534
46535  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46536  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46537  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46538  # "foo.exe" is OK but "foo" is an error.
46539  #
46540  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46541  # It is also a way to make sure we got the proper file name for the real test later on.
46542  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46543  if test "x$test_shortpath" = x; then
46544    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46545$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46546    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46547  fi
46548
46549  # Call helper function which possibly converts this using DOS-style short mode.
46550  # If so, the updated path is stored in $new_path.
46551
46552  input_path="$new_path"
46553  # Check if we need to convert this using DOS-style short mode. If the path
46554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46555  # take no chances and rewrite it.
46556  # Note: m4 eats our [], so we need to use [ and ] instead.
46557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46558  if test "x$has_forbidden_chars" != x; then
46559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46563      # Going to short mode and back again did indeed matter. Since short mode is
46564      # case insensitive, let's make it lowercase to improve readability.
46565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46566      # Now convert it back to Unix-style (cygpath)
46567      input_path=`$CYGPATH -u "$shortmode_path"`
46568      new_path="$input_path"
46569    fi
46570  fi
46571
46572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46573  if test "x$test_cygdrive_prefix" = x; then
46574    # As a simple fix, exclude /usr/bin since it's not a real path.
46575    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46577      # a path prefixed by /cygdrive for fixpath to work.
46578      new_path="$CYGWIN_ROOT_PATH$input_path"
46579    fi
46580  fi
46581
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46590
46591  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46592  has_colon=`$ECHO $path | $GREP ^.:`
46593  new_path="$path"
46594  if test "x$has_colon" = x; then
46595    # Not in mixed or Windows style, start by that.
46596    new_path=`cmd //c echo $path`
46597  fi
46598
46599
46600  input_path="$new_path"
46601  # Check if we need to convert this using DOS-style short mode. If the path
46602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46603  # take no chances and rewrite it.
46604  # Note: m4 eats our [], so we need to use [ and ] instead.
46605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46606  if test "x$has_forbidden_chars" != x; then
46607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46609  fi
46610
46611
46612  windows_path="$new_path"
46613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46614    unix_path=`$CYGPATH -u "$windows_path"`
46615    new_path="$unix_path"
46616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46618    new_path="$unix_path"
46619  fi
46620
46621  if test "x$path" != "x$new_path"; then
46622    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46623    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46624$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46625  fi
46626
46627  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46628  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46629
46630    else
46631      # We're on a unix platform. Hooray! :)
46632      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46633      has_space=`$ECHO "$path" | $GREP " "`
46634      if test "x$has_space" != x; then
46635        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46636$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46637        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46638      fi
46639
46640      # Use eval to expand a potential ~
46641      eval path="$path"
46642      if test ! -f "$path" && test ! -d "$path"; then
46643        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46644      fi
46645
46646      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46647    fi
46648  fi
46649
46650
46651  # Only process if variable expands to non-empty
46652
46653  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46655
46656  # Input might be given as Windows format, start by converting to
46657  # unix format.
46658  path="$POTENTIAL_FREETYPE_LIB_PATH"
46659  new_path=`$CYGPATH -u "$path"`
46660
46661  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46662  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46663  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46664  # "foo.exe" is OK but "foo" is an error.
46665  #
46666  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46667  # It is also a way to make sure we got the proper file name for the real test later on.
46668  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46669  if test "x$test_shortpath" = x; then
46670    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46671$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46672    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46673  fi
46674
46675  # Call helper function which possibly converts this using DOS-style short mode.
46676  # If so, the updated path is stored in $new_path.
46677
46678  input_path="$new_path"
46679  # Check if we need to convert this using DOS-style short mode. If the path
46680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46681  # take no chances and rewrite it.
46682  # Note: m4 eats our [], so we need to use [ and ] instead.
46683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46684  if test "x$has_forbidden_chars" != x; then
46685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46686    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46687    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46688    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46689      # Going to short mode and back again did indeed matter. Since short mode is
46690      # case insensitive, let's make it lowercase to improve readability.
46691      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46692      # Now convert it back to Unix-style (cygpath)
46693      input_path=`$CYGPATH -u "$shortmode_path"`
46694      new_path="$input_path"
46695    fi
46696  fi
46697
46698  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46699  if test "x$test_cygdrive_prefix" = x; then
46700    # As a simple fix, exclude /usr/bin since it's not a real path.
46701    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46702      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46703      # a path prefixed by /cygdrive for fixpath to work.
46704      new_path="$CYGWIN_ROOT_PATH$input_path"
46705    fi
46706  fi
46707
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46716
46717  path="$POTENTIAL_FREETYPE_LIB_PATH"
46718  has_colon=`$ECHO $path | $GREP ^.:`
46719  new_path="$path"
46720  if test "x$has_colon" = x; then
46721    # Not in mixed or Windows style, start by that.
46722    new_path=`cmd //c echo $path`
46723  fi
46724
46725
46726  input_path="$new_path"
46727  # Check if we need to convert this using DOS-style short mode. If the path
46728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46729  # take no chances and rewrite it.
46730  # Note: m4 eats our [], so we need to use [ and ] instead.
46731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46732  if test "x$has_forbidden_chars" != x; then
46733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46734    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46735  fi
46736
46737
46738  windows_path="$new_path"
46739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46740    unix_path=`$CYGPATH -u "$windows_path"`
46741    new_path="$unix_path"
46742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46744    new_path="$unix_path"
46745  fi
46746
46747  if test "x$path" != "x$new_path"; then
46748    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46749    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46750$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46751  fi
46752
46753  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46754  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46755
46756    else
46757      # We're on a unix platform. Hooray! :)
46758      path="$POTENTIAL_FREETYPE_LIB_PATH"
46759      has_space=`$ECHO "$path" | $GREP " "`
46760      if test "x$has_space" != x; then
46761        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46762$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46763        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46764      fi
46765
46766      # Use eval to expand a potential ~
46767      eval path="$path"
46768      if test ! -f "$path" && test ! -d "$path"; then
46769        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46770      fi
46771
46772      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46773    fi
46774  fi
46775
46776
46777    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46779$as_echo_n "checking for freetype includes... " >&6; }
46780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46781$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46782    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46784$as_echo_n "checking for freetype libraries... " >&6; }
46785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46786$as_echo "$FREETYPE_LIB_PATH" >&6; }
46787  fi
46788
46789          fi
46790
46791          if test "x$FOUND_FREETYPE" != xyes; then
46792            FREETYPE_BASE_DIR="$SYSROOT/usr"
46793            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46794
46795  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46796  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46797  METHOD="well-known location"
46798
46799  # Let's start with an optimistic view of the world :-)
46800  FOUND_FREETYPE=yes
46801
46802  # First look for the canonical freetype main include file ft2build.h.
46803  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46804    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46805    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46806    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46807      # Fail.
46808      FOUND_FREETYPE=no
46809    fi
46810  fi
46811
46812  if test "x$FOUND_FREETYPE" = xyes; then
46813    # Include file found, let's continue the sanity check.
46814    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46815$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46816
46817    # Reset to default value
46818    FREETYPE_BASE_NAME=freetype
46819    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46820    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46821      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46822          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46823        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46824        # for the .6 version explicitly.
46825        FREETYPE_BASE_NAME=freetype.6
46826        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46827        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46828$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46829      else
46830        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46831$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46832        FOUND_FREETYPE=no
46833      fi
46834    else
46835      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46836        # On Windows, we will need both .lib and .dll file.
46837        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46838          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46839$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46840          FOUND_FREETYPE=no
46841        fi
46842      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46843          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46844        # Found lib in isa dir, use that instead.
46845        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46846        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46847$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46848      fi
46849    fi
46850  fi
46851
46852  if test "x$FOUND_FREETYPE" = xyes; then
46853
46854  # Only process if variable expands to non-empty
46855
46856  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46858
46859  # Input might be given as Windows format, start by converting to
46860  # unix format.
46861  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46862  new_path=`$CYGPATH -u "$path"`
46863
46864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46867  # "foo.exe" is OK but "foo" is an error.
46868  #
46869  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46870  # It is also a way to make sure we got the proper file name for the real test later on.
46871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46872  if test "x$test_shortpath" = x; then
46873    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46874$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46875    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46876  fi
46877
46878  # Call helper function which possibly converts this using DOS-style short mode.
46879  # If so, the updated path is stored in $new_path.
46880
46881  input_path="$new_path"
46882  # Check if we need to convert this using DOS-style short mode. If the path
46883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46884  # take no chances and rewrite it.
46885  # Note: m4 eats our [], so we need to use [ and ] instead.
46886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46887  if test "x$has_forbidden_chars" != x; then
46888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46892      # Going to short mode and back again did indeed matter. Since short mode is
46893      # case insensitive, let's make it lowercase to improve readability.
46894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46895      # Now convert it back to Unix-style (cygpath)
46896      input_path=`$CYGPATH -u "$shortmode_path"`
46897      new_path="$input_path"
46898    fi
46899  fi
46900
46901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46902  if test "x$test_cygdrive_prefix" = x; then
46903    # As a simple fix, exclude /usr/bin since it's not a real path.
46904    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46906      # a path prefixed by /cygdrive for fixpath to work.
46907      new_path="$CYGWIN_ROOT_PATH$input_path"
46908    fi
46909  fi
46910
46911
46912  if test "x$path" != "x$new_path"; then
46913    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46915$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46916  fi
46917
46918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46919
46920  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46921  has_colon=`$ECHO $path | $GREP ^.:`
46922  new_path="$path"
46923  if test "x$has_colon" = x; then
46924    # Not in mixed or Windows style, start by that.
46925    new_path=`cmd //c echo $path`
46926  fi
46927
46928
46929  input_path="$new_path"
46930  # Check if we need to convert this using DOS-style short mode. If the path
46931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46932  # take no chances and rewrite it.
46933  # Note: m4 eats our [], so we need to use [ and ] instead.
46934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46935  if test "x$has_forbidden_chars" != x; then
46936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46938  fi
46939
46940
46941  windows_path="$new_path"
46942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46943    unix_path=`$CYGPATH -u "$windows_path"`
46944    new_path="$unix_path"
46945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46947    new_path="$unix_path"
46948  fi
46949
46950  if test "x$path" != "x$new_path"; then
46951    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46953$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46954  fi
46955
46956  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46957  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46958
46959    else
46960      # We're on a unix platform. Hooray! :)
46961      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46962      has_space=`$ECHO "$path" | $GREP " "`
46963      if test "x$has_space" != x; then
46964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46965$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46966        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46967      fi
46968
46969      # Use eval to expand a potential ~
46970      eval path="$path"
46971      if test ! -f "$path" && test ! -d "$path"; then
46972        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46973      fi
46974
46975      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46976    fi
46977  fi
46978
46979
46980  # Only process if variable expands to non-empty
46981
46982  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46983    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46984
46985  # Input might be given as Windows format, start by converting to
46986  # unix format.
46987  path="$POTENTIAL_FREETYPE_LIB_PATH"
46988  new_path=`$CYGPATH -u "$path"`
46989
46990  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46991  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46992  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46993  # "foo.exe" is OK but "foo" is an error.
46994  #
46995  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46996  # It is also a way to make sure we got the proper file name for the real test later on.
46997  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46998  if test "x$test_shortpath" = x; then
46999    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47000$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47001    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47002  fi
47003
47004  # Call helper function which possibly converts this using DOS-style short mode.
47005  # If so, the updated path is stored in $new_path.
47006
47007  input_path="$new_path"
47008  # Check if we need to convert this using DOS-style short mode. If the path
47009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47010  # take no chances and rewrite it.
47011  # Note: m4 eats our [], so we need to use [ and ] instead.
47012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47013  if test "x$has_forbidden_chars" != x; then
47014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47015    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47016    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47017    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47018      # Going to short mode and back again did indeed matter. Since short mode is
47019      # case insensitive, let's make it lowercase to improve readability.
47020      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47021      # Now convert it back to Unix-style (cygpath)
47022      input_path=`$CYGPATH -u "$shortmode_path"`
47023      new_path="$input_path"
47024    fi
47025  fi
47026
47027  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47028  if test "x$test_cygdrive_prefix" = x; then
47029    # As a simple fix, exclude /usr/bin since it's not a real path.
47030    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47031      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47032      # a path prefixed by /cygdrive for fixpath to work.
47033      new_path="$CYGWIN_ROOT_PATH$input_path"
47034    fi
47035  fi
47036
47037
47038  if test "x$path" != "x$new_path"; then
47039    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47041$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47042  fi
47043
47044    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47045
47046  path="$POTENTIAL_FREETYPE_LIB_PATH"
47047  has_colon=`$ECHO $path | $GREP ^.:`
47048  new_path="$path"
47049  if test "x$has_colon" = x; then
47050    # Not in mixed or Windows style, start by that.
47051    new_path=`cmd //c echo $path`
47052  fi
47053
47054
47055  input_path="$new_path"
47056  # Check if we need to convert this using DOS-style short mode. If the path
47057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47058  # take no chances and rewrite it.
47059  # Note: m4 eats our [], so we need to use [ and ] instead.
47060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47061  if test "x$has_forbidden_chars" != x; then
47062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47063    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47064  fi
47065
47066
47067  windows_path="$new_path"
47068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47069    unix_path=`$CYGPATH -u "$windows_path"`
47070    new_path="$unix_path"
47071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47073    new_path="$unix_path"
47074  fi
47075
47076  if test "x$path" != "x$new_path"; then
47077    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47078    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47079$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47080  fi
47081
47082  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47083  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47084
47085    else
47086      # We're on a unix platform. Hooray! :)
47087      path="$POTENTIAL_FREETYPE_LIB_PATH"
47088      has_space=`$ECHO "$path" | $GREP " "`
47089      if test "x$has_space" != x; then
47090        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47092        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47093      fi
47094
47095      # Use eval to expand a potential ~
47096      eval path="$path"
47097      if test ! -f "$path" && test ! -d "$path"; then
47098        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47099      fi
47100
47101      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47102    fi
47103  fi
47104
47105
47106    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47108$as_echo_n "checking for freetype includes... " >&6; }
47109    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47110$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47111    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47112    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47113$as_echo_n "checking for freetype libraries... " >&6; }
47114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47115$as_echo "$FREETYPE_LIB_PATH" >&6; }
47116  fi
47117
47118            else
47119
47120  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47121  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47122  METHOD="well-known location"
47123
47124  # Let's start with an optimistic view of the world :-)
47125  FOUND_FREETYPE=yes
47126
47127  # First look for the canonical freetype main include file ft2build.h.
47128  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47129    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47130    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47131    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47132      # Fail.
47133      FOUND_FREETYPE=no
47134    fi
47135  fi
47136
47137  if test "x$FOUND_FREETYPE" = xyes; then
47138    # Include file found, let's continue the sanity check.
47139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47140$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47141
47142    # Reset to default value
47143    FREETYPE_BASE_NAME=freetype
47144    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47145    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47146      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47147          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47148        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47149        # for the .6 version explicitly.
47150        FREETYPE_BASE_NAME=freetype.6
47151        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47152        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47153$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47154      else
47155        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47156$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47157        FOUND_FREETYPE=no
47158      fi
47159    else
47160      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47161        # On Windows, we will need both .lib and .dll file.
47162        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47163          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47164$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47165          FOUND_FREETYPE=no
47166        fi
47167      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47168          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47169        # Found lib in isa dir, use that instead.
47170        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47171        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47172$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47173      fi
47174    fi
47175  fi
47176
47177  if test "x$FOUND_FREETYPE" = xyes; then
47178
47179  # Only process if variable expands to non-empty
47180
47181  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47183
47184  # Input might be given as Windows format, start by converting to
47185  # unix format.
47186  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47187  new_path=`$CYGPATH -u "$path"`
47188
47189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47192  # "foo.exe" is OK but "foo" is an error.
47193  #
47194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47195  # It is also a way to make sure we got the proper file name for the real test later on.
47196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47197  if test "x$test_shortpath" = x; then
47198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47199$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47200    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47201  fi
47202
47203  # Call helper function which possibly converts this using DOS-style short mode.
47204  # If so, the updated path is stored in $new_path.
47205
47206  input_path="$new_path"
47207  # Check if we need to convert this using DOS-style short mode. If the path
47208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47209  # take no chances and rewrite it.
47210  # Note: m4 eats our [], so we need to use [ and ] instead.
47211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47212  if test "x$has_forbidden_chars" != x; then
47213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47217      # Going to short mode and back again did indeed matter. Since short mode is
47218      # case insensitive, let's make it lowercase to improve readability.
47219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47220      # Now convert it back to Unix-style (cygpath)
47221      input_path=`$CYGPATH -u "$shortmode_path"`
47222      new_path="$input_path"
47223    fi
47224  fi
47225
47226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47227  if test "x$test_cygdrive_prefix" = x; then
47228    # As a simple fix, exclude /usr/bin since it's not a real path.
47229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47231      # a path prefixed by /cygdrive for fixpath to work.
47232      new_path="$CYGWIN_ROOT_PATH$input_path"
47233    fi
47234  fi
47235
47236
47237  if test "x$path" != "x$new_path"; then
47238    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47240$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47241  fi
47242
47243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47244
47245  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47246  has_colon=`$ECHO $path | $GREP ^.:`
47247  new_path="$path"
47248  if test "x$has_colon" = x; then
47249    # Not in mixed or Windows style, start by that.
47250    new_path=`cmd //c echo $path`
47251  fi
47252
47253
47254  input_path="$new_path"
47255  # Check if we need to convert this using DOS-style short mode. If the path
47256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47257  # take no chances and rewrite it.
47258  # Note: m4 eats our [], so we need to use [ and ] instead.
47259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47260  if test "x$has_forbidden_chars" != x; then
47261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47263  fi
47264
47265
47266  windows_path="$new_path"
47267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47268    unix_path=`$CYGPATH -u "$windows_path"`
47269    new_path="$unix_path"
47270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47272    new_path="$unix_path"
47273  fi
47274
47275  if test "x$path" != "x$new_path"; then
47276    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47278$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47279  fi
47280
47281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47283
47284    else
47285      # We're on a unix platform. Hooray! :)
47286      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47287      has_space=`$ECHO "$path" | $GREP " "`
47288      if test "x$has_space" != x; then
47289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47290$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47292      fi
47293
47294      # Use eval to expand a potential ~
47295      eval path="$path"
47296      if test ! -f "$path" && test ! -d "$path"; then
47297        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47298      fi
47299
47300      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47301    fi
47302  fi
47303
47304
47305  # Only process if variable expands to non-empty
47306
47307  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47309
47310  # Input might be given as Windows format, start by converting to
47311  # unix format.
47312  path="$POTENTIAL_FREETYPE_LIB_PATH"
47313  new_path=`$CYGPATH -u "$path"`
47314
47315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47318  # "foo.exe" is OK but "foo" is an error.
47319  #
47320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47321  # It is also a way to make sure we got the proper file name for the real test later on.
47322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47323  if test "x$test_shortpath" = x; then
47324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47326    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47327  fi
47328
47329  # Call helper function which possibly converts this using DOS-style short mode.
47330  # If so, the updated path is stored in $new_path.
47331
47332  input_path="$new_path"
47333  # Check if we need to convert this using DOS-style short mode. If the path
47334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47335  # take no chances and rewrite it.
47336  # Note: m4 eats our [], so we need to use [ and ] instead.
47337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47338  if test "x$has_forbidden_chars" != x; then
47339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47343      # Going to short mode and back again did indeed matter. Since short mode is
47344      # case insensitive, let's make it lowercase to improve readability.
47345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47346      # Now convert it back to Unix-style (cygpath)
47347      input_path=`$CYGPATH -u "$shortmode_path"`
47348      new_path="$input_path"
47349    fi
47350  fi
47351
47352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47353  if test "x$test_cygdrive_prefix" = x; then
47354    # As a simple fix, exclude /usr/bin since it's not a real path.
47355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47357      # a path prefixed by /cygdrive for fixpath to work.
47358      new_path="$CYGWIN_ROOT_PATH$input_path"
47359    fi
47360  fi
47361
47362
47363  if test "x$path" != "x$new_path"; then
47364    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47366$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47367  fi
47368
47369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47370
47371  path="$POTENTIAL_FREETYPE_LIB_PATH"
47372  has_colon=`$ECHO $path | $GREP ^.:`
47373  new_path="$path"
47374  if test "x$has_colon" = x; then
47375    # Not in mixed or Windows style, start by that.
47376    new_path=`cmd //c echo $path`
47377  fi
47378
47379
47380  input_path="$new_path"
47381  # Check if we need to convert this using DOS-style short mode. If the path
47382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47383  # take no chances and rewrite it.
47384  # Note: m4 eats our [], so we need to use [ and ] instead.
47385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47386  if test "x$has_forbidden_chars" != x; then
47387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47389  fi
47390
47391
47392  windows_path="$new_path"
47393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47394    unix_path=`$CYGPATH -u "$windows_path"`
47395    new_path="$unix_path"
47396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47398    new_path="$unix_path"
47399  fi
47400
47401  if test "x$path" != "x$new_path"; then
47402    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47404$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47405  fi
47406
47407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47409
47410    else
47411      # We're on a unix platform. Hooray! :)
47412      path="$POTENTIAL_FREETYPE_LIB_PATH"
47413      has_space=`$ECHO "$path" | $GREP " "`
47414      if test "x$has_space" != x; then
47415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47416$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47418      fi
47419
47420      # Use eval to expand a potential ~
47421      eval path="$path"
47422      if test ! -f "$path" && test ! -d "$path"; then
47423        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47424      fi
47425
47426      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47427    fi
47428  fi
47429
47430
47431    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47433$as_echo_n "checking for freetype includes... " >&6; }
47434    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47435$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47436    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47437    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47438$as_echo_n "checking for freetype libraries... " >&6; }
47439    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47440$as_echo "$FREETYPE_LIB_PATH" >&6; }
47441  fi
47442
47443              if test "x$FOUND_FREETYPE" != xyes; then
47444
47445  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47446  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47447  METHOD="well-known location"
47448
47449  # Let's start with an optimistic view of the world :-)
47450  FOUND_FREETYPE=yes
47451
47452  # First look for the canonical freetype main include file ft2build.h.
47453  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47454    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47455    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47456    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47457      # Fail.
47458      FOUND_FREETYPE=no
47459    fi
47460  fi
47461
47462  if test "x$FOUND_FREETYPE" = xyes; then
47463    # Include file found, let's continue the sanity check.
47464    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47465$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47466
47467    # Reset to default value
47468    FREETYPE_BASE_NAME=freetype
47469    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47470    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47471      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47472          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47473        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47474        # for the .6 version explicitly.
47475        FREETYPE_BASE_NAME=freetype.6
47476        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47477        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47478$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47479      else
47480        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47481$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47482        FOUND_FREETYPE=no
47483      fi
47484    else
47485      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47486        # On Windows, we will need both .lib and .dll file.
47487        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47488          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47489$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47490          FOUND_FREETYPE=no
47491        fi
47492      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47493          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47494        # Found lib in isa dir, use that instead.
47495        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47496        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47497$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47498      fi
47499    fi
47500  fi
47501
47502  if test "x$FOUND_FREETYPE" = xyes; then
47503
47504  # Only process if variable expands to non-empty
47505
47506  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47508
47509  # Input might be given as Windows format, start by converting to
47510  # unix format.
47511  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47512  new_path=`$CYGPATH -u "$path"`
47513
47514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47517  # "foo.exe" is OK but "foo" is an error.
47518  #
47519  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47520  # It is also a way to make sure we got the proper file name for the real test later on.
47521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47522  if test "x$test_shortpath" = x; then
47523    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47524$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47525    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47526  fi
47527
47528  # Call helper function which possibly converts this using DOS-style short mode.
47529  # If so, the updated path is stored in $new_path.
47530
47531  input_path="$new_path"
47532  # Check if we need to convert this using DOS-style short mode. If the path
47533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47534  # take no chances and rewrite it.
47535  # Note: m4 eats our [], so we need to use [ and ] instead.
47536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47537  if test "x$has_forbidden_chars" != x; then
47538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47539    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47540    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47541    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47542      # Going to short mode and back again did indeed matter. Since short mode is
47543      # case insensitive, let's make it lowercase to improve readability.
47544      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47545      # Now convert it back to Unix-style (cygpath)
47546      input_path=`$CYGPATH -u "$shortmode_path"`
47547      new_path="$input_path"
47548    fi
47549  fi
47550
47551  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47552  if test "x$test_cygdrive_prefix" = x; then
47553    # As a simple fix, exclude /usr/bin since it's not a real path.
47554    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47555      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47556      # a path prefixed by /cygdrive for fixpath to work.
47557      new_path="$CYGWIN_ROOT_PATH$input_path"
47558    fi
47559  fi
47560
47561
47562  if test "x$path" != "x$new_path"; then
47563    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47565$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47566  fi
47567
47568    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47569
47570  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47571  has_colon=`$ECHO $path | $GREP ^.:`
47572  new_path="$path"
47573  if test "x$has_colon" = x; then
47574    # Not in mixed or Windows style, start by that.
47575    new_path=`cmd //c echo $path`
47576  fi
47577
47578
47579  input_path="$new_path"
47580  # Check if we need to convert this using DOS-style short mode. If the path
47581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47582  # take no chances and rewrite it.
47583  # Note: m4 eats our [], so we need to use [ and ] instead.
47584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47585  if test "x$has_forbidden_chars" != x; then
47586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47587    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47588  fi
47589
47590
47591  windows_path="$new_path"
47592  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47593    unix_path=`$CYGPATH -u "$windows_path"`
47594    new_path="$unix_path"
47595  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47596    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47597    new_path="$unix_path"
47598  fi
47599
47600  if test "x$path" != "x$new_path"; then
47601    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47602    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47603$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47604  fi
47605
47606  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47607  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47608
47609    else
47610      # We're on a unix platform. Hooray! :)
47611      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47612      has_space=`$ECHO "$path" | $GREP " "`
47613      if test "x$has_space" != x; then
47614        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47615$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47616        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47617      fi
47618
47619      # Use eval to expand a potential ~
47620      eval path="$path"
47621      if test ! -f "$path" && test ! -d "$path"; then
47622        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47623      fi
47624
47625      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47626    fi
47627  fi
47628
47629
47630  # Only process if variable expands to non-empty
47631
47632  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47633    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47634
47635  # Input might be given as Windows format, start by converting to
47636  # unix format.
47637  path="$POTENTIAL_FREETYPE_LIB_PATH"
47638  new_path=`$CYGPATH -u "$path"`
47639
47640  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47641  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47642  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47643  # "foo.exe" is OK but "foo" is an error.
47644  #
47645  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47646  # It is also a way to make sure we got the proper file name for the real test later on.
47647  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47648  if test "x$test_shortpath" = x; then
47649    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47651    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47652  fi
47653
47654  # Call helper function which possibly converts this using DOS-style short mode.
47655  # If so, the updated path is stored in $new_path.
47656
47657  input_path="$new_path"
47658  # Check if we need to convert this using DOS-style short mode. If the path
47659  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47660  # take no chances and rewrite it.
47661  # Note: m4 eats our [], so we need to use [ and ] instead.
47662  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47663  if test "x$has_forbidden_chars" != x; then
47664    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47665    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47666    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47667    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47668      # Going to short mode and back again did indeed matter. Since short mode is
47669      # case insensitive, let's make it lowercase to improve readability.
47670      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47671      # Now convert it back to Unix-style (cygpath)
47672      input_path=`$CYGPATH -u "$shortmode_path"`
47673      new_path="$input_path"
47674    fi
47675  fi
47676
47677  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47678  if test "x$test_cygdrive_prefix" = x; then
47679    # As a simple fix, exclude /usr/bin since it's not a real path.
47680    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47681      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47682      # a path prefixed by /cygdrive for fixpath to work.
47683      new_path="$CYGWIN_ROOT_PATH$input_path"
47684    fi
47685  fi
47686
47687
47688  if test "x$path" != "x$new_path"; then
47689    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47690    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47691$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47692  fi
47693
47694    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47695
47696  path="$POTENTIAL_FREETYPE_LIB_PATH"
47697  has_colon=`$ECHO $path | $GREP ^.:`
47698  new_path="$path"
47699  if test "x$has_colon" = x; then
47700    # Not in mixed or Windows style, start by that.
47701    new_path=`cmd //c echo $path`
47702  fi
47703
47704
47705  input_path="$new_path"
47706  # Check if we need to convert this using DOS-style short mode. If the path
47707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47708  # take no chances and rewrite it.
47709  # Note: m4 eats our [], so we need to use [ and ] instead.
47710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47711  if test "x$has_forbidden_chars" != x; then
47712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47713    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47714  fi
47715
47716
47717  windows_path="$new_path"
47718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47719    unix_path=`$CYGPATH -u "$windows_path"`
47720    new_path="$unix_path"
47721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47723    new_path="$unix_path"
47724  fi
47725
47726  if test "x$path" != "x$new_path"; then
47727    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47728    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47729$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47730  fi
47731
47732  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47733  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47734
47735    else
47736      # We're on a unix platform. Hooray! :)
47737      path="$POTENTIAL_FREETYPE_LIB_PATH"
47738      has_space=`$ECHO "$path" | $GREP " "`
47739      if test "x$has_space" != x; then
47740        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47741$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47742        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47743      fi
47744
47745      # Use eval to expand a potential ~
47746      eval path="$path"
47747      if test ! -f "$path" && test ! -d "$path"; then
47748        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47749      fi
47750
47751      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47752    fi
47753  fi
47754
47755
47756    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47757    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47758$as_echo_n "checking for freetype includes... " >&6; }
47759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47760$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47761    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47762    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47763$as_echo_n "checking for freetype libraries... " >&6; }
47764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47765$as_echo "$FREETYPE_LIB_PATH" >&6; }
47766  fi
47767
47768              fi
47769            fi
47770          fi
47771        fi
47772      fi # end check in well-known locations
47773
47774      if test "x$FOUND_FREETYPE" != xyes; then
47775
47776  # Print a helpful message on how to acquire the necessary build dependency.
47777  # freetype is the help tag: freetype, cups, pulse, alsa etc
47778  MISSING_DEPENDENCY=freetype
47779
47780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47781    cygwin_help $MISSING_DEPENDENCY
47782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47783    msys_help $MISSING_DEPENDENCY
47784  else
47785    PKGHANDLER_COMMAND=
47786
47787    case $PKGHANDLER in
47788      apt-get)
47789        apt_help     $MISSING_DEPENDENCY ;;
47790      yum)
47791        yum_help     $MISSING_DEPENDENCY ;;
47792      port)
47793        port_help    $MISSING_DEPENDENCY ;;
47794      pkgutil)
47795        pkgutil_help $MISSING_DEPENDENCY ;;
47796      pkgadd)
47797        pkgadd_help  $MISSING_DEPENDENCY ;;
47798    esac
47799
47800    if test "x$PKGHANDLER_COMMAND" != x; then
47801      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47802    fi
47803  fi
47804
47805        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
47806      fi
47807    fi # end user specified settings
47808
47809    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
47810    if test "x$FREETYPE_CFLAGS" = x; then
47811
47812  # Only process if variable expands to non-empty
47813
47814  if test "x$FREETYPE_INCLUDE_PATH" != x; then
47815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47816
47817  # Input might be given as Windows format, start by converting to
47818  # unix format.
47819  path="$FREETYPE_INCLUDE_PATH"
47820  new_path=`$CYGPATH -u "$path"`
47821
47822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47825  # "foo.exe" is OK but "foo" is an error.
47826  #
47827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47828  # It is also a way to make sure we got the proper file name for the real test later on.
47829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47830  if test "x$test_shortpath" = x; then
47831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47832$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47833    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47834  fi
47835
47836  # Call helper function which possibly converts this using DOS-style short mode.
47837  # If so, the updated path is stored in $new_path.
47838
47839  input_path="$new_path"
47840  # Check if we need to convert this using DOS-style short mode. If the path
47841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47842  # take no chances and rewrite it.
47843  # Note: m4 eats our [], so we need to use [ and ] instead.
47844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47845  if test "x$has_forbidden_chars" != x; then
47846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47850      # Going to short mode and back again did indeed matter. Since short mode is
47851      # case insensitive, let's make it lowercase to improve readability.
47852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47853      # Now convert it back to Unix-style (cygpath)
47854      input_path=`$CYGPATH -u "$shortmode_path"`
47855      new_path="$input_path"
47856    fi
47857  fi
47858
47859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47860  if test "x$test_cygdrive_prefix" = x; then
47861    # As a simple fix, exclude /usr/bin since it's not a real path.
47862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47864      # a path prefixed by /cygdrive for fixpath to work.
47865      new_path="$CYGWIN_ROOT_PATH$input_path"
47866    fi
47867  fi
47868
47869
47870  if test "x$path" != "x$new_path"; then
47871    FREETYPE_INCLUDE_PATH="$new_path"
47872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47873$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47874  fi
47875
47876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47877
47878  path="$FREETYPE_INCLUDE_PATH"
47879  has_colon=`$ECHO $path | $GREP ^.:`
47880  new_path="$path"
47881  if test "x$has_colon" = x; then
47882    # Not in mixed or Windows style, start by that.
47883    new_path=`cmd //c echo $path`
47884  fi
47885
47886
47887  input_path="$new_path"
47888  # Check if we need to convert this using DOS-style short mode. If the path
47889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47890  # take no chances and rewrite it.
47891  # Note: m4 eats our [], so we need to use [ and ] instead.
47892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47893  if test "x$has_forbidden_chars" != x; then
47894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47896  fi
47897
47898
47899  windows_path="$new_path"
47900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47901    unix_path=`$CYGPATH -u "$windows_path"`
47902    new_path="$unix_path"
47903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47905    new_path="$unix_path"
47906  fi
47907
47908  if test "x$path" != "x$new_path"; then
47909    FREETYPE_INCLUDE_PATH="$new_path"
47910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47911$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47912  fi
47913
47914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47916
47917    else
47918      # We're on a unix platform. Hooray! :)
47919      path="$FREETYPE_INCLUDE_PATH"
47920      has_space=`$ECHO "$path" | $GREP " "`
47921      if test "x$has_space" != x; then
47922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47923$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47925      fi
47926
47927      # Use eval to expand a potential ~
47928      eval path="$path"
47929      if test ! -f "$path" && test ! -d "$path"; then
47930        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47931      fi
47932
47933      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47934    fi
47935  fi
47936
47937      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47938        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47939      else
47940        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47941      fi
47942    fi
47943
47944    if test "x$FREETYPE_LIBS" = x; then
47945
47946  # Only process if variable expands to non-empty
47947
47948  if test "x$FREETYPE_LIB_PATH" != x; then
47949    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47950
47951  # Input might be given as Windows format, start by converting to
47952  # unix format.
47953  path="$FREETYPE_LIB_PATH"
47954  new_path=`$CYGPATH -u "$path"`
47955
47956  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47957  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47958  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47959  # "foo.exe" is OK but "foo" is an error.
47960  #
47961  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47962  # It is also a way to make sure we got the proper file name for the real test later on.
47963  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47964  if test "x$test_shortpath" = x; then
47965    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47966$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47967    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47968  fi
47969
47970  # Call helper function which possibly converts this using DOS-style short mode.
47971  # If so, the updated path is stored in $new_path.
47972
47973  input_path="$new_path"
47974  # Check if we need to convert this using DOS-style short mode. If the path
47975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47976  # take no chances and rewrite it.
47977  # Note: m4 eats our [], so we need to use [ and ] instead.
47978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47979  if test "x$has_forbidden_chars" != x; then
47980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47981    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47982    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47983    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47984      # Going to short mode and back again did indeed matter. Since short mode is
47985      # case insensitive, let's make it lowercase to improve readability.
47986      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47987      # Now convert it back to Unix-style (cygpath)
47988      input_path=`$CYGPATH -u "$shortmode_path"`
47989      new_path="$input_path"
47990    fi
47991  fi
47992
47993  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47994  if test "x$test_cygdrive_prefix" = x; then
47995    # As a simple fix, exclude /usr/bin since it's not a real path.
47996    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47997      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47998      # a path prefixed by /cygdrive for fixpath to work.
47999      new_path="$CYGWIN_ROOT_PATH$input_path"
48000    fi
48001  fi
48002
48003
48004  if test "x$path" != "x$new_path"; then
48005    FREETYPE_LIB_PATH="$new_path"
48006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48007$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48008  fi
48009
48010    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48011
48012  path="$FREETYPE_LIB_PATH"
48013  has_colon=`$ECHO $path | $GREP ^.:`
48014  new_path="$path"
48015  if test "x$has_colon" = x; then
48016    # Not in mixed or Windows style, start by that.
48017    new_path=`cmd //c echo $path`
48018  fi
48019
48020
48021  input_path="$new_path"
48022  # Check if we need to convert this using DOS-style short mode. If the path
48023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48024  # take no chances and rewrite it.
48025  # Note: m4 eats our [], so we need to use [ and ] instead.
48026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48027  if test "x$has_forbidden_chars" != x; then
48028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48030  fi
48031
48032
48033  windows_path="$new_path"
48034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48035    unix_path=`$CYGPATH -u "$windows_path"`
48036    new_path="$unix_path"
48037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48039    new_path="$unix_path"
48040  fi
48041
48042  if test "x$path" != "x$new_path"; then
48043    FREETYPE_LIB_PATH="$new_path"
48044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48045$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48046  fi
48047
48048  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48049  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48050
48051    else
48052      # We're on a unix platform. Hooray! :)
48053      path="$FREETYPE_LIB_PATH"
48054      has_space=`$ECHO "$path" | $GREP " "`
48055      if test "x$has_space" != x; then
48056        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48057$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48058        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48059      fi
48060
48061      # Use eval to expand a potential ~
48062      eval path="$path"
48063      if test ! -f "$path" && test ! -d "$path"; then
48064        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48065      fi
48066
48067      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48068    fi
48069  fi
48070
48071      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48072        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48073      else
48074        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48075      fi
48076    fi
48077
48078    # Try to compile it
48079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48080$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48081    ac_ext=cpp
48082ac_cpp='$CXXCPP $CPPFLAGS'
48083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48086
48087    PREV_CXXCFLAGS="$CXXFLAGS"
48088    PREV_LIBS="$LIBS"
48089    PREV_CXX="$CXX"
48090    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48091    LIBS="$LIBS $FREETYPE_LIBS"
48092    CXX="$FIXPATH $CXX"
48093    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48094/* end confdefs.h.  */
48095
48096          #include<ft2build.h>
48097          #include FT_FREETYPE_H
48098          int main () {
48099            FT_Init_FreeType(NULL);
48100            return 0;
48101          }
48102
48103_ACEOF
48104if ac_fn_cxx_try_link "$LINENO"; then :
48105
48106          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48107$as_echo "yes" >&6; }
48108
48109else
48110
48111          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48112$as_echo "no" >&6; }
48113          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48114$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48115          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48116$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48117
48118
48119  # Print a helpful message on how to acquire the necessary build dependency.
48120  # freetype is the help tag: freetype, cups, pulse, alsa etc
48121  MISSING_DEPENDENCY=freetype
48122
48123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48124    cygwin_help $MISSING_DEPENDENCY
48125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48126    msys_help $MISSING_DEPENDENCY
48127  else
48128    PKGHANDLER_COMMAND=
48129
48130    case $PKGHANDLER in
48131      apt-get)
48132        apt_help     $MISSING_DEPENDENCY ;;
48133      yum)
48134        yum_help     $MISSING_DEPENDENCY ;;
48135      port)
48136        port_help    $MISSING_DEPENDENCY ;;
48137      pkgutil)
48138        pkgutil_help $MISSING_DEPENDENCY ;;
48139      pkgadd)
48140        pkgadd_help  $MISSING_DEPENDENCY ;;
48141    esac
48142
48143    if test "x$PKGHANDLER_COMMAND" != x; then
48144      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48145    fi
48146  fi
48147
48148
48149          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48150
48151
48152fi
48153rm -f core conftest.err conftest.$ac_objext \
48154    conftest$ac_exeext conftest.$ac_ext
48155    CXXCFLAGS="$PREV_CXXFLAGS"
48156    LIBS="$PREV_LIBS"
48157    CXX="$PREV_CXX"
48158    ac_ext=cpp
48159ac_cpp='$CXXCPP $CPPFLAGS'
48160ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48161ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48162ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48163
48164
48165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48166$as_echo_n "checking if we should bundle freetype... " >&6; }
48167    if test "x$BUNDLE_FREETYPE" = xyes; then
48168      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48169    fi
48170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48171$as_echo "$BUNDLE_FREETYPE" >&6; }
48172
48173  fi # end freetype needed
48174
48175
48176
48177
48178
48179
48180
48181  ###############################################################################
48182  #
48183  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48184  #
48185
48186# Check whether --with-alsa was given.
48187if test "${with_alsa+set}" = set; then :
48188  withval=$with_alsa;
48189fi
48190
48191
48192# Check whether --with-alsa-include was given.
48193if test "${with_alsa_include+set}" = set; then :
48194  withval=$with_alsa_include;
48195fi
48196
48197
48198# Check whether --with-alsa-lib was given.
48199if test "${with_alsa_lib+set}" = set; then :
48200  withval=$with_alsa_lib;
48201fi
48202
48203
48204  if test "x$ALSA_NOT_NEEDED" = xyes; then
48205    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48206      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48207$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48208    fi
48209    ALSA_CFLAGS=
48210    ALSA_LIBS=
48211  else
48212    ALSA_FOUND=no
48213
48214    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48215      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48216    fi
48217
48218    if test "x${with_alsa}" != x; then
48219      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48220      ALSA_CFLAGS="-I${with_alsa}/include"
48221      ALSA_FOUND=yes
48222    fi
48223    if test "x${with_alsa_include}" != x; then
48224      ALSA_CFLAGS="-I${with_alsa_include}"
48225      ALSA_FOUND=yes
48226    fi
48227    if test "x${with_alsa_lib}" != x; then
48228      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48229      ALSA_FOUND=yes
48230    fi
48231    if test "x$ALSA_FOUND" = xno; then
48232
48233
48234  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48235    # Source the builddeps file again, to make sure it uses the latest variables!
48236    . $builddepsfile
48237    # Look for a target and build machine specific resource!
48238    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48239    if test "x$resource" = x; then
48240      # Ok, lets instead look for a target specific resource
48241      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48242    fi
48243    if test "x$resource" = x; then
48244      # Ok, lets instead look for a build specific resource
48245      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48246    fi
48247    if test "x$resource" = x; then
48248      # Ok, lets instead look for a generic resource
48249      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48250      resource=${builddep_alsa}
48251    fi
48252    if test "x$resource" != x; then
48253      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48254$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48255      # If the resource in the builddeps.conf file is an existing directory,
48256      # for example /java/linux/cups
48257      if test -d ${resource}; then
48258        depdir=${resource}
48259      else
48260
48261  # alsa is for example mymodule
48262  # $resource is for example libs/general/libmymod_1_2_3.zip
48263  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48264  # $with_builddeps_dir is for example /localhome/builddeps
48265  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48266  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48267  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48268  filename=`basename $resource`
48269  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48270  filebase=${filename%%.*}
48271  extension=${filename#*.}
48272  installdir=$with_builddeps_dir/$filebase
48273  if test ! -f $installdir/$filename.unpacked; then
48274    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48275$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48276    if test ! -d $installdir; then
48277      mkdir -p $installdir
48278    fi
48279    if test ! -d $installdir; then
48280      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48281    fi
48282    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48283    touch $tmpfile
48284    if test ! -f $tmpfile; then
48285      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48286    fi
48287
48288  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48289  # $tmpfile is the local file name for the downloaded file.
48290  VALID_TOOL=no
48291  if test "x$BDEPS_FTP" = xwget; then
48292    VALID_TOOL=yes
48293    wget -O $tmpfile $with_builddeps_server/$resource
48294  fi
48295  if test "x$BDEPS_FTP" = xlftp; then
48296    VALID_TOOL=yes
48297    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48298  fi
48299  if test "x$BDEPS_FTP" = xftp; then
48300    VALID_TOOL=yes
48301    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48302    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48303    FTPUSERPWD=${FTPSERVER%%@*}
48304    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48305      FTPUSER=${userpwd%%:*}
48306      FTPPWD=${userpwd#*@}
48307      FTPSERVER=${FTPSERVER#*@}
48308    else
48309      FTPUSER=ftp
48310      FTPPWD=ftp
48311    fi
48312    # the "pass" command does not work on some
48313    # ftp clients (read ftp.exe) but if it works,
48314    # passive mode is better!
48315    ( \
48316        echo "user $FTPUSER $FTPPWD"        ; \
48317        echo "pass"                         ; \
48318        echo "bin"                          ; \
48319        echo "get $FTPPATH $tmpfile"              ; \
48320    ) | ftp -in $FTPSERVER
48321  fi
48322  if test "x$VALID_TOOL" != xyes; then
48323    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48324  fi
48325
48326    mv $tmpfile $installdir/$filename
48327    if test ! -s $installdir/$filename; then
48328      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48329    fi
48330    case "$extension" in
48331      zip)  echo "Unzipping $installdir/$filename..."
48332        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48333        ;;
48334      tar.gz) echo "Untaring $installdir/$filename..."
48335        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48336        ;;
48337      tgz) echo "Untaring $installdir/$filename..."
48338        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48339        ;;
48340      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48341        ;;
48342    esac
48343  fi
48344  if test -f $installdir/$filename.unpacked; then
48345    depdir=$installdir
48346  fi
48347
48348      fi
48349      # Source the builddeps file again, because in the previous command, the depdir
48350      # was updated to point at the current build dependency install directory.
48351      . $builddepsfile
48352      # Now extract variables from the builddeps.conf files.
48353      theroot=${builddep_alsa_ROOT}
48354      thecflags=${builddep_alsa_CFLAGS}
48355      thelibs=${builddep_alsa_LIBS}
48356      if test "x$depdir" = x; then
48357        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48358      fi
48359      ALSA=$depdir
48360      if test "x$theroot" != x; then
48361        ALSA="$theroot"
48362      fi
48363      if test "x$thecflags" != x; then
48364        ALSA_CFLAGS="$thecflags"
48365      fi
48366      if test "x$thelibs" != x; then
48367        ALSA_LIBS="$thelibs"
48368      fi
48369      ALSA_FOUND=yes
48370      else ALSA_FOUND=no
48371
48372    fi
48373    else ALSA_FOUND=no
48374
48375  fi
48376
48377    fi
48378    # Do not try pkg-config if we have a sysroot set.
48379    if test "x$SYSROOT" = x; then
48380      if test "x$ALSA_FOUND" = xno; then
48381
48382pkg_failed=no
48383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48384$as_echo_n "checking for ALSA... " >&6; }
48385
48386if test -n "$ALSA_CFLAGS"; then
48387    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48388 elif test -n "$PKG_CONFIG"; then
48389    if test -n "$PKG_CONFIG" && \
48390    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48391  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48392  ac_status=$?
48393  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48394  test $ac_status = 0; }; then
48395  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48396else
48397  pkg_failed=yes
48398fi
48399 else
48400    pkg_failed=untried
48401fi
48402if test -n "$ALSA_LIBS"; then
48403    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48404 elif test -n "$PKG_CONFIG"; then
48405    if test -n "$PKG_CONFIG" && \
48406    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48407  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48408  ac_status=$?
48409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48410  test $ac_status = 0; }; then
48411  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48412else
48413  pkg_failed=yes
48414fi
48415 else
48416    pkg_failed=untried
48417fi
48418
48419
48420
48421if test $pkg_failed = yes; then
48422
48423if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48424        _pkg_short_errors_supported=yes
48425else
48426        _pkg_short_errors_supported=no
48427fi
48428        if test $_pkg_short_errors_supported = yes; then
48429	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48430        else
48431	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48432        fi
48433	# Put the nasty error message in config.log where it belongs
48434	echo "$ALSA_PKG_ERRORS" >&5
48435
48436	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48437$as_echo "no" >&6; }
48438                ALSA_FOUND=no
48439elif test $pkg_failed = untried; then
48440	ALSA_FOUND=no
48441else
48442	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48443	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48445$as_echo "yes" >&6; }
48446	ALSA_FOUND=yes
48447fi
48448      fi
48449    fi
48450    if test "x$ALSA_FOUND" = xno; then
48451      for ac_header in alsa/asoundlib.h
48452do :
48453  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48454if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48455  cat >>confdefs.h <<_ACEOF
48456#define HAVE_ALSA_ASOUNDLIB_H 1
48457_ACEOF
48458
48459            ALSA_FOUND=yes
48460            ALSA_CFLAGS=-Iignoreme
48461            ALSA_LIBS=-lasound
48462            DEFAULT_ALSA=yes
48463
48464else
48465  ALSA_FOUND=no
48466fi
48467
48468done
48469
48470    fi
48471    if test "x$ALSA_FOUND" = xno; then
48472
48473  # Print a helpful message on how to acquire the necessary build dependency.
48474  # alsa is the help tag: freetype, cups, pulse, alsa etc
48475  MISSING_DEPENDENCY=alsa
48476
48477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48478    cygwin_help $MISSING_DEPENDENCY
48479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48480    msys_help $MISSING_DEPENDENCY
48481  else
48482    PKGHANDLER_COMMAND=
48483
48484    case $PKGHANDLER in
48485      apt-get)
48486        apt_help     $MISSING_DEPENDENCY ;;
48487      yum)
48488        yum_help     $MISSING_DEPENDENCY ;;
48489      port)
48490        port_help    $MISSING_DEPENDENCY ;;
48491      pkgutil)
48492        pkgutil_help $MISSING_DEPENDENCY ;;
48493      pkgadd)
48494        pkgadd_help  $MISSING_DEPENDENCY ;;
48495    esac
48496
48497    if test "x$PKGHANDLER_COMMAND" != x; then
48498      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48499    fi
48500  fi
48501
48502      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48503    fi
48504  fi
48505
48506
48507
48508
48509
48510
48511  ###############################################################################
48512  #
48513  # Check for the jpeg library
48514  #
48515
48516
48517# Check whether --with-libjpeg was given.
48518if test "${with_libjpeg+set}" = set; then :
48519  withval=$with_libjpeg;
48520fi
48521
48522
48523  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48524$as_echo_n "checking for which libjpeg to use... " >&6; }
48525
48526  # default is bundled
48527  DEFAULT_LIBJPEG=bundled
48528
48529  #
48530  # if user didn't specify, use DEFAULT_LIBJPEG
48531  #
48532  if test "x${with_libjpeg}" = "x"; then
48533    with_libjpeg=${DEFAULT_LIBJPEG}
48534  fi
48535
48536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48537$as_echo "${with_libjpeg}" >&6; }
48538
48539  if test "x${with_libjpeg}" = "xbundled"; then
48540    USE_EXTERNAL_LIBJPEG=false
48541  elif test "x${with_libjpeg}" = "xsystem"; then
48542    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48543if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48544
48545else
48546   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48547fi
48548
48549
48550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48551$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48552if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48553  $as_echo_n "(cached) " >&6
48554else
48555  ac_check_lib_save_LIBS=$LIBS
48556LIBS="-ljpeg  $LIBS"
48557cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48558/* end confdefs.h.  */
48559
48560/* Override any GCC internal prototype to avoid an error.
48561   Use char because int might match the return type of a GCC
48562   builtin and then its argument prototype would still apply.  */
48563#ifdef __cplusplus
48564extern "C"
48565#endif
48566char jpeg_CreateDecompress ();
48567int
48568main ()
48569{
48570return jpeg_CreateDecompress ();
48571  ;
48572  return 0;
48573}
48574_ACEOF
48575if ac_fn_cxx_try_link "$LINENO"; then :
48576  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48577else
48578  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48579fi
48580rm -f core conftest.err conftest.$ac_objext \
48581    conftest$ac_exeext conftest.$ac_ext
48582LIBS=$ac_check_lib_save_LIBS
48583fi
48584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48585$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48586if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48587  cat >>confdefs.h <<_ACEOF
48588#define HAVE_LIBJPEG 1
48589_ACEOF
48590
48591  LIBS="-ljpeg $LIBS"
48592
48593else
48594   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48595fi
48596
48597
48598    USE_EXTERNAL_LIBJPEG=true
48599  else
48600    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48601  fi
48602
48603
48604
48605  ###############################################################################
48606  #
48607  # Check for the gif library
48608  #
48609
48610
48611# Check whether --with-giflib was given.
48612if test "${with_giflib+set}" = set; then :
48613  withval=$with_giflib;
48614fi
48615
48616
48617
48618  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48619$as_echo_n "checking for which giflib to use... " >&6; }
48620
48621  # default is bundled
48622  DEFAULT_GIFLIB=bundled
48623
48624  #
48625  # if user didn't specify, use DEFAULT_GIFLIB
48626  #
48627  if test "x${with_giflib}" = "x"; then
48628    with_giflib=${DEFAULT_GIFLIB}
48629  fi
48630
48631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48632$as_echo "${with_giflib}" >&6; }
48633
48634  if test "x${with_giflib}" = "xbundled"; then
48635    USE_EXTERNAL_LIBGIF=false
48636  elif test "x${with_giflib}" = "xsystem"; then
48637    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48638if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48639
48640else
48641   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
48642fi
48643
48644
48645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
48646$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
48647if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
48648  $as_echo_n "(cached) " >&6
48649else
48650  ac_check_lib_save_LIBS=$LIBS
48651LIBS="-lgif  $LIBS"
48652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48653/* end confdefs.h.  */
48654
48655/* Override any GCC internal prototype to avoid an error.
48656   Use char because int might match the return type of a GCC
48657   builtin and then its argument prototype would still apply.  */
48658#ifdef __cplusplus
48659extern "C"
48660#endif
48661char DGifGetCode ();
48662int
48663main ()
48664{
48665return DGifGetCode ();
48666  ;
48667  return 0;
48668}
48669_ACEOF
48670if ac_fn_cxx_try_link "$LINENO"; then :
48671  ac_cv_lib_gif_DGifGetCode=yes
48672else
48673  ac_cv_lib_gif_DGifGetCode=no
48674fi
48675rm -f core conftest.err conftest.$ac_objext \
48676    conftest$ac_exeext conftest.$ac_ext
48677LIBS=$ac_check_lib_save_LIBS
48678fi
48679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
48680$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
48681if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
48682  cat >>confdefs.h <<_ACEOF
48683#define HAVE_LIBGIF 1
48684_ACEOF
48685
48686  LIBS="-lgif $LIBS"
48687
48688else
48689   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
48690fi
48691
48692
48693    USE_EXTERNAL_LIBGIF=true
48694  else
48695    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
48696  fi
48697
48698
48699  ###############################################################################
48700  #
48701  # Check for the lcms2 library
48702  #
48703
48704
48705# Check whether --with-lcms was given.
48706if test "${with_lcms+set}" = set; then :
48707  withval=$with_lcms;
48708fi
48709
48710
48711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
48712$as_echo_n "checking for which lcms to use... " >&6; }
48713
48714  DEFAULT_LCMS=bundled
48715
48716  #
48717  # If user didn't specify, use DEFAULT_LCMS
48718  #
48719  if test "x${with_lcms}" = "x"; then
48720      with_lcms=${DEFAULT_LCMS}
48721  fi
48722
48723  if test "x${with_lcms}" = "xbundled"; then
48724    USE_EXTERNAL_LCMS=false
48725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48726$as_echo "bundled" >&6; }
48727  elif test "x${with_lcms}" = "xsystem"; then
48728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48729$as_echo "system" >&6; }
48730
48731pkg_failed=no
48732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
48733$as_echo_n "checking for LCMS... " >&6; }
48734
48735if test -n "$LCMS_CFLAGS"; then
48736    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
48737 elif test -n "$PKG_CONFIG"; then
48738    if test -n "$PKG_CONFIG" && \
48739    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48740  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48741  ac_status=$?
48742  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48743  test $ac_status = 0; }; then
48744  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
48745else
48746  pkg_failed=yes
48747fi
48748 else
48749    pkg_failed=untried
48750fi
48751if test -n "$LCMS_LIBS"; then
48752    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
48753 elif test -n "$PKG_CONFIG"; then
48754    if test -n "$PKG_CONFIG" && \
48755    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
48756  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
48757  ac_status=$?
48758  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48759  test $ac_status = 0; }; then
48760  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
48761else
48762  pkg_failed=yes
48763fi
48764 else
48765    pkg_failed=untried
48766fi
48767
48768
48769
48770if test $pkg_failed = yes; then
48771
48772if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48773        _pkg_short_errors_supported=yes
48774else
48775        _pkg_short_errors_supported=no
48776fi
48777        if test $_pkg_short_errors_supported = yes; then
48778	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
48779        else
48780	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
48781        fi
48782	# Put the nasty error message in config.log where it belongs
48783	echo "$LCMS_PKG_ERRORS" >&5
48784
48785	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48786$as_echo "no" >&6; }
48787                LCMS_FOUND=no
48788elif test $pkg_failed = untried; then
48789	LCMS_FOUND=no
48790else
48791	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
48792	LCMS_LIBS=$pkg_cv_LCMS_LIBS
48793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48794$as_echo "yes" >&6; }
48795	LCMS_FOUND=yes
48796fi
48797    if test "x${LCMS_FOUND}" = "xyes"; then
48798      USE_EXTERNAL_LCMS=true
48799    else
48800      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
48801    fi
48802  else
48803    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
48804  fi
48805
48806
48807
48808  ###############################################################################
48809  #
48810  # Check for the png library
48811  #
48812
48813
48814# Check whether --with-libpng was given.
48815if test "${with_libpng+set}" = set; then :
48816  withval=$with_libpng;
48817fi
48818
48819
48820
48821  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
48822$as_echo_n "checking for which libpng to use... " >&6; }
48823
48824  # default is bundled
48825  DEFAULT_LIBPNG=bundled
48826
48827  #
48828  # if user didn't specify, use DEFAULT_LIBPNG
48829  #
48830  if test "x${with_libpng}" = "x"; then
48831      with_libpng=${DEFAULT_LIBPNG}
48832  fi
48833
48834  if test "x${with_libpng}" = "xbundled"; then
48835      USE_EXTERNAL_LIBPNG=false
48836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48837$as_echo "bundled" >&6; }
48838  elif test "x${with_libpng}" = "xsystem"; then
48839
48840pkg_failed=no
48841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48842$as_echo_n "checking for PNG... " >&6; }
48843
48844if test -n "$PNG_CFLAGS"; then
48845    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48846 elif test -n "$PKG_CONFIG"; then
48847    if test -n "$PKG_CONFIG" && \
48848    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48849  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48850  ac_status=$?
48851  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48852  test $ac_status = 0; }; then
48853  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48854else
48855  pkg_failed=yes
48856fi
48857 else
48858    pkg_failed=untried
48859fi
48860if test -n "$PNG_LIBS"; then
48861    pkg_cv_PNG_LIBS="$PNG_LIBS"
48862 elif test -n "$PKG_CONFIG"; then
48863    if test -n "$PKG_CONFIG" && \
48864    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48865  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48866  ac_status=$?
48867  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48868  test $ac_status = 0; }; then
48869  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48870else
48871  pkg_failed=yes
48872fi
48873 else
48874    pkg_failed=untried
48875fi
48876
48877
48878
48879if test $pkg_failed = yes; then
48880
48881if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48882        _pkg_short_errors_supported=yes
48883else
48884        _pkg_short_errors_supported=no
48885fi
48886        if test $_pkg_short_errors_supported = yes; then
48887	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48888        else
48889	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48890        fi
48891	# Put the nasty error message in config.log where it belongs
48892	echo "$PNG_PKG_ERRORS" >&5
48893
48894	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48895$as_echo "no" >&6; }
48896                 LIBPNG_FOUND=no
48897elif test $pkg_failed = untried; then
48898	 LIBPNG_FOUND=no
48899else
48900	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48901	PNG_LIBS=$pkg_cv_PNG_LIBS
48902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48903$as_echo "yes" >&6; }
48904	 LIBPNG_FOUND=yes
48905fi
48906      if test "x${LIBPNG_FOUND}" = "xyes"; then
48907          USE_EXTERNAL_LIBPNG=true
48908          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48909$as_echo "system" >&6; }
48910      else
48911          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48912$as_echo "system not found" >&6; }
48913          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48914      fi
48915  else
48916      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48917  fi
48918
48919
48920  ###############################################################################
48921  #
48922  # Check for the zlib library
48923  #
48924
48925
48926# Check whether --with-zlib was given.
48927if test "${with_zlib+set}" = set; then :
48928  withval=$with_zlib;
48929fi
48930
48931
48932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48933$as_echo_n "checking for compress in -lz... " >&6; }
48934if ${ac_cv_lib_z_compress+:} false; then :
48935  $as_echo_n "(cached) " >&6
48936else
48937  ac_check_lib_save_LIBS=$LIBS
48938LIBS="-lz  $LIBS"
48939cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48940/* end confdefs.h.  */
48941
48942/* Override any GCC internal prototype to avoid an error.
48943   Use char because int might match the return type of a GCC
48944   builtin and then its argument prototype would still apply.  */
48945#ifdef __cplusplus
48946extern "C"
48947#endif
48948char compress ();
48949int
48950main ()
48951{
48952return compress ();
48953  ;
48954  return 0;
48955}
48956_ACEOF
48957if ac_fn_cxx_try_link "$LINENO"; then :
48958  ac_cv_lib_z_compress=yes
48959else
48960  ac_cv_lib_z_compress=no
48961fi
48962rm -f core conftest.err conftest.$ac_objext \
48963    conftest$ac_exeext conftest.$ac_ext
48964LIBS=$ac_check_lib_save_LIBS
48965fi
48966{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48967$as_echo "$ac_cv_lib_z_compress" >&6; }
48968if test "x$ac_cv_lib_z_compress" = xyes; then :
48969   ZLIB_FOUND=yes
48970else
48971   ZLIB_FOUND=no
48972fi
48973
48974
48975  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48976$as_echo_n "checking for which zlib to use... " >&6; }
48977
48978  DEFAULT_ZLIB=bundled
48979  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48980    #
48981    # On macosx default is system...on others default is
48982    #
48983    DEFAULT_ZLIB=system
48984  fi
48985
48986  if test "x${ZLIB_FOUND}" != "xyes"; then
48987    #
48988    # If we don't find any system...set default to bundled
48989    #
48990    DEFAULT_ZLIB=bundled
48991  fi
48992
48993  #
48994  # If user didn't specify, use DEFAULT_ZLIB
48995  #
48996  if test "x${with_zlib}" = "x"; then
48997    with_zlib=${DEFAULT_ZLIB}
48998  fi
48999
49000  if test "x${with_zlib}" = "xbundled"; then
49001    USE_EXTERNAL_LIBZ=false
49002    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49003$as_echo "bundled" >&6; }
49004  elif test "x${with_zlib}" = "xsystem"; then
49005    if test "x${ZLIB_FOUND}" = "xyes"; then
49006      USE_EXTERNAL_LIBZ=true
49007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49008$as_echo "system" >&6; }
49009    else
49010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49011$as_echo "system not found" >&6; }
49012      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49013    fi
49014  else
49015    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49016  fi
49017
49018
49019
49020  ###############################################################################
49021  LIBZIP_CAN_USE_MMAP=true
49022
49023
49024
49025  ###############################################################################
49026  #
49027  # Check if altzone exists in time.h
49028  #
49029
49030  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49031/* end confdefs.h.  */
49032#include <time.h>
49033int
49034main ()
49035{
49036return (int)altzone;
49037  ;
49038  return 0;
49039}
49040_ACEOF
49041if ac_fn_cxx_try_link "$LINENO"; then :
49042  has_altzone=yes
49043else
49044  has_altzone=no
49045fi
49046rm -f core conftest.err conftest.$ac_objext \
49047    conftest$ac_exeext conftest.$ac_ext
49048  if test "x$has_altzone" = xyes; then
49049
49050$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49051
49052  fi
49053
49054  ###############################################################################
49055  #
49056  # Check the maths library
49057  #
49058
49059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49060$as_echo_n "checking for cos in -lm... " >&6; }
49061if ${ac_cv_lib_m_cos+:} false; then :
49062  $as_echo_n "(cached) " >&6
49063else
49064  ac_check_lib_save_LIBS=$LIBS
49065LIBS="-lm  $LIBS"
49066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49067/* end confdefs.h.  */
49068
49069/* Override any GCC internal prototype to avoid an error.
49070   Use char because int might match the return type of a GCC
49071   builtin and then its argument prototype would still apply.  */
49072#ifdef __cplusplus
49073extern "C"
49074#endif
49075char cos ();
49076int
49077main ()
49078{
49079return cos ();
49080  ;
49081  return 0;
49082}
49083_ACEOF
49084if ac_fn_cxx_try_link "$LINENO"; then :
49085  ac_cv_lib_m_cos=yes
49086else
49087  ac_cv_lib_m_cos=no
49088fi
49089rm -f core conftest.err conftest.$ac_objext \
49090    conftest$ac_exeext conftest.$ac_ext
49091LIBS=$ac_check_lib_save_LIBS
49092fi
49093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49094$as_echo "$ac_cv_lib_m_cos" >&6; }
49095if test "x$ac_cv_lib_m_cos" = xyes; then :
49096  cat >>confdefs.h <<_ACEOF
49097#define HAVE_LIBM 1
49098_ACEOF
49099
49100  LIBS="-lm $LIBS"
49101
49102else
49103
49104        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49105$as_echo "$as_me: Maths library was not found" >&6;}
49106
49107
49108fi
49109
49110
49111
49112  ###############################################################################
49113  #
49114  # Check for libdl.so
49115
49116  save_LIBS="$LIBS"
49117  LIBS=""
49118  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49119$as_echo_n "checking for dlopen in -ldl... " >&6; }
49120if ${ac_cv_lib_dl_dlopen+:} false; then :
49121  $as_echo_n "(cached) " >&6
49122else
49123  ac_check_lib_save_LIBS=$LIBS
49124LIBS="-ldl  $LIBS"
49125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49126/* end confdefs.h.  */
49127
49128/* Override any GCC internal prototype to avoid an error.
49129   Use char because int might match the return type of a GCC
49130   builtin and then its argument prototype would still apply.  */
49131#ifdef __cplusplus
49132extern "C"
49133#endif
49134char dlopen ();
49135int
49136main ()
49137{
49138return dlopen ();
49139  ;
49140  return 0;
49141}
49142_ACEOF
49143if ac_fn_cxx_try_link "$LINENO"; then :
49144  ac_cv_lib_dl_dlopen=yes
49145else
49146  ac_cv_lib_dl_dlopen=no
49147fi
49148rm -f core conftest.err conftest.$ac_objext \
49149    conftest$ac_exeext conftest.$ac_ext
49150LIBS=$ac_check_lib_save_LIBS
49151fi
49152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49153$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49154if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49155  cat >>confdefs.h <<_ACEOF
49156#define HAVE_LIBDL 1
49157_ACEOF
49158
49159  LIBS="-ldl $LIBS"
49160
49161fi
49162
49163  LIBDL="$LIBS"
49164
49165  LIBS="$save_LIBS"
49166
49167
49168  ###############################################################################
49169  #
49170  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49171  # dynamic build is configured on command line.
49172  #
49173
49174# Check whether --with-stdc++lib was given.
49175if test "${with_stdc__lib+set}" = set; then :
49176  withval=$with_stdc__lib;
49177        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49178                && test "x$with_stdc__lib" != xdefault; then
49179          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49180        fi
49181
49182else
49183  with_stdc__lib=default
49184
49185fi
49186
49187
49188  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49189    # Test if -lstdc++ works.
49190    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49191$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49192    ac_ext=cpp
49193ac_cpp='$CXXCPP $CPPFLAGS'
49194ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49195ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49196ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49197
49198    OLD_CXXFLAGS="$CXXFLAGS"
49199    CXXFLAGS="$CXXFLAGS -lstdc++"
49200    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49201/* end confdefs.h.  */
49202
49203int
49204main ()
49205{
49206return 0;
49207  ;
49208  return 0;
49209}
49210_ACEOF
49211if ac_fn_cxx_try_link "$LINENO"; then :
49212  has_dynamic_libstdcxx=yes
49213else
49214  has_dynamic_libstdcxx=no
49215fi
49216rm -f core conftest.err conftest.$ac_objext \
49217    conftest$ac_exeext conftest.$ac_ext
49218    CXXFLAGS="$OLD_CXXFLAGS"
49219    ac_ext=cpp
49220ac_cpp='$CXXCPP $CPPFLAGS'
49221ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49222ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49223ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49224
49225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49226$as_echo "$has_dynamic_libstdcxx" >&6; }
49227
49228    # Test if stdc++ can be linked statically.
49229    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49230$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49231    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49232    ac_ext=cpp
49233ac_cpp='$CXXCPP $CPPFLAGS'
49234ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49235ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49236ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49237
49238    OLD_LIBS="$LIBS"
49239    OLD_CXX="$CXX"
49240    LIBS="$STATIC_STDCXX_FLAGS"
49241    CXX="$CC"
49242    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49243/* end confdefs.h.  */
49244
49245int
49246main ()
49247{
49248return 0;
49249  ;
49250  return 0;
49251}
49252_ACEOF
49253if ac_fn_cxx_try_link "$LINENO"; then :
49254  has_static_libstdcxx=yes
49255else
49256  has_static_libstdcxx=no
49257fi
49258rm -f core conftest.err conftest.$ac_objext \
49259    conftest$ac_exeext conftest.$ac_ext
49260    LIBS="$OLD_LIBS"
49261    CXX="$OLD_CXX"
49262    ac_ext=cpp
49263ac_cpp='$CXXCPP $CPPFLAGS'
49264ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49265ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49266ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49267
49268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49269$as_echo "$has_static_libstdcxx" >&6; }
49270
49271    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49272      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49273    fi
49274
49275    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49276      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49277    fi
49278
49279    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49280      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49281    fi
49282
49283    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49284$as_echo_n "checking how to link with libstdc++... " >&6; }
49285    # If dynamic was requested, it's available since it would fail above otherwise.
49286    # If dynamic wasn't requested, go with static unless it isn't available.
49287    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49288      LIBCXX="$LIBCXX -lstdc++"
49289      LDCXX="$CXX"
49290      STATIC_CXX_SETTING="STATIC_CXX=false"
49291      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49292$as_echo "dynamic" >&6; }
49293    else
49294      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49295      LDCXX="$CC"
49296      STATIC_CXX_SETTING="STATIC_CXX=true"
49297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49298$as_echo "static" >&6; }
49299    fi
49300  fi
49301
49302
49303  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49304    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49305
49306pkg_failed=no
49307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49308$as_echo_n "checking for LIBFFI... " >&6; }
49309
49310if test -n "$LIBFFI_CFLAGS"; then
49311    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49312 elif test -n "$PKG_CONFIG"; then
49313    if test -n "$PKG_CONFIG" && \
49314    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49315  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49316  ac_status=$?
49317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49318  test $ac_status = 0; }; then
49319  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49320else
49321  pkg_failed=yes
49322fi
49323 else
49324    pkg_failed=untried
49325fi
49326if test -n "$LIBFFI_LIBS"; then
49327    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49328 elif test -n "$PKG_CONFIG"; then
49329    if test -n "$PKG_CONFIG" && \
49330    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49331  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49332  ac_status=$?
49333  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49334  test $ac_status = 0; }; then
49335  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49336else
49337  pkg_failed=yes
49338fi
49339 else
49340    pkg_failed=untried
49341fi
49342
49343
49344
49345if test $pkg_failed = yes; then
49346
49347if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49348        _pkg_short_errors_supported=yes
49349else
49350        _pkg_short_errors_supported=no
49351fi
49352        if test $_pkg_short_errors_supported = yes; then
49353	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49354        else
49355	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49356        fi
49357	# Put the nasty error message in config.log where it belongs
49358	echo "$LIBFFI_PKG_ERRORS" >&5
49359
49360	as_fn_error $? "Package requirements (libffi) were not met:
49361
49362$LIBFFI_PKG_ERRORS
49363
49364Consider adjusting the PKG_CONFIG_PATH environment variable if you
49365installed software in a non-standard prefix.
49366
49367Alternatively, you may set the environment variables LIBFFI_CFLAGS
49368and LIBFFI_LIBS to avoid the need to call pkg-config.
49369See the pkg-config man page for more details.
49370" "$LINENO" 5
49371elif test $pkg_failed = untried; then
49372	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49374as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49375is in your PATH or set the PKG_CONFIG environment variable to the full
49376path to pkg-config.
49377
49378Alternatively, you may set the environment variables LIBFFI_CFLAGS
49379and LIBFFI_LIBS to avoid the need to call pkg-config.
49380See the pkg-config man page for more details.
49381
49382To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49383See \`config.log' for more details" "$LINENO" 5; }
49384else
49385	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49386	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49388$as_echo "yes" >&6; }
49389	:
49390fi
49391
49392  fi
49393
49394  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49395    # Extract the first word of "llvm-config", so it can be a program name with args.
49396set dummy llvm-config; ac_word=$2
49397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49398$as_echo_n "checking for $ac_word... " >&6; }
49399if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49400  $as_echo_n "(cached) " >&6
49401else
49402  if test -n "$LLVM_CONFIG"; then
49403  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49404else
49405as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49406for as_dir in $PATH
49407do
49408  IFS=$as_save_IFS
49409  test -z "$as_dir" && as_dir=.
49410    for ac_exec_ext in '' $ac_executable_extensions; do
49411  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49412    ac_cv_prog_LLVM_CONFIG="llvm-config"
49413    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49414    break 2
49415  fi
49416done
49417  done
49418IFS=$as_save_IFS
49419
49420fi
49421fi
49422LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49423if test -n "$LLVM_CONFIG"; then
49424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49425$as_echo "$LLVM_CONFIG" >&6; }
49426else
49427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49428$as_echo "no" >&6; }
49429fi
49430
49431
49432
49433    if test "x$LLVM_CONFIG" != xllvm-config; then
49434      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49435    fi
49436
49437    llvm_components="jit mcjit engine nativecodegen native"
49438    unset LLVM_CFLAGS
49439    for flag in $("$LLVM_CONFIG" --cxxflags); do
49440      if echo "${flag}" | grep -q '^-[ID]'; then
49441        if test "${flag}" != "-D_DEBUG" ; then
49442          if test "${LLVM_CFLAGS}" != "" ; then
49443            LLVM_CFLAGS="${LLVM_CFLAGS} "
49444          fi
49445          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49446        fi
49447      fi
49448    done
49449    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49450    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49451
49452    unset LLVM_LDFLAGS
49453    for flag in $("${LLVM_CONFIG}" --ldflags); do
49454      if echo "${flag}" | grep -q '^-L'; then
49455        if test "${LLVM_LDFLAGS}" != ""; then
49456          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49457        fi
49458        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49459      fi
49460    done
49461
49462    unset LLVM_LIBS
49463    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49464      if echo "${flag}" | grep -q '^-l'; then
49465        if test "${LLVM_LIBS}" != ""; then
49466          LLVM_LIBS="${LLVM_LIBS} "
49467        fi
49468        LLVM_LIBS="${LLVM_LIBS}${flag}"
49469      fi
49470    done
49471
49472
49473
49474
49475  fi
49476
49477  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49478  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49479    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49480  fi
49481
49482  # TODO better (platform agnostic) test
49483  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49484    LIBCXX="-lstdc++"
49485  fi
49486
49487
49488
49489
49490  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49491
49492
49493# Check whether --with-msvcr-dll was given.
49494if test "${with_msvcr_dll+set}" = set; then :
49495  withval=$with_msvcr_dll;
49496fi
49497
49498
49499  if test "x$with_msvcr_dll" != x; then
49500    # If given explicitely by user, do not probe. If not present, fail directly.
49501
49502  DLL_NAME="$MSVCR_NAME"
49503  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49504  METHOD="--with-msvcr-dll"
49505  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49506    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49507$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49508
49509    # Need to check if the found msvcr is correct architecture
49510    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49511$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49512    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49513    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49514      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49515      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49516      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49517        CORRECT_MSVCR_ARCH="PE32 executable"
49518      else
49519        CORRECT_MSVCR_ARCH="PE32+ executable"
49520      fi
49521    else
49522      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49523        CORRECT_MSVCR_ARCH=386
49524      else
49525        CORRECT_MSVCR_ARCH=x86-64
49526      fi
49527    fi
49528    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49529      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49530$as_echo "ok" >&6; }
49531      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49532
49533  # Only process if variable expands to non-empty
49534
49535  if test "x$MSVC_DLL" != x; then
49536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49537
49538  # Input might be given as Windows format, start by converting to
49539  # unix format.
49540  path="$MSVC_DLL"
49541  new_path=`$CYGPATH -u "$path"`
49542
49543  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49544  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49545  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49546  # "foo.exe" is OK but "foo" is an error.
49547  #
49548  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49549  # It is also a way to make sure we got the proper file name for the real test later on.
49550  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49551  if test "x$test_shortpath" = x; then
49552    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49553$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49554    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49555  fi
49556
49557  # Call helper function which possibly converts this using DOS-style short mode.
49558  # If so, the updated path is stored in $new_path.
49559
49560  input_path="$new_path"
49561  # Check if we need to convert this using DOS-style short mode. If the path
49562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49563  # take no chances and rewrite it.
49564  # Note: m4 eats our [], so we need to use [ and ] instead.
49565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49566  if test "x$has_forbidden_chars" != x; then
49567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49568    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49569    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49570    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49571      # Going to short mode and back again did indeed matter. Since short mode is
49572      # case insensitive, let's make it lowercase to improve readability.
49573      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49574      # Now convert it back to Unix-style (cygpath)
49575      input_path=`$CYGPATH -u "$shortmode_path"`
49576      new_path="$input_path"
49577    fi
49578  fi
49579
49580  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49581  if test "x$test_cygdrive_prefix" = x; then
49582    # As a simple fix, exclude /usr/bin since it's not a real path.
49583    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49584      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49585      # a path prefixed by /cygdrive for fixpath to work.
49586      new_path="$CYGWIN_ROOT_PATH$input_path"
49587    fi
49588  fi
49589
49590
49591  if test "x$path" != "x$new_path"; then
49592    MSVC_DLL="$new_path"
49593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49594$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49595  fi
49596
49597    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49598
49599  path="$MSVC_DLL"
49600  has_colon=`$ECHO $path | $GREP ^.:`
49601  new_path="$path"
49602  if test "x$has_colon" = x; then
49603    # Not in mixed or Windows style, start by that.
49604    new_path=`cmd //c echo $path`
49605  fi
49606
49607
49608  input_path="$new_path"
49609  # Check if we need to convert this using DOS-style short mode. If the path
49610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49611  # take no chances and rewrite it.
49612  # Note: m4 eats our [], so we need to use [ and ] instead.
49613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49614  if test "x$has_forbidden_chars" != x; then
49615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49617  fi
49618
49619
49620  windows_path="$new_path"
49621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49622    unix_path=`$CYGPATH -u "$windows_path"`
49623    new_path="$unix_path"
49624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49626    new_path="$unix_path"
49627  fi
49628
49629  if test "x$path" != "x$new_path"; then
49630    MSVC_DLL="$new_path"
49631    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49632$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49633  fi
49634
49635  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49636  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49637
49638    else
49639      # We're on a unix platform. Hooray! :)
49640      path="$MSVC_DLL"
49641      has_space=`$ECHO "$path" | $GREP " "`
49642      if test "x$has_space" != x; then
49643        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49644$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49645        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49646      fi
49647
49648      # Use eval to expand a potential ~
49649      eval path="$path"
49650      if test ! -f "$path" && test ! -d "$path"; then
49651        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49652      fi
49653
49654      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49655    fi
49656  fi
49657
49658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49659$as_echo_n "checking for $DLL_NAME... " >&6; }
49660      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49661$as_echo "$MSVC_DLL" >&6; }
49662    else
49663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49664$as_echo "incorrect, ignoring" >&6; }
49665      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49666$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49667    fi
49668  fi
49669
49670    if test "x$MSVC_DLL" = x; then
49671      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49672    fi
49673    MSVCR_DLL="$MSVC_DLL"
49674  elif test "x$DEVKIT_MSVCR_DLL" != x; then
49675
49676  DLL_NAME="$MSVCR_NAME"
49677  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
49678  METHOD="devkit"
49679  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49681$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49682
49683    # Need to check if the found msvcr is correct architecture
49684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49685$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49686    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49688      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49689      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49690      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49691        CORRECT_MSVCR_ARCH="PE32 executable"
49692      else
49693        CORRECT_MSVCR_ARCH="PE32+ executable"
49694      fi
49695    else
49696      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49697        CORRECT_MSVCR_ARCH=386
49698      else
49699        CORRECT_MSVCR_ARCH=x86-64
49700      fi
49701    fi
49702    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49704$as_echo "ok" >&6; }
49705      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49706
49707  # Only process if variable expands to non-empty
49708
49709  if test "x$MSVC_DLL" != x; then
49710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49711
49712  # Input might be given as Windows format, start by converting to
49713  # unix format.
49714  path="$MSVC_DLL"
49715  new_path=`$CYGPATH -u "$path"`
49716
49717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49720  # "foo.exe" is OK but "foo" is an error.
49721  #
49722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49723  # It is also a way to make sure we got the proper file name for the real test later on.
49724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49725  if test "x$test_shortpath" = x; then
49726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49727$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49728    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49729  fi
49730
49731  # Call helper function which possibly converts this using DOS-style short mode.
49732  # If so, the updated path is stored in $new_path.
49733
49734  input_path="$new_path"
49735  # Check if we need to convert this using DOS-style short mode. If the path
49736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49737  # take no chances and rewrite it.
49738  # Note: m4 eats our [], so we need to use [ and ] instead.
49739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49740  if test "x$has_forbidden_chars" != x; then
49741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49745      # Going to short mode and back again did indeed matter. Since short mode is
49746      # case insensitive, let's make it lowercase to improve readability.
49747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49748      # Now convert it back to Unix-style (cygpath)
49749      input_path=`$CYGPATH -u "$shortmode_path"`
49750      new_path="$input_path"
49751    fi
49752  fi
49753
49754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49755  if test "x$test_cygdrive_prefix" = x; then
49756    # As a simple fix, exclude /usr/bin since it's not a real path.
49757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49759      # a path prefixed by /cygdrive for fixpath to work.
49760      new_path="$CYGWIN_ROOT_PATH$input_path"
49761    fi
49762  fi
49763
49764
49765  if test "x$path" != "x$new_path"; then
49766    MSVC_DLL="$new_path"
49767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49768$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49769  fi
49770
49771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49772
49773  path="$MSVC_DLL"
49774  has_colon=`$ECHO $path | $GREP ^.:`
49775  new_path="$path"
49776  if test "x$has_colon" = x; then
49777    # Not in mixed or Windows style, start by that.
49778    new_path=`cmd //c echo $path`
49779  fi
49780
49781
49782  input_path="$new_path"
49783  # Check if we need to convert this using DOS-style short mode. If the path
49784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49785  # take no chances and rewrite it.
49786  # Note: m4 eats our [], so we need to use [ and ] instead.
49787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49788  if test "x$has_forbidden_chars" != x; then
49789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49791  fi
49792
49793
49794  windows_path="$new_path"
49795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49796    unix_path=`$CYGPATH -u "$windows_path"`
49797    new_path="$unix_path"
49798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49800    new_path="$unix_path"
49801  fi
49802
49803  if test "x$path" != "x$new_path"; then
49804    MSVC_DLL="$new_path"
49805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49806$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49807  fi
49808
49809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49811
49812    else
49813      # We're on a unix platform. Hooray! :)
49814      path="$MSVC_DLL"
49815      has_space=`$ECHO "$path" | $GREP " "`
49816      if test "x$has_space" != x; then
49817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49818$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49820      fi
49821
49822      # Use eval to expand a potential ~
49823      eval path="$path"
49824      if test ! -f "$path" && test ! -d "$path"; then
49825        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49826      fi
49827
49828      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
49829    fi
49830  fi
49831
49832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49833$as_echo_n "checking for $DLL_NAME... " >&6; }
49834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49835$as_echo "$MSVC_DLL" >&6; }
49836    else
49837      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49838$as_echo "incorrect, ignoring" >&6; }
49839      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49840$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49841    fi
49842  fi
49843
49844    if test "x$MSVC_DLL" = x; then
49845      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
49846    fi
49847    MSVCR_DLL="$MSVC_DLL"
49848  else
49849
49850  DLL_NAME="${MSVCR_NAME}"
49851  MSVC_DLL=
49852
49853  if test "x$MSVC_DLL" = x; then
49854    # Probe: Using well-known location from Visual Studio 10.0
49855    if test "x$VCINSTALLDIR" != x; then
49856      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49857
49858  windows_path="$CYGWIN_VC_INSTALL_DIR"
49859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49860    unix_path=`$CYGPATH -u "$windows_path"`
49861    CYGWIN_VC_INSTALL_DIR="$unix_path"
49862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49864    CYGWIN_VC_INSTALL_DIR="$unix_path"
49865  fi
49866
49867      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49868        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49869      else
49870        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49871      fi
49872      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49873
49874  DLL_NAME="$DLL_NAME"
49875  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49876  METHOD="well-known location in VCINSTALLDIR"
49877  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49878    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49879$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49880
49881    # Need to check if the found msvcr is correct architecture
49882    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49883$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49884    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49885    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49886      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49887      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49888      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49889        CORRECT_MSVCR_ARCH="PE32 executable"
49890      else
49891        CORRECT_MSVCR_ARCH="PE32+ executable"
49892      fi
49893    else
49894      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49895        CORRECT_MSVCR_ARCH=386
49896      else
49897        CORRECT_MSVCR_ARCH=x86-64
49898      fi
49899    fi
49900    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49901      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49902$as_echo "ok" >&6; }
49903      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49904
49905  # Only process if variable expands to non-empty
49906
49907  if test "x$MSVC_DLL" != x; then
49908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49909
49910  # Input might be given as Windows format, start by converting to
49911  # unix format.
49912  path="$MSVC_DLL"
49913  new_path=`$CYGPATH -u "$path"`
49914
49915  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49916  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49917  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49918  # "foo.exe" is OK but "foo" is an error.
49919  #
49920  # This test is therefore slightly more accurate than "test -f" to check for file precense.
49921  # It is also a way to make sure we got the proper file name for the real test later on.
49922  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49923  if test "x$test_shortpath" = x; then
49924    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
49925$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
49926    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
49927  fi
49928
49929  # Call helper function which possibly converts this using DOS-style short mode.
49930  # If so, the updated path is stored in $new_path.
49931
49932  input_path="$new_path"
49933  # Check if we need to convert this using DOS-style short mode. If the path
49934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49935  # take no chances and rewrite it.
49936  # Note: m4 eats our [], so we need to use [ and ] instead.
49937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49938  if test "x$has_forbidden_chars" != x; then
49939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49940    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49941    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49942    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49943      # Going to short mode and back again did indeed matter. Since short mode is
49944      # case insensitive, let's make it lowercase to improve readability.
49945      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49946      # Now convert it back to Unix-style (cygpath)
49947      input_path=`$CYGPATH -u "$shortmode_path"`
49948      new_path="$input_path"
49949    fi
49950  fi
49951
49952  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49953  if test "x$test_cygdrive_prefix" = x; then
49954    # As a simple fix, exclude /usr/bin since it's not a real path.
49955    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49956      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49957      # a path prefixed by /cygdrive for fixpath to work.
49958      new_path="$CYGWIN_ROOT_PATH$input_path"
49959    fi
49960  fi
49961
49962
49963  if test "x$path" != "x$new_path"; then
49964    MSVC_DLL="$new_path"
49965    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
49966$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
49967  fi
49968
49969    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49970
49971  path="$MSVC_DLL"
49972  has_colon=`$ECHO $path | $GREP ^.:`
49973  new_path="$path"
49974  if test "x$has_colon" = x; then
49975    # Not in mixed or Windows style, start by that.
49976    new_path=`cmd //c echo $path`
49977  fi
49978
49979
49980  input_path="$new_path"
49981  # Check if we need to convert this using DOS-style short mode. If the path
49982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49983  # take no chances and rewrite it.
49984  # Note: m4 eats our [], so we need to use [ and ] instead.
49985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49986  if test "x$has_forbidden_chars" != x; then
49987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49989  fi
49990
49991
49992  windows_path="$new_path"
49993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49994    unix_path=`$CYGPATH -u "$windows_path"`
49995    new_path="$unix_path"
49996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49998    new_path="$unix_path"
49999  fi
50000
50001  if test "x$path" != "x$new_path"; then
50002    MSVC_DLL="$new_path"
50003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50004$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50005  fi
50006
50007  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50008  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50009
50010    else
50011      # We're on a unix platform. Hooray! :)
50012      path="$MSVC_DLL"
50013      has_space=`$ECHO "$path" | $GREP " "`
50014      if test "x$has_space" != x; then
50015        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50016$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50017        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50018      fi
50019
50020      # Use eval to expand a potential ~
50021      eval path="$path"
50022      if test ! -f "$path" && test ! -d "$path"; then
50023        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50024      fi
50025
50026      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50027    fi
50028  fi
50029
50030      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50031$as_echo_n "checking for $DLL_NAME... " >&6; }
50032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50033$as_echo "$MSVC_DLL" >&6; }
50034    else
50035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50036$as_echo "incorrect, ignoring" >&6; }
50037      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50038$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50039    fi
50040  fi
50041
50042    fi
50043  fi
50044
50045  if test "x$MSVC_DLL" = x; then
50046    # Probe: Check in the Boot JDK directory.
50047    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50048
50049  DLL_NAME="$DLL_NAME"
50050  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50051  METHOD="well-known location in Boot JDK"
50052  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50053    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50054$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50055
50056    # Need to check if the found msvcr is correct architecture
50057    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50058$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50059    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50060    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50061      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50062      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50063      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50064        CORRECT_MSVCR_ARCH="PE32 executable"
50065      else
50066        CORRECT_MSVCR_ARCH="PE32+ executable"
50067      fi
50068    else
50069      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50070        CORRECT_MSVCR_ARCH=386
50071      else
50072        CORRECT_MSVCR_ARCH=x86-64
50073      fi
50074    fi
50075    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50077$as_echo "ok" >&6; }
50078      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50079
50080  # Only process if variable expands to non-empty
50081
50082  if test "x$MSVC_DLL" != x; then
50083    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50084
50085  # Input might be given as Windows format, start by converting to
50086  # unix format.
50087  path="$MSVC_DLL"
50088  new_path=`$CYGPATH -u "$path"`
50089
50090  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50091  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50092  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50093  # "foo.exe" is OK but "foo" is an error.
50094  #
50095  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50096  # It is also a way to make sure we got the proper file name for the real test later on.
50097  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50098  if test "x$test_shortpath" = x; then
50099    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50100$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50101    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50102  fi
50103
50104  # Call helper function which possibly converts this using DOS-style short mode.
50105  # If so, the updated path is stored in $new_path.
50106
50107  input_path="$new_path"
50108  # Check if we need to convert this using DOS-style short mode. If the path
50109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50110  # take no chances and rewrite it.
50111  # Note: m4 eats our [], so we need to use [ and ] instead.
50112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50113  if test "x$has_forbidden_chars" != x; then
50114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50118      # Going to short mode and back again did indeed matter. Since short mode is
50119      # case insensitive, let's make it lowercase to improve readability.
50120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50121      # Now convert it back to Unix-style (cygpath)
50122      input_path=`$CYGPATH -u "$shortmode_path"`
50123      new_path="$input_path"
50124    fi
50125  fi
50126
50127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50128  if test "x$test_cygdrive_prefix" = x; then
50129    # As a simple fix, exclude /usr/bin since it's not a real path.
50130    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50132      # a path prefixed by /cygdrive for fixpath to work.
50133      new_path="$CYGWIN_ROOT_PATH$input_path"
50134    fi
50135  fi
50136
50137
50138  if test "x$path" != "x$new_path"; then
50139    MSVC_DLL="$new_path"
50140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50141$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50142  fi
50143
50144    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50145
50146  path="$MSVC_DLL"
50147  has_colon=`$ECHO $path | $GREP ^.:`
50148  new_path="$path"
50149  if test "x$has_colon" = x; then
50150    # Not in mixed or Windows style, start by that.
50151    new_path=`cmd //c echo $path`
50152  fi
50153
50154
50155  input_path="$new_path"
50156  # Check if we need to convert this using DOS-style short mode. If the path
50157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50158  # take no chances and rewrite it.
50159  # Note: m4 eats our [], so we need to use [ and ] instead.
50160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50161  if test "x$has_forbidden_chars" != x; then
50162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50164  fi
50165
50166
50167  windows_path="$new_path"
50168  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50169    unix_path=`$CYGPATH -u "$windows_path"`
50170    new_path="$unix_path"
50171  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50172    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50173    new_path="$unix_path"
50174  fi
50175
50176  if test "x$path" != "x$new_path"; then
50177    MSVC_DLL="$new_path"
50178    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50179$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50180  fi
50181
50182  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50183  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50184
50185    else
50186      # We're on a unix platform. Hooray! :)
50187      path="$MSVC_DLL"
50188      has_space=`$ECHO "$path" | $GREP " "`
50189      if test "x$has_space" != x; then
50190        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50191$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50192        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50193      fi
50194
50195      # Use eval to expand a potential ~
50196      eval path="$path"
50197      if test ! -f "$path" && test ! -d "$path"; then
50198        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50199      fi
50200
50201      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50202    fi
50203  fi
50204
50205      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50206$as_echo_n "checking for $DLL_NAME... " >&6; }
50207      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50208$as_echo "$MSVC_DLL" >&6; }
50209    else
50210      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50211$as_echo "incorrect, ignoring" >&6; }
50212      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50213$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50214    fi
50215  fi
50216
50217  fi
50218
50219  if test "x$MSVC_DLL" = x; then
50220    # Probe: Look in the Windows system32 directory
50221    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50222
50223  windows_path="$CYGWIN_SYSTEMROOT"
50224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50225    unix_path=`$CYGPATH -u "$windows_path"`
50226    CYGWIN_SYSTEMROOT="$unix_path"
50227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50229    CYGWIN_SYSTEMROOT="$unix_path"
50230  fi
50231
50232    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50233
50234  DLL_NAME="$DLL_NAME"
50235  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50236  METHOD="well-known location in SYSTEMROOT"
50237  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50238    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50239$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50240
50241    # Need to check if the found msvcr is correct architecture
50242    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50243$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50244    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50245    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50246      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50247      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50248      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50249        CORRECT_MSVCR_ARCH="PE32 executable"
50250      else
50251        CORRECT_MSVCR_ARCH="PE32+ executable"
50252      fi
50253    else
50254      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50255        CORRECT_MSVCR_ARCH=386
50256      else
50257        CORRECT_MSVCR_ARCH=x86-64
50258      fi
50259    fi
50260    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50261      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50262$as_echo "ok" >&6; }
50263      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50264
50265  # Only process if variable expands to non-empty
50266
50267  if test "x$MSVC_DLL" != x; then
50268    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50269
50270  # Input might be given as Windows format, start by converting to
50271  # unix format.
50272  path="$MSVC_DLL"
50273  new_path=`$CYGPATH -u "$path"`
50274
50275  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50276  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50277  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50278  # "foo.exe" is OK but "foo" is an error.
50279  #
50280  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50281  # It is also a way to make sure we got the proper file name for the real test later on.
50282  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50283  if test "x$test_shortpath" = x; then
50284    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50285$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50286    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50287  fi
50288
50289  # Call helper function which possibly converts this using DOS-style short mode.
50290  # If so, the updated path is stored in $new_path.
50291
50292  input_path="$new_path"
50293  # Check if we need to convert this using DOS-style short mode. If the path
50294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50295  # take no chances and rewrite it.
50296  # Note: m4 eats our [], so we need to use [ and ] instead.
50297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50298  if test "x$has_forbidden_chars" != x; then
50299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50300    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50301    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50302    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50303      # Going to short mode and back again did indeed matter. Since short mode is
50304      # case insensitive, let's make it lowercase to improve readability.
50305      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50306      # Now convert it back to Unix-style (cygpath)
50307      input_path=`$CYGPATH -u "$shortmode_path"`
50308      new_path="$input_path"
50309    fi
50310  fi
50311
50312  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50313  if test "x$test_cygdrive_prefix" = x; then
50314    # As a simple fix, exclude /usr/bin since it's not a real path.
50315    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50316      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50317      # a path prefixed by /cygdrive for fixpath to work.
50318      new_path="$CYGWIN_ROOT_PATH$input_path"
50319    fi
50320  fi
50321
50322
50323  if test "x$path" != "x$new_path"; then
50324    MSVC_DLL="$new_path"
50325    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50326$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50327  fi
50328
50329    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50330
50331  path="$MSVC_DLL"
50332  has_colon=`$ECHO $path | $GREP ^.:`
50333  new_path="$path"
50334  if test "x$has_colon" = x; then
50335    # Not in mixed or Windows style, start by that.
50336    new_path=`cmd //c echo $path`
50337  fi
50338
50339
50340  input_path="$new_path"
50341  # Check if we need to convert this using DOS-style short mode. If the path
50342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50343  # take no chances and rewrite it.
50344  # Note: m4 eats our [], so we need to use [ and ] instead.
50345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50346  if test "x$has_forbidden_chars" != x; then
50347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50349  fi
50350
50351
50352  windows_path="$new_path"
50353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50354    unix_path=`$CYGPATH -u "$windows_path"`
50355    new_path="$unix_path"
50356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50358    new_path="$unix_path"
50359  fi
50360
50361  if test "x$path" != "x$new_path"; then
50362    MSVC_DLL="$new_path"
50363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50364$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50365  fi
50366
50367  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50368  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50369
50370    else
50371      # We're on a unix platform. Hooray! :)
50372      path="$MSVC_DLL"
50373      has_space=`$ECHO "$path" | $GREP " "`
50374      if test "x$has_space" != x; then
50375        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50376$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50377        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50378      fi
50379
50380      # Use eval to expand a potential ~
50381      eval path="$path"
50382      if test ! -f "$path" && test ! -d "$path"; then
50383        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50384      fi
50385
50386      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50387    fi
50388  fi
50389
50390      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50391$as_echo_n "checking for $DLL_NAME... " >&6; }
50392      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50393$as_echo "$MSVC_DLL" >&6; }
50394    else
50395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50396$as_echo "incorrect, ignoring" >&6; }
50397      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50398$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50399    fi
50400  fi
50401
50402  fi
50403
50404  if test "x$MSVC_DLL" = x; then
50405    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50406    if test "x$VS100COMNTOOLS" != x; then
50407      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50408
50409  windows_path="$CYGWIN_VS_TOOLS_DIR"
50410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50411    unix_path=`$CYGPATH -u "$windows_path"`
50412    CYGWIN_VS_TOOLS_DIR="$unix_path"
50413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50415    CYGWIN_VS_TOOLS_DIR="$unix_path"
50416  fi
50417
50418      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50419        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50420	    | $GREP -i /x64/ | $HEAD --lines 1`
50421      else
50422        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50423	    | $GREP -i /x86/ | $HEAD --lines 1`
50424      fi
50425
50426  DLL_NAME="$DLL_NAME"
50427  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50428  METHOD="search of VS100COMNTOOLS"
50429  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50431$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50432
50433    # Need to check if the found msvcr is correct architecture
50434    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50435$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50436    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50438      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50439      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50440      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50441        CORRECT_MSVCR_ARCH="PE32 executable"
50442      else
50443        CORRECT_MSVCR_ARCH="PE32+ executable"
50444      fi
50445    else
50446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50447        CORRECT_MSVCR_ARCH=386
50448      else
50449        CORRECT_MSVCR_ARCH=x86-64
50450      fi
50451    fi
50452    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50454$as_echo "ok" >&6; }
50455      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50456
50457  # Only process if variable expands to non-empty
50458
50459  if test "x$MSVC_DLL" != x; then
50460    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50461
50462  # Input might be given as Windows format, start by converting to
50463  # unix format.
50464  path="$MSVC_DLL"
50465  new_path=`$CYGPATH -u "$path"`
50466
50467  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50468  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50469  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50470  # "foo.exe" is OK but "foo" is an error.
50471  #
50472  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50473  # It is also a way to make sure we got the proper file name for the real test later on.
50474  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50475  if test "x$test_shortpath" = x; then
50476    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50477$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50478    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50479  fi
50480
50481  # Call helper function which possibly converts this using DOS-style short mode.
50482  # If so, the updated path is stored in $new_path.
50483
50484  input_path="$new_path"
50485  # Check if we need to convert this using DOS-style short mode. If the path
50486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50487  # take no chances and rewrite it.
50488  # Note: m4 eats our [], so we need to use [ and ] instead.
50489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50490  if test "x$has_forbidden_chars" != x; then
50491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50492    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50493    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50494    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50495      # Going to short mode and back again did indeed matter. Since short mode is
50496      # case insensitive, let's make it lowercase to improve readability.
50497      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50498      # Now convert it back to Unix-style (cygpath)
50499      input_path=`$CYGPATH -u "$shortmode_path"`
50500      new_path="$input_path"
50501    fi
50502  fi
50503
50504  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50505  if test "x$test_cygdrive_prefix" = x; then
50506    # As a simple fix, exclude /usr/bin since it's not a real path.
50507    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50508      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50509      # a path prefixed by /cygdrive for fixpath to work.
50510      new_path="$CYGWIN_ROOT_PATH$input_path"
50511    fi
50512  fi
50513
50514
50515  if test "x$path" != "x$new_path"; then
50516    MSVC_DLL="$new_path"
50517    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50518$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50519  fi
50520
50521    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50522
50523  path="$MSVC_DLL"
50524  has_colon=`$ECHO $path | $GREP ^.:`
50525  new_path="$path"
50526  if test "x$has_colon" = x; then
50527    # Not in mixed or Windows style, start by that.
50528    new_path=`cmd //c echo $path`
50529  fi
50530
50531
50532  input_path="$new_path"
50533  # Check if we need to convert this using DOS-style short mode. If the path
50534  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50535  # take no chances and rewrite it.
50536  # Note: m4 eats our [], so we need to use [ and ] instead.
50537  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50538  if test "x$has_forbidden_chars" != x; then
50539    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50540    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50541  fi
50542
50543
50544  windows_path="$new_path"
50545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50546    unix_path=`$CYGPATH -u "$windows_path"`
50547    new_path="$unix_path"
50548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50550    new_path="$unix_path"
50551  fi
50552
50553  if test "x$path" != "x$new_path"; then
50554    MSVC_DLL="$new_path"
50555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50556$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50557  fi
50558
50559  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50560  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50561
50562    else
50563      # We're on a unix platform. Hooray! :)
50564      path="$MSVC_DLL"
50565      has_space=`$ECHO "$path" | $GREP " "`
50566      if test "x$has_space" != x; then
50567        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50568$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50569        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50570      fi
50571
50572      # Use eval to expand a potential ~
50573      eval path="$path"
50574      if test ! -f "$path" && test ! -d "$path"; then
50575        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50576      fi
50577
50578      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50579    fi
50580  fi
50581
50582      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50583$as_echo_n "checking for $DLL_NAME... " >&6; }
50584      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50585$as_echo "$MSVC_DLL" >&6; }
50586    else
50587      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50588$as_echo "incorrect, ignoring" >&6; }
50589      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50590$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50591    fi
50592  fi
50593
50594    fi
50595  fi
50596
50597  if test "x$MSVC_DLL" = x; then
50598    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50599    # (This was the original behaviour; kept since it might turn something up)
50600    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50601      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50602        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50603	    | $GREP x64 | $HEAD --lines 1`
50604      else
50605        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50606	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50607        if test "x$POSSIBLE_MSVC_DLL" = x; then
50608          # We're grasping at straws now...
50609          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50610	      | $HEAD --lines 1`
50611        fi
50612      fi
50613
50614
50615  DLL_NAME="$DLL_NAME"
50616  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50617  METHOD="search of VCINSTALLDIR"
50618  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50619    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50620$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50621
50622    # Need to check if the found msvcr is correct architecture
50623    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50624$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50625    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50626    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50627      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50628      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50629      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50630        CORRECT_MSVCR_ARCH="PE32 executable"
50631      else
50632        CORRECT_MSVCR_ARCH="PE32+ executable"
50633      fi
50634    else
50635      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50636        CORRECT_MSVCR_ARCH=386
50637      else
50638        CORRECT_MSVCR_ARCH=x86-64
50639      fi
50640    fi
50641    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50642      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50643$as_echo "ok" >&6; }
50644      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50645
50646  # Only process if variable expands to non-empty
50647
50648  if test "x$MSVC_DLL" != x; then
50649    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50650
50651  # Input might be given as Windows format, start by converting to
50652  # unix format.
50653  path="$MSVC_DLL"
50654  new_path=`$CYGPATH -u "$path"`
50655
50656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50659  # "foo.exe" is OK but "foo" is an error.
50660  #
50661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50662  # It is also a way to make sure we got the proper file name for the real test later on.
50663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50664  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50668  fi
50669
50670  # Call helper function which possibly converts this using DOS-style short mode.
50671  # If so, the updated path is stored in $new_path.
50672
50673  input_path="$new_path"
50674  # Check if we need to convert this using DOS-style short mode. If the path
50675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50676  # take no chances and rewrite it.
50677  # Note: m4 eats our [], so we need to use [ and ] instead.
50678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50679  if test "x$has_forbidden_chars" != x; then
50680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50684      # Going to short mode and back again did indeed matter. Since short mode is
50685      # case insensitive, let's make it lowercase to improve readability.
50686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50687      # Now convert it back to Unix-style (cygpath)
50688      input_path=`$CYGPATH -u "$shortmode_path"`
50689      new_path="$input_path"
50690    fi
50691  fi
50692
50693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50694  if test "x$test_cygdrive_prefix" = x; then
50695    # As a simple fix, exclude /usr/bin since it's not a real path.
50696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50698      # a path prefixed by /cygdrive for fixpath to work.
50699      new_path="$CYGWIN_ROOT_PATH$input_path"
50700    fi
50701  fi
50702
50703
50704  if test "x$path" != "x$new_path"; then
50705    MSVC_DLL="$new_path"
50706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50707$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50708  fi
50709
50710    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50711
50712  path="$MSVC_DLL"
50713  has_colon=`$ECHO $path | $GREP ^.:`
50714  new_path="$path"
50715  if test "x$has_colon" = x; then
50716    # Not in mixed or Windows style, start by that.
50717    new_path=`cmd //c echo $path`
50718  fi
50719
50720
50721  input_path="$new_path"
50722  # Check if we need to convert this using DOS-style short mode. If the path
50723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50724  # take no chances and rewrite it.
50725  # Note: m4 eats our [], so we need to use [ and ] instead.
50726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50727  if test "x$has_forbidden_chars" != x; then
50728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50730  fi
50731
50732
50733  windows_path="$new_path"
50734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50735    unix_path=`$CYGPATH -u "$windows_path"`
50736    new_path="$unix_path"
50737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50739    new_path="$unix_path"
50740  fi
50741
50742  if test "x$path" != "x$new_path"; then
50743    MSVC_DLL="$new_path"
50744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50745$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50746  fi
50747
50748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50750
50751    else
50752      # We're on a unix platform. Hooray! :)
50753      path="$MSVC_DLL"
50754      has_space=`$ECHO "$path" | $GREP " "`
50755      if test "x$has_space" != x; then
50756        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50757$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50758        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50759      fi
50760
50761      # Use eval to expand a potential ~
50762      eval path="$path"
50763      if test ! -f "$path" && test ! -d "$path"; then
50764        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50765      fi
50766
50767      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50768    fi
50769  fi
50770
50771      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50772$as_echo_n "checking for $DLL_NAME... " >&6; }
50773      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50774$as_echo "$MSVC_DLL" >&6; }
50775    else
50776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50777$as_echo "incorrect, ignoring" >&6; }
50778      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50779$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50780    fi
50781  fi
50782
50783    fi
50784  fi
50785
50786  if test "x$MSVC_DLL" = x; then
50787    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50788$as_echo_n "checking for $DLL_NAME... " >&6; }
50789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50790$as_echo "no" >&6; }
50791    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50792  fi
50793
50794    MSVCR_DLL="$MSVC_DLL"
50795  fi
50796
50797
50798
50799# Check whether --with-msvcp-dll was given.
50800if test "${with_msvcp_dll+set}" = set; then :
50801  withval=$with_msvcp_dll;
50802fi
50803
50804
50805  if test "x$MSVCP_NAME" != "x"; then
50806    if test "x$with_msvcp_dll" != x; then
50807      # If given explicitely by user, do not probe. If not present, fail directly.
50808
50809  DLL_NAME="$MSVCP_NAME"
50810  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50811  METHOD="--with-msvcp-dll"
50812  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50813    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50814$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50815
50816    # Need to check if the found msvcr is correct architecture
50817    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50818$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50819    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50821      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50822      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50823      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50824        CORRECT_MSVCR_ARCH="PE32 executable"
50825      else
50826        CORRECT_MSVCR_ARCH="PE32+ executable"
50827      fi
50828    else
50829      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50830        CORRECT_MSVCR_ARCH=386
50831      else
50832        CORRECT_MSVCR_ARCH=x86-64
50833      fi
50834    fi
50835    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50836      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50837$as_echo "ok" >&6; }
50838      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50839
50840  # Only process if variable expands to non-empty
50841
50842  if test "x$MSVC_DLL" != x; then
50843    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50844
50845  # Input might be given as Windows format, start by converting to
50846  # unix format.
50847  path="$MSVC_DLL"
50848  new_path=`$CYGPATH -u "$path"`
50849
50850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50853  # "foo.exe" is OK but "foo" is an error.
50854  #
50855  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50856  # It is also a way to make sure we got the proper file name for the real test later on.
50857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50858  if test "x$test_shortpath" = x; then
50859    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50860$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50861    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
50862  fi
50863
50864  # Call helper function which possibly converts this using DOS-style short mode.
50865  # If so, the updated path is stored in $new_path.
50866
50867  input_path="$new_path"
50868  # Check if we need to convert this using DOS-style short mode. If the path
50869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50870  # take no chances and rewrite it.
50871  # Note: m4 eats our [], so we need to use [ and ] instead.
50872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50873  if test "x$has_forbidden_chars" != x; then
50874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50875    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50876    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50877    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50878      # Going to short mode and back again did indeed matter. Since short mode is
50879      # case insensitive, let's make it lowercase to improve readability.
50880      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50881      # Now convert it back to Unix-style (cygpath)
50882      input_path=`$CYGPATH -u "$shortmode_path"`
50883      new_path="$input_path"
50884    fi
50885  fi
50886
50887  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50888  if test "x$test_cygdrive_prefix" = x; then
50889    # As a simple fix, exclude /usr/bin since it's not a real path.
50890    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50891      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50892      # a path prefixed by /cygdrive for fixpath to work.
50893      new_path="$CYGWIN_ROOT_PATH$input_path"
50894    fi
50895  fi
50896
50897
50898  if test "x$path" != "x$new_path"; then
50899    MSVC_DLL="$new_path"
50900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50901$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50902  fi
50903
50904    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50905
50906  path="$MSVC_DLL"
50907  has_colon=`$ECHO $path | $GREP ^.:`
50908  new_path="$path"
50909  if test "x$has_colon" = x; then
50910    # Not in mixed or Windows style, start by that.
50911    new_path=`cmd //c echo $path`
50912  fi
50913
50914
50915  input_path="$new_path"
50916  # Check if we need to convert this using DOS-style short mode. If the path
50917  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50918  # take no chances and rewrite it.
50919  # Note: m4 eats our [], so we need to use [ and ] instead.
50920  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50921  if test "x$has_forbidden_chars" != x; then
50922    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50923    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50924  fi
50925
50926
50927  windows_path="$new_path"
50928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50929    unix_path=`$CYGPATH -u "$windows_path"`
50930    new_path="$unix_path"
50931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50933    new_path="$unix_path"
50934  fi
50935
50936  if test "x$path" != "x$new_path"; then
50937    MSVC_DLL="$new_path"
50938    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
50939$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
50940  fi
50941
50942  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50943  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50944
50945    else
50946      # We're on a unix platform. Hooray! :)
50947      path="$MSVC_DLL"
50948      has_space=`$ECHO "$path" | $GREP " "`
50949      if test "x$has_space" != x; then
50950        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
50951$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
50952        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50953      fi
50954
50955      # Use eval to expand a potential ~
50956      eval path="$path"
50957      if test ! -f "$path" && test ! -d "$path"; then
50958        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50959      fi
50960
50961      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
50962    fi
50963  fi
50964
50965      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50966$as_echo_n "checking for $DLL_NAME... " >&6; }
50967      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50968$as_echo "$MSVC_DLL" >&6; }
50969    else
50970      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50971$as_echo "incorrect, ignoring" >&6; }
50972      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50973$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50974    fi
50975  fi
50976
50977      if test "x$MSVC_DLL" = x; then
50978        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50979      fi
50980      MSVCP_DLL="$MSVC_DLL"
50981    elif test "x$DEVKIT_MSVCP_DLL" != x; then
50982
50983  DLL_NAME="$MSVCP_NAME"
50984  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
50985  METHOD="devkit"
50986  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50988$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50989
50990    # Need to check if the found msvcr is correct architecture
50991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50992$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50993    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50995      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50996      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50997      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50998        CORRECT_MSVCR_ARCH="PE32 executable"
50999      else
51000        CORRECT_MSVCR_ARCH="PE32+ executable"
51001      fi
51002    else
51003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51004        CORRECT_MSVCR_ARCH=386
51005      else
51006        CORRECT_MSVCR_ARCH=x86-64
51007      fi
51008    fi
51009    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51011$as_echo "ok" >&6; }
51012      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51013
51014  # Only process if variable expands to non-empty
51015
51016  if test "x$MSVC_DLL" != x; then
51017    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51018
51019  # Input might be given as Windows format, start by converting to
51020  # unix format.
51021  path="$MSVC_DLL"
51022  new_path=`$CYGPATH -u "$path"`
51023
51024  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51025  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51026  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51027  # "foo.exe" is OK but "foo" is an error.
51028  #
51029  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51030  # It is also a way to make sure we got the proper file name for the real test later on.
51031  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51032  if test "x$test_shortpath" = x; then
51033    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51034$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51035    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51036  fi
51037
51038  # Call helper function which possibly converts this using DOS-style short mode.
51039  # If so, the updated path is stored in $new_path.
51040
51041  input_path="$new_path"
51042  # Check if we need to convert this using DOS-style short mode. If the path
51043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51044  # take no chances and rewrite it.
51045  # Note: m4 eats our [], so we need to use [ and ] instead.
51046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51047  if test "x$has_forbidden_chars" != x; then
51048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51049    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51050    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51051    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51052      # Going to short mode and back again did indeed matter. Since short mode is
51053      # case insensitive, let's make it lowercase to improve readability.
51054      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51055      # Now convert it back to Unix-style (cygpath)
51056      input_path=`$CYGPATH -u "$shortmode_path"`
51057      new_path="$input_path"
51058    fi
51059  fi
51060
51061  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51062  if test "x$test_cygdrive_prefix" = x; then
51063    # As a simple fix, exclude /usr/bin since it's not a real path.
51064    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51065      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51066      # a path prefixed by /cygdrive for fixpath to work.
51067      new_path="$CYGWIN_ROOT_PATH$input_path"
51068    fi
51069  fi
51070
51071
51072  if test "x$path" != "x$new_path"; then
51073    MSVC_DLL="$new_path"
51074    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51075$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51076  fi
51077
51078    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51079
51080  path="$MSVC_DLL"
51081  has_colon=`$ECHO $path | $GREP ^.:`
51082  new_path="$path"
51083  if test "x$has_colon" = x; then
51084    # Not in mixed or Windows style, start by that.
51085    new_path=`cmd //c echo $path`
51086  fi
51087
51088
51089  input_path="$new_path"
51090  # Check if we need to convert this using DOS-style short mode. If the path
51091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51092  # take no chances and rewrite it.
51093  # Note: m4 eats our [], so we need to use [ and ] instead.
51094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51095  if test "x$has_forbidden_chars" != x; then
51096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51097    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51098  fi
51099
51100
51101  windows_path="$new_path"
51102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51103    unix_path=`$CYGPATH -u "$windows_path"`
51104    new_path="$unix_path"
51105  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51106    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51107    new_path="$unix_path"
51108  fi
51109
51110  if test "x$path" != "x$new_path"; then
51111    MSVC_DLL="$new_path"
51112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51113$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51114  fi
51115
51116  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51117  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51118
51119    else
51120      # We're on a unix platform. Hooray! :)
51121      path="$MSVC_DLL"
51122      has_space=`$ECHO "$path" | $GREP " "`
51123      if test "x$has_space" != x; then
51124        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51125$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51126        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51127      fi
51128
51129      # Use eval to expand a potential ~
51130      eval path="$path"
51131      if test ! -f "$path" && test ! -d "$path"; then
51132        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51133      fi
51134
51135      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51136    fi
51137  fi
51138
51139      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51140$as_echo_n "checking for $DLL_NAME... " >&6; }
51141      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51142$as_echo "$MSVC_DLL" >&6; }
51143    else
51144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51145$as_echo "incorrect, ignoring" >&6; }
51146      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51147$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51148    fi
51149  fi
51150
51151      if test "x$MSVC_DLL" = x; then
51152        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
51153      fi
51154      MSVCP_DLL="$MSVC_DLL"
51155    else
51156
51157  DLL_NAME="${MSVCP_NAME}"
51158  MSVC_DLL=
51159
51160  if test "x$MSVC_DLL" = x; then
51161    # Probe: Using well-known location from Visual Studio 10.0
51162    if test "x$VCINSTALLDIR" != x; then
51163      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
51164
51165  windows_path="$CYGWIN_VC_INSTALL_DIR"
51166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51167    unix_path=`$CYGPATH -u "$windows_path"`
51168    CYGWIN_VC_INSTALL_DIR="$unix_path"
51169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51171    CYGWIN_VC_INSTALL_DIR="$unix_path"
51172  fi
51173
51174      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51175        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51176      else
51177        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
51178      fi
51179      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
51180
51181  DLL_NAME="$DLL_NAME"
51182  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51183  METHOD="well-known location in VCINSTALLDIR"
51184  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51185    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51186$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51187
51188    # Need to check if the found msvcr is correct architecture
51189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51190$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51191    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51192    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51193      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51194      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51195      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51196        CORRECT_MSVCR_ARCH="PE32 executable"
51197      else
51198        CORRECT_MSVCR_ARCH="PE32+ executable"
51199      fi
51200    else
51201      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51202        CORRECT_MSVCR_ARCH=386
51203      else
51204        CORRECT_MSVCR_ARCH=x86-64
51205      fi
51206    fi
51207    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51208      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51209$as_echo "ok" >&6; }
51210      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51211
51212  # Only process if variable expands to non-empty
51213
51214  if test "x$MSVC_DLL" != x; then
51215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51216
51217  # Input might be given as Windows format, start by converting to
51218  # unix format.
51219  path="$MSVC_DLL"
51220  new_path=`$CYGPATH -u "$path"`
51221
51222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51225  # "foo.exe" is OK but "foo" is an error.
51226  #
51227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51228  # It is also a way to make sure we got the proper file name for the real test later on.
51229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51230  if test "x$test_shortpath" = x; then
51231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51232$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51233    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51234  fi
51235
51236  # Call helper function which possibly converts this using DOS-style short mode.
51237  # If so, the updated path is stored in $new_path.
51238
51239  input_path="$new_path"
51240  # Check if we need to convert this using DOS-style short mode. If the path
51241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51242  # take no chances and rewrite it.
51243  # Note: m4 eats our [], so we need to use [ and ] instead.
51244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51245  if test "x$has_forbidden_chars" != x; then
51246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51250      # Going to short mode and back again did indeed matter. Since short mode is
51251      # case insensitive, let's make it lowercase to improve readability.
51252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51253      # Now convert it back to Unix-style (cygpath)
51254      input_path=`$CYGPATH -u "$shortmode_path"`
51255      new_path="$input_path"
51256    fi
51257  fi
51258
51259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51260  if test "x$test_cygdrive_prefix" = x; then
51261    # As a simple fix, exclude /usr/bin since it's not a real path.
51262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51264      # a path prefixed by /cygdrive for fixpath to work.
51265      new_path="$CYGWIN_ROOT_PATH$input_path"
51266    fi
51267  fi
51268
51269
51270  if test "x$path" != "x$new_path"; then
51271    MSVC_DLL="$new_path"
51272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51273$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51274  fi
51275
51276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51277
51278  path="$MSVC_DLL"
51279  has_colon=`$ECHO $path | $GREP ^.:`
51280  new_path="$path"
51281  if test "x$has_colon" = x; then
51282    # Not in mixed or Windows style, start by that.
51283    new_path=`cmd //c echo $path`
51284  fi
51285
51286
51287  input_path="$new_path"
51288  # Check if we need to convert this using DOS-style short mode. If the path
51289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51290  # take no chances and rewrite it.
51291  # Note: m4 eats our [], so we need to use [ and ] instead.
51292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51293  if test "x$has_forbidden_chars" != x; then
51294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51296  fi
51297
51298
51299  windows_path="$new_path"
51300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51301    unix_path=`$CYGPATH -u "$windows_path"`
51302    new_path="$unix_path"
51303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51305    new_path="$unix_path"
51306  fi
51307
51308  if test "x$path" != "x$new_path"; then
51309    MSVC_DLL="$new_path"
51310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51311$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51312  fi
51313
51314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51316
51317    else
51318      # We're on a unix platform. Hooray! :)
51319      path="$MSVC_DLL"
51320      has_space=`$ECHO "$path" | $GREP " "`
51321      if test "x$has_space" != x; then
51322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51323$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51325      fi
51326
51327      # Use eval to expand a potential ~
51328      eval path="$path"
51329      if test ! -f "$path" && test ! -d "$path"; then
51330        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51331      fi
51332
51333      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51334    fi
51335  fi
51336
51337      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51338$as_echo_n "checking for $DLL_NAME... " >&6; }
51339      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51340$as_echo "$MSVC_DLL" >&6; }
51341    else
51342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51343$as_echo "incorrect, ignoring" >&6; }
51344      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51345$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51346    fi
51347  fi
51348
51349    fi
51350  fi
51351
51352  if test "x$MSVC_DLL" = x; then
51353    # Probe: Check in the Boot JDK directory.
51354    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
51355
51356  DLL_NAME="$DLL_NAME"
51357  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51358  METHOD="well-known location in Boot JDK"
51359  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51360    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51361$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51362
51363    # Need to check if the found msvcr is correct architecture
51364    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51365$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51366    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51368      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51369      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51370      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51371        CORRECT_MSVCR_ARCH="PE32 executable"
51372      else
51373        CORRECT_MSVCR_ARCH="PE32+ executable"
51374      fi
51375    else
51376      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51377        CORRECT_MSVCR_ARCH=386
51378      else
51379        CORRECT_MSVCR_ARCH=x86-64
51380      fi
51381    fi
51382    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51384$as_echo "ok" >&6; }
51385      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51386
51387  # Only process if variable expands to non-empty
51388
51389  if test "x$MSVC_DLL" != x; then
51390    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51391
51392  # Input might be given as Windows format, start by converting to
51393  # unix format.
51394  path="$MSVC_DLL"
51395  new_path=`$CYGPATH -u "$path"`
51396
51397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51400  # "foo.exe" is OK but "foo" is an error.
51401  #
51402  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51403  # It is also a way to make sure we got the proper file name for the real test later on.
51404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51405  if test "x$test_shortpath" = x; then
51406    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51407$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51408    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51409  fi
51410
51411  # Call helper function which possibly converts this using DOS-style short mode.
51412  # If so, the updated path is stored in $new_path.
51413
51414  input_path="$new_path"
51415  # Check if we need to convert this using DOS-style short mode. If the path
51416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51417  # take no chances and rewrite it.
51418  # Note: m4 eats our [], so we need to use [ and ] instead.
51419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51420  if test "x$has_forbidden_chars" != x; then
51421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51425      # Going to short mode and back again did indeed matter. Since short mode is
51426      # case insensitive, let's make it lowercase to improve readability.
51427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51428      # Now convert it back to Unix-style (cygpath)
51429      input_path=`$CYGPATH -u "$shortmode_path"`
51430      new_path="$input_path"
51431    fi
51432  fi
51433
51434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51435  if test "x$test_cygdrive_prefix" = x; then
51436    # As a simple fix, exclude /usr/bin since it's not a real path.
51437    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51439      # a path prefixed by /cygdrive for fixpath to work.
51440      new_path="$CYGWIN_ROOT_PATH$input_path"
51441    fi
51442  fi
51443
51444
51445  if test "x$path" != "x$new_path"; then
51446    MSVC_DLL="$new_path"
51447    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51448$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51449  fi
51450
51451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51452
51453  path="$MSVC_DLL"
51454  has_colon=`$ECHO $path | $GREP ^.:`
51455  new_path="$path"
51456  if test "x$has_colon" = x; then
51457    # Not in mixed or Windows style, start by that.
51458    new_path=`cmd //c echo $path`
51459  fi
51460
51461
51462  input_path="$new_path"
51463  # Check if we need to convert this using DOS-style short mode. If the path
51464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51465  # take no chances and rewrite it.
51466  # Note: m4 eats our [], so we need to use [ and ] instead.
51467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51468  if test "x$has_forbidden_chars" != x; then
51469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51471  fi
51472
51473
51474  windows_path="$new_path"
51475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51476    unix_path=`$CYGPATH -u "$windows_path"`
51477    new_path="$unix_path"
51478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51480    new_path="$unix_path"
51481  fi
51482
51483  if test "x$path" != "x$new_path"; then
51484    MSVC_DLL="$new_path"
51485    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51486$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51487  fi
51488
51489  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51490  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51491
51492    else
51493      # We're on a unix platform. Hooray! :)
51494      path="$MSVC_DLL"
51495      has_space=`$ECHO "$path" | $GREP " "`
51496      if test "x$has_space" != x; then
51497        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51498$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51499        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51500      fi
51501
51502      # Use eval to expand a potential ~
51503      eval path="$path"
51504      if test ! -f "$path" && test ! -d "$path"; then
51505        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51506      fi
51507
51508      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51509    fi
51510  fi
51511
51512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51513$as_echo_n "checking for $DLL_NAME... " >&6; }
51514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51515$as_echo "$MSVC_DLL" >&6; }
51516    else
51517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51518$as_echo "incorrect, ignoring" >&6; }
51519      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51520$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51521    fi
51522  fi
51523
51524  fi
51525
51526  if test "x$MSVC_DLL" = x; then
51527    # Probe: Look in the Windows system32 directory
51528    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
51529
51530  windows_path="$CYGWIN_SYSTEMROOT"
51531  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51532    unix_path=`$CYGPATH -u "$windows_path"`
51533    CYGWIN_SYSTEMROOT="$unix_path"
51534  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51535    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51536    CYGWIN_SYSTEMROOT="$unix_path"
51537  fi
51538
51539    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
51540
51541  DLL_NAME="$DLL_NAME"
51542  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51543  METHOD="well-known location in SYSTEMROOT"
51544  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51545    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51546$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51547
51548    # Need to check if the found msvcr is correct architecture
51549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51550$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51551    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51553      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51554      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51555      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51556        CORRECT_MSVCR_ARCH="PE32 executable"
51557      else
51558        CORRECT_MSVCR_ARCH="PE32+ executable"
51559      fi
51560    else
51561      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51562        CORRECT_MSVCR_ARCH=386
51563      else
51564        CORRECT_MSVCR_ARCH=x86-64
51565      fi
51566    fi
51567    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51569$as_echo "ok" >&6; }
51570      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51571
51572  # Only process if variable expands to non-empty
51573
51574  if test "x$MSVC_DLL" != x; then
51575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51576
51577  # Input might be given as Windows format, start by converting to
51578  # unix format.
51579  path="$MSVC_DLL"
51580  new_path=`$CYGPATH -u "$path"`
51581
51582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51585  # "foo.exe" is OK but "foo" is an error.
51586  #
51587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51588  # It is also a way to make sure we got the proper file name for the real test later on.
51589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51590  if test "x$test_shortpath" = x; then
51591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51592$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51593    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51594  fi
51595
51596  # Call helper function which possibly converts this using DOS-style short mode.
51597  # If so, the updated path is stored in $new_path.
51598
51599  input_path="$new_path"
51600  # Check if we need to convert this using DOS-style short mode. If the path
51601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51602  # take no chances and rewrite it.
51603  # Note: m4 eats our [], so we need to use [ and ] instead.
51604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51605  if test "x$has_forbidden_chars" != x; then
51606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51610      # Going to short mode and back again did indeed matter. Since short mode is
51611      # case insensitive, let's make it lowercase to improve readability.
51612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51613      # Now convert it back to Unix-style (cygpath)
51614      input_path=`$CYGPATH -u "$shortmode_path"`
51615      new_path="$input_path"
51616    fi
51617  fi
51618
51619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51620  if test "x$test_cygdrive_prefix" = x; then
51621    # As a simple fix, exclude /usr/bin since it's not a real path.
51622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51624      # a path prefixed by /cygdrive for fixpath to work.
51625      new_path="$CYGWIN_ROOT_PATH$input_path"
51626    fi
51627  fi
51628
51629
51630  if test "x$path" != "x$new_path"; then
51631    MSVC_DLL="$new_path"
51632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51633$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51634  fi
51635
51636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51637
51638  path="$MSVC_DLL"
51639  has_colon=`$ECHO $path | $GREP ^.:`
51640  new_path="$path"
51641  if test "x$has_colon" = x; then
51642    # Not in mixed or Windows style, start by that.
51643    new_path=`cmd //c echo $path`
51644  fi
51645
51646
51647  input_path="$new_path"
51648  # Check if we need to convert this using DOS-style short mode. If the path
51649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51650  # take no chances and rewrite it.
51651  # Note: m4 eats our [], so we need to use [ and ] instead.
51652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51653  if test "x$has_forbidden_chars" != x; then
51654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51656  fi
51657
51658
51659  windows_path="$new_path"
51660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51661    unix_path=`$CYGPATH -u "$windows_path"`
51662    new_path="$unix_path"
51663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51665    new_path="$unix_path"
51666  fi
51667
51668  if test "x$path" != "x$new_path"; then
51669    MSVC_DLL="$new_path"
51670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51671$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51672  fi
51673
51674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51676
51677    else
51678      # We're on a unix platform. Hooray! :)
51679      path="$MSVC_DLL"
51680      has_space=`$ECHO "$path" | $GREP " "`
51681      if test "x$has_space" != x; then
51682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51683$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51685      fi
51686
51687      # Use eval to expand a potential ~
51688      eval path="$path"
51689      if test ! -f "$path" && test ! -d "$path"; then
51690        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51691      fi
51692
51693      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51694    fi
51695  fi
51696
51697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51698$as_echo_n "checking for $DLL_NAME... " >&6; }
51699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51700$as_echo "$MSVC_DLL" >&6; }
51701    else
51702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51703$as_echo "incorrect, ignoring" >&6; }
51704      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51705$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51706    fi
51707  fi
51708
51709  fi
51710
51711  if test "x$MSVC_DLL" = x; then
51712    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
51713    if test "x$VS100COMNTOOLS" != x; then
51714      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
51715
51716  windows_path="$CYGWIN_VS_TOOLS_DIR"
51717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51718    unix_path=`$CYGPATH -u "$windows_path"`
51719    CYGWIN_VS_TOOLS_DIR="$unix_path"
51720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51722    CYGWIN_VS_TOOLS_DIR="$unix_path"
51723  fi
51724
51725      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51726        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51727	    | $GREP -i /x64/ | $HEAD --lines 1`
51728      else
51729        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
51730	    | $GREP -i /x86/ | $HEAD --lines 1`
51731      fi
51732
51733  DLL_NAME="$DLL_NAME"
51734  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51735  METHOD="search of VS100COMNTOOLS"
51736  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51737    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51738$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51739
51740    # Need to check if the found msvcr is correct architecture
51741    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51742$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51743    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51745      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51746      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51747      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51748        CORRECT_MSVCR_ARCH="PE32 executable"
51749      else
51750        CORRECT_MSVCR_ARCH="PE32+ executable"
51751      fi
51752    else
51753      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51754        CORRECT_MSVCR_ARCH=386
51755      else
51756        CORRECT_MSVCR_ARCH=x86-64
51757      fi
51758    fi
51759    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51760      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51761$as_echo "ok" >&6; }
51762      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51763
51764  # Only process if variable expands to non-empty
51765
51766  if test "x$MSVC_DLL" != x; then
51767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51768
51769  # Input might be given as Windows format, start by converting to
51770  # unix format.
51771  path="$MSVC_DLL"
51772  new_path=`$CYGPATH -u "$path"`
51773
51774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51777  # "foo.exe" is OK but "foo" is an error.
51778  #
51779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51780  # It is also a way to make sure we got the proper file name for the real test later on.
51781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51782  if test "x$test_shortpath" = x; then
51783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51784$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51785    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51786  fi
51787
51788  # Call helper function which possibly converts this using DOS-style short mode.
51789  # If so, the updated path is stored in $new_path.
51790
51791  input_path="$new_path"
51792  # Check if we need to convert this using DOS-style short mode. If the path
51793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51794  # take no chances and rewrite it.
51795  # Note: m4 eats our [], so we need to use [ and ] instead.
51796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51797  if test "x$has_forbidden_chars" != x; then
51798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51802      # Going to short mode and back again did indeed matter. Since short mode is
51803      # case insensitive, let's make it lowercase to improve readability.
51804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51805      # Now convert it back to Unix-style (cygpath)
51806      input_path=`$CYGPATH -u "$shortmode_path"`
51807      new_path="$input_path"
51808    fi
51809  fi
51810
51811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
51812  if test "x$test_cygdrive_prefix" = x; then
51813    # As a simple fix, exclude /usr/bin since it's not a real path.
51814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
51815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
51816      # a path prefixed by /cygdrive for fixpath to work.
51817      new_path="$CYGWIN_ROOT_PATH$input_path"
51818    fi
51819  fi
51820
51821
51822  if test "x$path" != "x$new_path"; then
51823    MSVC_DLL="$new_path"
51824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51825$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51826  fi
51827
51828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51829
51830  path="$MSVC_DLL"
51831  has_colon=`$ECHO $path | $GREP ^.:`
51832  new_path="$path"
51833  if test "x$has_colon" = x; then
51834    # Not in mixed or Windows style, start by that.
51835    new_path=`cmd //c echo $path`
51836  fi
51837
51838
51839  input_path="$new_path"
51840  # Check if we need to convert this using DOS-style short mode. If the path
51841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51842  # take no chances and rewrite it.
51843  # Note: m4 eats our [], so we need to use [ and ] instead.
51844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
51845  if test "x$has_forbidden_chars" != x; then
51846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51848  fi
51849
51850
51851  windows_path="$new_path"
51852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51853    unix_path=`$CYGPATH -u "$windows_path"`
51854    new_path="$unix_path"
51855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
51857    new_path="$unix_path"
51858  fi
51859
51860  if test "x$path" != "x$new_path"; then
51861    MSVC_DLL="$new_path"
51862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
51863$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
51864  fi
51865
51866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
51867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
51868
51869    else
51870      # We're on a unix platform. Hooray! :)
51871      path="$MSVC_DLL"
51872      has_space=`$ECHO "$path" | $GREP " "`
51873      if test "x$has_space" != x; then
51874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
51875$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
51876        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
51877      fi
51878
51879      # Use eval to expand a potential ~
51880      eval path="$path"
51881      if test ! -f "$path" && test ! -d "$path"; then
51882        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
51883      fi
51884
51885      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
51886    fi
51887  fi
51888
51889      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
51890$as_echo_n "checking for $DLL_NAME... " >&6; }
51891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
51892$as_echo "$MSVC_DLL" >&6; }
51893    else
51894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
51895$as_echo "incorrect, ignoring" >&6; }
51896      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
51897$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
51898    fi
51899  fi
51900
51901    fi
51902  fi
51903
51904  if test "x$MSVC_DLL" = x; then
51905    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
51906    # (This was the original behaviour; kept since it might turn something up)
51907    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
51908      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51909        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51910	    | $GREP x64 | $HEAD --lines 1`
51911      else
51912        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51913	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
51914        if test "x$POSSIBLE_MSVC_DLL" = x; then
51915          # We're grasping at straws now...
51916          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
51917	      | $HEAD --lines 1`
51918        fi
51919      fi
51920
51921
51922  DLL_NAME="$DLL_NAME"
51923  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
51924  METHOD="search of VCINSTALLDIR"
51925  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
51926    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
51927$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
51928
51929    # Need to check if the found msvcr is correct architecture
51930    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
51931$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
51932    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
51933    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51934      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
51935      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
51936      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51937        CORRECT_MSVCR_ARCH="PE32 executable"
51938      else
51939        CORRECT_MSVCR_ARCH="PE32+ executable"
51940      fi
51941    else
51942      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
51943        CORRECT_MSVCR_ARCH=386
51944      else
51945        CORRECT_MSVCR_ARCH=x86-64
51946      fi
51947    fi
51948    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
51949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
51950$as_echo "ok" >&6; }
51951      MSVC_DLL="$POSSIBLE_MSVC_DLL"
51952
51953  # Only process if variable expands to non-empty
51954
51955  if test "x$MSVC_DLL" != x; then
51956    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51957
51958  # Input might be given as Windows format, start by converting to
51959  # unix format.
51960  path="$MSVC_DLL"
51961  new_path=`$CYGPATH -u "$path"`
51962
51963  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
51964  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
51965  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
51966  # "foo.exe" is OK but "foo" is an error.
51967  #
51968  # This test is therefore slightly more accurate than "test -f" to check for file precense.
51969  # It is also a way to make sure we got the proper file name for the real test later on.
51970  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
51971  if test "x$test_shortpath" = 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 $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
51975  fi
51976
51977  # Call helper function which possibly converts this using DOS-style short mode.
51978  # If so, the updated path is stored in $new_path.
51979
51980  input_path="$new_path"
51981  # Check if we need to convert this using DOS-style short mode. If the path
51982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
51983  # take no chances and rewrite it.
51984  # Note: m4 eats our [], so we need to use [ and ] instead.
51985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
51986  if test "x$has_forbidden_chars" != x; then
51987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
51988    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
51989    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
51990    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
51991      # Going to short mode and back again did indeed matter. Since short mode is
51992      # case insensitive, let's make it lowercase to improve readability.
51993      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
51994      # Now convert it back to Unix-style (cygpath)
51995      input_path=`$CYGPATH -u "$shortmode_path"`
51996      new_path="$input_path"
51997    fi
51998  fi
51999
52000  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
52001  if test "x$test_cygdrive_prefix" = x; then
52002    # As a simple fix, exclude /usr/bin since it's not a real path.
52003    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
52004      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
52005      # a path prefixed by /cygdrive for fixpath to work.
52006      new_path="$CYGWIN_ROOT_PATH$input_path"
52007    fi
52008  fi
52009
52010
52011  if test "x$path" != "x$new_path"; then
52012    MSVC_DLL="$new_path"
52013    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52014$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52015  fi
52016
52017    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52018
52019  path="$MSVC_DLL"
52020  has_colon=`$ECHO $path | $GREP ^.:`
52021  new_path="$path"
52022  if test "x$has_colon" = x; then
52023    # Not in mixed or Windows style, start by that.
52024    new_path=`cmd //c echo $path`
52025  fi
52026
52027
52028  input_path="$new_path"
52029  # Check if we need to convert this using DOS-style short mode. If the path
52030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
52031  # take no chances and rewrite it.
52032  # Note: m4 eats our [], so we need to use [ and ] instead.
52033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
52034  if test "x$has_forbidden_chars" != x; then
52035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
52036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
52037  fi
52038
52039
52040  windows_path="$new_path"
52041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52042    unix_path=`$CYGPATH -u "$windows_path"`
52043    new_path="$unix_path"
52044  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52045    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
52046    new_path="$unix_path"
52047  fi
52048
52049  if test "x$path" != "x$new_path"; then
52050    MSVC_DLL="$new_path"
52051    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
52052$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
52053  fi
52054
52055  # Save the first 10 bytes of this path to the storage, so fixpath can work.
52056  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
52057
52058    else
52059      # We're on a unix platform. Hooray! :)
52060      path="$MSVC_DLL"
52061      has_space=`$ECHO "$path" | $GREP " "`
52062      if test "x$has_space" != x; then
52063        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
52064$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
52065        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
52066      fi
52067
52068      # Use eval to expand a potential ~
52069      eval path="$path"
52070      if test ! -f "$path" && test ! -d "$path"; then
52071        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
52072      fi
52073
52074      MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
52075    fi
52076  fi
52077
52078      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52079$as_echo_n "checking for $DLL_NAME... " >&6; }
52080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
52081$as_echo "$MSVC_DLL" >&6; }
52082    else
52083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
52084$as_echo "incorrect, ignoring" >&6; }
52085      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
52086$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
52087    fi
52088  fi
52089
52090    fi
52091  fi
52092
52093  if test "x$MSVC_DLL" = x; then
52094    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
52095$as_echo_n "checking for $DLL_NAME... " >&6; }
52096    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52097$as_echo "no" >&6; }
52098    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
52099  fi
52100
52101      MSVCP_DLL="$MSVC_DLL"
52102    fi
52103
52104  fi
52105
52106
52107
52108# Check whether --with-dxsdk was given.
52109if test "${with_dxsdk+set}" = set; then :
52110  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
52111$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
52112fi
52113
52114
52115
52116
52117# Check whether --with-dxsdk-lib was given.
52118if test "${with_dxsdk_lib+set}" = set; then :
52119  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
52120$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
52121fi
52122
52123
52124
52125
52126# Check whether --with-dxsdk-include was given.
52127if test "${with_dxsdk_include+set}" = set; then :
52128  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
52129$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
52130fi
52131
52132
52133  fi
52134
52135
52136###############################################################################
52137#
52138# We need to do some final tweaking, when everything else is done.
52139#
52140###############################################################################
52141
52142
52143  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
52144
52145
52146  # The name of the Service Agent jar.
52147  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
52148  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
52149    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
52150  fi
52151
52152
52153
52154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
52155$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
52156
52157    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
52158      ENABLE_INTREE_EC=yes
52159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52160$as_echo "yes" >&6; }
52161    else
52162      ENABLE_INTREE_EC=no
52163      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52164$as_echo "no" >&6; }
52165    fi
52166
52167
52168
52169
52170###############################################################################
52171#
52172# Configure parts of the build that only affect the build performance,
52173# not the result.
52174#
52175###############################################################################
52176
52177
52178  # How many cores do we have on this build system?
52179
52180# Check whether --with-num-cores was given.
52181if test "${with_num_cores+set}" = set; then :
52182  withval=$with_num_cores;
52183fi
52184
52185  if test "x$with_num_cores" = x; then
52186    # The number of cores were not specified, try to probe them.
52187
52188  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
52189$as_echo_n "checking for number of cores... " >&6; }
52190  NUM_CORES=1
52191  FOUND_CORES=no
52192
52193  if test -f /proc/cpuinfo; then
52194    # Looks like a Linux (or cygwin) system
52195    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
52196    FOUND_CORES=yes
52197  elif test -x /usr/sbin/psrinfo; then
52198    # Looks like a Solaris system
52199    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
52200    FOUND_CORES=yes
52201  elif test -x /usr/sbin/system_profiler; then
52202    # Looks like a MacOSX system
52203    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
52204    FOUND_CORES=yes
52205  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
52206    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
52207    FOUND_CORES=yes
52208  elif test -n "$NUMBER_OF_PROCESSORS"; then
52209    # On windows, look in the env
52210    NUM_CORES=$NUMBER_OF_PROCESSORS
52211    FOUND_CORES=yes
52212  fi
52213
52214  if test "x$FOUND_CORES" = xyes; then
52215    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
52216$as_echo "$NUM_CORES" >&6; }
52217  else
52218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
52219$as_echo "could not detect number of cores, defaulting to 1" >&6; }
52220    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
52221$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
52222  fi
52223
52224  else
52225    NUM_CORES=$with_num_cores
52226  fi
52227
52228
52229
52230  # How much memory do we have on this build system?
52231
52232# Check whether --with-memory-size was given.
52233if test "${with_memory_size+set}" = set; then :
52234  withval=$with_memory_size;
52235fi
52236
52237  if test "x$with_memory_size" = x; then
52238    # The memory size was not specified, try to probe it.
52239
52240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
52241$as_echo_n "checking for memory size... " >&6; }
52242  # Default to 1024 MB
52243  MEMORY_SIZE=1024
52244  FOUND_MEM=no
52245
52246  if test -f /proc/meminfo; then
52247    # Looks like a Linux (or cygwin) system
52248    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
52249    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
52250    FOUND_MEM=yes
52251  elif test -x /usr/sbin/prtconf; then
52252    # Looks like a Solaris or AIX system
52253    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
52254    FOUND_MEM=yes
52255  elif test -x /usr/sbin/system_profiler; then
52256    # Looks like a MacOSX system
52257    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
52258    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
52259    FOUND_MEM=yes
52260  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52261    # Windows, but without cygwin
52262    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
52263    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
52264    FOUND_MEM=yes
52265  fi
52266
52267  if test "x$FOUND_MEM" = xyes; then
52268    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
52269$as_echo "$MEMORY_SIZE MB" >&6; }
52270  else
52271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
52272$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
52273    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
52274$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
52275  fi
52276
52277  else
52278    MEMORY_SIZE=$with_memory_size
52279  fi
52280
52281
52282
52283  # Provide a decent default number of parallel jobs for make depending on
52284  # number of cores, amount of memory and machine architecture.
52285
52286# Check whether --with-jobs was given.
52287if test "${with_jobs+set}" = set; then :
52288  withval=$with_jobs;
52289fi
52290
52291  if test "x$with_jobs" = x; then
52292    # Number of jobs was not specified, calculate.
52293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
52294$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
52295    # Approximate memory in GB.
52296    memory_gb=`expr $MEMORY_SIZE / 1024`
52297    # Pick the lowest of memory in gb and number of cores.
52298    if test "$memory_gb" -lt "$NUM_CORES"; then
52299      JOBS="$memory_gb"
52300    else
52301      JOBS="$NUM_CORES"
52302      # On bigger machines, leave some room for other processes to run
52303      if test "$JOBS" -gt "4"; then
52304        JOBS=`expr $JOBS '*' 90 / 100`
52305      fi
52306    fi
52307    # Cap number of jobs to 16
52308    if test "$JOBS" -gt "16"; then
52309      JOBS=16
52310    fi
52311    if test "$JOBS" -eq "0"; then
52312      JOBS=1
52313    fi
52314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
52315$as_echo "$JOBS" >&6; }
52316  else
52317    JOBS=$with_jobs
52318  fi
52319
52320
52321
52322# Setup arguments for the boot jdk (after cores and memory have been setup)
52323
52324  ##############################################################################
52325  #
52326  # Specify jvm options for anything that is run with the Boot JDK.
52327  # Not all JVM:s accept the same arguments on the command line.
52328  #
52329
52330# Check whether --with-boot-jdk-jvmargs was given.
52331if test "${with_boot_jdk_jvmargs+set}" = set; then :
52332  withval=$with_boot_jdk_jvmargs;
52333fi
52334
52335
52336  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
52337$as_echo_n "checking flags for boot jdk java command ... " >&6; }
52338
52339  # Disable special log output when a debug build is used as Boot JDK...
52340
52341  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
52342  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
52343  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
52344  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52345  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52346  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52347    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
52348    JVM_ARG_OK=true
52349  else
52350    $ECHO "Arg failed:" >&5
52351    $ECHO "$OUTPUT" >&5
52352    JVM_ARG_OK=false
52353  fi
52354
52355
52356  # Apply user provided options.
52357
52358  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
52359  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
52360  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
52361  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52362  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52363  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52364    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
52365    JVM_ARG_OK=true
52366  else
52367    $ECHO "Arg failed:" >&5
52368    $ECHO "$OUTPUT" >&5
52369    JVM_ARG_OK=false
52370  fi
52371
52372
52373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
52374$as_echo "$boot_jdk_jvmargs" >&6; }
52375
52376  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
52377  JAVA_FLAGS=$boot_jdk_jvmargs
52378
52379
52380
52381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
52382$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
52383
52384  # Starting amount of heap memory.
52385
52386  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
52387  $ECHO "Command: $JAVA -Xms64M -version" >&5
52388  OUTPUT=`$JAVA -Xms64M -version 2>&1`
52389  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52390  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52391  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52392    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
52393    JVM_ARG_OK=true
52394  else
52395    $ECHO "Arg failed:" >&5
52396    $ECHO "$OUTPUT" >&5
52397    JVM_ARG_OK=false
52398  fi
52399
52400
52401  # Maximum amount of heap memory.
52402  # Maximum stack size.
52403  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
52404  if test "x$BUILD_NUM_BITS" = x32; then
52405    if test "$JVM_MAX_HEAP" -gt "1100"; then
52406      JVM_MAX_HEAP=1100
52407    elif test "$JVM_MAX_HEAP" -lt "512"; then
52408      JVM_MAX_HEAP=512
52409    fi
52410    STACK_SIZE=768
52411  else
52412    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
52413    # pointers are used. Apparently, we need to increase the heap and stack
52414    # space for the jvm. More specifically, when running javac to build huge
52415    # jdk batch
52416    if test "$JVM_MAX_HEAP" -gt "1600"; then
52417      JVM_MAX_HEAP=1600
52418    elif test "$JVM_MAX_HEAP" -lt "512"; then
52419      JVM_MAX_HEAP=512
52420    fi
52421    STACK_SIZE=1536
52422  fi
52423
52424  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
52425  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
52426  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
52427  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52428  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52429  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52430    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
52431    JVM_ARG_OK=true
52432  else
52433    $ECHO "Arg failed:" >&5
52434    $ECHO "$OUTPUT" >&5
52435    JVM_ARG_OK=false
52436  fi
52437
52438
52439  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
52440  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
52441  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
52442  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52443  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52444  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52445    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
52446    JVM_ARG_OK=true
52447  else
52448    $ECHO "Arg failed:" >&5
52449    $ECHO "$OUTPUT" >&5
52450    JVM_ARG_OK=false
52451  fi
52452
52453
52454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
52455$as_echo "$boot_jdk_jvmargs_big" >&6; }
52456
52457  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
52458
52459
52460
52461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
52462$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
52463
52464  # Use serial gc for small short lived tools if possible
52465
52466  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
52467  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
52468  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
52469  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52470  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52471  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52472    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
52473    JVM_ARG_OK=true
52474  else
52475    $ECHO "Arg failed:" >&5
52476    $ECHO "$OUTPUT" >&5
52477    JVM_ARG_OK=false
52478  fi
52479
52480
52481  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
52482  $ECHO "Command: $JAVA -Xms32M -version" >&5
52483  OUTPUT=`$JAVA -Xms32M -version 2>&1`
52484  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52485  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52486  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52487    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
52488    JVM_ARG_OK=true
52489  else
52490    $ECHO "Arg failed:" >&5
52491    $ECHO "$OUTPUT" >&5
52492    JVM_ARG_OK=false
52493  fi
52494
52495
52496  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
52497  $ECHO "Command: $JAVA -Xmx512M -version" >&5
52498  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
52499  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52500  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52501  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52502    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
52503    JVM_ARG_OK=true
52504  else
52505    $ECHO "Arg failed:" >&5
52506    $ECHO "$OUTPUT" >&5
52507    JVM_ARG_OK=false
52508  fi
52509
52510
52511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
52512$as_echo "$boot_jdk_jvmargs_small" >&6; }
52513
52514  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
52515
52516
52517  JAVA_TOOL_FLAGS_SMALL=""
52518  for f in $JAVA_FLAGS_SMALL; do
52519    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
52520  done
52521
52522
52523
52524# Setup smart javac (after cores and memory have been setup)
52525
52526
52527# Check whether --with-sjavac-server-java was given.
52528if test "${with_sjavac_server_java+set}" = set; then :
52529  withval=$with_sjavac_server_java;
52530fi
52531
52532
52533  if test "x$with_sjavac_server_java" != x; then
52534    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
52535    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
52536    if test "x$FOUND_VERSION" = x; then
52537      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
52538    fi
52539  else
52540    SJAVAC_SERVER_JAVA="$JAVA"
52541  fi
52542
52543
52544  if test "$MEMORY_SIZE" -gt "3000"; then
52545
52546  $ECHO "Check if jvm arg is ok: -d64" >&5
52547  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
52548  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
52549  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52550  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52551  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52552    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
52553    JVM_ARG_OK=true
52554  else
52555    $ECHO "Arg failed:" >&5
52556    $ECHO "$OUTPUT" >&5
52557    JVM_ARG_OK=false
52558  fi
52559
52560    if test "$JVM_ARG_OK" = true; then
52561      JVM_64BIT=true
52562      JVM_ARG_OK=false
52563    fi
52564  fi
52565
52566  MX_VALUE=`expr $MEMORY_SIZE / 2`
52567  if test "$JVM_64BIT" = true; then
52568    # Set ms lower than mx since more than one instance of the server might
52569    # get launched at the same time before they figure out which instance won.
52570    MS_VALUE=512
52571    if test "$MX_VALUE" -gt "2048"; then
52572      MX_VALUE=2048
52573    fi
52574  else
52575    MS_VALUE=256
52576    if test "$MX_VALUE" -gt "1500"; then
52577      MX_VALUE=1500
52578    fi
52579  fi
52580  if test "$MX_VALUE" -lt "512"; then
52581    MX_VALUE=512
52582  fi
52583
52584  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
52585  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
52586  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
52587  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
52588  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
52589  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
52590    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
52591    JVM_ARG_OK=true
52592  else
52593    $ECHO "Arg failed:" >&5
52594    $ECHO "$OUTPUT" >&5
52595    JVM_ARG_OK=false
52596  fi
52597
52598
52599
52600  # Check whether --enable-sjavac was given.
52601if test "${enable_sjavac+set}" = set; then :
52602  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
52603else
52604  ENABLE_SJAVAC='no'
52605fi
52606
52607  if test "x$JVM_ARG_OK" = "xfalse"; then
52608    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
52609$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
52610    ENABLE_SJAVAC=no;
52611  fi
52612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
52613$as_echo_n "checking whether to use sjavac... " >&6; }
52614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
52615$as_echo "$ENABLE_SJAVAC" >&6; }
52616
52617
52618
52619# Can the C/C++ compiler use precompiled headers?
52620
52621
52622  ###############################################################################
52623  #
52624  # Can the C/C++ compiler use precompiled headers?
52625  #
52626  # Check whether --enable-precompiled-headers was given.
52627if test "${enable_precompiled_headers+set}" = set; then :
52628  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
52629else
52630  ENABLE_PRECOMPH=yes
52631fi
52632
52633
52634  USE_PRECOMPILED_HEADER=1
52635  if test "x$ENABLE_PRECOMPH" = xno; then
52636    USE_PRECOMPILED_HEADER=0
52637  fi
52638
52639  if test "x$ENABLE_PRECOMPH" = xyes; then
52640    # Check that the compiler actually supports precomp headers.
52641    if test "x$TOOLCHAIN_TYPE" = xgcc; then
52642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
52643$as_echo_n "checking that precompiled headers work... " >&6; }
52644      echo "int alfa();" > conftest.h
52645      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
52646      if test ! -f conftest.hpp.gch; then
52647        USE_PRECOMPILED_HEADER=0
52648        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52649$as_echo "no" >&6; }
52650      else
52651        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52652$as_echo "yes" >&6; }
52653      fi
52654      rm -f conftest.h conftest.hpp.gch
52655    fi
52656  fi
52657
52658
52659
52660
52661# Setup use of ccache, if available
52662
52663  # Check whether --enable-ccache was given.
52664if test "${enable_ccache+set}" = set; then :
52665  enableval=$enable_ccache;
52666fi
52667
52668
52669  CCACHE=
52670  CCACHE_STATUS=
52671  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
52672$as_echo_n "checking is ccache enabled... " >&6; }
52673  if test "x$enable_ccache" = xyes; then
52674    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
52675      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52676$as_echo "yes" >&6; }
52677      OLD_PATH="$PATH"
52678      if test "x$TOOLCHAIN_PATH" != x; then
52679        PATH=$TOOLCHAIN_PATH:$PATH
52680      fi
52681
52682
52683
52684  # Publish this variable in the help.
52685
52686
52687  if test "x$CCACHE" = x; then
52688    # The variable is not set by user, try to locate tool using the code snippet
52689    for ac_prog in ccache
52690do
52691  # Extract the first word of "$ac_prog", so it can be a program name with args.
52692set dummy $ac_prog; ac_word=$2
52693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52694$as_echo_n "checking for $ac_word... " >&6; }
52695if ${ac_cv_path_CCACHE+:} false; then :
52696  $as_echo_n "(cached) " >&6
52697else
52698  case $CCACHE in
52699  [\\/]* | ?:[\\/]*)
52700  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52701  ;;
52702  *)
52703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52704for as_dir in $PATH
52705do
52706  IFS=$as_save_IFS
52707  test -z "$as_dir" && as_dir=.
52708    for ac_exec_ext in '' $ac_executable_extensions; do
52709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52710    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52712    break 2
52713  fi
52714done
52715  done
52716IFS=$as_save_IFS
52717
52718  ;;
52719esac
52720fi
52721CCACHE=$ac_cv_path_CCACHE
52722if test -n "$CCACHE"; then
52723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52724$as_echo "$CCACHE" >&6; }
52725else
52726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52727$as_echo "no" >&6; }
52728fi
52729
52730
52731  test -n "$CCACHE" && break
52732done
52733
52734  else
52735    # The variable is set, but is it from the command line or the environment?
52736
52737    # Try to remove the string !CCACHE! from our list.
52738    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
52739    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
52740      # If it failed, the variable was not from the command line. Ignore it,
52741      # but warn the user (except for BASH, which is always set by the calling BASH).
52742      if test "xCCACHE" != xBASH; then
52743        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
52744$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
52745      fi
52746      # Try to locate tool using the code snippet
52747      for ac_prog in ccache
52748do
52749  # Extract the first word of "$ac_prog", so it can be a program name with args.
52750set dummy $ac_prog; ac_word=$2
52751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52752$as_echo_n "checking for $ac_word... " >&6; }
52753if ${ac_cv_path_CCACHE+:} false; then :
52754  $as_echo_n "(cached) " >&6
52755else
52756  case $CCACHE in
52757  [\\/]* | ?:[\\/]*)
52758  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52759  ;;
52760  *)
52761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52762for as_dir in $PATH
52763do
52764  IFS=$as_save_IFS
52765  test -z "$as_dir" && as_dir=.
52766    for ac_exec_ext in '' $ac_executable_extensions; do
52767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52768    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52770    break 2
52771  fi
52772done
52773  done
52774IFS=$as_save_IFS
52775
52776  ;;
52777esac
52778fi
52779CCACHE=$ac_cv_path_CCACHE
52780if test -n "$CCACHE"; then
52781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52782$as_echo "$CCACHE" >&6; }
52783else
52784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52785$as_echo "no" >&6; }
52786fi
52787
52788
52789  test -n "$CCACHE" && break
52790done
52791
52792    else
52793      # If it succeeded, then it was overridden by the user. We will use it
52794      # for the tool.
52795
52796      # First remove it from the list of overridden variables, so we can test
52797      # for unknown variables in the end.
52798      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
52799
52800      # Check if the provided tool contains a complete path.
52801      tool_specified="$CCACHE"
52802      tool_basename="${tool_specified##*/}"
52803      if test "x$tool_basename" = "x$tool_specified"; then
52804        # A command without a complete path is provided, search $PATH.
52805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
52806$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
52807        # Extract the first word of "$tool_basename", so it can be a program name with args.
52808set dummy $tool_basename; ac_word=$2
52809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
52810$as_echo_n "checking for $ac_word... " >&6; }
52811if ${ac_cv_path_CCACHE+:} false; then :
52812  $as_echo_n "(cached) " >&6
52813else
52814  case $CCACHE in
52815  [\\/]* | ?:[\\/]*)
52816  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
52817  ;;
52818  *)
52819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52820for as_dir in $PATH
52821do
52822  IFS=$as_save_IFS
52823  test -z "$as_dir" && as_dir=.
52824    for ac_exec_ext in '' $ac_executable_extensions; do
52825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
52826    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
52827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
52828    break 2
52829  fi
52830done
52831  done
52832IFS=$as_save_IFS
52833
52834  ;;
52835esac
52836fi
52837CCACHE=$ac_cv_path_CCACHE
52838if test -n "$CCACHE"; then
52839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
52840$as_echo "$CCACHE" >&6; }
52841else
52842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52843$as_echo "no" >&6; }
52844fi
52845
52846
52847        if test "x$CCACHE" = x; then
52848          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
52849        fi
52850      else
52851        # Otherwise we believe it is a complete path. Use it as it is.
52852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
52853$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
52854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
52855$as_echo_n "checking for CCACHE... " >&6; }
52856        if test ! -x "$tool_specified"; then
52857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
52858$as_echo "not found" >&6; }
52859          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
52860        fi
52861        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
52862$as_echo "$tool_specified" >&6; }
52863      fi
52864    fi
52865  fi
52866
52867
52868
52869  if test "x$CCACHE" = x; then
52870    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
52871  fi
52872
52873
52874      PATH="$OLD_PATH"
52875      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
52876      CCACHE_STATUS="Active ($CCACHE_VERSION)"
52877    else
52878      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52879$as_echo "no" >&6; }
52880      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
52881$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
52882    fi
52883  elif test "x$enable_ccache" = xno; then
52884    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
52885$as_echo "no, explicitly disabled" >&6; }
52886    CCACHE_STATUS="Disabled"
52887  elif test "x$enable_ccache" = x; then
52888    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52889$as_echo "no" >&6; }
52890  else
52891    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
52892$as_echo "unknown" >&6; }
52893    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
52894  fi
52895
52896
52897
52898# Check whether --with-ccache-dir was given.
52899if test "${with_ccache_dir+set}" = set; then :
52900  withval=$with_ccache_dir;
52901fi
52902
52903
52904  if test "x$with_ccache_dir" != x; then
52905    # When using a non home ccache directory, assume the use is to share ccache files
52906    # with other users. Thus change the umask.
52907    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
52908    if test "x$CCACHE" = x; then
52909      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
52910$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
52911    fi
52912  fi
52913
52914  if test "x$CCACHE" != x; then
52915
52916  if test "x$CCACHE" != x; then
52917    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
52918      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
52919          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
52920      if test "x$HAS_BAD_CCACHE" != "x"; then
52921        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
52922      fi
52923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
52924$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
52925      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
52926      PUSHED_FLAGS="$CXXFLAGS"
52927      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
52928      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52929/* end confdefs.h.  */
52930
52931int
52932main ()
52933{
52934
52935  ;
52936  return 0;
52937}
52938_ACEOF
52939if ac_fn_cxx_try_compile "$LINENO"; then :
52940  CC_KNOWS_CCACHE_TRICK=yes
52941else
52942  CC_KNOWS_CCACHE_TRICK=no
52943fi
52944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52945      CXXFLAGS="$PUSHED_FLAGS"
52946      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
52947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52948$as_echo "yes" >&6; }
52949        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
52950
52951        CCACHE_SLOPPINESS=pch_defines,time_macros
52952      else
52953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52954$as_echo "no" >&6; }
52955        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
52956      fi
52957    fi
52958
52959    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
52960        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
52961
52962    if test "x$SET_CCACHE_DIR" != x; then
52963      mkdir -p $CCACHE_DIR > /dev/null 2>&1
52964      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
52965    fi
52966  fi
52967
52968  fi
52969
52970
52971###############################################################################
52972#
52973# And now the finish...
52974#
52975###############################################################################
52976
52977# Check for some common pitfalls
52978
52979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52980    file_to_test="$SRC_ROOT/LICENSE"
52981    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
52982      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
52983    fi
52984  fi
52985
52986
52987  # Did user specify any unknown variables?
52988
52989  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
52990    # Replace the separating ! with spaces before presenting for end user.
52991    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
52992    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
52993$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
52994  fi
52995
52996
52997  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
52998$as_echo_n "checking if build directory is on local disk... " >&6; }
52999
53000  # df -l lists only local disks; if the given directory is not found then
53001  # a non-zero exit code is given
53002  if test "x$DF" = x; then
53003    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53004      # msys does not have df; use Windows "net use" instead.
53005      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
53006      if test "x$IS_NETWORK_DISK" = x; then
53007        OUTPUT_DIR_IS_LOCAL="yes"
53008      else
53009        OUTPUT_DIR_IS_LOCAL="no"
53010      fi
53011    else
53012      # No df here, say it's local
53013      OUTPUT_DIR_IS_LOCAL="yes"
53014    fi
53015  else
53016    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
53017      OUTPUT_DIR_IS_LOCAL="yes"
53018    else
53019      OUTPUT_DIR_IS_LOCAL="no"
53020    fi
53021  fi
53022
53023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
53024$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
53025
53026
53027
53028  # Check if the user has any old-style ALT_ variables set.
53029  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
53030
53031  # Before generating output files, test if they exist. If they do, this is a reconfigure.
53032  # Since we can't properly handle the dependencies for this, warn the user about the situation
53033  if test -e $OUTPUT_ROOT/spec.gmk; then
53034    IS_RECONFIGURE=yes
53035  else
53036    IS_RECONFIGURE=no
53037  fi
53038
53039
53040# At the end, call the custom hook. (Dummy macro if no custom sources available)
53041
53042
53043# We're messing a bit with internal autoconf variables to put the config.status
53044# in the output directory instead of the current directory.
53045CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
53046
53047# Create the actual output files. Now the main work of configure is done.
53048cat >confcache <<\_ACEOF
53049# This file is a shell script that caches the results of configure
53050# tests run on this system so they can be shared between configure
53051# scripts and configure runs, see configure's option --config-cache.
53052# It is not useful on other systems.  If it contains results you don't
53053# want to keep, you may remove or edit it.
53054#
53055# config.status only pays attention to the cache file if you give it
53056# the --recheck option to rerun configure.
53057#
53058# `ac_cv_env_foo' variables (set or unset) will be overridden when
53059# loading this file, other *unset* `ac_cv_foo' will be assigned the
53060# following values.
53061
53062_ACEOF
53063
53064# The following way of writing the cache mishandles newlines in values,
53065# but we know of no workaround that is simple, portable, and efficient.
53066# So, we kill variables containing newlines.
53067# Ultrix sh set writes to stderr and can't be redirected directly,
53068# and sets the high bit in the cache file unless we assign to the vars.
53069(
53070  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
53071    eval ac_val=\$$ac_var
53072    case $ac_val in #(
53073    *${as_nl}*)
53074      case $ac_var in #(
53075      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
53076$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
53077      esac
53078      case $ac_var in #(
53079      _ | IFS | as_nl) ;; #(
53080      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
53081      *) { eval $ac_var=; unset $ac_var;} ;;
53082      esac ;;
53083    esac
53084  done
53085
53086  (set) 2>&1 |
53087    case $as_nl`(ac_space=' '; set) 2>&1` in #(
53088    *${as_nl}ac_space=\ *)
53089      # `set' does not quote correctly, so add quotes: double-quote
53090      # substitution turns \\\\ into \\, and sed turns \\ into \.
53091      sed -n \
53092	"s/'/'\\\\''/g;
53093	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
53094      ;; #(
53095    *)
53096      # `set' quotes correctly as required by POSIX, so do not add quotes.
53097      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
53098      ;;
53099    esac |
53100    sort
53101) |
53102  sed '
53103     /^ac_cv_env_/b end
53104     t clear
53105     :clear
53106     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
53107     t end
53108     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
53109     :end' >>confcache
53110if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
53111  if test -w "$cache_file"; then
53112    if test "x$cache_file" != "x/dev/null"; then
53113      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
53114$as_echo "$as_me: updating cache $cache_file" >&6;}
53115      if test ! -f "$cache_file" || test -h "$cache_file"; then
53116	cat confcache >"$cache_file"
53117      else
53118        case $cache_file in #(
53119        */* | ?:*)
53120	  mv -f confcache "$cache_file"$$ &&
53121	  mv -f "$cache_file"$$ "$cache_file" ;; #(
53122        *)
53123	  mv -f confcache "$cache_file" ;;
53124	esac
53125      fi
53126    fi
53127  else
53128    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
53129$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
53130  fi
53131fi
53132rm -f confcache
53133
53134test "x$prefix" = xNONE && prefix=$ac_default_prefix
53135# Let make expand exec_prefix.
53136test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
53137
53138# Transform confdefs.h into DEFS.
53139# Protect against shell expansion while executing Makefile rules.
53140# Protect against Makefile macro expansion.
53141#
53142# If the first sed substitution is executed (which looks for macros that
53143# take arguments), then branch to the quote section.  Otherwise,
53144# look for a macro that doesn't take arguments.
53145ac_script='
53146:mline
53147/\\$/{
53148 N
53149 s,\\\n,,
53150 b mline
53151}
53152t clear
53153:clear
53154s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
53155t quote
53156s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
53157t quote
53158b any
53159:quote
53160s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
53161s/\[/\\&/g
53162s/\]/\\&/g
53163s/\$/$$/g
53164H
53165:any
53166${
53167	g
53168	s/^\n//
53169	s/\n/ /g
53170	p
53171}
53172'
53173DEFS=`sed -n "$ac_script" confdefs.h`
53174
53175
53176ac_libobjs=
53177ac_ltlibobjs=
53178U=
53179for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
53180  # 1. Remove the extension, and $U if already installed.
53181  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
53182  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
53183  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
53184  #    will be set to the directory where LIBOBJS objects are built.
53185  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
53186  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
53187done
53188LIBOBJS=$ac_libobjs
53189
53190LTLIBOBJS=$ac_ltlibobjs
53191
53192
53193
53194: "${CONFIG_STATUS=./config.status}"
53195ac_write_fail=0
53196ac_clean_files_save=$ac_clean_files
53197ac_clean_files="$ac_clean_files $CONFIG_STATUS"
53198{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
53199$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
53200as_write_fail=0
53201cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
53202#! $SHELL
53203# Generated by $as_me.
53204# Run this file to recreate the current configuration.
53205# Compiler output produced by configure, useful for debugging
53206# configure, is in config.log if it exists.
53207
53208debug=false
53209ac_cs_recheck=false
53210ac_cs_silent=false
53211
53212SHELL=\${CONFIG_SHELL-$SHELL}
53213export SHELL
53214_ASEOF
53215cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
53216## -------------------- ##
53217## M4sh Initialization. ##
53218## -------------------- ##
53219
53220# Be more Bourne compatible
53221DUALCASE=1; export DUALCASE # for MKS sh
53222if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
53223  emulate sh
53224  NULLCMD=:
53225  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
53226  # is contrary to our usage.  Disable this feature.
53227  alias -g '${1+"$@"}'='"$@"'
53228  setopt NO_GLOB_SUBST
53229else
53230  case `(set -o) 2>/dev/null` in #(
53231  *posix*) :
53232    set -o posix ;; #(
53233  *) :
53234     ;;
53235esac
53236fi
53237
53238
53239as_nl='
53240'
53241export as_nl
53242# Printing a long string crashes Solaris 7 /usr/bin/printf.
53243as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
53244as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
53245as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
53246# Prefer a ksh shell builtin over an external printf program on Solaris,
53247# but without wasting forks for bash or zsh.
53248if test -z "$BASH_VERSION$ZSH_VERSION" \
53249    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53250  as_echo='print -r --'
53251  as_echo_n='print -rn --'
53252elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53253  as_echo='printf %s\n'
53254  as_echo_n='printf %s'
53255else
53256  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
53257    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53258    as_echo_n='/usr/ucb/echo -n'
53259  else
53260    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
53261    as_echo_n_body='eval
53262      arg=$1;
53263      case $arg in #(
53264      *"$as_nl"*)
53265	expr "X$arg" : "X\\(.*\\)$as_nl";
53266	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
53267      esac;
53268      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
53269    '
53270    export as_echo_n_body
53271    as_echo_n='sh -c $as_echo_n_body as_echo'
53272  fi
53273  export as_echo_body
53274  as_echo='sh -c $as_echo_body as_echo'
53275fi
53276
53277# The user is always right.
53278if test "${PATH_SEPARATOR+set}" != set; then
53279  PATH_SEPARATOR=:
53280  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
53281    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
53282      PATH_SEPARATOR=';'
53283  }
53284fi
53285
53286
53287# IFS
53288# We need space, tab and new line, in precisely that order.  Quoting is
53289# there to prevent editors from complaining about space-tab.
53290# (If _AS_PATH_WALK were called with IFS unset, it would disable word
53291# splitting by setting IFS to empty value.)
53292IFS=" ""	$as_nl"
53293
53294# Find who we are.  Look in the path if we contain no directory separator.
53295as_myself=
53296case $0 in #((
53297  *[\\/]* ) as_myself=$0 ;;
53298  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
53299for as_dir in $PATH
53300do
53301  IFS=$as_save_IFS
53302  test -z "$as_dir" && as_dir=.
53303    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
53304  done
53305IFS=$as_save_IFS
53306
53307     ;;
53308esac
53309# We did not find ourselves, most probably we were run as `sh COMMAND'
53310# in which case we are not to be found in the path.
53311if test "x$as_myself" = x; then
53312  as_myself=$0
53313fi
53314if test ! -f "$as_myself"; then
53315  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
53316  exit 1
53317fi
53318
53319# Unset variables that we do not need and which cause bugs (e.g. in
53320# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
53321# suppresses any "Segmentation fault" message there.  '((' could
53322# trigger a bug in pdksh 5.2.14.
53323for as_var in BASH_ENV ENV MAIL MAILPATH
53324do eval test x\${$as_var+set} = xset \
53325  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
53326done
53327PS1='$ '
53328PS2='> '
53329PS4='+ '
53330
53331# NLS nuisances.
53332LC_ALL=C
53333export LC_ALL
53334LANGUAGE=C
53335export LANGUAGE
53336
53337# CDPATH.
53338(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
53339
53340
53341# as_fn_error STATUS ERROR [LINENO LOG_FD]
53342# ----------------------------------------
53343# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
53344# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
53345# script with STATUS, using 1 if that was 0.
53346as_fn_error ()
53347{
53348  as_status=$1; test $as_status -eq 0 && as_status=1
53349  if test "$4"; then
53350    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
53351    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
53352  fi
53353  $as_echo "$as_me: error: $2" >&2
53354  as_fn_exit $as_status
53355} # as_fn_error
53356
53357
53358# as_fn_set_status STATUS
53359# -----------------------
53360# Set $? to STATUS, without forking.
53361as_fn_set_status ()
53362{
53363  return $1
53364} # as_fn_set_status
53365
53366# as_fn_exit STATUS
53367# -----------------
53368# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
53369as_fn_exit ()
53370{
53371  set +e
53372  as_fn_set_status $1
53373  exit $1
53374} # as_fn_exit
53375
53376# as_fn_unset VAR
53377# ---------------
53378# Portably unset VAR.
53379as_fn_unset ()
53380{
53381  { eval $1=; unset $1;}
53382}
53383as_unset=as_fn_unset
53384# as_fn_append VAR VALUE
53385# ----------------------
53386# Append the text in VALUE to the end of the definition contained in VAR. Take
53387# advantage of any shell optimizations that allow amortized linear growth over
53388# repeated appends, instead of the typical quadratic growth present in naive
53389# implementations.
53390if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
53391  eval 'as_fn_append ()
53392  {
53393    eval $1+=\$2
53394  }'
53395else
53396  as_fn_append ()
53397  {
53398    eval $1=\$$1\$2
53399  }
53400fi # as_fn_append
53401
53402# as_fn_arith ARG...
53403# ------------------
53404# Perform arithmetic evaluation on the ARGs, and store the result in the
53405# global $as_val. Take advantage of shells that can avoid forks. The arguments
53406# must be portable across $(()) and expr.
53407if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
53408  eval 'as_fn_arith ()
53409  {
53410    as_val=$(( $* ))
53411  }'
53412else
53413  as_fn_arith ()
53414  {
53415    as_val=`expr "$@" || test $? -eq 1`
53416  }
53417fi # as_fn_arith
53418
53419
53420if expr a : '\(a\)' >/dev/null 2>&1 &&
53421   test "X`expr 00001 : '.*\(...\)'`" = X001; then
53422  as_expr=expr
53423else
53424  as_expr=false
53425fi
53426
53427if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
53428  as_basename=basename
53429else
53430  as_basename=false
53431fi
53432
53433if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
53434  as_dirname=dirname
53435else
53436  as_dirname=false
53437fi
53438
53439as_me=`$as_basename -- "$0" ||
53440$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
53441	 X"$0" : 'X\(//\)$' \| \
53442	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
53443$as_echo X/"$0" |
53444    sed '/^.*\/\([^/][^/]*\)\/*$/{
53445	    s//\1/
53446	    q
53447	  }
53448	  /^X\/\(\/\/\)$/{
53449	    s//\1/
53450	    q
53451	  }
53452	  /^X\/\(\/\).*/{
53453	    s//\1/
53454	    q
53455	  }
53456	  s/.*/./; q'`
53457
53458# Avoid depending upon Character Ranges.
53459as_cr_letters='abcdefghijklmnopqrstuvwxyz'
53460as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
53461as_cr_Letters=$as_cr_letters$as_cr_LETTERS
53462as_cr_digits='0123456789'
53463as_cr_alnum=$as_cr_Letters$as_cr_digits
53464
53465ECHO_C= ECHO_N= ECHO_T=
53466case `echo -n x` in #(((((
53467-n*)
53468  case `echo 'xy\c'` in
53469  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
53470  xy)  ECHO_C='\c';;
53471  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
53472       ECHO_T='	';;
53473  esac;;
53474*)
53475  ECHO_N='-n';;
53476esac
53477
53478rm -f conf$$ conf$$.exe conf$$.file
53479if test -d conf$$.dir; then
53480  rm -f conf$$.dir/conf$$.file
53481else
53482  rm -f conf$$.dir
53483  mkdir conf$$.dir 2>/dev/null
53484fi
53485if (echo >conf$$.file) 2>/dev/null; then
53486  if ln -s conf$$.file conf$$ 2>/dev/null; then
53487    as_ln_s='ln -s'
53488    # ... but there are two gotchas:
53489    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
53490    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
53491    # In both cases, we have to default to `cp -pR'.
53492    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
53493      as_ln_s='cp -pR'
53494  elif ln conf$$.file conf$$ 2>/dev/null; then
53495    as_ln_s=ln
53496  else
53497    as_ln_s='cp -pR'
53498  fi
53499else
53500  as_ln_s='cp -pR'
53501fi
53502rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
53503rmdir conf$$.dir 2>/dev/null
53504
53505
53506# as_fn_mkdir_p
53507# -------------
53508# Create "$as_dir" as a directory, including parents if necessary.
53509as_fn_mkdir_p ()
53510{
53511
53512  case $as_dir in #(
53513  -*) as_dir=./$as_dir;;
53514  esac
53515  test -d "$as_dir" || eval $as_mkdir_p || {
53516    as_dirs=
53517    while :; do
53518      case $as_dir in #(
53519      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
53520      *) as_qdir=$as_dir;;
53521      esac
53522      as_dirs="'$as_qdir' $as_dirs"
53523      as_dir=`$as_dirname -- "$as_dir" ||
53524$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
53525	 X"$as_dir" : 'X\(//\)[^/]' \| \
53526	 X"$as_dir" : 'X\(//\)$' \| \
53527	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
53528$as_echo X"$as_dir" |
53529    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
53530	    s//\1/
53531	    q
53532	  }
53533	  /^X\(\/\/\)[^/].*/{
53534	    s//\1/
53535	    q
53536	  }
53537	  /^X\(\/\/\)$/{
53538	    s//\1/
53539	    q
53540	  }
53541	  /^X\(\/\).*/{
53542	    s//\1/
53543	    q
53544	  }
53545	  s/.*/./; q'`
53546      test -d "$as_dir" && break
53547    done
53548    test -z "$as_dirs" || eval "mkdir $as_dirs"
53549  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
53550
53551
53552} # as_fn_mkdir_p
53553if mkdir -p . 2>/dev/null; then
53554  as_mkdir_p='mkdir -p "$as_dir"'
53555else
53556  test -d ./-p && rmdir ./-p
53557  as_mkdir_p=false
53558fi
53559
53560
53561# as_fn_executable_p FILE
53562# -----------------------
53563# Test if FILE is an executable regular file.
53564as_fn_executable_p ()
53565{
53566  test -f "$1" && test -x "$1"
53567} # as_fn_executable_p
53568as_test_x='test -x'
53569as_executable_p=as_fn_executable_p
53570
53571# Sed expression to map a string onto a valid CPP name.
53572as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
53573
53574# Sed expression to map a string onto a valid variable name.
53575as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
53576
53577
53578exec 6>&1
53579## ----------------------------------- ##
53580## Main body of $CONFIG_STATUS script. ##
53581## ----------------------------------- ##
53582_ASEOF
53583test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
53584
53585cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53586# Save the log message, to keep $0 and so on meaningful, and to
53587# report actual input values of CONFIG_FILES etc. instead of their
53588# values after options handling.
53589ac_log="
53590This file was extended by OpenJDK $as_me jdk9, which was
53591generated by GNU Autoconf 2.69.  Invocation command line was
53592
53593  CONFIG_FILES    = $CONFIG_FILES
53594  CONFIG_HEADERS  = $CONFIG_HEADERS
53595  CONFIG_LINKS    = $CONFIG_LINKS
53596  CONFIG_COMMANDS = $CONFIG_COMMANDS
53597  $ $0 $@
53598
53599on `(hostname || uname -n) 2>/dev/null | sed 1q`
53600"
53601
53602_ACEOF
53603
53604case $ac_config_files in *"
53605"*) set x $ac_config_files; shift; ac_config_files=$*;;
53606esac
53607
53608
53609
53610cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53611# Files that config.status was made for.
53612config_files="$ac_config_files"
53613
53614_ACEOF
53615
53616cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53617ac_cs_usage="\
53618\`$as_me' instantiates files and other configuration actions
53619from templates according to the current configuration.  Unless the files
53620and actions are specified as TAGs, all are instantiated by default.
53621
53622Usage: $0 [OPTION]... [TAG]...
53623
53624  -h, --help       print this help, then exit
53625  -V, --version    print version number and configuration settings, then exit
53626      --config     print configuration, then exit
53627  -q, --quiet, --silent
53628                   do not print progress messages
53629  -d, --debug      don't remove temporary files
53630      --recheck    update $as_me by reconfiguring in the same conditions
53631      --file=FILE[:TEMPLATE]
53632                   instantiate the configuration file FILE
53633
53634Configuration files:
53635$config_files
53636
53637Report bugs to <build-dev@openjdk.java.net>.
53638OpenJDK home page: <http://openjdk.java.net>."
53639
53640_ACEOF
53641cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53642ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
53643ac_cs_version="\\
53644OpenJDK config.status jdk9
53645configured by $0, generated by GNU Autoconf 2.69,
53646  with options \\"\$ac_cs_config\\"
53647
53648Copyright (C) 2012 Free Software Foundation, Inc.
53649This config.status script is free software; the Free Software Foundation
53650gives unlimited permission to copy, distribute and modify it."
53651
53652ac_pwd='$ac_pwd'
53653srcdir='$srcdir'
53654AWK='$AWK'
53655test -n "\$AWK" || AWK=awk
53656_ACEOF
53657
53658cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53659# The default lists apply if the user does not specify any file.
53660ac_need_defaults=:
53661while test $# != 0
53662do
53663  case $1 in
53664  --*=?*)
53665    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53666    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
53667    ac_shift=:
53668    ;;
53669  --*=)
53670    ac_option=`expr "X$1" : 'X\([^=]*\)='`
53671    ac_optarg=
53672    ac_shift=:
53673    ;;
53674  *)
53675    ac_option=$1
53676    ac_optarg=$2
53677    ac_shift=shift
53678    ;;
53679  esac
53680
53681  case $ac_option in
53682  # Handling of the options.
53683  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
53684    ac_cs_recheck=: ;;
53685  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
53686    $as_echo "$ac_cs_version"; exit ;;
53687  --config | --confi | --conf | --con | --co | --c )
53688    $as_echo "$ac_cs_config"; exit ;;
53689  --debug | --debu | --deb | --de | --d | -d )
53690    debug=: ;;
53691  --file | --fil | --fi | --f )
53692    $ac_shift
53693    case $ac_optarg in
53694    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
53695    '') as_fn_error $? "missing file argument" ;;
53696    esac
53697    as_fn_append CONFIG_FILES " '$ac_optarg'"
53698    ac_need_defaults=false;;
53699  --he | --h |  --help | --hel | -h )
53700    $as_echo "$ac_cs_usage"; exit ;;
53701  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
53702  | -silent | --silent | --silen | --sile | --sil | --si | --s)
53703    ac_cs_silent=: ;;
53704
53705  # This is an error.
53706  -*) as_fn_error $? "unrecognized option: \`$1'
53707Try \`$0 --help' for more information." ;;
53708
53709  *) as_fn_append ac_config_targets " $1"
53710     ac_need_defaults=false ;;
53711
53712  esac
53713  shift
53714done
53715
53716ac_configure_extra_args=
53717
53718if $ac_cs_silent; then
53719  exec 6>/dev/null
53720  ac_configure_extra_args="$ac_configure_extra_args --silent"
53721fi
53722
53723_ACEOF
53724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53725if \$ac_cs_recheck; then
53726  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
53727  shift
53728  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
53729  CONFIG_SHELL='$SHELL'
53730  export CONFIG_SHELL
53731  exec "\$@"
53732fi
53733
53734_ACEOF
53735cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53736exec 5>>config.log
53737{
53738  echo
53739  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
53740## Running $as_me. ##
53741_ASBOX
53742  $as_echo "$ac_log"
53743} >&5
53744
53745_ACEOF
53746cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53747_ACEOF
53748
53749cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53750
53751# Handling of arguments.
53752for ac_config_target in $ac_config_targets
53753do
53754  case $ac_config_target in
53755    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
53756    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
53757    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
53758    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
53759    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
53760
53761  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
53762  esac
53763done
53764
53765
53766# If the user did not use the arguments to specify the items to instantiate,
53767# then the envvar interface is used.  Set only those that are not.
53768# We use the long form for the default assignment because of an extremely
53769# bizarre bug on SunOS 4.1.3.
53770if $ac_need_defaults; then
53771  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
53772fi
53773
53774# Have a temporary directory for convenience.  Make it in the build tree
53775# simply because there is no reason against having it here, and in addition,
53776# creating and moving files from /tmp can sometimes cause problems.
53777# Hook for its removal unless debugging.
53778# Note that there is a small window in which the directory will not be cleaned:
53779# after its creation but before its name has been assigned to `$tmp'.
53780$debug ||
53781{
53782  tmp= ac_tmp=
53783  trap 'exit_status=$?
53784  : "${ac_tmp:=$tmp}"
53785  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
53786' 0
53787  trap 'as_fn_exit 1' 1 2 13 15
53788}
53789# Create a (secure) tmp directory for tmp files.
53790
53791{
53792  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
53793  test -d "$tmp"
53794}  ||
53795{
53796  tmp=./conf$$-$RANDOM
53797  (umask 077 && mkdir "$tmp")
53798} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
53799ac_tmp=$tmp
53800
53801# Set up the scripts for CONFIG_FILES section.
53802# No need to generate them if there are no CONFIG_FILES.
53803# This happens for instance with `./config.status config.h'.
53804if test -n "$CONFIG_FILES"; then
53805
53806
53807ac_cr=`echo X | tr X '\015'`
53808# On cygwin, bash can eat \r inside `` if the user requested igncr.
53809# But we know of no other shell where ac_cr would be empty at this
53810# point, so we can use a bashism as a fallback.
53811if test "x$ac_cr" = x; then
53812  eval ac_cr=\$\'\\r\'
53813fi
53814ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
53815if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
53816  ac_cs_awk_cr='\\r'
53817else
53818  ac_cs_awk_cr=$ac_cr
53819fi
53820
53821echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
53822_ACEOF
53823
53824
53825{
53826  echo "cat >conf$$subs.awk <<_ACEOF" &&
53827  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
53828  echo "_ACEOF"
53829} >conf$$subs.sh ||
53830  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53831ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
53832ac_delim='%!_!# '
53833for ac_last_try in false false false false false :; do
53834  . ./conf$$subs.sh ||
53835    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53836
53837  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
53838  if test $ac_delim_n = $ac_delim_num; then
53839    break
53840  elif $ac_last_try; then
53841    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
53842  else
53843    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
53844  fi
53845done
53846rm -f conf$$subs.sh
53847
53848cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53849cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
53850_ACEOF
53851sed -n '
53852h
53853s/^/S["/; s/!.*/"]=/
53854p
53855g
53856s/^[^!]*!//
53857:repl
53858t repl
53859s/'"$ac_delim"'$//
53860t delim
53861:nl
53862h
53863s/\(.\{148\}\)..*/\1/
53864t more1
53865s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
53866p
53867n
53868b repl
53869:more1
53870s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53871p
53872g
53873s/.\{148\}//
53874t nl
53875:delim
53876h
53877s/\(.\{148\}\)..*/\1/
53878t more2
53879s/["\\]/\\&/g; s/^/"/; s/$/"/
53880p
53881b
53882:more2
53883s/["\\]/\\&/g; s/^/"/; s/$/"\\/
53884p
53885g
53886s/.\{148\}//
53887t delim
53888' <conf$$subs.awk | sed '
53889/^[^""]/{
53890  N
53891  s/\n//
53892}
53893' >>$CONFIG_STATUS || ac_write_fail=1
53894rm -f conf$$subs.awk
53895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
53896_ACAWK
53897cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
53898  for (key in S) S_is_set[key] = 1
53899  FS = ""
53900
53901}
53902{
53903  line = $ 0
53904  nfields = split(line, field, "@")
53905  substed = 0
53906  len = length(field[1])
53907  for (i = 2; i < nfields; i++) {
53908    key = field[i]
53909    keylen = length(key)
53910    if (S_is_set[key]) {
53911      value = S[key]
53912      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
53913      len += length(value) + length(field[++i])
53914      substed = 1
53915    } else
53916      len += 1 + keylen
53917  }
53918
53919  print line
53920}
53921
53922_ACAWK
53923_ACEOF
53924cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53925if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
53926  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
53927else
53928  cat
53929fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
53930  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
53931_ACEOF
53932
53933# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
53934# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
53935# trailing colons and then remove the whole line if VPATH becomes empty
53936# (actually we leave an empty line to preserve line numbers).
53937if test "x$srcdir" = x.; then
53938  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
53939h
53940s///
53941s/^/:/
53942s/[	 ]*$/:/
53943s/:\$(srcdir):/:/g
53944s/:\${srcdir}:/:/g
53945s/:@srcdir@:/:/g
53946s/^:*//
53947s/:*$//
53948x
53949s/\(=[	 ]*\).*/\1/
53950G
53951s/\n//
53952s/^[^=]*=[	 ]*$//
53953}'
53954fi
53955
53956cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
53957fi # test -n "$CONFIG_FILES"
53958
53959
53960eval set X "  :F $CONFIG_FILES      "
53961shift
53962for ac_tag
53963do
53964  case $ac_tag in
53965  :[FHLC]) ac_mode=$ac_tag; continue;;
53966  esac
53967  case $ac_mode$ac_tag in
53968  :[FHL]*:*);;
53969  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
53970  :[FH]-) ac_tag=-:-;;
53971  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
53972  esac
53973  ac_save_IFS=$IFS
53974  IFS=:
53975  set x $ac_tag
53976  IFS=$ac_save_IFS
53977  shift
53978  ac_file=$1
53979  shift
53980
53981  case $ac_mode in
53982  :L) ac_source=$1;;
53983  :[FH])
53984    ac_file_inputs=
53985    for ac_f
53986    do
53987      case $ac_f in
53988      -) ac_f="$ac_tmp/stdin";;
53989      *) # Look for the file first in the build tree, then in the source tree
53990	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
53991	 # because $ac_f cannot contain `:'.
53992	 test -f "$ac_f" ||
53993	   case $ac_f in
53994	   [\\/$]*) false;;
53995	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
53996	   esac ||
53997	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
53998      esac
53999      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
54000      as_fn_append ac_file_inputs " '$ac_f'"
54001    done
54002
54003    # Let's still pretend it is `configure' which instantiates (i.e., don't
54004    # use $as_me), people would be surprised to read:
54005    #    /* config.h.  Generated by config.status.  */
54006    configure_input='Generated from '`
54007	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
54008	`' by configure.'
54009    if test x"$ac_file" != x-; then
54010      configure_input="$ac_file.  $configure_input"
54011      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
54012$as_echo "$as_me: creating $ac_file" >&6;}
54013    fi
54014    # Neutralize special characters interpreted by sed in replacement strings.
54015    case $configure_input in #(
54016    *\&* | *\|* | *\\* )
54017       ac_sed_conf_input=`$as_echo "$configure_input" |
54018       sed 's/[\\\\&|]/\\\\&/g'`;; #(
54019    *) ac_sed_conf_input=$configure_input;;
54020    esac
54021
54022    case $ac_tag in
54023    *:-:* | *:-) cat >"$ac_tmp/stdin" \
54024      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
54025    esac
54026    ;;
54027  esac
54028
54029  ac_dir=`$as_dirname -- "$ac_file" ||
54030$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
54031	 X"$ac_file" : 'X\(//\)[^/]' \| \
54032	 X"$ac_file" : 'X\(//\)$' \| \
54033	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
54034$as_echo X"$ac_file" |
54035    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
54036	    s//\1/
54037	    q
54038	  }
54039	  /^X\(\/\/\)[^/].*/{
54040	    s//\1/
54041	    q
54042	  }
54043	  /^X\(\/\/\)$/{
54044	    s//\1/
54045	    q
54046	  }
54047	  /^X\(\/\).*/{
54048	    s//\1/
54049	    q
54050	  }
54051	  s/.*/./; q'`
54052  as_dir="$ac_dir"; as_fn_mkdir_p
54053  ac_builddir=.
54054
54055case "$ac_dir" in
54056.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
54057*)
54058  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
54059  # A ".." for each directory in $ac_dir_suffix.
54060  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
54061  case $ac_top_builddir_sub in
54062  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
54063  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
54064  esac ;;
54065esac
54066ac_abs_top_builddir=$ac_pwd
54067ac_abs_builddir=$ac_pwd$ac_dir_suffix
54068# for backward compatibility:
54069ac_top_builddir=$ac_top_build_prefix
54070
54071case $srcdir in
54072  .)  # We are building in place.
54073    ac_srcdir=.
54074    ac_top_srcdir=$ac_top_builddir_sub
54075    ac_abs_top_srcdir=$ac_pwd ;;
54076  [\\/]* | ?:[\\/]* )  # Absolute name.
54077    ac_srcdir=$srcdir$ac_dir_suffix;
54078    ac_top_srcdir=$srcdir
54079    ac_abs_top_srcdir=$srcdir ;;
54080  *) # Relative name.
54081    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
54082    ac_top_srcdir=$ac_top_build_prefix$srcdir
54083    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
54084esac
54085ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
54086
54087
54088  case $ac_mode in
54089  :F)
54090  #
54091  # CONFIG_FILE
54092  #
54093
54094_ACEOF
54095
54096cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54097# If the template does not know about datarootdir, expand it.
54098# FIXME: This hack should be removed a few years after 2.60.
54099ac_datarootdir_hack=; ac_datarootdir_seen=
54100ac_sed_dataroot='
54101/datarootdir/ {
54102  p
54103  q
54104}
54105/@datadir@/p
54106/@docdir@/p
54107/@infodir@/p
54108/@localedir@/p
54109/@mandir@/p'
54110case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
54111*datarootdir*) ac_datarootdir_seen=yes;;
54112*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
54113  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
54114$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
54115_ACEOF
54116cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54117  ac_datarootdir_hack='
54118  s&@datadir@&$datadir&g
54119  s&@docdir@&$docdir&g
54120  s&@infodir@&$infodir&g
54121  s&@localedir@&$localedir&g
54122  s&@mandir@&$mandir&g
54123  s&\\\${datarootdir}&$datarootdir&g' ;;
54124esac
54125_ACEOF
54126
54127# Neutralize VPATH when `$srcdir' = `.'.
54128# Shell code in configure.ac might set extrasub.
54129# FIXME: do we really want to maintain this feature?
54130cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
54131ac_sed_extra="$ac_vpsub
54132$extrasub
54133_ACEOF
54134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
54135:t
54136/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
54137s|@configure_input@|$ac_sed_conf_input|;t t
54138s&@top_builddir@&$ac_top_builddir_sub&;t t
54139s&@top_build_prefix@&$ac_top_build_prefix&;t t
54140s&@srcdir@&$ac_srcdir&;t t
54141s&@abs_srcdir@&$ac_abs_srcdir&;t t
54142s&@top_srcdir@&$ac_top_srcdir&;t t
54143s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
54144s&@builddir@&$ac_builddir&;t t
54145s&@abs_builddir@&$ac_abs_builddir&;t t
54146s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
54147$ac_datarootdir_hack
54148"
54149eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
54150  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54151
54152test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
54153  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
54154  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
54155      "$ac_tmp/out"`; test -z "$ac_out"; } &&
54156  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54157which seems to be undefined.  Please make sure it is defined" >&5
54158$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
54159which seems to be undefined.  Please make sure it is defined" >&2;}
54160
54161  rm -f "$ac_tmp/stdin"
54162  case $ac_file in
54163  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
54164  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
54165  esac \
54166  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
54167 ;;
54168
54169
54170
54171  esac
54172
54173done # for ac_tag
54174
54175
54176as_fn_exit 0
54177_ACEOF
54178ac_clean_files=$ac_clean_files_save
54179
54180test $ac_write_fail = 0 ||
54181  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
54182
54183
54184# configure is writing to config.log, and then calls config.status.
54185# config.status does its own redirection, appending to config.log.
54186# Unfortunately, on DOS this fails, as config.log is still kept open
54187# by configure, so config.status won't be able to write to it; its
54188# output is simply discarded.  So we exec the FD to /dev/null,
54189# effectively closing config.log, so it can be properly (re)opened and
54190# appended to by config.status.  When coming back to configure, we
54191# need to make the FD available again.
54192if test "$no_create" != yes; then
54193  ac_cs_success=:
54194  ac_config_status_args=
54195  test "$silent" = yes &&
54196    ac_config_status_args="$ac_config_status_args --quiet"
54197  exec 5>/dev/null
54198  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
54199  exec 5>>config.log
54200  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
54201  # would make configure fail if this is the last instruction.
54202  $ac_cs_success || as_fn_exit 1
54203fi
54204if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
54205  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
54206$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
54207fi
54208
54209
54210
54211# Try to move the config.log file to the output directory.
54212if test -e ./config.log; then
54213  $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
54214fi
54215
54216# Make the compare script executable
54217$CHMOD +x $OUTPUT_ROOT/compare.sh
54218
54219# Finally output some useful information to the user
54220
54221  # Finally output some useful information to the user
54222
54223  printf "\n"
54224  printf "====================================================\n"
54225  if test "x$no_create" != "xyes"; then
54226    if test "x$IS_RECONFIGURE" != "xyes"; then
54227      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
54228    else
54229      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
54230    fi
54231  else
54232    if test "x$IS_RECONFIGURE" != "xyes"; then
54233      printf "A configuration has been successfully checked but not created\n"
54234    else
54235      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
54236    fi
54237  fi
54238  if test "x$CONFIGURE_COMMAND_LINE" != x; then
54239    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
54240  else
54241    printf "using default settings.\n"
54242  fi
54243
54244  printf "\n"
54245  printf "Configuration summary:\n"
54246  printf "* Debug level:    $DEBUG_LEVEL\n"
54247  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
54248  printf "* JDK variant:    $JDK_VARIANT\n"
54249  printf "* JVM variants:   $with_jvm_variants\n"
54250  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
54251
54252  printf "\n"
54253  printf "Tools summary:\n"
54254  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
54255    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
54256  fi
54257  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
54258  if test "x$TOOLCHAIN_VERSION" != "x"; then
54259    print_version=" $TOOLCHAIN_VERSION"
54260  fi
54261  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
54262  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
54263  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
54264
54265  printf "\n"
54266  printf "Build performance summary:\n"
54267  printf "* Cores to use:   $JOBS\n"
54268  printf "* Memory limit:   $MEMORY_SIZE MB\n"
54269  if test "x$CCACHE_STATUS" != "x"; then
54270    printf "* ccache status:  $CCACHE_STATUS\n"
54271  fi
54272  printf "\n"
54273
54274  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
54275    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
54276    printf "will result in longer build times.\n"
54277    printf "\n"
54278  fi
54279
54280  if test "x$FOUND_ALT_VARIABLES" != "x"; then
54281    printf "WARNING: You have old-style ALT_ environment variables set.\n"
54282    printf "These are not respected, and will be ignored. It is recommended\n"
54283    printf "that you clean your environment. The following variables are set:\n"
54284    printf "$FOUND_ALT_VARIABLES\n"
54285    printf "\n"
54286  fi
54287
54288  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
54289    printf "WARNING: Your build output directory is not on a local disk.\n"
54290    printf "This will severely degrade build performance!\n"
54291    printf "It is recommended that you create an output directory on a local disk,\n"
54292    printf "and run the configure script again from that directory.\n"
54293    printf "\n"
54294  fi
54295
54296  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
54297    printf "WARNING: The result of this configuration has overridden an older\n"
54298    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
54299    printf "proper build. Failure to do so might result in strange build problems.\n"
54300    printf "\n"
54301  fi
54302
54303  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
54304    printf "WARNING: The result of this configuration was not saved.\n"
54305    printf "You should run without '--no-create | -n' to create the configuration.\n"
54306    printf "\n"
54307  fi
54308
54309
54310
54311if test -e "$OUTPUT_ROOT/config.log"; then
54312  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
54313  if test $? -eq 0; then
54314    printf "The following warnings were produced. Repeated here for convenience:\n"
54315    # We must quote sed expression (using []) to stop m4 from eating the [].
54316    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
54317    printf "\n"
54318  fi
54319fi
54320
54321
54322