generated-configure.sh revision 2181:d57780478145
155682Smarkm#!/bin/bash
2233294Sstas#
355682Smarkm# ##########################################################
455682Smarkm# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5233294Sstas# ##########################################################
655682Smarkm#
755682Smarkm#! /bin/sh
855682Smarkm# Guess values for system-dependent variables and create Makefiles.
9233294Sstas# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
1055682Smarkm#
1155682Smarkm# Report bugs to <build-dev@openjdk.java.net>.
12233294Sstas#
1355682Smarkm#
1455682Smarkm# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
1555682Smarkm#
16233294Sstas#
1755682Smarkm# This configure script is free software; the Free Software Foundation
1855682Smarkm# gives unlimited permission to copy, distribute and modify it.
1955682Smarkm## -------------------- ##
20233294Sstas## M4sh Initialization. ##
2155682Smarkm## -------------------- ##
2255682Smarkm
2355682Smarkm# Be more Bourne compatible
2455682SmarkmDUALCASE=1; export DUALCASE # for MKS sh
2555682Smarkmif test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
2655682Smarkm  emulate sh
2755682Smarkm  NULLCMD=:
2855682Smarkm  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
2955682Smarkm  # is contrary to our usage.  Disable this feature.
3055682Smarkm  alias -g '${1+"$@"}'='"$@"'
3155682Smarkm  setopt NO_GLOB_SUBST
3255682Smarkmelse
3355682Smarkm  case `(set -o) 2>/dev/null` in #(
34233294Sstas  *posix*) :
3555682Smarkm    set -o posix ;; #(
3655682Smarkm  *) :
3755682Smarkm     ;;
3855682Smarkmesac
39178825Sdfrfi
40178825Sdfr
41233294Sstas
42233294Sstasas_nl='
43178825Sdfr'
44178825Sdfrexport as_nl
45233294Sstas# Printing a long string crashes Solaris 7 /usr/bin/printf.
46178825Sdfras_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47178825Sdfras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48178825Sdfras_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4972445Sassar# Prefer a ksh shell builtin over an external printf program on Solaris,
5072445Sassar# but without wasting forks for bash or zsh.
5172445Sassarif test -z "$BASH_VERSION$ZSH_VERSION" \
5272445Sassar    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
5372445Sassar  as_echo='print -r --'
5472445Sassar  as_echo_n='print -rn --'
5572445Sassarelif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
5672445Sassar  as_echo='printf %s\n'
5755682Smarkm  as_echo_n='printf %s'
5855682Smarkmelse
5955682Smarkm  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
6055682Smarkm    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
6155682Smarkm    as_echo_n='/usr/ucb/echo -n'
6255682Smarkm  else
6355682Smarkm    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
6455682Smarkm    as_echo_n_body='eval
6555682Smarkm      arg=$1;
6655682Smarkm      case $arg in #(
6755682Smarkm      *"$as_nl"*)
6855682Smarkm	expr "X$arg" : "X\\(.*\\)$as_nl";
6955682Smarkm	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
7055682Smarkm      esac;
7155682Smarkm      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
7255682Smarkm    '
7355682Smarkm    export as_echo_n_body
7455682Smarkm    as_echo_n='sh -c $as_echo_n_body as_echo'
7555682Smarkm  fi
7655682Smarkm  export as_echo_body
7755682Smarkm  as_echo='sh -c $as_echo_body as_echo'
7855682Smarkmfi
7955682Smarkm
8055682Smarkm# The user is always right.
8155682Smarkmif test "${PATH_SEPARATOR+set}" != set; then
8255682Smarkm  PATH_SEPARATOR=:
8355682Smarkm  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
8455682Smarkm    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
8555682Smarkm      PATH_SEPARATOR=';'
8655682Smarkm  }
8755682Smarkmfi
8855682Smarkm
8955682Smarkm
9055682Smarkm# IFS
9155682Smarkm# We need space, tab and new line, in precisely that order.  Quoting is
9255682Smarkm# there to prevent editors from complaining about space-tab.
9355682Smarkm# (If _AS_PATH_WALK were called with IFS unset, it would disable word
9455682Smarkm# splitting by setting IFS to empty value.)
9555682SmarkmIFS=" ""	$as_nl"
9655682Smarkm
9755682Smarkm# Find who we are.  Look in the path if we contain no directory separator.
9855682Smarkmas_myself=
9955682Smarkmcase $0 in #((
10055682Smarkm  *[\\/]* ) as_myself=$0 ;;
10155682Smarkm  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10255682Smarkmfor as_dir in $PATH
10355682Smarkmdo
10455682Smarkm  IFS=$as_save_IFS
10555682Smarkm  test -z "$as_dir" && as_dir=.
10655682Smarkm    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
10755682Smarkm  done
10855682SmarkmIFS=$as_save_IFS
10955682Smarkm
11055682Smarkm     ;;
11155682Smarkmesac
11255682Smarkm# We did not find ourselves, most probably we were run as `sh COMMAND'
11355682Smarkm# in which case we are not to be found in the path.
11455682Smarkmif test "x$as_myself" = x; then
11555682Smarkm  as_myself=$0
11655682Smarkmfi
11755682Smarkmif test ! -f "$as_myself"; then
11855682Smarkm  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
11955682Smarkm  exit 1
12055682Smarkmfi
12155682Smarkm
12255682Smarkm# Unset variables that we do not need and which cause bugs (e.g. in
12355682Smarkm# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
12455682Smarkm# suppresses any "Segmentation fault" message there.  '((' could
125233294Sstas# trigger a bug in pdksh 5.2.14.
126233294Sstasfor as_var in BASH_ENV ENV MAIL MAILPATH
12757416Smarkmdo eval test x\${$as_var+set} = xset \
12857416Smarkm  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
12957416Smarkmdone
13057416SmarkmPS1='$ '
13155682SmarkmPS2='> '
13255682SmarkmPS4='+ '
13355682Smarkm
13455682Smarkm# NLS nuisances.
13555682SmarkmLC_ALL=C
13655682Smarkmexport LC_ALL
13755682SmarkmLANGUAGE=C
13855682Smarkmexport LANGUAGE
13972445Sassar
14072445Sassar# CDPATH.
14172445Sassar(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
14272445Sassar
14372445Sassar# Use a proper internal environment variable to ensure we don't fall
14472445Sassar  # into an infinite loop, continuously re-executing ourselves.
14572445Sassar  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
14672445Sassar    _as_can_reexec=no; export _as_can_reexec;
14755682Smarkm    # We cannot yet assume a decent shell, so we have to provide a
14855682Smarkm# neutralization value for shells without unset; and this also
14955682Smarkm# works around shells that cannot unset nonexistent variables.
15055682Smarkm# Preserve -v and -x to the replacement shell.
151233294SstasBASH_ENV=/dev/null
152233294SstasENV=/dev/null
153233294Sstas(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154233294Sstascase $- in # ((((
155233294Sstas  *v*x* | *x*v* ) as_opts=-vx ;;
156233294Sstas  *v* ) as_opts=-v ;;
157233294Sstas  *x* ) as_opts=-x ;;
158233294Sstas  * ) as_opts= ;;
159233294Sstasesac
160233294Sstasexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
16155682Smarkm# Admittedly, this is quite paranoid, since all the known shells bail
16272445Sassar# out after a failed `exec'.
16355682Smarkm$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
16455682Smarkmas_fn_exit 255
16555682Smarkm  fi
16655682Smarkm  # We don't want this to propagate to other subprocesses.
16755682Smarkm          { _as_can_reexec=; unset _as_can_reexec;}
16855682Smarkmif test "x$CONFIG_SHELL" = x; then
16955682Smarkm  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
17055682Smarkm  emulate sh
17155682Smarkm  NULLCMD=:
17255682Smarkm  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
17355682Smarkm  # is contrary to our usage.  Disable this feature.
17455682Smarkm  alias -g '\${1+\"\$@\"}'='\"\$@\"'
17555682Smarkm  setopt NO_GLOB_SUBST
17655682Smarkmelse
17755682Smarkm  case \`(set -o) 2>/dev/null\` in #(
17855682Smarkm  *posix*) :
17955682Smarkm    set -o posix ;; #(
18055682Smarkm  *) :
18155682Smarkm     ;;
18255682Smarkmesac
18355682Smarkmfi
18455682Smarkm"
18555682Smarkm  as_required="as_fn_return () { (exit \$1); }
18655682Smarkmas_fn_success () { as_fn_return 0; }
18755682Smarkmas_fn_failure () { as_fn_return 1; }
18855682Smarkmas_fn_ret_success () { return 0; }
18955682Smarkmas_fn_ret_failure () { return 1; }
19055682Smarkm
19155682Smarkmexitcode=0
19255682Smarkmas_fn_success || { exitcode=1; echo as_fn_success failed.; }
19355682Smarkmas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
19455682Smarkmas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
19555682Smarkmas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
19655682Smarkmif ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197127808Snectar
19855682Smarkmelse
19955682Smarkm  exitcode=1; echo positional parameters were not saved.
20055682Smarkmfi
20155682Smarkmtest x\$exitcode = x0 || exit 1
20255682Smarkmtest -x / || exit 1"
20355682Smarkm  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
20455682Smarkm  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
20555682Smarkm  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
20655682Smarkm  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
20755682Smarkmtest \$(( 1 + 1 )) = 2 || exit 1"
20855682Smarkm  if (eval "$as_required") 2>/dev/null; then :
20955682Smarkm  as_have_required=yes
21055682Smarkmelse
211127808Snectar  as_have_required=no
21255682Smarkmfi
21355682Smarkm  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
21455682Smarkm
21555682Smarkmelse
21655682Smarkm  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21755682Smarkmas_found=false
218102644Snectarfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219102644Snectardo
220102644Snectar  IFS=$as_save_IFS
22155682Smarkm  test -z "$as_dir" && as_dir=.
222102644Snectar  as_found=:
22355682Smarkm  case $as_dir in #(
224233294Sstas	 /*)
225233294Sstas	   for as_base in sh bash ksh sh5; do
226233294Sstas	     # Try only shells that exist, to save several forks.
227233294Sstas	     as_shell=$as_dir/$as_base
22855682Smarkm	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
22955682Smarkm		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
23055682Smarkm  CONFIG_SHELL=$as_shell as_have_required=yes
23155682Smarkm		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
23255682Smarkm  break 2
23355682Smarkmfi
23455682Smarkmfi
23555682Smarkm	   done;;
23655682Smarkm       esac
23755682Smarkm  as_found=false
23855682Smarkmdone
23955682Smarkm$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
24055682Smarkm	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
24155682Smarkm  CONFIG_SHELL=$SHELL as_have_required=yes
24255682Smarkmfi; }
24355682SmarkmIFS=$as_save_IFS
24455682Smarkm
24555682Smarkm
24655682Smarkm      if test "x$CONFIG_SHELL" != x; then :
24755682Smarkm  export CONFIG_SHELL
24855682Smarkm             # We cannot yet assume a decent shell, so we have to provide a
24955682Smarkm# neutralization value for shells without unset; and this also
25055682Smarkm# works around shells that cannot unset nonexistent variables.
25155682Smarkm# Preserve -v and -x to the replacement shell.
25255682SmarkmBASH_ENV=/dev/null
25355682SmarkmENV=/dev/null
25455682Smarkm(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
25555682Smarkmcase $- in # ((((
25655682Smarkm  *v*x* | *x*v* ) as_opts=-vx ;;
25755682Smarkm  *v* ) as_opts=-v ;;
25855682Smarkm  *x* ) as_opts=-x ;;
25955682Smarkm  * ) as_opts= ;;
26055682Smarkmesac
26155682Smarkmexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
26255682Smarkm# Admittedly, this is quite paranoid, since all the known shells bail
26355682Smarkm# out after a failed `exec'.
26455682Smarkm$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
26555682Smarkmexit 255
26655682Smarkmfi
26755682Smarkm
26855682Smarkm    if test x$as_have_required = xno; then :
26955682Smarkm  $as_echo "$0: This script requires a shell more modern than all"
27055682Smarkm  $as_echo "$0: the shells that I found on your system."
27155682Smarkm  if test x${ZSH_VERSION+set} = xset ; then
27255682Smarkm    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
27355682Smarkm    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
27455682Smarkm  else
27555682Smarkm    $as_echo "$0: Please tell bug-autoconf@gnu.org and
27655682Smarkm$0: build-dev@openjdk.java.net about your system, including
27755682Smarkm$0: any error possibly output before this message. Then
27855682Smarkm$0: install a modern shell, or manually run the script
27972445Sassar$0: under such a shell if you do have one."
28072445Sassar  fi
281103423Snectar  exit 1
282233294Sstasfi
28355682Smarkmfi
28472445Sassarfi
28555682SmarkmSHELL=${CONFIG_SHELL-/bin/sh}
28655682Smarkmexport SHELL
28755682Smarkm# Unset more variables known to interfere with behavior of common tools.
288233294SstasCLICOLOR_FORCE= GREP_OPTIONS=
28955682Smarkmunset CLICOLOR_FORCE GREP_OPTIONS
290233294Sstas
291233294Sstas## --------------------- ##
292233294Sstas## M4sh Shell Functions. ##
293233294Sstas## --------------------- ##
294233294Sstas# as_fn_unset VAR
295233294Sstas# ---------------
296233294Sstas# Portably unset VAR.
297233294Sstasas_fn_unset ()
298233294Sstas{
299233294Sstas  { eval $1=; unset $1;}
300233294Sstas}
301233294Sstasas_unset=as_fn_unset
302233294Sstas
303233294Sstas# as_fn_set_status STATUS
304178825Sdfr# -----------------------
30555682Smarkm# Set $? to STATUS, without forking.
306233294Sstasas_fn_set_status ()
307233294Sstas{
308233294Sstas  return $1
309233294Sstas} # as_fn_set_status
310178825Sdfr
311233294Sstas# as_fn_exit STATUS
312233294Sstas# -----------------
313233294Sstas# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314178825Sdfras_fn_exit ()
31590926Snectar{
316233294Sstas  set +e
317233294Sstas  as_fn_set_status $1
318233294Sstas  exit $1
319178825Sdfr} # as_fn_exit
320233294Sstas
321233294Sstas# as_fn_mkdir_p
322233294Sstas# -------------
323178825Sdfr# Create "$as_dir" as a directory, including parents if necessary.
32455682Smarkmas_fn_mkdir_p ()
325233294Sstas{
326233294Sstas
327178825Sdfr  case $as_dir in #(
32855682Smarkm  -*) as_dir=./$as_dir;;
329233294Sstas  esac
330233294Sstas  test -d "$as_dir" || eval $as_mkdir_p || {
331178825Sdfr    as_dirs=
332178825Sdfr    while :; do
333233294Sstas      case $as_dir in #(
334233294Sstas      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335233294Sstas      *) as_qdir=$as_dir;;
336233294Sstas      esac
337233294Sstas      as_dirs="'$as_qdir' $as_dirs"
338233294Sstas      as_dir=`$as_dirname -- "$as_dir" ||
339233294Sstas$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340178825Sdfr	 X"$as_dir" : 'X\(//\)[^/]' \| \
341178825Sdfr	 X"$as_dir" : 'X\(//\)$' \| \
342233294Sstas	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343233294Sstas$as_echo X"$as_dir" |
344178825Sdfr    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345178825Sdfr	    s//\1/
346233294Sstas	    q
347233294Sstas	  }
348178825Sdfr	  /^X\(\/\/\)[^/].*/{
349178825Sdfr	    s//\1/
350233294Sstas	    q
351233294Sstas	  }
352178825Sdfr	  /^X\(\/\/\)$/{
353178825Sdfr	    s//\1/
35490926Snectar	    q
35590926Snectar	  }
356233294Sstas	  /^X\(\/\).*/{
357233294Sstas	    s//\1/
358178825Sdfr	    q
35990926Snectar	  }
360233294Sstas	  s/.*/./; q'`
361233294Sstas      test -d "$as_dir" && break
362178825Sdfr    done
36372445Sassar    test -z "$as_dirs" || eval "mkdir $as_dirs"
364233294Sstas  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365233294Sstas
366178825Sdfr
36755682Smarkm} # as_fn_mkdir_p
368233294Sstas
369233294Sstas# as_fn_executable_p FILE
370178825Sdfr# -----------------------
37155682Smarkm# Test if FILE is an executable regular file.
372233294Sstasas_fn_executable_p ()
373233294Sstas{
374178825Sdfr  test -f "$1" && test -x "$1"
37555682Smarkm} # as_fn_executable_p
376233294Sstas# as_fn_append VAR VALUE
377233294Sstas# ----------------------
378178825Sdfr# Append the text in VALUE to the end of the definition contained in VAR. Take
37955682Smarkm# advantage of any shell optimizations that allow amortized linear growth over
380233294Sstas# repeated appends, instead of the typical quadratic growth present in naive
381233294Sstas# implementations.
382233294Sstasif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
38355682Smarkm  eval 'as_fn_append ()
384233294Sstas  {
385233294Sstas    eval $1+=\$2
386178825Sdfr  }'
38755682Smarkmelse
388233294Sstas  as_fn_append ()
389233294Sstas  {
390178825Sdfr    eval $1=\$$1\$2
39155682Smarkm  }
392233294Sstasfi # as_fn_append
393233294Sstas
394233294Sstas# as_fn_arith ARG...
39590926Snectar# ------------------
396233294Sstas# Perform arithmetic evaluation on the ARGs, and store the result in the
397233294Sstas# global $as_val. Take advantage of shells that can avoid forks. The arguments
398233294Sstas# must be portable across $(()) and expr.
39955682Smarkmif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400233294Sstas  eval 'as_fn_arith ()
401233294Sstas  {
402233294Sstas    as_val=$(( $* ))
40355682Smarkm  }'
404233294Sstaselse
405233294Sstas  as_fn_arith ()
406233294Sstas  {
40755682Smarkm    as_val=`expr "$@" || test $? -eq 1`
408233294Sstas  }
409233294Sstasfi # as_fn_arith
410233294Sstas
411178825Sdfr
412233294Sstas# as_fn_error STATUS ERROR [LINENO LOG_FD]
413233294Sstas# ----------------------------------------
414233294Sstas# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415233294Sstas# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416233294Sstas# script with STATUS, using 1 if that was 0.
417233294Sstasas_fn_error ()
41857416Smarkm{
41957416Smarkm  as_status=$1; test $as_status -eq 0 && as_status=1
420233294Sstas  if test "$4"; then
421233294Sstas    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
42257416Smarkm    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
42357416Smarkm  fi
424233294Sstas  $as_echo "$as_me: error: $2" >&2
425233294Sstas  as_fn_exit $as_status
426178825Sdfr} # as_fn_error
42757419Smarkm
428233294Sstasif expr a : '\(a\)' >/dev/null 2>&1 &&
429233294Sstas   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430178825Sdfr  as_expr=expr
43172445Sassarelse
432233294Sstas  as_expr=false
433233294Sstasfi
434178825Sdfr
435178825Sdfrif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436233294Sstas  as_basename=basename
437233294Sstaselse
438178825Sdfr  as_basename=false
439178825Sdfrfi
440233294Sstas
441233294Sstasif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442178825Sdfr  as_dirname=dirname
443178825Sdfrelse
444233294Sstas  as_dirname=false
445233294Sstasfi
44672445Sassar
44772445Sassaras_me=`$as_basename -- "$0" ||
448233294Sstas$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449233294Sstas	 X"$0" : 'X\(//\)$' \| \
450178825Sdfr	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451178825Sdfr$as_echo X/"$0" |
452233294Sstas    sed '/^.*\/\([^/][^/]*\)\/*$/{
453233294Sstas	    s//\1/
454233294Sstas	    q
45572445Sassar	  }
45672445Sassar	  /^X\/\(\/\/\)$/{
457233294Sstas	    s//\1/
458178825Sdfr	    q
459178825Sdfr	  }
460178825Sdfr	  /^X\/\(\/\).*/{
461178825Sdfr	    s//\1/
462233294Sstas	    q
463178825Sdfr	  }
464178825Sdfr	  s/.*/./; q'`
465233294Sstas
466178825Sdfr# Avoid depending upon Character Ranges.
467178825Sdfras_cr_letters='abcdefghijklmnopqrstuvwxyz'
468178825Sdfras_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469233294Sstasas_cr_Letters=$as_cr_letters$as_cr_LETTERS
470178825Sdfras_cr_digits='0123456789'
471178825Sdfras_cr_alnum=$as_cr_Letters$as_cr_digits
472233294Sstas
473178825Sdfr
474178825Sdfr  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475233294Sstas  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476233294Sstas  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477233294Sstas  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478233294Sstas  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479233294Sstas  sed -n '
480233294Sstas    p
481233294Sstas    /[$]LINENO/=
482233294Sstas  ' <$as_myself |
483233294Sstas    sed '
484233294Sstas      s/[$]LINENO.*/&-/
485233294Sstas      t lineno
486233294Sstas      b
487233294Sstas      :lineno
488233294Sstas      N
489233294Sstas      :loop
490233294Sstas      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491233294Sstas      t loop
492233294Sstas      s/-\n.*//
493233294Sstas    ' >$as_me.lineno &&
494233294Sstas  chmod +x "$as_me.lineno" ||
495233294Sstas    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
49672445Sassar
49772445Sassar  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
49855682Smarkm  # 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
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647BOOTCYCLE_JVM_ARGS_BIG
648JAVA_FLAGS_BIG
649JAVA_FLAGS
650TEST_JOBS
651JOBS
652MEMORY_SIZE
653NUM_CORES
654ENABLE_GENERATE_CLASSLIST
655BUILD_FAILURE_HANDLER
656ENABLE_INTREE_EC
657STLPORT_LIB
658LIBZIP_CAN_USE_MMAP
659LIBDL
660LIBM
661USE_EXTERNAL_LCMS
662LCMS_LIBS
663LCMS_CFLAGS
664USE_EXTERNAL_LIBZ
665USE_EXTERNAL_LIBPNG
666PNG_LIBS
667PNG_CFLAGS
668USE_EXTERNAL_LIBGIF
669USE_EXTERNAL_LIBJPEG
670LLVM_LIBS
671LLVM_LDFLAGS
672LLVM_CFLAGS
673LLVM_CONFIG
674LIBFFI_LIBS
675LIBFFI_CFLAGS
676ALSA_LIBS
677ALSA_CFLAGS
678FREETYPE_BUNDLE_LIB_PATH
679FREETYPE_LIBS
680FREETYPE_CFLAGS
681CUPS_CFLAGS
682X_EXTRA_LIBS
683X_LIBS
684X_PRE_LIBS
685X_CFLAGS
686XMKMF
687MSVCP_DLL
688MSVCR_DLL
689LIBCXX
690STATIC_CXX_SETTING
691FIXPATH_DETACH_FLAG
692FIXPATH
693BUILD_GTEST
694VALID_JVM_FEATURES
695JVM_FEATURES_custom
696JVM_FEATURES_zeroshark
697JVM_FEATURES_zero
698JVM_FEATURES_minimal
699JVM_FEATURES_core
700JVM_FEATURES_client
701JVM_FEATURES_server
702INCLUDE_DTRACE
703GCOV_ENABLED
704STRIP_POLICY
705DEBUG_BINARIES
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712HOTSPOT_SET_WARNINGS_AS_ERRORS
713WARNINGS_AS_ERRORS
714COMPILER_SUPPORTS_TARGET_BITS_FLAG
715ZERO_ARCHFLAG
716LDFLAGS_TESTEXE
717LDFLAGS_TESTLIB
718CXXFLAGS_TESTEXE
719CXXFLAGS_TESTLIB
720CFLAGS_TESTEXE
721CFLAGS_TESTLIB
722OPENJDK_BUILD_JVM_LIBS
723OPENJDK_BUILD_JVM_ASFLAGS
724OPENJDK_BUILD_JVM_LDFLAGS
725OPENJDK_BUILD_JVM_CFLAGS
726OPENJDK_BUILD_LDFLAGS_HASH_STYLE
727OPENJDK_BUILD_LDFLAGS_CXX_JDK
728OPENJDK_BUILD_JDKEXE_LIBS
729OPENJDK_BUILD_JDKLIB_LIBS
730OPENJDK_BUILD_LDFLAGS_JDKEXE
731OPENJDK_BUILD_LDFLAGS_JDKLIB
732OPENJDK_BUILD_CXXFLAGS_JDKEXE
733OPENJDK_BUILD_CXXFLAGS_JDKLIB
734OPENJDK_BUILD_CFLAGS_JDKEXE
735OPENJDK_BUILD_CFLAGS_JDKLIB
736OPENJDK_BUILD_CXXSTD_CXXFLAG
737JVM_LIBS
738JVM_ASFLAGS
739JVM_LDFLAGS
740JVM_CFLAGS
741LDFLAGS_HASH_STYLE
742LDFLAGS_CXX_JDK
743JDKEXE_LIBS
744JDKLIB_LIBS
745LDFLAGS_JDKEXE
746LDFLAGS_JDKLIB
747CXXFLAGS_JDKEXE
748CXXFLAGS_JDKLIB
749CFLAGS_JDKEXE
750CFLAGS_JDKLIB
751MACOSX_VERSION_MIN
752NO_LIFETIME_DSE_CFLAG
753NO_NULL_POINTER_CHECK_CFLAG
754CXXSTD_CXXFLAG
755CXX_O_FLAG_SIZE
756CXX_O_FLAG_NONE
757CXX_O_FLAG_DEBUG
758CXX_O_FLAG_NORM
759CXX_O_FLAG_HI
760CXX_O_FLAG_HIGHEST
761CXX_O_FLAG_HIGHEST_JVM
762C_O_FLAG_SIZE
763C_O_FLAG_NONE
764C_O_FLAG_DEBUG
765C_O_FLAG_NORM
766C_O_FLAG_HI
767C_O_FLAG_HIGHEST
768C_O_FLAG_HIGHEST_JVM
769JVM_CFLAGS_SYMBOLS
770CXXFLAGS_DEBUG_SYMBOLS
771CFLAGS_DEBUG_SYMBOLS
772CXX_FLAG_DEPS
773C_FLAG_DEPS
774SHARED_LIBRARY_FLAGS
775SET_SHARED_LIBRARY_MAPFILE
776SET_SHARED_LIBRARY_NAME
777SET_SHARED_LIBRARY_ORIGIN
778SET_EXECUTABLE_ORIGIN
779CXX_FLAG_REORDER
780C_FLAG_REORDER
781JVM_RCFLAGS
782RC_FLAGS
783AR_OUT_OPTION
784LD_OUT_OPTION
785EXE_OUT_OPTION
786CC_OUT_OPTION
787STRIPFLAGS
788ARFLAGS
789COMPILER_BINDCMD_FILE_FLAG
790COMPILER_COMMAND_FILE_FLAG
791COMPILER_TARGET_BITS_FLAG
792JT_HOME
793JTREGEXE
794HOTSPOT_TOOLCHAIN_TYPE
795USING_BROKEN_SUSE_LD
796PACKAGE_PATH
797USE_CLANG
798HOTSPOT_LD
799HOTSPOT_CXX
800HOTSPOT_RC
801HOTSPOT_MT
802BUILD_AS
803BUILD_LDCXX
804BUILD_LD
805BUILD_STRIP
806BUILD_OBJCOPY
807BUILD_AR
808BUILD_NM
809BUILD_CXX
810BUILD_CC
811BUILD_SYSROOT_LDFLAGS
812BUILD_SYSROOT_CFLAGS
813ac_ct_OBJDUMP
814OBJDUMP
815ac_ct_OBJCOPY
816OBJCOPY
817ac_ct_NM
818ac_ct_STRIP
819GNM
820NM
821STRIP
822MSBUILD
823DUMPBIN
824RC
825MT
826LIPO
827ac_ct_AR
828AR
829AS
830LDCXX
831LD
832CXXCPP
833CPP
834CXX_VERSION_NUMBER
835CC_VERSION_NUMBER
836ac_ct_CXX
837CXXFLAGS
838CXX
839TOOLCHAIN_PATH_CXX
840POTENTIAL_CXX
841OBJEXT
842EXEEXT
843ac_ct_CC
844CPPFLAGS
845LDFLAGS
846CFLAGS
847CC
848TOOLCHAIN_PATH_CC
849POTENTIAL_CC
850TOOLCHAIN_VERSION
851VS_LIB
852VS_INCLUDE
853VS_PATH
854CYGWIN_LINK
855SYSROOT_LDFLAGS
856SYSROOT_CFLAGS
857EXTRA_LDFLAGS
858EXTRA_CXXFLAGS
859EXTRA_CFLAGS
860LEGACY_EXTRA_LDFLAGS
861LEGACY_EXTRA_CXXFLAGS
862LEGACY_EXTRA_CFLAGS
863EXE_SUFFIX
864OBJ_SUFFIX
865STATIC_LIBRARY
866SHARED_LIBRARY
867STATIC_LIBRARY_SUFFIX
868SHARED_LIBRARY_SUFFIX
869LIBRARY_PREFIX
870TOOLCHAIN_TYPE
871STATIC_BUILD
872IMPORT_MODULES_MAKE
873IMPORT_MODULES_SRC
874IMPORT_MODULES_CONF
875IMPORT_MODULES_LIBS
876IMPORT_MODULES_CMDS
877IMPORT_MODULES_CLASSES
878BUILD_HOTSPOT
879HOTSPOT_DIST
880BUILD_OUTPUT
881JDK_TOPDIR
882NASHORN_TOPDIR
883HOTSPOT_TOPDIR
884JAXWS_TOPDIR
885JAXP_TOPDIR
886CORBA_TOPDIR
887LANGTOOLS_TOPDIR
888EXTERNAL_BUILDJDK
889BUILD_JDK
890CREATE_BUILDJDK
891JLINK
892JMOD
893BOOT_JDK_BITS
894JAVAC_FLAGS
895BOOT_JDK_MODULAR
896BOOT_JDK_SOURCETARGET
897JARSIGNER
898JAR
899JAVAH
900JAVAC
901JAVA
902BOOT_JDK
903JAVA_CHECK
904JAVAC_CHECK
905VERSION_IS_GA
906VERSION_SHORT
907VERSION_STRING
908VERSION_NUMBER_FOUR_POSITIONS
909VERSION_NUMBER
910VERSION_OPT
911VERSION_BUILD
912VERSION_PRE
913VERSION_PATCH
914VERSION_SECURITY
915VERSION_MINOR
916VERSION_MAJOR
917MACOSX_BUNDLE_ID_BASE
918MACOSX_BUNDLE_NAME_BASE
919HOTSPOT_VM_DISTRO
920COMPANY_NAME
921JDK_RC_PLATFORM_NAME
922PRODUCT_SUFFIX
923PRODUCT_NAME
924LAUNCHER_NAME
925JLINK_KEEP_PACKAGED_MODULES
926COPYRIGHT_YEAR
927COMPRESS_JARS
928INCLUDE_SA
929UNLIMITED_CRYPTO
930CACERTS_FILE
931BUILD_HEADLESS
932SUPPORT_HEADFUL
933SUPPORT_HEADLESS
934DEFAULT_MAKE_TARGET
935OS_VERSION_MICRO
936OS_VERSION_MINOR
937OS_VERSION_MAJOR
938PKG_CONFIG
939BASH_ARGS
940SETFILE
941CODESIGN
942XATTR
943DSYMUTIL
944IS_GNU_TIME
945PATCH
946DTRACE
947TIME
948STAT
949HG
950READELF
951OTOOL
952LDD
953ZIP
954UNZIP
955TAR_SUPPORTS_TRANSFORM
956TAR_INCLUDE_PARAM
957TAR_CREATE_EXTRA_PARAM
958TAR_TYPE
959FIND_DELETE
960OUTPUT_SYNC
961OUTPUT_SYNC_SUPPORTED
962CHECK_TOOLSDIR_MAKE
963CHECK_TOOLSDIR_GMAKE
964CHECK_MAKE
965CHECK_GMAKE
966MAKE
967PKGHANDLER
968CONFIGURESUPPORT_OUTPUTDIR
969OUTPUT_ROOT
970CONF_NAME
971SPEC
972SDKROOT
973XCODEBUILD
974VALID_JVM_VARIANTS
975JVM_VARIANTS
976DEBUG_LEVEL
977HOTSPOT_DEBUG_LEVEL
978JDK_VARIANT
979USERNAME
980CANONICAL_TOPDIR
981ORIGINAL_TOPDIR
982TOPDIR
983PATH_SEP
984ZERO_ARCHDEF
985HOTSPOT_BUILD_CPU_DEFINE
986HOTSPOT_BUILD_CPU_ARCH
987HOTSPOT_BUILD_CPU
988HOTSPOT_BUILD_OS_TYPE
989HOTSPOT_BUILD_OS
990OPENJDK_BUILD_BUNDLE_PLATFORM
991OPENJDK_BUILD_CPU_BUNDLE
992OPENJDK_BUILD_OS_BUNDLE
993OPENJDK_BUILD_OS_EXPORT_DIR
994OPENJDK_BUILD_CPU_JLI_CFLAGS
995OPENJDK_BUILD_CPU_OSARCH
996OPENJDK_BUILD_CPU_ISADIR
997OPENJDK_BUILD_CPU_LIBDIR
998OPENJDK_BUILD_CPU_LEGACY_LIB
999OPENJDK_BUILD_CPU_LEGACY
1000HOTSPOT_TARGET_CPU_DEFINE
1001HOTSPOT_TARGET_CPU_ARCH
1002HOTSPOT_TARGET_CPU
1003HOTSPOT_TARGET_OS_TYPE
1004HOTSPOT_TARGET_OS
1005DEFINE_CROSS_COMPILE_ARCH
1006LP64
1007OPENJDK_TARGET_BUNDLE_PLATFORM
1008OPENJDK_TARGET_CPU_BUNDLE
1009OPENJDK_TARGET_OS_BUNDLE
1010OPENJDK_TARGET_OS_EXPORT_DIR
1011OPENJDK_TARGET_CPU_JLI_CFLAGS
1012OPENJDK_TARGET_CPU_OSARCH
1013OPENJDK_TARGET_CPU_ISADIR
1014OPENJDK_TARGET_CPU_LIBDIR
1015OPENJDK_TARGET_CPU_LEGACY_LIB
1016OPENJDK_TARGET_CPU_LEGACY
1017REQUIRED_OS_VERSION
1018REQUIRED_OS_NAME
1019COMPILE_TYPE
1020OPENJDK_TARGET_CPU_ENDIAN
1021OPENJDK_TARGET_CPU_BITS
1022OPENJDK_TARGET_CPU_ARCH
1023OPENJDK_TARGET_CPU
1024OPENJDK_TARGET_OS_ENV
1025OPENJDK_TARGET_OS_TYPE
1026OPENJDK_TARGET_OS
1027OPENJDK_BUILD_CPU_ENDIAN
1028OPENJDK_BUILD_CPU_BITS
1029OPENJDK_BUILD_CPU_ARCH
1030OPENJDK_BUILD_CPU
1031OPENJDK_BUILD_OS_ENV
1032OPENJDK_BUILD_OS_TYPE
1033OPENJDK_BUILD_OS
1034OPENJDK_BUILD_AUTOCONF_NAME
1035OPENJDK_TARGET_AUTOCONF_NAME
1036target_os
1037target_vendor
1038target_cpu
1039target
1040host_os
1041host_vendor
1042host_cpu
1043host
1044build_os
1045build_vendor
1046build_cpu
1047build
1048NICE
1049CPIO
1050DF
1051READLINK
1052CYGPATH
1053SED
1054FGREP
1055EGREP
1056GREP
1057AWK
1058XARGS
1059WHICH
1060WC
1061UNIQ
1062UNAME
1063TR
1064TOUCH
1065TEE
1066TAR
1067TAIL
1068SORT
1069SH
1070RMDIR
1071RM
1072PRINTF
1073NAWK
1074MV
1075MKTEMP
1076MKDIR
1077LS
1078LN
1079GZIP
1080GUNZIP
1081HEAD
1082FIND
1083FILE
1084EXPR
1085ECHO
1086DIRNAME
1087DIFF
1088DATE
1089CUT
1090CP
1091COMM
1092CMP
1093CHMOD
1094CAT
1095BASH
1096BASENAME
1097DATE_WHEN_CONFIGURED
1098ORIGINAL_PATH
1099CONFIGURE_COMMAND_LINE
1100target_alias
1101host_alias
1102build_alias
1103LIBS
1104ECHO_T
1105ECHO_N
1106ECHO_C
1107DEFS
1108mandir
1109localedir
1110libdir
1111psdir
1112pdfdir
1113dvidir
1114htmldir
1115infodir
1116docdir
1117oldincludedir
1118includedir
1119localstatedir
1120sharedstatedir
1121sysconfdir
1122datadir
1123datarootdir
1124libexecdir
1125sbindir
1126bindir
1127program_transform_name
1128prefix
1129exec_prefix
1130PACKAGE_URL
1131PACKAGE_BUGREPORT
1132PACKAGE_STRING
1133PACKAGE_VERSION
1134PACKAGE_TARNAME
1135PACKAGE_NAME
1136PATH_SEPARATOR
1137SHELL'
1138ac_subst_files=''
1139ac_user_opts='
1140enable_option_checking
1141with_target_bits
1142enable_openjdk_only
1143with_custom_make_dir
1144with_jdk_variant
1145enable_debug
1146with_debug_level
1147with_jvm_variants
1148with_devkit
1149with_sys_root
1150with_sysroot
1151with_tools_dir
1152with_toolchain_path
1153with_extra_path
1154with_sdk_name
1155with_conf_name
1156with_output_sync
1157with_default_make_target
1158enable_headful
1159with_cacerts_file
1160enable_unlimited_crypto
1161with_copyright_year
1162enable_keep_packaged_modules
1163with_milestone
1164with_update_version
1165with_user_release_suffix
1166with_build_number
1167with_version_string
1168with_version_pre
1169with_version_opt
1170with_version_build
1171with_version_major
1172with_version_minor
1173with_version_security
1174with_version_patch
1175with_boot_jdk
1176with_build_jdk
1177with_add_source_root
1178with_override_source_root
1179with_adds_and_overrides
1180with_override_langtools
1181with_override_corba
1182with_override_jaxp
1183with_override_jaxws
1184with_override_hotspot
1185with_override_nashorn
1186with_override_jdk
1187with_import_hotspot
1188with_import_modules
1189enable_static_build
1190with_toolchain_type
1191with_extra_cflags
1192with_extra_cxxflags
1193with_extra_ldflags
1194with_toolchain_version
1195with_build_devkit
1196with_jtreg
1197enable_warnings_as_errors
1198with_native_debug_symbols
1199enable_debug_symbols
1200enable_zip_debug_info
1201enable_native_coverage
1202enable_dtrace
1203with_jvm_features
1204with_jvm_interpreter
1205enable_hotspot_gtest
1206with_stdc__lib
1207with_msvcr_dll
1208with_msvcp_dll
1209with_x
1210with_cups
1211with_cups_include
1212with_freetype
1213with_freetype_include
1214with_freetype_lib
1215with_freetype_src
1216enable_freetype_bundling
1217with_alsa
1218with_alsa_include
1219with_alsa_lib
1220with_libffi
1221with_libffi_include
1222with_libffi_lib
1223with_libjpeg
1224with_giflib
1225with_libpng
1226with_zlib
1227with_lcms
1228with_dxsdk
1229with_dxsdk_lib
1230with_dxsdk_include
1231enable_jtreg_failure_handler
1232enable_generate_classlist
1233with_num_cores
1234with_memory_size
1235with_jobs
1236with_test_jobs
1237with_boot_jdk_jvmargs
1238with_sjavac_server_java
1239enable_sjavac
1240enable_javac_server
1241enable_icecc
1242enable_precompiled_headers
1243enable_ccache
1244with_ccache_dir
1245'
1246      ac_precious_vars='build_alias
1247host_alias
1248target_alias
1249BASENAME
1250BASH
1251CAT
1252CHMOD
1253CMP
1254COMM
1255CP
1256CUT
1257DATE
1258DIFF
1259DIRNAME
1260ECHO
1261EXPR
1262FILE
1263FIND
1264HEAD
1265GUNZIP
1266GZIP
1267LN
1268LS
1269MKDIR
1270MKTEMP
1271MV
1272NAWK
1273PRINTF
1274RM
1275RMDIR
1276SH
1277SORT
1278TAIL
1279TAR
1280TEE
1281TOUCH
1282TR
1283UNAME
1284UNIQ
1285WC
1286WHICH
1287XARGS
1288AWK
1289GREP
1290EGREP
1291FGREP
1292SED
1293CYGPATH
1294READLINK
1295DF
1296CPIO
1297NICE
1298MAKE
1299UNZIP
1300ZIP
1301LDD
1302OTOOL
1303READELF
1304HG
1305STAT
1306TIME
1307DTRACE
1308PATCH
1309DSYMUTIL
1310XATTR
1311CODESIGN
1312SETFILE
1313PKG_CONFIG
1314JAVA
1315JAVAC
1316JAVAH
1317JAR
1318JARSIGNER
1319CC
1320CFLAGS
1321LDFLAGS
1322LIBS
1323CPPFLAGS
1324CXX
1325CXXFLAGS
1326CCC
1327CPP
1328CXXCPP
1329AS
1330AR
1331LIPO
1332STRIP
1333NM
1334GNM
1335OBJCOPY
1336OBJDUMP
1337BUILD_CC
1338BUILD_CXX
1339BUILD_NM
1340BUILD_AR
1341BUILD_OBJCOPY
1342BUILD_STRIP
1343JTREGEXE
1344XMKMF
1345FREETYPE_CFLAGS
1346FREETYPE_LIBS
1347ALSA_CFLAGS
1348ALSA_LIBS
1349LIBFFI_CFLAGS
1350LIBFFI_LIBS
1351PNG_CFLAGS
1352PNG_LIBS
1353LCMS_CFLAGS
1354LCMS_LIBS
1355ICECC_CMD
1356ICECC_CREATE_ENV
1357ICECC_WRAPPER
1358CCACHE'
1359
1360
1361# Initialize some variables set by options.
1362ac_init_help=
1363ac_init_version=false
1364ac_unrecognized_opts=
1365ac_unrecognized_sep=
1366# The variables have the same names as the options, with
1367# dashes changed to underlines.
1368cache_file=/dev/null
1369exec_prefix=NONE
1370no_create=
1371no_recursion=
1372prefix=NONE
1373program_prefix=NONE
1374program_suffix=NONE
1375program_transform_name=s,x,x,
1376silent=
1377site=
1378srcdir=
1379verbose=
1380x_includes=NONE
1381x_libraries=NONE
1382
1383# Installation directory options.
1384# These are left unexpanded so users can "make install exec_prefix=/foo"
1385# and all the variables that are supposed to be based on exec_prefix
1386# by default will actually change.
1387# Use braces instead of parens because sh, perl, etc. also accept them.
1388# (The list follows the same order as the GNU Coding Standards.)
1389bindir='${exec_prefix}/bin'
1390sbindir='${exec_prefix}/sbin'
1391libexecdir='${exec_prefix}/libexec'
1392datarootdir='${prefix}/share'
1393datadir='${datarootdir}'
1394sysconfdir='${prefix}/etc'
1395sharedstatedir='${prefix}/com'
1396localstatedir='${prefix}/var'
1397includedir='${prefix}/include'
1398oldincludedir='/usr/include'
1399docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1400infodir='${datarootdir}/info'
1401htmldir='${docdir}'
1402dvidir='${docdir}'
1403pdfdir='${docdir}'
1404psdir='${docdir}'
1405libdir='${exec_prefix}/lib'
1406localedir='${datarootdir}/locale'
1407mandir='${datarootdir}/man'
1408
1409ac_prev=
1410ac_dashdash=
1411for ac_option
1412do
1413  # If the previous option needs an argument, assign it.
1414  if test -n "$ac_prev"; then
1415    eval $ac_prev=\$ac_option
1416    ac_prev=
1417    continue
1418  fi
1419
1420  case $ac_option in
1421  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1422  *=)   ac_optarg= ;;
1423  *)    ac_optarg=yes ;;
1424  esac
1425
1426  # Accept the important Cygnus configure options, so we can diagnose typos.
1427
1428  case $ac_dashdash$ac_option in
1429  --)
1430    ac_dashdash=yes ;;
1431
1432  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1433    ac_prev=bindir ;;
1434  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1435    bindir=$ac_optarg ;;
1436
1437  -build | --build | --buil | --bui | --bu)
1438    ac_prev=build_alias ;;
1439  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1440    build_alias=$ac_optarg ;;
1441
1442  -cache-file | --cache-file | --cache-fil | --cache-fi \
1443  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1444    ac_prev=cache_file ;;
1445  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1446  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1447    cache_file=$ac_optarg ;;
1448
1449  --config-cache | -C)
1450    cache_file=config.cache ;;
1451
1452  -datadir | --datadir | --datadi | --datad)
1453    ac_prev=datadir ;;
1454  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1455    datadir=$ac_optarg ;;
1456
1457  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1458  | --dataroo | --dataro | --datar)
1459    ac_prev=datarootdir ;;
1460  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1461  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1462    datarootdir=$ac_optarg ;;
1463
1464  -disable-* | --disable-*)
1465    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1466    # Reject names that are not valid shell variable names.
1467    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1468      as_fn_error $? "invalid feature name: $ac_useropt"
1469    ac_useropt_orig=$ac_useropt
1470    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1471    case $ac_user_opts in
1472      *"
1473"enable_$ac_useropt"
1474"*) ;;
1475      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1476	 ac_unrecognized_sep=', ';;
1477    esac
1478    eval enable_$ac_useropt=no ;;
1479
1480  -docdir | --docdir | --docdi | --doc | --do)
1481    ac_prev=docdir ;;
1482  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1483    docdir=$ac_optarg ;;
1484
1485  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1486    ac_prev=dvidir ;;
1487  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1488    dvidir=$ac_optarg ;;
1489
1490  -enable-* | --enable-*)
1491    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1492    # Reject names that are not valid shell variable names.
1493    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1494      as_fn_error $? "invalid feature name: $ac_useropt"
1495    ac_useropt_orig=$ac_useropt
1496    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1497    case $ac_user_opts in
1498      *"
1499"enable_$ac_useropt"
1500"*) ;;
1501      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1502	 ac_unrecognized_sep=', ';;
1503    esac
1504    eval enable_$ac_useropt=\$ac_optarg ;;
1505
1506  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1507  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1508  | --exec | --exe | --ex)
1509    ac_prev=exec_prefix ;;
1510  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1511  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1512  | --exec=* | --exe=* | --ex=*)
1513    exec_prefix=$ac_optarg ;;
1514
1515  -gas | --gas | --ga | --g)
1516    # Obsolete; use --with-gas.
1517    with_gas=yes ;;
1518
1519  -help | --help | --hel | --he | -h)
1520    ac_init_help=long ;;
1521  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1522    ac_init_help=recursive ;;
1523  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1524    ac_init_help=short ;;
1525
1526  -host | --host | --hos | --ho)
1527    ac_prev=host_alias ;;
1528  -host=* | --host=* | --hos=* | --ho=*)
1529    host_alias=$ac_optarg ;;
1530
1531  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1532    ac_prev=htmldir ;;
1533  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1534  | --ht=*)
1535    htmldir=$ac_optarg ;;
1536
1537  -includedir | --includedir | --includedi | --included | --include \
1538  | --includ | --inclu | --incl | --inc)
1539    ac_prev=includedir ;;
1540  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1541  | --includ=* | --inclu=* | --incl=* | --inc=*)
1542    includedir=$ac_optarg ;;
1543
1544  -infodir | --infodir | --infodi | --infod | --info | --inf)
1545    ac_prev=infodir ;;
1546  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1547    infodir=$ac_optarg ;;
1548
1549  -libdir | --libdir | --libdi | --libd)
1550    ac_prev=libdir ;;
1551  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1552    libdir=$ac_optarg ;;
1553
1554  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1555  | --libexe | --libex | --libe)
1556    ac_prev=libexecdir ;;
1557  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1558  | --libexe=* | --libex=* | --libe=*)
1559    libexecdir=$ac_optarg ;;
1560
1561  -localedir | --localedir | --localedi | --localed | --locale)
1562    ac_prev=localedir ;;
1563  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1564    localedir=$ac_optarg ;;
1565
1566  -localstatedir | --localstatedir | --localstatedi | --localstated \
1567  | --localstate | --localstat | --localsta | --localst | --locals)
1568    ac_prev=localstatedir ;;
1569  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1570  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1571    localstatedir=$ac_optarg ;;
1572
1573  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1574    ac_prev=mandir ;;
1575  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1576    mandir=$ac_optarg ;;
1577
1578  -nfp | --nfp | --nf)
1579    # Obsolete; use --without-fp.
1580    with_fp=no ;;
1581
1582  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1583  | --no-cr | --no-c | -n)
1584    no_create=yes ;;
1585
1586  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1587  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1588    no_recursion=yes ;;
1589
1590  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1591  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1592  | --oldin | --oldi | --old | --ol | --o)
1593    ac_prev=oldincludedir ;;
1594  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1595  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1596  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1597    oldincludedir=$ac_optarg ;;
1598
1599  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1600    ac_prev=prefix ;;
1601  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1602    prefix=$ac_optarg ;;
1603
1604  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1605  | --program-pre | --program-pr | --program-p)
1606    ac_prev=program_prefix ;;
1607  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1608  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1609    program_prefix=$ac_optarg ;;
1610
1611  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1612  | --program-suf | --program-su | --program-s)
1613    ac_prev=program_suffix ;;
1614  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1615  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1616    program_suffix=$ac_optarg ;;
1617
1618  -program-transform-name | --program-transform-name \
1619  | --program-transform-nam | --program-transform-na \
1620  | --program-transform-n | --program-transform- \
1621  | --program-transform | --program-transfor \
1622  | --program-transfo | --program-transf \
1623  | --program-trans | --program-tran \
1624  | --progr-tra | --program-tr | --program-t)
1625    ac_prev=program_transform_name ;;
1626  -program-transform-name=* | --program-transform-name=* \
1627  | --program-transform-nam=* | --program-transform-na=* \
1628  | --program-transform-n=* | --program-transform-=* \
1629  | --program-transform=* | --program-transfor=* \
1630  | --program-transfo=* | --program-transf=* \
1631  | --program-trans=* | --program-tran=* \
1632  | --progr-tra=* | --program-tr=* | --program-t=*)
1633    program_transform_name=$ac_optarg ;;
1634
1635  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1636    ac_prev=pdfdir ;;
1637  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1638    pdfdir=$ac_optarg ;;
1639
1640  -psdir | --psdir | --psdi | --psd | --ps)
1641    ac_prev=psdir ;;
1642  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1643    psdir=$ac_optarg ;;
1644
1645  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1646  | -silent | --silent | --silen | --sile | --sil)
1647    silent=yes ;;
1648
1649  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1650    ac_prev=sbindir ;;
1651  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1652  | --sbi=* | --sb=*)
1653    sbindir=$ac_optarg ;;
1654
1655  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1656  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1657  | --sharedst | --shareds | --shared | --share | --shar \
1658  | --sha | --sh)
1659    ac_prev=sharedstatedir ;;
1660  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1661  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1662  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1663  | --sha=* | --sh=*)
1664    sharedstatedir=$ac_optarg ;;
1665
1666  -site | --site | --sit)
1667    ac_prev=site ;;
1668  -site=* | --site=* | --sit=*)
1669    site=$ac_optarg ;;
1670
1671  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1672    ac_prev=srcdir ;;
1673  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1674    srcdir=$ac_optarg ;;
1675
1676  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1677  | --syscon | --sysco | --sysc | --sys | --sy)
1678    ac_prev=sysconfdir ;;
1679  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1680  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1681    sysconfdir=$ac_optarg ;;
1682
1683  -target | --target | --targe | --targ | --tar | --ta | --t)
1684    ac_prev=target_alias ;;
1685  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1686    target_alias=$ac_optarg ;;
1687
1688  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1689    verbose=yes ;;
1690
1691  -version | --version | --versio | --versi | --vers | -V)
1692    ac_init_version=: ;;
1693
1694  -with-* | --with-*)
1695    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1696    # Reject names that are not valid shell variable names.
1697    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1698      as_fn_error $? "invalid package name: $ac_useropt"
1699    ac_useropt_orig=$ac_useropt
1700    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1701    case $ac_user_opts in
1702      *"
1703"with_$ac_useropt"
1704"*) ;;
1705      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1706	 ac_unrecognized_sep=', ';;
1707    esac
1708    eval with_$ac_useropt=\$ac_optarg ;;
1709
1710  -without-* | --without-*)
1711    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1712    # Reject names that are not valid shell variable names.
1713    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1714      as_fn_error $? "invalid package name: $ac_useropt"
1715    ac_useropt_orig=$ac_useropt
1716    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1717    case $ac_user_opts in
1718      *"
1719"with_$ac_useropt"
1720"*) ;;
1721      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1722	 ac_unrecognized_sep=', ';;
1723    esac
1724    eval with_$ac_useropt=no ;;
1725
1726  --x)
1727    # Obsolete; use --with-x.
1728    with_x=yes ;;
1729
1730  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1731  | --x-incl | --x-inc | --x-in | --x-i)
1732    ac_prev=x_includes ;;
1733  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1734  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1735    x_includes=$ac_optarg ;;
1736
1737  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1738  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1739    ac_prev=x_libraries ;;
1740  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1741  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1742    x_libraries=$ac_optarg ;;
1743
1744  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1745Try \`$0 --help' for more information"
1746    ;;
1747
1748  *=*)
1749    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1750    # Reject names that are not valid shell variable names.
1751    case $ac_envvar in #(
1752      '' | [0-9]* | *[!_$as_cr_alnum]* )
1753      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1754    esac
1755    eval $ac_envvar=\$ac_optarg
1756    export $ac_envvar ;;
1757
1758  *)
1759    # FIXME: should be removed in autoconf 3.0.
1760    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1761    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1762      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1763    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1764    ;;
1765
1766  esac
1767done
1768
1769if test -n "$ac_prev"; then
1770  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1771  as_fn_error $? "missing argument to $ac_option"
1772fi
1773
1774if test -n "$ac_unrecognized_opts"; then
1775  case $enable_option_checking in
1776    no) ;;
1777    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1778    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1779  esac
1780fi
1781
1782# Check all directory arguments for consistency.
1783for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1784		datadir sysconfdir sharedstatedir localstatedir includedir \
1785		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1786		libdir localedir mandir
1787do
1788  eval ac_val=\$$ac_var
1789  # Remove trailing slashes.
1790  case $ac_val in
1791    */ )
1792      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1793      eval $ac_var=\$ac_val;;
1794  esac
1795  # Be sure to have absolute directory names.
1796  case $ac_val in
1797    [\\/$]* | ?:[\\/]* )  continue;;
1798    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1799  esac
1800  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1801done
1802
1803# There might be people who depend on the old broken behavior: `$host'
1804# used to hold the argument of --host etc.
1805# FIXME: To remove some day.
1806build=$build_alias
1807host=$host_alias
1808target=$target_alias
1809
1810# FIXME: To remove some day.
1811if test "x$host_alias" != x; then
1812  if test "x$build_alias" = x; then
1813    cross_compiling=maybe
1814  elif test "x$build_alias" != "x$host_alias"; then
1815    cross_compiling=yes
1816  fi
1817fi
1818
1819ac_tool_prefix=
1820test -n "$host_alias" && ac_tool_prefix=$host_alias-
1821
1822test "$silent" = yes && exec 6>/dev/null
1823
1824
1825ac_pwd=`pwd` && test -n "$ac_pwd" &&
1826ac_ls_di=`ls -di .` &&
1827ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1828  as_fn_error $? "working directory cannot be determined"
1829test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1830  as_fn_error $? "pwd does not report name of working directory"
1831
1832
1833# Find the source files, if location was not specified.
1834if test -z "$srcdir"; then
1835  ac_srcdir_defaulted=yes
1836  # Try the directory containing this script, then the parent directory.
1837  ac_confdir=`$as_dirname -- "$as_myself" ||
1838$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1839	 X"$as_myself" : 'X\(//\)[^/]' \| \
1840	 X"$as_myself" : 'X\(//\)$' \| \
1841	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1842$as_echo X"$as_myself" |
1843    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)[^/].*/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\/\)$/{
1852	    s//\1/
1853	    q
1854	  }
1855	  /^X\(\/\).*/{
1856	    s//\1/
1857	    q
1858	  }
1859	  s/.*/./; q'`
1860  srcdir=$ac_confdir
1861  if test ! -r "$srcdir/$ac_unique_file"; then
1862    srcdir=..
1863  fi
1864else
1865  ac_srcdir_defaulted=no
1866fi
1867if test ! -r "$srcdir/$ac_unique_file"; then
1868  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1869  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1870fi
1871ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1872ac_abs_confdir=`(
1873	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1874	pwd)`
1875# When building in place, set srcdir=.
1876if test "$ac_abs_confdir" = "$ac_pwd"; then
1877  srcdir=.
1878fi
1879# Remove unnecessary trailing slashes from srcdir.
1880# Double slashes in file names in object file debugging info
1881# mess up M-x gdb in Emacs.
1882case $srcdir in
1883*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1884esac
1885for ac_var in $ac_precious_vars; do
1886  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_env_${ac_var}_value=\$${ac_var}
1888  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1889  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1890done
1891
1892#
1893# Report the --help message.
1894#
1895if test "$ac_init_help" = "long"; then
1896  # Omit some internal or obsolete options to make the list less imposing.
1897  # This message is too long to be a string in the A/UX 3.1 sh.
1898  cat <<_ACEOF
1899\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1900
1901Usage: $0 [OPTION]... [VAR=VALUE]...
1902
1903To assign environment variables (e.g., CC, CFLAGS...), specify them as
1904VAR=VALUE.  See below for descriptions of some of the useful variables.
1905
1906Defaults for the options are specified in brackets.
1907
1908Configuration:
1909  -h, --help              display this help and exit
1910      --help=short        display options specific to this package
1911      --help=recursive    display the short help of all the included packages
1912  -V, --version           display version information and exit
1913  -q, --quiet, --silent   do not print \`checking ...' messages
1914      --cache-file=FILE   cache test results in FILE [disabled]
1915  -C, --config-cache      alias for \`--cache-file=config.cache'
1916  -n, --no-create         do not create output files
1917      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1918
1919Installation directories:
1920  --prefix=PREFIX         install architecture-independent files in PREFIX
1921                          [$ac_default_prefix]
1922  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1923                          [PREFIX]
1924
1925By default, \`make install' will install all the files in
1926\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1927an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1928for instance \`--prefix=\$HOME'.
1929
1930For better control, use the options below.
1931
1932Fine tuning of the installation directories:
1933  --bindir=DIR            user executables [EPREFIX/bin]
1934  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1935  --libexecdir=DIR        program executables [EPREFIX/libexec]
1936  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1937  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1938  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1939  --libdir=DIR            object code libraries [EPREFIX/lib]
1940  --includedir=DIR        C header files [PREFIX/include]
1941  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1942  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1943  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1944  --infodir=DIR           info documentation [DATAROOTDIR/info]
1945  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1946  --mandir=DIR            man documentation [DATAROOTDIR/man]
1947  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1948  --htmldir=DIR           html documentation [DOCDIR]
1949  --dvidir=DIR            dvi documentation [DOCDIR]
1950  --pdfdir=DIR            pdf documentation [DOCDIR]
1951  --psdir=DIR             ps documentation [DOCDIR]
1952_ACEOF
1953
1954  cat <<\_ACEOF
1955
1956X features:
1957  --x-includes=DIR    X include files are in DIR
1958  --x-libraries=DIR   X library files are in DIR
1959
1960System types:
1961  --build=BUILD     configure for building on BUILD [guessed]
1962  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1963  --target=TARGET   configure for building compilers for TARGET [HOST]
1964_ACEOF
1965fi
1966
1967if test -n "$ac_init_help"; then
1968  case $ac_init_help in
1969     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1970   esac
1971  cat <<\_ACEOF
1972
1973Optional Features:
1974  --disable-option-checking  ignore unrecognized --enable/--with options
1975  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1976  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1977  --enable-openjdk-only   suppress building custom source even if present
1978                          [disabled]
1979  --enable-debug          set the debug level to fastdebug (shorthand for
1980                          --with-debug-level=fastdebug) [disabled]
1981  --disable-headful       disable building headful support (graphical UI
1982                          support) [enabled]
1983  --enable-unlimited-crypto
1984                          Enable unlimited crypto policy [disabled]
1985  --disable-keep-packaged-modules
1986                          Do not keep packaged modules in jdk image [enable]
1987  --enable-static-build   enable static library build [disabled]
1988  --disable-warnings-as-errors
1989                          do not consider native warnings to be an error
1990                          [enabled]
1991  --enable-debug-symbols  Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-zip-debug-info Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --enable-native-coverage
1996                          enable native compilation with code coverage
1997                          data[disabled]
1998  --enable-dtrace[=yes/no/auto]
1999                          enable dtrace. Default is auto, where dtrace is
2000                          enabled if all dependencies are present.
2001  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2002  --disable-freetype-bundling
2003                          disable bundling of the freetype library with the
2004                          build result [enabled on Windows or when using
2005                          --with-freetype, disabled otherwise]
2006  --enable-jtreg-failure-handler
2007                          forces build of the jtreg failure handler to be
2008                          enabled, missing dependencies become fatal errors.
2009                          Default is auto, where the failure handler is built
2010                          if all dependencies are present and otherwise just
2011                          disabled.
2012  --disable-generate-classlist
2013                          forces enabling or disabling of the generation of a
2014                          CDS classlist at build time. Default is to generate
2015                          it when either the server or client JVMs are built.
2016  --enable-sjavac         use sjavac to do fast incremental compiles
2017                          [disabled]
2018  --disable-javac-server  disable javac server [enabled]
2019  --enable-icecc          enable distribted compilation of native code using
2020                          icecc/icecream [disabled]
2021  --disable-precompiled-headers
2022                          disable using precompiled headers when compiling C++
2023                          [enabled]
2024  --enable-ccache         enable using ccache to speed up recompilations
2025                          [disabled]
2026
2027Optional Packages:
2028  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2029  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2030  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2031                          support it), e.g. --with-target-bits=32 [guessed]
2032  --with-custom-make-dir  Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-jdk-variant      JDK variant to build (normal) [normal]
2035  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2036                          optimized) [release]
2037  --with-jvm-variants     JVM variants (separated by commas) to build
2038                          (server,client,minimal,core,zero,zeroshark,custom)
2039                          [server]
2040  --with-devkit           use this devkit for compilers, tools and resources
2041  --with-sys-root         alias for --with-sysroot for backwards compatability
2042  --with-sysroot          use this directory as sysroot
2043  --with-tools-dir        alias for --with-toolchain-path for backwards
2044                          compatibility
2045  --with-toolchain-path   prepend these directories when searching for
2046                          toolchain binaries (compilers etc)
2047  --with-extra-path       prepend these directories to the default path
2048  --with-sdk-name         use the platform SDK of the given name. [macosx]
2049  --with-conf-name        use this as the name of the configuration [generated
2050                          from important configuration options]
2051  --with-output-sync      set make output sync type if supported by make.
2052                          [recurse]
2053  --with-default-make-target
2054                          set the default make target [exploded-image]
2055  --with-cacerts-file     specify alternative cacerts file
2056  --with-copyright-year   Set copyright year value for build [current year]
2057  --with-milestone        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-update-version   Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-user-release-suffix
2062                          Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-build-number     Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-version-string   Set version string [calculated]
2067  --with-version-pre      Set the base part of the version 'PRE' field
2068                          (pre-release identifier) ['internal']
2069  --with-version-opt      Set version 'OPT' field (build metadata)
2070                          [<timestamp>.<user>.<dirname>]
2071  --with-version-build    Set version 'BUILD' field (build number) [not
2072                          specified]
2073  --with-version-major    Set version 'MAJOR' field (first number) [current
2074                          source value]
2075  --with-version-minor    Set version 'MINOR' field (second number) [current
2076                          source value]
2077  --with-version-security Set version 'SECURITY' field (third number) [current
2078                          source value]
2079  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2080                          specified]
2081  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2082  --with-build-jdk        path to JDK of same version as is being built[the
2083                          newly built JDK]
2084  --with-add-source-root  Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-source-root
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-adds-and-overrides
2090                          Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-langtools
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-corba   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxp    Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jaxws   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-hotspot Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-nashorn Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jdk     Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-import-hotspot   import hotspot binaries from this jdk image or
2108                          hotspot build dist dir instead of building from
2109                          source
2110  --with-import-modules   import a set of prebuilt modules either as a zip
2111                          file or an exploded directory
2112  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2113                          to show possible values [platform dependent]
2114  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2115  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2116  --with-extra-ldflags    extra flags to be used when linking jdk
2117  --with-toolchain-version
2118                          the version of the toolchain to look for, use
2119                          '--help' to show possible values [platform
2120                          dependent]
2121  --with-build-devkit     Devkit to use for the build platform toolchain
2122  --with-jtreg            Regression Test Harness [probed]
2123  --with-native-debug-symbols
2124                          set the native debug symbol configuration (none,
2125                          internal, external, zipped) [varying]
2126  --with-jvm-features     additional JVM features to enable (separated by
2127                          comma), use '--help' to show possible values [none]
2128  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2129                          compatibility and is ignored
2130  --with-stdc++lib=<static>,<dynamic>,<default>
2131                          force linking of the C++ runtime on Linux to either
2132                          static or dynamic, default is static with dynamic as
2133                          fallback
2134  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2135                          (Windows only) [probed]
2136  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2137                          (Windows only) [probed]
2138  --with-x                use the X Window System
2139  --with-cups             specify prefix directory for the cups package
2140                          (expecting the headers under PATH/include)
2141  --with-cups-include     specify directory for the cups include files
2142  --with-freetype         specify prefix directory for the freetype package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-freetype-include specify directory for the freetype include files
2146  --with-freetype-lib     specify directory for the freetype library
2147  --with-freetype-src     specify directory with freetype sources to
2148                          automatically build the library (experimental,
2149                          Windows-only)
2150  --with-alsa             specify prefix directory for the alsa package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-alsa-include     specify directory for the alsa include files
2154  --with-alsa-lib         specify directory for the alsa library
2155  --with-libffi           specify prefix directory for the libffi package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-libffi-include   specify directory for the libffi include files
2159  --with-libffi-lib       specify directory for the libffi library
2160  --with-libjpeg          use libjpeg from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-giflib           use giflib from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-libpng           use libpng from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-zlib             use zlib from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-lcms             use lcms2 from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-dxsdk            Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-include    Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-num-cores        number of cores in the build system, e.g.
2177                          --with-num-cores=8 [probed]
2178  --with-memory-size      memory (in MB) available in the build system, e.g.
2179                          --with-memory-size=1024 [probed]
2180  --with-jobs             number of parallel jobs to let make run [calculated
2181                          based on cores and memory]
2182  --with-test-jobs        number of parallel tests jobs to run [based on build
2183                          jobs]
2184  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2185                          invocations of boot JDK, overriding the default
2186                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2187                          -enableassertions"
2188  --with-sjavac-server-java
2189                          use this java binary for running the sjavac
2190                          background server [Boot JDK java]
2191  --with-ccache-dir       where to store ccache files [~/.ccache]
2192
2193Some influential environment variables:
2194  BASENAME    Override default value for BASENAME
2195  BASH        Override default value for BASH
2196  CAT         Override default value for CAT
2197  CHMOD       Override default value for CHMOD
2198  CMP         Override default value for CMP
2199  COMM        Override default value for COMM
2200  CP          Override default value for CP
2201  CUT         Override default value for CUT
2202  DATE        Override default value for DATE
2203  DIFF        Override default value for DIFF
2204  DIRNAME     Override default value for DIRNAME
2205  ECHO        Override default value for ECHO
2206  EXPR        Override default value for EXPR
2207  FILE        Override default value for FILE
2208  FIND        Override default value for FIND
2209  HEAD        Override default value for HEAD
2210  GUNZIP      Override default value for GUNZIP
2211  GZIP        Override default value for GZIP
2212  LN          Override default value for LN
2213  LS          Override default value for LS
2214  MKDIR       Override default value for MKDIR
2215  MKTEMP      Override default value for MKTEMP
2216  MV          Override default value for MV
2217  NAWK        Override default value for NAWK
2218  PRINTF      Override default value for PRINTF
2219  RM          Override default value for RM
2220  RMDIR       Override default value for RMDIR
2221  SH          Override default value for SH
2222  SORT        Override default value for SORT
2223  TAIL        Override default value for TAIL
2224  TAR         Override default value for TAR
2225  TEE         Override default value for TEE
2226  TOUCH       Override default value for TOUCH
2227  TR          Override default value for TR
2228  UNAME       Override default value for UNAME
2229  UNIQ        Override default value for UNIQ
2230  WC          Override default value for WC
2231  WHICH       Override default value for WHICH
2232  XARGS       Override default value for XARGS
2233  AWK         Override default value for AWK
2234  GREP        Override default value for GREP
2235  EGREP       Override default value for EGREP
2236  FGREP       Override default value for FGREP
2237  SED         Override default value for SED
2238  CYGPATH     Override default value for CYGPATH
2239  READLINK    Override default value for READLINK
2240  DF          Override default value for DF
2241  CPIO        Override default value for CPIO
2242  NICE        Override default value for NICE
2243  MAKE        Override default value for MAKE
2244  UNZIP       Override default value for UNZIP
2245  ZIP         Override default value for ZIP
2246  LDD         Override default value for LDD
2247  OTOOL       Override default value for OTOOL
2248  READELF     Override default value for READELF
2249  HG          Override default value for HG
2250  STAT        Override default value for STAT
2251  TIME        Override default value for TIME
2252  DTRACE      Override default value for DTRACE
2253  PATCH       Override default value for PATCH
2254  DSYMUTIL    Override default value for DSYMUTIL
2255  XATTR       Override default value for XATTR
2256  CODESIGN    Override default value for CODESIGN
2257  SETFILE     Override default value for SETFILE
2258  PKG_CONFIG  path to pkg-config utility
2259  JAVA        Override default value for JAVA
2260  JAVAC       Override default value for JAVAC
2261  JAVAH       Override default value for JAVAH
2262  JAR         Override default value for JAR
2263  JARSIGNER   Override default value for JARSIGNER
2264  CC          C compiler command
2265  CFLAGS      C compiler flags
2266  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2267              nonstandard directory <lib dir>
2268  LIBS        libraries to pass to the linker, e.g. -l<library>
2269  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2270              you have headers in a nonstandard directory <include dir>
2271  CXX         C++ compiler command
2272  CXXFLAGS    C++ compiler flags
2273  CPP         C preprocessor
2274  CXXCPP      C++ preprocessor
2275  AS          Override default value for AS
2276  AR          Override default value for AR
2277  LIPO        Override default value for LIPO
2278  STRIP       Override default value for STRIP
2279  NM          Override default value for NM
2280  GNM         Override default value for GNM
2281  OBJCOPY     Override default value for OBJCOPY
2282  OBJDUMP     Override default value for OBJDUMP
2283  BUILD_CC    Override default value for BUILD_CC
2284  BUILD_CXX   Override default value for BUILD_CXX
2285  BUILD_NM    Override default value for BUILD_NM
2286  BUILD_AR    Override default value for BUILD_AR
2287  BUILD_OBJCOPY
2288              Override default value for BUILD_OBJCOPY
2289  BUILD_STRIP Override default value for BUILD_STRIP
2290  JTREGEXE    Override default value for JTREGEXE
2291  XMKMF       Path to xmkmf, Makefile generator for X Window System
2292  FREETYPE_CFLAGS
2293              C compiler flags for FREETYPE, overriding pkg-config
2294  FREETYPE_LIBS
2295              linker flags for FREETYPE, overriding pkg-config
2296  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2297  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2298  LIBFFI_CFLAGS
2299              C compiler flags for LIBFFI, overriding pkg-config
2300  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2301  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2302  PNG_LIBS    linker flags for PNG, overriding pkg-config
2303  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2304  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2305  ICECC_CMD   Override default value for ICECC_CMD
2306  ICECC_CREATE_ENV
2307              Override default value for ICECC_CREATE_ENV
2308  ICECC_WRAPPER
2309              Override default value for ICECC_WRAPPER
2310  CCACHE      Override default value for CCACHE
2311
2312Use these variables to override the choices made by `configure' or to help
2313it to find libraries and programs with nonstandard names/locations.
2314
2315Report bugs to <build-dev@openjdk.java.net>.
2316OpenJDK home page: <http://openjdk.java.net>.
2317_ACEOF
2318ac_status=$?
2319fi
2320
2321if test "$ac_init_help" = "recursive"; then
2322  # If there are subdirs, report their specific --help.
2323  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2324    test -d "$ac_dir" ||
2325      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2326      continue
2327    ac_builddir=.
2328
2329case "$ac_dir" in
2330.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331*)
2332  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2333  # A ".." for each directory in $ac_dir_suffix.
2334  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2335  case $ac_top_builddir_sub in
2336  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2338  esac ;;
2339esac
2340ac_abs_top_builddir=$ac_pwd
2341ac_abs_builddir=$ac_pwd$ac_dir_suffix
2342# for backward compatibility:
2343ac_top_builddir=$ac_top_build_prefix
2344
2345case $srcdir in
2346  .)  # We are building in place.
2347    ac_srcdir=.
2348    ac_top_srcdir=$ac_top_builddir_sub
2349    ac_abs_top_srcdir=$ac_pwd ;;
2350  [\\/]* | ?:[\\/]* )  # Absolute name.
2351    ac_srcdir=$srcdir$ac_dir_suffix;
2352    ac_top_srcdir=$srcdir
2353    ac_abs_top_srcdir=$srcdir ;;
2354  *) # Relative name.
2355    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2356    ac_top_srcdir=$ac_top_build_prefix$srcdir
2357    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2358esac
2359ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2360
2361    cd "$ac_dir" || { ac_status=$?; continue; }
2362    # Check for guested configure.
2363    if test -f "$ac_srcdir/configure.gnu"; then
2364      echo &&
2365      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2366    elif test -f "$ac_srcdir/configure"; then
2367      echo &&
2368      $SHELL "$ac_srcdir/configure" --help=recursive
2369    else
2370      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2371    fi || ac_status=$?
2372    cd "$ac_pwd" || { ac_status=$?; break; }
2373  done
2374fi
2375
2376test -n "$ac_init_help" && exit $ac_status
2377if $ac_init_version; then
2378  cat <<\_ACEOF
2379OpenJDK configure jdk9
2380generated by GNU Autoconf 2.69
2381
2382Copyright (C) 2012 Free Software Foundation, Inc.
2383This configure script is free software; the Free Software Foundation
2384gives unlimited permission to copy, distribute and modify it.
2385_ACEOF
2386  exit
2387fi
2388
2389## ------------------------ ##
2390## Autoconf initialization. ##
2391## ------------------------ ##
2392
2393# ac_fn_c_try_compile LINENO
2394# --------------------------
2395# Try to compile conftest.$ac_ext, and return whether this succeeded.
2396ac_fn_c_try_compile ()
2397{
2398  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399  rm -f conftest.$ac_objext
2400  if { { ac_try="$ac_compile"
2401case "(($ac_try" in
2402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2403  *) ac_try_echo=$ac_try;;
2404esac
2405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2406$as_echo "$ac_try_echo"; } >&5
2407  (eval "$ac_compile") 2>conftest.err
2408  ac_status=$?
2409  if test -s conftest.err; then
2410    grep -v '^ *+' conftest.err >conftest.er1
2411    cat conftest.er1 >&5
2412    mv -f conftest.er1 conftest.err
2413  fi
2414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2415  test $ac_status = 0; } && {
2416	 test -z "$ac_c_werror_flag" ||
2417	 test ! -s conftest.err
2418       } && test -s conftest.$ac_objext; then :
2419  ac_retval=0
2420else
2421  $as_echo "$as_me: failed program was:" >&5
2422sed 's/^/| /' conftest.$ac_ext >&5
2423
2424	ac_retval=1
2425fi
2426  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427  as_fn_set_status $ac_retval
2428
2429} # ac_fn_c_try_compile
2430
2431# ac_fn_cxx_try_compile LINENO
2432# ----------------------------
2433# Try to compile conftest.$ac_ext, and return whether this succeeded.
2434ac_fn_cxx_try_compile ()
2435{
2436  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437  rm -f conftest.$ac_objext
2438  if { { ac_try="$ac_compile"
2439case "(($ac_try" in
2440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2441  *) ac_try_echo=$ac_try;;
2442esac
2443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2444$as_echo "$ac_try_echo"; } >&5
2445  (eval "$ac_compile") 2>conftest.err
2446  ac_status=$?
2447  if test -s conftest.err; then
2448    grep -v '^ *+' conftest.err >conftest.er1
2449    cat conftest.er1 >&5
2450    mv -f conftest.er1 conftest.err
2451  fi
2452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2453  test $ac_status = 0; } && {
2454	 test -z "$ac_cxx_werror_flag" ||
2455	 test ! -s conftest.err
2456       } && test -s conftest.$ac_objext; then :
2457  ac_retval=0
2458else
2459  $as_echo "$as_me: failed program was:" >&5
2460sed 's/^/| /' conftest.$ac_ext >&5
2461
2462	ac_retval=1
2463fi
2464  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2465  as_fn_set_status $ac_retval
2466
2467} # ac_fn_cxx_try_compile
2468
2469# ac_fn_c_try_cpp LINENO
2470# ----------------------
2471# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2472ac_fn_c_try_cpp ()
2473{
2474  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2475  if { { ac_try="$ac_cpp conftest.$ac_ext"
2476case "(($ac_try" in
2477  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2478  *) ac_try_echo=$ac_try;;
2479esac
2480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2481$as_echo "$ac_try_echo"; } >&5
2482  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2483  ac_status=$?
2484  if test -s conftest.err; then
2485    grep -v '^ *+' conftest.err >conftest.er1
2486    cat conftest.er1 >&5
2487    mv -f conftest.er1 conftest.err
2488  fi
2489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2490  test $ac_status = 0; } > conftest.i && {
2491	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2492	 test ! -s conftest.err
2493       }; then :
2494  ac_retval=0
2495else
2496  $as_echo "$as_me: failed program was:" >&5
2497sed 's/^/| /' conftest.$ac_ext >&5
2498
2499    ac_retval=1
2500fi
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502  as_fn_set_status $ac_retval
2503
2504} # ac_fn_c_try_cpp
2505
2506# ac_fn_cxx_try_cpp LINENO
2507# ------------------------
2508# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2509ac_fn_cxx_try_cpp ()
2510{
2511  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2512  if { { ac_try="$ac_cpp conftest.$ac_ext"
2513case "(($ac_try" in
2514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2515  *) ac_try_echo=$ac_try;;
2516esac
2517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2518$as_echo "$ac_try_echo"; } >&5
2519  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2520  ac_status=$?
2521  if test -s conftest.err; then
2522    grep -v '^ *+' conftest.err >conftest.er1
2523    cat conftest.er1 >&5
2524    mv -f conftest.er1 conftest.err
2525  fi
2526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2527  test $ac_status = 0; } > conftest.i && {
2528	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2529	 test ! -s conftest.err
2530       }; then :
2531  ac_retval=0
2532else
2533  $as_echo "$as_me: failed program was:" >&5
2534sed 's/^/| /' conftest.$ac_ext >&5
2535
2536    ac_retval=1
2537fi
2538  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539  as_fn_set_status $ac_retval
2540
2541} # ac_fn_cxx_try_cpp
2542
2543# ac_fn_c_try_link LINENO
2544# -----------------------
2545# Try to link conftest.$ac_ext, and return whether this succeeded.
2546ac_fn_c_try_link ()
2547{
2548  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2549  rm -f conftest.$ac_objext conftest$ac_exeext
2550  if { { ac_try="$ac_link"
2551case "(($ac_try" in
2552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2553  *) ac_try_echo=$ac_try;;
2554esac
2555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2556$as_echo "$ac_try_echo"; } >&5
2557  (eval "$ac_link") 2>conftest.err
2558  ac_status=$?
2559  if test -s conftest.err; then
2560    grep -v '^ *+' conftest.err >conftest.er1
2561    cat conftest.er1 >&5
2562    mv -f conftest.er1 conftest.err
2563  fi
2564  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2565  test $ac_status = 0; } && {
2566	 test -z "$ac_c_werror_flag" ||
2567	 test ! -s conftest.err
2568       } && test -s conftest$ac_exeext && {
2569	 test "$cross_compiling" = yes ||
2570	 test -x conftest$ac_exeext
2571       }; then :
2572  ac_retval=0
2573else
2574  $as_echo "$as_me: failed program was:" >&5
2575sed 's/^/| /' conftest.$ac_ext >&5
2576
2577	ac_retval=1
2578fi
2579  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2580  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2581  # interfere with the next link command; also delete a directory that is
2582  # left behind by Apple's compiler.  We do this before executing the actions.
2583  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585  as_fn_set_status $ac_retval
2586
2587} # ac_fn_c_try_link
2588
2589# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2590# ---------------------------------------------------------
2591# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2592# the include files in INCLUDES and setting the cache variable VAR
2593# accordingly.
2594ac_fn_cxx_check_header_mongrel ()
2595{
2596  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2597  if eval \${$3+:} false; then :
2598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2599$as_echo_n "checking for $2... " >&6; }
2600if eval \${$3+:} false; then :
2601  $as_echo_n "(cached) " >&6
2602fi
2603eval ac_res=\$$3
2604	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606else
2607  # Is the header compilable?
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2609$as_echo_n "checking $2 usability... " >&6; }
2610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_header_compiler=yes
2617else
2618  ac_header_compiler=no
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2622$as_echo "$ac_header_compiler" >&6; }
2623
2624# Is the header present?
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2626$as_echo_n "checking $2 presence... " >&6; }
2627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628/* end confdefs.h.  */
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_cpp "$LINENO"; then :
2632  ac_header_preproc=yes
2633else
2634  ac_header_preproc=no
2635fi
2636rm -f conftest.err conftest.i conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2638$as_echo "$ac_header_preproc" >&6; }
2639
2640# So?  What about this header?
2641case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2642  yes:no: )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2644$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2646$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2647    ;;
2648  no:yes:* )
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2650$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2652$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2654$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2656$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2658$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2659( $as_echo "## ----------------------------------------- ##
2660## Report this to build-dev@openjdk.java.net ##
2661## ----------------------------------------- ##"
2662     ) | sed "s/^/$as_me: WARNING:     /" >&2
2663    ;;
2664esac
2665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2666$as_echo_n "checking for $2... " >&6; }
2667if eval \${$3+:} false; then :
2668  $as_echo_n "(cached) " >&6
2669else
2670  eval "$3=\$ac_header_compiler"
2671fi
2672eval ac_res=\$$3
2673	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2674$as_echo "$ac_res" >&6; }
2675fi
2676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677
2678} # ac_fn_cxx_check_header_mongrel
2679
2680# ac_fn_cxx_try_run LINENO
2681# ------------------------
2682# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2683# that executables *can* be run.
2684ac_fn_cxx_try_run ()
2685{
2686  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687  if { { ac_try="$ac_link"
2688case "(($ac_try" in
2689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690  *) ac_try_echo=$ac_try;;
2691esac
2692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693$as_echo "$ac_try_echo"; } >&5
2694  (eval "$ac_link") 2>&5
2695  ac_status=$?
2696  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2697  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2698  { { case "(($ac_try" in
2699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700  *) ac_try_echo=$ac_try;;
2701esac
2702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2703$as_echo "$ac_try_echo"; } >&5
2704  (eval "$ac_try") 2>&5
2705  ac_status=$?
2706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2707  test $ac_status = 0; }; }; then :
2708  ac_retval=0
2709else
2710  $as_echo "$as_me: program exited with status $ac_status" >&5
2711       $as_echo "$as_me: failed program was:" >&5
2712sed 's/^/| /' conftest.$ac_ext >&5
2713
2714       ac_retval=$ac_status
2715fi
2716  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2717  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2718  as_fn_set_status $ac_retval
2719
2720} # ac_fn_cxx_try_run
2721
2722# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2723# ---------------------------------------------------------
2724# Tests whether HEADER exists and can be compiled using the include files in
2725# INCLUDES, setting the cache variable VAR accordingly.
2726ac_fn_cxx_check_header_compile ()
2727{
2728  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2730$as_echo_n "checking for $2... " >&6; }
2731if eval \${$3+:} false; then :
2732  $as_echo_n "(cached) " >&6
2733else
2734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735/* end confdefs.h.  */
2736$4
2737#include <$2>
2738_ACEOF
2739if ac_fn_cxx_try_compile "$LINENO"; then :
2740  eval "$3=yes"
2741else
2742  eval "$3=no"
2743fi
2744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745fi
2746eval ac_res=\$$3
2747	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2748$as_echo "$ac_res" >&6; }
2749  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2750
2751} # ac_fn_cxx_check_header_compile
2752
2753# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2754# ----------------------------------------------
2755# Tries to find the compile-time value of EXPR in a program that includes
2756# INCLUDES, setting VAR accordingly. Returns whether the value could be
2757# computed
2758ac_fn_cxx_compute_int ()
2759{
2760  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2761  if test "$cross_compiling" = yes; then
2762    # Depending upon the size, compute the lo and hi bounds.
2763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2764/* end confdefs.h.  */
2765$4
2766int
2767main ()
2768{
2769static int test_array [1 - 2 * !(($2) >= 0)];
2770test_array [0] = 0;
2771return test_array [0];
2772
2773  ;
2774  return 0;
2775}
2776_ACEOF
2777if ac_fn_cxx_try_compile "$LINENO"; then :
2778  ac_lo=0 ac_mid=0
2779  while :; do
2780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h.  */
2782$4
2783int
2784main ()
2785{
2786static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2787test_array [0] = 0;
2788return test_array [0];
2789
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794if ac_fn_cxx_try_compile "$LINENO"; then :
2795  ac_hi=$ac_mid; break
2796else
2797  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2798			if test $ac_lo -le $ac_mid; then
2799			  ac_lo= ac_hi=
2800			  break
2801			fi
2802			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2803fi
2804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805  done
2806else
2807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2808/* end confdefs.h.  */
2809$4
2810int
2811main ()
2812{
2813static int test_array [1 - 2 * !(($2) < 0)];
2814test_array [0] = 0;
2815return test_array [0];
2816
2817  ;
2818  return 0;
2819}
2820_ACEOF
2821if ac_fn_cxx_try_compile "$LINENO"; then :
2822  ac_hi=-1 ac_mid=-1
2823  while :; do
2824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826$4
2827int
2828main ()
2829{
2830static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2831test_array [0] = 0;
2832return test_array [0];
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_compile "$LINENO"; then :
2839  ac_lo=$ac_mid; break
2840else
2841  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2842			if test $ac_mid -le $ac_hi; then
2843			  ac_lo= ac_hi=
2844			  break
2845			fi
2846			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849  done
2850else
2851  ac_lo= ac_hi=
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854fi
2855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856# Binary search between lo and hi bounds.
2857while test "x$ac_lo" != "x$ac_hi"; do
2858  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862int
2863main ()
2864{
2865static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2866test_array [0] = 0;
2867return test_array [0];
2868
2869  ;
2870  return 0;
2871}
2872_ACEOF
2873if ac_fn_cxx_try_compile "$LINENO"; then :
2874  ac_hi=$ac_mid
2875else
2876  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2877fi
2878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879done
2880case $ac_lo in #((
2881?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2882'') ac_retval=1 ;;
2883esac
2884  else
2885    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2886/* end confdefs.h.  */
2887$4
2888static long int longval () { return $2; }
2889static unsigned long int ulongval () { return $2; }
2890#include <stdio.h>
2891#include <stdlib.h>
2892int
2893main ()
2894{
2895
2896  FILE *f = fopen ("conftest.val", "w");
2897  if (! f)
2898    return 1;
2899  if (($2) < 0)
2900    {
2901      long int i = longval ();
2902      if (i != ($2))
2903	return 1;
2904      fprintf (f, "%ld", i);
2905    }
2906  else
2907    {
2908      unsigned long int i = ulongval ();
2909      if (i != ($2))
2910	return 1;
2911      fprintf (f, "%lu", i);
2912    }
2913  /* Do not output a trailing newline, as this causes \r\n confusion
2914     on some platforms.  */
2915  return ferror (f) || fclose (f) != 0;
2916
2917  ;
2918  return 0;
2919}
2920_ACEOF
2921if ac_fn_cxx_try_run "$LINENO"; then :
2922  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2923else
2924  ac_retval=1
2925fi
2926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2927  conftest.$ac_objext conftest.beam conftest.$ac_ext
2928rm -f conftest.val
2929
2930  fi
2931  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2932  as_fn_set_status $ac_retval
2933
2934} # ac_fn_cxx_compute_int
2935
2936# ac_fn_cxx_try_link LINENO
2937# -------------------------
2938# Try to link conftest.$ac_ext, and return whether this succeeded.
2939ac_fn_cxx_try_link ()
2940{
2941  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2942  rm -f conftest.$ac_objext conftest$ac_exeext
2943  if { { ac_try="$ac_link"
2944case "(($ac_try" in
2945  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2946  *) ac_try_echo=$ac_try;;
2947esac
2948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2949$as_echo "$ac_try_echo"; } >&5
2950  (eval "$ac_link") 2>conftest.err
2951  ac_status=$?
2952  if test -s conftest.err; then
2953    grep -v '^ *+' conftest.err >conftest.er1
2954    cat conftest.er1 >&5
2955    mv -f conftest.er1 conftest.err
2956  fi
2957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2958  test $ac_status = 0; } && {
2959	 test -z "$ac_cxx_werror_flag" ||
2960	 test ! -s conftest.err
2961       } && test -s conftest$ac_exeext && {
2962	 test "$cross_compiling" = yes ||
2963	 test -x conftest$ac_exeext
2964       }; then :
2965  ac_retval=0
2966else
2967  $as_echo "$as_me: failed program was:" >&5
2968sed 's/^/| /' conftest.$ac_ext >&5
2969
2970	ac_retval=1
2971fi
2972  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2973  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2974  # interfere with the next link command; also delete a directory that is
2975  # left behind by Apple's compiler.  We do this before executing the actions.
2976  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2977  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2978  as_fn_set_status $ac_retval
2979
2980} # ac_fn_cxx_try_link
2981
2982# ac_fn_cxx_check_func LINENO FUNC VAR
2983# ------------------------------------
2984# Tests whether FUNC exists, setting the cache variable VAR accordingly
2985ac_fn_cxx_check_func ()
2986{
2987  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2989$as_echo_n "checking for $2... " >&6; }
2990if eval \${$3+:} false; then :
2991  $as_echo_n "(cached) " >&6
2992else
2993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h.  */
2995/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2996   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2997#define $2 innocuous_$2
2998
2999/* System header to define __stub macros and hopefully few prototypes,
3000    which can conflict with char $2 (); below.
3001    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3002    <limits.h> exists even on freestanding compilers.  */
3003
3004#ifdef __STDC__
3005# include <limits.h>
3006#else
3007# include <assert.h>
3008#endif
3009
3010#undef $2
3011
3012/* Override any GCC internal prototype to avoid an error.
3013   Use char because int might match the return type of a GCC
3014   builtin and then its argument prototype would still apply.  */
3015#ifdef __cplusplus
3016extern "C"
3017#endif
3018char $2 ();
3019/* The GNU C library defines this for functions which it implements
3020    to always fail with ENOSYS.  Some functions are actually named
3021    something starting with __ and the normal name is an alias.  */
3022#if defined __stub_$2 || defined __stub___$2
3023choke me
3024#endif
3025
3026int
3027main ()
3028{
3029return $2 ();
3030  ;
3031  return 0;
3032}
3033_ACEOF
3034if ac_fn_cxx_try_link "$LINENO"; then :
3035  eval "$3=yes"
3036else
3037  eval "$3=no"
3038fi
3039rm -f core conftest.err conftest.$ac_objext \
3040    conftest$ac_exeext conftest.$ac_ext
3041fi
3042eval ac_res=\$$3
3043	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3044$as_echo "$ac_res" >&6; }
3045  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3046
3047} # ac_fn_cxx_check_func
3048
3049# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3050# -------------------------------------------------------
3051# Tests whether HEADER exists and can be compiled using the include files in
3052# INCLUDES, setting the cache variable VAR accordingly.
3053ac_fn_c_check_header_compile ()
3054{
3055  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3057$as_echo_n "checking for $2... " >&6; }
3058if eval \${$3+:} false; then :
3059  $as_echo_n "(cached) " >&6
3060else
3061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3062/* end confdefs.h.  */
3063$4
3064#include <$2>
3065_ACEOF
3066if ac_fn_c_try_compile "$LINENO"; then :
3067  eval "$3=yes"
3068else
3069  eval "$3=no"
3070fi
3071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3072fi
3073eval ac_res=\$$3
3074	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3075$as_echo "$ac_res" >&6; }
3076  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3077
3078} # ac_fn_c_check_header_compile
3079cat >config.log <<_ACEOF
3080This file contains any messages produced by compilers while
3081running configure, to aid debugging if configure makes a mistake.
3082
3083It was created by OpenJDK $as_me jdk9, which was
3084generated by GNU Autoconf 2.69.  Invocation command line was
3085
3086  $ $0 $@
3087
3088_ACEOF
3089exec 5>>config.log
3090{
3091cat <<_ASUNAME
3092## --------- ##
3093## Platform. ##
3094## --------- ##
3095
3096hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3097uname -m = `(uname -m) 2>/dev/null || echo unknown`
3098uname -r = `(uname -r) 2>/dev/null || echo unknown`
3099uname -s = `(uname -s) 2>/dev/null || echo unknown`
3100uname -v = `(uname -v) 2>/dev/null || echo unknown`
3101
3102/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3103/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3104
3105/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3106/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3107/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3108/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3109/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3110/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3111/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3112
3113_ASUNAME
3114
3115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3116for as_dir in $PATH
3117do
3118  IFS=$as_save_IFS
3119  test -z "$as_dir" && as_dir=.
3120    $as_echo "PATH: $as_dir"
3121  done
3122IFS=$as_save_IFS
3123
3124} >&5
3125
3126cat >&5 <<_ACEOF
3127
3128
3129## ----------- ##
3130## Core tests. ##
3131## ----------- ##
3132
3133_ACEOF
3134
3135
3136# Keep a trace of the command line.
3137# Strip out --no-create and --no-recursion so they do not pile up.
3138# Strip out --silent because we don't want to record it for future runs.
3139# Also quote any args containing shell meta-characters.
3140# Make two passes to allow for proper duplicate-argument suppression.
3141ac_configure_args=
3142ac_configure_args0=
3143ac_configure_args1=
3144ac_must_keep_next=false
3145for ac_pass in 1 2
3146do
3147  for ac_arg
3148  do
3149    case $ac_arg in
3150    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3151    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3152    | -silent | --silent | --silen | --sile | --sil)
3153      continue ;;
3154    *\'*)
3155      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3156    esac
3157    case $ac_pass in
3158    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3159    2)
3160      as_fn_append ac_configure_args1 " '$ac_arg'"
3161      if test $ac_must_keep_next = true; then
3162	ac_must_keep_next=false # Got value, back to normal.
3163      else
3164	case $ac_arg in
3165	  *=* | --config-cache | -C | -disable-* | --disable-* \
3166	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3167	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3168	  | -with-* | --with-* | -without-* | --without-* | --x)
3169	    case "$ac_configure_args0 " in
3170	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3171	    esac
3172	    ;;
3173	  -* ) ac_must_keep_next=true ;;
3174	esac
3175      fi
3176      as_fn_append ac_configure_args " '$ac_arg'"
3177      ;;
3178    esac
3179  done
3180done
3181{ ac_configure_args0=; unset ac_configure_args0;}
3182{ ac_configure_args1=; unset ac_configure_args1;}
3183
3184# When interrupted or exit'd, cleanup temporary files, and complete
3185# config.log.  We remove comments because anyway the quotes in there
3186# would cause problems or look ugly.
3187# WARNING: Use '\'' to represent an apostrophe within the trap.
3188# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3189trap 'exit_status=$?
3190  # Save into config.log some information that might help in debugging.
3191  {
3192    echo
3193
3194    $as_echo "## ---------------- ##
3195## Cache variables. ##
3196## ---------------- ##"
3197    echo
3198    # The following way of writing the cache mishandles newlines in values,
3199(
3200  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3201    eval ac_val=\$$ac_var
3202    case $ac_val in #(
3203    *${as_nl}*)
3204      case $ac_var in #(
3205      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3206$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3207      esac
3208      case $ac_var in #(
3209      _ | IFS | as_nl) ;; #(
3210      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3211      *) { eval $ac_var=; unset $ac_var;} ;;
3212      esac ;;
3213    esac
3214  done
3215  (set) 2>&1 |
3216    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3217    *${as_nl}ac_space=\ *)
3218      sed -n \
3219	"s/'\''/'\''\\\\'\'''\''/g;
3220	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3221      ;; #(
3222    *)
3223      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3224      ;;
3225    esac |
3226    sort
3227)
3228    echo
3229
3230    $as_echo "## ----------------- ##
3231## Output variables. ##
3232## ----------------- ##"
3233    echo
3234    for ac_var in $ac_subst_vars
3235    do
3236      eval ac_val=\$$ac_var
3237      case $ac_val in
3238      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239      esac
3240      $as_echo "$ac_var='\''$ac_val'\''"
3241    done | sort
3242    echo
3243
3244    if test -n "$ac_subst_files"; then
3245      $as_echo "## ------------------- ##
3246## File substitutions. ##
3247## ------------------- ##"
3248      echo
3249      for ac_var in $ac_subst_files
3250      do
3251	eval ac_val=\$$ac_var
3252	case $ac_val in
3253	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3254	esac
3255	$as_echo "$ac_var='\''$ac_val'\''"
3256      done | sort
3257      echo
3258    fi
3259
3260    if test -s confdefs.h; then
3261      $as_echo "## ----------- ##
3262## confdefs.h. ##
3263## ----------- ##"
3264      echo
3265      cat confdefs.h
3266      echo
3267    fi
3268    test "$ac_signal" != 0 &&
3269      $as_echo "$as_me: caught signal $ac_signal"
3270    $as_echo "$as_me: exit $exit_status"
3271  } >&5
3272  rm -f core *.core core.conftest.* &&
3273    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3274    exit $exit_status
3275' 0
3276for ac_signal in 1 2 13 15; do
3277  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3278done
3279ac_signal=0
3280
3281# confdefs.h avoids OS command line length limits that DEFS can exceed.
3282rm -f -r conftest* confdefs.h
3283
3284$as_echo "/* confdefs.h */" > confdefs.h
3285
3286# Predefined preprocessor variables.
3287
3288cat >>confdefs.h <<_ACEOF
3289#define PACKAGE_NAME "$PACKAGE_NAME"
3290_ACEOF
3291
3292cat >>confdefs.h <<_ACEOF
3293#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3294_ACEOF
3295
3296cat >>confdefs.h <<_ACEOF
3297#define PACKAGE_VERSION "$PACKAGE_VERSION"
3298_ACEOF
3299
3300cat >>confdefs.h <<_ACEOF
3301#define PACKAGE_STRING "$PACKAGE_STRING"
3302_ACEOF
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_URL "$PACKAGE_URL"
3310_ACEOF
3311
3312
3313# Let the site file select an alternate cache file if it wants to.
3314# Prefer an explicitly selected file to automatically selected ones.
3315ac_site_file1=NONE
3316ac_site_file2=NONE
3317if test -n "$CONFIG_SITE"; then
3318  # We do not want a PATH search for config.site.
3319  case $CONFIG_SITE in #((
3320    -*)  ac_site_file1=./$CONFIG_SITE;;
3321    */*) ac_site_file1=$CONFIG_SITE;;
3322    *)   ac_site_file1=./$CONFIG_SITE;;
3323  esac
3324elif test "x$prefix" != xNONE; then
3325  ac_site_file1=$prefix/share/config.site
3326  ac_site_file2=$prefix/etc/config.site
3327else
3328  ac_site_file1=$ac_default_prefix/share/config.site
3329  ac_site_file2=$ac_default_prefix/etc/config.site
3330fi
3331for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3332do
3333  test "x$ac_site_file" = xNONE && continue
3334  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3335    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3336$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3337    sed 's/^/| /' "$ac_site_file" >&5
3338    . "$ac_site_file" \
3339      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341as_fn_error $? "failed to load site script $ac_site_file
3342See \`config.log' for more details" "$LINENO" 5; }
3343  fi
3344done
3345
3346if test -r "$cache_file"; then
3347  # Some versions of bash will fail to source /dev/null (special files
3348  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3349  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3350    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3351$as_echo "$as_me: loading cache $cache_file" >&6;}
3352    case $cache_file in
3353      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3354      *)                      . "./$cache_file";;
3355    esac
3356  fi
3357else
3358  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3359$as_echo "$as_me: creating cache $cache_file" >&6;}
3360  >$cache_file
3361fi
3362
3363# Check that the precious variables saved in the cache have kept the same
3364# value.
3365ac_cache_corrupted=false
3366for ac_var in $ac_precious_vars; do
3367  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3368  eval ac_new_set=\$ac_env_${ac_var}_set
3369  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3370  eval ac_new_val=\$ac_env_${ac_var}_value
3371  case $ac_old_set,$ac_new_set in
3372    set,)
3373      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3374$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3375      ac_cache_corrupted=: ;;
3376    ,set)
3377      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3378$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3379      ac_cache_corrupted=: ;;
3380    ,);;
3381    *)
3382      if test "x$ac_old_val" != "x$ac_new_val"; then
3383	# differences in whitespace do not lead to failure.
3384	ac_old_val_w=`echo x $ac_old_val`
3385	ac_new_val_w=`echo x $ac_new_val`
3386	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3387	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3388$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3389	  ac_cache_corrupted=:
3390	else
3391	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3392$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3393	  eval $ac_var=\$ac_old_val
3394	fi
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3396$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3397	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3398$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3399      fi;;
3400  esac
3401  # Pass precious variables to config.status.
3402  if test "$ac_new_set" = set; then
3403    case $ac_new_val in
3404    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3405    *) ac_arg=$ac_var=$ac_new_val ;;
3406    esac
3407    case " $ac_configure_args " in
3408      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3409      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3410    esac
3411  fi
3412done
3413if $ac_cache_corrupted; then
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3416  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3417$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3418  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3419fi
3420## -------------------- ##
3421## Main body of script. ##
3422## -------------------- ##
3423
3424ac_ext=c
3425ac_cpp='$CPP $CPPFLAGS'
3426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3428ac_compiler_gnu=$ac_cv_c_compiler_gnu
3429
3430
3431
3432ac_aux_dir=
3433for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3434  if test -f "$ac_dir/install-sh"; then
3435    ac_aux_dir=$ac_dir
3436    ac_install_sh="$ac_aux_dir/install-sh -c"
3437    break
3438  elif test -f "$ac_dir/install.sh"; then
3439    ac_aux_dir=$ac_dir
3440    ac_install_sh="$ac_aux_dir/install.sh -c"
3441    break
3442  elif test -f "$ac_dir/shtool"; then
3443    ac_aux_dir=$ac_dir
3444    ac_install_sh="$ac_aux_dir/shtool install -c"
3445    break
3446  fi
3447done
3448if test -z "$ac_aux_dir"; then
3449  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
3450fi
3451
3452# These three variables are undocumented and unsupported,
3453# and are intended to be withdrawn in a future Autoconf release.
3454# They can cause serious problems if a builder's source tree is in a directory
3455# whose full name contains unusual characters.
3456ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3457ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3458ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3459
3460
3461# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3462
3463#
3464# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3465# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3466#
3467# This code is free software; you can redistribute it and/or modify it
3468# under the terms of the GNU General Public License version 2 only, as
3469# published by the Free Software Foundation.  Oracle designates this
3470# particular file as subject to the "Classpath" exception as provided
3471# by Oracle in the LICENSE file that accompanied this code.
3472#
3473# This code is distributed in the hope that it will be useful, but WITHOUT
3474# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3475# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3476# version 2 for more details (a copy is included in the LICENSE file that
3477# accompanied this code).
3478#
3479# You should have received a copy of the GNU General Public License version
3480# 2 along with this work; if not, write to the Free Software Foundation,
3481# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3482#
3483# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3484# or visit www.oracle.com if you need additional information or have any
3485# questions.
3486#
3487
3488#
3489# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3490#
3491# This program is free software; you can redistribute it and/or modify
3492# it under the terms of the GNU General Public License as published by
3493# the Free Software Foundation; either version 2 of the License, or
3494# (at your option) any later version.
3495#
3496# This program is distributed in the hope that it will be useful, but
3497# WITHOUT ANY WARRANTY; without even the implied warranty of
3498# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3499# General Public License for more details.
3500#
3501# You should have received a copy of the GNU General Public License
3502# along with this program; if not, write to the Free Software
3503# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3504#
3505# As a special exception to the GNU General Public License, if you
3506# distribute this file as part of a program that contains a
3507# configuration script generated by Autoconf, you may include it under
3508# the same distribution terms that you use for the rest of that program.
3509
3510# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3511# ----------------------------------
3512# PKG_PROG_PKG_CONFIG
3513
3514# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3515#
3516# Check to see whether a particular set of modules exists.  Similar
3517# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3518#
3519#
3520# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3521# this or PKG_CHECK_MODULES is called, or make sure to call
3522# PKG_CHECK_EXISTS manually
3523# --------------------------------------------------------------
3524
3525
3526
3527# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3528# ---------------------------------------------
3529# _PKG_CONFIG
3530
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532# -----------------------------
3533# _PKG_SHORT_ERRORS_SUPPORTED
3534
3535
3536# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3537# [ACTION-IF-NOT-FOUND])
3538#
3539#
3540# Note that if there is a possibility the first call to
3541# PKG_CHECK_MODULES might not happen, you should be sure to include an
3542# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3543#
3544#
3545# --------------------------------------------------------------
3546# PKG_CHECK_MODULES
3547
3548
3549# Include these first...
3550#
3551# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575# Create a function/macro that takes a series of named arguments. The call is
3576# similar to AC_DEFUN, but the setup of the function looks like this:
3577# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3578# ... do something
3579#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3580# ])
3581# A star (*) in front of a named argument means that it is required and it's
3582# presence will be verified. To pass e.g. the first value as a normal indexed
3583# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3584# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3585# "ARG_FOO".
3586#
3587# The generated function can be called like this:
3588# MYFUNC(FOO: [foo-val],
3589#     BAR: [
3590#         $ECHO hello world
3591#     ])
3592# Note that the argument value must start on the same line as the argument name.
3593#
3594# Argument 1: Name of the function to define
3595# Argument 2: List of legal named arguments, with a * prefix for required arguments
3596# Argument 3: Argument array to treat as named, typically $@
3597# Argument 4: The main function body
3598
3599
3600# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3601# If so, then append $1 to $2 \
3602# Also set JVM_ARG_OK to true/false depending on outcome.
3603
3604
3605# Appends a string to a path variable, only adding the : when needed.
3606
3607
3608# Prepends a string to a path variable, only adding the : when needed.
3609
3610
3611# This will make sure the given variable points to a full and proper
3612# path. This means:
3613# 1) There will be no spaces in the path. On unix platforms,
3614#    spaces in the path will result in an error. On Windows,
3615#    the path will be rewritten using short-style to be space-free.
3616# 2) The path will be absolute, and it will be in unix-style (on
3617#     cygwin).
3618# $1: The name of the variable to fix
3619
3620
3621# This will make sure the given variable points to a executable
3622# with a full and proper path. This means:
3623# 1) There will be no spaces in the path. On unix platforms,
3624#    spaces in the path will result in an error. On Windows,
3625#    the path will be rewritten using short-style to be space-free.
3626# 2) The path will be absolute, and it will be in unix-style (on
3627#     cygwin).
3628# Any arguments given to the executable is preserved.
3629# If the input variable does not have a directory specification, then
3630# it need to be in the PATH.
3631# $1: The name of the variable to fix
3632
3633
3634
3635
3636# Register a --with argument but mark it as deprecated
3637# $1: The name of the with argument to deprecate, not including --with-
3638
3639
3640# Register a --enable argument but mark it as deprecated
3641# $1: The name of the with argument to deprecate, not including --enable-
3642# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3643# $3: Messages to user.
3644
3645
3646
3647
3648# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3649# $1: variable to check
3650
3651
3652# Check that there are no unprocessed overridden variables left.
3653# If so, they are an incorrect argument and we will exit with an error.
3654
3655
3656# Setup a tool for the given variable. If correctly specified by the user,
3657# use that value, otherwise search for the tool using the supplied code snippet.
3658# $1: variable to set
3659# $2: code snippet to call to look for the tool
3660# $3: code snippet to call if variable was used to find tool
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671
3672
3673# Like BASIC_PATH_PROGS but fails if no tool was found.
3674# $1: variable to set
3675# $2: executable name (or list of names) to look for
3676
3677
3678# Like BASIC_SETUP_TOOL but fails if no tool was found.
3679# $1: variable to set
3680# $2: autoconf macro to call to look for the special tool
3681
3682
3683# Setup the most fundamental tools that relies on not much else to set up,
3684# but is used by much of the early bootstrap code.
3685
3686
3687# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3688
3689
3690# Evaluates platform specific overrides for devkit variables.
3691# $1: Name of variable
3692
3693
3694
3695
3696
3697
3698#%%% Simple tools %%%
3699
3700# Check if we have found a usable version of make
3701# $1: the path to a potential make binary (or empty)
3702# $2: the description on how we found this
3703
3704
3705
3706
3707# Goes looking for a usable version of GNU make.
3708
3709
3710
3711
3712
3713
3714
3715
3716# Check if build directory is on local disk. If not possible to determine,
3717# we prefer to claim it's local.
3718# Argument 1: directory to test
3719# Argument 2: what to do if it is on local disk
3720# Argument 3: what to do otherwise (remote disk or failure)
3721
3722
3723# Check that source files have basic read permissions set. This might
3724# not be the case in cygwin in certain conditions.
3725
3726
3727
3728
3729# Check for support for specific options in bash
3730
3731
3732################################################################################
3733#
3734# Default make target
3735#
3736
3737
3738# Code to run after AC_OUTPUT
3739
3740
3741#
3742# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3744#
3745# This code is free software; you can redistribute it and/or modify it
3746# under the terms of the GNU General Public License version 2 only, as
3747# published by the Free Software Foundation.  Oracle designates this
3748# particular file as subject to the "Classpath" exception as provided
3749# by Oracle in the LICENSE file that accompanied this code.
3750#
3751# This code is distributed in the hope that it will be useful, but WITHOUT
3752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3754# version 2 for more details (a copy is included in the LICENSE file that
3755# accompanied this code).
3756#
3757# You should have received a copy of the GNU General Public License version
3758# 2 along with this work; if not, write to the Free Software Foundation,
3759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3760#
3761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3762# or visit www.oracle.com if you need additional information or have any
3763# questions.
3764#
3765
3766
3767
3768
3769
3770# Helper function which possibly converts a path using DOS-style short mode.
3771# If so, the updated path is stored in $new_path.
3772# $1: The path to check
3773
3774
3775# Helper function which possibly converts a path using DOS-style short mode.
3776# If so, the updated path is stored in $new_path.
3777# $1: The path to check
3778
3779
3780# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3781# and could probably be heavily simplified. However, all changes in this
3782# area tend to need lot of testing in different scenarios, and in lack of
3783# proper unit testing, cleaning this up has not been deemed worth the effort
3784# at the moment.
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3795
3796
3797
3798
3799# ... then the rest
3800#
3801# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3802# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3803#
3804# This code is free software; you can redistribute it and/or modify it
3805# under the terms of the GNU General Public License version 2 only, as
3806# published by the Free Software Foundation.  Oracle designates this
3807# particular file as subject to the "Classpath" exception as provided
3808# by Oracle in the LICENSE file that accompanied this code.
3809#
3810# This code is distributed in the hope that it will be useful, but WITHOUT
3811# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3812# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3813# version 2 for more details (a copy is included in the LICENSE file that
3814# accompanied this code).
3815#
3816# You should have received a copy of the GNU General Public License version
3817# 2 along with this work; if not, write to the Free Software Foundation,
3818# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3819#
3820# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3821# or visit www.oracle.com if you need additional information or have any
3822# questions.
3823#
3824
3825########################################################################
3826# This file handles detection of the Boot JDK. The Boot JDK detection
3827# process has been developed as a response to solve a complex real-world
3828# problem. Initially, it was simple, but it has grown as platform after
3829# platform, idiosyncracy after idiosyncracy has been supported.
3830#
3831# The basic idea is this:
3832# 1) You need an acceptable *) JDK to use as a Boot JDK
3833# 2) There are several ways to locate a JDK, that are mostly platform
3834#    dependent **)
3835# 3) You can have multiple JDKs installed
3836# 4) If possible, configure should try to dig out an acceptable JDK
3837#    automatically, without having to resort to command-line options
3838#
3839# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3840#     javac) and not a JRE, etc.
3841#
3842# **) On Windows we typically use a well-known path.
3843#     On MacOSX we typically use the tool java_home.
3844#     On Linux we typically find javac in the $PATH, and then follow a
3845#     chain of symlinks that often ends up in a real JDK.
3846#
3847# This leads to the code where we check in different ways to locate a
3848# JDK, and if one is found, check if it is acceptable. If not, we print
3849# our reasons for rejecting it (useful when debugging non-working
3850# configure situations) and continue checking the next one.
3851########################################################################
3852
3853# Execute the check given as argument, and verify the result
3854# If the Boot JDK was previously found, do nothing
3855# $1 A command line (typically autoconf macro) to execute
3856
3857
3858# Test: Is bootjdk explicitely set by command line arguments?
3859
3860
3861# Test: Is $JAVA_HOME set?
3862
3863
3864# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3865
3866
3867# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3868# $1: Argument to the java_home binary (optional)
3869
3870
3871# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3872
3873
3874# Look for a jdk in the given path. If there are multiple, try to select the newest.
3875# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3876# $1 = Path to directory containing jdk installations.
3877# $2 = String to append to the found JDK directory to get the proper JDK home
3878
3879
3880# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3881# environmental variable as base for where to look.
3882# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3883
3884
3885# Test: Is there a JDK installed in default, well-known locations?
3886
3887
3888# Check that a command-line tool in the Boot JDK is correct
3889# $1 = name of variable to assign
3890# $2 = name of binary
3891
3892
3893###############################################################################
3894#
3895# We need a Boot JDK to bootstrap the build.
3896#
3897
3898
3899
3900
3901
3902# BUILD_JDK: the location of the latest JDK that can run
3903#   on the host system and supports the target class file version
3904#   generated in this JDK build.  This variable should only be
3905#   used after the launchers are built.
3906#
3907
3908# Execute the check given as argument, and verify the result.
3909# If the JDK was previously found, do nothing.
3910# $1 A command line (typically autoconf macro) to execute
3911
3912
3913# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3914# is different than the host system doing the build (e.g. cross-compilation),
3915# a special BUILD_JDK is built as part of the build process.  An external
3916# prebuilt BUILD_JDK can also be supplied.
3917
3918
3919#
3920# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3921# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3922#
3923# This code is free software; you can redistribute it and/or modify it
3924# under the terms of the GNU General Public License version 2 only, as
3925# published by the Free Software Foundation.  Oracle designates this
3926# particular file as subject to the "Classpath" exception as provided
3927# by Oracle in the LICENSE file that accompanied this code.
3928#
3929# This code is distributed in the hope that it will be useful, but WITHOUT
3930# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3931# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3932# version 2 for more details (a copy is included in the LICENSE file that
3933# accompanied this code).
3934#
3935# You should have received a copy of the GNU General Public License version
3936# 2 along with this work; if not, write to the Free Software Foundation,
3937# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3938#
3939# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3940# or visit www.oracle.com if you need additional information or have any
3941# questions.
3942#
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960################################################################################
3961#
3962# Runs icecc-create-env once and prints the error if it fails
3963#
3964# $1: arguments to icecc-create-env
3965# $2: log file
3966#
3967
3968
3969################################################################################
3970#
3971# Optionally enable distributed compilation of native code using icecc/icecream
3972#
3973
3974
3975
3976
3977
3978
3979
3980#
3981# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3982# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3983#
3984# This code is free software; you can redistribute it and/or modify it
3985# under the terms of the GNU General Public License version 2 only, as
3986# published by the Free Software Foundation.  Oracle designates this
3987# particular file as subject to the "Classpath" exception as provided
3988# by Oracle in the LICENSE file that accompanied this code.
3989#
3990# This code is distributed in the hope that it will be useful, but WITHOUT
3991# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3992# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3993# version 2 for more details (a copy is included in the LICENSE file that
3994# accompanied this code).
3995#
3996# You should have received a copy of the GNU General Public License version
3997# 2 along with this work; if not, write to the Free Software Foundation,
3998# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3999#
4000# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4001# or visit www.oracle.com if you need additional information or have any
4002# questions.
4003#
4004
4005# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4006# corresponding configure arguments instead
4007
4008
4009# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4010# that configure can use them while detecting compilers.
4011# TOOLCHAIN_TYPE is available here.
4012# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4013
4014
4015
4016
4017
4018
4019# Documentation on common flags used for solstudio in HIGHEST.
4020#
4021# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4022#          done with care, there are some assumptions below that need to
4023#          be understood about the use of pointers, and IEEE behavior.
4024#
4025# -fns: Use non-standard floating point mode (not IEEE 754)
4026# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4027# -fsingle: Use single precision floating point with 'float'
4028# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4029#   (Source with excessing pointer casting and data access with mixed
4030#    pointer types are not recommended)
4031# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4032#   (If you expect perfect errno behavior, do not use this)
4033# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4034# -xrestrict: Pointer parameters to functions do not overlap
4035#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4036#    If you pass in multiple pointers to the same data, do not use this)
4037# -xlibmil: Inline some library routines
4038#   (If you expect perfect errno behavior, do not use this)
4039# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4040#   (If you expect perfect errno behavior, do not use this)
4041#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4042
4043    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4044    # Bug?
4045    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4046    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4047    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4048    #fi
4049
4050
4051
4052
4053
4054
4055################################################################################
4056# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4057#      conditionals against.
4058# $2 - Optional prefix for each variable defined.
4059
4060
4061# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4062#                                  IF_FALSE: [RUN-IF-FALSE])
4063# ------------------------------------------------------------
4064# Check that the C compiler supports an argument
4065
4066
4067
4068
4069# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4070#                                    IF_FALSE: [RUN-IF-FALSE])
4071# ------------------------------------------------------------
4072# Check that the C++ compiler supports an argument
4073
4074
4075
4076
4077# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the C and C++ compilers support an argument
4081
4082
4083
4084
4085# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086#                                   IF_FALSE: [RUN-IF-FALSE])
4087# ------------------------------------------------------------
4088# Check that the linker support an argument
4089
4090
4091
4092
4093
4094
4095
4096
4097#
4098# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4099# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4100#
4101# This code is free software; you can redistribute it and/or modify it
4102# under the terms of the GNU General Public License version 2 only, as
4103# published by the Free Software Foundation.  Oracle designates this
4104# particular file as subject to the "Classpath" exception as provided
4105# by Oracle in the LICENSE file that accompanied this code.
4106#
4107# This code is distributed in the hope that it will be useful, but WITHOUT
4108# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4109# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4110# version 2 for more details (a copy is included in the LICENSE file that
4111# accompanied this code).
4112#
4113# You should have received a copy of the GNU General Public License version
4114# 2 along with this work; if not, write to the Free Software Foundation,
4115# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4116#
4117# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4118# or visit www.oracle.com if you need additional information or have any
4119# questions.
4120#
4121
4122
4123
4124
4125
4126cygwin_help() {
4127  case $1 in
4128    unzip)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    zip)
4133      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4135      ;;
4136    make)
4137      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4138      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4139      ;;
4140    freetype)
4141      HELP_MSG="
4142The freetype library can now be build during the configure process.
4143Download the freetype sources and unpack them into an arbitrary directory:
4144
4145wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4146tar -xzf freetype-2.5.3.tar.gz
4147
4148Then run configure with '--with-freetype-src=<freetype_src>'. This will
4149automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4150builds or into '<freetype_src>/lib32' for 32-bit builds.
4151Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4152and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4153
4154Alternatively you can unpack the sources like this to use the default directory:
4155
4156tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4157      ;;
4158  esac
4159}
4160
4161msys_help() {
4162  PKGHANDLER_COMMAND=""
4163}
4164
4165apt_help() {
4166  case $1 in
4167    reduced)
4168      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4169    devkit)
4170      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4171    openjdk)
4172      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4173    alsa)
4174      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4175    cups)
4176      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4177    freetype)
4178      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4179    ffi)
4180      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4181    x11)
4182      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4183    ccache)
4184      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4185    dtrace)
4186      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4187  esac
4188}
4189
4190yum_help() {
4191  case $1 in
4192    devkit)
4193      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4194    openjdk)
4195      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4196    alsa)
4197      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4198    cups)
4199      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4200    freetype)
4201      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4202    x11)
4203      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4204    ccache)
4205      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4206  esac
4207}
4208
4209port_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213pkgutil_help() {
4214  PKGHANDLER_COMMAND=""
4215}
4216
4217pkgadd_help() {
4218  PKGHANDLER_COMMAND=""
4219}
4220
4221# This function will check if we're called from the "configure" wrapper while
4222# printing --help. If so, we will print out additional information that can
4223# only be extracted within the autoconf script, and then exit. This must be
4224# called at the very beginning in configure.ac.
4225
4226
4227
4228
4229
4230
4231#
4232# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4233# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4234#
4235# This code is free software; you can redistribute it and/or modify it
4236# under the terms of the GNU General Public License version 2 only, as
4237# published by the Free Software Foundation.  Oracle designates this
4238# particular file as subject to the "Classpath" exception as provided
4239# by Oracle in the LICENSE file that accompanied this code.
4240#
4241# This code is distributed in the hope that it will be useful, but WITHOUT
4242# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4243# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4244# version 2 for more details (a copy is included in the LICENSE file that
4245# accompanied this code).
4246#
4247# You should have received a copy of the GNU General Public License version
4248# 2 along with this work; if not, write to the Free Software Foundation,
4249# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4250#
4251# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4252# or visit www.oracle.com if you need additional information or have any
4253# questions.
4254#
4255
4256# All valid JVM features, regardless of platform
4257VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4258    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4259
4260# All valid JVM variants
4261VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4262
4263###############################################################################
4264# Check if the specified JVM variant should be built. To be used in shell if
4265# constructs, like this:
4266# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4267#
4268# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4269
4270# Definition kept in one line to allow inlining in if statements.
4271# Additional [] needed to keep m4 from mangling shell constructs.
4272
4273
4274###############################################################################
4275# Check if the specified JVM features are explicitly enabled. To be used in
4276# shell if constructs, like this:
4277# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4278#
4279# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4280
4281# Definition kept in one line to allow inlining in if statements.
4282# Additional [] needed to keep m4 from mangling shell constructs.
4283
4284
4285###############################################################################
4286# Check which variants of the JVM that we want to build. Available variants are:
4287#   server: normal interpreter, and a tiered C1/C2 compiler
4288#   client: normal interpreter, and C1 (no C2 compiler)
4289#   minimal: reduced form of client with optional features stripped out
4290#   core: normal interpreter only, no compiler
4291#   zero: C++ based interpreter only, no compiler
4292#   zeroshark: C++ based interpreter, and a llvm-based compiler
4293#   custom: baseline JVM with no default features
4294#
4295
4296
4297###############################################################################
4298# Check if dtrace should be enabled and has all prerequisites present.
4299#
4300
4301
4302###############################################################################
4303# Set up all JVM features for each JVM variant.
4304#
4305
4306
4307###############################################################################
4308# Validate JVM features once all setup is complete, including custom setup.
4309#
4310
4311
4312################################################################################
4313# Check if gtest should be built
4314#
4315
4316
4317#
4318# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4319# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4320#
4321# This code is free software; you can redistribute it and/or modify it
4322# under the terms of the GNU General Public License version 2 only, as
4323# published by the Free Software Foundation.  Oracle designates this
4324# particular file as subject to the "Classpath" exception as provided
4325# by Oracle in the LICENSE file that accompanied this code.
4326#
4327# This code is distributed in the hope that it will be useful, but WITHOUT
4328# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4329# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4330# version 2 for more details (a copy is included in the LICENSE file that
4331# accompanied this code).
4332#
4333# You should have received a copy of the GNU General Public License version
4334# 2 along with this work; if not, write to the Free Software Foundation,
4335# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4336#
4337# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4338# or visit www.oracle.com if you need additional information or have any
4339# questions.
4340#
4341
4342###############################################################################
4343# Check which variant of the JDK that we want to build.
4344# Currently we have:
4345#    normal:   standard edition
4346# but the custom make system may add other variants
4347#
4348# Effectively the JDK variant gives a name to a specific set of
4349# modules to compile into the JDK.
4350
4351
4352###############################################################################
4353# Set the debug level
4354#    release: no debug information, all optimizations, no asserts.
4355#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4356#    fastdebug: debug information (-g), all optimizations, all asserts
4357#    slowdebug: debug information (-g), no optimizations, all asserts
4358
4359
4360###############################################################################
4361#
4362# Should we build only OpenJDK even if closed sources are present?
4363#
4364
4365
4366
4367
4368###############################################################################
4369#
4370# Enable or disable the elliptic curve crypto implementation
4371#
4372
4373
4374
4375
4376################################################################################
4377#
4378# Gcov coverage data for hotspot
4379#
4380
4381
4382################################################################################
4383#
4384# Static build support.  When enabled will generate static
4385# libraries instead of shared libraries for all JDK libs.
4386#
4387
4388
4389################################################################################
4390#
4391# jlink options.
4392# We always keep packaged modules in JDK image.
4393#
4394
4395
4396################################################################################
4397#
4398# Check if building of the jtreg failure handler should be enabled.
4399#
4400
4401
4402################################################################################
4403#
4404# Enable or disable generation of the classlist at build time
4405#
4406
4407
4408#
4409# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4410# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4411#
4412# This code is free software; you can redistribute it and/or modify it
4413# under the terms of the GNU General Public License version 2 only, as
4414# published by the Free Software Foundation.  Oracle designates this
4415# particular file as subject to the "Classpath" exception as provided
4416# by Oracle in the LICENSE file that accompanied this code.
4417#
4418# This code is distributed in the hope that it will be useful, but WITHOUT
4419# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4420# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4421# version 2 for more details (a copy is included in the LICENSE file that
4422# accompanied this code).
4423#
4424# You should have received a copy of the GNU General Public License version
4425# 2 along with this work; if not, write to the Free Software Foundation,
4426# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4427#
4428# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4429# or visit www.oracle.com if you need additional information or have any
4430# questions.
4431#
4432
4433###############################################################################
4434#
4435# Setup version numbers
4436#
4437
4438# Verify that a given string represents a valid version number, and assign it
4439# to a variable.
4440
4441# Argument 1: the variable to assign to
4442# Argument 2: the value given by the user
4443
4444
4445
4446
4447#
4448# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4450#
4451# This code is free software; you can redistribute it and/or modify it
4452# under the terms of the GNU General Public License version 2 only, as
4453# published by the Free Software Foundation.  Oracle designates this
4454# particular file as subject to the "Classpath" exception as provided
4455# by Oracle in the LICENSE file that accompanied this code.
4456#
4457# This code is distributed in the hope that it will be useful, but WITHOUT
4458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4460# version 2 for more details (a copy is included in the LICENSE file that
4461# accompanied this code).
4462#
4463# You should have received a copy of the GNU General Public License version
4464# 2 along with this work; if not, write to the Free Software Foundation,
4465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4466#
4467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4468# or visit www.oracle.com if you need additional information or have any
4469# questions.
4470#
4471
4472# Major library component reside in separate files.
4473#
4474# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4475# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4476#
4477# This code is free software; you can redistribute it and/or modify it
4478# under the terms of the GNU General Public License version 2 only, as
4479# published by the Free Software Foundation.  Oracle designates this
4480# particular file as subject to the "Classpath" exception as provided
4481# by Oracle in the LICENSE file that accompanied this code.
4482#
4483# This code is distributed in the hope that it will be useful, but WITHOUT
4484# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4485# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4486# version 2 for more details (a copy is included in the LICENSE file that
4487# accompanied this code).
4488#
4489# You should have received a copy of the GNU General Public License version
4490# 2 along with this work; if not, write to the Free Software Foundation,
4491# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4492#
4493# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4494# or visit www.oracle.com if you need additional information or have any
4495# questions.
4496#
4497
4498################################################################################
4499# Setup alsa (Advanced Linux Sound Architecture)
4500################################################################################
4501
4502
4503#
4504# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506#
4507# This code is free software; you can redistribute it and/or modify it
4508# under the terms of the GNU General Public License version 2 only, as
4509# published by the Free Software Foundation.  Oracle designates this
4510# particular file as subject to the "Classpath" exception as provided
4511# by Oracle in the LICENSE file that accompanied this code.
4512#
4513# This code is distributed in the hope that it will be useful, but WITHOUT
4514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516# version 2 for more details (a copy is included in the LICENSE file that
4517# accompanied this code).
4518#
4519# You should have received a copy of the GNU General Public License version
4520# 2 along with this work; if not, write to the Free Software Foundation,
4521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522#
4523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524# or visit www.oracle.com if you need additional information or have any
4525# questions.
4526#
4527
4528################################################################################
4529# Setup bundled libraries.
4530#
4531# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4532# OpenJDK repository. Default is to use these libraries as bundled, but they
4533# might be replaced by en external version by the user.
4534################################################################################
4535
4536
4537################################################################################
4538# Setup libjpeg
4539################################################################################
4540
4541
4542################################################################################
4543# Setup giflib
4544################################################################################
4545
4546
4547################################################################################
4548# Setup libpng
4549################################################################################
4550
4551
4552################################################################################
4553# Setup zlib
4554################################################################################
4555
4556
4557################################################################################
4558# Setup lcms (Little CMS)
4559################################################################################
4560
4561
4562#
4563# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4565#
4566# This code is free software; you can redistribute it and/or modify it
4567# under the terms of the GNU General Public License version 2 only, as
4568# published by the Free Software Foundation.  Oracle designates this
4569# particular file as subject to the "Classpath" exception as provided
4570# by Oracle in the LICENSE file that accompanied this code.
4571#
4572# This code is distributed in the hope that it will be useful, but WITHOUT
4573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4575# version 2 for more details (a copy is included in the LICENSE file that
4576# accompanied this code).
4577#
4578# You should have received a copy of the GNU General Public License version
4579# 2 along with this work; if not, write to the Free Software Foundation,
4580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4581#
4582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4583# or visit www.oracle.com if you need additional information or have any
4584# questions.
4585#
4586
4587################################################################################
4588# Setup cups (Common Unix Printing System)
4589################################################################################
4590
4591
4592#
4593# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4595#
4596# This code is free software; you can redistribute it and/or modify it
4597# under the terms of the GNU General Public License version 2 only, as
4598# published by the Free Software Foundation.  Oracle designates this
4599# particular file as subject to the "Classpath" exception as provided
4600# by Oracle in the LICENSE file that accompanied this code.
4601#
4602# This code is distributed in the hope that it will be useful, but WITHOUT
4603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4605# version 2 for more details (a copy is included in the LICENSE file that
4606# accompanied this code).
4607#
4608# You should have received a copy of the GNU General Public License version
4609# 2 along with this work; if not, write to the Free Software Foundation,
4610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4611#
4612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4613# or visit www.oracle.com if you need additional information or have any
4614# questions.
4615#
4616
4617################################################################################
4618# Setup libffi (Foreign Function Interface)
4619################################################################################
4620
4621
4622#
4623# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625#
4626# This code is free software; you can redistribute it and/or modify it
4627# under the terms of the GNU General Public License version 2 only, as
4628# published by the Free Software Foundation.  Oracle designates this
4629# particular file as subject to the "Classpath" exception as provided
4630# by Oracle in the LICENSE file that accompanied this code.
4631#
4632# This code is distributed in the hope that it will be useful, but WITHOUT
4633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635# version 2 for more details (a copy is included in the LICENSE file that
4636# accompanied this code).
4637#
4638# You should have received a copy of the GNU General Public License version
4639# 2 along with this work; if not, write to the Free Software Foundation,
4640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641#
4642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643# or visit www.oracle.com if you need additional information or have any
4644# questions.
4645#
4646
4647################################################################################
4648# Build the freetype lib from source
4649################################################################################
4650
4651
4652################################################################################
4653# Check if a potential freeype library match is correct and usable
4654################################################################################
4655
4656
4657################################################################################
4658# Setup freetype (The FreeType2 font rendering library)
4659################################################################################
4660
4661
4662#
4663# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4664# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4665#
4666# This code is free software; you can redistribute it and/or modify it
4667# under the terms of the GNU General Public License version 2 only, as
4668# published by the Free Software Foundation.  Oracle designates this
4669# particular file as subject to the "Classpath" exception as provided
4670# by Oracle in the LICENSE file that accompanied this code.
4671#
4672# This code is distributed in the hope that it will be useful, but WITHOUT
4673# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4674# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4675# version 2 for more details (a copy is included in the LICENSE file that
4676# accompanied this code).
4677#
4678# You should have received a copy of the GNU General Public License version
4679# 2 along with this work; if not, write to the Free Software Foundation,
4680# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4681#
4682# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4683# or visit www.oracle.com if you need additional information or have any
4684# questions.
4685#
4686
4687################################################################################
4688# Setup the standard C/C++ runtime libraries.
4689#
4690# Most importantly, determine if stdc++ should be linked statically or
4691# dynamically.
4692################################################################################
4693
4694
4695#
4696# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4697# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4698#
4699# This code is free software; you can redistribute it and/or modify it
4700# under the terms of the GNU General Public License version 2 only, as
4701# published by the Free Software Foundation.  Oracle designates this
4702# particular file as subject to the "Classpath" exception as provided
4703# by Oracle in the LICENSE file that accompanied this code.
4704#
4705# This code is distributed in the hope that it will be useful, but WITHOUT
4706# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4707# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4708# version 2 for more details (a copy is included in the LICENSE file that
4709# accompanied this code).
4710#
4711# You should have received a copy of the GNU General Public License version
4712# 2 along with this work; if not, write to the Free Software Foundation,
4713# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4714#
4715# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4716# or visit www.oracle.com if you need additional information or have any
4717# questions.
4718#
4719
4720################################################################################
4721# Setup X11 Windows system
4722################################################################################
4723
4724
4725
4726################################################################################
4727# Determine which libraries are needed for this configuration
4728################################################################################
4729
4730
4731################################################################################
4732# Parse library options, and setup needed libraries
4733################################################################################
4734
4735
4736################################################################################
4737# Setup llvm (Low-Level VM)
4738################################################################################
4739
4740
4741################################################################################
4742# Setup various libraries, typically small system libraries
4743################################################################################
4744
4745
4746################################################################################
4747# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4748# redistribute it in the test image.
4749################################################################################
4750
4751
4752
4753#
4754# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4756#
4757# This code is free software; you can redistribute it and/or modify it
4758# under the terms of the GNU General Public License version 2 only, as
4759# published by the Free Software Foundation.  Oracle designates this
4760# particular file as subject to the "Classpath" exception as provided
4761# by Oracle in the LICENSE file that accompanied this code.
4762#
4763# This code is distributed in the hope that it will be useful, but WITHOUT
4764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4766# version 2 for more details (a copy is included in the LICENSE file that
4767# accompanied this code).
4768#
4769# You should have received a copy of the GNU General Public License version
4770# 2 along with this work; if not, write to the Free Software Foundation,
4771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4772#
4773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4774# or visit www.oracle.com if you need additional information or have any
4775# questions.
4776#
4777
4778# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4779# Converts autoconf style CPU name to OpenJDK style, into
4780# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4781
4782
4783# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4784# Converts autoconf style OS name to OpenJDK style, into
4785# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4786
4787
4788# Expects $host_os $host_cpu $build_os and $build_cpu
4789# and $with_target_bits to have been setup!
4790#
4791# Translate the standard triplet(quadruplet) definition
4792# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4793# OPENJDK_BUILD_OS, etc.
4794
4795
4796# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4797# accordingly. Must be done after setting up build and target system, but before
4798# doing anything else with these values.
4799
4800
4801# Setup the legacy variables, for controlling the old makefiles.
4802#
4803
4804
4805# $1 - Either TARGET or BUILD to setup the variables for.
4806
4807
4808
4809
4810#%%% Build and target systems %%%
4811
4812
4813
4814
4815# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4816# Add -mX to various FLAGS variables.
4817
4818
4819
4820
4821
4822
4823#
4824# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4826#
4827# This code is free software; you can redistribute it and/or modify it
4828# under the terms of the GNU General Public License version 2 only, as
4829# published by the Free Software Foundation.  Oracle designates this
4830# particular file as subject to the "Classpath" exception as provided
4831# by Oracle in the LICENSE file that accompanied this code.
4832#
4833# This code is distributed in the hope that it will be useful, but WITHOUT
4834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4836# version 2 for more details (a copy is included in the LICENSE file that
4837# accompanied this code).
4838#
4839# You should have received a copy of the GNU General Public License version
4840# 2 along with this work; if not, write to the Free Software Foundation,
4841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4842#
4843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4844# or visit www.oracle.com if you need additional information or have any
4845# questions.
4846#
4847
4848
4849
4850
4851
4852
4853
4854################################################################################
4855# Define a mechanism for importing extra prebuilt modules
4856#
4857
4858
4859
4860#
4861# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4862# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4863#
4864# This code is free software; you can redistribute it and/or modify it
4865# under the terms of the GNU General Public License version 2 only, as
4866# published by the Free Software Foundation.  Oracle designates this
4867# particular file as subject to the "Classpath" exception as provided
4868# by Oracle in the LICENSE file that accompanied this code.
4869#
4870# This code is distributed in the hope that it will be useful, but WITHOUT
4871# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4872# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4873# version 2 for more details (a copy is included in the LICENSE file that
4874# accompanied this code).
4875#
4876# You should have received a copy of the GNU General Public License version
4877# 2 along with this work; if not, write to the Free Software Foundation,
4878# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4879#
4880# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4881# or visit www.oracle.com if you need additional information or have any
4882# questions.
4883#
4884
4885########################################################################
4886# This file is responsible for detecting, verifying and setting up the
4887# toolchain, i.e. the compiler, linker and related utilities. It will setup
4888# proper paths to the binaries, but it will not setup any flags.
4889#
4890# The binaries used is determined by the toolchain type, which is the family of
4891# compilers and related tools that are used.
4892########################################################################
4893
4894
4895# All valid toolchains, regardless of platform (used by help.m4)
4896VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4897
4898# These toolchains are valid on different platforms
4899VALID_TOOLCHAINS_linux="gcc clang"
4900VALID_TOOLCHAINS_solaris="solstudio"
4901VALID_TOOLCHAINS_macosx="gcc clang"
4902VALID_TOOLCHAINS_aix="xlc"
4903VALID_TOOLCHAINS_windows="microsoft"
4904
4905# Toolchain descriptions
4906TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4907TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4908TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4909TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4910TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4911
4912# Minimum supported versions, empty means unspecified
4913TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4914TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4915TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4916TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4917TOOLCHAIN_MINIMUM_VERSION_xlc=""
4918
4919# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4920# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4921# $1 - optional variable prefix for compiler and version variables (BUILD_)
4922# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4923
4924
4925# Check if the configured compiler (C and C++) is of a specific version or
4926# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4927#
4928# Arguments:
4929#   VERSION:   The version string to check against the found version
4930#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4931#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4932#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4933
4934
4935
4936
4937# Setup a number of variables describing how native output files are
4938# named on this platform/toolchain.
4939
4940
4941# Determine which toolchain type to use, and make sure it is valid for this
4942# platform. Setup various information about the selected toolchain.
4943
4944
4945# Before we start detecting the toolchain executables, we might need some
4946# special setup, e.g. additional paths etc.
4947
4948
4949# Restore path, etc
4950
4951
4952# Check if a compiler is of the toolchain type we expect, and save the version
4953# information from it. If the compiler does not match the expected type,
4954# this function will abort using AC_MSG_ERROR. If it matches, the version will
4955# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4956# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4957#
4958# $1 = compiler to test (CC or CXX)
4959# $2 = human readable name of compiler (C or C++)
4960
4961
4962# Try to locate the given C or C++ compiler in the path, or otherwise.
4963#
4964# $1 = compiler to test (CC or CXX)
4965# $2 = human readable name of compiler (C or C++)
4966# $3 = list of compiler names to search for
4967
4968
4969# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4970# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4971# archiver (AR). Verify that the compilers are correct according to the
4972# toolchain type.
4973
4974
4975# Setup additional tools that is considered a part of the toolchain, but not the
4976# core part. Many of these are highly platform-specific and do not exist,
4977# and/or are not needed on all platforms.
4978
4979
4980# Setup the build tools (i.e, the compiler and linker used to build programs
4981# that should be run on the build platform, not the target platform, as a build
4982# helper). Since the non-cross-compile case uses the normal, target compilers
4983# for this, we can only do this after these have been setup.
4984
4985
4986# Setup legacy variables that are still needed as alternative ways to refer to
4987# parts of the toolchain.
4988
4989
4990# Do some additional checks on the detected tools.
4991
4992
4993# Setup the JTReg Regression Test Harness.
4994
4995
4996#
4997# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4998# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4999#
5000# This code is free software; you can redistribute it and/or modify it
5001# under the terms of the GNU General Public License version 2 only, as
5002# published by the Free Software Foundation.  Oracle designates this
5003# particular file as subject to the "Classpath" exception as provided
5004# by Oracle in the LICENSE file that accompanied this code.
5005#
5006# This code is distributed in the hope that it will be useful, but WITHOUT
5007# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5008# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5009# version 2 for more details (a copy is included in the LICENSE file that
5010# accompanied this code).
5011#
5012# You should have received a copy of the GNU General Public License version
5013# 2 along with this work; if not, write to the Free Software Foundation,
5014# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5015#
5016# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5017# or visit www.oracle.com if you need additional information or have any
5018# questions.
5019#
5020
5021################################################################################
5022# The order of these defines the priority by which we try to find them.
5023VALID_VS_VERSIONS="2013 2012 2010"
5024
5025VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5026VS_VERSION_INTERNAL_2010=100
5027VS_MSVCR_2010=msvcr100.dll
5028# We don't use msvcp on Visual Studio 2010
5029#VS_MSVCP_2010=msvcp100.dll
5030VS_ENVVAR_2010="VS100COMNTOOLS"
5031VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5032VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5033VS_VS_PLATFORM_NAME_2010="v100"
5034VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5035
5036VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5037VS_VERSION_INTERNAL_2012=110
5038VS_MSVCR_2012=msvcr110.dll
5039VS_MSVCP_2012=msvcp110.dll
5040VS_ENVVAR_2012="VS110COMNTOOLS"
5041VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5042VS_SDK_INSTALLDIR_2012=
5043VS_VS_PLATFORM_NAME_2012="v110"
5044VS_SDK_PLATFORM_NAME_2012=
5045
5046VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5047VS_VERSION_INTERNAL_2013=120
5048VS_MSVCR_2013=msvcr120.dll
5049VS_MSVCP_2013=msvcp120.dll
5050VS_ENVVAR_2013="VS120COMNTOOLS"
5051VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5052VS_SDK_INSTALLDIR_2013=
5053VS_VS_PLATFORM_NAME_2013="v120"
5054VS_SDK_PLATFORM_NAME_2013=
5055
5056################################################################################
5057
5058
5059
5060################################################################################
5061
5062
5063
5064################################################################################
5065# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5066# build environment and assigns it to VS_ENV_CMD
5067
5068
5069################################################################################
5070
5071
5072
5073################################################################################
5074# Check if the VS env variables were setup prior to running configure.
5075# If not, then find vcvarsall.bat and run it automatically, and integrate
5076# the set env variables into the spec file.
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091# This line needs to be here, verbatim, after all includes and the dummy hook
5092# definitions. It is replaced with custom functionality when building
5093# custom sources.
5094#CUSTOM_AUTOCONF_INCLUDE
5095
5096# Do not change or remove the following line, it is needed for consistency checks:
5097DATE_WHEN_GENERATED=1470297769
5098
5099###############################################################################
5100#
5101# Initialization / Boot-strapping
5102#
5103# The bootstrapping process needs to solve the "chicken or the egg" problem,
5104# thus it jumps back and forth, each time gaining something needed later on.
5105#
5106###############################################################################
5107
5108# If we are requested to print additional help, do that and then exit.
5109# This must be the very first call.
5110
5111  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5112
5113    # Print available toolchains
5114    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5115    $PRINTF "Which are valid to use depends on the build platform.\n"
5116    for toolchain in $VALID_TOOLCHAINS_all; do
5117      # Use indirect variable referencing
5118      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5119      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5120      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5121    done
5122    $PRINTF "\n"
5123
5124    # Print available jvm features
5125    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5126    $PRINTF "Which are valid to use depends on the target platform.\n  "
5127    $PRINTF "%s " $VALID_JVM_FEATURES
5128    $PRINTF "\n"
5129
5130    # And now exit directly
5131    exit 0
5132  fi
5133
5134
5135# Basic initialization that must happen first of all in the normal process.
5136
5137  # Save the original command line. This is passed to us by the wrapper configure script.
5138
5139  # Save the path variable before it gets changed
5140  ORIGINAL_PATH="$PATH"
5141
5142  DATE_WHEN_CONFIGURED=`LANG=C date`
5143
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5145$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5147$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5148
5149
5150  # Start with tools that do not need have cross compilation support
5151  # and can be expected to be found in the default PATH. These tools are
5152  # used by configure.
5153
5154  # First are all the simple required tools.
5155
5156
5157
5158  # Publish this variable in the help.
5159
5160
5161  if [ -z "${BASENAME+x}" ]; then
5162    # The variable is not set by user, try to locate tool using the code snippet
5163    for ac_prog in basename
5164do
5165  # Extract the first word of "$ac_prog", so it can be a program name with args.
5166set dummy $ac_prog; ac_word=$2
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5168$as_echo_n "checking for $ac_word... " >&6; }
5169if ${ac_cv_path_BASENAME+:} false; then :
5170  $as_echo_n "(cached) " >&6
5171else
5172  case $BASENAME in
5173  [\\/]* | ?:[\\/]*)
5174  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5175  ;;
5176  *)
5177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178for as_dir in $PATH
5179do
5180  IFS=$as_save_IFS
5181  test -z "$as_dir" && as_dir=.
5182    for ac_exec_ext in '' $ac_executable_extensions; do
5183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5184    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186    break 2
5187  fi
5188done
5189  done
5190IFS=$as_save_IFS
5191
5192  ;;
5193esac
5194fi
5195BASENAME=$ac_cv_path_BASENAME
5196if test -n "$BASENAME"; then
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5198$as_echo "$BASENAME" >&6; }
5199else
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5201$as_echo "no" >&6; }
5202fi
5203
5204
5205  test -n "$BASENAME" && break
5206done
5207
5208  else
5209    # The variable is set, but is it from the command line or the environment?
5210
5211    # Try to remove the string !BASENAME! from our list.
5212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5214      # If it failed, the variable was not from the command line. Ignore it,
5215      # but warn the user (except for BASH, which is always set by the calling BASH).
5216      if test "xBASENAME" != xBASH; then
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5218$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5219      fi
5220      # Try to locate tool using the code snippet
5221      for ac_prog in basename
5222do
5223  # Extract the first word of "$ac_prog", so it can be a program name with args.
5224set dummy $ac_prog; ac_word=$2
5225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5226$as_echo_n "checking for $ac_word... " >&6; }
5227if ${ac_cv_path_BASENAME+:} false; then :
5228  $as_echo_n "(cached) " >&6
5229else
5230  case $BASENAME in
5231  [\\/]* | ?:[\\/]*)
5232  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5233  ;;
5234  *)
5235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5236for as_dir in $PATH
5237do
5238  IFS=$as_save_IFS
5239  test -z "$as_dir" && as_dir=.
5240    for ac_exec_ext in '' $ac_executable_extensions; do
5241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5242    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5244    break 2
5245  fi
5246done
5247  done
5248IFS=$as_save_IFS
5249
5250  ;;
5251esac
5252fi
5253BASENAME=$ac_cv_path_BASENAME
5254if test -n "$BASENAME"; then
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5256$as_echo "$BASENAME" >&6; }
5257else
5258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5259$as_echo "no" >&6; }
5260fi
5261
5262
5263  test -n "$BASENAME" && break
5264done
5265
5266    else
5267      # If it succeeded, then it was overridden by the user. We will use it
5268      # for the tool.
5269
5270      # First remove it from the list of overridden variables, so we can test
5271      # for unknown variables in the end.
5272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5273
5274      # Check if we try to supply an empty value
5275      if test "x$BASENAME" = x; then
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5277$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5279$as_echo_n "checking for BASENAME... " >&6; }
5280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5281$as_echo "disabled" >&6; }
5282      else
5283        # Check if the provided tool contains a complete path.
5284        tool_specified="$BASENAME"
5285        tool_basename="${tool_specified##*/}"
5286        if test "x$tool_basename" = "x$tool_specified"; then
5287          # A command without a complete path is provided, search $PATH.
5288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5289$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5290          # Extract the first word of "$tool_basename", so it can be a program name with args.
5291set dummy $tool_basename; ac_word=$2
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5293$as_echo_n "checking for $ac_word... " >&6; }
5294if ${ac_cv_path_BASENAME+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297  case $BASENAME in
5298  [\\/]* | ?:[\\/]*)
5299  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5300  ;;
5301  *)
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307    for ac_exec_ext in '' $ac_executable_extensions; do
5308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5309    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5311    break 2
5312  fi
5313done
5314  done
5315IFS=$as_save_IFS
5316
5317  ;;
5318esac
5319fi
5320BASENAME=$ac_cv_path_BASENAME
5321if test -n "$BASENAME"; then
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5323$as_echo "$BASENAME" >&6; }
5324else
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330          if test "x$BASENAME" = x; then
5331            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5332          fi
5333        else
5334          # Otherwise we believe it is a complete path. Use it as it is.
5335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5336$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5337          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5338$as_echo_n "checking for BASENAME... " >&6; }
5339          if test ! -x "$tool_specified"; then
5340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5341$as_echo "not found" >&6; }
5342            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5343          fi
5344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5345$as_echo "$tool_specified" >&6; }
5346        fi
5347      fi
5348    fi
5349
5350  fi
5351
5352
5353
5354  if test "x$BASENAME" = x; then
5355    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5356  fi
5357
5358
5359
5360
5361
5362  # Publish this variable in the help.
5363
5364
5365  if [ -z "${BASH+x}" ]; then
5366    # The variable is not set by user, try to locate tool using the code snippet
5367    for ac_prog in bash
5368do
5369  # Extract the first word of "$ac_prog", so it can be a program name with args.
5370set dummy $ac_prog; ac_word=$2
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5372$as_echo_n "checking for $ac_word... " >&6; }
5373if ${ac_cv_path_BASH+:} false; then :
5374  $as_echo_n "(cached) " >&6
5375else
5376  case $BASH in
5377  [\\/]* | ?:[\\/]*)
5378  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5379  ;;
5380  *)
5381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5382for as_dir in $PATH
5383do
5384  IFS=$as_save_IFS
5385  test -z "$as_dir" && as_dir=.
5386    for ac_exec_ext in '' $ac_executable_extensions; do
5387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5388    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5390    break 2
5391  fi
5392done
5393  done
5394IFS=$as_save_IFS
5395
5396  ;;
5397esac
5398fi
5399BASH=$ac_cv_path_BASH
5400if test -n "$BASH"; then
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5402$as_echo "$BASH" >&6; }
5403else
5404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5405$as_echo "no" >&6; }
5406fi
5407
5408
5409  test -n "$BASH" && break
5410done
5411
5412  else
5413    # The variable is set, but is it from the command line or the environment?
5414
5415    # Try to remove the string !BASH! from our list.
5416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5418      # If it failed, the variable was not from the command line. Ignore it,
5419      # but warn the user (except for BASH, which is always set by the calling BASH).
5420      if test "xBASH" != xBASH; then
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5422$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5423      fi
5424      # Try to locate tool using the code snippet
5425      for ac_prog in bash
5426do
5427  # Extract the first word of "$ac_prog", so it can be a program name with args.
5428set dummy $ac_prog; ac_word=$2
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5430$as_echo_n "checking for $ac_word... " >&6; }
5431if ${ac_cv_path_BASH+:} false; then :
5432  $as_echo_n "(cached) " >&6
5433else
5434  case $BASH in
5435  [\\/]* | ?:[\\/]*)
5436  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5437  ;;
5438  *)
5439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440for as_dir in $PATH
5441do
5442  IFS=$as_save_IFS
5443  test -z "$as_dir" && as_dir=.
5444    for ac_exec_ext in '' $ac_executable_extensions; do
5445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5446    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5448    break 2
5449  fi
5450done
5451  done
5452IFS=$as_save_IFS
5453
5454  ;;
5455esac
5456fi
5457BASH=$ac_cv_path_BASH
5458if test -n "$BASH"; then
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5460$as_echo "$BASH" >&6; }
5461else
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463$as_echo "no" >&6; }
5464fi
5465
5466
5467  test -n "$BASH" && break
5468done
5469
5470    else
5471      # If it succeeded, then it was overridden by the user. We will use it
5472      # for the tool.
5473
5474      # First remove it from the list of overridden variables, so we can test
5475      # for unknown variables in the end.
5476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5477
5478      # Check if we try to supply an empty value
5479      if test "x$BASH" = x; then
5480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5481$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5483$as_echo_n "checking for BASH... " >&6; }
5484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5485$as_echo "disabled" >&6; }
5486      else
5487        # Check if the provided tool contains a complete path.
5488        tool_specified="$BASH"
5489        tool_basename="${tool_specified##*/}"
5490        if test "x$tool_basename" = "x$tool_specified"; then
5491          # A command without a complete path is provided, search $PATH.
5492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5493$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5494          # Extract the first word of "$tool_basename", so it can be a program name with args.
5495set dummy $tool_basename; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_BASH+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $BASH in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524BASH=$ac_cv_path_BASH
5525if test -n "$BASH"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5527$as_echo "$BASH" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534          if test "x$BASH" = x; then
5535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5536          fi
5537        else
5538          # Otherwise we believe it is a complete path. Use it as it is.
5539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5540$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5542$as_echo_n "checking for BASH... " >&6; }
5543          if test ! -x "$tool_specified"; then
5544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5545$as_echo "not found" >&6; }
5546            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5547          fi
5548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5549$as_echo "$tool_specified" >&6; }
5550        fi
5551      fi
5552    fi
5553
5554  fi
5555
5556
5557
5558  if test "x$BASH" = x; then
5559    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5560  fi
5561
5562
5563
5564
5565
5566  # Publish this variable in the help.
5567
5568
5569  if [ -z "${CAT+x}" ]; then
5570    # The variable is not set by user, try to locate tool using the code snippet
5571    for ac_prog in cat
5572do
5573  # Extract the first word of "$ac_prog", so it can be a program name with args.
5574set dummy $ac_prog; ac_word=$2
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5576$as_echo_n "checking for $ac_word... " >&6; }
5577if ${ac_cv_path_CAT+:} false; then :
5578  $as_echo_n "(cached) " >&6
5579else
5580  case $CAT in
5581  [\\/]* | ?:[\\/]*)
5582  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5583  ;;
5584  *)
5585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586for as_dir in $PATH
5587do
5588  IFS=$as_save_IFS
5589  test -z "$as_dir" && as_dir=.
5590    for ac_exec_ext in '' $ac_executable_extensions; do
5591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5592    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594    break 2
5595  fi
5596done
5597  done
5598IFS=$as_save_IFS
5599
5600  ;;
5601esac
5602fi
5603CAT=$ac_cv_path_CAT
5604if test -n "$CAT"; then
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5606$as_echo "$CAT" >&6; }
5607else
5608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5609$as_echo "no" >&6; }
5610fi
5611
5612
5613  test -n "$CAT" && break
5614done
5615
5616  else
5617    # The variable is set, but is it from the command line or the environment?
5618
5619    # Try to remove the string !CAT! from our list.
5620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5622      # If it failed, the variable was not from the command line. Ignore it,
5623      # but warn the user (except for BASH, which is always set by the calling BASH).
5624      if test "xCAT" != xBASH; then
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5626$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5627      fi
5628      # Try to locate tool using the code snippet
5629      for ac_prog in cat
5630do
5631  # Extract the first word of "$ac_prog", so it can be a program name with args.
5632set dummy $ac_prog; ac_word=$2
5633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5634$as_echo_n "checking for $ac_word... " >&6; }
5635if ${ac_cv_path_CAT+:} false; then :
5636  $as_echo_n "(cached) " >&6
5637else
5638  case $CAT in
5639  [\\/]* | ?:[\\/]*)
5640  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5641  ;;
5642  *)
5643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646  IFS=$as_save_IFS
5647  test -z "$as_dir" && as_dir=.
5648    for ac_exec_ext in '' $ac_executable_extensions; do
5649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5650    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5652    break 2
5653  fi
5654done
5655  done
5656IFS=$as_save_IFS
5657
5658  ;;
5659esac
5660fi
5661CAT=$ac_cv_path_CAT
5662if test -n "$CAT"; then
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5664$as_echo "$CAT" >&6; }
5665else
5666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5667$as_echo "no" >&6; }
5668fi
5669
5670
5671  test -n "$CAT" && break
5672done
5673
5674    else
5675      # If it succeeded, then it was overridden by the user. We will use it
5676      # for the tool.
5677
5678      # First remove it from the list of overridden variables, so we can test
5679      # for unknown variables in the end.
5680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5681
5682      # Check if we try to supply an empty value
5683      if test "x$CAT" = x; then
5684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5685$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5687$as_echo_n "checking for CAT... " >&6; }
5688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5689$as_echo "disabled" >&6; }
5690      else
5691        # Check if the provided tool contains a complete path.
5692        tool_specified="$CAT"
5693        tool_basename="${tool_specified##*/}"
5694        if test "x$tool_basename" = "x$tool_specified"; then
5695          # A command without a complete path is provided, search $PATH.
5696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5697$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5698          # Extract the first word of "$tool_basename", so it can be a program name with args.
5699set dummy $tool_basename; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if ${ac_cv_path_CAT+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $CAT in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728CAT=$ac_cv_path_CAT
5729if test -n "$CAT"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5731$as_echo "$CAT" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738          if test "x$CAT" = x; then
5739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5740          fi
5741        else
5742          # Otherwise we believe it is a complete path. Use it as it is.
5743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5744$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5746$as_echo_n "checking for CAT... " >&6; }
5747          if test ! -x "$tool_specified"; then
5748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5749$as_echo "not found" >&6; }
5750            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5751          fi
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5753$as_echo "$tool_specified" >&6; }
5754        fi
5755      fi
5756    fi
5757
5758  fi
5759
5760
5761
5762  if test "x$CAT" = x; then
5763    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5764  fi
5765
5766
5767
5768
5769
5770  # Publish this variable in the help.
5771
5772
5773  if [ -z "${CHMOD+x}" ]; then
5774    # The variable is not set by user, try to locate tool using the code snippet
5775    for ac_prog in chmod
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if ${ac_cv_path_CHMOD+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  case $CHMOD in
5785  [\\/]* | ?:[\\/]*)
5786  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5787  ;;
5788  *)
5789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5790for as_dir in $PATH
5791do
5792  IFS=$as_save_IFS
5793  test -z "$as_dir" && as_dir=.
5794    for ac_exec_ext in '' $ac_executable_extensions; do
5795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5796    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798    break 2
5799  fi
5800done
5801  done
5802IFS=$as_save_IFS
5803
5804  ;;
5805esac
5806fi
5807CHMOD=$ac_cv_path_CHMOD
5808if test -n "$CHMOD"; then
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5810$as_echo "$CHMOD" >&6; }
5811else
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817  test -n "$CHMOD" && break
5818done
5819
5820  else
5821    # The variable is set, but is it from the command line or the environment?
5822
5823    # Try to remove the string !CHMOD! from our list.
5824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5826      # If it failed, the variable was not from the command line. Ignore it,
5827      # but warn the user (except for BASH, which is always set by the calling BASH).
5828      if test "xCHMOD" != xBASH; then
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5830$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5831      fi
5832      # Try to locate tool using the code snippet
5833      for ac_prog in chmod
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CHMOD+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CHMOD in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CHMOD=$ac_cv_path_CHMOD
5866if test -n "$CHMOD"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5868$as_echo "$CHMOD" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CHMOD" && break
5876done
5877
5878    else
5879      # If it succeeded, then it was overridden by the user. We will use it
5880      # for the tool.
5881
5882      # First remove it from the list of overridden variables, so we can test
5883      # for unknown variables in the end.
5884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5885
5886      # Check if we try to supply an empty value
5887      if test "x$CHMOD" = x; then
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5889$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5891$as_echo_n "checking for CHMOD... " >&6; }
5892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5893$as_echo "disabled" >&6; }
5894      else
5895        # Check if the provided tool contains a complete path.
5896        tool_specified="$CHMOD"
5897        tool_basename="${tool_specified##*/}"
5898        if test "x$tool_basename" = "x$tool_specified"; then
5899          # A command without a complete path is provided, search $PATH.
5900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5901$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5902          # Extract the first word of "$tool_basename", so it can be a program name with args.
5903set dummy $tool_basename; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_path_CHMOD+:} false; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  case $CHMOD in
5910  [\\/]* | ?:[\\/]*)
5911  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5912  ;;
5913  *)
5914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915for as_dir in $PATH
5916do
5917  IFS=$as_save_IFS
5918  test -z "$as_dir" && as_dir=.
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5921    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5923    break 2
5924  fi
5925done
5926  done
5927IFS=$as_save_IFS
5928
5929  ;;
5930esac
5931fi
5932CHMOD=$ac_cv_path_CHMOD
5933if test -n "$CHMOD"; then
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5935$as_echo "$CHMOD" >&6; }
5936else
5937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938$as_echo "no" >&6; }
5939fi
5940
5941
5942          if test "x$CHMOD" = x; then
5943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5944          fi
5945        else
5946          # Otherwise we believe it is a complete path. Use it as it is.
5947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5948$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5950$as_echo_n "checking for CHMOD... " >&6; }
5951          if test ! -x "$tool_specified"; then
5952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5953$as_echo "not found" >&6; }
5954            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5955          fi
5956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5957$as_echo "$tool_specified" >&6; }
5958        fi
5959      fi
5960    fi
5961
5962  fi
5963
5964
5965
5966  if test "x$CHMOD" = x; then
5967    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5968  fi
5969
5970
5971
5972
5973
5974  # Publish this variable in the help.
5975
5976
5977  if [ -z "${CMP+x}" ]; then
5978    # The variable is not set by user, try to locate tool using the code snippet
5979    for ac_prog in cmp
5980do
5981  # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_path_CMP+:} false; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  case $CMP in
5989  [\\/]* | ?:[\\/]*)
5990  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5991  ;;
5992  *)
5993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5994for as_dir in $PATH
5995do
5996  IFS=$as_save_IFS
5997  test -z "$as_dir" && as_dir=.
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6000    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6002    break 2
6003  fi
6004done
6005  done
6006IFS=$as_save_IFS
6007
6008  ;;
6009esac
6010fi
6011CMP=$ac_cv_path_CMP
6012if test -n "$CMP"; then
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6014$as_echo "$CMP" >&6; }
6015else
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
6018fi
6019
6020
6021  test -n "$CMP" && break
6022done
6023
6024  else
6025    # The variable is set, but is it from the command line or the environment?
6026
6027    # Try to remove the string !CMP! from our list.
6028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6030      # If it failed, the variable was not from the command line. Ignore it,
6031      # but warn the user (except for BASH, which is always set by the calling BASH).
6032      if test "xCMP" != xBASH; then
6033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6034$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6035      fi
6036      # Try to locate tool using the code snippet
6037      for ac_prog in cmp
6038do
6039  # Extract the first word of "$ac_prog", so it can be a program name with args.
6040set dummy $ac_prog; ac_word=$2
6041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042$as_echo_n "checking for $ac_word... " >&6; }
6043if ${ac_cv_path_CMP+:} false; then :
6044  $as_echo_n "(cached) " >&6
6045else
6046  case $CMP in
6047  [\\/]* | ?:[\\/]*)
6048  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6049  ;;
6050  *)
6051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052for as_dir in $PATH
6053do
6054  IFS=$as_save_IFS
6055  test -z "$as_dir" && as_dir=.
6056    for ac_exec_ext in '' $ac_executable_extensions; do
6057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6058    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6060    break 2
6061  fi
6062done
6063  done
6064IFS=$as_save_IFS
6065
6066  ;;
6067esac
6068fi
6069CMP=$ac_cv_path_CMP
6070if test -n "$CMP"; then
6071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6072$as_echo "$CMP" >&6; }
6073else
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6075$as_echo "no" >&6; }
6076fi
6077
6078
6079  test -n "$CMP" && break
6080done
6081
6082    else
6083      # If it succeeded, then it was overridden by the user. We will use it
6084      # for the tool.
6085
6086      # First remove it from the list of overridden variables, so we can test
6087      # for unknown variables in the end.
6088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6089
6090      # Check if we try to supply an empty value
6091      if test "x$CMP" = x; then
6092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6093$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6095$as_echo_n "checking for CMP... " >&6; }
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6097$as_echo "disabled" >&6; }
6098      else
6099        # Check if the provided tool contains a complete path.
6100        tool_specified="$CMP"
6101        tool_basename="${tool_specified##*/}"
6102        if test "x$tool_basename" = "x$tool_specified"; then
6103          # A command without a complete path is provided, search $PATH.
6104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6105$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6106          # Extract the first word of "$tool_basename", so it can be a program name with args.
6107set dummy $tool_basename; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_CMP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $CMP in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136CMP=$ac_cv_path_CMP
6137if test -n "$CMP"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6139$as_echo "$CMP" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146          if test "x$CMP" = x; then
6147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6148          fi
6149        else
6150          # Otherwise we believe it is a complete path. Use it as it is.
6151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6152$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6154$as_echo_n "checking for CMP... " >&6; }
6155          if test ! -x "$tool_specified"; then
6156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6157$as_echo "not found" >&6; }
6158            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6159          fi
6160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6161$as_echo "$tool_specified" >&6; }
6162        fi
6163      fi
6164    fi
6165
6166  fi
6167
6168
6169
6170  if test "x$CMP" = x; then
6171    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6172  fi
6173
6174
6175
6176
6177
6178  # Publish this variable in the help.
6179
6180
6181  if [ -z "${COMM+x}" ]; then
6182    # The variable is not set by user, try to locate tool using the code snippet
6183    for ac_prog in comm
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_COMM+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $COMM in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215COMM=$ac_cv_path_COMM
6216if test -n "$COMM"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6218$as_echo "$COMM" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$COMM" && break
6226done
6227
6228  else
6229    # The variable is set, but is it from the command line or the environment?
6230
6231    # Try to remove the string !COMM! from our list.
6232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6234      # If it failed, the variable was not from the command line. Ignore it,
6235      # but warn the user (except for BASH, which is always set by the calling BASH).
6236      if test "xCOMM" != xBASH; then
6237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6238$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6239      fi
6240      # Try to locate tool using the code snippet
6241      for ac_prog in comm
6242do
6243  # Extract the first word of "$ac_prog", so it can be a program name with args.
6244set dummy $ac_prog; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_COMM+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $COMM in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273COMM=$ac_cv_path_COMM
6274if test -n "$COMM"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6276$as_echo "$COMM" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283  test -n "$COMM" && break
6284done
6285
6286    else
6287      # If it succeeded, then it was overridden by the user. We will use it
6288      # for the tool.
6289
6290      # First remove it from the list of overridden variables, so we can test
6291      # for unknown variables in the end.
6292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6293
6294      # Check if we try to supply an empty value
6295      if test "x$COMM" = x; then
6296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6297$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6299$as_echo_n "checking for COMM... " >&6; }
6300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6301$as_echo "disabled" >&6; }
6302      else
6303        # Check if the provided tool contains a complete path.
6304        tool_specified="$COMM"
6305        tool_basename="${tool_specified##*/}"
6306        if test "x$tool_basename" = "x$tool_specified"; then
6307          # A command without a complete path is provided, search $PATH.
6308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6309$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6310          # Extract the first word of "$tool_basename", so it can be a program name with args.
6311set dummy $tool_basename; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_COMM+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $COMM in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340COMM=$ac_cv_path_COMM
6341if test -n "$COMM"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6343$as_echo "$COMM" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350          if test "x$COMM" = x; then
6351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6352          fi
6353        else
6354          # Otherwise we believe it is a complete path. Use it as it is.
6355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6356$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6358$as_echo_n "checking for COMM... " >&6; }
6359          if test ! -x "$tool_specified"; then
6360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6361$as_echo "not found" >&6; }
6362            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6363          fi
6364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6365$as_echo "$tool_specified" >&6; }
6366        fi
6367      fi
6368    fi
6369
6370  fi
6371
6372
6373
6374  if test "x$COMM" = x; then
6375    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6376  fi
6377
6378
6379
6380
6381
6382  # Publish this variable in the help.
6383
6384
6385  if [ -z "${CP+x}" ]; then
6386    # The variable is not set by user, try to locate tool using the code snippet
6387    for ac_prog in cp
6388do
6389  # Extract the first word of "$ac_prog", so it can be a program name with args.
6390set dummy $ac_prog; ac_word=$2
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6392$as_echo_n "checking for $ac_word... " >&6; }
6393if ${ac_cv_path_CP+:} false; then :
6394  $as_echo_n "(cached) " >&6
6395else
6396  case $CP in
6397  [\\/]* | ?:[\\/]*)
6398  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6399  ;;
6400  *)
6401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH
6403do
6404  IFS=$as_save_IFS
6405  test -z "$as_dir" && as_dir=.
6406    for ac_exec_ext in '' $ac_executable_extensions; do
6407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6408    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410    break 2
6411  fi
6412done
6413  done
6414IFS=$as_save_IFS
6415
6416  ;;
6417esac
6418fi
6419CP=$ac_cv_path_CP
6420if test -n "$CP"; then
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6422$as_echo "$CP" >&6; }
6423else
6424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425$as_echo "no" >&6; }
6426fi
6427
6428
6429  test -n "$CP" && break
6430done
6431
6432  else
6433    # The variable is set, but is it from the command line or the environment?
6434
6435    # Try to remove the string !CP! from our list.
6436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6438      # If it failed, the variable was not from the command line. Ignore it,
6439      # but warn the user (except for BASH, which is always set by the calling BASH).
6440      if test "xCP" != xBASH; then
6441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6442$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6443      fi
6444      # Try to locate tool using the code snippet
6445      for ac_prog in cp
6446do
6447  # Extract the first word of "$ac_prog", so it can be a program name with args.
6448set dummy $ac_prog; ac_word=$2
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6450$as_echo_n "checking for $ac_word... " >&6; }
6451if ${ac_cv_path_CP+:} false; then :
6452  $as_echo_n "(cached) " >&6
6453else
6454  case $CP in
6455  [\\/]* | ?:[\\/]*)
6456  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6457  ;;
6458  *)
6459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6460for as_dir in $PATH
6461do
6462  IFS=$as_save_IFS
6463  test -z "$as_dir" && as_dir=.
6464    for ac_exec_ext in '' $ac_executable_extensions; do
6465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6466    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6468    break 2
6469  fi
6470done
6471  done
6472IFS=$as_save_IFS
6473
6474  ;;
6475esac
6476fi
6477CP=$ac_cv_path_CP
6478if test -n "$CP"; then
6479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6480$as_echo "$CP" >&6; }
6481else
6482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6483$as_echo "no" >&6; }
6484fi
6485
6486
6487  test -n "$CP" && break
6488done
6489
6490    else
6491      # If it succeeded, then it was overridden by the user. We will use it
6492      # for the tool.
6493
6494      # First remove it from the list of overridden variables, so we can test
6495      # for unknown variables in the end.
6496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6497
6498      # Check if we try to supply an empty value
6499      if test "x$CP" = x; then
6500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6501$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6503$as_echo_n "checking for CP... " >&6; }
6504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6505$as_echo "disabled" >&6; }
6506      else
6507        # Check if the provided tool contains a complete path.
6508        tool_specified="$CP"
6509        tool_basename="${tool_specified##*/}"
6510        if test "x$tool_basename" = "x$tool_specified"; then
6511          # A command without a complete path is provided, search $PATH.
6512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6513$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6514          # Extract the first word of "$tool_basename", so it can be a program name with args.
6515set dummy $tool_basename; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_CP+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $CP in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544CP=$ac_cv_path_CP
6545if test -n "$CP"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6547$as_echo "$CP" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554          if test "x$CP" = x; then
6555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6556          fi
6557        else
6558          # Otherwise we believe it is a complete path. Use it as it is.
6559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6560$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6562$as_echo_n "checking for CP... " >&6; }
6563          if test ! -x "$tool_specified"; then
6564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6565$as_echo "not found" >&6; }
6566            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6567          fi
6568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6569$as_echo "$tool_specified" >&6; }
6570        fi
6571      fi
6572    fi
6573
6574  fi
6575
6576
6577
6578  if test "x$CP" = x; then
6579    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6580  fi
6581
6582
6583
6584
6585
6586  # Publish this variable in the help.
6587
6588
6589  if [ -z "${CUT+x}" ]; then
6590    # The variable is not set by user, try to locate tool using the code snippet
6591    for ac_prog in cut
6592do
6593  # Extract the first word of "$ac_prog", so it can be a program name with args.
6594set dummy $ac_prog; ac_word=$2
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6596$as_echo_n "checking for $ac_word... " >&6; }
6597if ${ac_cv_path_CUT+:} false; then :
6598  $as_echo_n "(cached) " >&6
6599else
6600  case $CUT in
6601  [\\/]* | ?:[\\/]*)
6602  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6603  ;;
6604  *)
6605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606for as_dir in $PATH
6607do
6608  IFS=$as_save_IFS
6609  test -z "$as_dir" && as_dir=.
6610    for ac_exec_ext in '' $ac_executable_extensions; do
6611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6612    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6614    break 2
6615  fi
6616done
6617  done
6618IFS=$as_save_IFS
6619
6620  ;;
6621esac
6622fi
6623CUT=$ac_cv_path_CUT
6624if test -n "$CUT"; then
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6626$as_echo "$CUT" >&6; }
6627else
6628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6629$as_echo "no" >&6; }
6630fi
6631
6632
6633  test -n "$CUT" && break
6634done
6635
6636  else
6637    # The variable is set, but is it from the command line or the environment?
6638
6639    # Try to remove the string !CUT! from our list.
6640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6642      # If it failed, the variable was not from the command line. Ignore it,
6643      # but warn the user (except for BASH, which is always set by the calling BASH).
6644      if test "xCUT" != xBASH; then
6645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6646$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6647      fi
6648      # Try to locate tool using the code snippet
6649      for ac_prog in cut
6650do
6651  # Extract the first word of "$ac_prog", so it can be a program name with args.
6652set dummy $ac_prog; ac_word=$2
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6654$as_echo_n "checking for $ac_word... " >&6; }
6655if ${ac_cv_path_CUT+:} false; then :
6656  $as_echo_n "(cached) " >&6
6657else
6658  case $CUT in
6659  [\\/]* | ?:[\\/]*)
6660  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6661  ;;
6662  *)
6663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6664for as_dir in $PATH
6665do
6666  IFS=$as_save_IFS
6667  test -z "$as_dir" && as_dir=.
6668    for ac_exec_ext in '' $ac_executable_extensions; do
6669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6670    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6672    break 2
6673  fi
6674done
6675  done
6676IFS=$as_save_IFS
6677
6678  ;;
6679esac
6680fi
6681CUT=$ac_cv_path_CUT
6682if test -n "$CUT"; then
6683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6684$as_echo "$CUT" >&6; }
6685else
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687$as_echo "no" >&6; }
6688fi
6689
6690
6691  test -n "$CUT" && break
6692done
6693
6694    else
6695      # If it succeeded, then it was overridden by the user. We will use it
6696      # for the tool.
6697
6698      # First remove it from the list of overridden variables, so we can test
6699      # for unknown variables in the end.
6700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6701
6702      # Check if we try to supply an empty value
6703      if test "x$CUT" = x; then
6704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6705$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6707$as_echo_n "checking for CUT... " >&6; }
6708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6709$as_echo "disabled" >&6; }
6710      else
6711        # Check if the provided tool contains a complete path.
6712        tool_specified="$CUT"
6713        tool_basename="${tool_specified##*/}"
6714        if test "x$tool_basename" = "x$tool_specified"; then
6715          # A command without a complete path is provided, search $PATH.
6716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6717$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6718          # Extract the first word of "$tool_basename", so it can be a program name with args.
6719set dummy $tool_basename; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_CUT+:} false; then :
6723  $as_echo_n "(cached) " >&6
6724else
6725  case $CUT in
6726  [\\/]* | ?:[\\/]*)
6727  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6728  ;;
6729  *)
6730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733  IFS=$as_save_IFS
6734  test -z "$as_dir" && as_dir=.
6735    for ac_exec_ext in '' $ac_executable_extensions; do
6736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739    break 2
6740  fi
6741done
6742  done
6743IFS=$as_save_IFS
6744
6745  ;;
6746esac
6747fi
6748CUT=$ac_cv_path_CUT
6749if test -n "$CUT"; then
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6751$as_echo "$CUT" >&6; }
6752else
6753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
6755fi
6756
6757
6758          if test "x$CUT" = x; then
6759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6760          fi
6761        else
6762          # Otherwise we believe it is a complete path. Use it as it is.
6763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6764$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6766$as_echo_n "checking for CUT... " >&6; }
6767          if test ! -x "$tool_specified"; then
6768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6769$as_echo "not found" >&6; }
6770            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6771          fi
6772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6773$as_echo "$tool_specified" >&6; }
6774        fi
6775      fi
6776    fi
6777
6778  fi
6779
6780
6781
6782  if test "x$CUT" = x; then
6783    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6784  fi
6785
6786
6787
6788
6789
6790  # Publish this variable in the help.
6791
6792
6793  if [ -z "${DATE+x}" ]; then
6794    # The variable is not set by user, try to locate tool using the code snippet
6795    for ac_prog in date
6796do
6797  # Extract the first word of "$ac_prog", so it can be a program name with args.
6798set dummy $ac_prog; ac_word=$2
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6800$as_echo_n "checking for $ac_word... " >&6; }
6801if ${ac_cv_path_DATE+:} false; then :
6802  $as_echo_n "(cached) " >&6
6803else
6804  case $DATE in
6805  [\\/]* | ?:[\\/]*)
6806  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6807  ;;
6808  *)
6809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810for as_dir in $PATH
6811do
6812  IFS=$as_save_IFS
6813  test -z "$as_dir" && as_dir=.
6814    for ac_exec_ext in '' $ac_executable_extensions; do
6815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6816    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6818    break 2
6819  fi
6820done
6821  done
6822IFS=$as_save_IFS
6823
6824  ;;
6825esac
6826fi
6827DATE=$ac_cv_path_DATE
6828if test -n "$DATE"; then
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6830$as_echo "$DATE" >&6; }
6831else
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835
6836
6837  test -n "$DATE" && break
6838done
6839
6840  else
6841    # The variable is set, but is it from the command line or the environment?
6842
6843    # Try to remove the string !DATE! from our list.
6844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6846      # If it failed, the variable was not from the command line. Ignore it,
6847      # but warn the user (except for BASH, which is always set by the calling BASH).
6848      if test "xDATE" != xBASH; then
6849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6850$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6851      fi
6852      # Try to locate tool using the code snippet
6853      for ac_prog in date
6854do
6855  # Extract the first word of "$ac_prog", so it can be a program name with args.
6856set dummy $ac_prog; ac_word=$2
6857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6858$as_echo_n "checking for $ac_word... " >&6; }
6859if ${ac_cv_path_DATE+:} false; then :
6860  $as_echo_n "(cached) " >&6
6861else
6862  case $DATE in
6863  [\\/]* | ?:[\\/]*)
6864  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6865  ;;
6866  *)
6867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868for as_dir in $PATH
6869do
6870  IFS=$as_save_IFS
6871  test -z "$as_dir" && as_dir=.
6872    for ac_exec_ext in '' $ac_executable_extensions; do
6873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876    break 2
6877  fi
6878done
6879  done
6880IFS=$as_save_IFS
6881
6882  ;;
6883esac
6884fi
6885DATE=$ac_cv_path_DATE
6886if test -n "$DATE"; then
6887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6888$as_echo "$DATE" >&6; }
6889else
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891$as_echo "no" >&6; }
6892fi
6893
6894
6895  test -n "$DATE" && break
6896done
6897
6898    else
6899      # If it succeeded, then it was overridden by the user. We will use it
6900      # for the tool.
6901
6902      # First remove it from the list of overridden variables, so we can test
6903      # for unknown variables in the end.
6904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6905
6906      # Check if we try to supply an empty value
6907      if test "x$DATE" = x; then
6908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6909$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6911$as_echo_n "checking for DATE... " >&6; }
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6913$as_echo "disabled" >&6; }
6914      else
6915        # Check if the provided tool contains a complete path.
6916        tool_specified="$DATE"
6917        tool_basename="${tool_specified##*/}"
6918        if test "x$tool_basename" = "x$tool_specified"; then
6919          # A command without a complete path is provided, search $PATH.
6920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6921$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6922          # Extract the first word of "$tool_basename", so it can be a program name with args.
6923set dummy $tool_basename; ac_word=$2
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6925$as_echo_n "checking for $ac_word... " >&6; }
6926if ${ac_cv_path_DATE+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  case $DATE in
6930  [\\/]* | ?:[\\/]*)
6931  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6932  ;;
6933  *)
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_exec_ext in '' $ac_executable_extensions; do
6940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943    break 2
6944  fi
6945done
6946  done
6947IFS=$as_save_IFS
6948
6949  ;;
6950esac
6951fi
6952DATE=$ac_cv_path_DATE
6953if test -n "$DATE"; then
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6955$as_echo "$DATE" >&6; }
6956else
6957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959fi
6960
6961
6962          if test "x$DATE" = x; then
6963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6964          fi
6965        else
6966          # Otherwise we believe it is a complete path. Use it as it is.
6967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6968$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6970$as_echo_n "checking for DATE... " >&6; }
6971          if test ! -x "$tool_specified"; then
6972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6973$as_echo "not found" >&6; }
6974            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6975          fi
6976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6977$as_echo "$tool_specified" >&6; }
6978        fi
6979      fi
6980    fi
6981
6982  fi
6983
6984
6985
6986  if test "x$DATE" = x; then
6987    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6988  fi
6989
6990
6991
6992
6993
6994  # Publish this variable in the help.
6995
6996
6997  if [ -z "${DIFF+x}" ]; then
6998    # The variable is not set by user, try to locate tool using the code snippet
6999    for ac_prog in gdiff diff
7000do
7001  # Extract the first word of "$ac_prog", so it can be a program name with args.
7002set dummy $ac_prog; ac_word=$2
7003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7004$as_echo_n "checking for $ac_word... " >&6; }
7005if ${ac_cv_path_DIFF+:} false; then :
7006  $as_echo_n "(cached) " >&6
7007else
7008  case $DIFF in
7009  [\\/]* | ?:[\\/]*)
7010  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7011  ;;
7012  *)
7013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7014for as_dir in $PATH
7015do
7016  IFS=$as_save_IFS
7017  test -z "$as_dir" && as_dir=.
7018    for ac_exec_ext in '' $ac_executable_extensions; do
7019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7020    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7022    break 2
7023  fi
7024done
7025  done
7026IFS=$as_save_IFS
7027
7028  ;;
7029esac
7030fi
7031DIFF=$ac_cv_path_DIFF
7032if test -n "$DIFF"; then
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7034$as_echo "$DIFF" >&6; }
7035else
7036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7037$as_echo "no" >&6; }
7038fi
7039
7040
7041  test -n "$DIFF" && break
7042done
7043
7044  else
7045    # The variable is set, but is it from the command line or the environment?
7046
7047    # Try to remove the string !DIFF! from our list.
7048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7050      # If it failed, the variable was not from the command line. Ignore it,
7051      # but warn the user (except for BASH, which is always set by the calling BASH).
7052      if test "xDIFF" != xBASH; then
7053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7054$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7055      fi
7056      # Try to locate tool using the code snippet
7057      for ac_prog in gdiff diff
7058do
7059  # Extract the first word of "$ac_prog", so it can be a program name with args.
7060set dummy $ac_prog; ac_word=$2
7061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7062$as_echo_n "checking for $ac_word... " >&6; }
7063if ${ac_cv_path_DIFF+:} false; then :
7064  $as_echo_n "(cached) " >&6
7065else
7066  case $DIFF in
7067  [\\/]* | ?:[\\/]*)
7068  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7069  ;;
7070  *)
7071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072for as_dir in $PATH
7073do
7074  IFS=$as_save_IFS
7075  test -z "$as_dir" && as_dir=.
7076    for ac_exec_ext in '' $ac_executable_extensions; do
7077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7078    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7080    break 2
7081  fi
7082done
7083  done
7084IFS=$as_save_IFS
7085
7086  ;;
7087esac
7088fi
7089DIFF=$ac_cv_path_DIFF
7090if test -n "$DIFF"; then
7091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7092$as_echo "$DIFF" >&6; }
7093else
7094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7095$as_echo "no" >&6; }
7096fi
7097
7098
7099  test -n "$DIFF" && break
7100done
7101
7102    else
7103      # If it succeeded, then it was overridden by the user. We will use it
7104      # for the tool.
7105
7106      # First remove it from the list of overridden variables, so we can test
7107      # for unknown variables in the end.
7108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7109
7110      # Check if we try to supply an empty value
7111      if test "x$DIFF" = x; then
7112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7113$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7115$as_echo_n "checking for DIFF... " >&6; }
7116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7117$as_echo "disabled" >&6; }
7118      else
7119        # Check if the provided tool contains a complete path.
7120        tool_specified="$DIFF"
7121        tool_basename="${tool_specified##*/}"
7122        if test "x$tool_basename" = "x$tool_specified"; then
7123          # A command without a complete path is provided, search $PATH.
7124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7125$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7126          # Extract the first word of "$tool_basename", so it can be a program name with args.
7127set dummy $tool_basename; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_DIFF+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $DIFF in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156DIFF=$ac_cv_path_DIFF
7157if test -n "$DIFF"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7159$as_echo "$DIFF" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166          if test "x$DIFF" = x; then
7167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7168          fi
7169        else
7170          # Otherwise we believe it is a complete path. Use it as it is.
7171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7172$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7174$as_echo_n "checking for DIFF... " >&6; }
7175          if test ! -x "$tool_specified"; then
7176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7177$as_echo "not found" >&6; }
7178            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7179          fi
7180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7181$as_echo "$tool_specified" >&6; }
7182        fi
7183      fi
7184    fi
7185
7186  fi
7187
7188
7189
7190  if test "x$DIFF" = x; then
7191    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7192  fi
7193
7194
7195
7196
7197
7198  # Publish this variable in the help.
7199
7200
7201  if [ -z "${DIRNAME+x}" ]; then
7202    # The variable is not set by user, try to locate tool using the code snippet
7203    for ac_prog in dirname
7204do
7205  # Extract the first word of "$ac_prog", so it can be a program name with args.
7206set dummy $ac_prog; ac_word=$2
7207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7208$as_echo_n "checking for $ac_word... " >&6; }
7209if ${ac_cv_path_DIRNAME+:} false; then :
7210  $as_echo_n "(cached) " >&6
7211else
7212  case $DIRNAME in
7213  [\\/]* | ?:[\\/]*)
7214  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7215  ;;
7216  *)
7217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218for as_dir in $PATH
7219do
7220  IFS=$as_save_IFS
7221  test -z "$as_dir" && as_dir=.
7222    for ac_exec_ext in '' $ac_executable_extensions; do
7223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226    break 2
7227  fi
7228done
7229  done
7230IFS=$as_save_IFS
7231
7232  ;;
7233esac
7234fi
7235DIRNAME=$ac_cv_path_DIRNAME
7236if test -n "$DIRNAME"; then
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7238$as_echo "$DIRNAME" >&6; }
7239else
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
7242fi
7243
7244
7245  test -n "$DIRNAME" && break
7246done
7247
7248  else
7249    # The variable is set, but is it from the command line or the environment?
7250
7251    # Try to remove the string !DIRNAME! from our list.
7252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7254      # If it failed, the variable was not from the command line. Ignore it,
7255      # but warn the user (except for BASH, which is always set by the calling BASH).
7256      if test "xDIRNAME" != xBASH; then
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7258$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7259      fi
7260      # Try to locate tool using the code snippet
7261      for ac_prog in dirname
7262do
7263  # Extract the first word of "$ac_prog", so it can be a program name with args.
7264set dummy $ac_prog; ac_word=$2
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7266$as_echo_n "checking for $ac_word... " >&6; }
7267if ${ac_cv_path_DIRNAME+:} false; then :
7268  $as_echo_n "(cached) " >&6
7269else
7270  case $DIRNAME in
7271  [\\/]* | ?:[\\/]*)
7272  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7273  ;;
7274  *)
7275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7276for as_dir in $PATH
7277do
7278  IFS=$as_save_IFS
7279  test -z "$as_dir" && as_dir=.
7280    for ac_exec_ext in '' $ac_executable_extensions; do
7281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7282    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7284    break 2
7285  fi
7286done
7287  done
7288IFS=$as_save_IFS
7289
7290  ;;
7291esac
7292fi
7293DIRNAME=$ac_cv_path_DIRNAME
7294if test -n "$DIRNAME"; then
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7296$as_echo "$DIRNAME" >&6; }
7297else
7298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7299$as_echo "no" >&6; }
7300fi
7301
7302
7303  test -n "$DIRNAME" && break
7304done
7305
7306    else
7307      # If it succeeded, then it was overridden by the user. We will use it
7308      # for the tool.
7309
7310      # First remove it from the list of overridden variables, so we can test
7311      # for unknown variables in the end.
7312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7313
7314      # Check if we try to supply an empty value
7315      if test "x$DIRNAME" = x; then
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7317$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7319$as_echo_n "checking for DIRNAME... " >&6; }
7320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7321$as_echo "disabled" >&6; }
7322      else
7323        # Check if the provided tool contains a complete path.
7324        tool_specified="$DIRNAME"
7325        tool_basename="${tool_specified##*/}"
7326        if test "x$tool_basename" = "x$tool_specified"; then
7327          # A command without a complete path is provided, search $PATH.
7328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7329$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7330          # Extract the first word of "$tool_basename", so it can be a program name with args.
7331set dummy $tool_basename; ac_word=$2
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7333$as_echo_n "checking for $ac_word... " >&6; }
7334if ${ac_cv_path_DIRNAME+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  case $DIRNAME in
7338  [\\/]* | ?:[\\/]*)
7339  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7340  ;;
7341  *)
7342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7343for as_dir in $PATH
7344do
7345  IFS=$as_save_IFS
7346  test -z "$as_dir" && as_dir=.
7347    for ac_exec_ext in '' $ac_executable_extensions; do
7348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7349    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7351    break 2
7352  fi
7353done
7354  done
7355IFS=$as_save_IFS
7356
7357  ;;
7358esac
7359fi
7360DIRNAME=$ac_cv_path_DIRNAME
7361if test -n "$DIRNAME"; then
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7363$as_echo "$DIRNAME" >&6; }
7364else
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370          if test "x$DIRNAME" = x; then
7371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7372          fi
7373        else
7374          # Otherwise we believe it is a complete path. Use it as it is.
7375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7376$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7378$as_echo_n "checking for DIRNAME... " >&6; }
7379          if test ! -x "$tool_specified"; then
7380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7381$as_echo "not found" >&6; }
7382            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7383          fi
7384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7385$as_echo "$tool_specified" >&6; }
7386        fi
7387      fi
7388    fi
7389
7390  fi
7391
7392
7393
7394  if test "x$DIRNAME" = x; then
7395    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7396  fi
7397
7398
7399
7400
7401
7402  # Publish this variable in the help.
7403
7404
7405  if [ -z "${ECHO+x}" ]; then
7406    # The variable is not set by user, try to locate tool using the code snippet
7407    for ac_prog in echo
7408do
7409  # Extract the first word of "$ac_prog", so it can be a program name with args.
7410set dummy $ac_prog; ac_word=$2
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412$as_echo_n "checking for $ac_word... " >&6; }
7413if ${ac_cv_path_ECHO+:} false; then :
7414  $as_echo_n "(cached) " >&6
7415else
7416  case $ECHO in
7417  [\\/]* | ?:[\\/]*)
7418  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7419  ;;
7420  *)
7421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422for as_dir in $PATH
7423do
7424  IFS=$as_save_IFS
7425  test -z "$as_dir" && as_dir=.
7426    for ac_exec_ext in '' $ac_executable_extensions; do
7427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430    break 2
7431  fi
7432done
7433  done
7434IFS=$as_save_IFS
7435
7436  ;;
7437esac
7438fi
7439ECHO=$ac_cv_path_ECHO
7440if test -n "$ECHO"; then
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7442$as_echo "$ECHO" >&6; }
7443else
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
7446fi
7447
7448
7449  test -n "$ECHO" && break
7450done
7451
7452  else
7453    # The variable is set, but is it from the command line or the environment?
7454
7455    # Try to remove the string !ECHO! from our list.
7456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7458      # If it failed, the variable was not from the command line. Ignore it,
7459      # but warn the user (except for BASH, which is always set by the calling BASH).
7460      if test "xECHO" != xBASH; then
7461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7462$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7463      fi
7464      # Try to locate tool using the code snippet
7465      for ac_prog in echo
7466do
7467  # Extract the first word of "$ac_prog", so it can be a program name with args.
7468set dummy $ac_prog; ac_word=$2
7469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7470$as_echo_n "checking for $ac_word... " >&6; }
7471if ${ac_cv_path_ECHO+:} false; then :
7472  $as_echo_n "(cached) " >&6
7473else
7474  case $ECHO in
7475  [\\/]* | ?:[\\/]*)
7476  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7477  ;;
7478  *)
7479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480for as_dir in $PATH
7481do
7482  IFS=$as_save_IFS
7483  test -z "$as_dir" && as_dir=.
7484    for ac_exec_ext in '' $ac_executable_extensions; do
7485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7486    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7488    break 2
7489  fi
7490done
7491  done
7492IFS=$as_save_IFS
7493
7494  ;;
7495esac
7496fi
7497ECHO=$ac_cv_path_ECHO
7498if test -n "$ECHO"; then
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7500$as_echo "$ECHO" >&6; }
7501else
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503$as_echo "no" >&6; }
7504fi
7505
7506
7507  test -n "$ECHO" && break
7508done
7509
7510    else
7511      # If it succeeded, then it was overridden by the user. We will use it
7512      # for the tool.
7513
7514      # First remove it from the list of overridden variables, so we can test
7515      # for unknown variables in the end.
7516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7517
7518      # Check if we try to supply an empty value
7519      if test "x$ECHO" = x; then
7520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7521$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7523$as_echo_n "checking for ECHO... " >&6; }
7524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7525$as_echo "disabled" >&6; }
7526      else
7527        # Check if the provided tool contains a complete path.
7528        tool_specified="$ECHO"
7529        tool_basename="${tool_specified##*/}"
7530        if test "x$tool_basename" = "x$tool_specified"; then
7531          # A command without a complete path is provided, search $PATH.
7532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7533$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7534          # Extract the first word of "$tool_basename", so it can be a program name with args.
7535set dummy $tool_basename; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_ECHO+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $ECHO in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564ECHO=$ac_cv_path_ECHO
7565if test -n "$ECHO"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7567$as_echo "$ECHO" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574          if test "x$ECHO" = x; then
7575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7576          fi
7577        else
7578          # Otherwise we believe it is a complete path. Use it as it is.
7579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7580$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7582$as_echo_n "checking for ECHO... " >&6; }
7583          if test ! -x "$tool_specified"; then
7584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7585$as_echo "not found" >&6; }
7586            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7587          fi
7588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7589$as_echo "$tool_specified" >&6; }
7590        fi
7591      fi
7592    fi
7593
7594  fi
7595
7596
7597
7598  if test "x$ECHO" = x; then
7599    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7600  fi
7601
7602
7603
7604
7605
7606  # Publish this variable in the help.
7607
7608
7609  if [ -z "${EXPR+x}" ]; then
7610    # The variable is not set by user, try to locate tool using the code snippet
7611    for ac_prog in expr
7612do
7613  # Extract the first word of "$ac_prog", so it can be a program name with args.
7614set dummy $ac_prog; ac_word=$2
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
7617if ${ac_cv_path_EXPR+:} false; then :
7618  $as_echo_n "(cached) " >&6
7619else
7620  case $EXPR in
7621  [\\/]* | ?:[\\/]*)
7622  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7623  ;;
7624  *)
7625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626for as_dir in $PATH
7627do
7628  IFS=$as_save_IFS
7629  test -z "$as_dir" && as_dir=.
7630    for ac_exec_ext in '' $ac_executable_extensions; do
7631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7632    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7634    break 2
7635  fi
7636done
7637  done
7638IFS=$as_save_IFS
7639
7640  ;;
7641esac
7642fi
7643EXPR=$ac_cv_path_EXPR
7644if test -n "$EXPR"; then
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7646$as_echo "$EXPR" >&6; }
7647else
7648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7649$as_echo "no" >&6; }
7650fi
7651
7652
7653  test -n "$EXPR" && break
7654done
7655
7656  else
7657    # The variable is set, but is it from the command line or the environment?
7658
7659    # Try to remove the string !EXPR! from our list.
7660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7662      # If it failed, the variable was not from the command line. Ignore it,
7663      # but warn the user (except for BASH, which is always set by the calling BASH).
7664      if test "xEXPR" != xBASH; then
7665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7666$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7667      fi
7668      # Try to locate tool using the code snippet
7669      for ac_prog in expr
7670do
7671  # Extract the first word of "$ac_prog", so it can be a program name with args.
7672set dummy $ac_prog; ac_word=$2
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if ${ac_cv_path_EXPR+:} false; then :
7676  $as_echo_n "(cached) " >&6
7677else
7678  case $EXPR in
7679  [\\/]* | ?:[\\/]*)
7680  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7681  ;;
7682  *)
7683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686  IFS=$as_save_IFS
7687  test -z "$as_dir" && as_dir=.
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698  ;;
7699esac
7700fi
7701EXPR=$ac_cv_path_EXPR
7702if test -n "$EXPR"; then
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7704$as_echo "$EXPR" >&6; }
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708fi
7709
7710
7711  test -n "$EXPR" && break
7712done
7713
7714    else
7715      # If it succeeded, then it was overridden by the user. We will use it
7716      # for the tool.
7717
7718      # First remove it from the list of overridden variables, so we can test
7719      # for unknown variables in the end.
7720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7721
7722      # Check if we try to supply an empty value
7723      if test "x$EXPR" = x; then
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7725$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7727$as_echo_n "checking for EXPR... " >&6; }
7728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7729$as_echo "disabled" >&6; }
7730      else
7731        # Check if the provided tool contains a complete path.
7732        tool_specified="$EXPR"
7733        tool_basename="${tool_specified##*/}"
7734        if test "x$tool_basename" = "x$tool_specified"; then
7735          # A command without a complete path is provided, search $PATH.
7736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7737$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7738          # Extract the first word of "$tool_basename", so it can be a program name with args.
7739set dummy $tool_basename; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_EXPR+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $EXPR in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768EXPR=$ac_cv_path_EXPR
7769if test -n "$EXPR"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7771$as_echo "$EXPR" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778          if test "x$EXPR" = x; then
7779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7780          fi
7781        else
7782          # Otherwise we believe it is a complete path. Use it as it is.
7783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7784$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7786$as_echo_n "checking for EXPR... " >&6; }
7787          if test ! -x "$tool_specified"; then
7788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7789$as_echo "not found" >&6; }
7790            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7791          fi
7792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7793$as_echo "$tool_specified" >&6; }
7794        fi
7795      fi
7796    fi
7797
7798  fi
7799
7800
7801
7802  if test "x$EXPR" = x; then
7803    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7804  fi
7805
7806
7807
7808
7809
7810  # Publish this variable in the help.
7811
7812
7813  if [ -z "${FILE+x}" ]; then
7814    # The variable is not set by user, try to locate tool using the code snippet
7815    for ac_prog in file
7816do
7817  # Extract the first word of "$ac_prog", so it can be a program name with args.
7818set dummy $ac_prog; ac_word=$2
7819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7820$as_echo_n "checking for $ac_word... " >&6; }
7821if ${ac_cv_path_FILE+:} false; then :
7822  $as_echo_n "(cached) " >&6
7823else
7824  case $FILE in
7825  [\\/]* | ?:[\\/]*)
7826  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7827  ;;
7828  *)
7829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7830for as_dir in $PATH
7831do
7832  IFS=$as_save_IFS
7833  test -z "$as_dir" && as_dir=.
7834    for ac_exec_ext in '' $ac_executable_extensions; do
7835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7836    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7838    break 2
7839  fi
7840done
7841  done
7842IFS=$as_save_IFS
7843
7844  ;;
7845esac
7846fi
7847FILE=$ac_cv_path_FILE
7848if test -n "$FILE"; then
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7850$as_echo "$FILE" >&6; }
7851else
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7853$as_echo "no" >&6; }
7854fi
7855
7856
7857  test -n "$FILE" && break
7858done
7859
7860  else
7861    # The variable is set, but is it from the command line or the environment?
7862
7863    # Try to remove the string !FILE! from our list.
7864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7866      # If it failed, the variable was not from the command line. Ignore it,
7867      # but warn the user (except for BASH, which is always set by the calling BASH).
7868      if test "xFILE" != xBASH; then
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7870$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7871      fi
7872      # Try to locate tool using the code snippet
7873      for ac_prog in file
7874do
7875  # Extract the first word of "$ac_prog", so it can be a program name with args.
7876set dummy $ac_prog; ac_word=$2
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7878$as_echo_n "checking for $ac_word... " >&6; }
7879if ${ac_cv_path_FILE+:} false; then :
7880  $as_echo_n "(cached) " >&6
7881else
7882  case $FILE in
7883  [\\/]* | ?:[\\/]*)
7884  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7885  ;;
7886  *)
7887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7888for as_dir in $PATH
7889do
7890  IFS=$as_save_IFS
7891  test -z "$as_dir" && as_dir=.
7892    for ac_exec_ext in '' $ac_executable_extensions; do
7893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7894    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7896    break 2
7897  fi
7898done
7899  done
7900IFS=$as_save_IFS
7901
7902  ;;
7903esac
7904fi
7905FILE=$ac_cv_path_FILE
7906if test -n "$FILE"; then
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7908$as_echo "$FILE" >&6; }
7909else
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911$as_echo "no" >&6; }
7912fi
7913
7914
7915  test -n "$FILE" && break
7916done
7917
7918    else
7919      # If it succeeded, then it was overridden by the user. We will use it
7920      # for the tool.
7921
7922      # First remove it from the list of overridden variables, so we can test
7923      # for unknown variables in the end.
7924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7925
7926      # Check if we try to supply an empty value
7927      if test "x$FILE" = x; then
7928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7929$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7931$as_echo_n "checking for FILE... " >&6; }
7932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7933$as_echo "disabled" >&6; }
7934      else
7935        # Check if the provided tool contains a complete path.
7936        tool_specified="$FILE"
7937        tool_basename="${tool_specified##*/}"
7938        if test "x$tool_basename" = "x$tool_specified"; then
7939          # A command without a complete path is provided, search $PATH.
7940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7941$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7942          # Extract the first word of "$tool_basename", so it can be a program name with args.
7943set dummy $tool_basename; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_FILE+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $FILE in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972FILE=$ac_cv_path_FILE
7973if test -n "$FILE"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7975$as_echo "$FILE" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982          if test "x$FILE" = x; then
7983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7984          fi
7985        else
7986          # Otherwise we believe it is a complete path. Use it as it is.
7987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7988$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7990$as_echo_n "checking for FILE... " >&6; }
7991          if test ! -x "$tool_specified"; then
7992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7993$as_echo "not found" >&6; }
7994            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7995          fi
7996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7997$as_echo "$tool_specified" >&6; }
7998        fi
7999      fi
8000    fi
8001
8002  fi
8003
8004
8005
8006  if test "x$FILE" = x; then
8007    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8008  fi
8009
8010
8011
8012
8013
8014  # Publish this variable in the help.
8015
8016
8017  if [ -z "${FIND+x}" ]; then
8018    # The variable is not set by user, try to locate tool using the code snippet
8019    for ac_prog in find
8020do
8021  # Extract the first word of "$ac_prog", so it can be a program name with args.
8022set dummy $ac_prog; ac_word=$2
8023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8024$as_echo_n "checking for $ac_word... " >&6; }
8025if ${ac_cv_path_FIND+:} false; then :
8026  $as_echo_n "(cached) " >&6
8027else
8028  case $FIND in
8029  [\\/]* | ?:[\\/]*)
8030  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8031  ;;
8032  *)
8033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034for as_dir in $PATH
8035do
8036  IFS=$as_save_IFS
8037  test -z "$as_dir" && as_dir=.
8038    for ac_exec_ext in '' $ac_executable_extensions; do
8039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8040    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8042    break 2
8043  fi
8044done
8045  done
8046IFS=$as_save_IFS
8047
8048  ;;
8049esac
8050fi
8051FIND=$ac_cv_path_FIND
8052if test -n "$FIND"; then
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8054$as_echo "$FIND" >&6; }
8055else
8056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8057$as_echo "no" >&6; }
8058fi
8059
8060
8061  test -n "$FIND" && break
8062done
8063
8064  else
8065    # The variable is set, but is it from the command line or the environment?
8066
8067    # Try to remove the string !FIND! from our list.
8068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8070      # If it failed, the variable was not from the command line. Ignore it,
8071      # but warn the user (except for BASH, which is always set by the calling BASH).
8072      if test "xFIND" != xBASH; then
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8074$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8075      fi
8076      # Try to locate tool using the code snippet
8077      for ac_prog in find
8078do
8079  # Extract the first word of "$ac_prog", so it can be a program name with args.
8080set dummy $ac_prog; ac_word=$2
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8082$as_echo_n "checking for $ac_word... " >&6; }
8083if ${ac_cv_path_FIND+:} false; then :
8084  $as_echo_n "(cached) " >&6
8085else
8086  case $FIND in
8087  [\\/]* | ?:[\\/]*)
8088  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8089  ;;
8090  *)
8091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092for as_dir in $PATH
8093do
8094  IFS=$as_save_IFS
8095  test -z "$as_dir" && as_dir=.
8096    for ac_exec_ext in '' $ac_executable_extensions; do
8097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8098    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8100    break 2
8101  fi
8102done
8103  done
8104IFS=$as_save_IFS
8105
8106  ;;
8107esac
8108fi
8109FIND=$ac_cv_path_FIND
8110if test -n "$FIND"; then
8111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8112$as_echo "$FIND" >&6; }
8113else
8114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
8116fi
8117
8118
8119  test -n "$FIND" && break
8120done
8121
8122    else
8123      # If it succeeded, then it was overridden by the user. We will use it
8124      # for the tool.
8125
8126      # First remove it from the list of overridden variables, so we can test
8127      # for unknown variables in the end.
8128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8129
8130      # Check if we try to supply an empty value
8131      if test "x$FIND" = x; then
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8133$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8135$as_echo_n "checking for FIND... " >&6; }
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8137$as_echo "disabled" >&6; }
8138      else
8139        # Check if the provided tool contains a complete path.
8140        tool_specified="$FIND"
8141        tool_basename="${tool_specified##*/}"
8142        if test "x$tool_basename" = "x$tool_specified"; then
8143          # A command without a complete path is provided, search $PATH.
8144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8145$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8146          # Extract the first word of "$tool_basename", so it can be a program name with args.
8147set dummy $tool_basename; ac_word=$2
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149$as_echo_n "checking for $ac_word... " >&6; }
8150if ${ac_cv_path_FIND+:} false; then :
8151  $as_echo_n "(cached) " >&6
8152else
8153  case $FIND in
8154  [\\/]* | ?:[\\/]*)
8155  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8156  ;;
8157  *)
8158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159for as_dir in $PATH
8160do
8161  IFS=$as_save_IFS
8162  test -z "$as_dir" && as_dir=.
8163    for ac_exec_ext in '' $ac_executable_extensions; do
8164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167    break 2
8168  fi
8169done
8170  done
8171IFS=$as_save_IFS
8172
8173  ;;
8174esac
8175fi
8176FIND=$ac_cv_path_FIND
8177if test -n "$FIND"; then
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8179$as_echo "$FIND" >&6; }
8180else
8181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186          if test "x$FIND" = x; then
8187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8188          fi
8189        else
8190          # Otherwise we believe it is a complete path. Use it as it is.
8191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8192$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8194$as_echo_n "checking for FIND... " >&6; }
8195          if test ! -x "$tool_specified"; then
8196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8197$as_echo "not found" >&6; }
8198            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8199          fi
8200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8201$as_echo "$tool_specified" >&6; }
8202        fi
8203      fi
8204    fi
8205
8206  fi
8207
8208
8209
8210  if test "x$FIND" = x; then
8211    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8212  fi
8213
8214
8215
8216
8217
8218  # Publish this variable in the help.
8219
8220
8221  if [ -z "${HEAD+x}" ]; then
8222    # The variable is not set by user, try to locate tool using the code snippet
8223    for ac_prog in head
8224do
8225  # Extract the first word of "$ac_prog", so it can be a program name with args.
8226set dummy $ac_prog; ac_word=$2
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8228$as_echo_n "checking for $ac_word... " >&6; }
8229if ${ac_cv_path_HEAD+:} false; then :
8230  $as_echo_n "(cached) " >&6
8231else
8232  case $HEAD in
8233  [\\/]* | ?:[\\/]*)
8234  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8235  ;;
8236  *)
8237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8238for as_dir in $PATH
8239do
8240  IFS=$as_save_IFS
8241  test -z "$as_dir" && as_dir=.
8242    for ac_exec_ext in '' $ac_executable_extensions; do
8243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8244    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8246    break 2
8247  fi
8248done
8249  done
8250IFS=$as_save_IFS
8251
8252  ;;
8253esac
8254fi
8255HEAD=$ac_cv_path_HEAD
8256if test -n "$HEAD"; then
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8258$as_echo "$HEAD" >&6; }
8259else
8260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8261$as_echo "no" >&6; }
8262fi
8263
8264
8265  test -n "$HEAD" && break
8266done
8267
8268  else
8269    # The variable is set, but is it from the command line or the environment?
8270
8271    # Try to remove the string !HEAD! from our list.
8272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8274      # If it failed, the variable was not from the command line. Ignore it,
8275      # but warn the user (except for BASH, which is always set by the calling BASH).
8276      if test "xHEAD" != xBASH; then
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8278$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8279      fi
8280      # Try to locate tool using the code snippet
8281      for ac_prog in head
8282do
8283  # Extract the first word of "$ac_prog", so it can be a program name with args.
8284set dummy $ac_prog; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if ${ac_cv_path_HEAD+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $HEAD in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8293  ;;
8294  *)
8295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310  ;;
8311esac
8312fi
8313HEAD=$ac_cv_path_HEAD
8314if test -n "$HEAD"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8316$as_echo "$HEAD" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323  test -n "$HEAD" && break
8324done
8325
8326    else
8327      # If it succeeded, then it was overridden by the user. We will use it
8328      # for the tool.
8329
8330      # First remove it from the list of overridden variables, so we can test
8331      # for unknown variables in the end.
8332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8333
8334      # Check if we try to supply an empty value
8335      if test "x$HEAD" = x; then
8336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8337$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8339$as_echo_n "checking for HEAD... " >&6; }
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8341$as_echo "disabled" >&6; }
8342      else
8343        # Check if the provided tool contains a complete path.
8344        tool_specified="$HEAD"
8345        tool_basename="${tool_specified##*/}"
8346        if test "x$tool_basename" = "x$tool_specified"; then
8347          # A command without a complete path is provided, search $PATH.
8348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8349$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8350          # Extract the first word of "$tool_basename", so it can be a program name with args.
8351set dummy $tool_basename; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_HEAD+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $HEAD in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380HEAD=$ac_cv_path_HEAD
8381if test -n "$HEAD"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8383$as_echo "$HEAD" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390          if test "x$HEAD" = x; then
8391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8392          fi
8393        else
8394          # Otherwise we believe it is a complete path. Use it as it is.
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8396$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8398$as_echo_n "checking for HEAD... " >&6; }
8399          if test ! -x "$tool_specified"; then
8400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8401$as_echo "not found" >&6; }
8402            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8403          fi
8404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8405$as_echo "$tool_specified" >&6; }
8406        fi
8407      fi
8408    fi
8409
8410  fi
8411
8412
8413
8414  if test "x$HEAD" = x; then
8415    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8416  fi
8417
8418
8419
8420
8421
8422  # Publish this variable in the help.
8423
8424
8425  if [ -z "${GUNZIP+x}" ]; then
8426    # The variable is not set by user, try to locate tool using the code snippet
8427    for ac_prog in gunzip
8428do
8429  # Extract the first word of "$ac_prog", so it can be a program name with args.
8430set dummy $ac_prog; ac_word=$2
8431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8432$as_echo_n "checking for $ac_word... " >&6; }
8433if ${ac_cv_path_GUNZIP+:} false; then :
8434  $as_echo_n "(cached) " >&6
8435else
8436  case $GUNZIP in
8437  [\\/]* | ?:[\\/]*)
8438  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8439  ;;
8440  *)
8441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8442for as_dir in $PATH
8443do
8444  IFS=$as_save_IFS
8445  test -z "$as_dir" && as_dir=.
8446    for ac_exec_ext in '' $ac_executable_extensions; do
8447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8448    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8450    break 2
8451  fi
8452done
8453  done
8454IFS=$as_save_IFS
8455
8456  ;;
8457esac
8458fi
8459GUNZIP=$ac_cv_path_GUNZIP
8460if test -n "$GUNZIP"; then
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8462$as_echo "$GUNZIP" >&6; }
8463else
8464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8465$as_echo "no" >&6; }
8466fi
8467
8468
8469  test -n "$GUNZIP" && break
8470done
8471
8472  else
8473    # The variable is set, but is it from the command line or the environment?
8474
8475    # Try to remove the string !GUNZIP! from our list.
8476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8478      # If it failed, the variable was not from the command line. Ignore it,
8479      # but warn the user (except for BASH, which is always set by the calling BASH).
8480      if test "xGUNZIP" != xBASH; then
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8482$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8483      fi
8484      # Try to locate tool using the code snippet
8485      for ac_prog in gunzip
8486do
8487  # Extract the first word of "$ac_prog", so it can be a program name with args.
8488set dummy $ac_prog; ac_word=$2
8489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8490$as_echo_n "checking for $ac_word... " >&6; }
8491if ${ac_cv_path_GUNZIP+:} false; then :
8492  $as_echo_n "(cached) " >&6
8493else
8494  case $GUNZIP in
8495  [\\/]* | ?:[\\/]*)
8496  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8497  ;;
8498  *)
8499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8500for as_dir in $PATH
8501do
8502  IFS=$as_save_IFS
8503  test -z "$as_dir" && as_dir=.
8504    for ac_exec_ext in '' $ac_executable_extensions; do
8505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8506    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8508    break 2
8509  fi
8510done
8511  done
8512IFS=$as_save_IFS
8513
8514  ;;
8515esac
8516fi
8517GUNZIP=$ac_cv_path_GUNZIP
8518if test -n "$GUNZIP"; then
8519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8520$as_echo "$GUNZIP" >&6; }
8521else
8522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8523$as_echo "no" >&6; }
8524fi
8525
8526
8527  test -n "$GUNZIP" && break
8528done
8529
8530    else
8531      # If it succeeded, then it was overridden by the user. We will use it
8532      # for the tool.
8533
8534      # First remove it from the list of overridden variables, so we can test
8535      # for unknown variables in the end.
8536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8537
8538      # Check if we try to supply an empty value
8539      if test "x$GUNZIP" = x; then
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8541$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8543$as_echo_n "checking for GUNZIP... " >&6; }
8544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8545$as_echo "disabled" >&6; }
8546      else
8547        # Check if the provided tool contains a complete path.
8548        tool_specified="$GUNZIP"
8549        tool_basename="${tool_specified##*/}"
8550        if test "x$tool_basename" = "x$tool_specified"; then
8551          # A command without a complete path is provided, search $PATH.
8552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8553$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8554          # Extract the first word of "$tool_basename", so it can be a program name with args.
8555set dummy $tool_basename; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_GUNZIP+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $GUNZIP in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584GUNZIP=$ac_cv_path_GUNZIP
8585if test -n "$GUNZIP"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8587$as_echo "$GUNZIP" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594          if test "x$GUNZIP" = x; then
8595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8596          fi
8597        else
8598          # Otherwise we believe it is a complete path. Use it as it is.
8599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8600$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8602$as_echo_n "checking for GUNZIP... " >&6; }
8603          if test ! -x "$tool_specified"; then
8604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8605$as_echo "not found" >&6; }
8606            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8607          fi
8608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8609$as_echo "$tool_specified" >&6; }
8610        fi
8611      fi
8612    fi
8613
8614  fi
8615
8616
8617
8618  if test "x$GUNZIP" = x; then
8619    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8620  fi
8621
8622
8623
8624
8625
8626  # Publish this variable in the help.
8627
8628
8629  if [ -z "${GZIP+x}" ]; then
8630    # The variable is not set by user, try to locate tool using the code snippet
8631    for ac_prog in pigz gzip
8632do
8633  # Extract the first word of "$ac_prog", so it can be a program name with args.
8634set dummy $ac_prog; ac_word=$2
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8636$as_echo_n "checking for $ac_word... " >&6; }
8637if ${ac_cv_path_GZIP+:} false; then :
8638  $as_echo_n "(cached) " >&6
8639else
8640  case $GZIP in
8641  [\\/]* | ?:[\\/]*)
8642  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8643  ;;
8644  *)
8645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8646for as_dir in $PATH
8647do
8648  IFS=$as_save_IFS
8649  test -z "$as_dir" && as_dir=.
8650    for ac_exec_ext in '' $ac_executable_extensions; do
8651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8652    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8654    break 2
8655  fi
8656done
8657  done
8658IFS=$as_save_IFS
8659
8660  ;;
8661esac
8662fi
8663GZIP=$ac_cv_path_GZIP
8664if test -n "$GZIP"; then
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8666$as_echo "$GZIP" >&6; }
8667else
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8669$as_echo "no" >&6; }
8670fi
8671
8672
8673  test -n "$GZIP" && break
8674done
8675
8676  else
8677    # The variable is set, but is it from the command line or the environment?
8678
8679    # Try to remove the string !GZIP! from our list.
8680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8682      # If it failed, the variable was not from the command line. Ignore it,
8683      # but warn the user (except for BASH, which is always set by the calling BASH).
8684      if test "xGZIP" != xBASH; then
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8686$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8687      fi
8688      # Try to locate tool using the code snippet
8689      for ac_prog in pigz gzip
8690do
8691  # Extract the first word of "$ac_prog", so it can be a program name with args.
8692set dummy $ac_prog; ac_word=$2
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8694$as_echo_n "checking for $ac_word... " >&6; }
8695if ${ac_cv_path_GZIP+:} false; then :
8696  $as_echo_n "(cached) " >&6
8697else
8698  case $GZIP in
8699  [\\/]* | ?:[\\/]*)
8700  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8701  ;;
8702  *)
8703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704for as_dir in $PATH
8705do
8706  IFS=$as_save_IFS
8707  test -z "$as_dir" && as_dir=.
8708    for ac_exec_ext in '' $ac_executable_extensions; do
8709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8710    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8712    break 2
8713  fi
8714done
8715  done
8716IFS=$as_save_IFS
8717
8718  ;;
8719esac
8720fi
8721GZIP=$ac_cv_path_GZIP
8722if test -n "$GZIP"; then
8723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8724$as_echo "$GZIP" >&6; }
8725else
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8727$as_echo "no" >&6; }
8728fi
8729
8730
8731  test -n "$GZIP" && break
8732done
8733
8734    else
8735      # If it succeeded, then it was overridden by the user. We will use it
8736      # for the tool.
8737
8738      # First remove it from the list of overridden variables, so we can test
8739      # for unknown variables in the end.
8740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8741
8742      # Check if we try to supply an empty value
8743      if test "x$GZIP" = x; then
8744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8745$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8747$as_echo_n "checking for GZIP... " >&6; }
8748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8749$as_echo "disabled" >&6; }
8750      else
8751        # Check if the provided tool contains a complete path.
8752        tool_specified="$GZIP"
8753        tool_basename="${tool_specified##*/}"
8754        if test "x$tool_basename" = "x$tool_specified"; then
8755          # A command without a complete path is provided, search $PATH.
8756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8757$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8758          # Extract the first word of "$tool_basename", so it can be a program name with args.
8759set dummy $tool_basename; ac_word=$2
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761$as_echo_n "checking for $ac_word... " >&6; }
8762if ${ac_cv_path_GZIP+:} false; then :
8763  $as_echo_n "(cached) " >&6
8764else
8765  case $GZIP in
8766  [\\/]* | ?:[\\/]*)
8767  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8768  ;;
8769  *)
8770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773  IFS=$as_save_IFS
8774  test -z "$as_dir" && as_dir=.
8775    for ac_exec_ext in '' $ac_executable_extensions; do
8776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779    break 2
8780  fi
8781done
8782  done
8783IFS=$as_save_IFS
8784
8785  ;;
8786esac
8787fi
8788GZIP=$ac_cv_path_GZIP
8789if test -n "$GZIP"; then
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8791$as_echo "$GZIP" >&6; }
8792else
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795fi
8796
8797
8798          if test "x$GZIP" = x; then
8799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8800          fi
8801        else
8802          # Otherwise we believe it is a complete path. Use it as it is.
8803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8804$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8806$as_echo_n "checking for GZIP... " >&6; }
8807          if test ! -x "$tool_specified"; then
8808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8809$as_echo "not found" >&6; }
8810            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8811          fi
8812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8813$as_echo "$tool_specified" >&6; }
8814        fi
8815      fi
8816    fi
8817
8818  fi
8819
8820
8821
8822  if test "x$GZIP" = x; then
8823    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8824  fi
8825
8826
8827
8828
8829
8830  # Publish this variable in the help.
8831
8832
8833  if [ -z "${LN+x}" ]; then
8834    # The variable is not set by user, try to locate tool using the code snippet
8835    for ac_prog in ln
8836do
8837  # Extract the first word of "$ac_prog", so it can be a program name with args.
8838set dummy $ac_prog; ac_word=$2
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840$as_echo_n "checking for $ac_word... " >&6; }
8841if ${ac_cv_path_LN+:} false; then :
8842  $as_echo_n "(cached) " >&6
8843else
8844  case $LN in
8845  [\\/]* | ?:[\\/]*)
8846  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8847  ;;
8848  *)
8849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850for as_dir in $PATH
8851do
8852  IFS=$as_save_IFS
8853  test -z "$as_dir" && as_dir=.
8854    for ac_exec_ext in '' $ac_executable_extensions; do
8855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8856    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858    break 2
8859  fi
8860done
8861  done
8862IFS=$as_save_IFS
8863
8864  ;;
8865esac
8866fi
8867LN=$ac_cv_path_LN
8868if test -n "$LN"; then
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8870$as_echo "$LN" >&6; }
8871else
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
8874fi
8875
8876
8877  test -n "$LN" && break
8878done
8879
8880  else
8881    # The variable is set, but is it from the command line or the environment?
8882
8883    # Try to remove the string !LN! from our list.
8884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8886      # If it failed, the variable was not from the command line. Ignore it,
8887      # but warn the user (except for BASH, which is always set by the calling BASH).
8888      if test "xLN" != xBASH; then
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8890$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8891      fi
8892      # Try to locate tool using the code snippet
8893      for ac_prog in ln
8894do
8895  # Extract the first word of "$ac_prog", so it can be a program name with args.
8896set dummy $ac_prog; ac_word=$2
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8898$as_echo_n "checking for $ac_word... " >&6; }
8899if ${ac_cv_path_LN+:} false; then :
8900  $as_echo_n "(cached) " >&6
8901else
8902  case $LN in
8903  [\\/]* | ?:[\\/]*)
8904  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8905  ;;
8906  *)
8907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908for as_dir in $PATH
8909do
8910  IFS=$as_save_IFS
8911  test -z "$as_dir" && as_dir=.
8912    for ac_exec_ext in '' $ac_executable_extensions; do
8913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8914    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916    break 2
8917  fi
8918done
8919  done
8920IFS=$as_save_IFS
8921
8922  ;;
8923esac
8924fi
8925LN=$ac_cv_path_LN
8926if test -n "$LN"; then
8927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8928$as_echo "$LN" >&6; }
8929else
8930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931$as_echo "no" >&6; }
8932fi
8933
8934
8935  test -n "$LN" && break
8936done
8937
8938    else
8939      # If it succeeded, then it was overridden by the user. We will use it
8940      # for the tool.
8941
8942      # First remove it from the list of overridden variables, so we can test
8943      # for unknown variables in the end.
8944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8945
8946      # Check if we try to supply an empty value
8947      if test "x$LN" = x; then
8948        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8949$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8951$as_echo_n "checking for LN... " >&6; }
8952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8953$as_echo "disabled" >&6; }
8954      else
8955        # Check if the provided tool contains a complete path.
8956        tool_specified="$LN"
8957        tool_basename="${tool_specified##*/}"
8958        if test "x$tool_basename" = "x$tool_specified"; then
8959          # A command without a complete path is provided, search $PATH.
8960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8961$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8962          # Extract the first word of "$tool_basename", so it can be a program name with args.
8963set dummy $tool_basename; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_LN+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $LN in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992LN=$ac_cv_path_LN
8993if test -n "$LN"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8995$as_echo "$LN" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002          if test "x$LN" = x; then
9003            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9004          fi
9005        else
9006          # Otherwise we believe it is a complete path. Use it as it is.
9007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9008$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9009          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9010$as_echo_n "checking for LN... " >&6; }
9011          if test ! -x "$tool_specified"; then
9012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9013$as_echo "not found" >&6; }
9014            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9015          fi
9016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9017$as_echo "$tool_specified" >&6; }
9018        fi
9019      fi
9020    fi
9021
9022  fi
9023
9024
9025
9026  if test "x$LN" = x; then
9027    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9028  fi
9029
9030
9031
9032
9033
9034  # Publish this variable in the help.
9035
9036
9037  if [ -z "${LS+x}" ]; then
9038    # The variable is not set by user, try to locate tool using the code snippet
9039    for ac_prog in ls
9040do
9041  # Extract the first word of "$ac_prog", so it can be a program name with args.
9042set dummy $ac_prog; ac_word=$2
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9044$as_echo_n "checking for $ac_word... " >&6; }
9045if ${ac_cv_path_LS+:} false; then :
9046  $as_echo_n "(cached) " >&6
9047else
9048  case $LS in
9049  [\\/]* | ?:[\\/]*)
9050  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9051  ;;
9052  *)
9053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9054for as_dir in $PATH
9055do
9056  IFS=$as_save_IFS
9057  test -z "$as_dir" && as_dir=.
9058    for ac_exec_ext in '' $ac_executable_extensions; do
9059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9060    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9062    break 2
9063  fi
9064done
9065  done
9066IFS=$as_save_IFS
9067
9068  ;;
9069esac
9070fi
9071LS=$ac_cv_path_LS
9072if test -n "$LS"; then
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9074$as_echo "$LS" >&6; }
9075else
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
9078fi
9079
9080
9081  test -n "$LS" && break
9082done
9083
9084  else
9085    # The variable is set, but is it from the command line or the environment?
9086
9087    # Try to remove the string !LS! from our list.
9088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9090      # If it failed, the variable was not from the command line. Ignore it,
9091      # but warn the user (except for BASH, which is always set by the calling BASH).
9092      if test "xLS" != xBASH; then
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9094$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9095      fi
9096      # Try to locate tool using the code snippet
9097      for ac_prog in ls
9098do
9099  # Extract the first word of "$ac_prog", so it can be a program name with args.
9100set dummy $ac_prog; ac_word=$2
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9102$as_echo_n "checking for $ac_word... " >&6; }
9103if ${ac_cv_path_LS+:} false; then :
9104  $as_echo_n "(cached) " >&6
9105else
9106  case $LS in
9107  [\\/]* | ?:[\\/]*)
9108  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9109  ;;
9110  *)
9111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9112for as_dir in $PATH
9113do
9114  IFS=$as_save_IFS
9115  test -z "$as_dir" && as_dir=.
9116    for ac_exec_ext in '' $ac_executable_extensions; do
9117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9118    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9120    break 2
9121  fi
9122done
9123  done
9124IFS=$as_save_IFS
9125
9126  ;;
9127esac
9128fi
9129LS=$ac_cv_path_LS
9130if test -n "$LS"; then
9131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9132$as_echo "$LS" >&6; }
9133else
9134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9135$as_echo "no" >&6; }
9136fi
9137
9138
9139  test -n "$LS" && break
9140done
9141
9142    else
9143      # If it succeeded, then it was overridden by the user. We will use it
9144      # for the tool.
9145
9146      # First remove it from the list of overridden variables, so we can test
9147      # for unknown variables in the end.
9148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9149
9150      # Check if we try to supply an empty value
9151      if test "x$LS" = x; then
9152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9153$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9155$as_echo_n "checking for LS... " >&6; }
9156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9157$as_echo "disabled" >&6; }
9158      else
9159        # Check if the provided tool contains a complete path.
9160        tool_specified="$LS"
9161        tool_basename="${tool_specified##*/}"
9162        if test "x$tool_basename" = "x$tool_specified"; then
9163          # A command without a complete path is provided, search $PATH.
9164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9165$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9166          # Extract the first word of "$tool_basename", so it can be a program name with args.
9167set dummy $tool_basename; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if ${ac_cv_path_LS+:} false; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $LS in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196LS=$ac_cv_path_LS
9197if test -n "$LS"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9199$as_echo "$LS" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206          if test "x$LS" = x; then
9207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9208          fi
9209        else
9210          # Otherwise we believe it is a complete path. Use it as it is.
9211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9212$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9214$as_echo_n "checking for LS... " >&6; }
9215          if test ! -x "$tool_specified"; then
9216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9217$as_echo "not found" >&6; }
9218            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9219          fi
9220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9221$as_echo "$tool_specified" >&6; }
9222        fi
9223      fi
9224    fi
9225
9226  fi
9227
9228
9229
9230  if test "x$LS" = x; then
9231    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9232  fi
9233
9234
9235
9236
9237
9238  # Publish this variable in the help.
9239
9240
9241  if [ -z "${MKDIR+x}" ]; then
9242    # The variable is not set by user, try to locate tool using the code snippet
9243    for ac_prog in mkdir
9244do
9245  # Extract the first word of "$ac_prog", so it can be a program name with args.
9246set dummy $ac_prog; ac_word=$2
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248$as_echo_n "checking for $ac_word... " >&6; }
9249if ${ac_cv_path_MKDIR+:} false; then :
9250  $as_echo_n "(cached) " >&6
9251else
9252  case $MKDIR in
9253  [\\/]* | ?:[\\/]*)
9254  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9255  ;;
9256  *)
9257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258for as_dir in $PATH
9259do
9260  IFS=$as_save_IFS
9261  test -z "$as_dir" && as_dir=.
9262    for ac_exec_ext in '' $ac_executable_extensions; do
9263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266    break 2
9267  fi
9268done
9269  done
9270IFS=$as_save_IFS
9271
9272  ;;
9273esac
9274fi
9275MKDIR=$ac_cv_path_MKDIR
9276if test -n "$MKDIR"; then
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9278$as_echo "$MKDIR" >&6; }
9279else
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281$as_echo "no" >&6; }
9282fi
9283
9284
9285  test -n "$MKDIR" && break
9286done
9287
9288  else
9289    # The variable is set, but is it from the command line or the environment?
9290
9291    # Try to remove the string !MKDIR! from our list.
9292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9294      # If it failed, the variable was not from the command line. Ignore it,
9295      # but warn the user (except for BASH, which is always set by the calling BASH).
9296      if test "xMKDIR" != xBASH; then
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9298$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9299      fi
9300      # Try to locate tool using the code snippet
9301      for ac_prog in mkdir
9302do
9303  # Extract the first word of "$ac_prog", so it can be a program name with args.
9304set dummy $ac_prog; ac_word=$2
9305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9306$as_echo_n "checking for $ac_word... " >&6; }
9307if ${ac_cv_path_MKDIR+:} false; then :
9308  $as_echo_n "(cached) " >&6
9309else
9310  case $MKDIR in
9311  [\\/]* | ?:[\\/]*)
9312  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9313  ;;
9314  *)
9315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9316for as_dir in $PATH
9317do
9318  IFS=$as_save_IFS
9319  test -z "$as_dir" && as_dir=.
9320    for ac_exec_ext in '' $ac_executable_extensions; do
9321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9322    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9324    break 2
9325  fi
9326done
9327  done
9328IFS=$as_save_IFS
9329
9330  ;;
9331esac
9332fi
9333MKDIR=$ac_cv_path_MKDIR
9334if test -n "$MKDIR"; then
9335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9336$as_echo "$MKDIR" >&6; }
9337else
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9339$as_echo "no" >&6; }
9340fi
9341
9342
9343  test -n "$MKDIR" && break
9344done
9345
9346    else
9347      # If it succeeded, then it was overridden by the user. We will use it
9348      # for the tool.
9349
9350      # First remove it from the list of overridden variables, so we can test
9351      # for unknown variables in the end.
9352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9353
9354      # Check if we try to supply an empty value
9355      if test "x$MKDIR" = x; then
9356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9357$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9359$as_echo_n "checking for MKDIR... " >&6; }
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9361$as_echo "disabled" >&6; }
9362      else
9363        # Check if the provided tool contains a complete path.
9364        tool_specified="$MKDIR"
9365        tool_basename="${tool_specified##*/}"
9366        if test "x$tool_basename" = "x$tool_specified"; then
9367          # A command without a complete path is provided, search $PATH.
9368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9369$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9370          # Extract the first word of "$tool_basename", so it can be a program name with args.
9371set dummy $tool_basename; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_MKDIR+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $MKDIR in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400MKDIR=$ac_cv_path_MKDIR
9401if test -n "$MKDIR"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9403$as_echo "$MKDIR" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410          if test "x$MKDIR" = x; then
9411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9412          fi
9413        else
9414          # Otherwise we believe it is a complete path. Use it as it is.
9415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9416$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9418$as_echo_n "checking for MKDIR... " >&6; }
9419          if test ! -x "$tool_specified"; then
9420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9421$as_echo "not found" >&6; }
9422            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9423          fi
9424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9425$as_echo "$tool_specified" >&6; }
9426        fi
9427      fi
9428    fi
9429
9430  fi
9431
9432
9433
9434  if test "x$MKDIR" = x; then
9435    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9436  fi
9437
9438
9439
9440
9441
9442  # Publish this variable in the help.
9443
9444
9445  if [ -z "${MKTEMP+x}" ]; then
9446    # The variable is not set by user, try to locate tool using the code snippet
9447    for ac_prog in mktemp
9448do
9449  # Extract the first word of "$ac_prog", so it can be a program name with args.
9450set dummy $ac_prog; ac_word=$2
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if ${ac_cv_path_MKTEMP+:} false; then :
9454  $as_echo_n "(cached) " >&6
9455else
9456  case $MKTEMP in
9457  [\\/]* | ?:[\\/]*)
9458  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9459  ;;
9460  *)
9461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9462for as_dir in $PATH
9463do
9464  IFS=$as_save_IFS
9465  test -z "$as_dir" && as_dir=.
9466    for ac_exec_ext in '' $ac_executable_extensions; do
9467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9468    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9470    break 2
9471  fi
9472done
9473  done
9474IFS=$as_save_IFS
9475
9476  ;;
9477esac
9478fi
9479MKTEMP=$ac_cv_path_MKTEMP
9480if test -n "$MKTEMP"; then
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9482$as_echo "$MKTEMP" >&6; }
9483else
9484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
9486fi
9487
9488
9489  test -n "$MKTEMP" && break
9490done
9491
9492  else
9493    # The variable is set, but is it from the command line or the environment?
9494
9495    # Try to remove the string !MKTEMP! from our list.
9496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9498      # If it failed, the variable was not from the command line. Ignore it,
9499      # but warn the user (except for BASH, which is always set by the calling BASH).
9500      if test "xMKTEMP" != xBASH; then
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9502$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9503      fi
9504      # Try to locate tool using the code snippet
9505      for ac_prog in mktemp
9506do
9507  # Extract the first word of "$ac_prog", so it can be a program name with args.
9508set dummy $ac_prog; ac_word=$2
9509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9510$as_echo_n "checking for $ac_word... " >&6; }
9511if ${ac_cv_path_MKTEMP+:} false; then :
9512  $as_echo_n "(cached) " >&6
9513else
9514  case $MKTEMP in
9515  [\\/]* | ?:[\\/]*)
9516  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9517  ;;
9518  *)
9519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9520for as_dir in $PATH
9521do
9522  IFS=$as_save_IFS
9523  test -z "$as_dir" && as_dir=.
9524    for ac_exec_ext in '' $ac_executable_extensions; do
9525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9526    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9528    break 2
9529  fi
9530done
9531  done
9532IFS=$as_save_IFS
9533
9534  ;;
9535esac
9536fi
9537MKTEMP=$ac_cv_path_MKTEMP
9538if test -n "$MKTEMP"; then
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9540$as_echo "$MKTEMP" >&6; }
9541else
9542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
9544fi
9545
9546
9547  test -n "$MKTEMP" && break
9548done
9549
9550    else
9551      # If it succeeded, then it was overridden by the user. We will use it
9552      # for the tool.
9553
9554      # First remove it from the list of overridden variables, so we can test
9555      # for unknown variables in the end.
9556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9557
9558      # Check if we try to supply an empty value
9559      if test "x$MKTEMP" = x; then
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9561$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9563$as_echo_n "checking for MKTEMP... " >&6; }
9564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9565$as_echo "disabled" >&6; }
9566      else
9567        # Check if the provided tool contains a complete path.
9568        tool_specified="$MKTEMP"
9569        tool_basename="${tool_specified##*/}"
9570        if test "x$tool_basename" = "x$tool_specified"; then
9571          # A command without a complete path is provided, search $PATH.
9572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9573$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9574          # Extract the first word of "$tool_basename", so it can be a program name with args.
9575set dummy $tool_basename; ac_word=$2
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if ${ac_cv_path_MKTEMP+:} false; then :
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $MKTEMP in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9593    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604MKTEMP=$ac_cv_path_MKTEMP
9605if test -n "$MKTEMP"; then
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9607$as_echo "$MKTEMP" >&6; }
9608else
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614          if test "x$MKTEMP" = x; then
9615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9616          fi
9617        else
9618          # Otherwise we believe it is a complete path. Use it as it is.
9619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9620$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9622$as_echo_n "checking for MKTEMP... " >&6; }
9623          if test ! -x "$tool_specified"; then
9624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9625$as_echo "not found" >&6; }
9626            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9627          fi
9628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9629$as_echo "$tool_specified" >&6; }
9630        fi
9631      fi
9632    fi
9633
9634  fi
9635
9636
9637
9638  if test "x$MKTEMP" = x; then
9639    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9640  fi
9641
9642
9643
9644
9645
9646  # Publish this variable in the help.
9647
9648
9649  if [ -z "${MV+x}" ]; then
9650    # The variable is not set by user, try to locate tool using the code snippet
9651    for ac_prog in mv
9652do
9653  # Extract the first word of "$ac_prog", so it can be a program name with args.
9654set dummy $ac_prog; ac_word=$2
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9656$as_echo_n "checking for $ac_word... " >&6; }
9657if ${ac_cv_path_MV+:} false; then :
9658  $as_echo_n "(cached) " >&6
9659else
9660  case $MV in
9661  [\\/]* | ?:[\\/]*)
9662  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9663  ;;
9664  *)
9665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9666for as_dir in $PATH
9667do
9668  IFS=$as_save_IFS
9669  test -z "$as_dir" && as_dir=.
9670    for ac_exec_ext in '' $ac_executable_extensions; do
9671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9672    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9674    break 2
9675  fi
9676done
9677  done
9678IFS=$as_save_IFS
9679
9680  ;;
9681esac
9682fi
9683MV=$ac_cv_path_MV
9684if test -n "$MV"; then
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9686$as_echo "$MV" >&6; }
9687else
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
9690fi
9691
9692
9693  test -n "$MV" && break
9694done
9695
9696  else
9697    # The variable is set, but is it from the command line or the environment?
9698
9699    # Try to remove the string !MV! from our list.
9700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9702      # If it failed, the variable was not from the command line. Ignore it,
9703      # but warn the user (except for BASH, which is always set by the calling BASH).
9704      if test "xMV" != xBASH; then
9705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9706$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9707      fi
9708      # Try to locate tool using the code snippet
9709      for ac_prog in mv
9710do
9711  # Extract the first word of "$ac_prog", so it can be a program name with args.
9712set dummy $ac_prog; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if ${ac_cv_path_MV+:} false; then :
9716  $as_echo_n "(cached) " >&6
9717else
9718  case $MV in
9719  [\\/]* | ?:[\\/]*)
9720  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9721  ;;
9722  *)
9723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726  IFS=$as_save_IFS
9727  test -z "$as_dir" && as_dir=.
9728    for ac_exec_ext in '' $ac_executable_extensions; do
9729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9730    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732    break 2
9733  fi
9734done
9735  done
9736IFS=$as_save_IFS
9737
9738  ;;
9739esac
9740fi
9741MV=$ac_cv_path_MV
9742if test -n "$MV"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9744$as_echo "$MV" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750
9751  test -n "$MV" && break
9752done
9753
9754    else
9755      # If it succeeded, then it was overridden by the user. We will use it
9756      # for the tool.
9757
9758      # First remove it from the list of overridden variables, so we can test
9759      # for unknown variables in the end.
9760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9761
9762      # Check if we try to supply an empty value
9763      if test "x$MV" = x; then
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9765$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9767$as_echo_n "checking for MV... " >&6; }
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9769$as_echo "disabled" >&6; }
9770      else
9771        # Check if the provided tool contains a complete path.
9772        tool_specified="$MV"
9773        tool_basename="${tool_specified##*/}"
9774        if test "x$tool_basename" = "x$tool_specified"; then
9775          # A command without a complete path is provided, search $PATH.
9776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9777$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9778          # Extract the first word of "$tool_basename", so it can be a program name with args.
9779set dummy $tool_basename; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_MV+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $MV in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808MV=$ac_cv_path_MV
9809if test -n "$MV"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9811$as_echo "$MV" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818          if test "x$MV" = x; then
9819            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9820          fi
9821        else
9822          # Otherwise we believe it is a complete path. Use it as it is.
9823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9824$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9826$as_echo_n "checking for MV... " >&6; }
9827          if test ! -x "$tool_specified"; then
9828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9829$as_echo "not found" >&6; }
9830            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9831          fi
9832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9833$as_echo "$tool_specified" >&6; }
9834        fi
9835      fi
9836    fi
9837
9838  fi
9839
9840
9841
9842  if test "x$MV" = x; then
9843    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9844  fi
9845
9846
9847
9848
9849
9850  # Publish this variable in the help.
9851
9852
9853  if [ -z "${NAWK+x}" ]; then
9854    # The variable is not set by user, try to locate tool using the code snippet
9855    for ac_prog in nawk gawk awk
9856do
9857  # Extract the first word of "$ac_prog", so it can be a program name with args.
9858set dummy $ac_prog; ac_word=$2
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9860$as_echo_n "checking for $ac_word... " >&6; }
9861if ${ac_cv_path_NAWK+:} false; then :
9862  $as_echo_n "(cached) " >&6
9863else
9864  case $NAWK in
9865  [\\/]* | ?:[\\/]*)
9866  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9867  ;;
9868  *)
9869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870for as_dir in $PATH
9871do
9872  IFS=$as_save_IFS
9873  test -z "$as_dir" && as_dir=.
9874    for ac_exec_ext in '' $ac_executable_extensions; do
9875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9876    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9878    break 2
9879  fi
9880done
9881  done
9882IFS=$as_save_IFS
9883
9884  ;;
9885esac
9886fi
9887NAWK=$ac_cv_path_NAWK
9888if test -n "$NAWK"; then
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9890$as_echo "$NAWK" >&6; }
9891else
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
9897  test -n "$NAWK" && break
9898done
9899
9900  else
9901    # The variable is set, but is it from the command line or the environment?
9902
9903    # Try to remove the string !NAWK! from our list.
9904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9906      # If it failed, the variable was not from the command line. Ignore it,
9907      # but warn the user (except for BASH, which is always set by the calling BASH).
9908      if test "xNAWK" != xBASH; then
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9910$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9911      fi
9912      # Try to locate tool using the code snippet
9913      for ac_prog in nawk gawk awk
9914do
9915  # Extract the first word of "$ac_prog", so it can be a program name with args.
9916set dummy $ac_prog; ac_word=$2
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9918$as_echo_n "checking for $ac_word... " >&6; }
9919if ${ac_cv_path_NAWK+:} false; then :
9920  $as_echo_n "(cached) " >&6
9921else
9922  case $NAWK in
9923  [\\/]* | ?:[\\/]*)
9924  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9925  ;;
9926  *)
9927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930  IFS=$as_save_IFS
9931  test -z "$as_dir" && as_dir=.
9932    for ac_exec_ext in '' $ac_executable_extensions; do
9933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9934    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9936    break 2
9937  fi
9938done
9939  done
9940IFS=$as_save_IFS
9941
9942  ;;
9943esac
9944fi
9945NAWK=$ac_cv_path_NAWK
9946if test -n "$NAWK"; then
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9948$as_echo "$NAWK" >&6; }
9949else
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954
9955  test -n "$NAWK" && break
9956done
9957
9958    else
9959      # If it succeeded, then it was overridden by the user. We will use it
9960      # for the tool.
9961
9962      # First remove it from the list of overridden variables, so we can test
9963      # for unknown variables in the end.
9964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9965
9966      # Check if we try to supply an empty value
9967      if test "x$NAWK" = x; then
9968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9969$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9971$as_echo_n "checking for NAWK... " >&6; }
9972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9973$as_echo "disabled" >&6; }
9974      else
9975        # Check if the provided tool contains a complete path.
9976        tool_specified="$NAWK"
9977        tool_basename="${tool_specified##*/}"
9978        if test "x$tool_basename" = "x$tool_specified"; then
9979          # A command without a complete path is provided, search $PATH.
9980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9981$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9982          # Extract the first word of "$tool_basename", so it can be a program name with args.
9983set dummy $tool_basename; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_NAWK+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $NAWK in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012NAWK=$ac_cv_path_NAWK
10013if test -n "$NAWK"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10015$as_echo "$NAWK" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022          if test "x$NAWK" = x; then
10023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10024          fi
10025        else
10026          # Otherwise we believe it is a complete path. Use it as it is.
10027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10028$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10030$as_echo_n "checking for NAWK... " >&6; }
10031          if test ! -x "$tool_specified"; then
10032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10033$as_echo "not found" >&6; }
10034            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10035          fi
10036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10037$as_echo "$tool_specified" >&6; }
10038        fi
10039      fi
10040    fi
10041
10042  fi
10043
10044
10045
10046  if test "x$NAWK" = x; then
10047    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10048  fi
10049
10050
10051
10052
10053
10054  # Publish this variable in the help.
10055
10056
10057  if [ -z "${PRINTF+x}" ]; then
10058    # The variable is not set by user, try to locate tool using the code snippet
10059    for ac_prog in printf
10060do
10061  # Extract the first word of "$ac_prog", so it can be a program name with args.
10062set dummy $ac_prog; ac_word=$2
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10064$as_echo_n "checking for $ac_word... " >&6; }
10065if ${ac_cv_path_PRINTF+:} false; then :
10066  $as_echo_n "(cached) " >&6
10067else
10068  case $PRINTF in
10069  [\\/]* | ?:[\\/]*)
10070  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10071  ;;
10072  *)
10073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10074for as_dir in $PATH
10075do
10076  IFS=$as_save_IFS
10077  test -z "$as_dir" && as_dir=.
10078    for ac_exec_ext in '' $ac_executable_extensions; do
10079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10080    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10082    break 2
10083  fi
10084done
10085  done
10086IFS=$as_save_IFS
10087
10088  ;;
10089esac
10090fi
10091PRINTF=$ac_cv_path_PRINTF
10092if test -n "$PRINTF"; then
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10094$as_echo "$PRINTF" >&6; }
10095else
10096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
10098fi
10099
10100
10101  test -n "$PRINTF" && break
10102done
10103
10104  else
10105    # The variable is set, but is it from the command line or the environment?
10106
10107    # Try to remove the string !PRINTF! from our list.
10108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10110      # If it failed, the variable was not from the command line. Ignore it,
10111      # but warn the user (except for BASH, which is always set by the calling BASH).
10112      if test "xPRINTF" != xBASH; then
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10114$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10115      fi
10116      # Try to locate tool using the code snippet
10117      for ac_prog in printf
10118do
10119  # Extract the first word of "$ac_prog", so it can be a program name with args.
10120set dummy $ac_prog; ac_word=$2
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10122$as_echo_n "checking for $ac_word... " >&6; }
10123if ${ac_cv_path_PRINTF+:} false; then :
10124  $as_echo_n "(cached) " >&6
10125else
10126  case $PRINTF in
10127  [\\/]* | ?:[\\/]*)
10128  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10129  ;;
10130  *)
10131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10132for as_dir in $PATH
10133do
10134  IFS=$as_save_IFS
10135  test -z "$as_dir" && as_dir=.
10136    for ac_exec_ext in '' $ac_executable_extensions; do
10137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10138    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10140    break 2
10141  fi
10142done
10143  done
10144IFS=$as_save_IFS
10145
10146  ;;
10147esac
10148fi
10149PRINTF=$ac_cv_path_PRINTF
10150if test -n "$PRINTF"; then
10151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10152$as_echo "$PRINTF" >&6; }
10153else
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
10156fi
10157
10158
10159  test -n "$PRINTF" && break
10160done
10161
10162    else
10163      # If it succeeded, then it was overridden by the user. We will use it
10164      # for the tool.
10165
10166      # First remove it from the list of overridden variables, so we can test
10167      # for unknown variables in the end.
10168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10169
10170      # Check if we try to supply an empty value
10171      if test "x$PRINTF" = x; then
10172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10173$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10175$as_echo_n "checking for PRINTF... " >&6; }
10176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10177$as_echo "disabled" >&6; }
10178      else
10179        # Check if the provided tool contains a complete path.
10180        tool_specified="$PRINTF"
10181        tool_basename="${tool_specified##*/}"
10182        if test "x$tool_basename" = "x$tool_specified"; then
10183          # A command without a complete path is provided, search $PATH.
10184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10185$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10186          # Extract the first word of "$tool_basename", so it can be a program name with args.
10187set dummy $tool_basename; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_PRINTF+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $PRINTF in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216PRINTF=$ac_cv_path_PRINTF
10217if test -n "$PRINTF"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10219$as_echo "$PRINTF" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226          if test "x$PRINTF" = x; then
10227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10228          fi
10229        else
10230          # Otherwise we believe it is a complete path. Use it as it is.
10231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10232$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10234$as_echo_n "checking for PRINTF... " >&6; }
10235          if test ! -x "$tool_specified"; then
10236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10237$as_echo "not found" >&6; }
10238            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10239          fi
10240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10241$as_echo "$tool_specified" >&6; }
10242        fi
10243      fi
10244    fi
10245
10246  fi
10247
10248
10249
10250  if test "x$PRINTF" = x; then
10251    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10252  fi
10253
10254
10255
10256
10257
10258  # Publish this variable in the help.
10259
10260
10261  if [ -z "${RM+x}" ]; then
10262    # The variable is not set by user, try to locate tool using the code snippet
10263    for ac_prog in rm
10264do
10265  # Extract the first word of "$ac_prog", so it can be a program name with args.
10266set dummy $ac_prog; ac_word=$2
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10268$as_echo_n "checking for $ac_word... " >&6; }
10269if ${ac_cv_path_RM+:} false; then :
10270  $as_echo_n "(cached) " >&6
10271else
10272  case $RM in
10273  [\\/]* | ?:[\\/]*)
10274  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10275  ;;
10276  *)
10277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10278for as_dir in $PATH
10279do
10280  IFS=$as_save_IFS
10281  test -z "$as_dir" && as_dir=.
10282    for ac_exec_ext in '' $ac_executable_extensions; do
10283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10284    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10286    break 2
10287  fi
10288done
10289  done
10290IFS=$as_save_IFS
10291
10292  ;;
10293esac
10294fi
10295RM=$ac_cv_path_RM
10296if test -n "$RM"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10298$as_echo "$RM" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$RM" && break
10306done
10307
10308  else
10309    # The variable is set, but is it from the command line or the environment?
10310
10311    # Try to remove the string !RM! from our list.
10312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10314      # If it failed, the variable was not from the command line. Ignore it,
10315      # but warn the user (except for BASH, which is always set by the calling BASH).
10316      if test "xRM" != xBASH; then
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10318$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10319      fi
10320      # Try to locate tool using the code snippet
10321      for ac_prog in rm
10322do
10323  # Extract the first word of "$ac_prog", so it can be a program name with args.
10324set dummy $ac_prog; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if ${ac_cv_path_RM+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $RM in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10342    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353RM=$ac_cv_path_RM
10354if test -n "$RM"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10356$as_echo "$RM" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363  test -n "$RM" && break
10364done
10365
10366    else
10367      # If it succeeded, then it was overridden by the user. We will use it
10368      # for the tool.
10369
10370      # First remove it from the list of overridden variables, so we can test
10371      # for unknown variables in the end.
10372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10373
10374      # Check if we try to supply an empty value
10375      if test "x$RM" = x; then
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10377$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10379$as_echo_n "checking for RM... " >&6; }
10380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10381$as_echo "disabled" >&6; }
10382      else
10383        # Check if the provided tool contains a complete path.
10384        tool_specified="$RM"
10385        tool_basename="${tool_specified##*/}"
10386        if test "x$tool_basename" = "x$tool_specified"; then
10387          # A command without a complete path is provided, search $PATH.
10388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10389$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10390          # Extract the first word of "$tool_basename", so it can be a program name with args.
10391set dummy $tool_basename; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_RM+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $RM in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420RM=$ac_cv_path_RM
10421if test -n "$RM"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10423$as_echo "$RM" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430          if test "x$RM" = x; then
10431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10432          fi
10433        else
10434          # Otherwise we believe it is a complete path. Use it as it is.
10435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10436$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10438$as_echo_n "checking for RM... " >&6; }
10439          if test ! -x "$tool_specified"; then
10440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10441$as_echo "not found" >&6; }
10442            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10443          fi
10444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10445$as_echo "$tool_specified" >&6; }
10446        fi
10447      fi
10448    fi
10449
10450  fi
10451
10452
10453
10454  if test "x$RM" = x; then
10455    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10456  fi
10457
10458
10459
10460
10461
10462  # Publish this variable in the help.
10463
10464
10465  if [ -z "${RMDIR+x}" ]; then
10466    # The variable is not set by user, try to locate tool using the code snippet
10467    for ac_prog in rmdir
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_RMDIR+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $RMDIR in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499RMDIR=$ac_cv_path_RMDIR
10500if test -n "$RMDIR"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10502$as_echo "$RMDIR" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$RMDIR" && break
10510done
10511
10512  else
10513    # The variable is set, but is it from the command line or the environment?
10514
10515    # Try to remove the string !RMDIR! from our list.
10516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10518      # If it failed, the variable was not from the command line. Ignore it,
10519      # but warn the user (except for BASH, which is always set by the calling BASH).
10520      if test "xRMDIR" != xBASH; then
10521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10522$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10523      fi
10524      # Try to locate tool using the code snippet
10525      for ac_prog in rmdir
10526do
10527  # Extract the first word of "$ac_prog", so it can be a program name with args.
10528set dummy $ac_prog; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_RMDIR+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $RMDIR in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557RMDIR=$ac_cv_path_RMDIR
10558if test -n "$RMDIR"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10560$as_echo "$RMDIR" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567  test -n "$RMDIR" && break
10568done
10569
10570    else
10571      # If it succeeded, then it was overridden by the user. We will use it
10572      # for the tool.
10573
10574      # First remove it from the list of overridden variables, so we can test
10575      # for unknown variables in the end.
10576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10577
10578      # Check if we try to supply an empty value
10579      if test "x$RMDIR" = x; then
10580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10581$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10583$as_echo_n "checking for RMDIR... " >&6; }
10584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10585$as_echo "disabled" >&6; }
10586      else
10587        # Check if the provided tool contains a complete path.
10588        tool_specified="$RMDIR"
10589        tool_basename="${tool_specified##*/}"
10590        if test "x$tool_basename" = "x$tool_specified"; then
10591          # A command without a complete path is provided, search $PATH.
10592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10593$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10594          # Extract the first word of "$tool_basename", so it can be a program name with args.
10595set dummy $tool_basename; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_RMDIR+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $RMDIR in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624RMDIR=$ac_cv_path_RMDIR
10625if test -n "$RMDIR"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10627$as_echo "$RMDIR" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634          if test "x$RMDIR" = x; then
10635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10636          fi
10637        else
10638          # Otherwise we believe it is a complete path. Use it as it is.
10639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10640$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10642$as_echo_n "checking for RMDIR... " >&6; }
10643          if test ! -x "$tool_specified"; then
10644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10645$as_echo "not found" >&6; }
10646            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10647          fi
10648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10649$as_echo "$tool_specified" >&6; }
10650        fi
10651      fi
10652    fi
10653
10654  fi
10655
10656
10657
10658  if test "x$RMDIR" = x; then
10659    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10660  fi
10661
10662
10663
10664
10665
10666  # Publish this variable in the help.
10667
10668
10669  if [ -z "${SH+x}" ]; then
10670    # The variable is not set by user, try to locate tool using the code snippet
10671    for ac_prog in sh
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_SH+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $SH in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703SH=$ac_cv_path_SH
10704if test -n "$SH"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10706$as_echo "$SH" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$SH" && break
10714done
10715
10716  else
10717    # The variable is set, but is it from the command line or the environment?
10718
10719    # Try to remove the string !SH! from our list.
10720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722      # If it failed, the variable was not from the command line. Ignore it,
10723      # but warn the user (except for BASH, which is always set by the calling BASH).
10724      if test "xSH" != xBASH; then
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10726$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10727      fi
10728      # Try to locate tool using the code snippet
10729      for ac_prog in sh
10730do
10731  # Extract the first word of "$ac_prog", so it can be a program name with args.
10732set dummy $ac_prog; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_SH+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $SH in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761SH=$ac_cv_path_SH
10762if test -n "$SH"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10764$as_echo "$SH" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771  test -n "$SH" && break
10772done
10773
10774    else
10775      # If it succeeded, then it was overridden by the user. We will use it
10776      # for the tool.
10777
10778      # First remove it from the list of overridden variables, so we can test
10779      # for unknown variables in the end.
10780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781
10782      # Check if we try to supply an empty value
10783      if test "x$SH" = x; then
10784        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10785$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10787$as_echo_n "checking for SH... " >&6; }
10788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10789$as_echo "disabled" >&6; }
10790      else
10791        # Check if the provided tool contains a complete path.
10792        tool_specified="$SH"
10793        tool_basename="${tool_specified##*/}"
10794        if test "x$tool_basename" = "x$tool_specified"; then
10795          # A command without a complete path is provided, search $PATH.
10796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10797$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10798          # Extract the first word of "$tool_basename", so it can be a program name with args.
10799set dummy $tool_basename; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_SH+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $SH in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828SH=$ac_cv_path_SH
10829if test -n "$SH"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10831$as_echo "$SH" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838          if test "x$SH" = x; then
10839            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10840          fi
10841        else
10842          # Otherwise we believe it is a complete path. Use it as it is.
10843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10844$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10845          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10846$as_echo_n "checking for SH... " >&6; }
10847          if test ! -x "$tool_specified"; then
10848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10849$as_echo "not found" >&6; }
10850            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10851          fi
10852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10853$as_echo "$tool_specified" >&6; }
10854        fi
10855      fi
10856    fi
10857
10858  fi
10859
10860
10861
10862  if test "x$SH" = x; then
10863    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10864  fi
10865
10866
10867
10868
10869
10870  # Publish this variable in the help.
10871
10872
10873  if [ -z "${SORT+x}" ]; then
10874    # The variable is not set by user, try to locate tool using the code snippet
10875    for ac_prog in sort
10876do
10877  # Extract the first word of "$ac_prog", so it can be a program name with args.
10878set dummy $ac_prog; ac_word=$2
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10880$as_echo_n "checking for $ac_word... " >&6; }
10881if ${ac_cv_path_SORT+:} false; then :
10882  $as_echo_n "(cached) " >&6
10883else
10884  case $SORT in
10885  [\\/]* | ?:[\\/]*)
10886  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10887  ;;
10888  *)
10889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10890for as_dir in $PATH
10891do
10892  IFS=$as_save_IFS
10893  test -z "$as_dir" && as_dir=.
10894    for ac_exec_ext in '' $ac_executable_extensions; do
10895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10896    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10898    break 2
10899  fi
10900done
10901  done
10902IFS=$as_save_IFS
10903
10904  ;;
10905esac
10906fi
10907SORT=$ac_cv_path_SORT
10908if test -n "$SORT"; then
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10910$as_echo "$SORT" >&6; }
10911else
10912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10913$as_echo "no" >&6; }
10914fi
10915
10916
10917  test -n "$SORT" && break
10918done
10919
10920  else
10921    # The variable is set, but is it from the command line or the environment?
10922
10923    # Try to remove the string !SORT! from our list.
10924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10926      # If it failed, the variable was not from the command line. Ignore it,
10927      # but warn the user (except for BASH, which is always set by the calling BASH).
10928      if test "xSORT" != xBASH; then
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10930$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10931      fi
10932      # Try to locate tool using the code snippet
10933      for ac_prog in sort
10934do
10935  # Extract the first word of "$ac_prog", so it can be a program name with args.
10936set dummy $ac_prog; ac_word=$2
10937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10938$as_echo_n "checking for $ac_word... " >&6; }
10939if ${ac_cv_path_SORT+:} false; then :
10940  $as_echo_n "(cached) " >&6
10941else
10942  case $SORT in
10943  [\\/]* | ?:[\\/]*)
10944  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10945  ;;
10946  *)
10947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10948for as_dir in $PATH
10949do
10950  IFS=$as_save_IFS
10951  test -z "$as_dir" && as_dir=.
10952    for ac_exec_ext in '' $ac_executable_extensions; do
10953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10954    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10956    break 2
10957  fi
10958done
10959  done
10960IFS=$as_save_IFS
10961
10962  ;;
10963esac
10964fi
10965SORT=$ac_cv_path_SORT
10966if test -n "$SORT"; then
10967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10968$as_echo "$SORT" >&6; }
10969else
10970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972fi
10973
10974
10975  test -n "$SORT" && break
10976done
10977
10978    else
10979      # If it succeeded, then it was overridden by the user. We will use it
10980      # for the tool.
10981
10982      # First remove it from the list of overridden variables, so we can test
10983      # for unknown variables in the end.
10984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10985
10986      # Check if we try to supply an empty value
10987      if test "x$SORT" = x; then
10988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10989$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10991$as_echo_n "checking for SORT... " >&6; }
10992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10993$as_echo "disabled" >&6; }
10994      else
10995        # Check if the provided tool contains a complete path.
10996        tool_specified="$SORT"
10997        tool_basename="${tool_specified##*/}"
10998        if test "x$tool_basename" = "x$tool_specified"; then
10999          # A command without a complete path is provided, search $PATH.
11000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11001$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11002          # Extract the first word of "$tool_basename", so it can be a program name with args.
11003set dummy $tool_basename; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_SORT+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $SORT in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032SORT=$ac_cv_path_SORT
11033if test -n "$SORT"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11035$as_echo "$SORT" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042          if test "x$SORT" = x; then
11043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11044          fi
11045        else
11046          # Otherwise we believe it is a complete path. Use it as it is.
11047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11048$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11050$as_echo_n "checking for SORT... " >&6; }
11051          if test ! -x "$tool_specified"; then
11052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11053$as_echo "not found" >&6; }
11054            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11055          fi
11056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11057$as_echo "$tool_specified" >&6; }
11058        fi
11059      fi
11060    fi
11061
11062  fi
11063
11064
11065
11066  if test "x$SORT" = x; then
11067    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11068  fi
11069
11070
11071
11072
11073
11074  # Publish this variable in the help.
11075
11076
11077  if [ -z "${TAIL+x}" ]; then
11078    # The variable is not set by user, try to locate tool using the code snippet
11079    for ac_prog in tail
11080do
11081  # Extract the first word of "$ac_prog", so it can be a program name with args.
11082set dummy $ac_prog; ac_word=$2
11083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11084$as_echo_n "checking for $ac_word... " >&6; }
11085if ${ac_cv_path_TAIL+:} false; then :
11086  $as_echo_n "(cached) " >&6
11087else
11088  case $TAIL in
11089  [\\/]* | ?:[\\/]*)
11090  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11091  ;;
11092  *)
11093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11094for as_dir in $PATH
11095do
11096  IFS=$as_save_IFS
11097  test -z "$as_dir" && as_dir=.
11098    for ac_exec_ext in '' $ac_executable_extensions; do
11099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11100    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11102    break 2
11103  fi
11104done
11105  done
11106IFS=$as_save_IFS
11107
11108  ;;
11109esac
11110fi
11111TAIL=$ac_cv_path_TAIL
11112if test -n "$TAIL"; then
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11114$as_echo "$TAIL" >&6; }
11115else
11116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117$as_echo "no" >&6; }
11118fi
11119
11120
11121  test -n "$TAIL" && break
11122done
11123
11124  else
11125    # The variable is set, but is it from the command line or the environment?
11126
11127    # Try to remove the string !TAIL! from our list.
11128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11130      # If it failed, the variable was not from the command line. Ignore it,
11131      # but warn the user (except for BASH, which is always set by the calling BASH).
11132      if test "xTAIL" != xBASH; then
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11134$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11135      fi
11136      # Try to locate tool using the code snippet
11137      for ac_prog in tail
11138do
11139  # Extract the first word of "$ac_prog", so it can be a program name with args.
11140set dummy $ac_prog; ac_word=$2
11141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11142$as_echo_n "checking for $ac_word... " >&6; }
11143if ${ac_cv_path_TAIL+:} false; then :
11144  $as_echo_n "(cached) " >&6
11145else
11146  case $TAIL in
11147  [\\/]* | ?:[\\/]*)
11148  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11149  ;;
11150  *)
11151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11152for as_dir in $PATH
11153do
11154  IFS=$as_save_IFS
11155  test -z "$as_dir" && as_dir=.
11156    for ac_exec_ext in '' $ac_executable_extensions; do
11157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11158    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11160    break 2
11161  fi
11162done
11163  done
11164IFS=$as_save_IFS
11165
11166  ;;
11167esac
11168fi
11169TAIL=$ac_cv_path_TAIL
11170if test -n "$TAIL"; then
11171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11172$as_echo "$TAIL" >&6; }
11173else
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11175$as_echo "no" >&6; }
11176fi
11177
11178
11179  test -n "$TAIL" && break
11180done
11181
11182    else
11183      # If it succeeded, then it was overridden by the user. We will use it
11184      # for the tool.
11185
11186      # First remove it from the list of overridden variables, so we can test
11187      # for unknown variables in the end.
11188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11189
11190      # Check if we try to supply an empty value
11191      if test "x$TAIL" = x; then
11192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11193$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11195$as_echo_n "checking for TAIL... " >&6; }
11196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11197$as_echo "disabled" >&6; }
11198      else
11199        # Check if the provided tool contains a complete path.
11200        tool_specified="$TAIL"
11201        tool_basename="${tool_specified##*/}"
11202        if test "x$tool_basename" = "x$tool_specified"; then
11203          # A command without a complete path is provided, search $PATH.
11204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11205$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11206          # Extract the first word of "$tool_basename", so it can be a program name with args.
11207set dummy $tool_basename; ac_word=$2
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11209$as_echo_n "checking for $ac_word... " >&6; }
11210if ${ac_cv_path_TAIL+:} false; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  case $TAIL in
11214  [\\/]* | ?:[\\/]*)
11215  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11216  ;;
11217  *)
11218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11219for as_dir in $PATH
11220do
11221  IFS=$as_save_IFS
11222  test -z "$as_dir" && as_dir=.
11223    for ac_exec_ext in '' $ac_executable_extensions; do
11224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11225    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11227    break 2
11228  fi
11229done
11230  done
11231IFS=$as_save_IFS
11232
11233  ;;
11234esac
11235fi
11236TAIL=$ac_cv_path_TAIL
11237if test -n "$TAIL"; then
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11239$as_echo "$TAIL" >&6; }
11240else
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
11243fi
11244
11245
11246          if test "x$TAIL" = x; then
11247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11248          fi
11249        else
11250          # Otherwise we believe it is a complete path. Use it as it is.
11251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11252$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11254$as_echo_n "checking for TAIL... " >&6; }
11255          if test ! -x "$tool_specified"; then
11256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11257$as_echo "not found" >&6; }
11258            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11259          fi
11260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11261$as_echo "$tool_specified" >&6; }
11262        fi
11263      fi
11264    fi
11265
11266  fi
11267
11268
11269
11270  if test "x$TAIL" = x; then
11271    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11272  fi
11273
11274
11275
11276
11277
11278  # Publish this variable in the help.
11279
11280
11281  if [ -z "${TAR+x}" ]; then
11282    # The variable is not set by user, try to locate tool using the code snippet
11283    for ac_prog in gtar tar
11284do
11285  # Extract the first word of "$ac_prog", so it can be a program name with args.
11286set dummy $ac_prog; ac_word=$2
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11288$as_echo_n "checking for $ac_word... " >&6; }
11289if ${ac_cv_path_TAR+:} false; then :
11290  $as_echo_n "(cached) " >&6
11291else
11292  case $TAR in
11293  [\\/]* | ?:[\\/]*)
11294  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11295  ;;
11296  *)
11297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11298for as_dir in $PATH
11299do
11300  IFS=$as_save_IFS
11301  test -z "$as_dir" && as_dir=.
11302    for ac_exec_ext in '' $ac_executable_extensions; do
11303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11304    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11306    break 2
11307  fi
11308done
11309  done
11310IFS=$as_save_IFS
11311
11312  ;;
11313esac
11314fi
11315TAR=$ac_cv_path_TAR
11316if test -n "$TAR"; then
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11318$as_echo "$TAR" >&6; }
11319else
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
11322fi
11323
11324
11325  test -n "$TAR" && break
11326done
11327
11328  else
11329    # The variable is set, but is it from the command line or the environment?
11330
11331    # Try to remove the string !TAR! from our list.
11332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11334      # If it failed, the variable was not from the command line. Ignore it,
11335      # but warn the user (except for BASH, which is always set by the calling BASH).
11336      if test "xTAR" != xBASH; then
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11338$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11339      fi
11340      # Try to locate tool using the code snippet
11341      for ac_prog in gtar tar
11342do
11343  # Extract the first word of "$ac_prog", so it can be a program name with args.
11344set dummy $ac_prog; ac_word=$2
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11346$as_echo_n "checking for $ac_word... " >&6; }
11347if ${ac_cv_path_TAR+:} false; then :
11348  $as_echo_n "(cached) " >&6
11349else
11350  case $TAR in
11351  [\\/]* | ?:[\\/]*)
11352  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11353  ;;
11354  *)
11355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11356for as_dir in $PATH
11357do
11358  IFS=$as_save_IFS
11359  test -z "$as_dir" && as_dir=.
11360    for ac_exec_ext in '' $ac_executable_extensions; do
11361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11362    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11364    break 2
11365  fi
11366done
11367  done
11368IFS=$as_save_IFS
11369
11370  ;;
11371esac
11372fi
11373TAR=$ac_cv_path_TAR
11374if test -n "$TAR"; then
11375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11376$as_echo "$TAR" >&6; }
11377else
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
11380fi
11381
11382
11383  test -n "$TAR" && break
11384done
11385
11386    else
11387      # If it succeeded, then it was overridden by the user. We will use it
11388      # for the tool.
11389
11390      # First remove it from the list of overridden variables, so we can test
11391      # for unknown variables in the end.
11392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11393
11394      # Check if we try to supply an empty value
11395      if test "x$TAR" = x; then
11396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11397$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11399$as_echo_n "checking for TAR... " >&6; }
11400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11401$as_echo "disabled" >&6; }
11402      else
11403        # Check if the provided tool contains a complete path.
11404        tool_specified="$TAR"
11405        tool_basename="${tool_specified##*/}"
11406        if test "x$tool_basename" = "x$tool_specified"; then
11407          # A command without a complete path is provided, search $PATH.
11408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11409$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11410          # Extract the first word of "$tool_basename", so it can be a program name with args.
11411set dummy $tool_basename; ac_word=$2
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11413$as_echo_n "checking for $ac_word... " >&6; }
11414if ${ac_cv_path_TAR+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417  case $TAR in
11418  [\\/]* | ?:[\\/]*)
11419  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11420  ;;
11421  *)
11422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11423for as_dir in $PATH
11424do
11425  IFS=$as_save_IFS
11426  test -z "$as_dir" && as_dir=.
11427    for ac_exec_ext in '' $ac_executable_extensions; do
11428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11429    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11431    break 2
11432  fi
11433done
11434  done
11435IFS=$as_save_IFS
11436
11437  ;;
11438esac
11439fi
11440TAR=$ac_cv_path_TAR
11441if test -n "$TAR"; then
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11443$as_echo "$TAR" >&6; }
11444else
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447fi
11448
11449
11450          if test "x$TAR" = x; then
11451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11452          fi
11453        else
11454          # Otherwise we believe it is a complete path. Use it as it is.
11455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11456$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11458$as_echo_n "checking for TAR... " >&6; }
11459          if test ! -x "$tool_specified"; then
11460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11461$as_echo "not found" >&6; }
11462            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11463          fi
11464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11465$as_echo "$tool_specified" >&6; }
11466        fi
11467      fi
11468    fi
11469
11470  fi
11471
11472
11473
11474  if test "x$TAR" = x; then
11475    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11476  fi
11477
11478
11479
11480
11481
11482  # Publish this variable in the help.
11483
11484
11485  if [ -z "${TEE+x}" ]; then
11486    # The variable is not set by user, try to locate tool using the code snippet
11487    for ac_prog in tee
11488do
11489  # Extract the first word of "$ac_prog", so it can be a program name with args.
11490set dummy $ac_prog; ac_word=$2
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11492$as_echo_n "checking for $ac_word... " >&6; }
11493if ${ac_cv_path_TEE+:} false; then :
11494  $as_echo_n "(cached) " >&6
11495else
11496  case $TEE in
11497  [\\/]* | ?:[\\/]*)
11498  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11499  ;;
11500  *)
11501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11502for as_dir in $PATH
11503do
11504  IFS=$as_save_IFS
11505  test -z "$as_dir" && as_dir=.
11506    for ac_exec_ext in '' $ac_executable_extensions; do
11507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11508    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11510    break 2
11511  fi
11512done
11513  done
11514IFS=$as_save_IFS
11515
11516  ;;
11517esac
11518fi
11519TEE=$ac_cv_path_TEE
11520if test -n "$TEE"; then
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11522$as_echo "$TEE" >&6; }
11523else
11524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
11526fi
11527
11528
11529  test -n "$TEE" && break
11530done
11531
11532  else
11533    # The variable is set, but is it from the command line or the environment?
11534
11535    # Try to remove the string !TEE! from our list.
11536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11538      # If it failed, the variable was not from the command line. Ignore it,
11539      # but warn the user (except for BASH, which is always set by the calling BASH).
11540      if test "xTEE" != xBASH; then
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11542$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11543      fi
11544      # Try to locate tool using the code snippet
11545      for ac_prog in tee
11546do
11547  # Extract the first word of "$ac_prog", so it can be a program name with args.
11548set dummy $ac_prog; ac_word=$2
11549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11550$as_echo_n "checking for $ac_word... " >&6; }
11551if ${ac_cv_path_TEE+:} false; then :
11552  $as_echo_n "(cached) " >&6
11553else
11554  case $TEE in
11555  [\\/]* | ?:[\\/]*)
11556  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11557  ;;
11558  *)
11559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11560for as_dir in $PATH
11561do
11562  IFS=$as_save_IFS
11563  test -z "$as_dir" && as_dir=.
11564    for ac_exec_ext in '' $ac_executable_extensions; do
11565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11566    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11568    break 2
11569  fi
11570done
11571  done
11572IFS=$as_save_IFS
11573
11574  ;;
11575esac
11576fi
11577TEE=$ac_cv_path_TEE
11578if test -n "$TEE"; then
11579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11580$as_echo "$TEE" >&6; }
11581else
11582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11583$as_echo "no" >&6; }
11584fi
11585
11586
11587  test -n "$TEE" && break
11588done
11589
11590    else
11591      # If it succeeded, then it was overridden by the user. We will use it
11592      # for the tool.
11593
11594      # First remove it from the list of overridden variables, so we can test
11595      # for unknown variables in the end.
11596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11597
11598      # Check if we try to supply an empty value
11599      if test "x$TEE" = x; then
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11601$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11603$as_echo_n "checking for TEE... " >&6; }
11604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11605$as_echo "disabled" >&6; }
11606      else
11607        # Check if the provided tool contains a complete path.
11608        tool_specified="$TEE"
11609        tool_basename="${tool_specified##*/}"
11610        if test "x$tool_basename" = "x$tool_specified"; then
11611          # A command without a complete path is provided, search $PATH.
11612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11613$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11614          # Extract the first word of "$tool_basename", so it can be a program name with args.
11615set dummy $tool_basename; ac_word=$2
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11617$as_echo_n "checking for $ac_word... " >&6; }
11618if ${ac_cv_path_TEE+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  case $TEE in
11622  [\\/]* | ?:[\\/]*)
11623  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11624  ;;
11625  *)
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11633    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11635    break 2
11636  fi
11637done
11638  done
11639IFS=$as_save_IFS
11640
11641  ;;
11642esac
11643fi
11644TEE=$ac_cv_path_TEE
11645if test -n "$TEE"; then
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11647$as_echo "$TEE" >&6; }
11648else
11649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654          if test "x$TEE" = x; then
11655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11656          fi
11657        else
11658          # Otherwise we believe it is a complete path. Use it as it is.
11659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11660$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11662$as_echo_n "checking for TEE... " >&6; }
11663          if test ! -x "$tool_specified"; then
11664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11665$as_echo "not found" >&6; }
11666            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11667          fi
11668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11669$as_echo "$tool_specified" >&6; }
11670        fi
11671      fi
11672    fi
11673
11674  fi
11675
11676
11677
11678  if test "x$TEE" = x; then
11679    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11680  fi
11681
11682
11683
11684
11685
11686  # Publish this variable in the help.
11687
11688
11689  if [ -z "${TOUCH+x}" ]; then
11690    # The variable is not set by user, try to locate tool using the code snippet
11691    for ac_prog in touch
11692do
11693  # Extract the first word of "$ac_prog", so it can be a program name with args.
11694set dummy $ac_prog; ac_word=$2
11695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11696$as_echo_n "checking for $ac_word... " >&6; }
11697if ${ac_cv_path_TOUCH+:} false; then :
11698  $as_echo_n "(cached) " >&6
11699else
11700  case $TOUCH in
11701  [\\/]* | ?:[\\/]*)
11702  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11703  ;;
11704  *)
11705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11706for as_dir in $PATH
11707do
11708  IFS=$as_save_IFS
11709  test -z "$as_dir" && as_dir=.
11710    for ac_exec_ext in '' $ac_executable_extensions; do
11711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11712    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11714    break 2
11715  fi
11716done
11717  done
11718IFS=$as_save_IFS
11719
11720  ;;
11721esac
11722fi
11723TOUCH=$ac_cv_path_TOUCH
11724if test -n "$TOUCH"; then
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11726$as_echo "$TOUCH" >&6; }
11727else
11728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11729$as_echo "no" >&6; }
11730fi
11731
11732
11733  test -n "$TOUCH" && break
11734done
11735
11736  else
11737    # The variable is set, but is it from the command line or the environment?
11738
11739    # Try to remove the string !TOUCH! from our list.
11740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11742      # If it failed, the variable was not from the command line. Ignore it,
11743      # but warn the user (except for BASH, which is always set by the calling BASH).
11744      if test "xTOUCH" != xBASH; then
11745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11746$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11747      fi
11748      # Try to locate tool using the code snippet
11749      for ac_prog in touch
11750do
11751  # Extract the first word of "$ac_prog", so it can be a program name with args.
11752set dummy $ac_prog; ac_word=$2
11753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11754$as_echo_n "checking for $ac_word... " >&6; }
11755if ${ac_cv_path_TOUCH+:} false; then :
11756  $as_echo_n "(cached) " >&6
11757else
11758  case $TOUCH in
11759  [\\/]* | ?:[\\/]*)
11760  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11761  ;;
11762  *)
11763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11764for as_dir in $PATH
11765do
11766  IFS=$as_save_IFS
11767  test -z "$as_dir" && as_dir=.
11768    for ac_exec_ext in '' $ac_executable_extensions; do
11769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11770    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11772    break 2
11773  fi
11774done
11775  done
11776IFS=$as_save_IFS
11777
11778  ;;
11779esac
11780fi
11781TOUCH=$ac_cv_path_TOUCH
11782if test -n "$TOUCH"; then
11783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11784$as_echo "$TOUCH" >&6; }
11785else
11786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787$as_echo "no" >&6; }
11788fi
11789
11790
11791  test -n "$TOUCH" && break
11792done
11793
11794    else
11795      # If it succeeded, then it was overridden by the user. We will use it
11796      # for the tool.
11797
11798      # First remove it from the list of overridden variables, so we can test
11799      # for unknown variables in the end.
11800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11801
11802      # Check if we try to supply an empty value
11803      if test "x$TOUCH" = x; then
11804        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11805$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11807$as_echo_n "checking for TOUCH... " >&6; }
11808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11809$as_echo "disabled" >&6; }
11810      else
11811        # Check if the provided tool contains a complete path.
11812        tool_specified="$TOUCH"
11813        tool_basename="${tool_specified##*/}"
11814        if test "x$tool_basename" = "x$tool_specified"; then
11815          # A command without a complete path is provided, search $PATH.
11816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11817$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11818          # Extract the first word of "$tool_basename", so it can be a program name with args.
11819set dummy $tool_basename; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_TOUCH+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $TOUCH in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848TOUCH=$ac_cv_path_TOUCH
11849if test -n "$TOUCH"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11851$as_echo "$TOUCH" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858          if test "x$TOUCH" = x; then
11859            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11860          fi
11861        else
11862          # Otherwise we believe it is a complete path. Use it as it is.
11863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11864$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11865          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11866$as_echo_n "checking for TOUCH... " >&6; }
11867          if test ! -x "$tool_specified"; then
11868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11869$as_echo "not found" >&6; }
11870            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11871          fi
11872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11873$as_echo "$tool_specified" >&6; }
11874        fi
11875      fi
11876    fi
11877
11878  fi
11879
11880
11881
11882  if test "x$TOUCH" = x; then
11883    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11884  fi
11885
11886
11887
11888
11889
11890  # Publish this variable in the help.
11891
11892
11893  if [ -z "${TR+x}" ]; then
11894    # The variable is not set by user, try to locate tool using the code snippet
11895    for ac_prog in tr
11896do
11897  # Extract the first word of "$ac_prog", so it can be a program name with args.
11898set dummy $ac_prog; ac_word=$2
11899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11900$as_echo_n "checking for $ac_word... " >&6; }
11901if ${ac_cv_path_TR+:} false; then :
11902  $as_echo_n "(cached) " >&6
11903else
11904  case $TR in
11905  [\\/]* | ?:[\\/]*)
11906  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11907  ;;
11908  *)
11909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11910for as_dir in $PATH
11911do
11912  IFS=$as_save_IFS
11913  test -z "$as_dir" && as_dir=.
11914    for ac_exec_ext in '' $ac_executable_extensions; do
11915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11916    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11918    break 2
11919  fi
11920done
11921  done
11922IFS=$as_save_IFS
11923
11924  ;;
11925esac
11926fi
11927TR=$ac_cv_path_TR
11928if test -n "$TR"; then
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11930$as_echo "$TR" >&6; }
11931else
11932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
11934fi
11935
11936
11937  test -n "$TR" && break
11938done
11939
11940  else
11941    # The variable is set, but is it from the command line or the environment?
11942
11943    # Try to remove the string !TR! from our list.
11944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11946      # If it failed, the variable was not from the command line. Ignore it,
11947      # but warn the user (except for BASH, which is always set by the calling BASH).
11948      if test "xTR" != xBASH; then
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11950$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11951      fi
11952      # Try to locate tool using the code snippet
11953      for ac_prog in tr
11954do
11955  # Extract the first word of "$ac_prog", so it can be a program name with args.
11956set dummy $ac_prog; ac_word=$2
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11958$as_echo_n "checking for $ac_word... " >&6; }
11959if ${ac_cv_path_TR+:} false; then :
11960  $as_echo_n "(cached) " >&6
11961else
11962  case $TR in
11963  [\\/]* | ?:[\\/]*)
11964  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11965  ;;
11966  *)
11967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11968for as_dir in $PATH
11969do
11970  IFS=$as_save_IFS
11971  test -z "$as_dir" && as_dir=.
11972    for ac_exec_ext in '' $ac_executable_extensions; do
11973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11974    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11976    break 2
11977  fi
11978done
11979  done
11980IFS=$as_save_IFS
11981
11982  ;;
11983esac
11984fi
11985TR=$ac_cv_path_TR
11986if test -n "$TR"; then
11987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11988$as_echo "$TR" >&6; }
11989else
11990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11991$as_echo "no" >&6; }
11992fi
11993
11994
11995  test -n "$TR" && break
11996done
11997
11998    else
11999      # If it succeeded, then it was overridden by the user. We will use it
12000      # for the tool.
12001
12002      # First remove it from the list of overridden variables, so we can test
12003      # for unknown variables in the end.
12004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12005
12006      # Check if we try to supply an empty value
12007      if test "x$TR" = x; then
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12009$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12011$as_echo_n "checking for TR... " >&6; }
12012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12013$as_echo "disabled" >&6; }
12014      else
12015        # Check if the provided tool contains a complete path.
12016        tool_specified="$TR"
12017        tool_basename="${tool_specified##*/}"
12018        if test "x$tool_basename" = "x$tool_specified"; then
12019          # A command without a complete path is provided, search $PATH.
12020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12021$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12022          # Extract the first word of "$tool_basename", so it can be a program name with args.
12023set dummy $tool_basename; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_TR+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $TR in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052TR=$ac_cv_path_TR
12053if test -n "$TR"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12055$as_echo "$TR" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062          if test "x$TR" = x; then
12063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12064          fi
12065        else
12066          # Otherwise we believe it is a complete path. Use it as it is.
12067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12068$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12070$as_echo_n "checking for TR... " >&6; }
12071          if test ! -x "$tool_specified"; then
12072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12073$as_echo "not found" >&6; }
12074            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12075          fi
12076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12077$as_echo "$tool_specified" >&6; }
12078        fi
12079      fi
12080    fi
12081
12082  fi
12083
12084
12085
12086  if test "x$TR" = x; then
12087    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12088  fi
12089
12090
12091
12092
12093
12094  # Publish this variable in the help.
12095
12096
12097  if [ -z "${UNAME+x}" ]; then
12098    # The variable is not set by user, try to locate tool using the code snippet
12099    for ac_prog in uname
12100do
12101  # Extract the first word of "$ac_prog", so it can be a program name with args.
12102set dummy $ac_prog; ac_word=$2
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12104$as_echo_n "checking for $ac_word... " >&6; }
12105if ${ac_cv_path_UNAME+:} false; then :
12106  $as_echo_n "(cached) " >&6
12107else
12108  case $UNAME in
12109  [\\/]* | ?:[\\/]*)
12110  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12111  ;;
12112  *)
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12120    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12122    break 2
12123  fi
12124done
12125  done
12126IFS=$as_save_IFS
12127
12128  ;;
12129esac
12130fi
12131UNAME=$ac_cv_path_UNAME
12132if test -n "$UNAME"; then
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12134$as_echo "$UNAME" >&6; }
12135else
12136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12137$as_echo "no" >&6; }
12138fi
12139
12140
12141  test -n "$UNAME" && break
12142done
12143
12144  else
12145    # The variable is set, but is it from the command line or the environment?
12146
12147    # Try to remove the string !UNAME! from our list.
12148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12150      # If it failed, the variable was not from the command line. Ignore it,
12151      # but warn the user (except for BASH, which is always set by the calling BASH).
12152      if test "xUNAME" != xBASH; then
12153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12154$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12155      fi
12156      # Try to locate tool using the code snippet
12157      for ac_prog in uname
12158do
12159  # Extract the first word of "$ac_prog", so it can be a program name with args.
12160set dummy $ac_prog; ac_word=$2
12161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12162$as_echo_n "checking for $ac_word... " >&6; }
12163if ${ac_cv_path_UNAME+:} false; then :
12164  $as_echo_n "(cached) " >&6
12165else
12166  case $UNAME in
12167  [\\/]* | ?:[\\/]*)
12168  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12169  ;;
12170  *)
12171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12172for as_dir in $PATH
12173do
12174  IFS=$as_save_IFS
12175  test -z "$as_dir" && as_dir=.
12176    for ac_exec_ext in '' $ac_executable_extensions; do
12177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12178    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12180    break 2
12181  fi
12182done
12183  done
12184IFS=$as_save_IFS
12185
12186  ;;
12187esac
12188fi
12189UNAME=$ac_cv_path_UNAME
12190if test -n "$UNAME"; then
12191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12192$as_echo "$UNAME" >&6; }
12193else
12194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12195$as_echo "no" >&6; }
12196fi
12197
12198
12199  test -n "$UNAME" && break
12200done
12201
12202    else
12203      # If it succeeded, then it was overridden by the user. We will use it
12204      # for the tool.
12205
12206      # First remove it from the list of overridden variables, so we can test
12207      # for unknown variables in the end.
12208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12209
12210      # Check if we try to supply an empty value
12211      if test "x$UNAME" = x; then
12212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12213$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12215$as_echo_n "checking for UNAME... " >&6; }
12216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12217$as_echo "disabled" >&6; }
12218      else
12219        # Check if the provided tool contains a complete path.
12220        tool_specified="$UNAME"
12221        tool_basename="${tool_specified##*/}"
12222        if test "x$tool_basename" = "x$tool_specified"; then
12223          # A command without a complete path is provided, search $PATH.
12224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12225$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12226          # Extract the first word of "$tool_basename", so it can be a program name with args.
12227set dummy $tool_basename; ac_word=$2
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12229$as_echo_n "checking for $ac_word... " >&6; }
12230if ${ac_cv_path_UNAME+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  case $UNAME in
12234  [\\/]* | ?:[\\/]*)
12235  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12236  ;;
12237  *)
12238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12239for as_dir in $PATH
12240do
12241  IFS=$as_save_IFS
12242  test -z "$as_dir" && as_dir=.
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12245    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12247    break 2
12248  fi
12249done
12250  done
12251IFS=$as_save_IFS
12252
12253  ;;
12254esac
12255fi
12256UNAME=$ac_cv_path_UNAME
12257if test -n "$UNAME"; then
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12259$as_echo "$UNAME" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265
12266          if test "x$UNAME" = x; then
12267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12268          fi
12269        else
12270          # Otherwise we believe it is a complete path. Use it as it is.
12271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12272$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12274$as_echo_n "checking for UNAME... " >&6; }
12275          if test ! -x "$tool_specified"; then
12276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12277$as_echo "not found" >&6; }
12278            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12279          fi
12280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12281$as_echo "$tool_specified" >&6; }
12282        fi
12283      fi
12284    fi
12285
12286  fi
12287
12288
12289
12290  if test "x$UNAME" = x; then
12291    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12292  fi
12293
12294
12295
12296
12297
12298  # Publish this variable in the help.
12299
12300
12301  if [ -z "${UNIQ+x}" ]; then
12302    # The variable is not set by user, try to locate tool using the code snippet
12303    for ac_prog in uniq
12304do
12305  # Extract the first word of "$ac_prog", so it can be a program name with args.
12306set dummy $ac_prog; ac_word=$2
12307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12308$as_echo_n "checking for $ac_word... " >&6; }
12309if ${ac_cv_path_UNIQ+:} false; then :
12310  $as_echo_n "(cached) " >&6
12311else
12312  case $UNIQ in
12313  [\\/]* | ?:[\\/]*)
12314  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12315  ;;
12316  *)
12317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12318for as_dir in $PATH
12319do
12320  IFS=$as_save_IFS
12321  test -z "$as_dir" && as_dir=.
12322    for ac_exec_ext in '' $ac_executable_extensions; do
12323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12324    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12326    break 2
12327  fi
12328done
12329  done
12330IFS=$as_save_IFS
12331
12332  ;;
12333esac
12334fi
12335UNIQ=$ac_cv_path_UNIQ
12336if test -n "$UNIQ"; then
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12338$as_echo "$UNIQ" >&6; }
12339else
12340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12341$as_echo "no" >&6; }
12342fi
12343
12344
12345  test -n "$UNIQ" && break
12346done
12347
12348  else
12349    # The variable is set, but is it from the command line or the environment?
12350
12351    # Try to remove the string !UNIQ! from our list.
12352    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12353    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12354      # If it failed, the variable was not from the command line. Ignore it,
12355      # but warn the user (except for BASH, which is always set by the calling BASH).
12356      if test "xUNIQ" != xBASH; then
12357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12358$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12359      fi
12360      # Try to locate tool using the code snippet
12361      for ac_prog in uniq
12362do
12363  # Extract the first word of "$ac_prog", so it can be a program name with args.
12364set dummy $ac_prog; ac_word=$2
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12366$as_echo_n "checking for $ac_word... " >&6; }
12367if ${ac_cv_path_UNIQ+:} false; then :
12368  $as_echo_n "(cached) " >&6
12369else
12370  case $UNIQ in
12371  [\\/]* | ?:[\\/]*)
12372  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12373  ;;
12374  *)
12375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12376for as_dir in $PATH
12377do
12378  IFS=$as_save_IFS
12379  test -z "$as_dir" && as_dir=.
12380    for ac_exec_ext in '' $ac_executable_extensions; do
12381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12382    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12384    break 2
12385  fi
12386done
12387  done
12388IFS=$as_save_IFS
12389
12390  ;;
12391esac
12392fi
12393UNIQ=$ac_cv_path_UNIQ
12394if test -n "$UNIQ"; then
12395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12396$as_echo "$UNIQ" >&6; }
12397else
12398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
12400fi
12401
12402
12403  test -n "$UNIQ" && break
12404done
12405
12406    else
12407      # If it succeeded, then it was overridden by the user. We will use it
12408      # for the tool.
12409
12410      # First remove it from the list of overridden variables, so we can test
12411      # for unknown variables in the end.
12412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12413
12414      # Check if we try to supply an empty value
12415      if test "x$UNIQ" = x; then
12416        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12417$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12419$as_echo_n "checking for UNIQ... " >&6; }
12420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12421$as_echo "disabled" >&6; }
12422      else
12423        # Check if the provided tool contains a complete path.
12424        tool_specified="$UNIQ"
12425        tool_basename="${tool_specified##*/}"
12426        if test "x$tool_basename" = "x$tool_specified"; then
12427          # A command without a complete path is provided, search $PATH.
12428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12429$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12430          # Extract the first word of "$tool_basename", so it can be a program name with args.
12431set dummy $tool_basename; ac_word=$2
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433$as_echo_n "checking for $ac_word... " >&6; }
12434if ${ac_cv_path_UNIQ+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  case $UNIQ in
12438  [\\/]* | ?:[\\/]*)
12439  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12440  ;;
12441  *)
12442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12443for as_dir in $PATH
12444do
12445  IFS=$as_save_IFS
12446  test -z "$as_dir" && as_dir=.
12447    for ac_exec_ext in '' $ac_executable_extensions; do
12448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12449    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12451    break 2
12452  fi
12453done
12454  done
12455IFS=$as_save_IFS
12456
12457  ;;
12458esac
12459fi
12460UNIQ=$ac_cv_path_UNIQ
12461if test -n "$UNIQ"; then
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12463$as_echo "$UNIQ" >&6; }
12464else
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467fi
12468
12469
12470          if test "x$UNIQ" = x; then
12471            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12472          fi
12473        else
12474          # Otherwise we believe it is a complete path. Use it as it is.
12475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12476$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12477          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12478$as_echo_n "checking for UNIQ... " >&6; }
12479          if test ! -x "$tool_specified"; then
12480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12481$as_echo "not found" >&6; }
12482            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12483          fi
12484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12485$as_echo "$tool_specified" >&6; }
12486        fi
12487      fi
12488    fi
12489
12490  fi
12491
12492
12493
12494  if test "x$UNIQ" = x; then
12495    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12496  fi
12497
12498
12499
12500
12501
12502  # Publish this variable in the help.
12503
12504
12505  if [ -z "${WC+x}" ]; then
12506    # The variable is not set by user, try to locate tool using the code snippet
12507    for ac_prog in wc
12508do
12509  # Extract the first word of "$ac_prog", so it can be a program name with args.
12510set dummy $ac_prog; ac_word=$2
12511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12512$as_echo_n "checking for $ac_word... " >&6; }
12513if ${ac_cv_path_WC+:} false; then :
12514  $as_echo_n "(cached) " >&6
12515else
12516  case $WC in
12517  [\\/]* | ?:[\\/]*)
12518  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12519  ;;
12520  *)
12521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12522for as_dir in $PATH
12523do
12524  IFS=$as_save_IFS
12525  test -z "$as_dir" && as_dir=.
12526    for ac_exec_ext in '' $ac_executable_extensions; do
12527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12528    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12530    break 2
12531  fi
12532done
12533  done
12534IFS=$as_save_IFS
12535
12536  ;;
12537esac
12538fi
12539WC=$ac_cv_path_WC
12540if test -n "$WC"; then
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12542$as_echo "$WC" >&6; }
12543else
12544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12545$as_echo "no" >&6; }
12546fi
12547
12548
12549  test -n "$WC" && break
12550done
12551
12552  else
12553    # The variable is set, but is it from the command line or the environment?
12554
12555    # Try to remove the string !WC! from our list.
12556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12558      # If it failed, the variable was not from the command line. Ignore it,
12559      # but warn the user (except for BASH, which is always set by the calling BASH).
12560      if test "xWC" != xBASH; then
12561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12562$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12563      fi
12564      # Try to locate tool using the code snippet
12565      for ac_prog in wc
12566do
12567  # Extract the first word of "$ac_prog", so it can be a program name with args.
12568set dummy $ac_prog; ac_word=$2
12569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12570$as_echo_n "checking for $ac_word... " >&6; }
12571if ${ac_cv_path_WC+:} false; then :
12572  $as_echo_n "(cached) " >&6
12573else
12574  case $WC in
12575  [\\/]* | ?:[\\/]*)
12576  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12577  ;;
12578  *)
12579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12580for as_dir in $PATH
12581do
12582  IFS=$as_save_IFS
12583  test -z "$as_dir" && as_dir=.
12584    for ac_exec_ext in '' $ac_executable_extensions; do
12585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12586    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12588    break 2
12589  fi
12590done
12591  done
12592IFS=$as_save_IFS
12593
12594  ;;
12595esac
12596fi
12597WC=$ac_cv_path_WC
12598if test -n "$WC"; then
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12600$as_echo "$WC" >&6; }
12601else
12602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603$as_echo "no" >&6; }
12604fi
12605
12606
12607  test -n "$WC" && break
12608done
12609
12610    else
12611      # If it succeeded, then it was overridden by the user. We will use it
12612      # for the tool.
12613
12614      # First remove it from the list of overridden variables, so we can test
12615      # for unknown variables in the end.
12616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12617
12618      # Check if we try to supply an empty value
12619      if test "x$WC" = x; then
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12621$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12623$as_echo_n "checking for WC... " >&6; }
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12625$as_echo "disabled" >&6; }
12626      else
12627        # Check if the provided tool contains a complete path.
12628        tool_specified="$WC"
12629        tool_basename="${tool_specified##*/}"
12630        if test "x$tool_basename" = "x$tool_specified"; then
12631          # A command without a complete path is provided, search $PATH.
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12633$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12634          # Extract the first word of "$tool_basename", so it can be a program name with args.
12635set dummy $tool_basename; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_WC+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $WC in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664WC=$ac_cv_path_WC
12665if test -n "$WC"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12667$as_echo "$WC" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674          if test "x$WC" = x; then
12675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12676          fi
12677        else
12678          # Otherwise we believe it is a complete path. Use it as it is.
12679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12680$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12682$as_echo_n "checking for WC... " >&6; }
12683          if test ! -x "$tool_specified"; then
12684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12685$as_echo "not found" >&6; }
12686            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12687          fi
12688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12689$as_echo "$tool_specified" >&6; }
12690        fi
12691      fi
12692    fi
12693
12694  fi
12695
12696
12697
12698  if test "x$WC" = x; then
12699    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12700  fi
12701
12702
12703
12704
12705
12706  # Publish this variable in the help.
12707
12708
12709  if [ -z "${WHICH+x}" ]; then
12710    # The variable is not set by user, try to locate tool using the code snippet
12711    for ac_prog in which
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_WHICH+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $WHICH in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743WHICH=$ac_cv_path_WHICH
12744if test -n "$WHICH"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12746$as_echo "$WHICH" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$WHICH" && break
12754done
12755
12756  else
12757    # The variable is set, but is it from the command line or the environment?
12758
12759    # Try to remove the string !WHICH! from our list.
12760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12762      # If it failed, the variable was not from the command line. Ignore it,
12763      # but warn the user (except for BASH, which is always set by the calling BASH).
12764      if test "xWHICH" != xBASH; then
12765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12766$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12767      fi
12768      # Try to locate tool using the code snippet
12769      for ac_prog in which
12770do
12771  # Extract the first word of "$ac_prog", so it can be a program name with args.
12772set dummy $ac_prog; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_WHICH+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $WHICH in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801WHICH=$ac_cv_path_WHICH
12802if test -n "$WHICH"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12804$as_echo "$WHICH" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811  test -n "$WHICH" && break
12812done
12813
12814    else
12815      # If it succeeded, then it was overridden by the user. We will use it
12816      # for the tool.
12817
12818      # First remove it from the list of overridden variables, so we can test
12819      # for unknown variables in the end.
12820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12821
12822      # Check if we try to supply an empty value
12823      if test "x$WHICH" = x; then
12824        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12825$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12827$as_echo_n "checking for WHICH... " >&6; }
12828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12829$as_echo "disabled" >&6; }
12830      else
12831        # Check if the provided tool contains a complete path.
12832        tool_specified="$WHICH"
12833        tool_basename="${tool_specified##*/}"
12834        if test "x$tool_basename" = "x$tool_specified"; then
12835          # A command without a complete path is provided, search $PATH.
12836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12837$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12838          # Extract the first word of "$tool_basename", so it can be a program name with args.
12839set dummy $tool_basename; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_WHICH+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $WHICH in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868WHICH=$ac_cv_path_WHICH
12869if test -n "$WHICH"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12871$as_echo "$WHICH" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878          if test "x$WHICH" = x; then
12879            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12880          fi
12881        else
12882          # Otherwise we believe it is a complete path. Use it as it is.
12883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12884$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12885          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12886$as_echo_n "checking for WHICH... " >&6; }
12887          if test ! -x "$tool_specified"; then
12888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12889$as_echo "not found" >&6; }
12890            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12891          fi
12892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12893$as_echo "$tool_specified" >&6; }
12894        fi
12895      fi
12896    fi
12897
12898  fi
12899
12900
12901
12902  if test "x$WHICH" = x; then
12903    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12904  fi
12905
12906
12907
12908
12909
12910  # Publish this variable in the help.
12911
12912
12913  if [ -z "${XARGS+x}" ]; then
12914    # The variable is not set by user, try to locate tool using the code snippet
12915    for ac_prog in xargs
12916do
12917  # Extract the first word of "$ac_prog", so it can be a program name with args.
12918set dummy $ac_prog; ac_word=$2
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12920$as_echo_n "checking for $ac_word... " >&6; }
12921if ${ac_cv_path_XARGS+:} false; then :
12922  $as_echo_n "(cached) " >&6
12923else
12924  case $XARGS in
12925  [\\/]* | ?:[\\/]*)
12926  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12927  ;;
12928  *)
12929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12930for as_dir in $PATH
12931do
12932  IFS=$as_save_IFS
12933  test -z "$as_dir" && as_dir=.
12934    for ac_exec_ext in '' $ac_executable_extensions; do
12935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12936    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12938    break 2
12939  fi
12940done
12941  done
12942IFS=$as_save_IFS
12943
12944  ;;
12945esac
12946fi
12947XARGS=$ac_cv_path_XARGS
12948if test -n "$XARGS"; then
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12950$as_echo "$XARGS" >&6; }
12951else
12952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12953$as_echo "no" >&6; }
12954fi
12955
12956
12957  test -n "$XARGS" && break
12958done
12959
12960  else
12961    # The variable is set, but is it from the command line or the environment?
12962
12963    # Try to remove the string !XARGS! from our list.
12964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12966      # If it failed, the variable was not from the command line. Ignore it,
12967      # but warn the user (except for BASH, which is always set by the calling BASH).
12968      if test "xXARGS" != xBASH; then
12969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12970$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12971      fi
12972      # Try to locate tool using the code snippet
12973      for ac_prog in xargs
12974do
12975  # Extract the first word of "$ac_prog", so it can be a program name with args.
12976set dummy $ac_prog; ac_word=$2
12977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12978$as_echo_n "checking for $ac_word... " >&6; }
12979if ${ac_cv_path_XARGS+:} false; then :
12980  $as_echo_n "(cached) " >&6
12981else
12982  case $XARGS in
12983  [\\/]* | ?:[\\/]*)
12984  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12985  ;;
12986  *)
12987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12988for as_dir in $PATH
12989do
12990  IFS=$as_save_IFS
12991  test -z "$as_dir" && as_dir=.
12992    for ac_exec_ext in '' $ac_executable_extensions; do
12993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12994    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12996    break 2
12997  fi
12998done
12999  done
13000IFS=$as_save_IFS
13001
13002  ;;
13003esac
13004fi
13005XARGS=$ac_cv_path_XARGS
13006if test -n "$XARGS"; then
13007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13008$as_echo "$XARGS" >&6; }
13009else
13010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13011$as_echo "no" >&6; }
13012fi
13013
13014
13015  test -n "$XARGS" && break
13016done
13017
13018    else
13019      # If it succeeded, then it was overridden by the user. We will use it
13020      # for the tool.
13021
13022      # First remove it from the list of overridden variables, so we can test
13023      # for unknown variables in the end.
13024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13025
13026      # Check if we try to supply an empty value
13027      if test "x$XARGS" = x; then
13028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13029$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13031$as_echo_n "checking for XARGS... " >&6; }
13032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13033$as_echo "disabled" >&6; }
13034      else
13035        # Check if the provided tool contains a complete path.
13036        tool_specified="$XARGS"
13037        tool_basename="${tool_specified##*/}"
13038        if test "x$tool_basename" = "x$tool_specified"; then
13039          # A command without a complete path is provided, search $PATH.
13040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13041$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13042          # Extract the first word of "$tool_basename", so it can be a program name with args.
13043set dummy $tool_basename; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_XARGS+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $XARGS in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072XARGS=$ac_cv_path_XARGS
13073if test -n "$XARGS"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13075$as_echo "$XARGS" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082          if test "x$XARGS" = x; then
13083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13084          fi
13085        else
13086          # Otherwise we believe it is a complete path. Use it as it is.
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13088$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13090$as_echo_n "checking for XARGS... " >&6; }
13091          if test ! -x "$tool_specified"; then
13092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13093$as_echo "not found" >&6; }
13094            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13095          fi
13096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13097$as_echo "$tool_specified" >&6; }
13098        fi
13099      fi
13100    fi
13101
13102  fi
13103
13104
13105
13106  if test "x$XARGS" = x; then
13107    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13108  fi
13109
13110
13111
13112  # Then required tools that require some special treatment.
13113
13114
13115  # Publish this variable in the help.
13116
13117
13118  if [ -z "${AWK+x}" ]; then
13119    # The variable is not set by user, try to locate tool using the code snippet
13120    for ac_prog in gawk mawk nawk awk
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_prog_AWK+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  if test -n "$AWK"; then
13130  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13131else
13132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13133for as_dir in $PATH
13134do
13135  IFS=$as_save_IFS
13136  test -z "$as_dir" && as_dir=.
13137    for ac_exec_ext in '' $ac_executable_extensions; do
13138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13139    ac_cv_prog_AWK="$ac_prog"
13140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13141    break 2
13142  fi
13143done
13144  done
13145IFS=$as_save_IFS
13146
13147fi
13148fi
13149AWK=$ac_cv_prog_AWK
13150if test -n "$AWK"; then
13151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13152$as_echo "$AWK" >&6; }
13153else
13154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13155$as_echo "no" >&6; }
13156fi
13157
13158
13159  test -n "$AWK" && break
13160done
13161
13162  else
13163    # The variable is set, but is it from the command line or the environment?
13164
13165    # Try to remove the string !AWK! from our list.
13166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13168      # If it failed, the variable was not from the command line. Ignore it,
13169      # but warn the user (except for BASH, which is always set by the calling BASH).
13170      if test "xAWK" != xBASH; then
13171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13172$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13173      fi
13174      # Try to locate tool using the code snippet
13175      for ac_prog in gawk mawk nawk awk
13176do
13177  # Extract the first word of "$ac_prog", so it can be a program name with args.
13178set dummy $ac_prog; ac_word=$2
13179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13180$as_echo_n "checking for $ac_word... " >&6; }
13181if ${ac_cv_prog_AWK+:} false; then :
13182  $as_echo_n "(cached) " >&6
13183else
13184  if test -n "$AWK"; then
13185  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13186else
13187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13188for as_dir in $PATH
13189do
13190  IFS=$as_save_IFS
13191  test -z "$as_dir" && as_dir=.
13192    for ac_exec_ext in '' $ac_executable_extensions; do
13193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13194    ac_cv_prog_AWK="$ac_prog"
13195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13196    break 2
13197  fi
13198done
13199  done
13200IFS=$as_save_IFS
13201
13202fi
13203fi
13204AWK=$ac_cv_prog_AWK
13205if test -n "$AWK"; then
13206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13207$as_echo "$AWK" >&6; }
13208else
13209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13210$as_echo "no" >&6; }
13211fi
13212
13213
13214  test -n "$AWK" && break
13215done
13216
13217    else
13218      # If it succeeded, then it was overridden by the user. We will use it
13219      # for the tool.
13220
13221      # First remove it from the list of overridden variables, so we can test
13222      # for unknown variables in the end.
13223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13224
13225      # Check if we try to supply an empty value
13226      if test "x$AWK" = x; then
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13228$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13230$as_echo_n "checking for AWK... " >&6; }
13231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13232$as_echo "disabled" >&6; }
13233      else
13234        # Check if the provided tool contains a complete path.
13235        tool_specified="$AWK"
13236        tool_basename="${tool_specified##*/}"
13237        if test "x$tool_basename" = "x$tool_specified"; then
13238          # A command without a complete path is provided, search $PATH.
13239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13240$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13241          # Extract the first word of "$tool_basename", so it can be a program name with args.
13242set dummy $tool_basename; ac_word=$2
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13244$as_echo_n "checking for $ac_word... " >&6; }
13245if ${ac_cv_path_AWK+:} false; then :
13246  $as_echo_n "(cached) " >&6
13247else
13248  case $AWK in
13249  [\\/]* | ?:[\\/]*)
13250  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13251  ;;
13252  *)
13253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13254for as_dir in $PATH
13255do
13256  IFS=$as_save_IFS
13257  test -z "$as_dir" && as_dir=.
13258    for ac_exec_ext in '' $ac_executable_extensions; do
13259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13260    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13262    break 2
13263  fi
13264done
13265  done
13266IFS=$as_save_IFS
13267
13268  ;;
13269esac
13270fi
13271AWK=$ac_cv_path_AWK
13272if test -n "$AWK"; then
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13274$as_echo "$AWK" >&6; }
13275else
13276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
13278fi
13279
13280
13281          if test "x$AWK" = x; then
13282            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13283          fi
13284        else
13285          # Otherwise we believe it is a complete path. Use it as it is.
13286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13287$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13289$as_echo_n "checking for AWK... " >&6; }
13290          if test ! -x "$tool_specified"; then
13291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13292$as_echo "not found" >&6; }
13293            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13294          fi
13295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13296$as_echo "$tool_specified" >&6; }
13297        fi
13298      fi
13299    fi
13300
13301  fi
13302
13303
13304  if test "x$AWK" = x; then
13305    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13306  fi
13307
13308
13309
13310
13311  # Publish this variable in the help.
13312
13313
13314  if [ -z "${GREP+x}" ]; then
13315    # The variable is not set by user, try to locate tool using the code snippet
13316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13317$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13318if ${ac_cv_path_GREP+:} false; then :
13319  $as_echo_n "(cached) " >&6
13320else
13321  if test -z "$GREP"; then
13322  ac_path_GREP_found=false
13323  # Loop through the user's path and test for each of PROGNAME-LIST
13324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13325for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13326do
13327  IFS=$as_save_IFS
13328  test -z "$as_dir" && as_dir=.
13329    for ac_prog in grep ggrep; do
13330    for ac_exec_ext in '' $ac_executable_extensions; do
13331      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13332      as_fn_executable_p "$ac_path_GREP" || continue
13333# Check for GNU ac_path_GREP and select it if it is found.
13334  # Check for GNU $ac_path_GREP
13335case `"$ac_path_GREP" --version 2>&1` in
13336*GNU*)
13337  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13338*)
13339  ac_count=0
13340  $as_echo_n 0123456789 >"conftest.in"
13341  while :
13342  do
13343    cat "conftest.in" "conftest.in" >"conftest.tmp"
13344    mv "conftest.tmp" "conftest.in"
13345    cp "conftest.in" "conftest.nl"
13346    $as_echo 'GREP' >> "conftest.nl"
13347    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13348    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13349    as_fn_arith $ac_count + 1 && ac_count=$as_val
13350    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13351      # Best one so far, save it but keep looking for a better one
13352      ac_cv_path_GREP="$ac_path_GREP"
13353      ac_path_GREP_max=$ac_count
13354    fi
13355    # 10*(2^10) chars as input seems more than enough
13356    test $ac_count -gt 10 && break
13357  done
13358  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13359esac
13360
13361      $ac_path_GREP_found && break 3
13362    done
13363  done
13364  done
13365IFS=$as_save_IFS
13366  if test -z "$ac_cv_path_GREP"; then
13367    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13368  fi
13369else
13370  ac_cv_path_GREP=$GREP
13371fi
13372
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13375$as_echo "$ac_cv_path_GREP" >&6; }
13376 GREP="$ac_cv_path_GREP"
13377
13378
13379  else
13380    # The variable is set, but is it from the command line or the environment?
13381
13382    # Try to remove the string !GREP! from our list.
13383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13385      # If it failed, the variable was not from the command line. Ignore it,
13386      # but warn the user (except for BASH, which is always set by the calling BASH).
13387      if test "xGREP" != xBASH; then
13388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13389$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13390      fi
13391      # Try to locate tool using the code snippet
13392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455    else
13456      # If it succeeded, then it was overridden by the user. We will use it
13457      # for the tool.
13458
13459      # First remove it from the list of overridden variables, so we can test
13460      # for unknown variables in the end.
13461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13462
13463      # Check if we try to supply an empty value
13464      if test "x$GREP" = x; then
13465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13466$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13468$as_echo_n "checking for GREP... " >&6; }
13469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13470$as_echo "disabled" >&6; }
13471      else
13472        # Check if the provided tool contains a complete path.
13473        tool_specified="$GREP"
13474        tool_basename="${tool_specified##*/}"
13475        if test "x$tool_basename" = "x$tool_specified"; then
13476          # A command without a complete path is provided, search $PATH.
13477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13478$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13479          # Extract the first word of "$tool_basename", so it can be a program name with args.
13480set dummy $tool_basename; ac_word=$2
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13482$as_echo_n "checking for $ac_word... " >&6; }
13483if ${ac_cv_path_GREP+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  case $GREP in
13487  [\\/]* | ?:[\\/]*)
13488  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13489  ;;
13490  *)
13491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13492for as_dir in $PATH
13493do
13494  IFS=$as_save_IFS
13495  test -z "$as_dir" && as_dir=.
13496    for ac_exec_ext in '' $ac_executable_extensions; do
13497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13498    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13500    break 2
13501  fi
13502done
13503  done
13504IFS=$as_save_IFS
13505
13506  ;;
13507esac
13508fi
13509GREP=$ac_cv_path_GREP
13510if test -n "$GREP"; then
13511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13512$as_echo "$GREP" >&6; }
13513else
13514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13515$as_echo "no" >&6; }
13516fi
13517
13518
13519          if test "x$GREP" = x; then
13520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13521          fi
13522        else
13523          # Otherwise we believe it is a complete path. Use it as it is.
13524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13525$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13527$as_echo_n "checking for GREP... " >&6; }
13528          if test ! -x "$tool_specified"; then
13529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13530$as_echo "not found" >&6; }
13531            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13532          fi
13533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13534$as_echo "$tool_specified" >&6; }
13535        fi
13536      fi
13537    fi
13538
13539  fi
13540
13541
13542  if test "x$GREP" = x; then
13543    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13544  fi
13545
13546
13547
13548
13549  # Publish this variable in the help.
13550
13551
13552  if [ -z "${EGREP+x}" ]; then
13553    # The variable is not set by user, try to locate tool using the code snippet
13554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13555$as_echo_n "checking for egrep... " >&6; }
13556if ${ac_cv_path_EGREP+:} false; then :
13557  $as_echo_n "(cached) " >&6
13558else
13559  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13560   then ac_cv_path_EGREP="$GREP -E"
13561   else
13562     if test -z "$EGREP"; then
13563  ac_path_EGREP_found=false
13564  # Loop through the user's path and test for each of PROGNAME-LIST
13565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13566for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13567do
13568  IFS=$as_save_IFS
13569  test -z "$as_dir" && as_dir=.
13570    for ac_prog in egrep; do
13571    for ac_exec_ext in '' $ac_executable_extensions; do
13572      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13573      as_fn_executable_p "$ac_path_EGREP" || continue
13574# Check for GNU ac_path_EGREP and select it if it is found.
13575  # Check for GNU $ac_path_EGREP
13576case `"$ac_path_EGREP" --version 2>&1` in
13577*GNU*)
13578  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13579*)
13580  ac_count=0
13581  $as_echo_n 0123456789 >"conftest.in"
13582  while :
13583  do
13584    cat "conftest.in" "conftest.in" >"conftest.tmp"
13585    mv "conftest.tmp" "conftest.in"
13586    cp "conftest.in" "conftest.nl"
13587    $as_echo 'EGREP' >> "conftest.nl"
13588    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13589    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13590    as_fn_arith $ac_count + 1 && ac_count=$as_val
13591    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13592      # Best one so far, save it but keep looking for a better one
13593      ac_cv_path_EGREP="$ac_path_EGREP"
13594      ac_path_EGREP_max=$ac_count
13595    fi
13596    # 10*(2^10) chars as input seems more than enough
13597    test $ac_count -gt 10 && break
13598  done
13599  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13600esac
13601
13602      $ac_path_EGREP_found && break 3
13603    done
13604  done
13605  done
13606IFS=$as_save_IFS
13607  if test -z "$ac_cv_path_EGREP"; then
13608    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13609  fi
13610else
13611  ac_cv_path_EGREP=$EGREP
13612fi
13613
13614   fi
13615fi
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13617$as_echo "$ac_cv_path_EGREP" >&6; }
13618 EGREP="$ac_cv_path_EGREP"
13619
13620
13621  else
13622    # The variable is set, but is it from the command line or the environment?
13623
13624    # Try to remove the string !EGREP! from our list.
13625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13627      # If it failed, the variable was not from the command line. Ignore it,
13628      # but warn the user (except for BASH, which is always set by the calling BASH).
13629      if test "xEGREP" != xBASH; then
13630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13631$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13632      fi
13633      # Try to locate tool using the code snippet
13634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13635$as_echo_n "checking for egrep... " >&6; }
13636if ${ac_cv_path_EGREP+:} false; then :
13637  $as_echo_n "(cached) " >&6
13638else
13639  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13640   then ac_cv_path_EGREP="$GREP -E"
13641   else
13642     if test -z "$EGREP"; then
13643  ac_path_EGREP_found=false
13644  # Loop through the user's path and test for each of PROGNAME-LIST
13645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13647do
13648  IFS=$as_save_IFS
13649  test -z "$as_dir" && as_dir=.
13650    for ac_prog in egrep; do
13651    for ac_exec_ext in '' $ac_executable_extensions; do
13652      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13653      as_fn_executable_p "$ac_path_EGREP" || continue
13654# Check for GNU ac_path_EGREP and select it if it is found.
13655  # Check for GNU $ac_path_EGREP
13656case `"$ac_path_EGREP" --version 2>&1` in
13657*GNU*)
13658  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13659*)
13660  ac_count=0
13661  $as_echo_n 0123456789 >"conftest.in"
13662  while :
13663  do
13664    cat "conftest.in" "conftest.in" >"conftest.tmp"
13665    mv "conftest.tmp" "conftest.in"
13666    cp "conftest.in" "conftest.nl"
13667    $as_echo 'EGREP' >> "conftest.nl"
13668    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13669    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13670    as_fn_arith $ac_count + 1 && ac_count=$as_val
13671    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13672      # Best one so far, save it but keep looking for a better one
13673      ac_cv_path_EGREP="$ac_path_EGREP"
13674      ac_path_EGREP_max=$ac_count
13675    fi
13676    # 10*(2^10) chars as input seems more than enough
13677    test $ac_count -gt 10 && break
13678  done
13679  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13680esac
13681
13682      $ac_path_EGREP_found && break 3
13683    done
13684  done
13685  done
13686IFS=$as_save_IFS
13687  if test -z "$ac_cv_path_EGREP"; then
13688    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13689  fi
13690else
13691  ac_cv_path_EGREP=$EGREP
13692fi
13693
13694   fi
13695fi
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13697$as_echo "$ac_cv_path_EGREP" >&6; }
13698 EGREP="$ac_cv_path_EGREP"
13699
13700
13701    else
13702      # If it succeeded, then it was overridden by the user. We will use it
13703      # for the tool.
13704
13705      # First remove it from the list of overridden variables, so we can test
13706      # for unknown variables in the end.
13707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13708
13709      # Check if we try to supply an empty value
13710      if test "x$EGREP" = x; then
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13712$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13714$as_echo_n "checking for EGREP... " >&6; }
13715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13716$as_echo "disabled" >&6; }
13717      else
13718        # Check if the provided tool contains a complete path.
13719        tool_specified="$EGREP"
13720        tool_basename="${tool_specified##*/}"
13721        if test "x$tool_basename" = "x$tool_specified"; then
13722          # A command without a complete path is provided, search $PATH.
13723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13724$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13725          # Extract the first word of "$tool_basename", so it can be a program name with args.
13726set dummy $tool_basename; ac_word=$2
13727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13728$as_echo_n "checking for $ac_word... " >&6; }
13729if ${ac_cv_path_EGREP+:} false; then :
13730  $as_echo_n "(cached) " >&6
13731else
13732  case $EGREP in
13733  [\\/]* | ?:[\\/]*)
13734  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13735  ;;
13736  *)
13737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13738for as_dir in $PATH
13739do
13740  IFS=$as_save_IFS
13741  test -z "$as_dir" && as_dir=.
13742    for ac_exec_ext in '' $ac_executable_extensions; do
13743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13744    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13746    break 2
13747  fi
13748done
13749  done
13750IFS=$as_save_IFS
13751
13752  ;;
13753esac
13754fi
13755EGREP=$ac_cv_path_EGREP
13756if test -n "$EGREP"; then
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13758$as_echo "$EGREP" >&6; }
13759else
13760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13761$as_echo "no" >&6; }
13762fi
13763
13764
13765          if test "x$EGREP" = x; then
13766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13767          fi
13768        else
13769          # Otherwise we believe it is a complete path. Use it as it is.
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13771$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13773$as_echo_n "checking for EGREP... " >&6; }
13774          if test ! -x "$tool_specified"; then
13775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13776$as_echo "not found" >&6; }
13777            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13778          fi
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13780$as_echo "$tool_specified" >&6; }
13781        fi
13782      fi
13783    fi
13784
13785  fi
13786
13787
13788  if test "x$EGREP" = x; then
13789    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13790  fi
13791
13792
13793
13794
13795  # Publish this variable in the help.
13796
13797
13798  if [ -z "${FGREP+x}" ]; then
13799    # The variable is not set by user, try to locate tool using the code snippet
13800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13801$as_echo_n "checking for fgrep... " >&6; }
13802if ${ac_cv_path_FGREP+:} false; then :
13803  $as_echo_n "(cached) " >&6
13804else
13805  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13806   then ac_cv_path_FGREP="$GREP -F"
13807   else
13808     if test -z "$FGREP"; then
13809  ac_path_FGREP_found=false
13810  # Loop through the user's path and test for each of PROGNAME-LIST
13811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13812for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13813do
13814  IFS=$as_save_IFS
13815  test -z "$as_dir" && as_dir=.
13816    for ac_prog in fgrep; do
13817    for ac_exec_ext in '' $ac_executable_extensions; do
13818      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13819      as_fn_executable_p "$ac_path_FGREP" || continue
13820# Check for GNU ac_path_FGREP and select it if it is found.
13821  # Check for GNU $ac_path_FGREP
13822case `"$ac_path_FGREP" --version 2>&1` in
13823*GNU*)
13824  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13825*)
13826  ac_count=0
13827  $as_echo_n 0123456789 >"conftest.in"
13828  while :
13829  do
13830    cat "conftest.in" "conftest.in" >"conftest.tmp"
13831    mv "conftest.tmp" "conftest.in"
13832    cp "conftest.in" "conftest.nl"
13833    $as_echo 'FGREP' >> "conftest.nl"
13834    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13835    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13836    as_fn_arith $ac_count + 1 && ac_count=$as_val
13837    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13838      # Best one so far, save it but keep looking for a better one
13839      ac_cv_path_FGREP="$ac_path_FGREP"
13840      ac_path_FGREP_max=$ac_count
13841    fi
13842    # 10*(2^10) chars as input seems more than enough
13843    test $ac_count -gt 10 && break
13844  done
13845  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13846esac
13847
13848      $ac_path_FGREP_found && break 3
13849    done
13850  done
13851  done
13852IFS=$as_save_IFS
13853  if test -z "$ac_cv_path_FGREP"; then
13854    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13855  fi
13856else
13857  ac_cv_path_FGREP=$FGREP
13858fi
13859
13860   fi
13861fi
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13863$as_echo "$ac_cv_path_FGREP" >&6; }
13864 FGREP="$ac_cv_path_FGREP"
13865
13866
13867  else
13868    # The variable is set, but is it from the command line or the environment?
13869
13870    # Try to remove the string !FGREP! from our list.
13871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13873      # If it failed, the variable was not from the command line. Ignore it,
13874      # but warn the user (except for BASH, which is always set by the calling BASH).
13875      if test "xFGREP" != xBASH; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13877$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13878      fi
13879      # Try to locate tool using the code snippet
13880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13881$as_echo_n "checking for fgrep... " >&6; }
13882if ${ac_cv_path_FGREP+:} false; then :
13883  $as_echo_n "(cached) " >&6
13884else
13885  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13886   then ac_cv_path_FGREP="$GREP -F"
13887   else
13888     if test -z "$FGREP"; then
13889  ac_path_FGREP_found=false
13890  # Loop through the user's path and test for each of PROGNAME-LIST
13891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13892for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13893do
13894  IFS=$as_save_IFS
13895  test -z "$as_dir" && as_dir=.
13896    for ac_prog in fgrep; do
13897    for ac_exec_ext in '' $ac_executable_extensions; do
13898      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13899      as_fn_executable_p "$ac_path_FGREP" || continue
13900# Check for GNU ac_path_FGREP and select it if it is found.
13901  # Check for GNU $ac_path_FGREP
13902case `"$ac_path_FGREP" --version 2>&1` in
13903*GNU*)
13904  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13905*)
13906  ac_count=0
13907  $as_echo_n 0123456789 >"conftest.in"
13908  while :
13909  do
13910    cat "conftest.in" "conftest.in" >"conftest.tmp"
13911    mv "conftest.tmp" "conftest.in"
13912    cp "conftest.in" "conftest.nl"
13913    $as_echo 'FGREP' >> "conftest.nl"
13914    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13915    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13916    as_fn_arith $ac_count + 1 && ac_count=$as_val
13917    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13918      # Best one so far, save it but keep looking for a better one
13919      ac_cv_path_FGREP="$ac_path_FGREP"
13920      ac_path_FGREP_max=$ac_count
13921    fi
13922    # 10*(2^10) chars as input seems more than enough
13923    test $ac_count -gt 10 && break
13924  done
13925  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13926esac
13927
13928      $ac_path_FGREP_found && break 3
13929    done
13930  done
13931  done
13932IFS=$as_save_IFS
13933  if test -z "$ac_cv_path_FGREP"; then
13934    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13935  fi
13936else
13937  ac_cv_path_FGREP=$FGREP
13938fi
13939
13940   fi
13941fi
13942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13943$as_echo "$ac_cv_path_FGREP" >&6; }
13944 FGREP="$ac_cv_path_FGREP"
13945
13946
13947    else
13948      # If it succeeded, then it was overridden by the user. We will use it
13949      # for the tool.
13950
13951      # First remove it from the list of overridden variables, so we can test
13952      # for unknown variables in the end.
13953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13954
13955      # Check if we try to supply an empty value
13956      if test "x$FGREP" = x; then
13957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13958$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13960$as_echo_n "checking for FGREP... " >&6; }
13961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13962$as_echo "disabled" >&6; }
13963      else
13964        # Check if the provided tool contains a complete path.
13965        tool_specified="$FGREP"
13966        tool_basename="${tool_specified##*/}"
13967        if test "x$tool_basename" = "x$tool_specified"; then
13968          # A command without a complete path is provided, search $PATH.
13969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13970$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13971          # Extract the first word of "$tool_basename", so it can be a program name with args.
13972set dummy $tool_basename; ac_word=$2
13973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13974$as_echo_n "checking for $ac_word... " >&6; }
13975if ${ac_cv_path_FGREP+:} false; then :
13976  $as_echo_n "(cached) " >&6
13977else
13978  case $FGREP in
13979  [\\/]* | ?:[\\/]*)
13980  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13981  ;;
13982  *)
13983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13984for as_dir in $PATH
13985do
13986  IFS=$as_save_IFS
13987  test -z "$as_dir" && as_dir=.
13988    for ac_exec_ext in '' $ac_executable_extensions; do
13989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13990    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13992    break 2
13993  fi
13994done
13995  done
13996IFS=$as_save_IFS
13997
13998  ;;
13999esac
14000fi
14001FGREP=$ac_cv_path_FGREP
14002if test -n "$FGREP"; then
14003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14004$as_echo "$FGREP" >&6; }
14005else
14006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14007$as_echo "no" >&6; }
14008fi
14009
14010
14011          if test "x$FGREP" = x; then
14012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14013          fi
14014        else
14015          # Otherwise we believe it is a complete path. Use it as it is.
14016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14017$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14019$as_echo_n "checking for FGREP... " >&6; }
14020          if test ! -x "$tool_specified"; then
14021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14022$as_echo "not found" >&6; }
14023            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14024          fi
14025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14026$as_echo "$tool_specified" >&6; }
14027        fi
14028      fi
14029    fi
14030
14031  fi
14032
14033
14034  if test "x$FGREP" = x; then
14035    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14036  fi
14037
14038
14039
14040
14041  # Publish this variable in the help.
14042
14043
14044  if [ -z "${SED+x}" ]; then
14045    # The variable is not set by user, try to locate tool using the code snippet
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14047$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14048if ${ac_cv_path_SED+:} false; then :
14049  $as_echo_n "(cached) " >&6
14050else
14051            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14052     for ac_i in 1 2 3 4 5 6 7; do
14053       ac_script="$ac_script$as_nl$ac_script"
14054     done
14055     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14056     { ac_script=; unset ac_script;}
14057     if test -z "$SED"; then
14058  ac_path_SED_found=false
14059  # Loop through the user's path and test for each of PROGNAME-LIST
14060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14061for as_dir in $PATH
14062do
14063  IFS=$as_save_IFS
14064  test -z "$as_dir" && as_dir=.
14065    for ac_prog in sed gsed; do
14066    for ac_exec_ext in '' $ac_executable_extensions; do
14067      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14068      as_fn_executable_p "$ac_path_SED" || continue
14069# Check for GNU ac_path_SED and select it if it is found.
14070  # Check for GNU $ac_path_SED
14071case `"$ac_path_SED" --version 2>&1` in
14072*GNU*)
14073  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14074*)
14075  ac_count=0
14076  $as_echo_n 0123456789 >"conftest.in"
14077  while :
14078  do
14079    cat "conftest.in" "conftest.in" >"conftest.tmp"
14080    mv "conftest.tmp" "conftest.in"
14081    cp "conftest.in" "conftest.nl"
14082    $as_echo '' >> "conftest.nl"
14083    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14084    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14085    as_fn_arith $ac_count + 1 && ac_count=$as_val
14086    if test $ac_count -gt ${ac_path_SED_max-0}; then
14087      # Best one so far, save it but keep looking for a better one
14088      ac_cv_path_SED="$ac_path_SED"
14089      ac_path_SED_max=$ac_count
14090    fi
14091    # 10*(2^10) chars as input seems more than enough
14092    test $ac_count -gt 10 && break
14093  done
14094  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14095esac
14096
14097      $ac_path_SED_found && break 3
14098    done
14099  done
14100  done
14101IFS=$as_save_IFS
14102  if test -z "$ac_cv_path_SED"; then
14103    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14104  fi
14105else
14106  ac_cv_path_SED=$SED
14107fi
14108
14109fi
14110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14111$as_echo "$ac_cv_path_SED" >&6; }
14112 SED="$ac_cv_path_SED"
14113  rm -f conftest.sed
14114
14115  else
14116    # The variable is set, but is it from the command line or the environment?
14117
14118    # Try to remove the string !SED! from our list.
14119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14121      # If it failed, the variable was not from the command line. Ignore it,
14122      # but warn the user (except for BASH, which is always set by the calling BASH).
14123      if test "xSED" != xBASH; then
14124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14125$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14126      fi
14127      # Try to locate tool using the code snippet
14128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14129$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14130if ${ac_cv_path_SED+:} false; then :
14131  $as_echo_n "(cached) " >&6
14132else
14133            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14134     for ac_i in 1 2 3 4 5 6 7; do
14135       ac_script="$ac_script$as_nl$ac_script"
14136     done
14137     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14138     { ac_script=; unset ac_script;}
14139     if test -z "$SED"; then
14140  ac_path_SED_found=false
14141  # Loop through the user's path and test for each of PROGNAME-LIST
14142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143for as_dir in $PATH
14144do
14145  IFS=$as_save_IFS
14146  test -z "$as_dir" && as_dir=.
14147    for ac_prog in sed gsed; do
14148    for ac_exec_ext in '' $ac_executable_extensions; do
14149      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14150      as_fn_executable_p "$ac_path_SED" || continue
14151# Check for GNU ac_path_SED and select it if it is found.
14152  # Check for GNU $ac_path_SED
14153case `"$ac_path_SED" --version 2>&1` in
14154*GNU*)
14155  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14156*)
14157  ac_count=0
14158  $as_echo_n 0123456789 >"conftest.in"
14159  while :
14160  do
14161    cat "conftest.in" "conftest.in" >"conftest.tmp"
14162    mv "conftest.tmp" "conftest.in"
14163    cp "conftest.in" "conftest.nl"
14164    $as_echo '' >> "conftest.nl"
14165    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14166    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14167    as_fn_arith $ac_count + 1 && ac_count=$as_val
14168    if test $ac_count -gt ${ac_path_SED_max-0}; then
14169      # Best one so far, save it but keep looking for a better one
14170      ac_cv_path_SED="$ac_path_SED"
14171      ac_path_SED_max=$ac_count
14172    fi
14173    # 10*(2^10) chars as input seems more than enough
14174    test $ac_count -gt 10 && break
14175  done
14176  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14177esac
14178
14179      $ac_path_SED_found && break 3
14180    done
14181  done
14182  done
14183IFS=$as_save_IFS
14184  if test -z "$ac_cv_path_SED"; then
14185    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14186  fi
14187else
14188  ac_cv_path_SED=$SED
14189fi
14190
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14193$as_echo "$ac_cv_path_SED" >&6; }
14194 SED="$ac_cv_path_SED"
14195  rm -f conftest.sed
14196
14197    else
14198      # If it succeeded, then it was overridden by the user. We will use it
14199      # for the tool.
14200
14201      # First remove it from the list of overridden variables, so we can test
14202      # for unknown variables in the end.
14203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14204
14205      # Check if we try to supply an empty value
14206      if test "x$SED" = x; then
14207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14208$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14210$as_echo_n "checking for SED... " >&6; }
14211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14212$as_echo "disabled" >&6; }
14213      else
14214        # Check if the provided tool contains a complete path.
14215        tool_specified="$SED"
14216        tool_basename="${tool_specified##*/}"
14217        if test "x$tool_basename" = "x$tool_specified"; then
14218          # A command without a complete path is provided, search $PATH.
14219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14220$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14221          # Extract the first word of "$tool_basename", so it can be a program name with args.
14222set dummy $tool_basename; ac_word=$2
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14224$as_echo_n "checking for $ac_word... " >&6; }
14225if ${ac_cv_path_SED+:} false; then :
14226  $as_echo_n "(cached) " >&6
14227else
14228  case $SED in
14229  [\\/]* | ?:[\\/]*)
14230  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14231  ;;
14232  *)
14233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14234for as_dir in $PATH
14235do
14236  IFS=$as_save_IFS
14237  test -z "$as_dir" && as_dir=.
14238    for ac_exec_ext in '' $ac_executable_extensions; do
14239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14240    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14242    break 2
14243  fi
14244done
14245  done
14246IFS=$as_save_IFS
14247
14248  ;;
14249esac
14250fi
14251SED=$ac_cv_path_SED
14252if test -n "$SED"; then
14253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14254$as_echo "$SED" >&6; }
14255else
14256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14257$as_echo "no" >&6; }
14258fi
14259
14260
14261          if test "x$SED" = x; then
14262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14263          fi
14264        else
14265          # Otherwise we believe it is a complete path. Use it as it is.
14266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14267$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14269$as_echo_n "checking for SED... " >&6; }
14270          if test ! -x "$tool_specified"; then
14271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14272$as_echo "not found" >&6; }
14273            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14274          fi
14275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14276$as_echo "$tool_specified" >&6; }
14277        fi
14278      fi
14279    fi
14280
14281  fi
14282
14283
14284  if test "x$SED" = x; then
14285    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14286  fi
14287
14288
14289
14290  # Always force rm.
14291  RM="$RM -f"
14292
14293  # pwd behaves differently on various platforms and some don't support the -L flag.
14294  # Always use the bash builtin pwd to get uniform behavior.
14295  THEPWDCMD=pwd
14296
14297  # These are not required on all platforms
14298
14299
14300  # Publish this variable in the help.
14301
14302
14303  if [ -z "${CYGPATH+x}" ]; then
14304    # The variable is not set by user, try to locate tool using the code snippet
14305    for ac_prog in cygpath
14306do
14307  # Extract the first word of "$ac_prog", so it can be a program name with args.
14308set dummy $ac_prog; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_CYGPATH+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $CYGPATH in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337CYGPATH=$ac_cv_path_CYGPATH
14338if test -n "$CYGPATH"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14340$as_echo "$CYGPATH" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347  test -n "$CYGPATH" && break
14348done
14349
14350  else
14351    # The variable is set, but is it from the command line or the environment?
14352
14353    # Try to remove the string !CYGPATH! from our list.
14354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14356      # If it failed, the variable was not from the command line. Ignore it,
14357      # but warn the user (except for BASH, which is always set by the calling BASH).
14358      if test "xCYGPATH" != xBASH; then
14359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14360$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14361      fi
14362      # Try to locate tool using the code snippet
14363      for ac_prog in cygpath
14364do
14365  # Extract the first word of "$ac_prog", so it can be a program name with args.
14366set dummy $ac_prog; ac_word=$2
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14368$as_echo_n "checking for $ac_word... " >&6; }
14369if ${ac_cv_path_CYGPATH+:} false; then :
14370  $as_echo_n "(cached) " >&6
14371else
14372  case $CYGPATH in
14373  [\\/]* | ?:[\\/]*)
14374  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14375  ;;
14376  *)
14377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14378for as_dir in $PATH
14379do
14380  IFS=$as_save_IFS
14381  test -z "$as_dir" && as_dir=.
14382    for ac_exec_ext in '' $ac_executable_extensions; do
14383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14384    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14386    break 2
14387  fi
14388done
14389  done
14390IFS=$as_save_IFS
14391
14392  ;;
14393esac
14394fi
14395CYGPATH=$ac_cv_path_CYGPATH
14396if test -n "$CYGPATH"; then
14397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14398$as_echo "$CYGPATH" >&6; }
14399else
14400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14401$as_echo "no" >&6; }
14402fi
14403
14404
14405  test -n "$CYGPATH" && break
14406done
14407
14408    else
14409      # If it succeeded, then it was overridden by the user. We will use it
14410      # for the tool.
14411
14412      # First remove it from the list of overridden variables, so we can test
14413      # for unknown variables in the end.
14414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14415
14416      # Check if we try to supply an empty value
14417      if test "x$CYGPATH" = x; then
14418        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14419$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14421$as_echo_n "checking for CYGPATH... " >&6; }
14422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14423$as_echo "disabled" >&6; }
14424      else
14425        # Check if the provided tool contains a complete path.
14426        tool_specified="$CYGPATH"
14427        tool_basename="${tool_specified##*/}"
14428        if test "x$tool_basename" = "x$tool_specified"; then
14429          # A command without a complete path is provided, search $PATH.
14430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14431$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14432          # Extract the first word of "$tool_basename", so it can be a program name with args.
14433set dummy $tool_basename; ac_word=$2
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14435$as_echo_n "checking for $ac_word... " >&6; }
14436if ${ac_cv_path_CYGPATH+:} false; then :
14437  $as_echo_n "(cached) " >&6
14438else
14439  case $CYGPATH in
14440  [\\/]* | ?:[\\/]*)
14441  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14442  ;;
14443  *)
14444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14445for as_dir in $PATH
14446do
14447  IFS=$as_save_IFS
14448  test -z "$as_dir" && as_dir=.
14449    for ac_exec_ext in '' $ac_executable_extensions; do
14450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14451    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14453    break 2
14454  fi
14455done
14456  done
14457IFS=$as_save_IFS
14458
14459  ;;
14460esac
14461fi
14462CYGPATH=$ac_cv_path_CYGPATH
14463if test -n "$CYGPATH"; then
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14465$as_echo "$CYGPATH" >&6; }
14466else
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14468$as_echo "no" >&6; }
14469fi
14470
14471
14472          if test "x$CYGPATH" = x; then
14473            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14474          fi
14475        else
14476          # Otherwise we believe it is a complete path. Use it as it is.
14477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14478$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14480$as_echo_n "checking for CYGPATH... " >&6; }
14481          if test ! -x "$tool_specified"; then
14482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14483$as_echo "not found" >&6; }
14484            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14485          fi
14486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14487$as_echo "$tool_specified" >&6; }
14488        fi
14489      fi
14490    fi
14491
14492  fi
14493
14494
14495
14496
14497  # Publish this variable in the help.
14498
14499
14500  if [ -z "${READLINK+x}" ]; then
14501    # The variable is not set by user, try to locate tool using the code snippet
14502    for ac_prog in greadlink readlink
14503do
14504  # Extract the first word of "$ac_prog", so it can be a program name with args.
14505set dummy $ac_prog; ac_word=$2
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14507$as_echo_n "checking for $ac_word... " >&6; }
14508if ${ac_cv_path_READLINK+:} false; then :
14509  $as_echo_n "(cached) " >&6
14510else
14511  case $READLINK in
14512  [\\/]* | ?:[\\/]*)
14513  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14514  ;;
14515  *)
14516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14517for as_dir in $PATH
14518do
14519  IFS=$as_save_IFS
14520  test -z "$as_dir" && as_dir=.
14521    for ac_exec_ext in '' $ac_executable_extensions; do
14522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14523    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14525    break 2
14526  fi
14527done
14528  done
14529IFS=$as_save_IFS
14530
14531  ;;
14532esac
14533fi
14534READLINK=$ac_cv_path_READLINK
14535if test -n "$READLINK"; then
14536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14537$as_echo "$READLINK" >&6; }
14538else
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
14542
14543
14544  test -n "$READLINK" && break
14545done
14546
14547  else
14548    # The variable is set, but is it from the command line or the environment?
14549
14550    # Try to remove the string !READLINK! from our list.
14551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14553      # If it failed, the variable was not from the command line. Ignore it,
14554      # but warn the user (except for BASH, which is always set by the calling BASH).
14555      if test "xREADLINK" != xBASH; then
14556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14557$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14558      fi
14559      # Try to locate tool using the code snippet
14560      for ac_prog in greadlink readlink
14561do
14562  # Extract the first word of "$ac_prog", so it can be a program name with args.
14563set dummy $ac_prog; ac_word=$2
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14565$as_echo_n "checking for $ac_word... " >&6; }
14566if ${ac_cv_path_READLINK+:} false; then :
14567  $as_echo_n "(cached) " >&6
14568else
14569  case $READLINK in
14570  [\\/]* | ?:[\\/]*)
14571  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14572  ;;
14573  *)
14574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14575for as_dir in $PATH
14576do
14577  IFS=$as_save_IFS
14578  test -z "$as_dir" && as_dir=.
14579    for ac_exec_ext in '' $ac_executable_extensions; do
14580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14581    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14583    break 2
14584  fi
14585done
14586  done
14587IFS=$as_save_IFS
14588
14589  ;;
14590esac
14591fi
14592READLINK=$ac_cv_path_READLINK
14593if test -n "$READLINK"; then
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14595$as_echo "$READLINK" >&6; }
14596else
14597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14598$as_echo "no" >&6; }
14599fi
14600
14601
14602  test -n "$READLINK" && break
14603done
14604
14605    else
14606      # If it succeeded, then it was overridden by the user. We will use it
14607      # for the tool.
14608
14609      # First remove it from the list of overridden variables, so we can test
14610      # for unknown variables in the end.
14611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14612
14613      # Check if we try to supply an empty value
14614      if test "x$READLINK" = x; then
14615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14616$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14618$as_echo_n "checking for READLINK... " >&6; }
14619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14620$as_echo "disabled" >&6; }
14621      else
14622        # Check if the provided tool contains a complete path.
14623        tool_specified="$READLINK"
14624        tool_basename="${tool_specified##*/}"
14625        if test "x$tool_basename" = "x$tool_specified"; then
14626          # A command without a complete path is provided, search $PATH.
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14628$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14629          # Extract the first word of "$tool_basename", so it can be a program name with args.
14630set dummy $tool_basename; ac_word=$2
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14632$as_echo_n "checking for $ac_word... " >&6; }
14633if ${ac_cv_path_READLINK+:} false; then :
14634  $as_echo_n "(cached) " >&6
14635else
14636  case $READLINK in
14637  [\\/]* | ?:[\\/]*)
14638  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14639  ;;
14640  *)
14641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14642for as_dir in $PATH
14643do
14644  IFS=$as_save_IFS
14645  test -z "$as_dir" && as_dir=.
14646    for ac_exec_ext in '' $ac_executable_extensions; do
14647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14648    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14650    break 2
14651  fi
14652done
14653  done
14654IFS=$as_save_IFS
14655
14656  ;;
14657esac
14658fi
14659READLINK=$ac_cv_path_READLINK
14660if test -n "$READLINK"; then
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14662$as_echo "$READLINK" >&6; }
14663else
14664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14665$as_echo "no" >&6; }
14666fi
14667
14668
14669          if test "x$READLINK" = x; then
14670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14671          fi
14672        else
14673          # Otherwise we believe it is a complete path. Use it as it is.
14674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14675$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14677$as_echo_n "checking for READLINK... " >&6; }
14678          if test ! -x "$tool_specified"; then
14679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14680$as_echo "not found" >&6; }
14681            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14682          fi
14683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14684$as_echo "$tool_specified" >&6; }
14685        fi
14686      fi
14687    fi
14688
14689  fi
14690
14691
14692
14693
14694  # Publish this variable in the help.
14695
14696
14697  if [ -z "${DF+x}" ]; then
14698    # The variable is not set by user, try to locate tool using the code snippet
14699    for ac_prog in df
14700do
14701  # Extract the first word of "$ac_prog", so it can be a program name with args.
14702set dummy $ac_prog; ac_word=$2
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14704$as_echo_n "checking for $ac_word... " >&6; }
14705if ${ac_cv_path_DF+:} false; then :
14706  $as_echo_n "(cached) " >&6
14707else
14708  case $DF in
14709  [\\/]* | ?:[\\/]*)
14710  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14711  ;;
14712  *)
14713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14714for as_dir in $PATH
14715do
14716  IFS=$as_save_IFS
14717  test -z "$as_dir" && as_dir=.
14718    for ac_exec_ext in '' $ac_executable_extensions; do
14719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14720    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14722    break 2
14723  fi
14724done
14725  done
14726IFS=$as_save_IFS
14727
14728  ;;
14729esac
14730fi
14731DF=$ac_cv_path_DF
14732if test -n "$DF"; then
14733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14734$as_echo "$DF" >&6; }
14735else
14736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14737$as_echo "no" >&6; }
14738fi
14739
14740
14741  test -n "$DF" && break
14742done
14743
14744  else
14745    # The variable is set, but is it from the command line or the environment?
14746
14747    # Try to remove the string !DF! from our list.
14748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14750      # If it failed, the variable was not from the command line. Ignore it,
14751      # but warn the user (except for BASH, which is always set by the calling BASH).
14752      if test "xDF" != xBASH; then
14753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14754$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14755      fi
14756      # Try to locate tool using the code snippet
14757      for ac_prog in df
14758do
14759  # Extract the first word of "$ac_prog", so it can be a program name with args.
14760set dummy $ac_prog; ac_word=$2
14761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14762$as_echo_n "checking for $ac_word... " >&6; }
14763if ${ac_cv_path_DF+:} false; then :
14764  $as_echo_n "(cached) " >&6
14765else
14766  case $DF in
14767  [\\/]* | ?:[\\/]*)
14768  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14769  ;;
14770  *)
14771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14772for as_dir in $PATH
14773do
14774  IFS=$as_save_IFS
14775  test -z "$as_dir" && as_dir=.
14776    for ac_exec_ext in '' $ac_executable_extensions; do
14777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14778    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14780    break 2
14781  fi
14782done
14783  done
14784IFS=$as_save_IFS
14785
14786  ;;
14787esac
14788fi
14789DF=$ac_cv_path_DF
14790if test -n "$DF"; then
14791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14792$as_echo "$DF" >&6; }
14793else
14794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14795$as_echo "no" >&6; }
14796fi
14797
14798
14799  test -n "$DF" && break
14800done
14801
14802    else
14803      # If it succeeded, then it was overridden by the user. We will use it
14804      # for the tool.
14805
14806      # First remove it from the list of overridden variables, so we can test
14807      # for unknown variables in the end.
14808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14809
14810      # Check if we try to supply an empty value
14811      if test "x$DF" = x; then
14812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14813$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14815$as_echo_n "checking for DF... " >&6; }
14816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14817$as_echo "disabled" >&6; }
14818      else
14819        # Check if the provided tool contains a complete path.
14820        tool_specified="$DF"
14821        tool_basename="${tool_specified##*/}"
14822        if test "x$tool_basename" = "x$tool_specified"; then
14823          # A command without a complete path is provided, search $PATH.
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14825$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14826          # Extract the first word of "$tool_basename", so it can be a program name with args.
14827set dummy $tool_basename; ac_word=$2
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14829$as_echo_n "checking for $ac_word... " >&6; }
14830if ${ac_cv_path_DF+:} false; then :
14831  $as_echo_n "(cached) " >&6
14832else
14833  case $DF in
14834  [\\/]* | ?:[\\/]*)
14835  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14836  ;;
14837  *)
14838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14839for as_dir in $PATH
14840do
14841  IFS=$as_save_IFS
14842  test -z "$as_dir" && as_dir=.
14843    for ac_exec_ext in '' $ac_executable_extensions; do
14844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14845    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14847    break 2
14848  fi
14849done
14850  done
14851IFS=$as_save_IFS
14852
14853  ;;
14854esac
14855fi
14856DF=$ac_cv_path_DF
14857if test -n "$DF"; then
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14859$as_echo "$DF" >&6; }
14860else
14861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862$as_echo "no" >&6; }
14863fi
14864
14865
14866          if test "x$DF" = x; then
14867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14868          fi
14869        else
14870          # Otherwise we believe it is a complete path. Use it as it is.
14871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14872$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14874$as_echo_n "checking for DF... " >&6; }
14875          if test ! -x "$tool_specified"; then
14876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14877$as_echo "not found" >&6; }
14878            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14879          fi
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14881$as_echo "$tool_specified" >&6; }
14882        fi
14883      fi
14884    fi
14885
14886  fi
14887
14888
14889
14890
14891  # Publish this variable in the help.
14892
14893
14894  if [ -z "${CPIO+x}" ]; then
14895    # The variable is not set by user, try to locate tool using the code snippet
14896    for ac_prog in cpio bsdcpio
14897do
14898  # Extract the first word of "$ac_prog", so it can be a program name with args.
14899set dummy $ac_prog; ac_word=$2
14900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14901$as_echo_n "checking for $ac_word... " >&6; }
14902if ${ac_cv_path_CPIO+:} false; then :
14903  $as_echo_n "(cached) " >&6
14904else
14905  case $CPIO in
14906  [\\/]* | ?:[\\/]*)
14907  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14908  ;;
14909  *)
14910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14911for as_dir in $PATH
14912do
14913  IFS=$as_save_IFS
14914  test -z "$as_dir" && as_dir=.
14915    for ac_exec_ext in '' $ac_executable_extensions; do
14916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14917    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14919    break 2
14920  fi
14921done
14922  done
14923IFS=$as_save_IFS
14924
14925  ;;
14926esac
14927fi
14928CPIO=$ac_cv_path_CPIO
14929if test -n "$CPIO"; then
14930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14931$as_echo "$CPIO" >&6; }
14932else
14933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14934$as_echo "no" >&6; }
14935fi
14936
14937
14938  test -n "$CPIO" && break
14939done
14940
14941  else
14942    # The variable is set, but is it from the command line or the environment?
14943
14944    # Try to remove the string !CPIO! from our list.
14945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14947      # If it failed, the variable was not from the command line. Ignore it,
14948      # but warn the user (except for BASH, which is always set by the calling BASH).
14949      if test "xCPIO" != xBASH; then
14950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14951$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14952      fi
14953      # Try to locate tool using the code snippet
14954      for ac_prog in cpio bsdcpio
14955do
14956  # Extract the first word of "$ac_prog", so it can be a program name with args.
14957set dummy $ac_prog; ac_word=$2
14958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14959$as_echo_n "checking for $ac_word... " >&6; }
14960if ${ac_cv_path_CPIO+:} false; then :
14961  $as_echo_n "(cached) " >&6
14962else
14963  case $CPIO in
14964  [\\/]* | ?:[\\/]*)
14965  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14966  ;;
14967  *)
14968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14969for as_dir in $PATH
14970do
14971  IFS=$as_save_IFS
14972  test -z "$as_dir" && as_dir=.
14973    for ac_exec_ext in '' $ac_executable_extensions; do
14974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14975    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14977    break 2
14978  fi
14979done
14980  done
14981IFS=$as_save_IFS
14982
14983  ;;
14984esac
14985fi
14986CPIO=$ac_cv_path_CPIO
14987if test -n "$CPIO"; then
14988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14989$as_echo "$CPIO" >&6; }
14990else
14991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14992$as_echo "no" >&6; }
14993fi
14994
14995
14996  test -n "$CPIO" && break
14997done
14998
14999    else
15000      # If it succeeded, then it was overridden by the user. We will use it
15001      # for the tool.
15002
15003      # First remove it from the list of overridden variables, so we can test
15004      # for unknown variables in the end.
15005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15006
15007      # Check if we try to supply an empty value
15008      if test "x$CPIO" = x; then
15009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15010$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15012$as_echo_n "checking for CPIO... " >&6; }
15013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15014$as_echo "disabled" >&6; }
15015      else
15016        # Check if the provided tool contains a complete path.
15017        tool_specified="$CPIO"
15018        tool_basename="${tool_specified##*/}"
15019        if test "x$tool_basename" = "x$tool_specified"; then
15020          # A command without a complete path is provided, search $PATH.
15021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15022$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15023          # Extract the first word of "$tool_basename", so it can be a program name with args.
15024set dummy $tool_basename; ac_word=$2
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15026$as_echo_n "checking for $ac_word... " >&6; }
15027if ${ac_cv_path_CPIO+:} false; then :
15028  $as_echo_n "(cached) " >&6
15029else
15030  case $CPIO in
15031  [\\/]* | ?:[\\/]*)
15032  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15033  ;;
15034  *)
15035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15036for as_dir in $PATH
15037do
15038  IFS=$as_save_IFS
15039  test -z "$as_dir" && as_dir=.
15040    for ac_exec_ext in '' $ac_executable_extensions; do
15041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15042    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15044    break 2
15045  fi
15046done
15047  done
15048IFS=$as_save_IFS
15049
15050  ;;
15051esac
15052fi
15053CPIO=$ac_cv_path_CPIO
15054if test -n "$CPIO"; then
15055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15056$as_echo "$CPIO" >&6; }
15057else
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15059$as_echo "no" >&6; }
15060fi
15061
15062
15063          if test "x$CPIO" = x; then
15064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15065          fi
15066        else
15067          # Otherwise we believe it is a complete path. Use it as it is.
15068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15069$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15071$as_echo_n "checking for CPIO... " >&6; }
15072          if test ! -x "$tool_specified"; then
15073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15074$as_echo "not found" >&6; }
15075            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15076          fi
15077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15078$as_echo "$tool_specified" >&6; }
15079        fi
15080      fi
15081    fi
15082
15083  fi
15084
15085
15086
15087
15088  # Publish this variable in the help.
15089
15090
15091  if [ -z "${NICE+x}" ]; then
15092    # The variable is not set by user, try to locate tool using the code snippet
15093    for ac_prog in nice
15094do
15095  # Extract the first word of "$ac_prog", so it can be a program name with args.
15096set dummy $ac_prog; ac_word=$2
15097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15098$as_echo_n "checking for $ac_word... " >&6; }
15099if ${ac_cv_path_NICE+:} false; then :
15100  $as_echo_n "(cached) " >&6
15101else
15102  case $NICE in
15103  [\\/]* | ?:[\\/]*)
15104  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15105  ;;
15106  *)
15107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15108for as_dir in $PATH
15109do
15110  IFS=$as_save_IFS
15111  test -z "$as_dir" && as_dir=.
15112    for ac_exec_ext in '' $ac_executable_extensions; do
15113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15114    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15116    break 2
15117  fi
15118done
15119  done
15120IFS=$as_save_IFS
15121
15122  ;;
15123esac
15124fi
15125NICE=$ac_cv_path_NICE
15126if test -n "$NICE"; then
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15128$as_echo "$NICE" >&6; }
15129else
15130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15131$as_echo "no" >&6; }
15132fi
15133
15134
15135  test -n "$NICE" && break
15136done
15137
15138  else
15139    # The variable is set, but is it from the command line or the environment?
15140
15141    # Try to remove the string !NICE! from our list.
15142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15144      # If it failed, the variable was not from the command line. Ignore it,
15145      # but warn the user (except for BASH, which is always set by the calling BASH).
15146      if test "xNICE" != xBASH; then
15147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15148$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15149      fi
15150      # Try to locate tool using the code snippet
15151      for ac_prog in nice
15152do
15153  # Extract the first word of "$ac_prog", so it can be a program name with args.
15154set dummy $ac_prog; ac_word=$2
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15156$as_echo_n "checking for $ac_word... " >&6; }
15157if ${ac_cv_path_NICE+:} false; then :
15158  $as_echo_n "(cached) " >&6
15159else
15160  case $NICE in
15161  [\\/]* | ?:[\\/]*)
15162  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15163  ;;
15164  *)
15165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15166for as_dir in $PATH
15167do
15168  IFS=$as_save_IFS
15169  test -z "$as_dir" && as_dir=.
15170    for ac_exec_ext in '' $ac_executable_extensions; do
15171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15172    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15174    break 2
15175  fi
15176done
15177  done
15178IFS=$as_save_IFS
15179
15180  ;;
15181esac
15182fi
15183NICE=$ac_cv_path_NICE
15184if test -n "$NICE"; then
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15186$as_echo "$NICE" >&6; }
15187else
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15189$as_echo "no" >&6; }
15190fi
15191
15192
15193  test -n "$NICE" && break
15194done
15195
15196    else
15197      # If it succeeded, then it was overridden by the user. We will use it
15198      # for the tool.
15199
15200      # First remove it from the list of overridden variables, so we can test
15201      # for unknown variables in the end.
15202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15203
15204      # Check if we try to supply an empty value
15205      if test "x$NICE" = x; then
15206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15207$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15209$as_echo_n "checking for NICE... " >&6; }
15210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15211$as_echo "disabled" >&6; }
15212      else
15213        # Check if the provided tool contains a complete path.
15214        tool_specified="$NICE"
15215        tool_basename="${tool_specified##*/}"
15216        if test "x$tool_basename" = "x$tool_specified"; then
15217          # A command without a complete path is provided, search $PATH.
15218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15219$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15220          # Extract the first word of "$tool_basename", so it can be a program name with args.
15221set dummy $tool_basename; ac_word=$2
15222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15223$as_echo_n "checking for $ac_word... " >&6; }
15224if ${ac_cv_path_NICE+:} false; then :
15225  $as_echo_n "(cached) " >&6
15226else
15227  case $NICE in
15228  [\\/]* | ?:[\\/]*)
15229  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15230  ;;
15231  *)
15232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15233for as_dir in $PATH
15234do
15235  IFS=$as_save_IFS
15236  test -z "$as_dir" && as_dir=.
15237    for ac_exec_ext in '' $ac_executable_extensions; do
15238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15239    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15241    break 2
15242  fi
15243done
15244  done
15245IFS=$as_save_IFS
15246
15247  ;;
15248esac
15249fi
15250NICE=$ac_cv_path_NICE
15251if test -n "$NICE"; then
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15253$as_echo "$NICE" >&6; }
15254else
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15256$as_echo "no" >&6; }
15257fi
15258
15259
15260          if test "x$NICE" = x; then
15261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15262          fi
15263        else
15264          # Otherwise we believe it is a complete path. Use it as it is.
15265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15266$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15268$as_echo_n "checking for NICE... " >&6; }
15269          if test ! -x "$tool_specified"; then
15270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15271$as_echo "not found" >&6; }
15272            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15273          fi
15274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15275$as_echo "$tool_specified" >&6; }
15276        fi
15277      fi
15278    fi
15279
15280  fi
15281
15282
15283
15284
15285# Now we can determine OpenJDK build and target platforms. This is required to
15286# have early on.
15287# Make sure we can run config.sub.
15288$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15289  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15290
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15292$as_echo_n "checking build system type... " >&6; }
15293if ${ac_cv_build+:} false; then :
15294  $as_echo_n "(cached) " >&6
15295else
15296  ac_build_alias=$build_alias
15297test "x$ac_build_alias" = x &&
15298  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15299test "x$ac_build_alias" = x &&
15300  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15301ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15302  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15303
15304fi
15305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15306$as_echo "$ac_cv_build" >&6; }
15307case $ac_cv_build in
15308*-*-*) ;;
15309*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15310esac
15311build=$ac_cv_build
15312ac_save_IFS=$IFS; IFS='-'
15313set x $ac_cv_build
15314shift
15315build_cpu=$1
15316build_vendor=$2
15317shift; shift
15318# Remember, the first character of IFS is used to create $*,
15319# except with old shells:
15320build_os=$*
15321IFS=$ac_save_IFS
15322case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15323
15324
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15326$as_echo_n "checking host system type... " >&6; }
15327if ${ac_cv_host+:} false; then :
15328  $as_echo_n "(cached) " >&6
15329else
15330  if test "x$host_alias" = x; then
15331  ac_cv_host=$ac_cv_build
15332else
15333  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15334    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15335fi
15336
15337fi
15338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15339$as_echo "$ac_cv_host" >&6; }
15340case $ac_cv_host in
15341*-*-*) ;;
15342*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15343esac
15344host=$ac_cv_host
15345ac_save_IFS=$IFS; IFS='-'
15346set x $ac_cv_host
15347shift
15348host_cpu=$1
15349host_vendor=$2
15350shift; shift
15351# Remember, the first character of IFS is used to create $*,
15352# except with old shells:
15353host_os=$*
15354IFS=$ac_save_IFS
15355case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15356
15357
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15359$as_echo_n "checking target system type... " >&6; }
15360if ${ac_cv_target+:} false; then :
15361  $as_echo_n "(cached) " >&6
15362else
15363  if test "x$target_alias" = x; then
15364  ac_cv_target=$ac_cv_host
15365else
15366  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15367    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15368fi
15369
15370fi
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15372$as_echo "$ac_cv_target" >&6; }
15373case $ac_cv_target in
15374*-*-*) ;;
15375*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15376esac
15377target=$ac_cv_target
15378ac_save_IFS=$IFS; IFS='-'
15379set x $ac_cv_target
15380shift
15381target_cpu=$1
15382target_vendor=$2
15383shift; shift
15384# Remember, the first character of IFS is used to create $*,
15385# except with old shells:
15386target_os=$*
15387IFS=$ac_save_IFS
15388case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15389
15390
15391# The aliases save the names the user supplied, while $host etc.
15392# will get canonicalized.
15393test -n "$target_alias" &&
15394  test "$program_prefix$program_suffix$program_transform_name" = \
15395    NONENONEs,x,x, &&
15396  program_prefix=${target_alias}-
15397
15398  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15399  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15400  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15401  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15402  # to use the configure naming style.
15403
15404
15405
15406
15407
15408  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15409  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15410  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15411  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15412  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15413  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15414
15415
15416
15417  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15418
15419  case "$build_os" in
15420    *linux*)
15421      VAR_OS=linux
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *solaris*)
15425      VAR_OS=solaris
15426      VAR_OS_TYPE=unix
15427      ;;
15428    *darwin*)
15429      VAR_OS=macosx
15430      VAR_OS_TYPE=unix
15431      ;;
15432    *bsd*)
15433      VAR_OS=bsd
15434      VAR_OS_TYPE=unix
15435      ;;
15436    *cygwin*)
15437      VAR_OS=windows
15438      VAR_OS_ENV=windows.cygwin
15439      ;;
15440    *mingw*)
15441      VAR_OS=windows
15442      VAR_OS_ENV=windows.msys
15443      ;;
15444    *aix*)
15445      VAR_OS=aix
15446      VAR_OS_TYPE=unix
15447      ;;
15448    *)
15449      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15450      ;;
15451  esac
15452
15453
15454  # First argument is the cpu name from the trip/quad
15455  case "$build_cpu" in
15456    x86_64)
15457      VAR_CPU=x86_64
15458      VAR_CPU_ARCH=x86
15459      VAR_CPU_BITS=64
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    i?86)
15463      VAR_CPU=x86
15464      VAR_CPU_ARCH=x86
15465      VAR_CPU_BITS=32
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    arm*)
15469      VAR_CPU=arm
15470      VAR_CPU_ARCH=arm
15471      VAR_CPU_BITS=32
15472      VAR_CPU_ENDIAN=little
15473      ;;
15474    aarch64)
15475      VAR_CPU=aarch64
15476      VAR_CPU_ARCH=aarch64
15477      VAR_CPU_BITS=64
15478      VAR_CPU_ENDIAN=little
15479      ;;
15480    powerpc)
15481      VAR_CPU=ppc
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=32
15484      VAR_CPU_ENDIAN=big
15485      ;;
15486    powerpc64)
15487      VAR_CPU=ppc64
15488      VAR_CPU_ARCH=ppc
15489      VAR_CPU_BITS=64
15490      VAR_CPU_ENDIAN=big
15491      ;;
15492    powerpc64le)
15493      VAR_CPU=ppc64le
15494      VAR_CPU_ARCH=ppc
15495      VAR_CPU_BITS=64
15496      VAR_CPU_ENDIAN=little
15497      ;;
15498    s390)
15499      VAR_CPU=s390
15500      VAR_CPU_ARCH=s390
15501      VAR_CPU_BITS=32
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    s390x)
15505      VAR_CPU=s390x
15506      VAR_CPU_ARCH=s390
15507      VAR_CPU_BITS=64
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    sparc)
15511      VAR_CPU=sparc
15512      VAR_CPU_ARCH=sparc
15513      VAR_CPU_BITS=32
15514      VAR_CPU_ENDIAN=big
15515      ;;
15516    sparcv9|sparc64)
15517      VAR_CPU=sparcv9
15518      VAR_CPU_ARCH=sparc
15519      VAR_CPU_BITS=64
15520      VAR_CPU_ENDIAN=big
15521      ;;
15522    *)
15523      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15524      ;;
15525  esac
15526
15527  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15528  OPENJDK_BUILD_OS="$VAR_OS"
15529  if test "x$VAR_OS_TYPE" != x; then
15530    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15531  else
15532    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15533  fi
15534  if test "x$VAR_OS_ENV" != x; then
15535    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15536  else
15537    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15538  fi
15539  OPENJDK_BUILD_CPU="$VAR_CPU"
15540  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15541  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15542  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15543
15544
15545
15546
15547
15548
15549
15550
15551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15552$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15554$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15555
15556  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15557
15558  case "$host_os" in
15559    *linux*)
15560      VAR_OS=linux
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *solaris*)
15564      VAR_OS=solaris
15565      VAR_OS_TYPE=unix
15566      ;;
15567    *darwin*)
15568      VAR_OS=macosx
15569      VAR_OS_TYPE=unix
15570      ;;
15571    *bsd*)
15572      VAR_OS=bsd
15573      VAR_OS_TYPE=unix
15574      ;;
15575    *cygwin*)
15576      VAR_OS=windows
15577      VAR_OS_ENV=windows.cygwin
15578      ;;
15579    *mingw*)
15580      VAR_OS=windows
15581      VAR_OS_ENV=windows.msys
15582      ;;
15583    *aix*)
15584      VAR_OS=aix
15585      VAR_OS_TYPE=unix
15586      ;;
15587    *)
15588      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15589      ;;
15590  esac
15591
15592
15593  # First argument is the cpu name from the trip/quad
15594  case "$host_cpu" in
15595    x86_64)
15596      VAR_CPU=x86_64
15597      VAR_CPU_ARCH=x86
15598      VAR_CPU_BITS=64
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    i?86)
15602      VAR_CPU=x86
15603      VAR_CPU_ARCH=x86
15604      VAR_CPU_BITS=32
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    arm*)
15608      VAR_CPU=arm
15609      VAR_CPU_ARCH=arm
15610      VAR_CPU_BITS=32
15611      VAR_CPU_ENDIAN=little
15612      ;;
15613    aarch64)
15614      VAR_CPU=aarch64
15615      VAR_CPU_ARCH=aarch64
15616      VAR_CPU_BITS=64
15617      VAR_CPU_ENDIAN=little
15618      ;;
15619    powerpc)
15620      VAR_CPU=ppc
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=32
15623      VAR_CPU_ENDIAN=big
15624      ;;
15625    powerpc64)
15626      VAR_CPU=ppc64
15627      VAR_CPU_ARCH=ppc
15628      VAR_CPU_BITS=64
15629      VAR_CPU_ENDIAN=big
15630      ;;
15631    powerpc64le)
15632      VAR_CPU=ppc64le
15633      VAR_CPU_ARCH=ppc
15634      VAR_CPU_BITS=64
15635      VAR_CPU_ENDIAN=little
15636      ;;
15637    s390)
15638      VAR_CPU=s390
15639      VAR_CPU_ARCH=s390
15640      VAR_CPU_BITS=32
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    s390x)
15644      VAR_CPU=s390x
15645      VAR_CPU_ARCH=s390
15646      VAR_CPU_BITS=64
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    sparc)
15650      VAR_CPU=sparc
15651      VAR_CPU_ARCH=sparc
15652      VAR_CPU_BITS=32
15653      VAR_CPU_ENDIAN=big
15654      ;;
15655    sparcv9|sparc64)
15656      VAR_CPU=sparcv9
15657      VAR_CPU_ARCH=sparc
15658      VAR_CPU_BITS=64
15659      VAR_CPU_ENDIAN=big
15660      ;;
15661    *)
15662      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15663      ;;
15664  esac
15665
15666  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15667  OPENJDK_TARGET_OS="$VAR_OS"
15668  if test "x$VAR_OS_TYPE" != x; then
15669    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15670  else
15671    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15672  fi
15673  if test "x$VAR_OS_ENV" != x; then
15674    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15675  else
15676    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15677  fi
15678  OPENJDK_TARGET_CPU="$VAR_CPU"
15679  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15680  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15681  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15682
15683
15684
15685
15686
15687
15688
15689
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15691$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15693$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15694
15695
15696
15697# Check whether --with-target-bits was given.
15698if test "${with_target_bits+set}" = set; then :
15699  withval=$with_target_bits;
15700fi
15701
15702
15703  # We have three types of compiles:
15704  # native  == normal compilation, target system == build system
15705  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15706  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15707  #
15708  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15709    # We're doing a proper cross-compilation
15710    COMPILE_TYPE="cross"
15711  else
15712    COMPILE_TYPE="native"
15713  fi
15714
15715  if test "x$with_target_bits" != x; then
15716    if test "x$COMPILE_TYPE" = "xcross"; then
15717      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15718    fi
15719
15720    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15721      # A reduced build is requested
15722      COMPILE_TYPE="reduced"
15723      OPENJDK_TARGET_CPU_BITS=32
15724      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15725        OPENJDK_TARGET_CPU=x86
15726      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15727        OPENJDK_TARGET_CPU=sparc
15728      else
15729        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15730      fi
15731    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15732      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
15733    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15734      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15735$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15736    else
15737      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15738    fi
15739  fi
15740
15741
15742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15743$as_echo_n "checking compilation type... " >&6; }
15744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15745$as_echo "$COMPILE_TYPE" >&6; }
15746
15747
15748  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15749    REQUIRED_OS_NAME=SunOS
15750    REQUIRED_OS_VERSION=5.10
15751  fi
15752  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15753    REQUIRED_OS_NAME=Linux
15754    REQUIRED_OS_VERSION=2.6
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15757    REQUIRED_OS_NAME=Windows
15758    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15759      REQUIRED_OS_VERSION=5.2
15760    else
15761      REQUIRED_OS_VERSION=5.1
15762    fi
15763  fi
15764  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15765    REQUIRED_OS_NAME=Darwin
15766    REQUIRED_OS_VERSION=11.2
15767  fi
15768  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15769    REQUIRED_OS_NAME=AIX
15770    REQUIRED_OS_VERSION=7.1
15771  fi
15772
15773
15774
15775
15776
15777
15778  # Also store the legacy naming of the cpu.
15779  # Ie i586 and amd64 instead of x86 and x86_64
15780  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15781  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15782    OPENJDK_TARGET_CPU_LEGACY="i586"
15783  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15784    # On all platforms except MacOSX replace x86_64 with amd64.
15785    OPENJDK_TARGET_CPU_LEGACY="amd64"
15786  fi
15787
15788
15789  # And the second legacy naming of the cpu.
15790  # Ie i386 and amd64 instead of x86 and x86_64.
15791  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15792  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15793    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15794  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15795    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15796  fi
15797
15798
15799  # This is the name of the cpu (but using i386 and amd64 instead of
15800  # x86 and x86_64, respectively), preceeded by a /, to be used when
15801  # locating libraries. On macosx, it's empty, though.
15802  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15803  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15804    OPENJDK_TARGET_CPU_LIBDIR=""
15805  fi
15806
15807
15808  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15809  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15810  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15811  OPENJDK_TARGET_CPU_ISADIR=""
15812  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15813    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15814      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15815    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15816      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15817    fi
15818  fi
15819
15820
15821  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15822  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15823  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15824    # On linux only, we replace x86 with i386.
15825    OPENJDK_TARGET_CPU_OSARCH="i386"
15826  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15827    # On all platforms except macosx, we replace x86_64 with amd64.
15828    OPENJDK_TARGET_CPU_OSARCH="amd64"
15829  fi
15830
15831
15832  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15833  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15834    OPENJDK_TARGET_CPU_JLI="i386"
15835  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15836    # On all platforms except macosx, we replace x86_64 with amd64.
15837    OPENJDK_TARGET_CPU_JLI="amd64"
15838  fi
15839  # Now setup the -D flags for building libjli.
15840  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15841  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15842    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15843      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15844    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15845      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15846    fi
15847  fi
15848
15849
15850  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15851      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15852  else
15853      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15854  fi
15855
15856
15857  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15858  # Macosx is osx and x86_64 is x64
15859  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15860    OPENJDK_TARGET_OS_BUNDLE="osx"
15861  else
15862    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15863  fi
15864  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15865    OPENJDK_TARGET_CPU_BUNDLE="x64"
15866  else
15867    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15868  fi
15869  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15870
15871
15872
15873
15874  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15875    A_LP64="LP64:="
15876    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15877    # unpack200.exe
15878    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15879      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15880    fi
15881  fi
15882  LP64=$A_LP64
15883
15884
15885  if test "x$COMPILE_TYPE" = "xcross"; then
15886    # FIXME: ... or should this include reduced builds..?
15887    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15888  else
15889    DEFINE_CROSS_COMPILE_ARCH=""
15890  fi
15891
15892
15893  # Convert openjdk platform names to hotspot names
15894
15895  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15896  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15897    HOTSPOT_TARGET_OS=bsd
15898  fi
15899
15900
15901  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15902  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15903    HOTSPOT_TARGET_OS_TYPE=posix
15904  fi
15905
15906
15907  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15908  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15909    HOTSPOT_TARGET_CPU=x86_32
15910  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15911    HOTSPOT_TARGET_CPU=sparc
15912  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15913    HOTSPOT_TARGET_CPU=ppc_64
15914  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15915    HOTSPOT_TARGET_CPU=ppc_64
15916  fi
15917
15918
15919  # This is identical with OPENJDK_*, but define anyway for consistency.
15920  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15921
15922
15923  # Setup HOTSPOT_TARGET_CPU_DEFINE
15924  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15925    HOTSPOT_TARGET_CPU_DEFINE=IA32
15926  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15927    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15928  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15929    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15930  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15931    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15932  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15933    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15934  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15935    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15936
15937  # The cpu defines below are for zero, we don't support them directly.
15938  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15939    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15940  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15941    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15942  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15943    HOTSPOT_TARGET_CPU_DEFINE=S390
15944  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15945    HOTSPOT_TARGET_CPU_DEFINE=S390
15946  fi
15947
15948
15949
15950
15951  # Also store the legacy naming of the cpu.
15952  # Ie i586 and amd64 instead of x86 and x86_64
15953  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15954  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15955    OPENJDK_BUILD_CPU_LEGACY="i586"
15956  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15957    # On all platforms except MacOSX replace x86_64 with amd64.
15958    OPENJDK_BUILD_CPU_LEGACY="amd64"
15959  fi
15960
15961
15962  # And the second legacy naming of the cpu.
15963  # Ie i386 and amd64 instead of x86 and x86_64.
15964  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15965  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15966    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15967  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15968    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15969  fi
15970
15971
15972  # This is the name of the cpu (but using i386 and amd64 instead of
15973  # x86 and x86_64, respectively), preceeded by a /, to be used when
15974  # locating libraries. On macosx, it's empty, though.
15975  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15976  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15977    OPENJDK_BUILD_CPU_LIBDIR=""
15978  fi
15979
15980
15981  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15982  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15983  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15984  OPENJDK_BUILD_CPU_ISADIR=""
15985  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15986    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15987      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15988    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15989      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15990    fi
15991  fi
15992
15993
15994  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15995  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15996  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15997    # On linux only, we replace x86 with i386.
15998    OPENJDK_BUILD_CPU_OSARCH="i386"
15999  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16000    # On all platforms except macosx, we replace x86_64 with amd64.
16001    OPENJDK_BUILD_CPU_OSARCH="amd64"
16002  fi
16003
16004
16005  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16006  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16007    OPENJDK_BUILD_CPU_JLI="i386"
16008  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16009    # On all platforms except macosx, we replace x86_64 with amd64.
16010    OPENJDK_BUILD_CPU_JLI="amd64"
16011  fi
16012  # Now setup the -D flags for building libjli.
16013  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16014  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16015    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16016      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16017    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16018      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16019    fi
16020  fi
16021
16022
16023  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16024      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16025  else
16026      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16027  fi
16028
16029
16030  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16031  # Macosx is osx and x86_64 is x64
16032  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16033    OPENJDK_BUILD_OS_BUNDLE="osx"
16034  else
16035    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16036  fi
16037  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16038    OPENJDK_BUILD_CPU_BUNDLE="x64"
16039  else
16040    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16041  fi
16042  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16043
16044
16045
16046
16047  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16048    A_LP64="LP64:="
16049    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16050    # unpack200.exe
16051    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16052      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16053    fi
16054  fi
16055  LP64=$A_LP64
16056
16057
16058  if test "x$COMPILE_TYPE" = "xcross"; then
16059    # FIXME: ... or should this include reduced builds..?
16060    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16061  else
16062    DEFINE_CROSS_COMPILE_ARCH=""
16063  fi
16064
16065
16066  # Convert openjdk platform names to hotspot names
16067
16068  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16069  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16070    HOTSPOT_BUILD_OS=bsd
16071  fi
16072
16073
16074  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16075  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16076    HOTSPOT_BUILD_OS_TYPE=posix
16077  fi
16078
16079
16080  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16081  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16082    HOTSPOT_BUILD_CPU=x86_32
16083  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16084    HOTSPOT_BUILD_CPU=sparc
16085  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16086    HOTSPOT_BUILD_CPU=ppc_64
16087  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16088    HOTSPOT_BUILD_CPU=ppc_64
16089  fi
16090
16091
16092  # This is identical with OPENJDK_*, but define anyway for consistency.
16093  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16094
16095
16096  # Setup HOTSPOT_BUILD_CPU_DEFINE
16097  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16098    HOTSPOT_BUILD_CPU_DEFINE=IA32
16099  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16101  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16102    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16103  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16104    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16105  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16106    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16109
16110  # The cpu defines below are for zero, we don't support them directly.
16111  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16112    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16113  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16114    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16115  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16116    HOTSPOT_BUILD_CPU_DEFINE=S390
16117  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16118    HOTSPOT_BUILD_CPU_DEFINE=S390
16119  fi
16120
16121
16122
16123
16124  # ZERO_ARCHDEF is used to enable architecture-specific code.
16125  # This is used in legacy hotspot build.
16126  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16127
16128
16129
16130
16131
16132# Continue setting up basic stuff. Most remaining code require fundamental tools.
16133
16134  # Save the current directory this script was started from
16135  CURDIR="$PWD"
16136
16137  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16138  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16139  # was not available at that time.
16140  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16141  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16142    ORIGINAL_PATH="$REWRITTEN_PATH"
16143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16144$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16145  fi
16146
16147  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16148    PATH_SEP=";"
16149
16150  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16151  if test $SRC_ROOT_LENGTH -gt 100; then
16152    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16153  fi
16154
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16157$as_echo_n "checking cygwin release... " >&6; }
16158    CYGWIN_VERSION=`$UNAME -r`
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16160$as_echo "$CYGWIN_VERSION" >&6; }
16161    WINDOWS_ENV_VENDOR='cygwin'
16162    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16163
16164    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16165    if test "x$CYGWIN_VERSION_OLD" != x; then
16166      { $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
16167$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;}
16168      as_fn_error $? "Cannot continue" "$LINENO" 5
16169    fi
16170    if test "x$CYGPATH" = x; then
16171      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16172    fi
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16174$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16175    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16176    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16177    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16178    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16180$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16181    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16182    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16183    if test "x$test_cygdrive_prefix" = x; then
16184      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16185    fi
16186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16188$as_echo_n "checking msys release... " >&6; }
16189    MSYS_VERSION=`$UNAME -r`
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16191$as_echo "$MSYS_VERSION" >&6; }
16192
16193    WINDOWS_ENV_VENDOR='msys'
16194    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16195
16196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16197$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16198    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16199    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16200
16201  windows_path="$MSYS_ROOT_PATH"
16202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16203    unix_path=`$CYGPATH -u "$windows_path"`
16204    MSYS_ROOT_PATH="$unix_path"
16205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16207    MSYS_ROOT_PATH="$unix_path"
16208  fi
16209
16210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16211$as_echo "$MSYS_ROOT_PATH" >&6; }
16212    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16213  else
16214    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16215  fi
16216
16217  # Test if windows or unix (cygwin/msys) find is first in path.
16218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16219$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16220  FIND_BINARY_OUTPUT=`find --version 2>&1`
16221  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16223$as_echo "unix style" >&6; }
16224  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16226$as_echo "Windows" >&6; }
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16228$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16229    { $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
16230$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16231    as_fn_error $? "Cannot continue" "$LINENO" 5
16232  else
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16234$as_echo "unknown" >&6; }
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16236$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16237  fi
16238
16239  else
16240    PATH_SEP=":"
16241  fi
16242
16243
16244  # We get the top-level directory from the supporting wrappers.
16245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16246$as_echo_n "checking for top-level directory... " >&6; }
16247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16248$as_echo "$TOPDIR" >&6; }
16249
16250
16251  # Save the original version of TOPDIR for string comparisons
16252  ORIGINAL_TOPDIR="$TOPDIR"
16253
16254
16255  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16256
16257  # Only process if variable expands to non-empty
16258
16259  if test "x$CURDIR" != x; then
16260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16261
16262  # Input might be given as Windows format, start by converting to
16263  # unix format.
16264  path="$CURDIR"
16265  new_path=`$CYGPATH -u "$path"`
16266
16267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16270  # "foo.exe" is OK but "foo" is an error.
16271  #
16272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16273  # It is also a way to make sure we got the proper file name for the real test later on.
16274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16275  if test "x$test_shortpath" = x; then
16276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16277$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16278    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16279  fi
16280
16281  # Call helper function which possibly converts this using DOS-style short mode.
16282  # If so, the updated path is stored in $new_path.
16283
16284  input_path="$new_path"
16285  # Check if we need to convert this using DOS-style short mode. If the path
16286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16287  # take no chances and rewrite it.
16288  # Note: m4 eats our [], so we need to use [ and ] instead.
16289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16290  if test "x$has_forbidden_chars" != x; then
16291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16295      # Going to short mode and back again did indeed matter. Since short mode is
16296      # case insensitive, let's make it lowercase to improve readability.
16297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16298      # Now convert it back to Unix-style (cygpath)
16299      input_path=`$CYGPATH -u "$shortmode_path"`
16300      new_path="$input_path"
16301    fi
16302  fi
16303
16304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16305  if test "x$test_cygdrive_prefix" = x; then
16306    # As a simple fix, exclude /usr/bin since it's not a real path.
16307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16309      # a path prefixed by /cygdrive for fixpath to work.
16310      new_path="$CYGWIN_ROOT_PATH$input_path"
16311    fi
16312  fi
16313
16314
16315  if test "x$path" != "x$new_path"; then
16316    CURDIR="$new_path"
16317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16318$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16319  fi
16320
16321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16322
16323  path="$CURDIR"
16324  has_colon=`$ECHO $path | $GREP ^.:`
16325  new_path="$path"
16326  if test "x$has_colon" = x; then
16327    # Not in mixed or Windows style, start by that.
16328    new_path=`cmd //c echo $path`
16329  fi
16330
16331
16332  input_path="$new_path"
16333  # Check if we need to convert this using DOS-style short mode. If the path
16334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16335  # take no chances and rewrite it.
16336  # Note: m4 eats our [], so we need to use [ and ] instead.
16337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16338  if test "x$has_forbidden_chars" != x; then
16339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16341  fi
16342
16343
16344  windows_path="$new_path"
16345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16346    unix_path=`$CYGPATH -u "$windows_path"`
16347    new_path="$unix_path"
16348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16350    new_path="$unix_path"
16351  fi
16352
16353  if test "x$path" != "x$new_path"; then
16354    CURDIR="$new_path"
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16356$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16357  fi
16358
16359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16361
16362    else
16363      # We're on a unix platform. Hooray! :)
16364      path="$CURDIR"
16365      has_space=`$ECHO "$path" | $GREP " "`
16366      if test "x$has_space" != x; then
16367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16368$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16370      fi
16371
16372      # Use eval to expand a potential ~
16373      eval path="$path"
16374      if test ! -f "$path" && test ! -d "$path"; then
16375        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16376      fi
16377
16378      if test -d "$path"; then
16379        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16380      else
16381        dir="`$DIRNAME "$path"`"
16382        base="`$BASENAME "$path"`"
16383        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16384      fi
16385    fi
16386  fi
16387
16388
16389  # Only process if variable expands to non-empty
16390
16391  if test "x$TOPDIR" != x; then
16392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16393
16394  # Input might be given as Windows format, start by converting to
16395  # unix format.
16396  path="$TOPDIR"
16397  new_path=`$CYGPATH -u "$path"`
16398
16399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16402  # "foo.exe" is OK but "foo" is an error.
16403  #
16404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16405  # It is also a way to make sure we got the proper file name for the real test later on.
16406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16407  if test "x$test_shortpath" = x; then
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16409$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16410    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16411  fi
16412
16413  # Call helper function which possibly converts this using DOS-style short mode.
16414  # If so, the updated path is stored in $new_path.
16415
16416  input_path="$new_path"
16417  # Check if we need to convert this using DOS-style short mode. If the path
16418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16419  # take no chances and rewrite it.
16420  # Note: m4 eats our [], so we need to use [ and ] instead.
16421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16422  if test "x$has_forbidden_chars" != x; then
16423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16427      # Going to short mode and back again did indeed matter. Since short mode is
16428      # case insensitive, let's make it lowercase to improve readability.
16429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16430      # Now convert it back to Unix-style (cygpath)
16431      input_path=`$CYGPATH -u "$shortmode_path"`
16432      new_path="$input_path"
16433    fi
16434  fi
16435
16436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16437  if test "x$test_cygdrive_prefix" = x; then
16438    # As a simple fix, exclude /usr/bin since it's not a real path.
16439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16441      # a path prefixed by /cygdrive for fixpath to work.
16442      new_path="$CYGWIN_ROOT_PATH$input_path"
16443    fi
16444  fi
16445
16446
16447  if test "x$path" != "x$new_path"; then
16448    TOPDIR="$new_path"
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16450$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16451  fi
16452
16453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16454
16455  path="$TOPDIR"
16456  has_colon=`$ECHO $path | $GREP ^.:`
16457  new_path="$path"
16458  if test "x$has_colon" = x; then
16459    # Not in mixed or Windows style, start by that.
16460    new_path=`cmd //c echo $path`
16461  fi
16462
16463
16464  input_path="$new_path"
16465  # Check if we need to convert this using DOS-style short mode. If the path
16466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16467  # take no chances and rewrite it.
16468  # Note: m4 eats our [], so we need to use [ and ] instead.
16469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16470  if test "x$has_forbidden_chars" != x; then
16471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16473  fi
16474
16475
16476  windows_path="$new_path"
16477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16478    unix_path=`$CYGPATH -u "$windows_path"`
16479    new_path="$unix_path"
16480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16482    new_path="$unix_path"
16483  fi
16484
16485  if test "x$path" != "x$new_path"; then
16486    TOPDIR="$new_path"
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16488$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16489  fi
16490
16491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16493
16494    else
16495      # We're on a unix platform. Hooray! :)
16496      path="$TOPDIR"
16497      has_space=`$ECHO "$path" | $GREP " "`
16498      if test "x$has_space" != x; then
16499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16500$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16502      fi
16503
16504      # Use eval to expand a potential ~
16505      eval path="$path"
16506      if test ! -f "$path" && test ! -d "$path"; then
16507        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16508      fi
16509
16510      if test -d "$path"; then
16511        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16512      else
16513        dir="`$DIRNAME "$path"`"
16514        base="`$BASENAME "$path"`"
16515        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16516      fi
16517    fi
16518  fi
16519
16520  # SRC_ROOT is a traditional alias for TOPDIR.
16521  SRC_ROOT=$TOPDIR
16522
16523  # Calculate a canonical version of TOPDIR for string comparisons
16524  CANONICAL_TOPDIR=$TOPDIR
16525
16526  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16527    # Follow a chain of symbolic links. Use readlink
16528    # where it exists, else fall back to horribly
16529    # complicated shell code.
16530    if test "x$READLINK_TESTED" != yes; then
16531      # On MacOSX there is a readlink tool with a different
16532      # purpose than the GNU readlink tool. Check the found readlink.
16533      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16534      if test "x$ISGNU" = x; then
16535        # A readlink that we do not know how to use.
16536        # Are there other non-GNU readlinks out there?
16537        READLINK_TESTED=yes
16538        READLINK=
16539      fi
16540    fi
16541
16542    if test "x$READLINK" != x; then
16543      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16544    else
16545      # Save the current directory for restoring afterwards
16546      STARTDIR=$PWD
16547      COUNTER=0
16548      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16549      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16550      cd $sym_link_dir
16551      # Use -P flag to resolve symlinks in directories.
16552      cd `$THEPWDCMD -P`
16553      sym_link_dir=`$THEPWDCMD -P`
16554      # Resolve file symlinks
16555      while test $COUNTER -lt 20; do
16556        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16557        if test "x$ISLINK" == x; then
16558          # This is not a symbolic link! We are done!
16559          break
16560        fi
16561        # Again resolve directory symlinks since the target of the just found
16562        # link could be in a different directory
16563        cd `$DIRNAME $ISLINK`
16564        sym_link_dir=`$THEPWDCMD -P`
16565        sym_link_file=`$BASENAME $ISLINK`
16566        let COUNTER=COUNTER+1
16567      done
16568      cd $STARTDIR
16569      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16570    fi
16571  fi
16572
16573
16574
16575  # Locate the directory of this script.
16576  AUTOCONF_DIR=$TOPDIR/common/autoconf
16577
16578  # Setup username (for use in adhoc version strings etc)
16579  # Outer [ ] to quote m4.
16580   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16581
16582
16583
16584# Check if it's a pure open build or if custom sources are to be used.
16585
16586  # Check whether --enable-openjdk-only was given.
16587if test "${enable_openjdk_only+set}" = set; then :
16588  enableval=$enable_openjdk_only;
16589else
16590  enable_openjdk_only="no"
16591fi
16592
16593
16594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16595$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16597$as_echo "$enable_openjdk_only" >&6; }
16598  if test "x$enable_openjdk_only" = "xyes"; then
16599    SUPPRESS_CUSTOM_EXTENSIONS="true"
16600  elif test "x$enable_openjdk_only" = "xno"; then
16601    SUPPRESS_CUSTOM_EXTENSIONS="false"
16602  else
16603    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16604  fi
16605
16606  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16607  # the IncludeCustomExtension macro.
16608
16609
16610# Check whether --with-custom-make-dir was given.
16611if test "${with_custom_make_dir+set}" = set; then :
16612  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
16613$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16614fi
16615
16616
16617
16618
16619# These are needed to be able to create a configuration name (and thus the output directory)
16620
16621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16622$as_echo_n "checking which variant of the JDK to build... " >&6; }
16623
16624# Check whether --with-jdk-variant was given.
16625if test "${with_jdk_variant+set}" = set; then :
16626  withval=$with_jdk_variant;
16627fi
16628
16629
16630  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16631    JDK_VARIANT="normal"
16632  else
16633    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16634  fi
16635
16636
16637
16638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16639$as_echo "$JDK_VARIANT" >&6; }
16640
16641
16642  DEBUG_LEVEL="release"
16643  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16644$as_echo_n "checking which debug level to use... " >&6; }
16645  # Check whether --enable-debug was given.
16646if test "${enable_debug+set}" = set; then :
16647  enableval=$enable_debug;
16648        ENABLE_DEBUG="${enableval}"
16649        DEBUG_LEVEL="fastdebug"
16650
16651else
16652  ENABLE_DEBUG="no"
16653fi
16654
16655
16656
16657# Check whether --with-debug-level was given.
16658if test "${with_debug_level+set}" = set; then :
16659  withval=$with_debug_level;
16660        DEBUG_LEVEL="${withval}"
16661        if test "x$ENABLE_DEBUG" = xyes; then
16662          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16663        fi
16664
16665fi
16666
16667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16668$as_echo "$DEBUG_LEVEL" >&6; }
16669
16670  if test "x$DEBUG_LEVEL" != xrelease && \
16671      test "x$DEBUG_LEVEL" != xoptimized && \
16672      test "x$DEBUG_LEVEL" != xfastdebug && \
16673      test "x$DEBUG_LEVEL" != xslowdebug; then
16674    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16675  fi
16676
16677  # Translate DEBUG_LEVEL to debug level used by Hotspot
16678  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16679  if test "x$DEBUG_LEVEL" = xrelease; then
16680    HOTSPOT_DEBUG_LEVEL="product"
16681  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16682    HOTSPOT_DEBUG_LEVEL="debug"
16683  fi
16684
16685  if test "x$DEBUG_LEVEL" = xoptimized; then
16686    # The debug level 'optimized' is a little special because it is currently only
16687    # applicable to the HotSpot build where it means to build a completely
16688    # optimized version of the VM without any debugging code (like for the
16689    # 'release' debug level which is called 'product' in the HotSpot build) but
16690    # with the exception that it can contain additional code which is otherwise
16691    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16692    # test new and/or experimental features which are not intended for customer
16693    # shipment. Because these new features need to be tested and benchmarked in
16694    # real world scenarios, we want to build the containing JDK at the 'release'
16695    # debug level.
16696    DEBUG_LEVEL="release"
16697  fi
16698
16699
16700
16701
16702
16703
16704# Check whether --with-jvm-variants was given.
16705if test "${with_jvm_variants+set}" = set; then :
16706  withval=$with_jvm_variants;
16707fi
16708
16709
16710  if test "x$with_jvm_variants" = x; then
16711    with_jvm_variants="server"
16712  fi
16713  JVM_VARIANTS_OPT="$with_jvm_variants"
16714
16715  # Has the user listed more than one variant?
16716  # Additional [] needed to keep m4 from mangling shell constructs.
16717  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16718    BUILDING_MULTIPLE_JVM_VARIANTS=true
16719  else
16720    BUILDING_MULTIPLE_JVM_VARIANTS=false
16721  fi
16722  # Replace the commas with AND for use in the build directory name.
16723  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16724
16725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16726$as_echo_n "checking which variants of the JVM to build... " >&6; }
16727  # JVM_VARIANTS is a space-separated list.
16728  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16729  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16731$as_echo "$JVM_VARIANTS" >&6; }
16732
16733  # Check that the selected variants are valid
16734
16735  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16736  # Notice that the original variant failes on SLES 10 and 11
16737  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16738  STACK=${JVM_VARIANTS// /$'\n'}
16739  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16740  if test "x$INVALID_VARIANTS" != x; then
16741    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16742$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16743    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16744  fi
16745
16746  # All "special" variants share the same output directory ("server")
16747  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16748  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16749  STACK=${JVM_VARIANTS// /$'\n'}
16750  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16751  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16752    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16753  fi
16754
16755
16756
16757
16758  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16759    # zero behaves as a platform and rewrites these values. This is really weird. :(
16760    # We are guaranteed that we do not build any other variants when building zero.
16761    HOTSPOT_TARGET_CPU=zero
16762    HOTSPOT_TARGET_CPU_ARCH=zero
16763  fi
16764
16765
16766# With basic setup done, call the custom early hook.
16767
16768
16769# Check if we have devkits, extra paths or sysroot set.
16770
16771
16772# Check whether --with-devkit was given.
16773if test "${with_devkit+set}" = set; then :
16774  withval=$with_devkit;
16775
16776  # Only process if variable expands to non-empty
16777
16778  if test "x$with_devkit" != x; then
16779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16780
16781  # Input might be given as Windows format, start by converting to
16782  # unix format.
16783  path="$with_devkit"
16784  new_path=`$CYGPATH -u "$path"`
16785
16786  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16787  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16788  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16789  # "foo.exe" is OK but "foo" is an error.
16790  #
16791  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16792  # It is also a way to make sure we got the proper file name for the real test later on.
16793  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16794  if test "x$test_shortpath" = x; then
16795    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16796$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16797    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16798  fi
16799
16800  # Call helper function which possibly converts this using DOS-style short mode.
16801  # If so, the updated path is stored in $new_path.
16802
16803  input_path="$new_path"
16804  # Check if we need to convert this using DOS-style short mode. If the path
16805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16806  # take no chances and rewrite it.
16807  # Note: m4 eats our [], so we need to use [ and ] instead.
16808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16809  if test "x$has_forbidden_chars" != x; then
16810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16814      # Going to short mode and back again did indeed matter. Since short mode is
16815      # case insensitive, let's make it lowercase to improve readability.
16816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16817      # Now convert it back to Unix-style (cygpath)
16818      input_path=`$CYGPATH -u "$shortmode_path"`
16819      new_path="$input_path"
16820    fi
16821  fi
16822
16823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16824  if test "x$test_cygdrive_prefix" = x; then
16825    # As a simple fix, exclude /usr/bin since it's not a real path.
16826    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16828      # a path prefixed by /cygdrive for fixpath to work.
16829      new_path="$CYGWIN_ROOT_PATH$input_path"
16830    fi
16831  fi
16832
16833
16834  if test "x$path" != "x$new_path"; then
16835    with_devkit="$new_path"
16836    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16837$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16838  fi
16839
16840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16841
16842  path="$with_devkit"
16843  has_colon=`$ECHO $path | $GREP ^.:`
16844  new_path="$path"
16845  if test "x$has_colon" = x; then
16846    # Not in mixed or Windows style, start by that.
16847    new_path=`cmd //c echo $path`
16848  fi
16849
16850
16851  input_path="$new_path"
16852  # Check if we need to convert this using DOS-style short mode. If the path
16853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16854  # take no chances and rewrite it.
16855  # Note: m4 eats our [], so we need to use [ and ] instead.
16856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16857  if test "x$has_forbidden_chars" != x; then
16858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16859    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16860  fi
16861
16862
16863  windows_path="$new_path"
16864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16865    unix_path=`$CYGPATH -u "$windows_path"`
16866    new_path="$unix_path"
16867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16869    new_path="$unix_path"
16870  fi
16871
16872  if test "x$path" != "x$new_path"; then
16873    with_devkit="$new_path"
16874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16875$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16876  fi
16877
16878  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16879  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16880
16881    else
16882      # We're on a unix platform. Hooray! :)
16883      path="$with_devkit"
16884      has_space=`$ECHO "$path" | $GREP " "`
16885      if test "x$has_space" != x; then
16886        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16887$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16888        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16889      fi
16890
16891      # Use eval to expand a potential ~
16892      eval path="$path"
16893      if test ! -f "$path" && test ! -d "$path"; then
16894        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16895      fi
16896
16897      if test -d "$path"; then
16898        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16899      else
16900        dir="`$DIRNAME "$path"`"
16901        base="`$BASENAME "$path"`"
16902        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16903      fi
16904    fi
16905  fi
16906
16907        DEVKIT_ROOT="$with_devkit"
16908        # Check for a meta data info file in the root of the devkit
16909        if test -f "$DEVKIT_ROOT/devkit.info"; then
16910          . $DEVKIT_ROOT/devkit.info
16911          # This potentially sets the following:
16912          # A descriptive name of the devkit
16913
16914  if test "x$DEVKIT_NAME" = x; then
16915    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16916  fi
16917
16918          # Corresponds to --with-extra-path
16919
16920  if test "x$DEVKIT_EXTRA_PATH" = x; then
16921    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16922  fi
16923
16924          # Corresponds to --with-toolchain-path
16925
16926  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16927    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16928  fi
16929
16930          # Corresponds to --with-sysroot
16931
16932  if test "x$DEVKIT_SYSROOT" = x; then
16933    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16934  fi
16935
16936
16937          # Identifies the Visual Studio version in the devkit
16938
16939  if test "x$DEVKIT_VS_VERSION" = x; then
16940    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16941  fi
16942
16943          # The Visual Studio include environment variable
16944
16945  if test "x$DEVKIT_VS_INCLUDE" = x; then
16946    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16947  fi
16948
16949          # The Visual Studio lib environment variable
16950
16951  if test "x$DEVKIT_VS_LIB" = x; then
16952    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16953  fi
16954
16955          # Corresponds to --with-msvcr-dll
16956
16957  if test "x$DEVKIT_MSVCR_DLL" = x; then
16958    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16959  fi
16960
16961          # Corresponds to --with-msvcp-dll
16962
16963  if test "x$DEVKIT_MSVCP_DLL" = x; then
16964    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16965  fi
16966
16967        fi
16968
16969        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16970$as_echo_n "checking for devkit... " >&6; }
16971        if test "x$DEVKIT_NAME" != x; then
16972          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16973$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16974        else
16975          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16976$as_echo "$DEVKIT_ROOT" >&6; }
16977        fi
16978
16979
16980  if test "x$DEVKIT_EXTRA_PATH" != x; then
16981    if test "x$EXTRA_PATH" = x; then
16982      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16983    else
16984      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16985    fi
16986  fi
16987
16988
16989        # Fallback default of just /bin if DEVKIT_PATH is not defined
16990        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16991          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16992        fi
16993
16994  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16995    if test "x$TOOLCHAIN_PATH" = x; then
16996      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16997    else
16998      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16999    fi
17000  fi
17001
17002
17003        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17004        # places for backwards compatiblity.
17005        if test "x$DEVKIT_SYSROOT" != x; then
17006          SYSROOT="$DEVKIT_SYSROOT"
17007        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17008          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17009        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17010          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17011        fi
17012
17013
17014fi
17015
17016
17017  # You can force the sysroot if the sysroot encoded into the compiler tools
17018  # is not correct.
17019
17020# Check whether --with-sys-root was given.
17021if test "${with_sys_root+set}" = set; then :
17022  withval=$with_sys_root; SYSROOT=$with_sys_root
17023
17024fi
17025
17026
17027
17028# Check whether --with-sysroot was given.
17029if test "${with_sysroot+set}" = set; then :
17030  withval=$with_sysroot; SYSROOT=$with_sysroot
17031
17032fi
17033
17034
17035
17036# Check whether --with-tools-dir was given.
17037if test "${with_tools_dir+set}" = set; then :
17038  withval=$with_tools_dir;
17039  if test "x$with_tools_dir" != x; then
17040    if test "x$TOOLCHAIN_PATH" = x; then
17041      TOOLCHAIN_PATH="$with_tools_dir"
17042    else
17043      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17044    fi
17045  fi
17046
17047
17048fi
17049
17050
17051
17052# Check whether --with-toolchain-path was given.
17053if test "${with_toolchain_path+set}" = set; then :
17054  withval=$with_toolchain_path;
17055  if test "x$with_toolchain_path" != x; then
17056    if test "x$TOOLCHAIN_PATH" = x; then
17057      TOOLCHAIN_PATH="$with_toolchain_path"
17058    else
17059      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17060    fi
17061  fi
17062
17063
17064fi
17065
17066
17067
17068# Check whether --with-extra-path was given.
17069if test "${with_extra_path+set}" = set; then :
17070  withval=$with_extra_path;
17071  if test "x$with_extra_path" != x; then
17072    if test "x$EXTRA_PATH" = x; then
17073      EXTRA_PATH="$with_extra_path"
17074    else
17075      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17076    fi
17077  fi
17078
17079
17080fi
17081
17082
17083  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17084    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17085    # If not, detect if Xcode is installed by running xcodebuild -version
17086    # if no Xcode installed, xcodebuild exits with 1
17087    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17088    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17089      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17090      # fall back on the stub binary in /usr/bin/xcodebuild
17091      # Extract the first word of "xcodebuild", so it can be a program name with args.
17092set dummy xcodebuild; ac_word=$2
17093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17094$as_echo_n "checking for $ac_word... " >&6; }
17095if ${ac_cv_path_XCODEBUILD+:} false; then :
17096  $as_echo_n "(cached) " >&6
17097else
17098  case $XCODEBUILD in
17099  [\\/]* | ?:[\\/]*)
17100  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17101  ;;
17102  *)
17103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17104for as_dir in $TOOLCHAIN_PATH
17105do
17106  IFS=$as_save_IFS
17107  test -z "$as_dir" && as_dir=.
17108    for ac_exec_ext in '' $ac_executable_extensions; do
17109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17110    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17112    break 2
17113  fi
17114done
17115  done
17116IFS=$as_save_IFS
17117
17118  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17119  ;;
17120esac
17121fi
17122XCODEBUILD=$ac_cv_path_XCODEBUILD
17123if test -n "$XCODEBUILD"; then
17124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17125$as_echo "$XCODEBUILD" >&6; }
17126else
17127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17128$as_echo "no" >&6; }
17129fi
17130
17131
17132    else
17133      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17134      # when only the command line tools are installed there are no SDKs, so headers
17135      # are copied into the system frameworks
17136      XCODEBUILD=
17137
17138    fi
17139
17140    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17141$as_echo_n "checking for sdk name... " >&6; }
17142
17143# Check whether --with-sdk-name was given.
17144if test "${with_sdk_name+set}" = set; then :
17145  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17146
17147fi
17148
17149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17150$as_echo "$SDKNAME" >&6; }
17151
17152    # if toolchain path is specified then don't rely on system headers, they may not compile
17153    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17154    test -z "$TOOLCHAIN_PATH" && \
17155      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17156
17157    if test -z "$SYSROOT"; then
17158      if test -n "$XCODEBUILD"; then
17159        # if we don't have system headers, use default SDK name (last resort)
17160        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17161          SDKNAME=${SDKNAME:-macosx}
17162        fi
17163
17164        if test -n "$SDKNAME"; then
17165          # Call xcodebuild to determine SYSROOT
17166          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17167        fi
17168      else
17169        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17170          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
17171        fi
17172      fi
17173    else
17174      # warn user if --with-sdk-name was also set
17175      if test -n "$with_sdk_name"; then
17176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17177$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17178      fi
17179    fi
17180
17181    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17182      # If no system framework headers, then SYSROOT must be set, or we won't build
17183      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
17184    fi
17185
17186    # Perform a basic sanity test
17187    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17188      if test -z "$SYSROOT"; then
17189        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
17190      else
17191        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17192      fi
17193    fi
17194
17195    # set SDKROOT too, Xcode tools will pick it up
17196    SDKROOT=$SYSROOT
17197
17198  fi
17199
17200  # Prepend the extra path to the global path
17201
17202  if test "x$EXTRA_PATH" != x; then
17203    if test "x$PATH" = x; then
17204      PATH="$EXTRA_PATH"
17205    else
17206      PATH="$EXTRA_PATH:$PATH"
17207    fi
17208  fi
17209
17210
17211  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17212    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17213    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17214  fi
17215
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17217$as_echo_n "checking for sysroot... " >&6; }
17218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17219$as_echo "$SYSROOT" >&6; }
17220  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17221$as_echo_n "checking for toolchain path... " >&6; }
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17223$as_echo "$TOOLCHAIN_PATH" >&6; }
17224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17225$as_echo_n "checking for extra path... " >&6; }
17226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17227$as_echo "$EXTRA_PATH" >&6; }
17228
17229
17230# To properly create a configuration name, we need to have the OpenJDK target
17231# and options (variants and debug level) parsed.
17232
17233
17234
17235# Check whether --with-conf-name was given.
17236if test "${with_conf_name+set}" = set; then :
17237  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17238fi
17239
17240
17241  # Test from where we are running configure, in or outside of src root.
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17243$as_echo_n "checking where to store configuration... " >&6; }
17244  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17245      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17246      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17247    # We are running configure from the src root.
17248    # Create a default ./build/target-variant-debuglevel output root.
17249    if test "x${CONF_NAME}" = x; then
17250      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17251$as_echo "in default location" >&6; }
17252      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17253    else
17254      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17255$as_echo "in build directory with custom name" >&6; }
17256    fi
17257    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17258    $MKDIR -p "$OUTPUT_ROOT"
17259    if test ! -d "$OUTPUT_ROOT"; then
17260      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17261    fi
17262  else
17263    # We are running configure from outside of the src dir.
17264    # Then use the current directory as output dir!
17265    # If configuration is situated in normal build directory, just use the build
17266    # directory name as configuration name, otherwise use the complete path.
17267    if test "x${CONF_NAME}" = x; then
17268      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17269    fi
17270    OUTPUT_ROOT="$CURDIR"
17271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17272$as_echo "in current directory" >&6; }
17273
17274    # WARNING: This might be a bad thing to do. You need to be sure you want to
17275    # have a configuration in this directory. Do some sanity checks!
17276
17277    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17278      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17279      # other files
17280      files_present=`$LS $OUTPUT_ROOT`
17281      # Configure has already touched config.log and confdefs.h in the current dir when this check
17282      # is performed.
17283      filtered_files=`$ECHO "$files_present" \
17284          | $SED -e 's/config.log//g' \
17285              -e 's/configure.log//g' \
17286              -e 's/confdefs.h//g' \
17287              -e 's/ //g' \
17288          | $TR -d '\n'`
17289      if test "x$filtered_files" != x; then
17290        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17291$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17292        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17293$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17294        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17295$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17296        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17297$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17298        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17299$as_echo "$as_me: seriously mess up just about everything." >&6;}
17300        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17301$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17302        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17303$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17304        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17305      fi
17306    fi
17307  fi
17308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17309$as_echo_n "checking what configuration name to use... " >&6; }
17310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17311$as_echo "$CONF_NAME" >&6; }
17312
17313
17314  # Only process if variable expands to non-empty
17315
17316  if test "x$OUTPUT_ROOT" != x; then
17317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17318
17319  # Input might be given as Windows format, start by converting to
17320  # unix format.
17321  path="$OUTPUT_ROOT"
17322  new_path=`$CYGPATH -u "$path"`
17323
17324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17327  # "foo.exe" is OK but "foo" is an error.
17328  #
17329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17330  # It is also a way to make sure we got the proper file name for the real test later on.
17331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17332  if test "x$test_shortpath" = x; then
17333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17334$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17335    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17336  fi
17337
17338  # Call helper function which possibly converts this using DOS-style short mode.
17339  # If so, the updated path is stored in $new_path.
17340
17341  input_path="$new_path"
17342  # Check if we need to convert this using DOS-style short mode. If the path
17343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17344  # take no chances and rewrite it.
17345  # Note: m4 eats our [], so we need to use [ and ] instead.
17346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17347  if test "x$has_forbidden_chars" != x; then
17348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17352      # Going to short mode and back again did indeed matter. Since short mode is
17353      # case insensitive, let's make it lowercase to improve readability.
17354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17355      # Now convert it back to Unix-style (cygpath)
17356      input_path=`$CYGPATH -u "$shortmode_path"`
17357      new_path="$input_path"
17358    fi
17359  fi
17360
17361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17362  if test "x$test_cygdrive_prefix" = x; then
17363    # As a simple fix, exclude /usr/bin since it's not a real path.
17364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17366      # a path prefixed by /cygdrive for fixpath to work.
17367      new_path="$CYGWIN_ROOT_PATH$input_path"
17368    fi
17369  fi
17370
17371
17372  if test "x$path" != "x$new_path"; then
17373    OUTPUT_ROOT="$new_path"
17374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17375$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17376  fi
17377
17378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17379
17380  path="$OUTPUT_ROOT"
17381  has_colon=`$ECHO $path | $GREP ^.:`
17382  new_path="$path"
17383  if test "x$has_colon" = x; then
17384    # Not in mixed or Windows style, start by that.
17385    new_path=`cmd //c echo $path`
17386  fi
17387
17388
17389  input_path="$new_path"
17390  # Check if we need to convert this using DOS-style short mode. If the path
17391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17392  # take no chances and rewrite it.
17393  # Note: m4 eats our [], so we need to use [ and ] instead.
17394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17395  if test "x$has_forbidden_chars" != x; then
17396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17398  fi
17399
17400
17401  windows_path="$new_path"
17402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17403    unix_path=`$CYGPATH -u "$windows_path"`
17404    new_path="$unix_path"
17405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17407    new_path="$unix_path"
17408  fi
17409
17410  if test "x$path" != "x$new_path"; then
17411    OUTPUT_ROOT="$new_path"
17412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17413$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17414  fi
17415
17416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17418
17419    else
17420      # We're on a unix platform. Hooray! :)
17421      path="$OUTPUT_ROOT"
17422      has_space=`$ECHO "$path" | $GREP " "`
17423      if test "x$has_space" != x; then
17424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17425$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17427      fi
17428
17429      # Use eval to expand a potential ~
17430      eval path="$path"
17431      if test ! -f "$path" && test ! -d "$path"; then
17432        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17433      fi
17434
17435      if test -d "$path"; then
17436        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17437      else
17438        dir="`$DIRNAME "$path"`"
17439        base="`$BASENAME "$path"`"
17440        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17441      fi
17442    fi
17443  fi
17444
17445
17446  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17447  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17448
17449  SPEC=$OUTPUT_ROOT/spec.gmk
17450
17451  CONF_NAME=$CONF_NAME
17452
17453  OUTPUT_ROOT=$OUTPUT_ROOT
17454
17455
17456
17457  # The spec.gmk file contains all variables for the make system.
17458  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17459
17460  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17461  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17462
17463  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17464  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17465
17466  # The compare.sh is used to compare the build output to other builds.
17467  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17468
17469  # The generated Makefile knows where the spec.gmk is and where the source is.
17470  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17471  # which will look for generated configurations
17472  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17473
17474
17475
17476# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17477
17478  for ac_prog in apt-get yum port pkgutil pkgadd
17479do
17480  # Extract the first word of "$ac_prog", so it can be a program name with args.
17481set dummy $ac_prog; ac_word=$2
17482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17483$as_echo_n "checking for $ac_word... " >&6; }
17484if ${ac_cv_prog_PKGHANDLER+:} false; then :
17485  $as_echo_n "(cached) " >&6
17486else
17487  if test -n "$PKGHANDLER"; then
17488  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17489else
17490as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17491for as_dir in $PATH
17492do
17493  IFS=$as_save_IFS
17494  test -z "$as_dir" && as_dir=.
17495    for ac_exec_ext in '' $ac_executable_extensions; do
17496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17497    ac_cv_prog_PKGHANDLER="$ac_prog"
17498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17499    break 2
17500  fi
17501done
17502  done
17503IFS=$as_save_IFS
17504
17505fi
17506fi
17507PKGHANDLER=$ac_cv_prog_PKGHANDLER
17508if test -n "$PKGHANDLER"; then
17509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17510$as_echo "$PKGHANDLER" >&6; }
17511else
17512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17513$as_echo "no" >&6; }
17514fi
17515
17516
17517  test -n "$PKGHANDLER" && break
17518done
17519
17520
17521
17522# Setup tools that requires more complex handling, or that is not needed by the configure script.
17523
17524
17525
17526  # Publish this variable in the help.
17527
17528
17529  if [ -z "${MAKE+x}" ]; then
17530    # The variable is not set by user, try to locate tool using the code snippet
17531
17532    # Try our hardest to locate a correct version of GNU make
17533    for ac_prog in gmake
17534do
17535  # Extract the first word of "$ac_prog", so it can be a program name with args.
17536set dummy $ac_prog; ac_word=$2
17537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17538$as_echo_n "checking for $ac_word... " >&6; }
17539if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17540  $as_echo_n "(cached) " >&6
17541else
17542  case $CHECK_GMAKE in
17543  [\\/]* | ?:[\\/]*)
17544  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17545  ;;
17546  *)
17547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17548for as_dir in $PATH
17549do
17550  IFS=$as_save_IFS
17551  test -z "$as_dir" && as_dir=.
17552    for ac_exec_ext in '' $ac_executable_extensions; do
17553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17554    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17556    break 2
17557  fi
17558done
17559  done
17560IFS=$as_save_IFS
17561
17562  ;;
17563esac
17564fi
17565CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17566if test -n "$CHECK_GMAKE"; then
17567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17568$as_echo "$CHECK_GMAKE" >&6; }
17569else
17570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17571$as_echo "no" >&6; }
17572fi
17573
17574
17575  test -n "$CHECK_GMAKE" && break
17576done
17577
17578
17579  MAKE_CANDIDATE=""$CHECK_GMAKE""
17580  DESCRIPTION="gmake in PATH"
17581
17582  # On Cygwin, we require a newer version of make than on other platforms
17583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17584    MAKE_VERSION_EXPR="-e 4\."
17585    MAKE_REQUIRED_VERSION="4.0"
17586   else
17587    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17588    MAKE_REQUIRED_VERSION="3.81"
17589  fi
17590
17591  if test "x$MAKE_CANDIDATE" != x; then
17592    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17593$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17594    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17595    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17596    if test "x$IS_GNU_MAKE" = x; then
17597      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17598$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17599    else
17600      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17601      if test "x$IS_MODERN_MAKE" = x; then
17602        { $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
17603$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;}
17604      else
17605        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17606          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17607            MAKE_EXPECTED_ENV='cygwin'
17608          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17609            MAKE_EXPECTED_ENV='msys'
17610          else
17611            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17612          fi
17613          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17614          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17615        else
17616          # Not relevant for non-Windows
17617          IS_MAKE_CORRECT_ENV=true
17618        fi
17619        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17620          { $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
17621$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;}
17622        else
17623          FOUND_MAKE=$MAKE_CANDIDATE
17624
17625  # Only process if variable expands to non-empty
17626
17627  if test "x$FOUND_MAKE" != x; then
17628    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17629
17630  # First separate the path from the arguments. This will split at the first
17631  # space.
17632  complete="$FOUND_MAKE"
17633  path="${complete%% *}"
17634  tmp="$complete EOL"
17635  arguments="${tmp#* }"
17636
17637  # Input might be given as Windows format, start by converting to
17638  # unix format.
17639  new_path=`$CYGPATH -u "$path"`
17640
17641  # Now try to locate executable using which
17642  new_path=`$WHICH "$new_path" 2> /dev/null`
17643  # bat and cmd files are not always considered executable in cygwin causing which
17644  # to not find them
17645  if test "x$new_path" = x \
17646      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17647      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17648    new_path=`$CYGPATH -u "$path"`
17649  fi
17650  if test "x$new_path" = x; then
17651    # Oops. Which didn't find the executable.
17652    # The splitting of arguments from the executable at a space might have been incorrect,
17653    # since paths with space are more likely in Windows. Give it another try with the whole
17654    # argument.
17655    path="$complete"
17656    arguments="EOL"
17657    new_path=`$CYGPATH -u "$path"`
17658    new_path=`$WHICH "$new_path" 2> /dev/null`
17659    # bat and cmd files are not always considered executable in cygwin causing which
17660    # to not find them
17661    if test "x$new_path" = x \
17662        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17663        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17664      new_path=`$CYGPATH -u "$path"`
17665    fi
17666    if test "x$new_path" = x; then
17667      # It's still not found. Now this is an unrecoverable error.
17668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17669$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17670      has_space=`$ECHO "$complete" | $GREP " "`
17671      if test "x$has_space" != x; then
17672        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17673$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17674      fi
17675      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17676    fi
17677  fi
17678
17679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17682  # "foo.exe" is OK but "foo" is an error.
17683  #
17684  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17685  # It is also a way to make sure we got the proper file name for the real test later on.
17686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17687  if test "x$test_shortpath" = x; then
17688    # Short path failed, file does not exist as specified.
17689    # Try adding .exe or .cmd
17690    if test -f "${new_path}.exe"; then
17691      input_to_shortpath="${new_path}.exe"
17692    elif test -f "${new_path}.cmd"; then
17693      input_to_shortpath="${new_path}.cmd"
17694    else
17695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17696$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17697      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17698$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17699      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17700    fi
17701  else
17702    input_to_shortpath="$new_path"
17703  fi
17704
17705  # Call helper function which possibly converts this using DOS-style short mode.
17706  # If so, the updated path is stored in $new_path.
17707  new_path="$input_to_shortpath"
17708
17709  input_path="$input_to_shortpath"
17710  # Check if we need to convert this using DOS-style short mode. If the path
17711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17712  # take no chances and rewrite it.
17713  # Note: m4 eats our [], so we need to use [ and ] instead.
17714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17715  if test "x$has_forbidden_chars" != x; then
17716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17720      # Going to short mode and back again did indeed matter. Since short mode is
17721      # case insensitive, let's make it lowercase to improve readability.
17722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17723      # Now convert it back to Unix-style (cygpath)
17724      input_path=`$CYGPATH -u "$shortmode_path"`
17725      new_path="$input_path"
17726    fi
17727  fi
17728
17729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17730  if test "x$test_cygdrive_prefix" = x; then
17731    # As a simple fix, exclude /usr/bin since it's not a real path.
17732    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17734      # a path prefixed by /cygdrive for fixpath to work.
17735      new_path="$CYGWIN_ROOT_PATH$input_path"
17736    fi
17737  fi
17738
17739  # remove trailing .exe if any
17740  new_path="${new_path/%.exe/}"
17741
17742    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17743
17744  # First separate the path from the arguments. This will split at the first
17745  # space.
17746  complete="$FOUND_MAKE"
17747  path="${complete%% *}"
17748  tmp="$complete EOL"
17749  arguments="${tmp#* }"
17750
17751  # Input might be given as Windows format, start by converting to
17752  # unix format.
17753  new_path="$path"
17754
17755  windows_path="$new_path"
17756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17757    unix_path=`$CYGPATH -u "$windows_path"`
17758    new_path="$unix_path"
17759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17761    new_path="$unix_path"
17762  fi
17763
17764
17765  # Now try to locate executable using which
17766  new_path=`$WHICH "$new_path" 2> /dev/null`
17767
17768  if test "x$new_path" = x; then
17769    # Oops. Which didn't find the executable.
17770    # The splitting of arguments from the executable at a space might have been incorrect,
17771    # since paths with space are more likely in Windows. Give it another try with the whole
17772    # argument.
17773    path="$complete"
17774    arguments="EOL"
17775    new_path="$path"
17776
17777  windows_path="$new_path"
17778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779    unix_path=`$CYGPATH -u "$windows_path"`
17780    new_path="$unix_path"
17781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17783    new_path="$unix_path"
17784  fi
17785
17786
17787    new_path=`$WHICH "$new_path" 2> /dev/null`
17788    # bat and cmd files are not always considered executable in MSYS causing which
17789    # to not find them
17790    if test "x$new_path" = x \
17791        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17792        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17793      new_path="$path"
17794
17795  windows_path="$new_path"
17796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17797    unix_path=`$CYGPATH -u "$windows_path"`
17798    new_path="$unix_path"
17799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17801    new_path="$unix_path"
17802  fi
17803
17804    fi
17805
17806    if test "x$new_path" = x; then
17807      # It's still not found. Now this is an unrecoverable error.
17808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17809$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17810      has_space=`$ECHO "$complete" | $GREP " "`
17811      if test "x$has_space" != x; then
17812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17814      fi
17815      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17816    fi
17817  fi
17818
17819  # Now new_path has a complete unix path to the binary
17820  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17821    # Keep paths in /bin as-is, but remove trailing .exe if any
17822    new_path="${new_path/%.exe/}"
17823    # Do not save /bin paths to all_fixpath_prefixes!
17824  else
17825    # Not in mixed or Windows style, start by that.
17826    new_path=`cmd //c echo $new_path`
17827
17828  input_path="$new_path"
17829  # Check if we need to convert this using DOS-style short mode. If the path
17830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17831  # take no chances and rewrite it.
17832  # Note: m4 eats our [], so we need to use [ and ] instead.
17833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17834  if test "x$has_forbidden_chars" != x; then
17835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17837  fi
17838
17839    # Output is in $new_path
17840
17841  windows_path="$new_path"
17842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17843    unix_path=`$CYGPATH -u "$windows_path"`
17844    new_path="$unix_path"
17845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17847    new_path="$unix_path"
17848  fi
17849
17850    # remove trailing .exe if any
17851    new_path="${new_path/%.exe/}"
17852
17853    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17854    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17855  fi
17856
17857    else
17858      # We're on a unix platform. Hooray! :)
17859      # First separate the path from the arguments. This will split at the first
17860      # space.
17861      complete="$FOUND_MAKE"
17862      path="${complete%% *}"
17863      tmp="$complete EOL"
17864      arguments="${tmp#* }"
17865
17866      # Cannot rely on the command "which" here since it doesn't always work.
17867      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17868      if test -z "$is_absolute_path"; then
17869        # Path to executable is not absolute. Find it.
17870        IFS_save="$IFS"
17871        IFS=:
17872        for p in $PATH; do
17873          if test -f "$p/$path" && test -x "$p/$path"; then
17874            new_path="$p/$path"
17875            break
17876          fi
17877        done
17878        IFS="$IFS_save"
17879      else
17880        # This is an absolute path, we can use it without further modifications.
17881        new_path="$path"
17882      fi
17883
17884      if test "x$new_path" = x; then
17885        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17886$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17887        has_space=`$ECHO "$complete" | $GREP " "`
17888        if test "x$has_space" != x; then
17889          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17890$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17891        fi
17892        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17893      fi
17894    fi
17895
17896    # Now join together the path and the arguments once again
17897    if test "x$arguments" != xEOL; then
17898      new_complete="$new_path ${arguments% *}"
17899    else
17900      new_complete="$new_path"
17901    fi
17902
17903    if test "x$complete" != "x$new_complete"; then
17904      FOUND_MAKE="$new_complete"
17905      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17906$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17907    fi
17908  fi
17909
17910        fi
17911      fi
17912    fi
17913  fi
17914
17915
17916    if test "x$FOUND_MAKE" = x; then
17917      for ac_prog in make
17918do
17919  # Extract the first word of "$ac_prog", so it can be a program name with args.
17920set dummy $ac_prog; ac_word=$2
17921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17922$as_echo_n "checking for $ac_word... " >&6; }
17923if ${ac_cv_path_CHECK_MAKE+:} false; then :
17924  $as_echo_n "(cached) " >&6
17925else
17926  case $CHECK_MAKE in
17927  [\\/]* | ?:[\\/]*)
17928  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17929  ;;
17930  *)
17931  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17932for as_dir in $PATH
17933do
17934  IFS=$as_save_IFS
17935  test -z "$as_dir" && as_dir=.
17936    for ac_exec_ext in '' $ac_executable_extensions; do
17937  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17938    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17939    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17940    break 2
17941  fi
17942done
17943  done
17944IFS=$as_save_IFS
17945
17946  ;;
17947esac
17948fi
17949CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17950if test -n "$CHECK_MAKE"; then
17951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17952$as_echo "$CHECK_MAKE" >&6; }
17953else
17954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17955$as_echo "no" >&6; }
17956fi
17957
17958
17959  test -n "$CHECK_MAKE" && break
17960done
17961
17962
17963  MAKE_CANDIDATE=""$CHECK_MAKE""
17964  DESCRIPTION="make in PATH"
17965
17966  # On Cygwin, we require a newer version of make than on other platforms
17967  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17968    MAKE_VERSION_EXPR="-e 4\."
17969    MAKE_REQUIRED_VERSION="4.0"
17970   else
17971    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17972    MAKE_REQUIRED_VERSION="3.81"
17973  fi
17974
17975  if test "x$MAKE_CANDIDATE" != x; then
17976    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17977$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17978    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17979    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17980    if test "x$IS_GNU_MAKE" = x; then
17981      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17982$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17983    else
17984      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17985      if test "x$IS_MODERN_MAKE" = x; then
17986        { $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
17987$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;}
17988      else
17989        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17990          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17991            MAKE_EXPECTED_ENV='cygwin'
17992          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17993            MAKE_EXPECTED_ENV='msys'
17994          else
17995            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17996          fi
17997          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17998          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17999        else
18000          # Not relevant for non-Windows
18001          IS_MAKE_CORRECT_ENV=true
18002        fi
18003        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18004          { $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
18005$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;}
18006        else
18007          FOUND_MAKE=$MAKE_CANDIDATE
18008
18009  # Only process if variable expands to non-empty
18010
18011  if test "x$FOUND_MAKE" != x; then
18012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18013
18014  # First separate the path from the arguments. This will split at the first
18015  # space.
18016  complete="$FOUND_MAKE"
18017  path="${complete%% *}"
18018  tmp="$complete EOL"
18019  arguments="${tmp#* }"
18020
18021  # Input might be given as Windows format, start by converting to
18022  # unix format.
18023  new_path=`$CYGPATH -u "$path"`
18024
18025  # Now try to locate executable using which
18026  new_path=`$WHICH "$new_path" 2> /dev/null`
18027  # bat and cmd files are not always considered executable in cygwin causing which
18028  # to not find them
18029  if test "x$new_path" = x \
18030      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18031      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18032    new_path=`$CYGPATH -u "$path"`
18033  fi
18034  if test "x$new_path" = x; then
18035    # Oops. Which didn't find the executable.
18036    # The splitting of arguments from the executable at a space might have been incorrect,
18037    # since paths with space are more likely in Windows. Give it another try with the whole
18038    # argument.
18039    path="$complete"
18040    arguments="EOL"
18041    new_path=`$CYGPATH -u "$path"`
18042    new_path=`$WHICH "$new_path" 2> /dev/null`
18043    # bat and cmd files are not always considered executable in cygwin causing which
18044    # to not find them
18045    if test "x$new_path" = x \
18046        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18047        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18048      new_path=`$CYGPATH -u "$path"`
18049    fi
18050    if test "x$new_path" = x; then
18051      # It's still not found. Now this is an unrecoverable error.
18052      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18053$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18054      has_space=`$ECHO "$complete" | $GREP " "`
18055      if test "x$has_space" != x; then
18056        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18057$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18058      fi
18059      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18060    fi
18061  fi
18062
18063  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18064  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18065  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18066  # "foo.exe" is OK but "foo" is an error.
18067  #
18068  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18069  # It is also a way to make sure we got the proper file name for the real test later on.
18070  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18071  if test "x$test_shortpath" = x; then
18072    # Short path failed, file does not exist as specified.
18073    # Try adding .exe or .cmd
18074    if test -f "${new_path}.exe"; then
18075      input_to_shortpath="${new_path}.exe"
18076    elif test -f "${new_path}.cmd"; then
18077      input_to_shortpath="${new_path}.cmd"
18078    else
18079      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18080$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18081      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18082$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18084    fi
18085  else
18086    input_to_shortpath="$new_path"
18087  fi
18088
18089  # Call helper function which possibly converts this using DOS-style short mode.
18090  # If so, the updated path is stored in $new_path.
18091  new_path="$input_to_shortpath"
18092
18093  input_path="$input_to_shortpath"
18094  # Check if we need to convert this using DOS-style short mode. If the path
18095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18096  # take no chances and rewrite it.
18097  # Note: m4 eats our [], so we need to use [ and ] instead.
18098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18099  if test "x$has_forbidden_chars" != x; then
18100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18104      # Going to short mode and back again did indeed matter. Since short mode is
18105      # case insensitive, let's make it lowercase to improve readability.
18106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18107      # Now convert it back to Unix-style (cygpath)
18108      input_path=`$CYGPATH -u "$shortmode_path"`
18109      new_path="$input_path"
18110    fi
18111  fi
18112
18113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18114  if test "x$test_cygdrive_prefix" = x; then
18115    # As a simple fix, exclude /usr/bin since it's not a real path.
18116    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18118      # a path prefixed by /cygdrive for fixpath to work.
18119      new_path="$CYGWIN_ROOT_PATH$input_path"
18120    fi
18121  fi
18122
18123  # remove trailing .exe if any
18124  new_path="${new_path/%.exe/}"
18125
18126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18127
18128  # First separate the path from the arguments. This will split at the first
18129  # space.
18130  complete="$FOUND_MAKE"
18131  path="${complete%% *}"
18132  tmp="$complete EOL"
18133  arguments="${tmp#* }"
18134
18135  # Input might be given as Windows format, start by converting to
18136  # unix format.
18137  new_path="$path"
18138
18139  windows_path="$new_path"
18140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18141    unix_path=`$CYGPATH -u "$windows_path"`
18142    new_path="$unix_path"
18143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18145    new_path="$unix_path"
18146  fi
18147
18148
18149  # Now try to locate executable using which
18150  new_path=`$WHICH "$new_path" 2> /dev/null`
18151
18152  if test "x$new_path" = x; then
18153    # Oops. Which didn't find the executable.
18154    # The splitting of arguments from the executable at a space might have been incorrect,
18155    # since paths with space are more likely in Windows. Give it another try with the whole
18156    # argument.
18157    path="$complete"
18158    arguments="EOL"
18159    new_path="$path"
18160
18161  windows_path="$new_path"
18162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18163    unix_path=`$CYGPATH -u "$windows_path"`
18164    new_path="$unix_path"
18165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18167    new_path="$unix_path"
18168  fi
18169
18170
18171    new_path=`$WHICH "$new_path" 2> /dev/null`
18172    # bat and cmd files are not always considered executable in MSYS causing which
18173    # to not find them
18174    if test "x$new_path" = x \
18175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18177      new_path="$path"
18178
18179  windows_path="$new_path"
18180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18181    unix_path=`$CYGPATH -u "$windows_path"`
18182    new_path="$unix_path"
18183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18185    new_path="$unix_path"
18186  fi
18187
18188    fi
18189
18190    if test "x$new_path" = x; then
18191      # It's still not found. Now this is an unrecoverable error.
18192      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18193$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18194      has_space=`$ECHO "$complete" | $GREP " "`
18195      if test "x$has_space" != x; then
18196        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18197$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18198      fi
18199      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18200    fi
18201  fi
18202
18203  # Now new_path has a complete unix path to the binary
18204  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18205    # Keep paths in /bin as-is, but remove trailing .exe if any
18206    new_path="${new_path/%.exe/}"
18207    # Do not save /bin paths to all_fixpath_prefixes!
18208  else
18209    # Not in mixed or Windows style, start by that.
18210    new_path=`cmd //c echo $new_path`
18211
18212  input_path="$new_path"
18213  # Check if we need to convert this using DOS-style short mode. If the path
18214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18215  # take no chances and rewrite it.
18216  # Note: m4 eats our [], so we need to use [ and ] instead.
18217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18218  if test "x$has_forbidden_chars" != x; then
18219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18220    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18221  fi
18222
18223    # Output is in $new_path
18224
18225  windows_path="$new_path"
18226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18227    unix_path=`$CYGPATH -u "$windows_path"`
18228    new_path="$unix_path"
18229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18231    new_path="$unix_path"
18232  fi
18233
18234    # remove trailing .exe if any
18235    new_path="${new_path/%.exe/}"
18236
18237    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18238    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18239  fi
18240
18241    else
18242      # We're on a unix platform. Hooray! :)
18243      # First separate the path from the arguments. This will split at the first
18244      # space.
18245      complete="$FOUND_MAKE"
18246      path="${complete%% *}"
18247      tmp="$complete EOL"
18248      arguments="${tmp#* }"
18249
18250      # Cannot rely on the command "which" here since it doesn't always work.
18251      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18252      if test -z "$is_absolute_path"; then
18253        # Path to executable is not absolute. Find it.
18254        IFS_save="$IFS"
18255        IFS=:
18256        for p in $PATH; do
18257          if test -f "$p/$path" && test -x "$p/$path"; then
18258            new_path="$p/$path"
18259            break
18260          fi
18261        done
18262        IFS="$IFS_save"
18263      else
18264        # This is an absolute path, we can use it without further modifications.
18265        new_path="$path"
18266      fi
18267
18268      if test "x$new_path" = x; then
18269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18270$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18271        has_space=`$ECHO "$complete" | $GREP " "`
18272        if test "x$has_space" != x; then
18273          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18274$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18275        fi
18276        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18277      fi
18278    fi
18279
18280    # Now join together the path and the arguments once again
18281    if test "x$arguments" != xEOL; then
18282      new_complete="$new_path ${arguments% *}"
18283    else
18284      new_complete="$new_path"
18285    fi
18286
18287    if test "x$complete" != "x$new_complete"; then
18288      FOUND_MAKE="$new_complete"
18289      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18290$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18291    fi
18292  fi
18293
18294        fi
18295      fi
18296    fi
18297  fi
18298
18299    fi
18300
18301    if test "x$FOUND_MAKE" = x; then
18302      if test "x$TOOLCHAIN_PATH" != x; then
18303        # We have a toolchain path, check that as well before giving up.
18304        OLD_PATH=$PATH
18305        PATH=$TOOLCHAIN_PATH:$PATH
18306        for ac_prog in gmake
18307do
18308  # Extract the first word of "$ac_prog", so it can be a program name with args.
18309set dummy $ac_prog; ac_word=$2
18310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18311$as_echo_n "checking for $ac_word... " >&6; }
18312if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18313  $as_echo_n "(cached) " >&6
18314else
18315  case $CHECK_TOOLSDIR_GMAKE in
18316  [\\/]* | ?:[\\/]*)
18317  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18318  ;;
18319  *)
18320  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18321for as_dir in $PATH
18322do
18323  IFS=$as_save_IFS
18324  test -z "$as_dir" && as_dir=.
18325    for ac_exec_ext in '' $ac_executable_extensions; do
18326  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18327    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18328    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18329    break 2
18330  fi
18331done
18332  done
18333IFS=$as_save_IFS
18334
18335  ;;
18336esac
18337fi
18338CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18339if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18341$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18342else
18343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18344$as_echo "no" >&6; }
18345fi
18346
18347
18348  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18349done
18350
18351
18352  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18353  DESCRIPTION="gmake in tools-dir"
18354
18355  # On Cygwin, we require a newer version of make than on other platforms
18356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18357    MAKE_VERSION_EXPR="-e 4\."
18358    MAKE_REQUIRED_VERSION="4.0"
18359   else
18360    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18361    MAKE_REQUIRED_VERSION="3.81"
18362  fi
18363
18364  if test "x$MAKE_CANDIDATE" != x; then
18365    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18366$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18367    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18368    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18369    if test "x$IS_GNU_MAKE" = x; then
18370      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18371$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18372    else
18373      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18374      if test "x$IS_MODERN_MAKE" = x; then
18375        { $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
18376$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;}
18377      else
18378        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18379          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18380            MAKE_EXPECTED_ENV='cygwin'
18381          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18382            MAKE_EXPECTED_ENV='msys'
18383          else
18384            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18385          fi
18386          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18387          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18388        else
18389          # Not relevant for non-Windows
18390          IS_MAKE_CORRECT_ENV=true
18391        fi
18392        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18393          { $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
18394$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;}
18395        else
18396          FOUND_MAKE=$MAKE_CANDIDATE
18397
18398  # Only process if variable expands to non-empty
18399
18400  if test "x$FOUND_MAKE" != x; then
18401    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18402
18403  # First separate the path from the arguments. This will split at the first
18404  # space.
18405  complete="$FOUND_MAKE"
18406  path="${complete%% *}"
18407  tmp="$complete EOL"
18408  arguments="${tmp#* }"
18409
18410  # Input might be given as Windows format, start by converting to
18411  # unix format.
18412  new_path=`$CYGPATH -u "$path"`
18413
18414  # Now try to locate executable using which
18415  new_path=`$WHICH "$new_path" 2> /dev/null`
18416  # bat and cmd files are not always considered executable in cygwin causing which
18417  # to not find them
18418  if test "x$new_path" = x \
18419      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18420      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18421    new_path=`$CYGPATH -u "$path"`
18422  fi
18423  if test "x$new_path" = x; then
18424    # Oops. Which didn't find the executable.
18425    # The splitting of arguments from the executable at a space might have been incorrect,
18426    # since paths with space are more likely in Windows. Give it another try with the whole
18427    # argument.
18428    path="$complete"
18429    arguments="EOL"
18430    new_path=`$CYGPATH -u "$path"`
18431    new_path=`$WHICH "$new_path" 2> /dev/null`
18432    # bat and cmd files are not always considered executable in cygwin causing which
18433    # to not find them
18434    if test "x$new_path" = x \
18435        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18436        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18437      new_path=`$CYGPATH -u "$path"`
18438    fi
18439    if test "x$new_path" = x; then
18440      # It's still not found. Now this is an unrecoverable error.
18441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18442$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18443      has_space=`$ECHO "$complete" | $GREP " "`
18444      if test "x$has_space" != x; then
18445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18447      fi
18448      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18449    fi
18450  fi
18451
18452  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18453  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18454  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18455  # "foo.exe" is OK but "foo" is an error.
18456  #
18457  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18458  # It is also a way to make sure we got the proper file name for the real test later on.
18459  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18460  if test "x$test_shortpath" = x; then
18461    # Short path failed, file does not exist as specified.
18462    # Try adding .exe or .cmd
18463    if test -f "${new_path}.exe"; then
18464      input_to_shortpath="${new_path}.exe"
18465    elif test -f "${new_path}.cmd"; then
18466      input_to_shortpath="${new_path}.cmd"
18467    else
18468      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18469$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18470      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18471$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18472      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18473    fi
18474  else
18475    input_to_shortpath="$new_path"
18476  fi
18477
18478  # Call helper function which possibly converts this using DOS-style short mode.
18479  # If so, the updated path is stored in $new_path.
18480  new_path="$input_to_shortpath"
18481
18482  input_path="$input_to_shortpath"
18483  # Check if we need to convert this using DOS-style short mode. If the path
18484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18485  # take no chances and rewrite it.
18486  # Note: m4 eats our [], so we need to use [ and ] instead.
18487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18488  if test "x$has_forbidden_chars" != x; then
18489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18490    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18491    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18492    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18493      # Going to short mode and back again did indeed matter. Since short mode is
18494      # case insensitive, let's make it lowercase to improve readability.
18495      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18496      # Now convert it back to Unix-style (cygpath)
18497      input_path=`$CYGPATH -u "$shortmode_path"`
18498      new_path="$input_path"
18499    fi
18500  fi
18501
18502  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18503  if test "x$test_cygdrive_prefix" = x; then
18504    # As a simple fix, exclude /usr/bin since it's not a real path.
18505    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18506      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18507      # a path prefixed by /cygdrive for fixpath to work.
18508      new_path="$CYGWIN_ROOT_PATH$input_path"
18509    fi
18510  fi
18511
18512  # remove trailing .exe if any
18513  new_path="${new_path/%.exe/}"
18514
18515    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18516
18517  # First separate the path from the arguments. This will split at the first
18518  # space.
18519  complete="$FOUND_MAKE"
18520  path="${complete%% *}"
18521  tmp="$complete EOL"
18522  arguments="${tmp#* }"
18523
18524  # Input might be given as Windows format, start by converting to
18525  # unix format.
18526  new_path="$path"
18527
18528  windows_path="$new_path"
18529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18530    unix_path=`$CYGPATH -u "$windows_path"`
18531    new_path="$unix_path"
18532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18534    new_path="$unix_path"
18535  fi
18536
18537
18538  # Now try to locate executable using which
18539  new_path=`$WHICH "$new_path" 2> /dev/null`
18540
18541  if test "x$new_path" = x; then
18542    # Oops. Which didn't find the executable.
18543    # The splitting of arguments from the executable at a space might have been incorrect,
18544    # since paths with space are more likely in Windows. Give it another try with the whole
18545    # argument.
18546    path="$complete"
18547    arguments="EOL"
18548    new_path="$path"
18549
18550  windows_path="$new_path"
18551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18552    unix_path=`$CYGPATH -u "$windows_path"`
18553    new_path="$unix_path"
18554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18556    new_path="$unix_path"
18557  fi
18558
18559
18560    new_path=`$WHICH "$new_path" 2> /dev/null`
18561    # bat and cmd files are not always considered executable in MSYS causing which
18562    # to not find them
18563    if test "x$new_path" = x \
18564        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18565        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18566      new_path="$path"
18567
18568  windows_path="$new_path"
18569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18570    unix_path=`$CYGPATH -u "$windows_path"`
18571    new_path="$unix_path"
18572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18574    new_path="$unix_path"
18575  fi
18576
18577    fi
18578
18579    if test "x$new_path" = x; then
18580      # It's still not found. Now this is an unrecoverable error.
18581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18582$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18583      has_space=`$ECHO "$complete" | $GREP " "`
18584      if test "x$has_space" != x; then
18585        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18586$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18587      fi
18588      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18589    fi
18590  fi
18591
18592  # Now new_path has a complete unix path to the binary
18593  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18594    # Keep paths in /bin as-is, but remove trailing .exe if any
18595    new_path="${new_path/%.exe/}"
18596    # Do not save /bin paths to all_fixpath_prefixes!
18597  else
18598    # Not in mixed or Windows style, start by that.
18599    new_path=`cmd //c echo $new_path`
18600
18601  input_path="$new_path"
18602  # Check if we need to convert this using DOS-style short mode. If the path
18603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18604  # take no chances and rewrite it.
18605  # Note: m4 eats our [], so we need to use [ and ] instead.
18606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18607  if test "x$has_forbidden_chars" != x; then
18608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18610  fi
18611
18612    # Output is in $new_path
18613
18614  windows_path="$new_path"
18615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18616    unix_path=`$CYGPATH -u "$windows_path"`
18617    new_path="$unix_path"
18618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18620    new_path="$unix_path"
18621  fi
18622
18623    # remove trailing .exe if any
18624    new_path="${new_path/%.exe/}"
18625
18626    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18627    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18628  fi
18629
18630    else
18631      # We're on a unix platform. Hooray! :)
18632      # First separate the path from the arguments. This will split at the first
18633      # space.
18634      complete="$FOUND_MAKE"
18635      path="${complete%% *}"
18636      tmp="$complete EOL"
18637      arguments="${tmp#* }"
18638
18639      # Cannot rely on the command "which" here since it doesn't always work.
18640      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18641      if test -z "$is_absolute_path"; then
18642        # Path to executable is not absolute. Find it.
18643        IFS_save="$IFS"
18644        IFS=:
18645        for p in $PATH; do
18646          if test -f "$p/$path" && test -x "$p/$path"; then
18647            new_path="$p/$path"
18648            break
18649          fi
18650        done
18651        IFS="$IFS_save"
18652      else
18653        # This is an absolute path, we can use it without further modifications.
18654        new_path="$path"
18655      fi
18656
18657      if test "x$new_path" = x; then
18658        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18659$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18660        has_space=`$ECHO "$complete" | $GREP " "`
18661        if test "x$has_space" != x; then
18662          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18663$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18664        fi
18665        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18666      fi
18667    fi
18668
18669    # Now join together the path and the arguments once again
18670    if test "x$arguments" != xEOL; then
18671      new_complete="$new_path ${arguments% *}"
18672    else
18673      new_complete="$new_path"
18674    fi
18675
18676    if test "x$complete" != "x$new_complete"; then
18677      FOUND_MAKE="$new_complete"
18678      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18679$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18680    fi
18681  fi
18682
18683        fi
18684      fi
18685    fi
18686  fi
18687
18688        if test "x$FOUND_MAKE" = x; then
18689          for ac_prog in make
18690do
18691  # Extract the first word of "$ac_prog", so it can be a program name with args.
18692set dummy $ac_prog; ac_word=$2
18693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18694$as_echo_n "checking for $ac_word... " >&6; }
18695if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18696  $as_echo_n "(cached) " >&6
18697else
18698  case $CHECK_TOOLSDIR_MAKE in
18699  [\\/]* | ?:[\\/]*)
18700  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18701  ;;
18702  *)
18703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18704for as_dir in $PATH
18705do
18706  IFS=$as_save_IFS
18707  test -z "$as_dir" && as_dir=.
18708    for ac_exec_ext in '' $ac_executable_extensions; do
18709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18710    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18712    break 2
18713  fi
18714done
18715  done
18716IFS=$as_save_IFS
18717
18718  ;;
18719esac
18720fi
18721CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18722if test -n "$CHECK_TOOLSDIR_MAKE"; then
18723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18724$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18725else
18726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18727$as_echo "no" >&6; }
18728fi
18729
18730
18731  test -n "$CHECK_TOOLSDIR_MAKE" && break
18732done
18733
18734
18735  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18736  DESCRIPTION="make in tools-dir"
18737
18738  # On Cygwin, we require a newer version of make than on other platforms
18739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18740    MAKE_VERSION_EXPR="-e 4\."
18741    MAKE_REQUIRED_VERSION="4.0"
18742   else
18743    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18744    MAKE_REQUIRED_VERSION="3.81"
18745  fi
18746
18747  if test "x$MAKE_CANDIDATE" != x; then
18748    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18749$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18750    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18751    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18752    if test "x$IS_GNU_MAKE" = x; then
18753      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18754$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18755    else
18756      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18757      if test "x$IS_MODERN_MAKE" = x; then
18758        { $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
18759$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;}
18760      else
18761        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18762          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18763            MAKE_EXPECTED_ENV='cygwin'
18764          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18765            MAKE_EXPECTED_ENV='msys'
18766          else
18767            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18768          fi
18769          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18770          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18771        else
18772          # Not relevant for non-Windows
18773          IS_MAKE_CORRECT_ENV=true
18774        fi
18775        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18776          { $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
18777$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;}
18778        else
18779          FOUND_MAKE=$MAKE_CANDIDATE
18780
18781  # Only process if variable expands to non-empty
18782
18783  if test "x$FOUND_MAKE" != x; then
18784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18785
18786  # First separate the path from the arguments. This will split at the first
18787  # space.
18788  complete="$FOUND_MAKE"
18789  path="${complete%% *}"
18790  tmp="$complete EOL"
18791  arguments="${tmp#* }"
18792
18793  # Input might be given as Windows format, start by converting to
18794  # unix format.
18795  new_path=`$CYGPATH -u "$path"`
18796
18797  # Now try to locate executable using which
18798  new_path=`$WHICH "$new_path" 2> /dev/null`
18799  # bat and cmd files are not always considered executable in cygwin causing which
18800  # to not find them
18801  if test "x$new_path" = x \
18802      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18803      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18804    new_path=`$CYGPATH -u "$path"`
18805  fi
18806  if test "x$new_path" = x; then
18807    # Oops. Which didn't find the executable.
18808    # The splitting of arguments from the executable at a space might have been incorrect,
18809    # since paths with space are more likely in Windows. Give it another try with the whole
18810    # argument.
18811    path="$complete"
18812    arguments="EOL"
18813    new_path=`$CYGPATH -u "$path"`
18814    new_path=`$WHICH "$new_path" 2> /dev/null`
18815    # bat and cmd files are not always considered executable in cygwin causing which
18816    # to not find them
18817    if test "x$new_path" = x \
18818        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18819        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18820      new_path=`$CYGPATH -u "$path"`
18821    fi
18822    if test "x$new_path" = x; then
18823      # It's still not found. Now this is an unrecoverable error.
18824      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18825$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18826      has_space=`$ECHO "$complete" | $GREP " "`
18827      if test "x$has_space" != x; then
18828        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18829$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18830      fi
18831      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18832    fi
18833  fi
18834
18835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18838  # "foo.exe" is OK but "foo" is an error.
18839  #
18840  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18841  # It is also a way to make sure we got the proper file name for the real test later on.
18842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18843  if test "x$test_shortpath" = x; then
18844    # Short path failed, file does not exist as specified.
18845    # Try adding .exe or .cmd
18846    if test -f "${new_path}.exe"; then
18847      input_to_shortpath="${new_path}.exe"
18848    elif test -f "${new_path}.cmd"; then
18849      input_to_shortpath="${new_path}.cmd"
18850    else
18851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18852$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18853      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18854$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18856    fi
18857  else
18858    input_to_shortpath="$new_path"
18859  fi
18860
18861  # Call helper function which possibly converts this using DOS-style short mode.
18862  # If so, the updated path is stored in $new_path.
18863  new_path="$input_to_shortpath"
18864
18865  input_path="$input_to_shortpath"
18866  # Check if we need to convert this using DOS-style short mode. If the path
18867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18868  # take no chances and rewrite it.
18869  # Note: m4 eats our [], so we need to use [ and ] instead.
18870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18871  if test "x$has_forbidden_chars" != x; then
18872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18876      # Going to short mode and back again did indeed matter. Since short mode is
18877      # case insensitive, let's make it lowercase to improve readability.
18878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18879      # Now convert it back to Unix-style (cygpath)
18880      input_path=`$CYGPATH -u "$shortmode_path"`
18881      new_path="$input_path"
18882    fi
18883  fi
18884
18885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18886  if test "x$test_cygdrive_prefix" = x; then
18887    # As a simple fix, exclude /usr/bin since it's not a real path.
18888    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18890      # a path prefixed by /cygdrive for fixpath to work.
18891      new_path="$CYGWIN_ROOT_PATH$input_path"
18892    fi
18893  fi
18894
18895  # remove trailing .exe if any
18896  new_path="${new_path/%.exe/}"
18897
18898    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18899
18900  # First separate the path from the arguments. This will split at the first
18901  # space.
18902  complete="$FOUND_MAKE"
18903  path="${complete%% *}"
18904  tmp="$complete EOL"
18905  arguments="${tmp#* }"
18906
18907  # Input might be given as Windows format, start by converting to
18908  # unix format.
18909  new_path="$path"
18910
18911  windows_path="$new_path"
18912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18913    unix_path=`$CYGPATH -u "$windows_path"`
18914    new_path="$unix_path"
18915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18917    new_path="$unix_path"
18918  fi
18919
18920
18921  # Now try to locate executable using which
18922  new_path=`$WHICH "$new_path" 2> /dev/null`
18923
18924  if test "x$new_path" = x; then
18925    # Oops. Which didn't find the executable.
18926    # The splitting of arguments from the executable at a space might have been incorrect,
18927    # since paths with space are more likely in Windows. Give it another try with the whole
18928    # argument.
18929    path="$complete"
18930    arguments="EOL"
18931    new_path="$path"
18932
18933  windows_path="$new_path"
18934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18935    unix_path=`$CYGPATH -u "$windows_path"`
18936    new_path="$unix_path"
18937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18939    new_path="$unix_path"
18940  fi
18941
18942
18943    new_path=`$WHICH "$new_path" 2> /dev/null`
18944    # bat and cmd files are not always considered executable in MSYS causing which
18945    # to not find them
18946    if test "x$new_path" = x \
18947        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18948        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18949      new_path="$path"
18950
18951  windows_path="$new_path"
18952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18953    unix_path=`$CYGPATH -u "$windows_path"`
18954    new_path="$unix_path"
18955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18957    new_path="$unix_path"
18958  fi
18959
18960    fi
18961
18962    if test "x$new_path" = x; then
18963      # It's still not found. Now this is an unrecoverable error.
18964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18965$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18966      has_space=`$ECHO "$complete" | $GREP " "`
18967      if test "x$has_space" != x; then
18968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18970      fi
18971      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18972    fi
18973  fi
18974
18975  # Now new_path has a complete unix path to the binary
18976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18977    # Keep paths in /bin as-is, but remove trailing .exe if any
18978    new_path="${new_path/%.exe/}"
18979    # Do not save /bin paths to all_fixpath_prefixes!
18980  else
18981    # Not in mixed or Windows style, start by that.
18982    new_path=`cmd //c echo $new_path`
18983
18984  input_path="$new_path"
18985  # Check if we need to convert this using DOS-style short mode. If the path
18986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18987  # take no chances and rewrite it.
18988  # Note: m4 eats our [], so we need to use [ and ] instead.
18989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18990  if test "x$has_forbidden_chars" != x; then
18991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18993  fi
18994
18995    # Output is in $new_path
18996
18997  windows_path="$new_path"
18998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18999    unix_path=`$CYGPATH -u "$windows_path"`
19000    new_path="$unix_path"
19001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19003    new_path="$unix_path"
19004  fi
19005
19006    # remove trailing .exe if any
19007    new_path="${new_path/%.exe/}"
19008
19009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19011  fi
19012
19013    else
19014      # We're on a unix platform. Hooray! :)
19015      # First separate the path from the arguments. This will split at the first
19016      # space.
19017      complete="$FOUND_MAKE"
19018      path="${complete%% *}"
19019      tmp="$complete EOL"
19020      arguments="${tmp#* }"
19021
19022      # Cannot rely on the command "which" here since it doesn't always work.
19023      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19024      if test -z "$is_absolute_path"; then
19025        # Path to executable is not absolute. Find it.
19026        IFS_save="$IFS"
19027        IFS=:
19028        for p in $PATH; do
19029          if test -f "$p/$path" && test -x "$p/$path"; then
19030            new_path="$p/$path"
19031            break
19032          fi
19033        done
19034        IFS="$IFS_save"
19035      else
19036        # This is an absolute path, we can use it without further modifications.
19037        new_path="$path"
19038      fi
19039
19040      if test "x$new_path" = x; then
19041        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19043        has_space=`$ECHO "$complete" | $GREP " "`
19044        if test "x$has_space" != x; then
19045          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19047        fi
19048        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19049      fi
19050    fi
19051
19052    # Now join together the path and the arguments once again
19053    if test "x$arguments" != xEOL; then
19054      new_complete="$new_path ${arguments% *}"
19055    else
19056      new_complete="$new_path"
19057    fi
19058
19059    if test "x$complete" != "x$new_complete"; then
19060      FOUND_MAKE="$new_complete"
19061      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19062$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19063    fi
19064  fi
19065
19066        fi
19067      fi
19068    fi
19069  fi
19070
19071        fi
19072        PATH=$OLD_PATH
19073      fi
19074    fi
19075
19076    if test "x$FOUND_MAKE" = x; then
19077      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
19078    fi
19079
19080  else
19081    # The variable is set, but is it from the command line or the environment?
19082
19083    # Try to remove the string !MAKE! from our list.
19084    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19085    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19086      # If it failed, the variable was not from the command line. Ignore it,
19087      # but warn the user (except for BASH, which is always set by the calling BASH).
19088      if test "xMAKE" != xBASH; then
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19090$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19091      fi
19092      # Try to locate tool using the code snippet
19093
19094    # Try our hardest to locate a correct version of GNU make
19095    for ac_prog in gmake
19096do
19097  # Extract the first word of "$ac_prog", so it can be a program name with args.
19098set dummy $ac_prog; ac_word=$2
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19100$as_echo_n "checking for $ac_word... " >&6; }
19101if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  case $CHECK_GMAKE in
19105  [\\/]* | ?:[\\/]*)
19106  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19107  ;;
19108  *)
19109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19110for as_dir in $PATH
19111do
19112  IFS=$as_save_IFS
19113  test -z "$as_dir" && as_dir=.
19114    for ac_exec_ext in '' $ac_executable_extensions; do
19115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19116    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19118    break 2
19119  fi
19120done
19121  done
19122IFS=$as_save_IFS
19123
19124  ;;
19125esac
19126fi
19127CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19128if test -n "$CHECK_GMAKE"; then
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19130$as_echo "$CHECK_GMAKE" >&6; }
19131else
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19133$as_echo "no" >&6; }
19134fi
19135
19136
19137  test -n "$CHECK_GMAKE" && break
19138done
19139
19140
19141  MAKE_CANDIDATE=""$CHECK_GMAKE""
19142  DESCRIPTION="gmake in PATH"
19143
19144  # On Cygwin, we require a newer version of make than on other platforms
19145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19146    MAKE_VERSION_EXPR="-e 4\."
19147    MAKE_REQUIRED_VERSION="4.0"
19148   else
19149    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19150    MAKE_REQUIRED_VERSION="3.81"
19151  fi
19152
19153  if test "x$MAKE_CANDIDATE" != x; then
19154    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19155$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19156    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19157    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19158    if test "x$IS_GNU_MAKE" = x; then
19159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19160$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19161    else
19162      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19163      if test "x$IS_MODERN_MAKE" = x; then
19164        { $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
19165$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;}
19166      else
19167        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19168          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19169            MAKE_EXPECTED_ENV='cygwin'
19170          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19171            MAKE_EXPECTED_ENV='msys'
19172          else
19173            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19174          fi
19175          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19176          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19177        else
19178          # Not relevant for non-Windows
19179          IS_MAKE_CORRECT_ENV=true
19180        fi
19181        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19182          { $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
19183$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;}
19184        else
19185          FOUND_MAKE=$MAKE_CANDIDATE
19186
19187  # Only process if variable expands to non-empty
19188
19189  if test "x$FOUND_MAKE" != x; then
19190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19191
19192  # First separate the path from the arguments. This will split at the first
19193  # space.
19194  complete="$FOUND_MAKE"
19195  path="${complete%% *}"
19196  tmp="$complete EOL"
19197  arguments="${tmp#* }"
19198
19199  # Input might be given as Windows format, start by converting to
19200  # unix format.
19201  new_path=`$CYGPATH -u "$path"`
19202
19203  # Now try to locate executable using which
19204  new_path=`$WHICH "$new_path" 2> /dev/null`
19205  # bat and cmd files are not always considered executable in cygwin causing which
19206  # to not find them
19207  if test "x$new_path" = x \
19208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19210    new_path=`$CYGPATH -u "$path"`
19211  fi
19212  if test "x$new_path" = x; then
19213    # Oops. Which didn't find the executable.
19214    # The splitting of arguments from the executable at a space might have been incorrect,
19215    # since paths with space are more likely in Windows. Give it another try with the whole
19216    # argument.
19217    path="$complete"
19218    arguments="EOL"
19219    new_path=`$CYGPATH -u "$path"`
19220    new_path=`$WHICH "$new_path" 2> /dev/null`
19221    # bat and cmd files are not always considered executable in cygwin causing which
19222    # to not find them
19223    if test "x$new_path" = x \
19224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19226      new_path=`$CYGPATH -u "$path"`
19227    fi
19228    if test "x$new_path" = x; then
19229      # It's still not found. Now this is an unrecoverable error.
19230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19231$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19232      has_space=`$ECHO "$complete" | $GREP " "`
19233      if test "x$has_space" != x; then
19234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19236      fi
19237      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19238    fi
19239  fi
19240
19241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19244  # "foo.exe" is OK but "foo" is an error.
19245  #
19246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19247  # It is also a way to make sure we got the proper file name for the real test later on.
19248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19249  if test "x$test_shortpath" = x; then
19250    # Short path failed, file does not exist as specified.
19251    # Try adding .exe or .cmd
19252    if test -f "${new_path}.exe"; then
19253      input_to_shortpath="${new_path}.exe"
19254    elif test -f "${new_path}.cmd"; then
19255      input_to_shortpath="${new_path}.cmd"
19256    else
19257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19262    fi
19263  else
19264    input_to_shortpath="$new_path"
19265  fi
19266
19267  # Call helper function which possibly converts this using DOS-style short mode.
19268  # If so, the updated path is stored in $new_path.
19269  new_path="$input_to_shortpath"
19270
19271  input_path="$input_to_shortpath"
19272  # Check if we need to convert this using DOS-style short mode. If the path
19273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19274  # take no chances and rewrite it.
19275  # Note: m4 eats our [], so we need to use [ and ] instead.
19276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19277  if test "x$has_forbidden_chars" != x; then
19278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19282      # Going to short mode and back again did indeed matter. Since short mode is
19283      # case insensitive, let's make it lowercase to improve readability.
19284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19285      # Now convert it back to Unix-style (cygpath)
19286      input_path=`$CYGPATH -u "$shortmode_path"`
19287      new_path="$input_path"
19288    fi
19289  fi
19290
19291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19292  if test "x$test_cygdrive_prefix" = x; then
19293    # As a simple fix, exclude /usr/bin since it's not a real path.
19294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19296      # a path prefixed by /cygdrive for fixpath to work.
19297      new_path="$CYGWIN_ROOT_PATH$input_path"
19298    fi
19299  fi
19300
19301  # remove trailing .exe if any
19302  new_path="${new_path/%.exe/}"
19303
19304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19305
19306  # First separate the path from the arguments. This will split at the first
19307  # space.
19308  complete="$FOUND_MAKE"
19309  path="${complete%% *}"
19310  tmp="$complete EOL"
19311  arguments="${tmp#* }"
19312
19313  # Input might be given as Windows format, start by converting to
19314  # unix format.
19315  new_path="$path"
19316
19317  windows_path="$new_path"
19318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19319    unix_path=`$CYGPATH -u "$windows_path"`
19320    new_path="$unix_path"
19321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19323    new_path="$unix_path"
19324  fi
19325
19326
19327  # Now try to locate executable using which
19328  new_path=`$WHICH "$new_path" 2> /dev/null`
19329
19330  if test "x$new_path" = x; then
19331    # Oops. Which didn't find the executable.
19332    # The splitting of arguments from the executable at a space might have been incorrect,
19333    # since paths with space are more likely in Windows. Give it another try with the whole
19334    # argument.
19335    path="$complete"
19336    arguments="EOL"
19337    new_path="$path"
19338
19339  windows_path="$new_path"
19340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19341    unix_path=`$CYGPATH -u "$windows_path"`
19342    new_path="$unix_path"
19343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19345    new_path="$unix_path"
19346  fi
19347
19348
19349    new_path=`$WHICH "$new_path" 2> /dev/null`
19350    # bat and cmd files are not always considered executable in MSYS causing which
19351    # to not find them
19352    if test "x$new_path" = x \
19353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19355      new_path="$path"
19356
19357  windows_path="$new_path"
19358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19359    unix_path=`$CYGPATH -u "$windows_path"`
19360    new_path="$unix_path"
19361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19363    new_path="$unix_path"
19364  fi
19365
19366    fi
19367
19368    if test "x$new_path" = x; then
19369      # It's still not found. Now this is an unrecoverable error.
19370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19371$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19372      has_space=`$ECHO "$complete" | $GREP " "`
19373      if test "x$has_space" != x; then
19374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19376      fi
19377      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19378    fi
19379  fi
19380
19381  # Now new_path has a complete unix path to the binary
19382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19383    # Keep paths in /bin as-is, but remove trailing .exe if any
19384    new_path="${new_path/%.exe/}"
19385    # Do not save /bin paths to all_fixpath_prefixes!
19386  else
19387    # Not in mixed or Windows style, start by that.
19388    new_path=`cmd //c echo $new_path`
19389
19390  input_path="$new_path"
19391  # Check if we need to convert this using DOS-style short mode. If the path
19392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19393  # take no chances and rewrite it.
19394  # Note: m4 eats our [], so we need to use [ and ] instead.
19395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19396  if test "x$has_forbidden_chars" != x; then
19397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19399  fi
19400
19401    # Output is in $new_path
19402
19403  windows_path="$new_path"
19404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19405    unix_path=`$CYGPATH -u "$windows_path"`
19406    new_path="$unix_path"
19407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19409    new_path="$unix_path"
19410  fi
19411
19412    # remove trailing .exe if any
19413    new_path="${new_path/%.exe/}"
19414
19415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19417  fi
19418
19419    else
19420      # We're on a unix platform. Hooray! :)
19421      # First separate the path from the arguments. This will split at the first
19422      # space.
19423      complete="$FOUND_MAKE"
19424      path="${complete%% *}"
19425      tmp="$complete EOL"
19426      arguments="${tmp#* }"
19427
19428      # Cannot rely on the command "which" here since it doesn't always work.
19429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19430      if test -z "$is_absolute_path"; then
19431        # Path to executable is not absolute. Find it.
19432        IFS_save="$IFS"
19433        IFS=:
19434        for p in $PATH; do
19435          if test -f "$p/$path" && test -x "$p/$path"; then
19436            new_path="$p/$path"
19437            break
19438          fi
19439        done
19440        IFS="$IFS_save"
19441      else
19442        # This is an absolute path, we can use it without further modifications.
19443        new_path="$path"
19444      fi
19445
19446      if test "x$new_path" = x; then
19447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19448$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19449        has_space=`$ECHO "$complete" | $GREP " "`
19450        if test "x$has_space" != x; then
19451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19453        fi
19454        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19455      fi
19456    fi
19457
19458    # Now join together the path and the arguments once again
19459    if test "x$arguments" != xEOL; then
19460      new_complete="$new_path ${arguments% *}"
19461    else
19462      new_complete="$new_path"
19463    fi
19464
19465    if test "x$complete" != "x$new_complete"; then
19466      FOUND_MAKE="$new_complete"
19467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19468$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19469    fi
19470  fi
19471
19472        fi
19473      fi
19474    fi
19475  fi
19476
19477
19478    if test "x$FOUND_MAKE" = x; then
19479      for ac_prog in make
19480do
19481  # Extract the first word of "$ac_prog", so it can be a program name with args.
19482set dummy $ac_prog; ac_word=$2
19483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19484$as_echo_n "checking for $ac_word... " >&6; }
19485if ${ac_cv_path_CHECK_MAKE+:} false; then :
19486  $as_echo_n "(cached) " >&6
19487else
19488  case $CHECK_MAKE in
19489  [\\/]* | ?:[\\/]*)
19490  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19491  ;;
19492  *)
19493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19494for as_dir in $PATH
19495do
19496  IFS=$as_save_IFS
19497  test -z "$as_dir" && as_dir=.
19498    for ac_exec_ext in '' $ac_executable_extensions; do
19499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19500    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19502    break 2
19503  fi
19504done
19505  done
19506IFS=$as_save_IFS
19507
19508  ;;
19509esac
19510fi
19511CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19512if test -n "$CHECK_MAKE"; then
19513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19514$as_echo "$CHECK_MAKE" >&6; }
19515else
19516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19517$as_echo "no" >&6; }
19518fi
19519
19520
19521  test -n "$CHECK_MAKE" && break
19522done
19523
19524
19525  MAKE_CANDIDATE=""$CHECK_MAKE""
19526  DESCRIPTION="make in PATH"
19527
19528  # On Cygwin, we require a newer version of make than on other platforms
19529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19530    MAKE_VERSION_EXPR="-e 4\."
19531    MAKE_REQUIRED_VERSION="4.0"
19532   else
19533    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19534    MAKE_REQUIRED_VERSION="3.81"
19535  fi
19536
19537  if test "x$MAKE_CANDIDATE" != x; then
19538    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19539$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19540    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19541    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19542    if test "x$IS_GNU_MAKE" = x; then
19543      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19544$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19545    else
19546      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19547      if test "x$IS_MODERN_MAKE" = x; then
19548        { $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
19549$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;}
19550      else
19551        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19552          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19553            MAKE_EXPECTED_ENV='cygwin'
19554          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19555            MAKE_EXPECTED_ENV='msys'
19556          else
19557            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19558          fi
19559          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19560          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19561        else
19562          # Not relevant for non-Windows
19563          IS_MAKE_CORRECT_ENV=true
19564        fi
19565        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19566          { $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
19567$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;}
19568        else
19569          FOUND_MAKE=$MAKE_CANDIDATE
19570
19571  # Only process if variable expands to non-empty
19572
19573  if test "x$FOUND_MAKE" != x; then
19574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19575
19576  # First separate the path from the arguments. This will split at the first
19577  # space.
19578  complete="$FOUND_MAKE"
19579  path="${complete%% *}"
19580  tmp="$complete EOL"
19581  arguments="${tmp#* }"
19582
19583  # Input might be given as Windows format, start by converting to
19584  # unix format.
19585  new_path=`$CYGPATH -u "$path"`
19586
19587  # Now try to locate executable using which
19588  new_path=`$WHICH "$new_path" 2> /dev/null`
19589  # bat and cmd files are not always considered executable in cygwin causing which
19590  # to not find them
19591  if test "x$new_path" = x \
19592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19594    new_path=`$CYGPATH -u "$path"`
19595  fi
19596  if test "x$new_path" = x; then
19597    # Oops. Which didn't find the executable.
19598    # The splitting of arguments from the executable at a space might have been incorrect,
19599    # since paths with space are more likely in Windows. Give it another try with the whole
19600    # argument.
19601    path="$complete"
19602    arguments="EOL"
19603    new_path=`$CYGPATH -u "$path"`
19604    new_path=`$WHICH "$new_path" 2> /dev/null`
19605    # bat and cmd files are not always considered executable in cygwin causing which
19606    # to not find them
19607    if test "x$new_path" = x \
19608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19610      new_path=`$CYGPATH -u "$path"`
19611    fi
19612    if test "x$new_path" = x; then
19613      # It's still not found. Now this is an unrecoverable error.
19614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19615$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19616      has_space=`$ECHO "$complete" | $GREP " "`
19617      if test "x$has_space" != x; then
19618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19620      fi
19621      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19622    fi
19623  fi
19624
19625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19628  # "foo.exe" is OK but "foo" is an error.
19629  #
19630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19631  # It is also a way to make sure we got the proper file name for the real test later on.
19632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19633  if test "x$test_shortpath" = x; then
19634    # Short path failed, file does not exist as specified.
19635    # Try adding .exe or .cmd
19636    if test -f "${new_path}.exe"; then
19637      input_to_shortpath="${new_path}.exe"
19638    elif test -f "${new_path}.cmd"; then
19639      input_to_shortpath="${new_path}.cmd"
19640    else
19641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19642$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19646    fi
19647  else
19648    input_to_shortpath="$new_path"
19649  fi
19650
19651  # Call helper function which possibly converts this using DOS-style short mode.
19652  # If so, the updated path is stored in $new_path.
19653  new_path="$input_to_shortpath"
19654
19655  input_path="$input_to_shortpath"
19656  # Check if we need to convert this using DOS-style short mode. If the path
19657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19658  # take no chances and rewrite it.
19659  # Note: m4 eats our [], so we need to use [ and ] instead.
19660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19661  if test "x$has_forbidden_chars" != x; then
19662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19666      # Going to short mode and back again did indeed matter. Since short mode is
19667      # case insensitive, let's make it lowercase to improve readability.
19668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19669      # Now convert it back to Unix-style (cygpath)
19670      input_path=`$CYGPATH -u "$shortmode_path"`
19671      new_path="$input_path"
19672    fi
19673  fi
19674
19675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19676  if test "x$test_cygdrive_prefix" = x; then
19677    # As a simple fix, exclude /usr/bin since it's not a real path.
19678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19680      # a path prefixed by /cygdrive for fixpath to work.
19681      new_path="$CYGWIN_ROOT_PATH$input_path"
19682    fi
19683  fi
19684
19685  # remove trailing .exe if any
19686  new_path="${new_path/%.exe/}"
19687
19688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19689
19690  # First separate the path from the arguments. This will split at the first
19691  # space.
19692  complete="$FOUND_MAKE"
19693  path="${complete%% *}"
19694  tmp="$complete EOL"
19695  arguments="${tmp#* }"
19696
19697  # Input might be given as Windows format, start by converting to
19698  # unix format.
19699  new_path="$path"
19700
19701  windows_path="$new_path"
19702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19703    unix_path=`$CYGPATH -u "$windows_path"`
19704    new_path="$unix_path"
19705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19707    new_path="$unix_path"
19708  fi
19709
19710
19711  # Now try to locate executable using which
19712  new_path=`$WHICH "$new_path" 2> /dev/null`
19713
19714  if test "x$new_path" = x; then
19715    # Oops. Which didn't find the executable.
19716    # The splitting of arguments from the executable at a space might have been incorrect,
19717    # since paths with space are more likely in Windows. Give it another try with the whole
19718    # argument.
19719    path="$complete"
19720    arguments="EOL"
19721    new_path="$path"
19722
19723  windows_path="$new_path"
19724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19725    unix_path=`$CYGPATH -u "$windows_path"`
19726    new_path="$unix_path"
19727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19729    new_path="$unix_path"
19730  fi
19731
19732
19733    new_path=`$WHICH "$new_path" 2> /dev/null`
19734    # bat and cmd files are not always considered executable in MSYS causing which
19735    # to not find them
19736    if test "x$new_path" = x \
19737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19739      new_path="$path"
19740
19741  windows_path="$new_path"
19742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19743    unix_path=`$CYGPATH -u "$windows_path"`
19744    new_path="$unix_path"
19745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19747    new_path="$unix_path"
19748  fi
19749
19750    fi
19751
19752    if test "x$new_path" = x; then
19753      # It's still not found. Now this is an unrecoverable error.
19754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19755$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19756      has_space=`$ECHO "$complete" | $GREP " "`
19757      if test "x$has_space" != x; then
19758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19760      fi
19761      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19762    fi
19763  fi
19764
19765  # Now new_path has a complete unix path to the binary
19766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19767    # Keep paths in /bin as-is, but remove trailing .exe if any
19768    new_path="${new_path/%.exe/}"
19769    # Do not save /bin paths to all_fixpath_prefixes!
19770  else
19771    # Not in mixed or Windows style, start by that.
19772    new_path=`cmd //c echo $new_path`
19773
19774  input_path="$new_path"
19775  # Check if we need to convert this using DOS-style short mode. If the path
19776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19777  # take no chances and rewrite it.
19778  # Note: m4 eats our [], so we need to use [ and ] instead.
19779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19780  if test "x$has_forbidden_chars" != x; then
19781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19783  fi
19784
19785    # Output is in $new_path
19786
19787  windows_path="$new_path"
19788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19789    unix_path=`$CYGPATH -u "$windows_path"`
19790    new_path="$unix_path"
19791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19793    new_path="$unix_path"
19794  fi
19795
19796    # remove trailing .exe if any
19797    new_path="${new_path/%.exe/}"
19798
19799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19801  fi
19802
19803    else
19804      # We're on a unix platform. Hooray! :)
19805      # First separate the path from the arguments. This will split at the first
19806      # space.
19807      complete="$FOUND_MAKE"
19808      path="${complete%% *}"
19809      tmp="$complete EOL"
19810      arguments="${tmp#* }"
19811
19812      # Cannot rely on the command "which" here since it doesn't always work.
19813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19814      if test -z "$is_absolute_path"; then
19815        # Path to executable is not absolute. Find it.
19816        IFS_save="$IFS"
19817        IFS=:
19818        for p in $PATH; do
19819          if test -f "$p/$path" && test -x "$p/$path"; then
19820            new_path="$p/$path"
19821            break
19822          fi
19823        done
19824        IFS="$IFS_save"
19825      else
19826        # This is an absolute path, we can use it without further modifications.
19827        new_path="$path"
19828      fi
19829
19830      if test "x$new_path" = x; then
19831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19833        has_space=`$ECHO "$complete" | $GREP " "`
19834        if test "x$has_space" != x; then
19835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19837        fi
19838        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19839      fi
19840    fi
19841
19842    # Now join together the path and the arguments once again
19843    if test "x$arguments" != xEOL; then
19844      new_complete="$new_path ${arguments% *}"
19845    else
19846      new_complete="$new_path"
19847    fi
19848
19849    if test "x$complete" != "x$new_complete"; then
19850      FOUND_MAKE="$new_complete"
19851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19852$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19853    fi
19854  fi
19855
19856        fi
19857      fi
19858    fi
19859  fi
19860
19861    fi
19862
19863    if test "x$FOUND_MAKE" = x; then
19864      if test "x$TOOLCHAIN_PATH" != x; then
19865        # We have a toolchain path, check that as well before giving up.
19866        OLD_PATH=$PATH
19867        PATH=$TOOLCHAIN_PATH:$PATH
19868        for ac_prog in gmake
19869do
19870  # Extract the first word of "$ac_prog", so it can be a program name with args.
19871set dummy $ac_prog; ac_word=$2
19872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19873$as_echo_n "checking for $ac_word... " >&6; }
19874if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19875  $as_echo_n "(cached) " >&6
19876else
19877  case $CHECK_TOOLSDIR_GMAKE in
19878  [\\/]* | ?:[\\/]*)
19879  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19880  ;;
19881  *)
19882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19883for as_dir in $PATH
19884do
19885  IFS=$as_save_IFS
19886  test -z "$as_dir" && as_dir=.
19887    for ac_exec_ext in '' $ac_executable_extensions; do
19888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19889    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19891    break 2
19892  fi
19893done
19894  done
19895IFS=$as_save_IFS
19896
19897  ;;
19898esac
19899fi
19900CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19901if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19903$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19904else
19905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19906$as_echo "no" >&6; }
19907fi
19908
19909
19910  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19911done
19912
19913
19914  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19915  DESCRIPTION="gmake in tools-dir"
19916
19917  # On Cygwin, we require a newer version of make than on other platforms
19918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19919    MAKE_VERSION_EXPR="-e 4\."
19920    MAKE_REQUIRED_VERSION="4.0"
19921   else
19922    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19923    MAKE_REQUIRED_VERSION="3.81"
19924  fi
19925
19926  if test "x$MAKE_CANDIDATE" != x; then
19927    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19928$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19929    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19930    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19931    if test "x$IS_GNU_MAKE" = x; then
19932      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19933$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19934    else
19935      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19936      if test "x$IS_MODERN_MAKE" = x; then
19937        { $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
19938$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;}
19939      else
19940        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19941          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19942            MAKE_EXPECTED_ENV='cygwin'
19943          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19944            MAKE_EXPECTED_ENV='msys'
19945          else
19946            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19947          fi
19948          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19949          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19950        else
19951          # Not relevant for non-Windows
19952          IS_MAKE_CORRECT_ENV=true
19953        fi
19954        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19955          { $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
19956$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;}
19957        else
19958          FOUND_MAKE=$MAKE_CANDIDATE
19959
19960  # Only process if variable expands to non-empty
19961
19962  if test "x$FOUND_MAKE" != x; then
19963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19964
19965  # First separate the path from the arguments. This will split at the first
19966  # space.
19967  complete="$FOUND_MAKE"
19968  path="${complete%% *}"
19969  tmp="$complete EOL"
19970  arguments="${tmp#* }"
19971
19972  # Input might be given as Windows format, start by converting to
19973  # unix format.
19974  new_path=`$CYGPATH -u "$path"`
19975
19976  # Now try to locate executable using which
19977  new_path=`$WHICH "$new_path" 2> /dev/null`
19978  # bat and cmd files are not always considered executable in cygwin causing which
19979  # to not find them
19980  if test "x$new_path" = x \
19981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19983    new_path=`$CYGPATH -u "$path"`
19984  fi
19985  if test "x$new_path" = x; then
19986    # Oops. Which didn't find the executable.
19987    # The splitting of arguments from the executable at a space might have been incorrect,
19988    # since paths with space are more likely in Windows. Give it another try with the whole
19989    # argument.
19990    path="$complete"
19991    arguments="EOL"
19992    new_path=`$CYGPATH -u "$path"`
19993    new_path=`$WHICH "$new_path" 2> /dev/null`
19994    # bat and cmd files are not always considered executable in cygwin causing which
19995    # to not find them
19996    if test "x$new_path" = x \
19997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19999      new_path=`$CYGPATH -u "$path"`
20000    fi
20001    if test "x$new_path" = x; then
20002      # It's still not found. Now this is an unrecoverable error.
20003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20005      has_space=`$ECHO "$complete" | $GREP " "`
20006      if test "x$has_space" != x; then
20007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20009      fi
20010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20011    fi
20012  fi
20013
20014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20017  # "foo.exe" is OK but "foo" is an error.
20018  #
20019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20020  # It is also a way to make sure we got the proper file name for the real test later on.
20021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20022  if test "x$test_shortpath" = x; then
20023    # Short path failed, file does not exist as specified.
20024    # Try adding .exe or .cmd
20025    if test -f "${new_path}.exe"; then
20026      input_to_shortpath="${new_path}.exe"
20027    elif test -f "${new_path}.cmd"; then
20028      input_to_shortpath="${new_path}.cmd"
20029    else
20030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20035    fi
20036  else
20037    input_to_shortpath="$new_path"
20038  fi
20039
20040  # Call helper function which possibly converts this using DOS-style short mode.
20041  # If so, the updated path is stored in $new_path.
20042  new_path="$input_to_shortpath"
20043
20044  input_path="$input_to_shortpath"
20045  # Check if we need to convert this using DOS-style short mode. If the path
20046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20047  # take no chances and rewrite it.
20048  # Note: m4 eats our [], so we need to use [ and ] instead.
20049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20050  if test "x$has_forbidden_chars" != x; then
20051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20055      # Going to short mode and back again did indeed matter. Since short mode is
20056      # case insensitive, let's make it lowercase to improve readability.
20057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20058      # Now convert it back to Unix-style (cygpath)
20059      input_path=`$CYGPATH -u "$shortmode_path"`
20060      new_path="$input_path"
20061    fi
20062  fi
20063
20064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20065  if test "x$test_cygdrive_prefix" = x; then
20066    # As a simple fix, exclude /usr/bin since it's not a real path.
20067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20069      # a path prefixed by /cygdrive for fixpath to work.
20070      new_path="$CYGWIN_ROOT_PATH$input_path"
20071    fi
20072  fi
20073
20074  # remove trailing .exe if any
20075  new_path="${new_path/%.exe/}"
20076
20077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20078
20079  # First separate the path from the arguments. This will split at the first
20080  # space.
20081  complete="$FOUND_MAKE"
20082  path="${complete%% *}"
20083  tmp="$complete EOL"
20084  arguments="${tmp#* }"
20085
20086  # Input might be given as Windows format, start by converting to
20087  # unix format.
20088  new_path="$path"
20089
20090  windows_path="$new_path"
20091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20092    unix_path=`$CYGPATH -u "$windows_path"`
20093    new_path="$unix_path"
20094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20096    new_path="$unix_path"
20097  fi
20098
20099
20100  # Now try to locate executable using which
20101  new_path=`$WHICH "$new_path" 2> /dev/null`
20102
20103  if test "x$new_path" = x; then
20104    # Oops. Which didn't find the executable.
20105    # The splitting of arguments from the executable at a space might have been incorrect,
20106    # since paths with space are more likely in Windows. Give it another try with the whole
20107    # argument.
20108    path="$complete"
20109    arguments="EOL"
20110    new_path="$path"
20111
20112  windows_path="$new_path"
20113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20114    unix_path=`$CYGPATH -u "$windows_path"`
20115    new_path="$unix_path"
20116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20118    new_path="$unix_path"
20119  fi
20120
20121
20122    new_path=`$WHICH "$new_path" 2> /dev/null`
20123    # bat and cmd files are not always considered executable in MSYS causing which
20124    # to not find them
20125    if test "x$new_path" = x \
20126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20128      new_path="$path"
20129
20130  windows_path="$new_path"
20131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20132    unix_path=`$CYGPATH -u "$windows_path"`
20133    new_path="$unix_path"
20134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20136    new_path="$unix_path"
20137  fi
20138
20139    fi
20140
20141    if test "x$new_path" = x; then
20142      # It's still not found. Now this is an unrecoverable error.
20143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20145      has_space=`$ECHO "$complete" | $GREP " "`
20146      if test "x$has_space" != x; then
20147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20149      fi
20150      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20151    fi
20152  fi
20153
20154  # Now new_path has a complete unix path to the binary
20155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20156    # Keep paths in /bin as-is, but remove trailing .exe if any
20157    new_path="${new_path/%.exe/}"
20158    # Do not save /bin paths to all_fixpath_prefixes!
20159  else
20160    # Not in mixed or Windows style, start by that.
20161    new_path=`cmd //c echo $new_path`
20162
20163  input_path="$new_path"
20164  # Check if we need to convert this using DOS-style short mode. If the path
20165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20166  # take no chances and rewrite it.
20167  # Note: m4 eats our [], so we need to use [ and ] instead.
20168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20169  if test "x$has_forbidden_chars" != x; then
20170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20172  fi
20173
20174    # Output is in $new_path
20175
20176  windows_path="$new_path"
20177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20178    unix_path=`$CYGPATH -u "$windows_path"`
20179    new_path="$unix_path"
20180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20182    new_path="$unix_path"
20183  fi
20184
20185    # remove trailing .exe if any
20186    new_path="${new_path/%.exe/}"
20187
20188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20190  fi
20191
20192    else
20193      # We're on a unix platform. Hooray! :)
20194      # First separate the path from the arguments. This will split at the first
20195      # space.
20196      complete="$FOUND_MAKE"
20197      path="${complete%% *}"
20198      tmp="$complete EOL"
20199      arguments="${tmp#* }"
20200
20201      # Cannot rely on the command "which" here since it doesn't always work.
20202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20203      if test -z "$is_absolute_path"; then
20204        # Path to executable is not absolute. Find it.
20205        IFS_save="$IFS"
20206        IFS=:
20207        for p in $PATH; do
20208          if test -f "$p/$path" && test -x "$p/$path"; then
20209            new_path="$p/$path"
20210            break
20211          fi
20212        done
20213        IFS="$IFS_save"
20214      else
20215        # This is an absolute path, we can use it without further modifications.
20216        new_path="$path"
20217      fi
20218
20219      if test "x$new_path" = x; then
20220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20221$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20222        has_space=`$ECHO "$complete" | $GREP " "`
20223        if test "x$has_space" != x; then
20224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20226        fi
20227        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20228      fi
20229    fi
20230
20231    # Now join together the path and the arguments once again
20232    if test "x$arguments" != xEOL; then
20233      new_complete="$new_path ${arguments% *}"
20234    else
20235      new_complete="$new_path"
20236    fi
20237
20238    if test "x$complete" != "x$new_complete"; then
20239      FOUND_MAKE="$new_complete"
20240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20241$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20242    fi
20243  fi
20244
20245        fi
20246      fi
20247    fi
20248  fi
20249
20250        if test "x$FOUND_MAKE" = x; then
20251          for ac_prog in make
20252do
20253  # Extract the first word of "$ac_prog", so it can be a program name with args.
20254set dummy $ac_prog; ac_word=$2
20255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20256$as_echo_n "checking for $ac_word... " >&6; }
20257if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20258  $as_echo_n "(cached) " >&6
20259else
20260  case $CHECK_TOOLSDIR_MAKE in
20261  [\\/]* | ?:[\\/]*)
20262  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20263  ;;
20264  *)
20265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20266for as_dir in $PATH
20267do
20268  IFS=$as_save_IFS
20269  test -z "$as_dir" && as_dir=.
20270    for ac_exec_ext in '' $ac_executable_extensions; do
20271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20272    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20274    break 2
20275  fi
20276done
20277  done
20278IFS=$as_save_IFS
20279
20280  ;;
20281esac
20282fi
20283CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20284if test -n "$CHECK_TOOLSDIR_MAKE"; then
20285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20286$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20287else
20288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20289$as_echo "no" >&6; }
20290fi
20291
20292
20293  test -n "$CHECK_TOOLSDIR_MAKE" && break
20294done
20295
20296
20297  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20298  DESCRIPTION="make in tools-dir"
20299
20300  # On Cygwin, we require a newer version of make than on other platforms
20301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20302    MAKE_VERSION_EXPR="-e 4\."
20303    MAKE_REQUIRED_VERSION="4.0"
20304   else
20305    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20306    MAKE_REQUIRED_VERSION="3.81"
20307  fi
20308
20309  if test "x$MAKE_CANDIDATE" != x; then
20310    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20311$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20312    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20313    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20314    if test "x$IS_GNU_MAKE" = x; then
20315      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20316$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20317    else
20318      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20319      if test "x$IS_MODERN_MAKE" = x; then
20320        { $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
20321$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;}
20322      else
20323        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20324          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20325            MAKE_EXPECTED_ENV='cygwin'
20326          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20327            MAKE_EXPECTED_ENV='msys'
20328          else
20329            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20330          fi
20331          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20332          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20333        else
20334          # Not relevant for non-Windows
20335          IS_MAKE_CORRECT_ENV=true
20336        fi
20337        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20338          { $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
20339$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;}
20340        else
20341          FOUND_MAKE=$MAKE_CANDIDATE
20342
20343  # Only process if variable expands to non-empty
20344
20345  if test "x$FOUND_MAKE" != x; then
20346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20347
20348  # First separate the path from the arguments. This will split at the first
20349  # space.
20350  complete="$FOUND_MAKE"
20351  path="${complete%% *}"
20352  tmp="$complete EOL"
20353  arguments="${tmp#* }"
20354
20355  # Input might be given as Windows format, start by converting to
20356  # unix format.
20357  new_path=`$CYGPATH -u "$path"`
20358
20359  # Now try to locate executable using which
20360  new_path=`$WHICH "$new_path" 2> /dev/null`
20361  # bat and cmd files are not always considered executable in cygwin causing which
20362  # to not find them
20363  if test "x$new_path" = x \
20364      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20365      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20366    new_path=`$CYGPATH -u "$path"`
20367  fi
20368  if test "x$new_path" = x; then
20369    # Oops. Which didn't find the executable.
20370    # The splitting of arguments from the executable at a space might have been incorrect,
20371    # since paths with space are more likely in Windows. Give it another try with the whole
20372    # argument.
20373    path="$complete"
20374    arguments="EOL"
20375    new_path=`$CYGPATH -u "$path"`
20376    new_path=`$WHICH "$new_path" 2> /dev/null`
20377    # bat and cmd files are not always considered executable in cygwin causing which
20378    # to not find them
20379    if test "x$new_path" = x \
20380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20382      new_path=`$CYGPATH -u "$path"`
20383    fi
20384    if test "x$new_path" = x; then
20385      # It's still not found. Now this is an unrecoverable error.
20386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20388      has_space=`$ECHO "$complete" | $GREP " "`
20389      if test "x$has_space" != x; then
20390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20392      fi
20393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20394    fi
20395  fi
20396
20397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20400  # "foo.exe" is OK but "foo" is an error.
20401  #
20402  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20403  # It is also a way to make sure we got the proper file name for the real test later on.
20404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20405  if test "x$test_shortpath" = x; then
20406    # Short path failed, file does not exist as specified.
20407    # Try adding .exe or .cmd
20408    if test -f "${new_path}.exe"; then
20409      input_to_shortpath="${new_path}.exe"
20410    elif test -f "${new_path}.cmd"; then
20411      input_to_shortpath="${new_path}.cmd"
20412    else
20413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20414$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20415      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20416$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20418    fi
20419  else
20420    input_to_shortpath="$new_path"
20421  fi
20422
20423  # Call helper function which possibly converts this using DOS-style short mode.
20424  # If so, the updated path is stored in $new_path.
20425  new_path="$input_to_shortpath"
20426
20427  input_path="$input_to_shortpath"
20428  # Check if we need to convert this using DOS-style short mode. If the path
20429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20430  # take no chances and rewrite it.
20431  # Note: m4 eats our [], so we need to use [ and ] instead.
20432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20433  if test "x$has_forbidden_chars" != x; then
20434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20438      # Going to short mode and back again did indeed matter. Since short mode is
20439      # case insensitive, let's make it lowercase to improve readability.
20440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20441      # Now convert it back to Unix-style (cygpath)
20442      input_path=`$CYGPATH -u "$shortmode_path"`
20443      new_path="$input_path"
20444    fi
20445  fi
20446
20447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20448  if test "x$test_cygdrive_prefix" = x; then
20449    # As a simple fix, exclude /usr/bin since it's not a real path.
20450    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20452      # a path prefixed by /cygdrive for fixpath to work.
20453      new_path="$CYGWIN_ROOT_PATH$input_path"
20454    fi
20455  fi
20456
20457  # remove trailing .exe if any
20458  new_path="${new_path/%.exe/}"
20459
20460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20461
20462  # First separate the path from the arguments. This will split at the first
20463  # space.
20464  complete="$FOUND_MAKE"
20465  path="${complete%% *}"
20466  tmp="$complete EOL"
20467  arguments="${tmp#* }"
20468
20469  # Input might be given as Windows format, start by converting to
20470  # unix format.
20471  new_path="$path"
20472
20473  windows_path="$new_path"
20474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20475    unix_path=`$CYGPATH -u "$windows_path"`
20476    new_path="$unix_path"
20477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20479    new_path="$unix_path"
20480  fi
20481
20482
20483  # Now try to locate executable using which
20484  new_path=`$WHICH "$new_path" 2> /dev/null`
20485
20486  if test "x$new_path" = x; then
20487    # Oops. Which didn't find the executable.
20488    # The splitting of arguments from the executable at a space might have been incorrect,
20489    # since paths with space are more likely in Windows. Give it another try with the whole
20490    # argument.
20491    path="$complete"
20492    arguments="EOL"
20493    new_path="$path"
20494
20495  windows_path="$new_path"
20496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20497    unix_path=`$CYGPATH -u "$windows_path"`
20498    new_path="$unix_path"
20499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20501    new_path="$unix_path"
20502  fi
20503
20504
20505    new_path=`$WHICH "$new_path" 2> /dev/null`
20506    # bat and cmd files are not always considered executable in MSYS causing which
20507    # to not find them
20508    if test "x$new_path" = x \
20509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20511      new_path="$path"
20512
20513  windows_path="$new_path"
20514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20515    unix_path=`$CYGPATH -u "$windows_path"`
20516    new_path="$unix_path"
20517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20519    new_path="$unix_path"
20520  fi
20521
20522    fi
20523
20524    if test "x$new_path" = x; then
20525      # It's still not found. Now this is an unrecoverable error.
20526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20527$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20528      has_space=`$ECHO "$complete" | $GREP " "`
20529      if test "x$has_space" != x; then
20530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20532      fi
20533      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20534    fi
20535  fi
20536
20537  # Now new_path has a complete unix path to the binary
20538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20539    # Keep paths in /bin as-is, but remove trailing .exe if any
20540    new_path="${new_path/%.exe/}"
20541    # Do not save /bin paths to all_fixpath_prefixes!
20542  else
20543    # Not in mixed or Windows style, start by that.
20544    new_path=`cmd //c echo $new_path`
20545
20546  input_path="$new_path"
20547  # Check if we need to convert this using DOS-style short mode. If the path
20548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20549  # take no chances and rewrite it.
20550  # Note: m4 eats our [], so we need to use [ and ] instead.
20551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20552  if test "x$has_forbidden_chars" != x; then
20553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20555  fi
20556
20557    # Output is in $new_path
20558
20559  windows_path="$new_path"
20560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20561    unix_path=`$CYGPATH -u "$windows_path"`
20562    new_path="$unix_path"
20563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20565    new_path="$unix_path"
20566  fi
20567
20568    # remove trailing .exe if any
20569    new_path="${new_path/%.exe/}"
20570
20571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20573  fi
20574
20575    else
20576      # We're on a unix platform. Hooray! :)
20577      # First separate the path from the arguments. This will split at the first
20578      # space.
20579      complete="$FOUND_MAKE"
20580      path="${complete%% *}"
20581      tmp="$complete EOL"
20582      arguments="${tmp#* }"
20583
20584      # Cannot rely on the command "which" here since it doesn't always work.
20585      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20586      if test -z "$is_absolute_path"; then
20587        # Path to executable is not absolute. Find it.
20588        IFS_save="$IFS"
20589        IFS=:
20590        for p in $PATH; do
20591          if test -f "$p/$path" && test -x "$p/$path"; then
20592            new_path="$p/$path"
20593            break
20594          fi
20595        done
20596        IFS="$IFS_save"
20597      else
20598        # This is an absolute path, we can use it without further modifications.
20599        new_path="$path"
20600      fi
20601
20602      if test "x$new_path" = x; then
20603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20604$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20605        has_space=`$ECHO "$complete" | $GREP " "`
20606        if test "x$has_space" != x; then
20607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20609        fi
20610        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20611      fi
20612    fi
20613
20614    # Now join together the path and the arguments once again
20615    if test "x$arguments" != xEOL; then
20616      new_complete="$new_path ${arguments% *}"
20617    else
20618      new_complete="$new_path"
20619    fi
20620
20621    if test "x$complete" != "x$new_complete"; then
20622      FOUND_MAKE="$new_complete"
20623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20624$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20625    fi
20626  fi
20627
20628        fi
20629      fi
20630    fi
20631  fi
20632
20633        fi
20634        PATH=$OLD_PATH
20635      fi
20636    fi
20637
20638    if test "x$FOUND_MAKE" = x; then
20639      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
20640    fi
20641
20642    else
20643      # If it succeeded, then it was overridden by the user. We will use it
20644      # for the tool.
20645
20646      # First remove it from the list of overridden variables, so we can test
20647      # for unknown variables in the end.
20648      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20649
20650      # Check if we try to supply an empty value
20651      if test "x$MAKE" = x; then
20652        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20653$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20654        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20655$as_echo_n "checking for MAKE... " >&6; }
20656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20657$as_echo "disabled" >&6; }
20658      else
20659        # Check if the provided tool contains a complete path.
20660        tool_specified="$MAKE"
20661        tool_basename="${tool_specified##*/}"
20662        if test "x$tool_basename" = "x$tool_specified"; then
20663          # A command without a complete path is provided, search $PATH.
20664          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20665$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20666          # Extract the first word of "$tool_basename", so it can be a program name with args.
20667set dummy $tool_basename; ac_word=$2
20668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20669$as_echo_n "checking for $ac_word... " >&6; }
20670if ${ac_cv_path_MAKE+:} false; then :
20671  $as_echo_n "(cached) " >&6
20672else
20673  case $MAKE in
20674  [\\/]* | ?:[\\/]*)
20675  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20676  ;;
20677  *)
20678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20679for as_dir in $PATH
20680do
20681  IFS=$as_save_IFS
20682  test -z "$as_dir" && as_dir=.
20683    for ac_exec_ext in '' $ac_executable_extensions; do
20684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20685    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20687    break 2
20688  fi
20689done
20690  done
20691IFS=$as_save_IFS
20692
20693  ;;
20694esac
20695fi
20696MAKE=$ac_cv_path_MAKE
20697if test -n "$MAKE"; then
20698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20699$as_echo "$MAKE" >&6; }
20700else
20701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20702$as_echo "no" >&6; }
20703fi
20704
20705
20706          if test "x$MAKE" = x; then
20707            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20708          fi
20709        else
20710          # Otherwise we believe it is a complete path. Use it as it is.
20711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20712$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20713          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20714$as_echo_n "checking for MAKE... " >&6; }
20715          if test ! -x "$tool_specified"; then
20716            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20717$as_echo "not found" >&6; }
20718            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20719          fi
20720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20721$as_echo "$tool_specified" >&6; }
20722        fi
20723      fi
20724    fi
20725
20726    # If MAKE was set by user, verify the version
20727
20728  MAKE_CANDIDATE=""$MAKE""
20729  DESCRIPTION="user supplied MAKE=$MAKE"
20730
20731  # On Cygwin, we require a newer version of make than on other platforms
20732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20733    MAKE_VERSION_EXPR="-e 4\."
20734    MAKE_REQUIRED_VERSION="4.0"
20735   else
20736    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20737    MAKE_REQUIRED_VERSION="3.81"
20738  fi
20739
20740  if test "x$MAKE_CANDIDATE" != x; then
20741    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20742$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20743    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20744    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20745    if test "x$IS_GNU_MAKE" = x; then
20746      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20747$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20748    else
20749      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20750      if test "x$IS_MODERN_MAKE" = x; then
20751        { $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
20752$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;}
20753      else
20754        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20755          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20756            MAKE_EXPECTED_ENV='cygwin'
20757          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20758            MAKE_EXPECTED_ENV='msys'
20759          else
20760            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20761          fi
20762          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20763          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20764        else
20765          # Not relevant for non-Windows
20766          IS_MAKE_CORRECT_ENV=true
20767        fi
20768        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20769          { $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
20770$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;}
20771        else
20772          FOUND_MAKE=$MAKE_CANDIDATE
20773
20774  # Only process if variable expands to non-empty
20775
20776  if test "x$FOUND_MAKE" != x; then
20777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20778
20779  # First separate the path from the arguments. This will split at the first
20780  # space.
20781  complete="$FOUND_MAKE"
20782  path="${complete%% *}"
20783  tmp="$complete EOL"
20784  arguments="${tmp#* }"
20785
20786  # Input might be given as Windows format, start by converting to
20787  # unix format.
20788  new_path=`$CYGPATH -u "$path"`
20789
20790  # Now try to locate executable using which
20791  new_path=`$WHICH "$new_path" 2> /dev/null`
20792  # bat and cmd files are not always considered executable in cygwin causing which
20793  # to not find them
20794  if test "x$new_path" = x \
20795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20797    new_path=`$CYGPATH -u "$path"`
20798  fi
20799  if test "x$new_path" = x; then
20800    # Oops. Which didn't find the executable.
20801    # The splitting of arguments from the executable at a space might have been incorrect,
20802    # since paths with space are more likely in Windows. Give it another try with the whole
20803    # argument.
20804    path="$complete"
20805    arguments="EOL"
20806    new_path=`$CYGPATH -u "$path"`
20807    new_path=`$WHICH "$new_path" 2> /dev/null`
20808    # bat and cmd files are not always considered executable in cygwin causing which
20809    # to not find them
20810    if test "x$new_path" = x \
20811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20813      new_path=`$CYGPATH -u "$path"`
20814    fi
20815    if test "x$new_path" = x; then
20816      # It's still not found. Now this is an unrecoverable error.
20817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20818$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20819      has_space=`$ECHO "$complete" | $GREP " "`
20820      if test "x$has_space" != x; then
20821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20823      fi
20824      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20825    fi
20826  fi
20827
20828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20831  # "foo.exe" is OK but "foo" is an error.
20832  #
20833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20834  # It is also a way to make sure we got the proper file name for the real test later on.
20835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20836  if test "x$test_shortpath" = x; then
20837    # Short path failed, file does not exist as specified.
20838    # Try adding .exe or .cmd
20839    if test -f "${new_path}.exe"; then
20840      input_to_shortpath="${new_path}.exe"
20841    elif test -f "${new_path}.cmd"; then
20842      input_to_shortpath="${new_path}.cmd"
20843    else
20844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20845$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20848      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20849    fi
20850  else
20851    input_to_shortpath="$new_path"
20852  fi
20853
20854  # Call helper function which possibly converts this using DOS-style short mode.
20855  # If so, the updated path is stored in $new_path.
20856  new_path="$input_to_shortpath"
20857
20858  input_path="$input_to_shortpath"
20859  # Check if we need to convert this using DOS-style short mode. If the path
20860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20861  # take no chances and rewrite it.
20862  # Note: m4 eats our [], so we need to use [ and ] instead.
20863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20864  if test "x$has_forbidden_chars" != x; then
20865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20869      # Going to short mode and back again did indeed matter. Since short mode is
20870      # case insensitive, let's make it lowercase to improve readability.
20871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20872      # Now convert it back to Unix-style (cygpath)
20873      input_path=`$CYGPATH -u "$shortmode_path"`
20874      new_path="$input_path"
20875    fi
20876  fi
20877
20878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20879  if test "x$test_cygdrive_prefix" = x; then
20880    # As a simple fix, exclude /usr/bin since it's not a real path.
20881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20883      # a path prefixed by /cygdrive for fixpath to work.
20884      new_path="$CYGWIN_ROOT_PATH$input_path"
20885    fi
20886  fi
20887
20888  # remove trailing .exe if any
20889  new_path="${new_path/%.exe/}"
20890
20891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20892
20893  # First separate the path from the arguments. This will split at the first
20894  # space.
20895  complete="$FOUND_MAKE"
20896  path="${complete%% *}"
20897  tmp="$complete EOL"
20898  arguments="${tmp#* }"
20899
20900  # Input might be given as Windows format, start by converting to
20901  # unix format.
20902  new_path="$path"
20903
20904  windows_path="$new_path"
20905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20906    unix_path=`$CYGPATH -u "$windows_path"`
20907    new_path="$unix_path"
20908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20910    new_path="$unix_path"
20911  fi
20912
20913
20914  # Now try to locate executable using which
20915  new_path=`$WHICH "$new_path" 2> /dev/null`
20916
20917  if test "x$new_path" = x; then
20918    # Oops. Which didn't find the executable.
20919    # The splitting of arguments from the executable at a space might have been incorrect,
20920    # since paths with space are more likely in Windows. Give it another try with the whole
20921    # argument.
20922    path="$complete"
20923    arguments="EOL"
20924    new_path="$path"
20925
20926  windows_path="$new_path"
20927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20928    unix_path=`$CYGPATH -u "$windows_path"`
20929    new_path="$unix_path"
20930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20932    new_path="$unix_path"
20933  fi
20934
20935
20936    new_path=`$WHICH "$new_path" 2> /dev/null`
20937    # bat and cmd files are not always considered executable in MSYS causing which
20938    # to not find them
20939    if test "x$new_path" = x \
20940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20942      new_path="$path"
20943
20944  windows_path="$new_path"
20945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20946    unix_path=`$CYGPATH -u "$windows_path"`
20947    new_path="$unix_path"
20948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20950    new_path="$unix_path"
20951  fi
20952
20953    fi
20954
20955    if test "x$new_path" = x; then
20956      # It's still not found. Now this is an unrecoverable error.
20957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20958$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20959      has_space=`$ECHO "$complete" | $GREP " "`
20960      if test "x$has_space" != x; then
20961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20963      fi
20964      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20965    fi
20966  fi
20967
20968  # Now new_path has a complete unix path to the binary
20969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20970    # Keep paths in /bin as-is, but remove trailing .exe if any
20971    new_path="${new_path/%.exe/}"
20972    # Do not save /bin paths to all_fixpath_prefixes!
20973  else
20974    # Not in mixed or Windows style, start by that.
20975    new_path=`cmd //c echo $new_path`
20976
20977  input_path="$new_path"
20978  # Check if we need to convert this using DOS-style short mode. If the path
20979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20980  # take no chances and rewrite it.
20981  # Note: m4 eats our [], so we need to use [ and ] instead.
20982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20983  if test "x$has_forbidden_chars" != x; then
20984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20986  fi
20987
20988    # Output is in $new_path
20989
20990  windows_path="$new_path"
20991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20992    unix_path=`$CYGPATH -u "$windows_path"`
20993    new_path="$unix_path"
20994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20996    new_path="$unix_path"
20997  fi
20998
20999    # remove trailing .exe if any
21000    new_path="${new_path/%.exe/}"
21001
21002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21004  fi
21005
21006    else
21007      # We're on a unix platform. Hooray! :)
21008      # First separate the path from the arguments. This will split at the first
21009      # space.
21010      complete="$FOUND_MAKE"
21011      path="${complete%% *}"
21012      tmp="$complete EOL"
21013      arguments="${tmp#* }"
21014
21015      # Cannot rely on the command "which" here since it doesn't always work.
21016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21017      if test -z "$is_absolute_path"; then
21018        # Path to executable is not absolute. Find it.
21019        IFS_save="$IFS"
21020        IFS=:
21021        for p in $PATH; do
21022          if test -f "$p/$path" && test -x "$p/$path"; then
21023            new_path="$p/$path"
21024            break
21025          fi
21026        done
21027        IFS="$IFS_save"
21028      else
21029        # This is an absolute path, we can use it without further modifications.
21030        new_path="$path"
21031      fi
21032
21033      if test "x$new_path" = x; then
21034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21035$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21036        has_space=`$ECHO "$complete" | $GREP " "`
21037        if test "x$has_space" != x; then
21038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21040        fi
21041        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21042      fi
21043    fi
21044
21045    # Now join together the path and the arguments once again
21046    if test "x$arguments" != xEOL; then
21047      new_complete="$new_path ${arguments% *}"
21048    else
21049      new_complete="$new_path"
21050    fi
21051
21052    if test "x$complete" != "x$new_complete"; then
21053      FOUND_MAKE="$new_complete"
21054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21055$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21056    fi
21057  fi
21058
21059        fi
21060      fi
21061    fi
21062  fi
21063
21064    if test "x$FOUND_MAKE" = x; then
21065      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21066    fi
21067
21068  fi
21069
21070
21071  MAKE=$FOUND_MAKE
21072
21073  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21074$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21075
21076
21077  # Check if make supports the output sync option and if so, setup using it.
21078  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21079$as_echo_n "checking if make --output-sync is supported... " >&6; }
21080  if $MAKE --version -O > /dev/null 2>&1; then
21081    OUTPUT_SYNC_SUPPORTED=true
21082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21083$as_echo "yes" >&6; }
21084    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21085$as_echo_n "checking for output-sync value... " >&6; }
21086
21087# Check whether --with-output-sync was given.
21088if test "${with_output_sync+set}" = set; then :
21089  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21090fi
21091
21092    if test "x$OUTPUT_SYNC" = "x"; then
21093      OUTPUT_SYNC=none
21094    fi
21095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21096$as_echo "$OUTPUT_SYNC" >&6; }
21097    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21098      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21099    fi
21100  else
21101    OUTPUT_SYNC_SUPPORTED=false
21102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21103$as_echo "no" >&6; }
21104  fi
21105
21106
21107
21108
21109
21110
21111  # Test if find supports -delete
21112  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21113$as_echo_n "checking if find supports -delete... " >&6; }
21114  FIND_DELETE="-delete"
21115
21116  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21117
21118  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21119
21120  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21121  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21122    # No, it does not.
21123    $RM $DELETEDIR/TestIfFindSupportsDelete
21124    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21125      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21126      FIND_DELETE="-print | $XARGS $RM"
21127    else
21128      FIND_DELETE="-exec $RM \{\} \+"
21129    fi
21130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21131$as_echo "no" >&6; }
21132  else
21133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21134$as_echo "yes" >&6; }
21135  fi
21136  $RMDIR $DELETEDIR
21137
21138
21139
21140  # Test which kind of tar was found
21141  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21142    TAR_TYPE="gnu"
21143  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21144    TAR_TYPE="bsd"
21145  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21146    TAR_TYPE="solaris"
21147  fi
21148  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21149$as_echo_n "checking what type of tar was found... " >&6; }
21150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21151$as_echo "$TAR_TYPE" >&6; }
21152
21153  TAR_CREATE_FILE_PARAM=""
21154
21155  if test "x$TAR_TYPE" = "xgnu"; then
21156    TAR_INCLUDE_PARAM="T"
21157    TAR_SUPPORTS_TRANSFORM="true"
21158    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21159      # When using gnu tar for Solaris targets, need to use compatibility mode
21160      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21161    fi
21162  else
21163    TAR_INCLUDE_PARAM="I"
21164    TAR_SUPPORTS_TRANSFORM="false"
21165  fi
21166
21167
21168
21169
21170
21171
21172  # These tools might not be installed by default,
21173  # need hint on how to install them.
21174
21175
21176
21177  # Publish this variable in the help.
21178
21179
21180  if [ -z "${UNZIP+x}" ]; then
21181    # The variable is not set by user, try to locate tool using the code snippet
21182    for ac_prog in unzip
21183do
21184  # Extract the first word of "$ac_prog", so it can be a program name with args.
21185set dummy $ac_prog; ac_word=$2
21186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21187$as_echo_n "checking for $ac_word... " >&6; }
21188if ${ac_cv_path_UNZIP+:} false; then :
21189  $as_echo_n "(cached) " >&6
21190else
21191  case $UNZIP in
21192  [\\/]* | ?:[\\/]*)
21193  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21194  ;;
21195  *)
21196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21197for as_dir in $PATH
21198do
21199  IFS=$as_save_IFS
21200  test -z "$as_dir" && as_dir=.
21201    for ac_exec_ext in '' $ac_executable_extensions; do
21202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21203    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21205    break 2
21206  fi
21207done
21208  done
21209IFS=$as_save_IFS
21210
21211  ;;
21212esac
21213fi
21214UNZIP=$ac_cv_path_UNZIP
21215if test -n "$UNZIP"; then
21216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21217$as_echo "$UNZIP" >&6; }
21218else
21219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21220$as_echo "no" >&6; }
21221fi
21222
21223
21224  test -n "$UNZIP" && break
21225done
21226
21227  else
21228    # The variable is set, but is it from the command line or the environment?
21229
21230    # Try to remove the string !UNZIP! from our list.
21231    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21232    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21233      # If it failed, the variable was not from the command line. Ignore it,
21234      # but warn the user (except for BASH, which is always set by the calling BASH).
21235      if test "xUNZIP" != xBASH; then
21236        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21237$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21238      fi
21239      # Try to locate tool using the code snippet
21240      for ac_prog in unzip
21241do
21242  # Extract the first word of "$ac_prog", so it can be a program name with args.
21243set dummy $ac_prog; ac_word=$2
21244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21245$as_echo_n "checking for $ac_word... " >&6; }
21246if ${ac_cv_path_UNZIP+:} false; then :
21247  $as_echo_n "(cached) " >&6
21248else
21249  case $UNZIP in
21250  [\\/]* | ?:[\\/]*)
21251  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21252  ;;
21253  *)
21254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21255for as_dir in $PATH
21256do
21257  IFS=$as_save_IFS
21258  test -z "$as_dir" && as_dir=.
21259    for ac_exec_ext in '' $ac_executable_extensions; do
21260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21261    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21263    break 2
21264  fi
21265done
21266  done
21267IFS=$as_save_IFS
21268
21269  ;;
21270esac
21271fi
21272UNZIP=$ac_cv_path_UNZIP
21273if test -n "$UNZIP"; then
21274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21275$as_echo "$UNZIP" >&6; }
21276else
21277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21278$as_echo "no" >&6; }
21279fi
21280
21281
21282  test -n "$UNZIP" && break
21283done
21284
21285    else
21286      # If it succeeded, then it was overridden by the user. We will use it
21287      # for the tool.
21288
21289      # First remove it from the list of overridden variables, so we can test
21290      # for unknown variables in the end.
21291      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21292
21293      # Check if we try to supply an empty value
21294      if test "x$UNZIP" = x; then
21295        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21296$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21298$as_echo_n "checking for UNZIP... " >&6; }
21299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21300$as_echo "disabled" >&6; }
21301      else
21302        # Check if the provided tool contains a complete path.
21303        tool_specified="$UNZIP"
21304        tool_basename="${tool_specified##*/}"
21305        if test "x$tool_basename" = "x$tool_specified"; then
21306          # A command without a complete path is provided, search $PATH.
21307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21308$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21309          # Extract the first word of "$tool_basename", so it can be a program name with args.
21310set dummy $tool_basename; ac_word=$2
21311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21312$as_echo_n "checking for $ac_word... " >&6; }
21313if ${ac_cv_path_UNZIP+:} false; then :
21314  $as_echo_n "(cached) " >&6
21315else
21316  case $UNZIP in
21317  [\\/]* | ?:[\\/]*)
21318  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21319  ;;
21320  *)
21321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21322for as_dir in $PATH
21323do
21324  IFS=$as_save_IFS
21325  test -z "$as_dir" && as_dir=.
21326    for ac_exec_ext in '' $ac_executable_extensions; do
21327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21328    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21330    break 2
21331  fi
21332done
21333  done
21334IFS=$as_save_IFS
21335
21336  ;;
21337esac
21338fi
21339UNZIP=$ac_cv_path_UNZIP
21340if test -n "$UNZIP"; then
21341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21342$as_echo "$UNZIP" >&6; }
21343else
21344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21345$as_echo "no" >&6; }
21346fi
21347
21348
21349          if test "x$UNZIP" = x; then
21350            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21351          fi
21352        else
21353          # Otherwise we believe it is a complete path. Use it as it is.
21354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21355$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21356          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21357$as_echo_n "checking for UNZIP... " >&6; }
21358          if test ! -x "$tool_specified"; then
21359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21360$as_echo "not found" >&6; }
21361            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21362          fi
21363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21364$as_echo "$tool_specified" >&6; }
21365        fi
21366      fi
21367    fi
21368
21369  fi
21370
21371
21372
21373  if test "x$UNZIP" = x; then
21374    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21375  fi
21376
21377
21378
21379
21380
21381  # Publish this variable in the help.
21382
21383
21384  if [ -z "${ZIP+x}" ]; then
21385    # The variable is not set by user, try to locate tool using the code snippet
21386    for ac_prog in zip
21387do
21388  # Extract the first word of "$ac_prog", so it can be a program name with args.
21389set dummy $ac_prog; ac_word=$2
21390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21391$as_echo_n "checking for $ac_word... " >&6; }
21392if ${ac_cv_path_ZIP+:} false; then :
21393  $as_echo_n "(cached) " >&6
21394else
21395  case $ZIP in
21396  [\\/]* | ?:[\\/]*)
21397  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21398  ;;
21399  *)
21400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21401for as_dir in $PATH
21402do
21403  IFS=$as_save_IFS
21404  test -z "$as_dir" && as_dir=.
21405    for ac_exec_ext in '' $ac_executable_extensions; do
21406  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21407    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21408    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21409    break 2
21410  fi
21411done
21412  done
21413IFS=$as_save_IFS
21414
21415  ;;
21416esac
21417fi
21418ZIP=$ac_cv_path_ZIP
21419if test -n "$ZIP"; then
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21421$as_echo "$ZIP" >&6; }
21422else
21423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21424$as_echo "no" >&6; }
21425fi
21426
21427
21428  test -n "$ZIP" && break
21429done
21430
21431  else
21432    # The variable is set, but is it from the command line or the environment?
21433
21434    # Try to remove the string !ZIP! from our list.
21435    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21436    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21437      # If it failed, the variable was not from the command line. Ignore it,
21438      # but warn the user (except for BASH, which is always set by the calling BASH).
21439      if test "xZIP" != xBASH; then
21440        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21441$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21442      fi
21443      # Try to locate tool using the code snippet
21444      for ac_prog in zip
21445do
21446  # Extract the first word of "$ac_prog", so it can be a program name with args.
21447set dummy $ac_prog; ac_word=$2
21448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21449$as_echo_n "checking for $ac_word... " >&6; }
21450if ${ac_cv_path_ZIP+:} false; then :
21451  $as_echo_n "(cached) " >&6
21452else
21453  case $ZIP in
21454  [\\/]* | ?:[\\/]*)
21455  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21456  ;;
21457  *)
21458  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21459for as_dir in $PATH
21460do
21461  IFS=$as_save_IFS
21462  test -z "$as_dir" && as_dir=.
21463    for ac_exec_ext in '' $ac_executable_extensions; do
21464  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21465    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21466    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21467    break 2
21468  fi
21469done
21470  done
21471IFS=$as_save_IFS
21472
21473  ;;
21474esac
21475fi
21476ZIP=$ac_cv_path_ZIP
21477if test -n "$ZIP"; then
21478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21479$as_echo "$ZIP" >&6; }
21480else
21481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21482$as_echo "no" >&6; }
21483fi
21484
21485
21486  test -n "$ZIP" && break
21487done
21488
21489    else
21490      # If it succeeded, then it was overridden by the user. We will use it
21491      # for the tool.
21492
21493      # First remove it from the list of overridden variables, so we can test
21494      # for unknown variables in the end.
21495      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21496
21497      # Check if we try to supply an empty value
21498      if test "x$ZIP" = x; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21500$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21501        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21502$as_echo_n "checking for ZIP... " >&6; }
21503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21504$as_echo "disabled" >&6; }
21505      else
21506        # Check if the provided tool contains a complete path.
21507        tool_specified="$ZIP"
21508        tool_basename="${tool_specified##*/}"
21509        if test "x$tool_basename" = "x$tool_specified"; then
21510          # A command without a complete path is provided, search $PATH.
21511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21512$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21513          # Extract the first word of "$tool_basename", so it can be a program name with args.
21514set dummy $tool_basename; ac_word=$2
21515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21516$as_echo_n "checking for $ac_word... " >&6; }
21517if ${ac_cv_path_ZIP+:} false; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  case $ZIP in
21521  [\\/]* | ?:[\\/]*)
21522  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21523  ;;
21524  *)
21525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21526for as_dir in $PATH
21527do
21528  IFS=$as_save_IFS
21529  test -z "$as_dir" && as_dir=.
21530    for ac_exec_ext in '' $ac_executable_extensions; do
21531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21532    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21534    break 2
21535  fi
21536done
21537  done
21538IFS=$as_save_IFS
21539
21540  ;;
21541esac
21542fi
21543ZIP=$ac_cv_path_ZIP
21544if test -n "$ZIP"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21546$as_echo "$ZIP" >&6; }
21547else
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21549$as_echo "no" >&6; }
21550fi
21551
21552
21553          if test "x$ZIP" = x; then
21554            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21555          fi
21556        else
21557          # Otherwise we believe it is a complete path. Use it as it is.
21558          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21559$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21560          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21561$as_echo_n "checking for ZIP... " >&6; }
21562          if test ! -x "$tool_specified"; then
21563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21564$as_echo "not found" >&6; }
21565            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21566          fi
21567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21568$as_echo "$tool_specified" >&6; }
21569        fi
21570      fi
21571    fi
21572
21573  fi
21574
21575
21576
21577  if test "x$ZIP" = x; then
21578    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21579  fi
21580
21581
21582
21583  # Non-required basic tools
21584
21585
21586
21587  # Publish this variable in the help.
21588
21589
21590  if [ -z "${LDD+x}" ]; then
21591    # The variable is not set by user, try to locate tool using the code snippet
21592    for ac_prog in ldd
21593do
21594  # Extract the first word of "$ac_prog", so it can be a program name with args.
21595set dummy $ac_prog; ac_word=$2
21596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21597$as_echo_n "checking for $ac_word... " >&6; }
21598if ${ac_cv_path_LDD+:} false; then :
21599  $as_echo_n "(cached) " >&6
21600else
21601  case $LDD in
21602  [\\/]* | ?:[\\/]*)
21603  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21604  ;;
21605  *)
21606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21607for as_dir in $PATH
21608do
21609  IFS=$as_save_IFS
21610  test -z "$as_dir" && as_dir=.
21611    for ac_exec_ext in '' $ac_executable_extensions; do
21612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21613    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21615    break 2
21616  fi
21617done
21618  done
21619IFS=$as_save_IFS
21620
21621  ;;
21622esac
21623fi
21624LDD=$ac_cv_path_LDD
21625if test -n "$LDD"; then
21626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21627$as_echo "$LDD" >&6; }
21628else
21629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21630$as_echo "no" >&6; }
21631fi
21632
21633
21634  test -n "$LDD" && break
21635done
21636
21637  else
21638    # The variable is set, but is it from the command line or the environment?
21639
21640    # Try to remove the string !LDD! from our list.
21641    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21642    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21643      # If it failed, the variable was not from the command line. Ignore it,
21644      # but warn the user (except for BASH, which is always set by the calling BASH).
21645      if test "xLDD" != xBASH; then
21646        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21647$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21648      fi
21649      # Try to locate tool using the code snippet
21650      for ac_prog in ldd
21651do
21652  # Extract the first word of "$ac_prog", so it can be a program name with args.
21653set dummy $ac_prog; ac_word=$2
21654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21655$as_echo_n "checking for $ac_word... " >&6; }
21656if ${ac_cv_path_LDD+:} false; then :
21657  $as_echo_n "(cached) " >&6
21658else
21659  case $LDD in
21660  [\\/]* | ?:[\\/]*)
21661  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21662  ;;
21663  *)
21664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21665for as_dir in $PATH
21666do
21667  IFS=$as_save_IFS
21668  test -z "$as_dir" && as_dir=.
21669    for ac_exec_ext in '' $ac_executable_extensions; do
21670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21671    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21673    break 2
21674  fi
21675done
21676  done
21677IFS=$as_save_IFS
21678
21679  ;;
21680esac
21681fi
21682LDD=$ac_cv_path_LDD
21683if test -n "$LDD"; then
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21685$as_echo "$LDD" >&6; }
21686else
21687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21688$as_echo "no" >&6; }
21689fi
21690
21691
21692  test -n "$LDD" && break
21693done
21694
21695    else
21696      # If it succeeded, then it was overridden by the user. We will use it
21697      # for the tool.
21698
21699      # First remove it from the list of overridden variables, so we can test
21700      # for unknown variables in the end.
21701      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21702
21703      # Check if we try to supply an empty value
21704      if test "x$LDD" = x; then
21705        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21706$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21707        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21708$as_echo_n "checking for LDD... " >&6; }
21709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21710$as_echo "disabled" >&6; }
21711      else
21712        # Check if the provided tool contains a complete path.
21713        tool_specified="$LDD"
21714        tool_basename="${tool_specified##*/}"
21715        if test "x$tool_basename" = "x$tool_specified"; then
21716          # A command without a complete path is provided, search $PATH.
21717          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21718$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21719          # Extract the first word of "$tool_basename", so it can be a program name with args.
21720set dummy $tool_basename; ac_word=$2
21721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21722$as_echo_n "checking for $ac_word... " >&6; }
21723if ${ac_cv_path_LDD+:} false; then :
21724  $as_echo_n "(cached) " >&6
21725else
21726  case $LDD in
21727  [\\/]* | ?:[\\/]*)
21728  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21729  ;;
21730  *)
21731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21732for as_dir in $PATH
21733do
21734  IFS=$as_save_IFS
21735  test -z "$as_dir" && as_dir=.
21736    for ac_exec_ext in '' $ac_executable_extensions; do
21737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21738    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21740    break 2
21741  fi
21742done
21743  done
21744IFS=$as_save_IFS
21745
21746  ;;
21747esac
21748fi
21749LDD=$ac_cv_path_LDD
21750if test -n "$LDD"; then
21751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21752$as_echo "$LDD" >&6; }
21753else
21754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21755$as_echo "no" >&6; }
21756fi
21757
21758
21759          if test "x$LDD" = x; then
21760            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21761          fi
21762        else
21763          # Otherwise we believe it is a complete path. Use it as it is.
21764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21765$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21766          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21767$as_echo_n "checking for LDD... " >&6; }
21768          if test ! -x "$tool_specified"; then
21769            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21770$as_echo "not found" >&6; }
21771            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21772          fi
21773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21774$as_echo "$tool_specified" >&6; }
21775        fi
21776      fi
21777    fi
21778
21779  fi
21780
21781
21782  if test "x$LDD" = "x"; then
21783    # List shared lib dependencies is used for
21784    # debug output and checking for forbidden dependencies.
21785    # We can build without it.
21786    LDD="true"
21787  fi
21788
21789
21790  # Publish this variable in the help.
21791
21792
21793  if [ -z "${OTOOL+x}" ]; then
21794    # The variable is not set by user, try to locate tool using the code snippet
21795    for ac_prog in otool
21796do
21797  # Extract the first word of "$ac_prog", so it can be a program name with args.
21798set dummy $ac_prog; ac_word=$2
21799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21800$as_echo_n "checking for $ac_word... " >&6; }
21801if ${ac_cv_path_OTOOL+:} false; then :
21802  $as_echo_n "(cached) " >&6
21803else
21804  case $OTOOL in
21805  [\\/]* | ?:[\\/]*)
21806  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21807  ;;
21808  *)
21809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21810for as_dir in $PATH
21811do
21812  IFS=$as_save_IFS
21813  test -z "$as_dir" && as_dir=.
21814    for ac_exec_ext in '' $ac_executable_extensions; do
21815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21816    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21818    break 2
21819  fi
21820done
21821  done
21822IFS=$as_save_IFS
21823
21824  ;;
21825esac
21826fi
21827OTOOL=$ac_cv_path_OTOOL
21828if test -n "$OTOOL"; then
21829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21830$as_echo "$OTOOL" >&6; }
21831else
21832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21833$as_echo "no" >&6; }
21834fi
21835
21836
21837  test -n "$OTOOL" && break
21838done
21839
21840  else
21841    # The variable is set, but is it from the command line or the environment?
21842
21843    # Try to remove the string !OTOOL! from our list.
21844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21846      # If it failed, the variable was not from the command line. Ignore it,
21847      # but warn the user (except for BASH, which is always set by the calling BASH).
21848      if test "xOTOOL" != xBASH; then
21849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21850$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21851      fi
21852      # Try to locate tool using the code snippet
21853      for ac_prog in otool
21854do
21855  # Extract the first word of "$ac_prog", so it can be a program name with args.
21856set dummy $ac_prog; ac_word=$2
21857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21858$as_echo_n "checking for $ac_word... " >&6; }
21859if ${ac_cv_path_OTOOL+:} false; then :
21860  $as_echo_n "(cached) " >&6
21861else
21862  case $OTOOL in
21863  [\\/]* | ?:[\\/]*)
21864  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21865  ;;
21866  *)
21867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21868for as_dir in $PATH
21869do
21870  IFS=$as_save_IFS
21871  test -z "$as_dir" && as_dir=.
21872    for ac_exec_ext in '' $ac_executable_extensions; do
21873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21874    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21876    break 2
21877  fi
21878done
21879  done
21880IFS=$as_save_IFS
21881
21882  ;;
21883esac
21884fi
21885OTOOL=$ac_cv_path_OTOOL
21886if test -n "$OTOOL"; then
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21888$as_echo "$OTOOL" >&6; }
21889else
21890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21891$as_echo "no" >&6; }
21892fi
21893
21894
21895  test -n "$OTOOL" && break
21896done
21897
21898    else
21899      # If it succeeded, then it was overridden by the user. We will use it
21900      # for the tool.
21901
21902      # First remove it from the list of overridden variables, so we can test
21903      # for unknown variables in the end.
21904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21905
21906      # Check if we try to supply an empty value
21907      if test "x$OTOOL" = x; then
21908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21909$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21911$as_echo_n "checking for OTOOL... " >&6; }
21912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21913$as_echo "disabled" >&6; }
21914      else
21915        # Check if the provided tool contains a complete path.
21916        tool_specified="$OTOOL"
21917        tool_basename="${tool_specified##*/}"
21918        if test "x$tool_basename" = "x$tool_specified"; then
21919          # A command without a complete path is provided, search $PATH.
21920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21921$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21922          # Extract the first word of "$tool_basename", so it can be a program name with args.
21923set dummy $tool_basename; ac_word=$2
21924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21925$as_echo_n "checking for $ac_word... " >&6; }
21926if ${ac_cv_path_OTOOL+:} false; then :
21927  $as_echo_n "(cached) " >&6
21928else
21929  case $OTOOL in
21930  [\\/]* | ?:[\\/]*)
21931  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21932  ;;
21933  *)
21934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21935for as_dir in $PATH
21936do
21937  IFS=$as_save_IFS
21938  test -z "$as_dir" && as_dir=.
21939    for ac_exec_ext in '' $ac_executable_extensions; do
21940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21941    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21943    break 2
21944  fi
21945done
21946  done
21947IFS=$as_save_IFS
21948
21949  ;;
21950esac
21951fi
21952OTOOL=$ac_cv_path_OTOOL
21953if test -n "$OTOOL"; then
21954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21955$as_echo "$OTOOL" >&6; }
21956else
21957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21958$as_echo "no" >&6; }
21959fi
21960
21961
21962          if test "x$OTOOL" = x; then
21963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21964          fi
21965        else
21966          # Otherwise we believe it is a complete path. Use it as it is.
21967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21968$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21970$as_echo_n "checking for OTOOL... " >&6; }
21971          if test ! -x "$tool_specified"; then
21972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21973$as_echo "not found" >&6; }
21974            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21975          fi
21976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21977$as_echo "$tool_specified" >&6; }
21978        fi
21979      fi
21980    fi
21981
21982  fi
21983
21984
21985  if test "x$OTOOL" = "x"; then
21986    OTOOL="true"
21987  fi
21988
21989
21990  # Publish this variable in the help.
21991
21992
21993  if [ -z "${READELF+x}" ]; then
21994    # The variable is not set by user, try to locate tool using the code snippet
21995    for ac_prog in greadelf readelf
21996do
21997  # Extract the first word of "$ac_prog", so it can be a program name with args.
21998set dummy $ac_prog; ac_word=$2
21999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22000$as_echo_n "checking for $ac_word... " >&6; }
22001if ${ac_cv_path_READELF+:} false; then :
22002  $as_echo_n "(cached) " >&6
22003else
22004  case $READELF in
22005  [\\/]* | ?:[\\/]*)
22006  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22007  ;;
22008  *)
22009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22010for as_dir in $PATH
22011do
22012  IFS=$as_save_IFS
22013  test -z "$as_dir" && as_dir=.
22014    for ac_exec_ext in '' $ac_executable_extensions; do
22015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22016    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22018    break 2
22019  fi
22020done
22021  done
22022IFS=$as_save_IFS
22023
22024  ;;
22025esac
22026fi
22027READELF=$ac_cv_path_READELF
22028if test -n "$READELF"; then
22029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22030$as_echo "$READELF" >&6; }
22031else
22032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22033$as_echo "no" >&6; }
22034fi
22035
22036
22037  test -n "$READELF" && break
22038done
22039
22040  else
22041    # The variable is set, but is it from the command line or the environment?
22042
22043    # Try to remove the string !READELF! from our list.
22044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22046      # If it failed, the variable was not from the command line. Ignore it,
22047      # but warn the user (except for BASH, which is always set by the calling BASH).
22048      if test "xREADELF" != xBASH; then
22049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22050$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22051      fi
22052      # Try to locate tool using the code snippet
22053      for ac_prog in greadelf readelf
22054do
22055  # Extract the first word of "$ac_prog", so it can be a program name with args.
22056set dummy $ac_prog; ac_word=$2
22057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22058$as_echo_n "checking for $ac_word... " >&6; }
22059if ${ac_cv_path_READELF+:} false; then :
22060  $as_echo_n "(cached) " >&6
22061else
22062  case $READELF in
22063  [\\/]* | ?:[\\/]*)
22064  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22065  ;;
22066  *)
22067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22068for as_dir in $PATH
22069do
22070  IFS=$as_save_IFS
22071  test -z "$as_dir" && as_dir=.
22072    for ac_exec_ext in '' $ac_executable_extensions; do
22073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22074    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22076    break 2
22077  fi
22078done
22079  done
22080IFS=$as_save_IFS
22081
22082  ;;
22083esac
22084fi
22085READELF=$ac_cv_path_READELF
22086if test -n "$READELF"; then
22087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22088$as_echo "$READELF" >&6; }
22089else
22090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22091$as_echo "no" >&6; }
22092fi
22093
22094
22095  test -n "$READELF" && break
22096done
22097
22098    else
22099      # If it succeeded, then it was overridden by the user. We will use it
22100      # for the tool.
22101
22102      # First remove it from the list of overridden variables, so we can test
22103      # for unknown variables in the end.
22104      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22105
22106      # Check if we try to supply an empty value
22107      if test "x$READELF" = x; then
22108        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22109$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22110        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22111$as_echo_n "checking for READELF... " >&6; }
22112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22113$as_echo "disabled" >&6; }
22114      else
22115        # Check if the provided tool contains a complete path.
22116        tool_specified="$READELF"
22117        tool_basename="${tool_specified##*/}"
22118        if test "x$tool_basename" = "x$tool_specified"; then
22119          # A command without a complete path is provided, search $PATH.
22120          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22121$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22122          # Extract the first word of "$tool_basename", so it can be a program name with args.
22123set dummy $tool_basename; ac_word=$2
22124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22125$as_echo_n "checking for $ac_word... " >&6; }
22126if ${ac_cv_path_READELF+:} false; then :
22127  $as_echo_n "(cached) " >&6
22128else
22129  case $READELF in
22130  [\\/]* | ?:[\\/]*)
22131  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22132  ;;
22133  *)
22134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22135for as_dir in $PATH
22136do
22137  IFS=$as_save_IFS
22138  test -z "$as_dir" && as_dir=.
22139    for ac_exec_ext in '' $ac_executable_extensions; do
22140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22141    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22143    break 2
22144  fi
22145done
22146  done
22147IFS=$as_save_IFS
22148
22149  ;;
22150esac
22151fi
22152READELF=$ac_cv_path_READELF
22153if test -n "$READELF"; then
22154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22155$as_echo "$READELF" >&6; }
22156else
22157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22158$as_echo "no" >&6; }
22159fi
22160
22161
22162          if test "x$READELF" = x; then
22163            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22164          fi
22165        else
22166          # Otherwise we believe it is a complete path. Use it as it is.
22167          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22168$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22169          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22170$as_echo_n "checking for READELF... " >&6; }
22171          if test ! -x "$tool_specified"; then
22172            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22173$as_echo "not found" >&6; }
22174            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22175          fi
22176          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22177$as_echo "$tool_specified" >&6; }
22178        fi
22179      fi
22180    fi
22181
22182  fi
22183
22184
22185
22186
22187  # Publish this variable in the help.
22188
22189
22190  if [ -z "${HG+x}" ]; then
22191    # The variable is not set by user, try to locate tool using the code snippet
22192    for ac_prog in hg
22193do
22194  # Extract the first word of "$ac_prog", so it can be a program name with args.
22195set dummy $ac_prog; ac_word=$2
22196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22197$as_echo_n "checking for $ac_word... " >&6; }
22198if ${ac_cv_path_HG+:} false; then :
22199  $as_echo_n "(cached) " >&6
22200else
22201  case $HG in
22202  [\\/]* | ?:[\\/]*)
22203  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22204  ;;
22205  *)
22206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22207for as_dir in $PATH
22208do
22209  IFS=$as_save_IFS
22210  test -z "$as_dir" && as_dir=.
22211    for ac_exec_ext in '' $ac_executable_extensions; do
22212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22213    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22215    break 2
22216  fi
22217done
22218  done
22219IFS=$as_save_IFS
22220
22221  ;;
22222esac
22223fi
22224HG=$ac_cv_path_HG
22225if test -n "$HG"; then
22226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22227$as_echo "$HG" >&6; }
22228else
22229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22230$as_echo "no" >&6; }
22231fi
22232
22233
22234  test -n "$HG" && break
22235done
22236
22237  else
22238    # The variable is set, but is it from the command line or the environment?
22239
22240    # Try to remove the string !HG! from our list.
22241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22243      # If it failed, the variable was not from the command line. Ignore it,
22244      # but warn the user (except for BASH, which is always set by the calling BASH).
22245      if test "xHG" != xBASH; then
22246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22247$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22248      fi
22249      # Try to locate tool using the code snippet
22250      for ac_prog in hg
22251do
22252  # Extract the first word of "$ac_prog", so it can be a program name with args.
22253set dummy $ac_prog; ac_word=$2
22254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22255$as_echo_n "checking for $ac_word... " >&6; }
22256if ${ac_cv_path_HG+:} false; then :
22257  $as_echo_n "(cached) " >&6
22258else
22259  case $HG in
22260  [\\/]* | ?:[\\/]*)
22261  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22262  ;;
22263  *)
22264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22265for as_dir in $PATH
22266do
22267  IFS=$as_save_IFS
22268  test -z "$as_dir" && as_dir=.
22269    for ac_exec_ext in '' $ac_executable_extensions; do
22270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22271    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22273    break 2
22274  fi
22275done
22276  done
22277IFS=$as_save_IFS
22278
22279  ;;
22280esac
22281fi
22282HG=$ac_cv_path_HG
22283if test -n "$HG"; then
22284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22285$as_echo "$HG" >&6; }
22286else
22287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22288$as_echo "no" >&6; }
22289fi
22290
22291
22292  test -n "$HG" && break
22293done
22294
22295    else
22296      # If it succeeded, then it was overridden by the user. We will use it
22297      # for the tool.
22298
22299      # First remove it from the list of overridden variables, so we can test
22300      # for unknown variables in the end.
22301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22302
22303      # Check if we try to supply an empty value
22304      if test "x$HG" = x; then
22305        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22306$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22308$as_echo_n "checking for HG... " >&6; }
22309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22310$as_echo "disabled" >&6; }
22311      else
22312        # Check if the provided tool contains a complete path.
22313        tool_specified="$HG"
22314        tool_basename="${tool_specified##*/}"
22315        if test "x$tool_basename" = "x$tool_specified"; then
22316          # A command without a complete path is provided, search $PATH.
22317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22318$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22319          # Extract the first word of "$tool_basename", so it can be a program name with args.
22320set dummy $tool_basename; ac_word=$2
22321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22322$as_echo_n "checking for $ac_word... " >&6; }
22323if ${ac_cv_path_HG+:} false; then :
22324  $as_echo_n "(cached) " >&6
22325else
22326  case $HG in
22327  [\\/]* | ?:[\\/]*)
22328  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22329  ;;
22330  *)
22331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22332for as_dir in $PATH
22333do
22334  IFS=$as_save_IFS
22335  test -z "$as_dir" && as_dir=.
22336    for ac_exec_ext in '' $ac_executable_extensions; do
22337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22338    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22340    break 2
22341  fi
22342done
22343  done
22344IFS=$as_save_IFS
22345
22346  ;;
22347esac
22348fi
22349HG=$ac_cv_path_HG
22350if test -n "$HG"; then
22351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22352$as_echo "$HG" >&6; }
22353else
22354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22355$as_echo "no" >&6; }
22356fi
22357
22358
22359          if test "x$HG" = x; then
22360            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22361          fi
22362        else
22363          # Otherwise we believe it is a complete path. Use it as it is.
22364          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22365$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22366          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22367$as_echo_n "checking for HG... " >&6; }
22368          if test ! -x "$tool_specified"; then
22369            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22370$as_echo "not found" >&6; }
22371            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22372          fi
22373          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22374$as_echo "$tool_specified" >&6; }
22375        fi
22376      fi
22377    fi
22378
22379  fi
22380
22381
22382
22383
22384  # Publish this variable in the help.
22385
22386
22387  if [ -z "${STAT+x}" ]; then
22388    # The variable is not set by user, try to locate tool using the code snippet
22389    for ac_prog in stat
22390do
22391  # Extract the first word of "$ac_prog", so it can be a program name with args.
22392set dummy $ac_prog; ac_word=$2
22393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22394$as_echo_n "checking for $ac_word... " >&6; }
22395if ${ac_cv_path_STAT+:} false; then :
22396  $as_echo_n "(cached) " >&6
22397else
22398  case $STAT in
22399  [\\/]* | ?:[\\/]*)
22400  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22401  ;;
22402  *)
22403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22404for as_dir in $PATH
22405do
22406  IFS=$as_save_IFS
22407  test -z "$as_dir" && as_dir=.
22408    for ac_exec_ext in '' $ac_executable_extensions; do
22409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22410    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22412    break 2
22413  fi
22414done
22415  done
22416IFS=$as_save_IFS
22417
22418  ;;
22419esac
22420fi
22421STAT=$ac_cv_path_STAT
22422if test -n "$STAT"; then
22423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22424$as_echo "$STAT" >&6; }
22425else
22426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22427$as_echo "no" >&6; }
22428fi
22429
22430
22431  test -n "$STAT" && break
22432done
22433
22434  else
22435    # The variable is set, but is it from the command line or the environment?
22436
22437    # Try to remove the string !STAT! from our list.
22438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22440      # If it failed, the variable was not from the command line. Ignore it,
22441      # but warn the user (except for BASH, which is always set by the calling BASH).
22442      if test "xSTAT" != xBASH; then
22443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22444$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22445      fi
22446      # Try to locate tool using the code snippet
22447      for ac_prog in stat
22448do
22449  # Extract the first word of "$ac_prog", so it can be a program name with args.
22450set dummy $ac_prog; ac_word=$2
22451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22452$as_echo_n "checking for $ac_word... " >&6; }
22453if ${ac_cv_path_STAT+:} false; then :
22454  $as_echo_n "(cached) " >&6
22455else
22456  case $STAT in
22457  [\\/]* | ?:[\\/]*)
22458  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22459  ;;
22460  *)
22461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22462for as_dir in $PATH
22463do
22464  IFS=$as_save_IFS
22465  test -z "$as_dir" && as_dir=.
22466    for ac_exec_ext in '' $ac_executable_extensions; do
22467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22468    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22470    break 2
22471  fi
22472done
22473  done
22474IFS=$as_save_IFS
22475
22476  ;;
22477esac
22478fi
22479STAT=$ac_cv_path_STAT
22480if test -n "$STAT"; then
22481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22482$as_echo "$STAT" >&6; }
22483else
22484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22485$as_echo "no" >&6; }
22486fi
22487
22488
22489  test -n "$STAT" && break
22490done
22491
22492    else
22493      # If it succeeded, then it was overridden by the user. We will use it
22494      # for the tool.
22495
22496      # First remove it from the list of overridden variables, so we can test
22497      # for unknown variables in the end.
22498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22499
22500      # Check if we try to supply an empty value
22501      if test "x$STAT" = x; then
22502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22503$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22505$as_echo_n "checking for STAT... " >&6; }
22506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22507$as_echo "disabled" >&6; }
22508      else
22509        # Check if the provided tool contains a complete path.
22510        tool_specified="$STAT"
22511        tool_basename="${tool_specified##*/}"
22512        if test "x$tool_basename" = "x$tool_specified"; then
22513          # A command without a complete path is provided, search $PATH.
22514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22515$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22516          # Extract the first word of "$tool_basename", so it can be a program name with args.
22517set dummy $tool_basename; ac_word=$2
22518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22519$as_echo_n "checking for $ac_word... " >&6; }
22520if ${ac_cv_path_STAT+:} false; then :
22521  $as_echo_n "(cached) " >&6
22522else
22523  case $STAT in
22524  [\\/]* | ?:[\\/]*)
22525  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22526  ;;
22527  *)
22528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22529for as_dir in $PATH
22530do
22531  IFS=$as_save_IFS
22532  test -z "$as_dir" && as_dir=.
22533    for ac_exec_ext in '' $ac_executable_extensions; do
22534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22535    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22537    break 2
22538  fi
22539done
22540  done
22541IFS=$as_save_IFS
22542
22543  ;;
22544esac
22545fi
22546STAT=$ac_cv_path_STAT
22547if test -n "$STAT"; then
22548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22549$as_echo "$STAT" >&6; }
22550else
22551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22552$as_echo "no" >&6; }
22553fi
22554
22555
22556          if test "x$STAT" = x; then
22557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22558          fi
22559        else
22560          # Otherwise we believe it is a complete path. Use it as it is.
22561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22562$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22564$as_echo_n "checking for STAT... " >&6; }
22565          if test ! -x "$tool_specified"; then
22566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22567$as_echo "not found" >&6; }
22568            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22569          fi
22570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22571$as_echo "$tool_specified" >&6; }
22572        fi
22573      fi
22574    fi
22575
22576  fi
22577
22578
22579
22580
22581  # Publish this variable in the help.
22582
22583
22584  if [ -z "${TIME+x}" ]; then
22585    # The variable is not set by user, try to locate tool using the code snippet
22586    for ac_prog in time
22587do
22588  # Extract the first word of "$ac_prog", so it can be a program name with args.
22589set dummy $ac_prog; ac_word=$2
22590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22591$as_echo_n "checking for $ac_word... " >&6; }
22592if ${ac_cv_path_TIME+:} false; then :
22593  $as_echo_n "(cached) " >&6
22594else
22595  case $TIME in
22596  [\\/]* | ?:[\\/]*)
22597  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22598  ;;
22599  *)
22600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22601for as_dir in $PATH
22602do
22603  IFS=$as_save_IFS
22604  test -z "$as_dir" && as_dir=.
22605    for ac_exec_ext in '' $ac_executable_extensions; do
22606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22607    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22609    break 2
22610  fi
22611done
22612  done
22613IFS=$as_save_IFS
22614
22615  ;;
22616esac
22617fi
22618TIME=$ac_cv_path_TIME
22619if test -n "$TIME"; then
22620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22621$as_echo "$TIME" >&6; }
22622else
22623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22624$as_echo "no" >&6; }
22625fi
22626
22627
22628  test -n "$TIME" && break
22629done
22630
22631  else
22632    # The variable is set, but is it from the command line or the environment?
22633
22634    # Try to remove the string !TIME! from our list.
22635    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22636    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22637      # If it failed, the variable was not from the command line. Ignore it,
22638      # but warn the user (except for BASH, which is always set by the calling BASH).
22639      if test "xTIME" != xBASH; then
22640        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22641$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22642      fi
22643      # Try to locate tool using the code snippet
22644      for ac_prog in time
22645do
22646  # Extract the first word of "$ac_prog", so it can be a program name with args.
22647set dummy $ac_prog; ac_word=$2
22648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22649$as_echo_n "checking for $ac_word... " >&6; }
22650if ${ac_cv_path_TIME+:} false; then :
22651  $as_echo_n "(cached) " >&6
22652else
22653  case $TIME in
22654  [\\/]* | ?:[\\/]*)
22655  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22656  ;;
22657  *)
22658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22659for as_dir in $PATH
22660do
22661  IFS=$as_save_IFS
22662  test -z "$as_dir" && as_dir=.
22663    for ac_exec_ext in '' $ac_executable_extensions; do
22664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22665    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22667    break 2
22668  fi
22669done
22670  done
22671IFS=$as_save_IFS
22672
22673  ;;
22674esac
22675fi
22676TIME=$ac_cv_path_TIME
22677if test -n "$TIME"; then
22678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22679$as_echo "$TIME" >&6; }
22680else
22681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22682$as_echo "no" >&6; }
22683fi
22684
22685
22686  test -n "$TIME" && break
22687done
22688
22689    else
22690      # If it succeeded, then it was overridden by the user. We will use it
22691      # for the tool.
22692
22693      # First remove it from the list of overridden variables, so we can test
22694      # for unknown variables in the end.
22695      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22696
22697      # Check if we try to supply an empty value
22698      if test "x$TIME" = x; then
22699        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22700$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22701        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22702$as_echo_n "checking for TIME... " >&6; }
22703        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22704$as_echo "disabled" >&6; }
22705      else
22706        # Check if the provided tool contains a complete path.
22707        tool_specified="$TIME"
22708        tool_basename="${tool_specified##*/}"
22709        if test "x$tool_basename" = "x$tool_specified"; then
22710          # A command without a complete path is provided, search $PATH.
22711          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22712$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22713          # Extract the first word of "$tool_basename", so it can be a program name with args.
22714set dummy $tool_basename; ac_word=$2
22715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22716$as_echo_n "checking for $ac_word... " >&6; }
22717if ${ac_cv_path_TIME+:} false; then :
22718  $as_echo_n "(cached) " >&6
22719else
22720  case $TIME in
22721  [\\/]* | ?:[\\/]*)
22722  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22723  ;;
22724  *)
22725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22726for as_dir in $PATH
22727do
22728  IFS=$as_save_IFS
22729  test -z "$as_dir" && as_dir=.
22730    for ac_exec_ext in '' $ac_executable_extensions; do
22731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22732    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22734    break 2
22735  fi
22736done
22737  done
22738IFS=$as_save_IFS
22739
22740  ;;
22741esac
22742fi
22743TIME=$ac_cv_path_TIME
22744if test -n "$TIME"; then
22745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22746$as_echo "$TIME" >&6; }
22747else
22748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22749$as_echo "no" >&6; }
22750fi
22751
22752
22753          if test "x$TIME" = x; then
22754            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22755          fi
22756        else
22757          # Otherwise we believe it is a complete path. Use it as it is.
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22759$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22760          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22761$as_echo_n "checking for TIME... " >&6; }
22762          if test ! -x "$tool_specified"; then
22763            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22764$as_echo "not found" >&6; }
22765            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22766          fi
22767          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22768$as_echo "$tool_specified" >&6; }
22769        fi
22770      fi
22771    fi
22772
22773  fi
22774
22775
22776
22777
22778  # Publish this variable in the help.
22779
22780
22781  if [ -z "${DTRACE+x}" ]; then
22782    # The variable is not set by user, try to locate tool using the code snippet
22783    for ac_prog in dtrace
22784do
22785  # Extract the first word of "$ac_prog", so it can be a program name with args.
22786set dummy $ac_prog; ac_word=$2
22787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22788$as_echo_n "checking for $ac_word... " >&6; }
22789if ${ac_cv_path_DTRACE+:} false; then :
22790  $as_echo_n "(cached) " >&6
22791else
22792  case $DTRACE in
22793  [\\/]* | ?:[\\/]*)
22794  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22795  ;;
22796  *)
22797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22798for as_dir in $PATH
22799do
22800  IFS=$as_save_IFS
22801  test -z "$as_dir" && as_dir=.
22802    for ac_exec_ext in '' $ac_executable_extensions; do
22803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22804    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22806    break 2
22807  fi
22808done
22809  done
22810IFS=$as_save_IFS
22811
22812  ;;
22813esac
22814fi
22815DTRACE=$ac_cv_path_DTRACE
22816if test -n "$DTRACE"; then
22817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22818$as_echo "$DTRACE" >&6; }
22819else
22820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22821$as_echo "no" >&6; }
22822fi
22823
22824
22825  test -n "$DTRACE" && break
22826done
22827
22828  else
22829    # The variable is set, but is it from the command line or the environment?
22830
22831    # Try to remove the string !DTRACE! from our list.
22832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22834      # If it failed, the variable was not from the command line. Ignore it,
22835      # but warn the user (except for BASH, which is always set by the calling BASH).
22836      if test "xDTRACE" != xBASH; then
22837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22838$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22839      fi
22840      # Try to locate tool using the code snippet
22841      for ac_prog in dtrace
22842do
22843  # Extract the first word of "$ac_prog", so it can be a program name with args.
22844set dummy $ac_prog; ac_word=$2
22845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22846$as_echo_n "checking for $ac_word... " >&6; }
22847if ${ac_cv_path_DTRACE+:} false; then :
22848  $as_echo_n "(cached) " >&6
22849else
22850  case $DTRACE in
22851  [\\/]* | ?:[\\/]*)
22852  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22853  ;;
22854  *)
22855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22856for as_dir in $PATH
22857do
22858  IFS=$as_save_IFS
22859  test -z "$as_dir" && as_dir=.
22860    for ac_exec_ext in '' $ac_executable_extensions; do
22861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22862    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22864    break 2
22865  fi
22866done
22867  done
22868IFS=$as_save_IFS
22869
22870  ;;
22871esac
22872fi
22873DTRACE=$ac_cv_path_DTRACE
22874if test -n "$DTRACE"; then
22875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22876$as_echo "$DTRACE" >&6; }
22877else
22878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22879$as_echo "no" >&6; }
22880fi
22881
22882
22883  test -n "$DTRACE" && break
22884done
22885
22886    else
22887      # If it succeeded, then it was overridden by the user. We will use it
22888      # for the tool.
22889
22890      # First remove it from the list of overridden variables, so we can test
22891      # for unknown variables in the end.
22892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22893
22894      # Check if we try to supply an empty value
22895      if test "x$DTRACE" = x; then
22896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22897$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22899$as_echo_n "checking for DTRACE... " >&6; }
22900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22901$as_echo "disabled" >&6; }
22902      else
22903        # Check if the provided tool contains a complete path.
22904        tool_specified="$DTRACE"
22905        tool_basename="${tool_specified##*/}"
22906        if test "x$tool_basename" = "x$tool_specified"; then
22907          # A command without a complete path is provided, search $PATH.
22908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22909$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22910          # Extract the first word of "$tool_basename", so it can be a program name with args.
22911set dummy $tool_basename; ac_word=$2
22912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22913$as_echo_n "checking for $ac_word... " >&6; }
22914if ${ac_cv_path_DTRACE+:} false; then :
22915  $as_echo_n "(cached) " >&6
22916else
22917  case $DTRACE in
22918  [\\/]* | ?:[\\/]*)
22919  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22920  ;;
22921  *)
22922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22923for as_dir in $PATH
22924do
22925  IFS=$as_save_IFS
22926  test -z "$as_dir" && as_dir=.
22927    for ac_exec_ext in '' $ac_executable_extensions; do
22928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22929    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22931    break 2
22932  fi
22933done
22934  done
22935IFS=$as_save_IFS
22936
22937  ;;
22938esac
22939fi
22940DTRACE=$ac_cv_path_DTRACE
22941if test -n "$DTRACE"; then
22942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22943$as_echo "$DTRACE" >&6; }
22944else
22945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22946$as_echo "no" >&6; }
22947fi
22948
22949
22950          if test "x$DTRACE" = x; then
22951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22952          fi
22953        else
22954          # Otherwise we believe it is a complete path. Use it as it is.
22955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22956$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22958$as_echo_n "checking for DTRACE... " >&6; }
22959          if test ! -x "$tool_specified"; then
22960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22961$as_echo "not found" >&6; }
22962            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22963          fi
22964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22965$as_echo "$tool_specified" >&6; }
22966        fi
22967      fi
22968    fi
22969
22970  fi
22971
22972
22973
22974
22975  # Publish this variable in the help.
22976
22977
22978  if [ -z "${PATCH+x}" ]; then
22979    # The variable is not set by user, try to locate tool using the code snippet
22980    for ac_prog in gpatch patch
22981do
22982  # Extract the first word of "$ac_prog", so it can be a program name with args.
22983set dummy $ac_prog; ac_word=$2
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22985$as_echo_n "checking for $ac_word... " >&6; }
22986if ${ac_cv_path_PATCH+:} false; then :
22987  $as_echo_n "(cached) " >&6
22988else
22989  case $PATCH in
22990  [\\/]* | ?:[\\/]*)
22991  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22992  ;;
22993  *)
22994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22995for as_dir in $PATH
22996do
22997  IFS=$as_save_IFS
22998  test -z "$as_dir" && as_dir=.
22999    for ac_exec_ext in '' $ac_executable_extensions; do
23000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23001    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23003    break 2
23004  fi
23005done
23006  done
23007IFS=$as_save_IFS
23008
23009  ;;
23010esac
23011fi
23012PATCH=$ac_cv_path_PATCH
23013if test -n "$PATCH"; then
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23015$as_echo "$PATCH" >&6; }
23016else
23017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019fi
23020
23021
23022  test -n "$PATCH" && break
23023done
23024
23025  else
23026    # The variable is set, but is it from the command line or the environment?
23027
23028    # Try to remove the string !PATCH! from our list.
23029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23031      # If it failed, the variable was not from the command line. Ignore it,
23032      # but warn the user (except for BASH, which is always set by the calling BASH).
23033      if test "xPATCH" != xBASH; then
23034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23035$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23036      fi
23037      # Try to locate tool using the code snippet
23038      for ac_prog in gpatch patch
23039do
23040  # Extract the first word of "$ac_prog", so it can be a program name with args.
23041set dummy $ac_prog; ac_word=$2
23042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23043$as_echo_n "checking for $ac_word... " >&6; }
23044if ${ac_cv_path_PATCH+:} false; then :
23045  $as_echo_n "(cached) " >&6
23046else
23047  case $PATCH in
23048  [\\/]* | ?:[\\/]*)
23049  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23050  ;;
23051  *)
23052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23053for as_dir in $PATH
23054do
23055  IFS=$as_save_IFS
23056  test -z "$as_dir" && as_dir=.
23057    for ac_exec_ext in '' $ac_executable_extensions; do
23058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23059    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23061    break 2
23062  fi
23063done
23064  done
23065IFS=$as_save_IFS
23066
23067  ;;
23068esac
23069fi
23070PATCH=$ac_cv_path_PATCH
23071if test -n "$PATCH"; then
23072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23073$as_echo "$PATCH" >&6; }
23074else
23075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23076$as_echo "no" >&6; }
23077fi
23078
23079
23080  test -n "$PATCH" && break
23081done
23082
23083    else
23084      # If it succeeded, then it was overridden by the user. We will use it
23085      # for the tool.
23086
23087      # First remove it from the list of overridden variables, so we can test
23088      # for unknown variables in the end.
23089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23090
23091      # Check if we try to supply an empty value
23092      if test "x$PATCH" = x; then
23093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23094$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23096$as_echo_n "checking for PATCH... " >&6; }
23097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23098$as_echo "disabled" >&6; }
23099      else
23100        # Check if the provided tool contains a complete path.
23101        tool_specified="$PATCH"
23102        tool_basename="${tool_specified##*/}"
23103        if test "x$tool_basename" = "x$tool_specified"; then
23104          # A command without a complete path is provided, search $PATH.
23105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23106$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23107          # Extract the first word of "$tool_basename", so it can be a program name with args.
23108set dummy $tool_basename; ac_word=$2
23109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23110$as_echo_n "checking for $ac_word... " >&6; }
23111if ${ac_cv_path_PATCH+:} false; then :
23112  $as_echo_n "(cached) " >&6
23113else
23114  case $PATCH in
23115  [\\/]* | ?:[\\/]*)
23116  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23117  ;;
23118  *)
23119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23120for as_dir in $PATH
23121do
23122  IFS=$as_save_IFS
23123  test -z "$as_dir" && as_dir=.
23124    for ac_exec_ext in '' $ac_executable_extensions; do
23125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23126    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23128    break 2
23129  fi
23130done
23131  done
23132IFS=$as_save_IFS
23133
23134  ;;
23135esac
23136fi
23137PATCH=$ac_cv_path_PATCH
23138if test -n "$PATCH"; then
23139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23140$as_echo "$PATCH" >&6; }
23141else
23142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23143$as_echo "no" >&6; }
23144fi
23145
23146
23147          if test "x$PATCH" = x; then
23148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23149          fi
23150        else
23151          # Otherwise we believe it is a complete path. Use it as it is.
23152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23153$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23155$as_echo_n "checking for PATCH... " >&6; }
23156          if test ! -x "$tool_specified"; then
23157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23158$as_echo "not found" >&6; }
23159            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23160          fi
23161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23162$as_echo "$tool_specified" >&6; }
23163        fi
23164      fi
23165    fi
23166
23167  fi
23168
23169
23170  # Check if it's GNU time
23171  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23172  if test "x$IS_GNU_TIME" != x; then
23173    IS_GNU_TIME=yes
23174  else
23175    IS_GNU_TIME=no
23176  fi
23177
23178
23179  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23180
23181
23182
23183  # Publish this variable in the help.
23184
23185
23186  if [ -z "${DSYMUTIL+x}" ]; then
23187    # The variable is not set by user, try to locate tool using the code snippet
23188    for ac_prog in dsymutil
23189do
23190  # Extract the first word of "$ac_prog", so it can be a program name with args.
23191set dummy $ac_prog; ac_word=$2
23192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23193$as_echo_n "checking for $ac_word... " >&6; }
23194if ${ac_cv_path_DSYMUTIL+:} false; then :
23195  $as_echo_n "(cached) " >&6
23196else
23197  case $DSYMUTIL in
23198  [\\/]* | ?:[\\/]*)
23199  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23200  ;;
23201  *)
23202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23203for as_dir in $PATH
23204do
23205  IFS=$as_save_IFS
23206  test -z "$as_dir" && as_dir=.
23207    for ac_exec_ext in '' $ac_executable_extensions; do
23208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23209    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23211    break 2
23212  fi
23213done
23214  done
23215IFS=$as_save_IFS
23216
23217  ;;
23218esac
23219fi
23220DSYMUTIL=$ac_cv_path_DSYMUTIL
23221if test -n "$DSYMUTIL"; then
23222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23223$as_echo "$DSYMUTIL" >&6; }
23224else
23225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23226$as_echo "no" >&6; }
23227fi
23228
23229
23230  test -n "$DSYMUTIL" && break
23231done
23232
23233  else
23234    # The variable is set, but is it from the command line or the environment?
23235
23236    # Try to remove the string !DSYMUTIL! from our list.
23237    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23238    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23239      # If it failed, the variable was not from the command line. Ignore it,
23240      # but warn the user (except for BASH, which is always set by the calling BASH).
23241      if test "xDSYMUTIL" != xBASH; then
23242        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23243$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23244      fi
23245      # Try to locate tool using the code snippet
23246      for ac_prog in dsymutil
23247do
23248  # Extract the first word of "$ac_prog", so it can be a program name with args.
23249set dummy $ac_prog; ac_word=$2
23250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23251$as_echo_n "checking for $ac_word... " >&6; }
23252if ${ac_cv_path_DSYMUTIL+:} false; then :
23253  $as_echo_n "(cached) " >&6
23254else
23255  case $DSYMUTIL in
23256  [\\/]* | ?:[\\/]*)
23257  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23258  ;;
23259  *)
23260  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23261for as_dir in $PATH
23262do
23263  IFS=$as_save_IFS
23264  test -z "$as_dir" && as_dir=.
23265    for ac_exec_ext in '' $ac_executable_extensions; do
23266  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23267    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23268    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23269    break 2
23270  fi
23271done
23272  done
23273IFS=$as_save_IFS
23274
23275  ;;
23276esac
23277fi
23278DSYMUTIL=$ac_cv_path_DSYMUTIL
23279if test -n "$DSYMUTIL"; then
23280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23281$as_echo "$DSYMUTIL" >&6; }
23282else
23283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23284$as_echo "no" >&6; }
23285fi
23286
23287
23288  test -n "$DSYMUTIL" && break
23289done
23290
23291    else
23292      # If it succeeded, then it was overridden by the user. We will use it
23293      # for the tool.
23294
23295      # First remove it from the list of overridden variables, so we can test
23296      # for unknown variables in the end.
23297      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23298
23299      # Check if we try to supply an empty value
23300      if test "x$DSYMUTIL" = x; then
23301        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23302$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23303        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23304$as_echo_n "checking for DSYMUTIL... " >&6; }
23305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23306$as_echo "disabled" >&6; }
23307      else
23308        # Check if the provided tool contains a complete path.
23309        tool_specified="$DSYMUTIL"
23310        tool_basename="${tool_specified##*/}"
23311        if test "x$tool_basename" = "x$tool_specified"; then
23312          # A command without a complete path is provided, search $PATH.
23313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23314$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23315          # Extract the first word of "$tool_basename", so it can be a program name with args.
23316set dummy $tool_basename; ac_word=$2
23317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23318$as_echo_n "checking for $ac_word... " >&6; }
23319if ${ac_cv_path_DSYMUTIL+:} false; then :
23320  $as_echo_n "(cached) " >&6
23321else
23322  case $DSYMUTIL in
23323  [\\/]* | ?:[\\/]*)
23324  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23325  ;;
23326  *)
23327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23328for as_dir in $PATH
23329do
23330  IFS=$as_save_IFS
23331  test -z "$as_dir" && as_dir=.
23332    for ac_exec_ext in '' $ac_executable_extensions; do
23333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23334    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23336    break 2
23337  fi
23338done
23339  done
23340IFS=$as_save_IFS
23341
23342  ;;
23343esac
23344fi
23345DSYMUTIL=$ac_cv_path_DSYMUTIL
23346if test -n "$DSYMUTIL"; then
23347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23348$as_echo "$DSYMUTIL" >&6; }
23349else
23350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23351$as_echo "no" >&6; }
23352fi
23353
23354
23355          if test "x$DSYMUTIL" = x; then
23356            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23357          fi
23358        else
23359          # Otherwise we believe it is a complete path. Use it as it is.
23360          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23361$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23362          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23363$as_echo_n "checking for DSYMUTIL... " >&6; }
23364          if test ! -x "$tool_specified"; then
23365            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23366$as_echo "not found" >&6; }
23367            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23368          fi
23369          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23370$as_echo "$tool_specified" >&6; }
23371        fi
23372      fi
23373    fi
23374
23375  fi
23376
23377
23378
23379  if test "x$DSYMUTIL" = x; then
23380    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23381  fi
23382
23383
23384
23385
23386
23387  # Publish this variable in the help.
23388
23389
23390  if [ -z "${XATTR+x}" ]; then
23391    # The variable is not set by user, try to locate tool using the code snippet
23392    for ac_prog in xattr
23393do
23394  # Extract the first word of "$ac_prog", so it can be a program name with args.
23395set dummy $ac_prog; ac_word=$2
23396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23397$as_echo_n "checking for $ac_word... " >&6; }
23398if ${ac_cv_path_XATTR+:} false; then :
23399  $as_echo_n "(cached) " >&6
23400else
23401  case $XATTR in
23402  [\\/]* | ?:[\\/]*)
23403  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23404  ;;
23405  *)
23406  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23407for as_dir in $PATH
23408do
23409  IFS=$as_save_IFS
23410  test -z "$as_dir" && as_dir=.
23411    for ac_exec_ext in '' $ac_executable_extensions; do
23412  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23413    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23414    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23415    break 2
23416  fi
23417done
23418  done
23419IFS=$as_save_IFS
23420
23421  ;;
23422esac
23423fi
23424XATTR=$ac_cv_path_XATTR
23425if test -n "$XATTR"; then
23426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23427$as_echo "$XATTR" >&6; }
23428else
23429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23430$as_echo "no" >&6; }
23431fi
23432
23433
23434  test -n "$XATTR" && break
23435done
23436
23437  else
23438    # The variable is set, but is it from the command line or the environment?
23439
23440    # Try to remove the string !XATTR! from our list.
23441    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23442    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23443      # If it failed, the variable was not from the command line. Ignore it,
23444      # but warn the user (except for BASH, which is always set by the calling BASH).
23445      if test "xXATTR" != xBASH; then
23446        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23447$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23448      fi
23449      # Try to locate tool using the code snippet
23450      for ac_prog in xattr
23451do
23452  # Extract the first word of "$ac_prog", so it can be a program name with args.
23453set dummy $ac_prog; ac_word=$2
23454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23455$as_echo_n "checking for $ac_word... " >&6; }
23456if ${ac_cv_path_XATTR+:} false; then :
23457  $as_echo_n "(cached) " >&6
23458else
23459  case $XATTR in
23460  [\\/]* | ?:[\\/]*)
23461  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23462  ;;
23463  *)
23464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23465for as_dir in $PATH
23466do
23467  IFS=$as_save_IFS
23468  test -z "$as_dir" && as_dir=.
23469    for ac_exec_ext in '' $ac_executable_extensions; do
23470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23471    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23473    break 2
23474  fi
23475done
23476  done
23477IFS=$as_save_IFS
23478
23479  ;;
23480esac
23481fi
23482XATTR=$ac_cv_path_XATTR
23483if test -n "$XATTR"; then
23484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23485$as_echo "$XATTR" >&6; }
23486else
23487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23488$as_echo "no" >&6; }
23489fi
23490
23491
23492  test -n "$XATTR" && break
23493done
23494
23495    else
23496      # If it succeeded, then it was overridden by the user. We will use it
23497      # for the tool.
23498
23499      # First remove it from the list of overridden variables, so we can test
23500      # for unknown variables in the end.
23501      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23502
23503      # Check if we try to supply an empty value
23504      if test "x$XATTR" = x; then
23505        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23506$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23508$as_echo_n "checking for XATTR... " >&6; }
23509        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23510$as_echo "disabled" >&6; }
23511      else
23512        # Check if the provided tool contains a complete path.
23513        tool_specified="$XATTR"
23514        tool_basename="${tool_specified##*/}"
23515        if test "x$tool_basename" = "x$tool_specified"; then
23516          # A command without a complete path is provided, search $PATH.
23517          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23518$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23519          # Extract the first word of "$tool_basename", so it can be a program name with args.
23520set dummy $tool_basename; ac_word=$2
23521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23522$as_echo_n "checking for $ac_word... " >&6; }
23523if ${ac_cv_path_XATTR+:} false; then :
23524  $as_echo_n "(cached) " >&6
23525else
23526  case $XATTR in
23527  [\\/]* | ?:[\\/]*)
23528  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23529  ;;
23530  *)
23531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23532for as_dir in $PATH
23533do
23534  IFS=$as_save_IFS
23535  test -z "$as_dir" && as_dir=.
23536    for ac_exec_ext in '' $ac_executable_extensions; do
23537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23538    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23540    break 2
23541  fi
23542done
23543  done
23544IFS=$as_save_IFS
23545
23546  ;;
23547esac
23548fi
23549XATTR=$ac_cv_path_XATTR
23550if test -n "$XATTR"; then
23551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23552$as_echo "$XATTR" >&6; }
23553else
23554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23555$as_echo "no" >&6; }
23556fi
23557
23558
23559          if test "x$XATTR" = x; then
23560            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23561          fi
23562        else
23563          # Otherwise we believe it is a complete path. Use it as it is.
23564          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23565$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23566          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23567$as_echo_n "checking for XATTR... " >&6; }
23568          if test ! -x "$tool_specified"; then
23569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23570$as_echo "not found" >&6; }
23571            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23572          fi
23573          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23574$as_echo "$tool_specified" >&6; }
23575        fi
23576      fi
23577    fi
23578
23579  fi
23580
23581
23582
23583  if test "x$XATTR" = x; then
23584    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23585  fi
23586
23587
23588
23589
23590  # Publish this variable in the help.
23591
23592
23593  if [ -z "${CODESIGN+x}" ]; then
23594    # The variable is not set by user, try to locate tool using the code snippet
23595    for ac_prog in codesign
23596do
23597  # Extract the first word of "$ac_prog", so it can be a program name with args.
23598set dummy $ac_prog; ac_word=$2
23599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600$as_echo_n "checking for $ac_word... " >&6; }
23601if ${ac_cv_path_CODESIGN+:} false; then :
23602  $as_echo_n "(cached) " >&6
23603else
23604  case $CODESIGN in
23605  [\\/]* | ?:[\\/]*)
23606  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23607  ;;
23608  *)
23609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23610for as_dir in $PATH
23611do
23612  IFS=$as_save_IFS
23613  test -z "$as_dir" && as_dir=.
23614    for ac_exec_ext in '' $ac_executable_extensions; do
23615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23616    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23618    break 2
23619  fi
23620done
23621  done
23622IFS=$as_save_IFS
23623
23624  ;;
23625esac
23626fi
23627CODESIGN=$ac_cv_path_CODESIGN
23628if test -n "$CODESIGN"; then
23629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23630$as_echo "$CODESIGN" >&6; }
23631else
23632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23633$as_echo "no" >&6; }
23634fi
23635
23636
23637  test -n "$CODESIGN" && break
23638done
23639
23640  else
23641    # The variable is set, but is it from the command line or the environment?
23642
23643    # Try to remove the string !CODESIGN! from our list.
23644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23646      # If it failed, the variable was not from the command line. Ignore it,
23647      # but warn the user (except for BASH, which is always set by the calling BASH).
23648      if test "xCODESIGN" != xBASH; then
23649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23650$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23651      fi
23652      # Try to locate tool using the code snippet
23653      for ac_prog in codesign
23654do
23655  # Extract the first word of "$ac_prog", so it can be a program name with args.
23656set dummy $ac_prog; ac_word=$2
23657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23658$as_echo_n "checking for $ac_word... " >&6; }
23659if ${ac_cv_path_CODESIGN+:} false; then :
23660  $as_echo_n "(cached) " >&6
23661else
23662  case $CODESIGN in
23663  [\\/]* | ?:[\\/]*)
23664  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23665  ;;
23666  *)
23667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23668for as_dir in $PATH
23669do
23670  IFS=$as_save_IFS
23671  test -z "$as_dir" && as_dir=.
23672    for ac_exec_ext in '' $ac_executable_extensions; do
23673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23674    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23676    break 2
23677  fi
23678done
23679  done
23680IFS=$as_save_IFS
23681
23682  ;;
23683esac
23684fi
23685CODESIGN=$ac_cv_path_CODESIGN
23686if test -n "$CODESIGN"; then
23687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23688$as_echo "$CODESIGN" >&6; }
23689else
23690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23691$as_echo "no" >&6; }
23692fi
23693
23694
23695  test -n "$CODESIGN" && break
23696done
23697
23698    else
23699      # If it succeeded, then it was overridden by the user. We will use it
23700      # for the tool.
23701
23702      # First remove it from the list of overridden variables, so we can test
23703      # for unknown variables in the end.
23704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23705
23706      # Check if we try to supply an empty value
23707      if test "x$CODESIGN" = x; then
23708        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23709$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23710        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23711$as_echo_n "checking for CODESIGN... " >&6; }
23712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23713$as_echo "disabled" >&6; }
23714      else
23715        # Check if the provided tool contains a complete path.
23716        tool_specified="$CODESIGN"
23717        tool_basename="${tool_specified##*/}"
23718        if test "x$tool_basename" = "x$tool_specified"; then
23719          # A command without a complete path is provided, search $PATH.
23720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23721$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23722          # Extract the first word of "$tool_basename", so it can be a program name with args.
23723set dummy $tool_basename; ac_word=$2
23724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23725$as_echo_n "checking for $ac_word... " >&6; }
23726if ${ac_cv_path_CODESIGN+:} false; then :
23727  $as_echo_n "(cached) " >&6
23728else
23729  case $CODESIGN in
23730  [\\/]* | ?:[\\/]*)
23731  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23732  ;;
23733  *)
23734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23735for as_dir in $PATH
23736do
23737  IFS=$as_save_IFS
23738  test -z "$as_dir" && as_dir=.
23739    for ac_exec_ext in '' $ac_executable_extensions; do
23740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23741    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23743    break 2
23744  fi
23745done
23746  done
23747IFS=$as_save_IFS
23748
23749  ;;
23750esac
23751fi
23752CODESIGN=$ac_cv_path_CODESIGN
23753if test -n "$CODESIGN"; then
23754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23755$as_echo "$CODESIGN" >&6; }
23756else
23757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23758$as_echo "no" >&6; }
23759fi
23760
23761
23762          if test "x$CODESIGN" = x; then
23763            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23764          fi
23765        else
23766          # Otherwise we believe it is a complete path. Use it as it is.
23767          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23768$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23769          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23770$as_echo_n "checking for CODESIGN... " >&6; }
23771          if test ! -x "$tool_specified"; then
23772            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23773$as_echo "not found" >&6; }
23774            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23775          fi
23776          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23777$as_echo "$tool_specified" >&6; }
23778        fi
23779      fi
23780    fi
23781
23782  fi
23783
23784
23785    if test "x$CODESIGN" != "x"; then
23786      # Verify that the openjdk_codesign certificate is present
23787      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23788$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23789      $RM codesign-testfile
23790      $TOUCH codesign-testfile
23791      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23792      $RM codesign-testfile
23793      if test "x$CODESIGN" = x; then
23794        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23795$as_echo "no" >&6; }
23796      else
23797        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23798$as_echo "yes" >&6; }
23799      fi
23800    fi
23801
23802
23803
23804  # Publish this variable in the help.
23805
23806
23807  if [ -z "${SETFILE+x}" ]; then
23808    # The variable is not set by user, try to locate tool using the code snippet
23809    for ac_prog in SetFile
23810do
23811  # Extract the first word of "$ac_prog", so it can be a program name with args.
23812set dummy $ac_prog; ac_word=$2
23813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23814$as_echo_n "checking for $ac_word... " >&6; }
23815if ${ac_cv_path_SETFILE+:} false; then :
23816  $as_echo_n "(cached) " >&6
23817else
23818  case $SETFILE in
23819  [\\/]* | ?:[\\/]*)
23820  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23821  ;;
23822  *)
23823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23824for as_dir in $PATH
23825do
23826  IFS=$as_save_IFS
23827  test -z "$as_dir" && as_dir=.
23828    for ac_exec_ext in '' $ac_executable_extensions; do
23829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23830    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23832    break 2
23833  fi
23834done
23835  done
23836IFS=$as_save_IFS
23837
23838  ;;
23839esac
23840fi
23841SETFILE=$ac_cv_path_SETFILE
23842if test -n "$SETFILE"; then
23843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23844$as_echo "$SETFILE" >&6; }
23845else
23846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23847$as_echo "no" >&6; }
23848fi
23849
23850
23851  test -n "$SETFILE" && break
23852done
23853
23854  else
23855    # The variable is set, but is it from the command line or the environment?
23856
23857    # Try to remove the string !SETFILE! from our list.
23858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23860      # If it failed, the variable was not from the command line. Ignore it,
23861      # but warn the user (except for BASH, which is always set by the calling BASH).
23862      if test "xSETFILE" != xBASH; then
23863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23864$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23865      fi
23866      # Try to locate tool using the code snippet
23867      for ac_prog in SetFile
23868do
23869  # Extract the first word of "$ac_prog", so it can be a program name with args.
23870set dummy $ac_prog; ac_word=$2
23871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23872$as_echo_n "checking for $ac_word... " >&6; }
23873if ${ac_cv_path_SETFILE+:} false; then :
23874  $as_echo_n "(cached) " >&6
23875else
23876  case $SETFILE in
23877  [\\/]* | ?:[\\/]*)
23878  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23879  ;;
23880  *)
23881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23882for as_dir in $PATH
23883do
23884  IFS=$as_save_IFS
23885  test -z "$as_dir" && as_dir=.
23886    for ac_exec_ext in '' $ac_executable_extensions; do
23887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23888    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23890    break 2
23891  fi
23892done
23893  done
23894IFS=$as_save_IFS
23895
23896  ;;
23897esac
23898fi
23899SETFILE=$ac_cv_path_SETFILE
23900if test -n "$SETFILE"; then
23901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23902$as_echo "$SETFILE" >&6; }
23903else
23904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23905$as_echo "no" >&6; }
23906fi
23907
23908
23909  test -n "$SETFILE" && break
23910done
23911
23912    else
23913      # If it succeeded, then it was overridden by the user. We will use it
23914      # for the tool.
23915
23916      # First remove it from the list of overridden variables, so we can test
23917      # for unknown variables in the end.
23918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23919
23920      # Check if we try to supply an empty value
23921      if test "x$SETFILE" = x; then
23922        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23923$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23924        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23925$as_echo_n "checking for SETFILE... " >&6; }
23926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23927$as_echo "disabled" >&6; }
23928      else
23929        # Check if the provided tool contains a complete path.
23930        tool_specified="$SETFILE"
23931        tool_basename="${tool_specified##*/}"
23932        if test "x$tool_basename" = "x$tool_specified"; then
23933          # A command without a complete path is provided, search $PATH.
23934          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23935$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23936          # Extract the first word of "$tool_basename", so it can be a program name with args.
23937set dummy $tool_basename; ac_word=$2
23938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23939$as_echo_n "checking for $ac_word... " >&6; }
23940if ${ac_cv_path_SETFILE+:} false; then :
23941  $as_echo_n "(cached) " >&6
23942else
23943  case $SETFILE in
23944  [\\/]* | ?:[\\/]*)
23945  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23946  ;;
23947  *)
23948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23949for as_dir in $PATH
23950do
23951  IFS=$as_save_IFS
23952  test -z "$as_dir" && as_dir=.
23953    for ac_exec_ext in '' $ac_executable_extensions; do
23954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23955    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23957    break 2
23958  fi
23959done
23960  done
23961IFS=$as_save_IFS
23962
23963  ;;
23964esac
23965fi
23966SETFILE=$ac_cv_path_SETFILE
23967if test -n "$SETFILE"; then
23968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23969$as_echo "$SETFILE" >&6; }
23970else
23971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23972$as_echo "no" >&6; }
23973fi
23974
23975
23976          if test "x$SETFILE" = x; then
23977            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23978          fi
23979        else
23980          # Otherwise we believe it is a complete path. Use it as it is.
23981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23982$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23983          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23984$as_echo_n "checking for SETFILE... " >&6; }
23985          if test ! -x "$tool_specified"; then
23986            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23987$as_echo "not found" >&6; }
23988            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23989          fi
23990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23991$as_echo "$tool_specified" >&6; }
23992        fi
23993      fi
23994    fi
23995
23996  fi
23997
23998
23999
24000  if test "x$SETFILE" = x; then
24001    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24002  fi
24003
24004
24005  fi
24006
24007
24008  # Test if bash supports pipefail.
24009  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24010$as_echo_n "checking if bash supports pipefail... " >&6; }
24011  if ${BASH} -c 'set -o pipefail'; then
24012    BASH_ARGS="$BASH_ARGS -o pipefail"
24013    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24014$as_echo "yes" >&6; }
24015  else
24016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24017$as_echo "no" >&6; }
24018  fi
24019
24020  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24021$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24022  if ${BASH} -e -c 'true'; then
24023    BASH_ARGS="$BASH_ARGS -e"
24024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24025$as_echo "yes" >&6; }
24026  else
24027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24028$as_echo "no" >&6; }
24029  fi
24030
24031
24032
24033
24034# Check if pkg-config is available.
24035
24036
24037if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24038	if test -n "$ac_tool_prefix"; then
24039  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24040set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24042$as_echo_n "checking for $ac_word... " >&6; }
24043if ${ac_cv_path_PKG_CONFIG+:} false; then :
24044  $as_echo_n "(cached) " >&6
24045else
24046  case $PKG_CONFIG in
24047  [\\/]* | ?:[\\/]*)
24048  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24049  ;;
24050  *)
24051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24052for as_dir in $PATH
24053do
24054  IFS=$as_save_IFS
24055  test -z "$as_dir" && as_dir=.
24056    for ac_exec_ext in '' $ac_executable_extensions; do
24057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24058    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24060    break 2
24061  fi
24062done
24063  done
24064IFS=$as_save_IFS
24065
24066  ;;
24067esac
24068fi
24069PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24070if test -n "$PKG_CONFIG"; then
24071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24072$as_echo "$PKG_CONFIG" >&6; }
24073else
24074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24075$as_echo "no" >&6; }
24076fi
24077
24078
24079fi
24080if test -z "$ac_cv_path_PKG_CONFIG"; then
24081  ac_pt_PKG_CONFIG=$PKG_CONFIG
24082  # Extract the first word of "pkg-config", so it can be a program name with args.
24083set dummy pkg-config; ac_word=$2
24084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24085$as_echo_n "checking for $ac_word... " >&6; }
24086if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24087  $as_echo_n "(cached) " >&6
24088else
24089  case $ac_pt_PKG_CONFIG in
24090  [\\/]* | ?:[\\/]*)
24091  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24092  ;;
24093  *)
24094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24095for as_dir in $PATH
24096do
24097  IFS=$as_save_IFS
24098  test -z "$as_dir" && as_dir=.
24099    for ac_exec_ext in '' $ac_executable_extensions; do
24100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24101    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24103    break 2
24104  fi
24105done
24106  done
24107IFS=$as_save_IFS
24108
24109  ;;
24110esac
24111fi
24112ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24113if test -n "$ac_pt_PKG_CONFIG"; then
24114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24115$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24116else
24117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24118$as_echo "no" >&6; }
24119fi
24120
24121  if test "x$ac_pt_PKG_CONFIG" = x; then
24122    PKG_CONFIG=""
24123  else
24124    case $cross_compiling:$ac_tool_warned in
24125yes:)
24126{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24127$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24128ac_tool_warned=yes ;;
24129esac
24130    PKG_CONFIG=$ac_pt_PKG_CONFIG
24131  fi
24132else
24133  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24134fi
24135
24136fi
24137if test -n "$PKG_CONFIG"; then
24138	_pkg_min_version=0.9.0
24139	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24140$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24141	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24142		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24143$as_echo "yes" >&6; }
24144	else
24145		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24146$as_echo "no" >&6; }
24147		PKG_CONFIG=""
24148	fi
24149
24150fi
24151
24152# After basic tools have been setup, we can check build os specific details.
24153
24154  ###############################################################################
24155
24156  # Note that this is the build platform OS version!
24157
24158  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24159  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24160  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24161  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24162
24163
24164
24165
24166
24167# Misc basic settings
24168
24169
24170# Check whether --with-default-make-target was given.
24171if test "${with_default_make_target+set}" = set; then :
24172  withval=$with_default_make_target;
24173fi
24174
24175  if test "x$with_default_make_target" = "x" \
24176      || test "x$with_default_make_target" = "xyes"; then
24177    DEFAULT_MAKE_TARGET="exploded-image"
24178  elif test "x$with_default_make_target" = "xno"; then
24179    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24180  else
24181    DEFAULT_MAKE_TARGET="$with_default_make_target"
24182  fi
24183
24184
24185
24186
24187###############################################################################
24188#
24189# Determine OpenJDK variants, options and version numbers.
24190#
24191###############################################################################
24192
24193# We need build & target for this.
24194
24195  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24196  # We always build headless support.
24197  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24198$as_echo_n "checking headful support... " >&6; }
24199  # Check whether --enable-headful was given.
24200if test "${enable_headful+set}" = set; then :
24201  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24202else
24203  SUPPORT_HEADFUL=yes
24204fi
24205
24206
24207  SUPPORT_HEADLESS=yes
24208  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24209
24210  if test "x$SUPPORT_HEADFUL" = xyes; then
24211    # We are building both headful and headless.
24212    headful_msg="include support for both headful and headless"
24213  fi
24214
24215  if test "x$SUPPORT_HEADFUL" = xno; then
24216    # Thus we are building headless only.
24217    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24218    headful_msg="headless only"
24219  fi
24220
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24222$as_echo "$headful_msg" >&6; }
24223
24224
24225
24226
24227
24228  # Choose cacerts source file
24229
24230# Check whether --with-cacerts-file was given.
24231if test "${with_cacerts_file+set}" = set; then :
24232  withval=$with_cacerts_file;
24233fi
24234
24235  if test "x$with_cacerts_file" != x; then
24236    CACERTS_FILE=$with_cacerts_file
24237  fi
24238
24239
24240  # Enable or disable unlimited crypto
24241  # Check whether --enable-unlimited-crypto was given.
24242if test "${enable_unlimited_crypto+set}" = set; then :
24243  enableval=$enable_unlimited_crypto;
24244else
24245  enable_unlimited_crypto=no
24246fi
24247
24248  if test "x$enable_unlimited_crypto" = "xyes"; then
24249    UNLIMITED_CRYPTO=true
24250  else
24251    UNLIMITED_CRYPTO=false
24252  fi
24253
24254
24255  # Should we build the serviceability agent (SA)?
24256  INCLUDE_SA=true
24257  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24258    INCLUDE_SA=false
24259  fi
24260  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24261    INCLUDE_SA=false
24262  fi
24263
24264
24265  # Compress jars
24266  COMPRESS_JARS=false
24267
24268
24269
24270  # Setup default copyright year. Mostly overridden when building close to a new year.
24271
24272# Check whether --with-copyright-year was given.
24273if test "${with_copyright_year+set}" = set; then :
24274  withval=$with_copyright_year;
24275fi
24276
24277  if test "x$with_copyright_year" = xyes; then
24278    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24279  elif test "x$with_copyright_year" != x; then
24280    COPYRIGHT_YEAR="$with_copyright_year"
24281  else
24282    COPYRIGHT_YEAR=`$DATE +'%Y'`
24283  fi
24284
24285
24286
24287  # Check whether --enable-keep-packaged-modules was given.
24288if test "${enable_keep_packaged_modules+set}" = set; then :
24289  enableval=$enable_keep_packaged_modules;
24290fi
24291
24292
24293  if test "x$enable_keep_packaged_modules" = "xyes"; then
24294    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24295$as_echo_n "checking if packaged modules are kept... " >&6; }
24296    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24297$as_echo "yes" >&6; }
24298    JLINK_KEEP_PACKAGED_MODULES=true
24299  elif test "x$enable_keep_packaged_modules" = "xno"; then
24300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24301$as_echo_n "checking if packaged modules are kept... " >&6; }
24302    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24303$as_echo "no" >&6; }
24304    JLINK_KEEP_PACKAGED_MODULES=false
24305  elif test "x$enable_keep_packaged_modules" = "x"; then
24306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24307$as_echo "yes (default)" >&6; }
24308    JLINK_KEEP_PACKAGED_MODULES=true
24309  else
24310    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24311  fi
24312
24313
24314
24315
24316  # Warn user that old version arguments are deprecated.
24317
24318
24319# Check whether --with-milestone was given.
24320if test "${with_milestone+set}" = set; then :
24321  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24322$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24323fi
24324
24325
24326
24327
24328# Check whether --with-update-version was given.
24329if test "${with_update_version+set}" = set; then :
24330  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24331$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24332fi
24333
24334
24335
24336
24337# Check whether --with-user-release-suffix was given.
24338if test "${with_user_release_suffix+set}" = set; then :
24339  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
24340$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24341fi
24342
24343
24344
24345
24346# Check whether --with-build-number was given.
24347if test "${with_build_number+set}" = set; then :
24348  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24349$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24350fi
24351
24352
24353
24354  # Source the version numbers file
24355  . $AUTOCONF_DIR/version-numbers
24356
24357  # Some non-version number information is set in that file
24358
24359
24360
24361
24362
24363
24364
24365
24366
24367  # Override version from arguments
24368
24369  # If --with-version-string is set, process it first. It is possible to
24370  # override parts with more specific flags, since these are processed later.
24371
24372# Check whether --with-version-string was given.
24373if test "${with_version_string+set}" = set; then :
24374  withval=$with_version_string;
24375fi
24376
24377  if test "x$with_version_string" = xyes; then
24378    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24379  elif test "x$with_version_string" != x; then
24380    # Additional [] needed to keep m4 from mangling shell constructs.
24381    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24382      VERSION_MAJOR=${BASH_REMATCH[1]}
24383      VERSION_MINOR=${BASH_REMATCH[3]}
24384      VERSION_SECURITY=${BASH_REMATCH[5]}
24385      VERSION_PATCH=${BASH_REMATCH[7]}
24386      VERSION_PRE=${BASH_REMATCH[9]}
24387      version_plus_separator=${BASH_REMATCH[11]}
24388      VERSION_BUILD=${BASH_REMATCH[12]}
24389      VERSION_OPT=${BASH_REMATCH[14]}
24390      # Unspecified numerical fields are interpreted as 0.
24391      if test "x$VERSION_MINOR" = x; then
24392        VERSION_MINOR=0
24393      fi
24394      if test "x$VERSION_SECURITY" = x; then
24395        VERSION_SECURITY=0
24396      fi
24397      if test "x$VERSION_PATCH" = x; then
24398        VERSION_PATCH=0
24399      fi
24400      if test "x$version_plus_separator" != x \
24401          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24402        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24403      fi
24404      # Stop the version part process from setting default values.
24405      # We still allow them to explicitely override though.
24406      NO_DEFAULT_VERSION_PARTS=true
24407    else
24408      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24409    fi
24410  fi
24411
24412
24413# Check whether --with-version-pre was given.
24414if test "${with_version_pre+set}" = set; then :
24415  withval=$with_version_pre; with_version_pre_present=true
24416else
24417  with_version_pre_present=false
24418fi
24419
24420
24421  if test "x$with_version_pre_present" = xtrue; then
24422    if test "x$with_version_pre" = xyes; then
24423      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24424    elif test "x$with_version_pre" = xno; then
24425      # Interpret --without-* as empty string instead of the literal "no"
24426      VERSION_PRE=
24427    else
24428      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24429       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24430      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24432$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24433      fi
24434    fi
24435  else
24436    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24437      # Default is to use "internal" as pre
24438      VERSION_PRE="internal"
24439    fi
24440  fi
24441
24442
24443# Check whether --with-version-opt was given.
24444if test "${with_version_opt+set}" = set; then :
24445  withval=$with_version_opt; with_version_opt_present=true
24446else
24447  with_version_opt_present=false
24448fi
24449
24450
24451  if test "x$with_version_opt_present" = xtrue; then
24452    if test "x$with_version_opt" = xyes; then
24453      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24454    elif test "x$with_version_opt" = xno; then
24455      # Interpret --without-* as empty string instead of the literal "no"
24456      VERSION_OPT=
24457    else
24458      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24459       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24460      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24462$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24463      fi
24464    fi
24465  else
24466    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24467      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24468      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24469      # Outer [ ] to quote m4.
24470       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24471      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24472    fi
24473  fi
24474
24475
24476# Check whether --with-version-build was given.
24477if test "${with_version_build+set}" = set; then :
24478  withval=$with_version_build; with_version_build_present=true
24479else
24480  with_version_build_present=false
24481fi
24482
24483
24484  if test "x$with_version_build_present" = xtrue; then
24485    if test "x$with_version_build" = xyes; then
24486      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24487    elif test "x$with_version_build" = xno; then
24488      # Interpret --without-* as empty string instead of the literal "no"
24489      VERSION_BUILD=
24490    elif test "x$with_version_build" = x; then
24491      VERSION_BUILD=
24492    else
24493
24494  # Additional [] needed to keep m4 from mangling shell constructs.
24495  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24496    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24497  fi
24498  # Extract the version number without leading zeros.
24499  cleaned_value=${BASH_REMATCH[1]}
24500  if test "x$cleaned_value" = x; then
24501    # Special case for zero
24502    cleaned_value=${BASH_REMATCH[2]}
24503  fi
24504
24505  if test $cleaned_value -gt 255; then
24506    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24507  fi
24508  if test "x$cleaned_value" != "x$with_version_build"; then
24509    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24510$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24511  fi
24512  VERSION_BUILD=$cleaned_value
24513
24514    fi
24515  else
24516    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24517      # Default is to not have a build number.
24518      VERSION_BUILD=""
24519      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24520      VERSION_BUILD=0
24521    fi
24522  fi
24523
24524
24525# Check whether --with-version-major was given.
24526if test "${with_version_major+set}" = set; then :
24527  withval=$with_version_major; with_version_major_present=true
24528else
24529  with_version_major_present=false
24530fi
24531
24532
24533  if test "x$with_version_major_present" = xtrue; then
24534    if test "x$with_version_major" = xyes; then
24535      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24536    else
24537
24538  # Additional [] needed to keep m4 from mangling shell constructs.
24539  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24540    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24541  fi
24542  # Extract the version number without leading zeros.
24543  cleaned_value=${BASH_REMATCH[1]}
24544  if test "x$cleaned_value" = x; then
24545    # Special case for zero
24546    cleaned_value=${BASH_REMATCH[2]}
24547  fi
24548
24549  if test $cleaned_value -gt 255; then
24550    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24551  fi
24552  if test "x$cleaned_value" != "x$with_version_major"; then
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24554$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24555  fi
24556  VERSION_MAJOR=$cleaned_value
24557
24558    fi
24559  else
24560    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24561      # Default is to get value from version-numbers
24562      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24563    fi
24564  fi
24565
24566
24567# Check whether --with-version-minor was given.
24568if test "${with_version_minor+set}" = set; then :
24569  withval=$with_version_minor; with_version_minor_present=true
24570else
24571  with_version_minor_present=false
24572fi
24573
24574
24575  if test "x$with_version_minor_present" = xtrue; then
24576    if test "x$with_version_minor" = xyes; then
24577      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24578    elif test "x$with_version_minor" = xno; then
24579      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24580      VERSION_MINOR=0
24581    elif test "x$with_version_minor" = x; then
24582      VERSION_MINOR=0
24583    else
24584
24585  # Additional [] needed to keep m4 from mangling shell constructs.
24586  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24587    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24588  fi
24589  # Extract the version number without leading zeros.
24590  cleaned_value=${BASH_REMATCH[1]}
24591  if test "x$cleaned_value" = x; then
24592    # Special case for zero
24593    cleaned_value=${BASH_REMATCH[2]}
24594  fi
24595
24596  if test $cleaned_value -gt 255; then
24597    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24598  fi
24599  if test "x$cleaned_value" != "x$with_version_minor"; then
24600    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24601$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24602  fi
24603  VERSION_MINOR=$cleaned_value
24604
24605    fi
24606  else
24607    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24608      # Default is 0, if unspecified
24609      VERSION_MINOR=0
24610    fi
24611  fi
24612
24613
24614# Check whether --with-version-security was given.
24615if test "${with_version_security+set}" = set; then :
24616  withval=$with_version_security; with_version_security_present=true
24617else
24618  with_version_security_present=false
24619fi
24620
24621
24622  if test "x$with_version_security_present" = xtrue; then
24623    if test "x$with_version_security" = xyes; then
24624      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24625    elif test "x$with_version_security" = xno; then
24626      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24627      VERSION_SECURITY=0
24628    elif test "x$with_version_security" = x; then
24629      VERSION_SECURITY=0
24630    else
24631
24632  # Additional [] needed to keep m4 from mangling shell constructs.
24633  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24634    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24635  fi
24636  # Extract the version number without leading zeros.
24637  cleaned_value=${BASH_REMATCH[1]}
24638  if test "x$cleaned_value" = x; then
24639    # Special case for zero
24640    cleaned_value=${BASH_REMATCH[2]}
24641  fi
24642
24643  if test $cleaned_value -gt 255; then
24644    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24645  fi
24646  if test "x$cleaned_value" != "x$with_version_security"; then
24647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24648$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24649  fi
24650  VERSION_SECURITY=$cleaned_value
24651
24652    fi
24653  else
24654    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24655      # Default is 0, if unspecified
24656      VERSION_SECURITY=0
24657    fi
24658  fi
24659
24660
24661# Check whether --with-version-patch was given.
24662if test "${with_version_patch+set}" = set; then :
24663  withval=$with_version_patch; with_version_patch_present=true
24664else
24665  with_version_patch_present=false
24666fi
24667
24668
24669  if test "x$with_version_patch_present" = xtrue; then
24670    if test "x$with_version_patch" = xyes; then
24671      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24672    elif test "x$with_version_patch" = xno; then
24673      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24674      VERSION_PATCH=0
24675    elif test "x$with_version_patch" = x; then
24676      VERSION_PATCH=0
24677    else
24678
24679  # Additional [] needed to keep m4 from mangling shell constructs.
24680  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24681    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24682  fi
24683  # Extract the version number without leading zeros.
24684  cleaned_value=${BASH_REMATCH[1]}
24685  if test "x$cleaned_value" = x; then
24686    # Special case for zero
24687    cleaned_value=${BASH_REMATCH[2]}
24688  fi
24689
24690  if test $cleaned_value -gt 255; then
24691    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24692  fi
24693  if test "x$cleaned_value" != "x$with_version_patch"; then
24694    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24695$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24696  fi
24697  VERSION_PATCH=$cleaned_value
24698
24699    fi
24700  else
24701    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24702      # Default is 0, if unspecified
24703      VERSION_PATCH=0
24704    fi
24705  fi
24706
24707  # Calculate derived version properties
24708
24709  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24710  if test "x$VERSION_PRE" = x; then
24711    VERSION_IS_GA=true
24712  else
24713    VERSION_IS_GA=false
24714  fi
24715
24716  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24717  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24718
24719  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24720  # Strip trailing zeroes from stripped_version_number
24721  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24722  VERSION_NUMBER=$stripped_version_number
24723
24724  # The complete version string, with additional build information
24725  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24726    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24727  else
24728    # If either build or opt is set, we need a + separator
24729    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24730  fi
24731
24732  # The short version string, just VERSION_NUMBER and PRE, if present.
24733  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24734
24735  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24736$as_echo_n "checking for version string... " >&6; }
24737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24738$as_echo "$VERSION_STRING" >&6; }
24739
24740
24741
24742
24743
24744
24745
24746
24747
24748
24749
24750
24751
24752
24753
24754###############################################################################
24755#
24756# Setup BootJDK, used to bootstrap the build.
24757#
24758###############################################################################
24759
24760
24761  BOOT_JDK_FOUND=no
24762
24763# Check whether --with-boot-jdk was given.
24764if test "${with_boot_jdk+set}" = set; then :
24765  withval=$with_boot_jdk;
24766fi
24767
24768
24769  # We look for the Boot JDK through various means, going from more certain to
24770  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24771  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24772  # must check if this is indeed valid; otherwise we'll continue looking.
24773
24774  # Test: Is bootjdk explicitely set by command line arguments?
24775
24776  if test "x$BOOT_JDK_FOUND" = xno; then
24777    # Now execute the test
24778
24779  if test "x$with_boot_jdk" != x; then
24780    BOOT_JDK=$with_boot_jdk
24781    BOOT_JDK_FOUND=maybe
24782    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24783$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24784  fi
24785
24786
24787    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24788    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24789      # Do we have a bin/java?
24790      if test ! -x "$BOOT_JDK/bin/java"; then
24791        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24792$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24793        BOOT_JDK_FOUND=no
24794      else
24795        # Do we have a bin/javac?
24796        if test ! -x "$BOOT_JDK/bin/javac"; then
24797          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24798$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24799          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24800$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24801          BOOT_JDK_FOUND=no
24802        else
24803          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24804          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24805
24806          # Extra M4 quote needed to protect [] in grep expression.
24807          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24808          if test "x$FOUND_CORRECT_VERSION" = x; then
24809            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24811            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24812$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24813            BOOT_JDK_FOUND=no
24814          else
24815            # We're done! :-)
24816            BOOT_JDK_FOUND=yes
24817
24818  # Only process if variable expands to non-empty
24819
24820  if test "x$BOOT_JDK" != x; then
24821    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24822
24823  # Input might be given as Windows format, start by converting to
24824  # unix format.
24825  path="$BOOT_JDK"
24826  new_path=`$CYGPATH -u "$path"`
24827
24828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24831  # "foo.exe" is OK but "foo" is an error.
24832  #
24833  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24834  # It is also a way to make sure we got the proper file name for the real test later on.
24835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24836  if test "x$test_shortpath" = x; then
24837    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24838$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24839    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24840  fi
24841
24842  # Call helper function which possibly converts this using DOS-style short mode.
24843  # If so, the updated path is stored in $new_path.
24844
24845  input_path="$new_path"
24846  # Check if we need to convert this using DOS-style short mode. If the path
24847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24848  # take no chances and rewrite it.
24849  # Note: m4 eats our [], so we need to use [ and ] instead.
24850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24851  if test "x$has_forbidden_chars" != x; then
24852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24853    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24854    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24855    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24856      # Going to short mode and back again did indeed matter. Since short mode is
24857      # case insensitive, let's make it lowercase to improve readability.
24858      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24859      # Now convert it back to Unix-style (cygpath)
24860      input_path=`$CYGPATH -u "$shortmode_path"`
24861      new_path="$input_path"
24862    fi
24863  fi
24864
24865  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24866  if test "x$test_cygdrive_prefix" = x; then
24867    # As a simple fix, exclude /usr/bin since it's not a real path.
24868    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24869      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24870      # a path prefixed by /cygdrive for fixpath to work.
24871      new_path="$CYGWIN_ROOT_PATH$input_path"
24872    fi
24873  fi
24874
24875
24876  if test "x$path" != "x$new_path"; then
24877    BOOT_JDK="$new_path"
24878    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24879$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24880  fi
24881
24882    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24883
24884  path="$BOOT_JDK"
24885  has_colon=`$ECHO $path | $GREP ^.:`
24886  new_path="$path"
24887  if test "x$has_colon" = x; then
24888    # Not in mixed or Windows style, start by that.
24889    new_path=`cmd //c echo $path`
24890  fi
24891
24892
24893  input_path="$new_path"
24894  # Check if we need to convert this using DOS-style short mode. If the path
24895  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24896  # take no chances and rewrite it.
24897  # Note: m4 eats our [], so we need to use [ and ] instead.
24898  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24899  if test "x$has_forbidden_chars" != x; then
24900    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24901    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24902  fi
24903
24904
24905  windows_path="$new_path"
24906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24907    unix_path=`$CYGPATH -u "$windows_path"`
24908    new_path="$unix_path"
24909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24911    new_path="$unix_path"
24912  fi
24913
24914  if test "x$path" != "x$new_path"; then
24915    BOOT_JDK="$new_path"
24916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24917$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24918  fi
24919
24920  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24921  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24922
24923    else
24924      # We're on a unix platform. Hooray! :)
24925      path="$BOOT_JDK"
24926      has_space=`$ECHO "$path" | $GREP " "`
24927      if test "x$has_space" != x; then
24928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24929$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24930        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24931      fi
24932
24933      # Use eval to expand a potential ~
24934      eval path="$path"
24935      if test ! -f "$path" && test ! -d "$path"; then
24936        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24937      fi
24938
24939      if test -d "$path"; then
24940        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24941      else
24942        dir="`$DIRNAME "$path"`"
24943        base="`$BASENAME "$path"`"
24944        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24945      fi
24946    fi
24947  fi
24948
24949            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24950$as_echo_n "checking for Boot JDK... " >&6; }
24951            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24952$as_echo "$BOOT_JDK" >&6; }
24953            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24954$as_echo_n "checking Boot JDK version... " >&6; }
24955            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24956            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24957$as_echo "$BOOT_JDK_VERSION" >&6; }
24958          fi # end check jdk version
24959        fi # end check javac
24960      fi # end check java
24961    fi # end check boot jdk found
24962  fi
24963
24964  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24965    # Having specified an argument which is incorrect will produce an instant failure;
24966    # we should not go on looking
24967    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24968  fi
24969
24970  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24971
24972  if test "x$BOOT_JDK_FOUND" = xno; then
24973    # Now execute the test
24974
24975  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24976    # First check at user selected default
24977
24978  if test "x$BOOT_JDK_FOUND" = xno; then
24979    # Now execute the test
24980
24981  if test -x /usr/libexec/java_home; then
24982    BOOT_JDK=`/usr/libexec/java_home `
24983    BOOT_JDK_FOUND=maybe
24984    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24985$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24986  fi
24987
24988
24989    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24990    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24991      # Do we have a bin/java?
24992      if test ! -x "$BOOT_JDK/bin/java"; then
24993        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24995        BOOT_JDK_FOUND=no
24996      else
24997        # Do we have a bin/javac?
24998        if test ! -x "$BOOT_JDK/bin/javac"; then
24999          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25000$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25001          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25002$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25003          BOOT_JDK_FOUND=no
25004        else
25005          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25006          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25007
25008          # Extra M4 quote needed to protect [] in grep expression.
25009          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25010          if test "x$FOUND_CORRECT_VERSION" = x; then
25011            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25013            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25014$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25015            BOOT_JDK_FOUND=no
25016          else
25017            # We're done! :-)
25018            BOOT_JDK_FOUND=yes
25019
25020  # Only process if variable expands to non-empty
25021
25022  if test "x$BOOT_JDK" != x; then
25023    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25024
25025  # Input might be given as Windows format, start by converting to
25026  # unix format.
25027  path="$BOOT_JDK"
25028  new_path=`$CYGPATH -u "$path"`
25029
25030  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25031  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25032  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25033  # "foo.exe" is OK but "foo" is an error.
25034  #
25035  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25036  # It is also a way to make sure we got the proper file name for the real test later on.
25037  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25038  if test "x$test_shortpath" = x; then
25039    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25040$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25041    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25042  fi
25043
25044  # Call helper function which possibly converts this using DOS-style short mode.
25045  # If so, the updated path is stored in $new_path.
25046
25047  input_path="$new_path"
25048  # Check if we need to convert this using DOS-style short mode. If the path
25049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25050  # take no chances and rewrite it.
25051  # Note: m4 eats our [], so we need to use [ and ] instead.
25052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25053  if test "x$has_forbidden_chars" != x; then
25054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25058      # Going to short mode and back again did indeed matter. Since short mode is
25059      # case insensitive, let's make it lowercase to improve readability.
25060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25061      # Now convert it back to Unix-style (cygpath)
25062      input_path=`$CYGPATH -u "$shortmode_path"`
25063      new_path="$input_path"
25064    fi
25065  fi
25066
25067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25068  if test "x$test_cygdrive_prefix" = x; then
25069    # As a simple fix, exclude /usr/bin since it's not a real path.
25070    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25072      # a path prefixed by /cygdrive for fixpath to work.
25073      new_path="$CYGWIN_ROOT_PATH$input_path"
25074    fi
25075  fi
25076
25077
25078  if test "x$path" != "x$new_path"; then
25079    BOOT_JDK="$new_path"
25080    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25081$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25082  fi
25083
25084    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25085
25086  path="$BOOT_JDK"
25087  has_colon=`$ECHO $path | $GREP ^.:`
25088  new_path="$path"
25089  if test "x$has_colon" = x; then
25090    # Not in mixed or Windows style, start by that.
25091    new_path=`cmd //c echo $path`
25092  fi
25093
25094
25095  input_path="$new_path"
25096  # Check if we need to convert this using DOS-style short mode. If the path
25097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25098  # take no chances and rewrite it.
25099  # Note: m4 eats our [], so we need to use [ and ] instead.
25100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25101  if test "x$has_forbidden_chars" != x; then
25102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25103    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25104  fi
25105
25106
25107  windows_path="$new_path"
25108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25109    unix_path=`$CYGPATH -u "$windows_path"`
25110    new_path="$unix_path"
25111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25113    new_path="$unix_path"
25114  fi
25115
25116  if test "x$path" != "x$new_path"; then
25117    BOOT_JDK="$new_path"
25118    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25119$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25120  fi
25121
25122  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25123  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25124
25125    else
25126      # We're on a unix platform. Hooray! :)
25127      path="$BOOT_JDK"
25128      has_space=`$ECHO "$path" | $GREP " "`
25129      if test "x$has_space" != x; then
25130        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25131$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25132        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25133      fi
25134
25135      # Use eval to expand a potential ~
25136      eval path="$path"
25137      if test ! -f "$path" && test ! -d "$path"; then
25138        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25139      fi
25140
25141      if test -d "$path"; then
25142        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25143      else
25144        dir="`$DIRNAME "$path"`"
25145        base="`$BASENAME "$path"`"
25146        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25147      fi
25148    fi
25149  fi
25150
25151            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25152$as_echo_n "checking for Boot JDK... " >&6; }
25153            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25154$as_echo "$BOOT_JDK" >&6; }
25155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25156$as_echo_n "checking Boot JDK version... " >&6; }
25157            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25159$as_echo "$BOOT_JDK_VERSION" >&6; }
25160          fi # end check jdk version
25161        fi # end check javac
25162      fi # end check java
25163    fi # end check boot jdk found
25164  fi
25165
25166    # If that did not work out (e.g. too old), try explicit versions instead
25167
25168  if test "x$BOOT_JDK_FOUND" = xno; then
25169    # Now execute the test
25170
25171  if test -x /usr/libexec/java_home; then
25172    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25173    BOOT_JDK_FOUND=maybe
25174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25175$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25176  fi
25177
25178
25179    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25180    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25181      # Do we have a bin/java?
25182      if test ! -x "$BOOT_JDK/bin/java"; then
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25184$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25185        BOOT_JDK_FOUND=no
25186      else
25187        # Do we have a bin/javac?
25188        if test ! -x "$BOOT_JDK/bin/javac"; then
25189          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25191          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25192$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25193          BOOT_JDK_FOUND=no
25194        else
25195          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25196          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25197
25198          # Extra M4 quote needed to protect [] in grep expression.
25199          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25200          if test "x$FOUND_CORRECT_VERSION" = x; then
25201            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25202$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25203            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25204$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25205            BOOT_JDK_FOUND=no
25206          else
25207            # We're done! :-)
25208            BOOT_JDK_FOUND=yes
25209
25210  # Only process if variable expands to non-empty
25211
25212  if test "x$BOOT_JDK" != x; then
25213    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25214
25215  # Input might be given as Windows format, start by converting to
25216  # unix format.
25217  path="$BOOT_JDK"
25218  new_path=`$CYGPATH -u "$path"`
25219
25220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25223  # "foo.exe" is OK but "foo" is an error.
25224  #
25225  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25226  # It is also a way to make sure we got the proper file name for the real test later on.
25227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25228  if test "x$test_shortpath" = x; then
25229    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25230$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25231    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25232  fi
25233
25234  # Call helper function which possibly converts this using DOS-style short mode.
25235  # If so, the updated path is stored in $new_path.
25236
25237  input_path="$new_path"
25238  # Check if we need to convert this using DOS-style short mode. If the path
25239  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25240  # take no chances and rewrite it.
25241  # Note: m4 eats our [], so we need to use [ and ] instead.
25242  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25243  if test "x$has_forbidden_chars" != x; then
25244    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25245    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25246    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25247    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25248      # Going to short mode and back again did indeed matter. Since short mode is
25249      # case insensitive, let's make it lowercase to improve readability.
25250      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25251      # Now convert it back to Unix-style (cygpath)
25252      input_path=`$CYGPATH -u "$shortmode_path"`
25253      new_path="$input_path"
25254    fi
25255  fi
25256
25257  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25258  if test "x$test_cygdrive_prefix" = x; then
25259    # As a simple fix, exclude /usr/bin since it's not a real path.
25260    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25261      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25262      # a path prefixed by /cygdrive for fixpath to work.
25263      new_path="$CYGWIN_ROOT_PATH$input_path"
25264    fi
25265  fi
25266
25267
25268  if test "x$path" != "x$new_path"; then
25269    BOOT_JDK="$new_path"
25270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25271$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25272  fi
25273
25274    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25275
25276  path="$BOOT_JDK"
25277  has_colon=`$ECHO $path | $GREP ^.:`
25278  new_path="$path"
25279  if test "x$has_colon" = x; then
25280    # Not in mixed or Windows style, start by that.
25281    new_path=`cmd //c echo $path`
25282  fi
25283
25284
25285  input_path="$new_path"
25286  # Check if we need to convert this using DOS-style short mode. If the path
25287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25288  # take no chances and rewrite it.
25289  # Note: m4 eats our [], so we need to use [ and ] instead.
25290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25291  if test "x$has_forbidden_chars" != x; then
25292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25294  fi
25295
25296
25297  windows_path="$new_path"
25298  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25299    unix_path=`$CYGPATH -u "$windows_path"`
25300    new_path="$unix_path"
25301  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25302    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25303    new_path="$unix_path"
25304  fi
25305
25306  if test "x$path" != "x$new_path"; then
25307    BOOT_JDK="$new_path"
25308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25310  fi
25311
25312  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25313  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25314
25315    else
25316      # We're on a unix platform. Hooray! :)
25317      path="$BOOT_JDK"
25318      has_space=`$ECHO "$path" | $GREP " "`
25319      if test "x$has_space" != x; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25322        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25323      fi
25324
25325      # Use eval to expand a potential ~
25326      eval path="$path"
25327      if test ! -f "$path" && test ! -d "$path"; then
25328        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25329      fi
25330
25331      if test -d "$path"; then
25332        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25333      else
25334        dir="`$DIRNAME "$path"`"
25335        base="`$BASENAME "$path"`"
25336        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25337      fi
25338    fi
25339  fi
25340
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25342$as_echo_n "checking for Boot JDK... " >&6; }
25343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25344$as_echo "$BOOT_JDK" >&6; }
25345            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25346$as_echo_n "checking Boot JDK version... " >&6; }
25347            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25349$as_echo "$BOOT_JDK_VERSION" >&6; }
25350          fi # end check jdk version
25351        fi # end check javac
25352      fi # end check java
25353    fi # end check boot jdk found
25354  fi
25355
25356
25357  if test "x$BOOT_JDK_FOUND" = xno; then
25358    # Now execute the test
25359
25360  if test -x /usr/libexec/java_home; then
25361    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25362    BOOT_JDK_FOUND=maybe
25363    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25364$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25365  fi
25366
25367
25368    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25369    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25370      # Do we have a bin/java?
25371      if test ! -x "$BOOT_JDK/bin/java"; then
25372        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25374        BOOT_JDK_FOUND=no
25375      else
25376        # Do we have a bin/javac?
25377        if test ! -x "$BOOT_JDK/bin/javac"; then
25378          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25380          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25381$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25382          BOOT_JDK_FOUND=no
25383        else
25384          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25385          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25386
25387          # Extra M4 quote needed to protect [] in grep expression.
25388          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25389          if test "x$FOUND_CORRECT_VERSION" = x; then
25390            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25391$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25392            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25393$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25394            BOOT_JDK_FOUND=no
25395          else
25396            # We're done! :-)
25397            BOOT_JDK_FOUND=yes
25398
25399  # Only process if variable expands to non-empty
25400
25401  if test "x$BOOT_JDK" != x; then
25402    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25403
25404  # Input might be given as Windows format, start by converting to
25405  # unix format.
25406  path="$BOOT_JDK"
25407  new_path=`$CYGPATH -u "$path"`
25408
25409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25412  # "foo.exe" is OK but "foo" is an error.
25413  #
25414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25415  # It is also a way to make sure we got the proper file name for the real test later on.
25416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25417  if test "x$test_shortpath" = x; then
25418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25421  fi
25422
25423  # Call helper function which possibly converts this using DOS-style short mode.
25424  # If so, the updated path is stored in $new_path.
25425
25426  input_path="$new_path"
25427  # Check if we need to convert this using DOS-style short mode. If the path
25428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25429  # take no chances and rewrite it.
25430  # Note: m4 eats our [], so we need to use [ and ] instead.
25431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25432  if test "x$has_forbidden_chars" != x; then
25433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25437      # Going to short mode and back again did indeed matter. Since short mode is
25438      # case insensitive, let's make it lowercase to improve readability.
25439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25440      # Now convert it back to Unix-style (cygpath)
25441      input_path=`$CYGPATH -u "$shortmode_path"`
25442      new_path="$input_path"
25443    fi
25444  fi
25445
25446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25447  if test "x$test_cygdrive_prefix" = x; then
25448    # As a simple fix, exclude /usr/bin since it's not a real path.
25449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25451      # a path prefixed by /cygdrive for fixpath to work.
25452      new_path="$CYGWIN_ROOT_PATH$input_path"
25453    fi
25454  fi
25455
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    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25464
25465  path="$BOOT_JDK"
25466  has_colon=`$ECHO $path | $GREP ^.:`
25467  new_path="$path"
25468  if test "x$has_colon" = x; then
25469    # Not in mixed or Windows style, start by that.
25470    new_path=`cmd //c echo $path`
25471  fi
25472
25473
25474  input_path="$new_path"
25475  # Check if we need to convert this using DOS-style short mode. If the path
25476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25477  # take no chances and rewrite it.
25478  # Note: m4 eats our [], so we need to use [ and ] instead.
25479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25480  if test "x$has_forbidden_chars" != x; then
25481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25483  fi
25484
25485
25486  windows_path="$new_path"
25487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25488    unix_path=`$CYGPATH -u "$windows_path"`
25489    new_path="$unix_path"
25490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25492    new_path="$unix_path"
25493  fi
25494
25495  if test "x$path" != "x$new_path"; then
25496    BOOT_JDK="$new_path"
25497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25499  fi
25500
25501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25503
25504    else
25505      # We're on a unix platform. Hooray! :)
25506      path="$BOOT_JDK"
25507      has_space=`$ECHO "$path" | $GREP " "`
25508      if test "x$has_space" != x; then
25509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25511        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25512      fi
25513
25514      # Use eval to expand a potential ~
25515      eval path="$path"
25516      if test ! -f "$path" && test ! -d "$path"; then
25517        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25518      fi
25519
25520      if test -d "$path"; then
25521        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25522      else
25523        dir="`$DIRNAME "$path"`"
25524        base="`$BASENAME "$path"`"
25525        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25526      fi
25527    fi
25528  fi
25529
25530            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25531$as_echo_n "checking for Boot JDK... " >&6; }
25532            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25533$as_echo "$BOOT_JDK" >&6; }
25534            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25535$as_echo_n "checking Boot JDK version... " >&6; }
25536            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25537            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25538$as_echo "$BOOT_JDK_VERSION" >&6; }
25539          fi # end check jdk version
25540        fi # end check javac
25541      fi # end check java
25542    fi # end check boot jdk found
25543  fi
25544
25545
25546  if test "x$BOOT_JDK_FOUND" = xno; then
25547    # Now execute the test
25548
25549  if test -x /usr/libexec/java_home; then
25550    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25551    BOOT_JDK_FOUND=maybe
25552    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25553$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25554  fi
25555
25556
25557    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25558    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25559      # Do we have a bin/java?
25560      if test ! -x "$BOOT_JDK/bin/java"; then
25561        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25563        BOOT_JDK_FOUND=no
25564      else
25565        # Do we have a bin/javac?
25566        if test ! -x "$BOOT_JDK/bin/javac"; then
25567          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25568$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25569          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25570$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25571          BOOT_JDK_FOUND=no
25572        else
25573          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25574          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25575
25576          # Extra M4 quote needed to protect [] in grep expression.
25577          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25578          if test "x$FOUND_CORRECT_VERSION" = x; then
25579            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25581            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25582$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25583            BOOT_JDK_FOUND=no
25584          else
25585            # We're done! :-)
25586            BOOT_JDK_FOUND=yes
25587
25588  # Only process if variable expands to non-empty
25589
25590  if test "x$BOOT_JDK" != x; then
25591    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25592
25593  # Input might be given as Windows format, start by converting to
25594  # unix format.
25595  path="$BOOT_JDK"
25596  new_path=`$CYGPATH -u "$path"`
25597
25598  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25599  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25600  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25601  # "foo.exe" is OK but "foo" is an error.
25602  #
25603  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25604  # It is also a way to make sure we got the proper file name for the real test later on.
25605  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25606  if test "x$test_shortpath" = x; then
25607    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25608$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25609    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25610  fi
25611
25612  # Call helper function which possibly converts this using DOS-style short mode.
25613  # If so, the updated path is stored in $new_path.
25614
25615  input_path="$new_path"
25616  # Check if we need to convert this using DOS-style short mode. If the path
25617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25618  # take no chances and rewrite it.
25619  # Note: m4 eats our [], so we need to use [ and ] instead.
25620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25621  if test "x$has_forbidden_chars" != x; then
25622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25623    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25624    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25625    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25626      # Going to short mode and back again did indeed matter. Since short mode is
25627      # case insensitive, let's make it lowercase to improve readability.
25628      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25629      # Now convert it back to Unix-style (cygpath)
25630      input_path=`$CYGPATH -u "$shortmode_path"`
25631      new_path="$input_path"
25632    fi
25633  fi
25634
25635  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25636  if test "x$test_cygdrive_prefix" = x; then
25637    # As a simple fix, exclude /usr/bin since it's not a real path.
25638    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25639      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25640      # a path prefixed by /cygdrive for fixpath to work.
25641      new_path="$CYGWIN_ROOT_PATH$input_path"
25642    fi
25643  fi
25644
25645
25646  if test "x$path" != "x$new_path"; then
25647    BOOT_JDK="$new_path"
25648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25649$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25650  fi
25651
25652    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25653
25654  path="$BOOT_JDK"
25655  has_colon=`$ECHO $path | $GREP ^.:`
25656  new_path="$path"
25657  if test "x$has_colon" = x; then
25658    # Not in mixed or Windows style, start by that.
25659    new_path=`cmd //c echo $path`
25660  fi
25661
25662
25663  input_path="$new_path"
25664  # Check if we need to convert this using DOS-style short mode. If the path
25665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25666  # take no chances and rewrite it.
25667  # Note: m4 eats our [], so we need to use [ and ] instead.
25668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25669  if test "x$has_forbidden_chars" != x; then
25670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25671    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25672  fi
25673
25674
25675  windows_path="$new_path"
25676  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25677    unix_path=`$CYGPATH -u "$windows_path"`
25678    new_path="$unix_path"
25679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25680    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25681    new_path="$unix_path"
25682  fi
25683
25684  if test "x$path" != "x$new_path"; then
25685    BOOT_JDK="$new_path"
25686    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25687$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25688  fi
25689
25690  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25691  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25692
25693    else
25694      # We're on a unix platform. Hooray! :)
25695      path="$BOOT_JDK"
25696      has_space=`$ECHO "$path" | $GREP " "`
25697      if test "x$has_space" != x; then
25698        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25699$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25700        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25701      fi
25702
25703      # Use eval to expand a potential ~
25704      eval path="$path"
25705      if test ! -f "$path" && test ! -d "$path"; then
25706        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25707      fi
25708
25709      if test -d "$path"; then
25710        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25711      else
25712        dir="`$DIRNAME "$path"`"
25713        base="`$BASENAME "$path"`"
25714        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25715      fi
25716    fi
25717  fi
25718
25719            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25720$as_echo_n "checking for Boot JDK... " >&6; }
25721            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25722$as_echo "$BOOT_JDK" >&6; }
25723            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25724$as_echo_n "checking Boot JDK version... " >&6; }
25725            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25726            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25727$as_echo "$BOOT_JDK_VERSION" >&6; }
25728          fi # end check jdk version
25729        fi # end check javac
25730      fi # end check java
25731    fi # end check boot jdk found
25732  fi
25733
25734  fi
25735
25736
25737    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25738    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25739      # Do we have a bin/java?
25740      if test ! -x "$BOOT_JDK/bin/java"; then
25741        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25743        BOOT_JDK_FOUND=no
25744      else
25745        # Do we have a bin/javac?
25746        if test ! -x "$BOOT_JDK/bin/javac"; then
25747          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25749          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25750$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25751          BOOT_JDK_FOUND=no
25752        else
25753          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25754          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25755
25756          # Extra M4 quote needed to protect [] in grep expression.
25757          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25758          if test "x$FOUND_CORRECT_VERSION" = x; then
25759            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25761            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25762$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25763            BOOT_JDK_FOUND=no
25764          else
25765            # We're done! :-)
25766            BOOT_JDK_FOUND=yes
25767
25768  # Only process if variable expands to non-empty
25769
25770  if test "x$BOOT_JDK" != x; then
25771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25772
25773  # Input might be given as Windows format, start by converting to
25774  # unix format.
25775  path="$BOOT_JDK"
25776  new_path=`$CYGPATH -u "$path"`
25777
25778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25781  # "foo.exe" is OK but "foo" is an error.
25782  #
25783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25784  # It is also a way to make sure we got the proper file name for the real test later on.
25785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25786  if test "x$test_shortpath" = x; then
25787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25788$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25789    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25790  fi
25791
25792  # Call helper function which possibly converts this using DOS-style short mode.
25793  # If so, the updated path is stored in $new_path.
25794
25795  input_path="$new_path"
25796  # Check if we need to convert this using DOS-style short mode. If the path
25797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25798  # take no chances and rewrite it.
25799  # Note: m4 eats our [], so we need to use [ and ] instead.
25800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25801  if test "x$has_forbidden_chars" != x; then
25802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25806      # Going to short mode and back again did indeed matter. Since short mode is
25807      # case insensitive, let's make it lowercase to improve readability.
25808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25809      # Now convert it back to Unix-style (cygpath)
25810      input_path=`$CYGPATH -u "$shortmode_path"`
25811      new_path="$input_path"
25812    fi
25813  fi
25814
25815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25816  if test "x$test_cygdrive_prefix" = x; then
25817    # As a simple fix, exclude /usr/bin since it's not a real path.
25818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25820      # a path prefixed by /cygdrive for fixpath to work.
25821      new_path="$CYGWIN_ROOT_PATH$input_path"
25822    fi
25823  fi
25824
25825
25826  if test "x$path" != "x$new_path"; then
25827    BOOT_JDK="$new_path"
25828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25829$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25830  fi
25831
25832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25833
25834  path="$BOOT_JDK"
25835  has_colon=`$ECHO $path | $GREP ^.:`
25836  new_path="$path"
25837  if test "x$has_colon" = x; then
25838    # Not in mixed or Windows style, start by that.
25839    new_path=`cmd //c echo $path`
25840  fi
25841
25842
25843  input_path="$new_path"
25844  # Check if we need to convert this using DOS-style short mode. If the path
25845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25846  # take no chances and rewrite it.
25847  # Note: m4 eats our [], so we need to use [ and ] instead.
25848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25849  if test "x$has_forbidden_chars" != x; then
25850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25852  fi
25853
25854
25855  windows_path="$new_path"
25856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25857    unix_path=`$CYGPATH -u "$windows_path"`
25858    new_path="$unix_path"
25859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25861    new_path="$unix_path"
25862  fi
25863
25864  if test "x$path" != "x$new_path"; then
25865    BOOT_JDK="$new_path"
25866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25867$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25868  fi
25869
25870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25872
25873    else
25874      # We're on a unix platform. Hooray! :)
25875      path="$BOOT_JDK"
25876      has_space=`$ECHO "$path" | $GREP " "`
25877      if test "x$has_space" != x; then
25878        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25879$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25880        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25881      fi
25882
25883      # Use eval to expand a potential ~
25884      eval path="$path"
25885      if test ! -f "$path" && test ! -d "$path"; then
25886        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25887      fi
25888
25889      if test -d "$path"; then
25890        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25891      else
25892        dir="`$DIRNAME "$path"`"
25893        base="`$BASENAME "$path"`"
25894        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25895      fi
25896    fi
25897  fi
25898
25899            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25900$as_echo_n "checking for Boot JDK... " >&6; }
25901            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25902$as_echo "$BOOT_JDK" >&6; }
25903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25904$as_echo_n "checking Boot JDK version... " >&6; }
25905            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25906            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25907$as_echo "$BOOT_JDK_VERSION" >&6; }
25908          fi # end check jdk version
25909        fi # end check javac
25910      fi # end check java
25911    fi # end check boot jdk found
25912  fi
25913
25914
25915  # Test: Is $JAVA_HOME set?
25916
25917  if test "x$BOOT_JDK_FOUND" = xno; then
25918    # Now execute the test
25919
25920  if test "x$JAVA_HOME" != x; then
25921    JAVA_HOME_PROCESSED="$JAVA_HOME"
25922
25923  # Only process if variable expands to non-empty
25924
25925  if test "x$JAVA_HOME_PROCESSED" != x; then
25926    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25927
25928  # Input might be given as Windows format, start by converting to
25929  # unix format.
25930  path="$JAVA_HOME_PROCESSED"
25931  new_path=`$CYGPATH -u "$path"`
25932
25933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25936  # "foo.exe" is OK but "foo" is an error.
25937  #
25938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25939  # It is also a way to make sure we got the proper file name for the real test later on.
25940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25941  if test "x$test_shortpath" = x; then
25942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25943$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25944    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25945  fi
25946
25947  # Call helper function which possibly converts this using DOS-style short mode.
25948  # If so, the updated path is stored in $new_path.
25949
25950  input_path="$new_path"
25951  # Check if we need to convert this using DOS-style short mode. If the path
25952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25953  # take no chances and rewrite it.
25954  # Note: m4 eats our [], so we need to use [ and ] instead.
25955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25956  if test "x$has_forbidden_chars" != x; then
25957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25961      # Going to short mode and back again did indeed matter. Since short mode is
25962      # case insensitive, let's make it lowercase to improve readability.
25963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25964      # Now convert it back to Unix-style (cygpath)
25965      input_path=`$CYGPATH -u "$shortmode_path"`
25966      new_path="$input_path"
25967    fi
25968  fi
25969
25970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25971  if test "x$test_cygdrive_prefix" = x; then
25972    # As a simple fix, exclude /usr/bin since it's not a real path.
25973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25975      # a path prefixed by /cygdrive for fixpath to work.
25976      new_path="$CYGWIN_ROOT_PATH$input_path"
25977    fi
25978  fi
25979
25980
25981  if test "x$path" != "x$new_path"; then
25982    JAVA_HOME_PROCESSED="$new_path"
25983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25984$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25985  fi
25986
25987    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25988
25989  path="$JAVA_HOME_PROCESSED"
25990  has_colon=`$ECHO $path | $GREP ^.:`
25991  new_path="$path"
25992  if test "x$has_colon" = x; then
25993    # Not in mixed or Windows style, start by that.
25994    new_path=`cmd //c echo $path`
25995  fi
25996
25997
25998  input_path="$new_path"
25999  # Check if we need to convert this using DOS-style short mode. If the path
26000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26001  # take no chances and rewrite it.
26002  # Note: m4 eats our [], so we need to use [ and ] instead.
26003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26004  if test "x$has_forbidden_chars" != x; then
26005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26007  fi
26008
26009
26010  windows_path="$new_path"
26011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26012    unix_path=`$CYGPATH -u "$windows_path"`
26013    new_path="$unix_path"
26014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26016    new_path="$unix_path"
26017  fi
26018
26019  if test "x$path" != "x$new_path"; then
26020    JAVA_HOME_PROCESSED="$new_path"
26021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26022$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26023  fi
26024
26025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26027
26028    else
26029      # We're on a unix platform. Hooray! :)
26030      path="$JAVA_HOME_PROCESSED"
26031      has_space=`$ECHO "$path" | $GREP " "`
26032      if test "x$has_space" != x; then
26033        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26034$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26035        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26036      fi
26037
26038      # Use eval to expand a potential ~
26039      eval path="$path"
26040      if test ! -f "$path" && test ! -d "$path"; then
26041        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26042      fi
26043
26044      if test -d "$path"; then
26045        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26046      else
26047        dir="`$DIRNAME "$path"`"
26048        base="`$BASENAME "$path"`"
26049        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26050      fi
26051    fi
26052  fi
26053
26054    if test ! -d "$JAVA_HOME_PROCESSED"; then
26055      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26056$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26057    else
26058      # Aha, the user has set a JAVA_HOME
26059      # let us use that as the Boot JDK.
26060      BOOT_JDK="$JAVA_HOME_PROCESSED"
26061      BOOT_JDK_FOUND=maybe
26062      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26063$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26064    fi
26065  fi
26066
26067
26068    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26069    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26070      # Do we have a bin/java?
26071      if test ! -x "$BOOT_JDK/bin/java"; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26073$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26074        BOOT_JDK_FOUND=no
26075      else
26076        # Do we have a bin/javac?
26077        if test ! -x "$BOOT_JDK/bin/javac"; then
26078          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26080          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26081$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26082          BOOT_JDK_FOUND=no
26083        else
26084          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26085          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26086
26087          # Extra M4 quote needed to protect [] in grep expression.
26088          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26089          if test "x$FOUND_CORRECT_VERSION" = x; then
26090            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26091$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26092            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26093$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26094            BOOT_JDK_FOUND=no
26095          else
26096            # We're done! :-)
26097            BOOT_JDK_FOUND=yes
26098
26099  # Only process if variable expands to non-empty
26100
26101  if test "x$BOOT_JDK" != x; then
26102    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26103
26104  # Input might be given as Windows format, start by converting to
26105  # unix format.
26106  path="$BOOT_JDK"
26107  new_path=`$CYGPATH -u "$path"`
26108
26109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26112  # "foo.exe" is OK but "foo" is an error.
26113  #
26114  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26115  # It is also a way to make sure we got the proper file name for the real test later on.
26116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26117  if test "x$test_shortpath" = x; then
26118    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26120    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26121  fi
26122
26123  # Call helper function which possibly converts this using DOS-style short mode.
26124  # If so, the updated path is stored in $new_path.
26125
26126  input_path="$new_path"
26127  # Check if we need to convert this using DOS-style short mode. If the path
26128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26129  # take no chances and rewrite it.
26130  # Note: m4 eats our [], so we need to use [ and ] instead.
26131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26132  if test "x$has_forbidden_chars" != x; then
26133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26134    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26135    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26136    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26137      # Going to short mode and back again did indeed matter. Since short mode is
26138      # case insensitive, let's make it lowercase to improve readability.
26139      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26140      # Now convert it back to Unix-style (cygpath)
26141      input_path=`$CYGPATH -u "$shortmode_path"`
26142      new_path="$input_path"
26143    fi
26144  fi
26145
26146  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26147  if test "x$test_cygdrive_prefix" = x; then
26148    # As a simple fix, exclude /usr/bin since it's not a real path.
26149    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26150      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26151      # a path prefixed by /cygdrive for fixpath to work.
26152      new_path="$CYGWIN_ROOT_PATH$input_path"
26153    fi
26154  fi
26155
26156
26157  if test "x$path" != "x$new_path"; then
26158    BOOT_JDK="$new_path"
26159    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26160$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26161  fi
26162
26163    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26164
26165  path="$BOOT_JDK"
26166  has_colon=`$ECHO $path | $GREP ^.:`
26167  new_path="$path"
26168  if test "x$has_colon" = x; then
26169    # Not in mixed or Windows style, start by that.
26170    new_path=`cmd //c echo $path`
26171  fi
26172
26173
26174  input_path="$new_path"
26175  # Check if we need to convert this using DOS-style short mode. If the path
26176  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26177  # take no chances and rewrite it.
26178  # Note: m4 eats our [], so we need to use [ and ] instead.
26179  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26180  if test "x$has_forbidden_chars" != x; then
26181    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26182    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26183  fi
26184
26185
26186  windows_path="$new_path"
26187  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26188    unix_path=`$CYGPATH -u "$windows_path"`
26189    new_path="$unix_path"
26190  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26191    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26192    new_path="$unix_path"
26193  fi
26194
26195  if test "x$path" != "x$new_path"; then
26196    BOOT_JDK="$new_path"
26197    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26198$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26199  fi
26200
26201  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26202  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26203
26204    else
26205      # We're on a unix platform. Hooray! :)
26206      path="$BOOT_JDK"
26207      has_space=`$ECHO "$path" | $GREP " "`
26208      if test "x$has_space" != x; then
26209        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26210$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26211        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26212      fi
26213
26214      # Use eval to expand a potential ~
26215      eval path="$path"
26216      if test ! -f "$path" && test ! -d "$path"; then
26217        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26218      fi
26219
26220      if test -d "$path"; then
26221        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26222      else
26223        dir="`$DIRNAME "$path"`"
26224        base="`$BASENAME "$path"`"
26225        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26226      fi
26227    fi
26228  fi
26229
26230            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26231$as_echo_n "checking for Boot JDK... " >&6; }
26232            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26233$as_echo "$BOOT_JDK" >&6; }
26234            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26235$as_echo_n "checking Boot JDK version... " >&6; }
26236            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26238$as_echo "$BOOT_JDK_VERSION" >&6; }
26239          fi # end check jdk version
26240        fi # end check javac
26241      fi # end check java
26242    fi # end check boot jdk found
26243  fi
26244
26245
26246  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26247
26248  if test "x$BOOT_JDK_FOUND" = xno; then
26249    # Now execute the test
26250
26251  # Extract the first word of "javac", so it can be a program name with args.
26252set dummy javac; ac_word=$2
26253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26254$as_echo_n "checking for $ac_word... " >&6; }
26255if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26256  $as_echo_n "(cached) " >&6
26257else
26258  case $JAVAC_CHECK in
26259  [\\/]* | ?:[\\/]*)
26260  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26261  ;;
26262  *)
26263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26264for as_dir in $PATH
26265do
26266  IFS=$as_save_IFS
26267  test -z "$as_dir" && as_dir=.
26268    for ac_exec_ext in '' $ac_executable_extensions; do
26269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26270    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26272    break 2
26273  fi
26274done
26275  done
26276IFS=$as_save_IFS
26277
26278  ;;
26279esac
26280fi
26281JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26282if test -n "$JAVAC_CHECK"; then
26283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26284$as_echo "$JAVAC_CHECK" >&6; }
26285else
26286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26287$as_echo "no" >&6; }
26288fi
26289
26290
26291  # Extract the first word of "java", so it can be a program name with args.
26292set dummy java; ac_word=$2
26293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26294$as_echo_n "checking for $ac_word... " >&6; }
26295if ${ac_cv_path_JAVA_CHECK+:} false; then :
26296  $as_echo_n "(cached) " >&6
26297else
26298  case $JAVA_CHECK in
26299  [\\/]* | ?:[\\/]*)
26300  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26301  ;;
26302  *)
26303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26304for as_dir in $PATH
26305do
26306  IFS=$as_save_IFS
26307  test -z "$as_dir" && as_dir=.
26308    for ac_exec_ext in '' $ac_executable_extensions; do
26309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26310    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26312    break 2
26313  fi
26314done
26315  done
26316IFS=$as_save_IFS
26317
26318  ;;
26319esac
26320fi
26321JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26322if test -n "$JAVA_CHECK"; then
26323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26324$as_echo "$JAVA_CHECK" >&6; }
26325else
26326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26327$as_echo "no" >&6; }
26328fi
26329
26330
26331  BINARY="$JAVAC_CHECK"
26332  if test "x$JAVAC_CHECK" = x; then
26333    BINARY="$JAVA_CHECK"
26334  fi
26335  if test "x$BINARY" != x; then
26336    # So there is a java(c) binary, it might be part of a JDK.
26337    # Lets find the JDK/JRE directory by following symbolic links.
26338    # Linux/GNU systems often have links from /usr/bin/java to
26339    # /etc/alternatives/java to the real JDK binary.
26340
26341  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26342    # Follow a chain of symbolic links. Use readlink
26343    # where it exists, else fall back to horribly
26344    # complicated shell code.
26345    if test "x$READLINK_TESTED" != yes; then
26346      # On MacOSX there is a readlink tool with a different
26347      # purpose than the GNU readlink tool. Check the found readlink.
26348      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26349      if test "x$ISGNU" = x; then
26350        # A readlink that we do not know how to use.
26351        # Are there other non-GNU readlinks out there?
26352        READLINK_TESTED=yes
26353        READLINK=
26354      fi
26355    fi
26356
26357    if test "x$READLINK" != x; then
26358      BINARY=`$READLINK -f $BINARY`
26359    else
26360      # Save the current directory for restoring afterwards
26361      STARTDIR=$PWD
26362      COUNTER=0
26363      sym_link_dir=`$DIRNAME $BINARY`
26364      sym_link_file=`$BASENAME $BINARY`
26365      cd $sym_link_dir
26366      # Use -P flag to resolve symlinks in directories.
26367      cd `$THEPWDCMD -P`
26368      sym_link_dir=`$THEPWDCMD -P`
26369      # Resolve file symlinks
26370      while test $COUNTER -lt 20; do
26371        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26372        if test "x$ISLINK" == x; then
26373          # This is not a symbolic link! We are done!
26374          break
26375        fi
26376        # Again resolve directory symlinks since the target of the just found
26377        # link could be in a different directory
26378        cd `$DIRNAME $ISLINK`
26379        sym_link_dir=`$THEPWDCMD -P`
26380        sym_link_file=`$BASENAME $ISLINK`
26381        let COUNTER=COUNTER+1
26382      done
26383      cd $STARTDIR
26384      BINARY=$sym_link_dir/$sym_link_file
26385    fi
26386  fi
26387
26388    BOOT_JDK=`dirname "$BINARY"`
26389    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26390    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26391      # Looks like we found ourselves an JDK
26392      BOOT_JDK_FOUND=maybe
26393      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26394$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26395    fi
26396  fi
26397
26398
26399    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26400    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26401      # Do we have a bin/java?
26402      if test ! -x "$BOOT_JDK/bin/java"; then
26403        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26405        BOOT_JDK_FOUND=no
26406      else
26407        # Do we have a bin/javac?
26408        if test ! -x "$BOOT_JDK/bin/javac"; then
26409          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26411          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26412$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26413          BOOT_JDK_FOUND=no
26414        else
26415          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26416          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26417
26418          # Extra M4 quote needed to protect [] in grep expression.
26419          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26420          if test "x$FOUND_CORRECT_VERSION" = x; then
26421            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26422$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26423            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26424$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26425            BOOT_JDK_FOUND=no
26426          else
26427            # We're done! :-)
26428            BOOT_JDK_FOUND=yes
26429
26430  # Only process if variable expands to non-empty
26431
26432  if test "x$BOOT_JDK" != x; then
26433    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26434
26435  # Input might be given as Windows format, start by converting to
26436  # unix format.
26437  path="$BOOT_JDK"
26438  new_path=`$CYGPATH -u "$path"`
26439
26440  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26441  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26442  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26443  # "foo.exe" is OK but "foo" is an error.
26444  #
26445  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26446  # It is also a way to make sure we got the proper file name for the real test later on.
26447  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26448  if test "x$test_shortpath" = x; then
26449    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26450$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26451    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26452  fi
26453
26454  # Call helper function which possibly converts this using DOS-style short mode.
26455  # If so, the updated path is stored in $new_path.
26456
26457  input_path="$new_path"
26458  # Check if we need to convert this using DOS-style short mode. If the path
26459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26460  # take no chances and rewrite it.
26461  # Note: m4 eats our [], so we need to use [ and ] instead.
26462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26463  if test "x$has_forbidden_chars" != x; then
26464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26465    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26466    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26467    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26468      # Going to short mode and back again did indeed matter. Since short mode is
26469      # case insensitive, let's make it lowercase to improve readability.
26470      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26471      # Now convert it back to Unix-style (cygpath)
26472      input_path=`$CYGPATH -u "$shortmode_path"`
26473      new_path="$input_path"
26474    fi
26475  fi
26476
26477  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26478  if test "x$test_cygdrive_prefix" = x; then
26479    # As a simple fix, exclude /usr/bin since it's not a real path.
26480    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26481      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26482      # a path prefixed by /cygdrive for fixpath to work.
26483      new_path="$CYGWIN_ROOT_PATH$input_path"
26484    fi
26485  fi
26486
26487
26488  if test "x$path" != "x$new_path"; then
26489    BOOT_JDK="$new_path"
26490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26492  fi
26493
26494    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26495
26496  path="$BOOT_JDK"
26497  has_colon=`$ECHO $path | $GREP ^.:`
26498  new_path="$path"
26499  if test "x$has_colon" = x; then
26500    # Not in mixed or Windows style, start by that.
26501    new_path=`cmd //c echo $path`
26502  fi
26503
26504
26505  input_path="$new_path"
26506  # Check if we need to convert this using DOS-style short mode. If the path
26507  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26508  # take no chances and rewrite it.
26509  # Note: m4 eats our [], so we need to use [ and ] instead.
26510  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26511  if test "x$has_forbidden_chars" != x; then
26512    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26513    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26514  fi
26515
26516
26517  windows_path="$new_path"
26518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26519    unix_path=`$CYGPATH -u "$windows_path"`
26520    new_path="$unix_path"
26521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26523    new_path="$unix_path"
26524  fi
26525
26526  if test "x$path" != "x$new_path"; then
26527    BOOT_JDK="$new_path"
26528    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26529$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26530  fi
26531
26532  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26533  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26534
26535    else
26536      # We're on a unix platform. Hooray! :)
26537      path="$BOOT_JDK"
26538      has_space=`$ECHO "$path" | $GREP " "`
26539      if test "x$has_space" != x; then
26540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26541$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26542        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26543      fi
26544
26545      # Use eval to expand a potential ~
26546      eval path="$path"
26547      if test ! -f "$path" && test ! -d "$path"; then
26548        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26549      fi
26550
26551      if test -d "$path"; then
26552        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26553      else
26554        dir="`$DIRNAME "$path"`"
26555        base="`$BASENAME "$path"`"
26556        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26557      fi
26558    fi
26559  fi
26560
26561            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26562$as_echo_n "checking for Boot JDK... " >&6; }
26563            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26564$as_echo "$BOOT_JDK" >&6; }
26565            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26566$as_echo_n "checking Boot JDK version... " >&6; }
26567            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26569$as_echo "$BOOT_JDK_VERSION" >&6; }
26570          fi # end check jdk version
26571        fi # end check javac
26572      fi # end check java
26573    fi # end check boot jdk found
26574  fi
26575
26576
26577  # Test: Is there a JDK installed in default, well-known locations?
26578
26579  if test "x$BOOT_JDK_FOUND" = xno; then
26580    # Now execute the test
26581
26582  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26583
26584  if test "x$BOOT_JDK_FOUND" = xno; then
26585    # Now execute the test
26586
26587  if test "x$ProgramW6432" != x; then
26588    VIRTUAL_DIR="$ProgramW6432/Java"
26589
26590  windows_path="$VIRTUAL_DIR"
26591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26592    unix_path=`$CYGPATH -u "$windows_path"`
26593    VIRTUAL_DIR="$unix_path"
26594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26596    VIRTUAL_DIR="$unix_path"
26597  fi
26598
26599
26600  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26601  BOOT_JDK_SUFFIX=""
26602  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26603  if test "x$ALL_JDKS_FOUND" != x; then
26604    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26605
26606  if test "x$BOOT_JDK_FOUND" = xno; then
26607    # Now execute the test
26608
26609        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26610        if test -d "$BOOT_JDK"; then
26611          BOOT_JDK_FOUND=maybe
26612          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26613$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26614        fi
26615
26616
26617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26619      # Do we have a bin/java?
26620      if test ! -x "$BOOT_JDK/bin/java"; then
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26623        BOOT_JDK_FOUND=no
26624      else
26625        # Do we have a bin/javac?
26626        if test ! -x "$BOOT_JDK/bin/javac"; then
26627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26631          BOOT_JDK_FOUND=no
26632        else
26633          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26634          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26635
26636          # Extra M4 quote needed to protect [] in grep expression.
26637          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26638          if test "x$FOUND_CORRECT_VERSION" = x; then
26639            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26641            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26642$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26643            BOOT_JDK_FOUND=no
26644          else
26645            # We're done! :-)
26646            BOOT_JDK_FOUND=yes
26647
26648  # Only process if variable expands to non-empty
26649
26650  if test "x$BOOT_JDK" != x; then
26651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26652
26653  # Input might be given as Windows format, start by converting to
26654  # unix format.
26655  path="$BOOT_JDK"
26656  new_path=`$CYGPATH -u "$path"`
26657
26658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26661  # "foo.exe" is OK but "foo" is an error.
26662  #
26663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26664  # It is also a way to make sure we got the proper file name for the real test later on.
26665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26666  if test "x$test_shortpath" = x; then
26667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26669    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26670  fi
26671
26672  # Call helper function which possibly converts this using DOS-style short mode.
26673  # If so, the updated path is stored in $new_path.
26674
26675  input_path="$new_path"
26676  # Check if we need to convert this using DOS-style short mode. If the path
26677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26678  # take no chances and rewrite it.
26679  # Note: m4 eats our [], so we need to use [ and ] instead.
26680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26681  if test "x$has_forbidden_chars" != x; then
26682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26686      # Going to short mode and back again did indeed matter. Since short mode is
26687      # case insensitive, let's make it lowercase to improve readability.
26688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26689      # Now convert it back to Unix-style (cygpath)
26690      input_path=`$CYGPATH -u "$shortmode_path"`
26691      new_path="$input_path"
26692    fi
26693  fi
26694
26695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26696  if test "x$test_cygdrive_prefix" = x; then
26697    # As a simple fix, exclude /usr/bin since it's not a real path.
26698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26700      # a path prefixed by /cygdrive for fixpath to work.
26701      new_path="$CYGWIN_ROOT_PATH$input_path"
26702    fi
26703  fi
26704
26705
26706  if test "x$path" != "x$new_path"; then
26707    BOOT_JDK="$new_path"
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26710  fi
26711
26712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26713
26714  path="$BOOT_JDK"
26715  has_colon=`$ECHO $path | $GREP ^.:`
26716  new_path="$path"
26717  if test "x$has_colon" = x; then
26718    # Not in mixed or Windows style, start by that.
26719    new_path=`cmd //c echo $path`
26720  fi
26721
26722
26723  input_path="$new_path"
26724  # Check if we need to convert this using DOS-style short mode. If the path
26725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26726  # take no chances and rewrite it.
26727  # Note: m4 eats our [], so we need to use [ and ] instead.
26728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26729  if test "x$has_forbidden_chars" != x; then
26730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26732  fi
26733
26734
26735  windows_path="$new_path"
26736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26737    unix_path=`$CYGPATH -u "$windows_path"`
26738    new_path="$unix_path"
26739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26741    new_path="$unix_path"
26742  fi
26743
26744  if test "x$path" != "x$new_path"; then
26745    BOOT_JDK="$new_path"
26746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26748  fi
26749
26750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26752
26753    else
26754      # We're on a unix platform. Hooray! :)
26755      path="$BOOT_JDK"
26756      has_space=`$ECHO "$path" | $GREP " "`
26757      if test "x$has_space" != x; then
26758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26761      fi
26762
26763      # Use eval to expand a potential ~
26764      eval path="$path"
26765      if test ! -f "$path" && test ! -d "$path"; then
26766        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26767      fi
26768
26769      if test -d "$path"; then
26770        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26771      else
26772        dir="`$DIRNAME "$path"`"
26773        base="`$BASENAME "$path"`"
26774        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26775      fi
26776    fi
26777  fi
26778
26779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26780$as_echo_n "checking for Boot JDK... " >&6; }
26781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26782$as_echo "$BOOT_JDK" >&6; }
26783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26784$as_echo_n "checking Boot JDK version... " >&6; }
26785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26787$as_echo "$BOOT_JDK_VERSION" >&6; }
26788          fi # end check jdk version
26789        fi # end check javac
26790      fi # end check java
26791    fi # end check boot jdk found
26792  fi
26793
26794    done
26795  fi
26796
26797  fi
26798
26799
26800    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26801    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26802      # Do we have a bin/java?
26803      if test ! -x "$BOOT_JDK/bin/java"; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26805$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26806        BOOT_JDK_FOUND=no
26807      else
26808        # Do we have a bin/javac?
26809        if test ! -x "$BOOT_JDK/bin/javac"; then
26810          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26812          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26813$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26814          BOOT_JDK_FOUND=no
26815        else
26816          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26817          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26818
26819          # Extra M4 quote needed to protect [] in grep expression.
26820          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26821          if test "x$FOUND_CORRECT_VERSION" = x; then
26822            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26824            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26825$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26826            BOOT_JDK_FOUND=no
26827          else
26828            # We're done! :-)
26829            BOOT_JDK_FOUND=yes
26830
26831  # Only process if variable expands to non-empty
26832
26833  if test "x$BOOT_JDK" != x; then
26834    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26835
26836  # Input might be given as Windows format, start by converting to
26837  # unix format.
26838  path="$BOOT_JDK"
26839  new_path=`$CYGPATH -u "$path"`
26840
26841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26844  # "foo.exe" is OK but "foo" is an error.
26845  #
26846  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26847  # It is also a way to make sure we got the proper file name for the real test later on.
26848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26849  if test "x$test_shortpath" = x; then
26850    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26851$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26852    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26853  fi
26854
26855  # Call helper function which possibly converts this using DOS-style short mode.
26856  # If so, the updated path is stored in $new_path.
26857
26858  input_path="$new_path"
26859  # Check if we need to convert this using DOS-style short mode. If the path
26860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26861  # take no chances and rewrite it.
26862  # Note: m4 eats our [], so we need to use [ and ] instead.
26863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26864  if test "x$has_forbidden_chars" != x; then
26865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26869      # Going to short mode and back again did indeed matter. Since short mode is
26870      # case insensitive, let's make it lowercase to improve readability.
26871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26872      # Now convert it back to Unix-style (cygpath)
26873      input_path=`$CYGPATH -u "$shortmode_path"`
26874      new_path="$input_path"
26875    fi
26876  fi
26877
26878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26879  if test "x$test_cygdrive_prefix" = x; then
26880    # As a simple fix, exclude /usr/bin since it's not a real path.
26881    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26883      # a path prefixed by /cygdrive for fixpath to work.
26884      new_path="$CYGWIN_ROOT_PATH$input_path"
26885    fi
26886  fi
26887
26888
26889  if test "x$path" != "x$new_path"; then
26890    BOOT_JDK="$new_path"
26891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26892$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26893  fi
26894
26895    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896
26897  path="$BOOT_JDK"
26898  has_colon=`$ECHO $path | $GREP ^.:`
26899  new_path="$path"
26900  if test "x$has_colon" = x; then
26901    # Not in mixed or Windows style, start by that.
26902    new_path=`cmd //c echo $path`
26903  fi
26904
26905
26906  input_path="$new_path"
26907  # Check if we need to convert this using DOS-style short mode. If the path
26908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26909  # take no chances and rewrite it.
26910  # Note: m4 eats our [], so we need to use [ and ] instead.
26911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26912  if test "x$has_forbidden_chars" != x; then
26913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26914    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26915  fi
26916
26917
26918  windows_path="$new_path"
26919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26920    unix_path=`$CYGPATH -u "$windows_path"`
26921    new_path="$unix_path"
26922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26924    new_path="$unix_path"
26925  fi
26926
26927  if test "x$path" != "x$new_path"; then
26928    BOOT_JDK="$new_path"
26929    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26930$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26931  fi
26932
26933  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26934  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26935
26936    else
26937      # We're on a unix platform. Hooray! :)
26938      path="$BOOT_JDK"
26939      has_space=`$ECHO "$path" | $GREP " "`
26940      if test "x$has_space" != x; then
26941        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26942$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26943        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26944      fi
26945
26946      # Use eval to expand a potential ~
26947      eval path="$path"
26948      if test ! -f "$path" && test ! -d "$path"; then
26949        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26950      fi
26951
26952      if test -d "$path"; then
26953        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26954      else
26955        dir="`$DIRNAME "$path"`"
26956        base="`$BASENAME "$path"`"
26957        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26958      fi
26959    fi
26960  fi
26961
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26963$as_echo_n "checking for Boot JDK... " >&6; }
26964            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26965$as_echo "$BOOT_JDK" >&6; }
26966            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26967$as_echo_n "checking Boot JDK version... " >&6; }
26968            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26969            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26970$as_echo "$BOOT_JDK_VERSION" >&6; }
26971          fi # end check jdk version
26972        fi # end check javac
26973      fi # end check java
26974    fi # end check boot jdk found
26975  fi
26976
26977
26978  if test "x$BOOT_JDK_FOUND" = xno; then
26979    # Now execute the test
26980
26981  if test "x$PROGRAMW6432" != x; then
26982    VIRTUAL_DIR="$PROGRAMW6432/Java"
26983
26984  windows_path="$VIRTUAL_DIR"
26985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26986    unix_path=`$CYGPATH -u "$windows_path"`
26987    VIRTUAL_DIR="$unix_path"
26988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26990    VIRTUAL_DIR="$unix_path"
26991  fi
26992
26993
26994  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26995  BOOT_JDK_SUFFIX=""
26996  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26997  if test "x$ALL_JDKS_FOUND" != x; then
26998    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26999
27000  if test "x$BOOT_JDK_FOUND" = xno; then
27001    # Now execute the test
27002
27003        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27004        if test -d "$BOOT_JDK"; then
27005          BOOT_JDK_FOUND=maybe
27006          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27007$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27008        fi
27009
27010
27011    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27012    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27013      # Do we have a bin/java?
27014      if test ! -x "$BOOT_JDK/bin/java"; then
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27017        BOOT_JDK_FOUND=no
27018      else
27019        # Do we have a bin/javac?
27020        if test ! -x "$BOOT_JDK/bin/javac"; then
27021          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27023          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27024$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27025          BOOT_JDK_FOUND=no
27026        else
27027          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27028          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27029
27030          # Extra M4 quote needed to protect [] in grep expression.
27031          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27032          if test "x$FOUND_CORRECT_VERSION" = x; then
27033            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27035            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27036$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27037            BOOT_JDK_FOUND=no
27038          else
27039            # We're done! :-)
27040            BOOT_JDK_FOUND=yes
27041
27042  # Only process if variable expands to non-empty
27043
27044  if test "x$BOOT_JDK" != x; then
27045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27046
27047  # Input might be given as Windows format, start by converting to
27048  # unix format.
27049  path="$BOOT_JDK"
27050  new_path=`$CYGPATH -u "$path"`
27051
27052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27055  # "foo.exe" is OK but "foo" is an error.
27056  #
27057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27058  # It is also a way to make sure we got the proper file name for the real test later on.
27059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27060  if test "x$test_shortpath" = x; then
27061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27063    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27064  fi
27065
27066  # Call helper function which possibly converts this using DOS-style short mode.
27067  # If so, the updated path is stored in $new_path.
27068
27069  input_path="$new_path"
27070  # Check if we need to convert this using DOS-style short mode. If the path
27071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27072  # take no chances and rewrite it.
27073  # Note: m4 eats our [], so we need to use [ and ] instead.
27074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27075  if test "x$has_forbidden_chars" != x; then
27076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27080      # Going to short mode and back again did indeed matter. Since short mode is
27081      # case insensitive, let's make it lowercase to improve readability.
27082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27083      # Now convert it back to Unix-style (cygpath)
27084      input_path=`$CYGPATH -u "$shortmode_path"`
27085      new_path="$input_path"
27086    fi
27087  fi
27088
27089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27090  if test "x$test_cygdrive_prefix" = x; then
27091    # As a simple fix, exclude /usr/bin since it's not a real path.
27092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27094      # a path prefixed by /cygdrive for fixpath to work.
27095      new_path="$CYGWIN_ROOT_PATH$input_path"
27096    fi
27097  fi
27098
27099
27100  if test "x$path" != "x$new_path"; then
27101    BOOT_JDK="$new_path"
27102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27103$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27104  fi
27105
27106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27107
27108  path="$BOOT_JDK"
27109  has_colon=`$ECHO $path | $GREP ^.:`
27110  new_path="$path"
27111  if test "x$has_colon" = x; then
27112    # Not in mixed or Windows style, start by that.
27113    new_path=`cmd //c echo $path`
27114  fi
27115
27116
27117  input_path="$new_path"
27118  # Check if we need to convert this using DOS-style short mode. If the path
27119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27120  # take no chances and rewrite it.
27121  # Note: m4 eats our [], so we need to use [ and ] instead.
27122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27123  if test "x$has_forbidden_chars" != x; then
27124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27126  fi
27127
27128
27129  windows_path="$new_path"
27130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27131    unix_path=`$CYGPATH -u "$windows_path"`
27132    new_path="$unix_path"
27133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27135    new_path="$unix_path"
27136  fi
27137
27138  if test "x$path" != "x$new_path"; then
27139    BOOT_JDK="$new_path"
27140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27141$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27142  fi
27143
27144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27146
27147    else
27148      # We're on a unix platform. Hooray! :)
27149      path="$BOOT_JDK"
27150      has_space=`$ECHO "$path" | $GREP " "`
27151      if test "x$has_space" != x; then
27152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27153$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27155      fi
27156
27157      # Use eval to expand a potential ~
27158      eval path="$path"
27159      if test ! -f "$path" && test ! -d "$path"; then
27160        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27161      fi
27162
27163      if test -d "$path"; then
27164        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27165      else
27166        dir="`$DIRNAME "$path"`"
27167        base="`$BASENAME "$path"`"
27168        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27169      fi
27170    fi
27171  fi
27172
27173            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27174$as_echo_n "checking for Boot JDK... " >&6; }
27175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27176$as_echo "$BOOT_JDK" >&6; }
27177            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27178$as_echo_n "checking Boot JDK version... " >&6; }
27179            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27180            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27181$as_echo "$BOOT_JDK_VERSION" >&6; }
27182          fi # end check jdk version
27183        fi # end check javac
27184      fi # end check java
27185    fi # end check boot jdk found
27186  fi
27187
27188    done
27189  fi
27190
27191  fi
27192
27193
27194    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27195    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27196      # Do we have a bin/java?
27197      if test ! -x "$BOOT_JDK/bin/java"; then
27198        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27200        BOOT_JDK_FOUND=no
27201      else
27202        # Do we have a bin/javac?
27203        if test ! -x "$BOOT_JDK/bin/javac"; then
27204          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27206          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27207$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27208          BOOT_JDK_FOUND=no
27209        else
27210          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27211          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27212
27213          # Extra M4 quote needed to protect [] in grep expression.
27214          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27215          if test "x$FOUND_CORRECT_VERSION" = x; then
27216            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27217$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27218            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27219$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27220            BOOT_JDK_FOUND=no
27221          else
27222            # We're done! :-)
27223            BOOT_JDK_FOUND=yes
27224
27225  # Only process if variable expands to non-empty
27226
27227  if test "x$BOOT_JDK" != x; then
27228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27229
27230  # Input might be given as Windows format, start by converting to
27231  # unix format.
27232  path="$BOOT_JDK"
27233  new_path=`$CYGPATH -u "$path"`
27234
27235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27238  # "foo.exe" is OK but "foo" is an error.
27239  #
27240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27241  # It is also a way to make sure we got the proper file name for the real test later on.
27242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27243  if test "x$test_shortpath" = x; then
27244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27245$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27246    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27247  fi
27248
27249  # Call helper function which possibly converts this using DOS-style short mode.
27250  # If so, the updated path is stored in $new_path.
27251
27252  input_path="$new_path"
27253  # Check if we need to convert this using DOS-style short mode. If the path
27254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27255  # take no chances and rewrite it.
27256  # Note: m4 eats our [], so we need to use [ and ] instead.
27257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27258  if test "x$has_forbidden_chars" != x; then
27259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27263      # Going to short mode and back again did indeed matter. Since short mode is
27264      # case insensitive, let's make it lowercase to improve readability.
27265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27266      # Now convert it back to Unix-style (cygpath)
27267      input_path=`$CYGPATH -u "$shortmode_path"`
27268      new_path="$input_path"
27269    fi
27270  fi
27271
27272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27273  if test "x$test_cygdrive_prefix" = x; then
27274    # As a simple fix, exclude /usr/bin since it's not a real path.
27275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27277      # a path prefixed by /cygdrive for fixpath to work.
27278      new_path="$CYGWIN_ROOT_PATH$input_path"
27279    fi
27280  fi
27281
27282
27283  if test "x$path" != "x$new_path"; then
27284    BOOT_JDK="$new_path"
27285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27287  fi
27288
27289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27290
27291  path="$BOOT_JDK"
27292  has_colon=`$ECHO $path | $GREP ^.:`
27293  new_path="$path"
27294  if test "x$has_colon" = x; then
27295    # Not in mixed or Windows style, start by that.
27296    new_path=`cmd //c echo $path`
27297  fi
27298
27299
27300  input_path="$new_path"
27301  # Check if we need to convert this using DOS-style short mode. If the path
27302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27303  # take no chances and rewrite it.
27304  # Note: m4 eats our [], so we need to use [ and ] instead.
27305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27306  if test "x$has_forbidden_chars" != x; then
27307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27309  fi
27310
27311
27312  windows_path="$new_path"
27313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27314    unix_path=`$CYGPATH -u "$windows_path"`
27315    new_path="$unix_path"
27316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27318    new_path="$unix_path"
27319  fi
27320
27321  if test "x$path" != "x$new_path"; then
27322    BOOT_JDK="$new_path"
27323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27325  fi
27326
27327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27329
27330    else
27331      # We're on a unix platform. Hooray! :)
27332      path="$BOOT_JDK"
27333      has_space=`$ECHO "$path" | $GREP " "`
27334      if test "x$has_space" != x; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27336$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27338      fi
27339
27340      # Use eval to expand a potential ~
27341      eval path="$path"
27342      if test ! -f "$path" && test ! -d "$path"; then
27343        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27344      fi
27345
27346      if test -d "$path"; then
27347        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27348      else
27349        dir="`$DIRNAME "$path"`"
27350        base="`$BASENAME "$path"`"
27351        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27352      fi
27353    fi
27354  fi
27355
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27357$as_echo_n "checking for Boot JDK... " >&6; }
27358            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27359$as_echo "$BOOT_JDK" >&6; }
27360            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27361$as_echo_n "checking Boot JDK version... " >&6; }
27362            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27363            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27364$as_echo "$BOOT_JDK_VERSION" >&6; }
27365          fi # end check jdk version
27366        fi # end check javac
27367      fi # end check java
27368    fi # end check boot jdk found
27369  fi
27370
27371
27372  if test "x$BOOT_JDK_FOUND" = xno; then
27373    # Now execute the test
27374
27375  if test "x$PROGRAMFILES" != x; then
27376    VIRTUAL_DIR="$PROGRAMFILES/Java"
27377
27378  windows_path="$VIRTUAL_DIR"
27379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27380    unix_path=`$CYGPATH -u "$windows_path"`
27381    VIRTUAL_DIR="$unix_path"
27382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27384    VIRTUAL_DIR="$unix_path"
27385  fi
27386
27387
27388  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27389  BOOT_JDK_SUFFIX=""
27390  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27391  if test "x$ALL_JDKS_FOUND" != x; then
27392    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27393
27394  if test "x$BOOT_JDK_FOUND" = xno; then
27395    # Now execute the test
27396
27397        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27398        if test -d "$BOOT_JDK"; then
27399          BOOT_JDK_FOUND=maybe
27400          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27401$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27402        fi
27403
27404
27405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27407      # Do we have a bin/java?
27408      if test ! -x "$BOOT_JDK/bin/java"; then
27409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27411        BOOT_JDK_FOUND=no
27412      else
27413        # Do we have a bin/javac?
27414        if test ! -x "$BOOT_JDK/bin/javac"; then
27415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27419          BOOT_JDK_FOUND=no
27420        else
27421          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27422          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27423
27424          # Extra M4 quote needed to protect [] in grep expression.
27425          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27426          if test "x$FOUND_CORRECT_VERSION" = x; then
27427            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27430$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27431            BOOT_JDK_FOUND=no
27432          else
27433            # We're done! :-)
27434            BOOT_JDK_FOUND=yes
27435
27436  # Only process if variable expands to non-empty
27437
27438  if test "x$BOOT_JDK" != x; then
27439    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27440
27441  # Input might be given as Windows format, start by converting to
27442  # unix format.
27443  path="$BOOT_JDK"
27444  new_path=`$CYGPATH -u "$path"`
27445
27446  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27447  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27448  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27449  # "foo.exe" is OK but "foo" is an error.
27450  #
27451  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27452  # It is also a way to make sure we got the proper file name for the real test later on.
27453  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27454  if test "x$test_shortpath" = x; then
27455    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27456$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27457    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27458  fi
27459
27460  # Call helper function which possibly converts this using DOS-style short mode.
27461  # If so, the updated path is stored in $new_path.
27462
27463  input_path="$new_path"
27464  # Check if we need to convert this using DOS-style short mode. If the path
27465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27466  # take no chances and rewrite it.
27467  # Note: m4 eats our [], so we need to use [ and ] instead.
27468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27469  if test "x$has_forbidden_chars" != x; then
27470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27471    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27472    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27473    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27474      # Going to short mode and back again did indeed matter. Since short mode is
27475      # case insensitive, let's make it lowercase to improve readability.
27476      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27477      # Now convert it back to Unix-style (cygpath)
27478      input_path=`$CYGPATH -u "$shortmode_path"`
27479      new_path="$input_path"
27480    fi
27481  fi
27482
27483  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27484  if test "x$test_cygdrive_prefix" = x; then
27485    # As a simple fix, exclude /usr/bin since it's not a real path.
27486    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27487      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27488      # a path prefixed by /cygdrive for fixpath to work.
27489      new_path="$CYGWIN_ROOT_PATH$input_path"
27490    fi
27491  fi
27492
27493
27494  if test "x$path" != "x$new_path"; then
27495    BOOT_JDK="$new_path"
27496    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27497$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27498  fi
27499
27500    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27501
27502  path="$BOOT_JDK"
27503  has_colon=`$ECHO $path | $GREP ^.:`
27504  new_path="$path"
27505  if test "x$has_colon" = x; then
27506    # Not in mixed or Windows style, start by that.
27507    new_path=`cmd //c echo $path`
27508  fi
27509
27510
27511  input_path="$new_path"
27512  # Check if we need to convert this using DOS-style short mode. If the path
27513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27514  # take no chances and rewrite it.
27515  # Note: m4 eats our [], so we need to use [ and ] instead.
27516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27517  if test "x$has_forbidden_chars" != x; then
27518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27520  fi
27521
27522
27523  windows_path="$new_path"
27524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27525    unix_path=`$CYGPATH -u "$windows_path"`
27526    new_path="$unix_path"
27527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27529    new_path="$unix_path"
27530  fi
27531
27532  if test "x$path" != "x$new_path"; then
27533    BOOT_JDK="$new_path"
27534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27536  fi
27537
27538  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27539  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27540
27541    else
27542      # We're on a unix platform. Hooray! :)
27543      path="$BOOT_JDK"
27544      has_space=`$ECHO "$path" | $GREP " "`
27545      if test "x$has_space" != x; then
27546        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27547$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27548        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27549      fi
27550
27551      # Use eval to expand a potential ~
27552      eval path="$path"
27553      if test ! -f "$path" && test ! -d "$path"; then
27554        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27555      fi
27556
27557      if test -d "$path"; then
27558        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27559      else
27560        dir="`$DIRNAME "$path"`"
27561        base="`$BASENAME "$path"`"
27562        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27563      fi
27564    fi
27565  fi
27566
27567            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27568$as_echo_n "checking for Boot JDK... " >&6; }
27569            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27570$as_echo "$BOOT_JDK" >&6; }
27571            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27572$as_echo_n "checking Boot JDK version... " >&6; }
27573            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27574            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27575$as_echo "$BOOT_JDK_VERSION" >&6; }
27576          fi # end check jdk version
27577        fi # end check javac
27578      fi # end check java
27579    fi # end check boot jdk found
27580  fi
27581
27582    done
27583  fi
27584
27585  fi
27586
27587
27588    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27589    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27590      # Do we have a bin/java?
27591      if test ! -x "$BOOT_JDK/bin/java"; then
27592        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27593$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27594        BOOT_JDK_FOUND=no
27595      else
27596        # Do we have a bin/javac?
27597        if test ! -x "$BOOT_JDK/bin/javac"; then
27598          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27599$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27600          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27601$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27602          BOOT_JDK_FOUND=no
27603        else
27604          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27605          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27606
27607          # Extra M4 quote needed to protect [] in grep expression.
27608          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27609          if test "x$FOUND_CORRECT_VERSION" = x; then
27610            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27612            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27613$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27614            BOOT_JDK_FOUND=no
27615          else
27616            # We're done! :-)
27617            BOOT_JDK_FOUND=yes
27618
27619  # Only process if variable expands to non-empty
27620
27621  if test "x$BOOT_JDK" != x; then
27622    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27623
27624  # Input might be given as Windows format, start by converting to
27625  # unix format.
27626  path="$BOOT_JDK"
27627  new_path=`$CYGPATH -u "$path"`
27628
27629  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27630  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27631  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27632  # "foo.exe" is OK but "foo" is an error.
27633  #
27634  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27635  # It is also a way to make sure we got the proper file name for the real test later on.
27636  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27637  if test "x$test_shortpath" = x; then
27638    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27639$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27640    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27641  fi
27642
27643  # Call helper function which possibly converts this using DOS-style short mode.
27644  # If so, the updated path is stored in $new_path.
27645
27646  input_path="$new_path"
27647  # Check if we need to convert this using DOS-style short mode. If the path
27648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27649  # take no chances and rewrite it.
27650  # Note: m4 eats our [], so we need to use [ and ] instead.
27651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27652  if test "x$has_forbidden_chars" != x; then
27653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27654    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27655    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27656    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27657      # Going to short mode and back again did indeed matter. Since short mode is
27658      # case insensitive, let's make it lowercase to improve readability.
27659      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27660      # Now convert it back to Unix-style (cygpath)
27661      input_path=`$CYGPATH -u "$shortmode_path"`
27662      new_path="$input_path"
27663    fi
27664  fi
27665
27666  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27667  if test "x$test_cygdrive_prefix" = x; then
27668    # As a simple fix, exclude /usr/bin since it's not a real path.
27669    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27670      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27671      # a path prefixed by /cygdrive for fixpath to work.
27672      new_path="$CYGWIN_ROOT_PATH$input_path"
27673    fi
27674  fi
27675
27676
27677  if test "x$path" != "x$new_path"; then
27678    BOOT_JDK="$new_path"
27679    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27680$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27681  fi
27682
27683    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27684
27685  path="$BOOT_JDK"
27686  has_colon=`$ECHO $path | $GREP ^.:`
27687  new_path="$path"
27688  if test "x$has_colon" = x; then
27689    # Not in mixed or Windows style, start by that.
27690    new_path=`cmd //c echo $path`
27691  fi
27692
27693
27694  input_path="$new_path"
27695  # Check if we need to convert this using DOS-style short mode. If the path
27696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27697  # take no chances and rewrite it.
27698  # Note: m4 eats our [], so we need to use [ and ] instead.
27699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27700  if test "x$has_forbidden_chars" != x; then
27701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27703  fi
27704
27705
27706  windows_path="$new_path"
27707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27708    unix_path=`$CYGPATH -u "$windows_path"`
27709    new_path="$unix_path"
27710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27712    new_path="$unix_path"
27713  fi
27714
27715  if test "x$path" != "x$new_path"; then
27716    BOOT_JDK="$new_path"
27717    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27718$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27719  fi
27720
27721  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27722  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27723
27724    else
27725      # We're on a unix platform. Hooray! :)
27726      path="$BOOT_JDK"
27727      has_space=`$ECHO "$path" | $GREP " "`
27728      if test "x$has_space" != x; then
27729        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27730$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27731        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27732      fi
27733
27734      # Use eval to expand a potential ~
27735      eval path="$path"
27736      if test ! -f "$path" && test ! -d "$path"; then
27737        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27738      fi
27739
27740      if test -d "$path"; then
27741        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27742      else
27743        dir="`$DIRNAME "$path"`"
27744        base="`$BASENAME "$path"`"
27745        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27746      fi
27747    fi
27748  fi
27749
27750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27751$as_echo_n "checking for Boot JDK... " >&6; }
27752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27753$as_echo "$BOOT_JDK" >&6; }
27754            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27755$as_echo_n "checking Boot JDK version... " >&6; }
27756            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27757            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27758$as_echo "$BOOT_JDK_VERSION" >&6; }
27759          fi # end check jdk version
27760        fi # end check javac
27761      fi # end check java
27762    fi # end check boot jdk found
27763  fi
27764
27765
27766  if test "x$BOOT_JDK_FOUND" = xno; then
27767    # Now execute the test
27768
27769  if test "x$ProgramFiles" != x; then
27770    VIRTUAL_DIR="$ProgramFiles/Java"
27771
27772  windows_path="$VIRTUAL_DIR"
27773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27774    unix_path=`$CYGPATH -u "$windows_path"`
27775    VIRTUAL_DIR="$unix_path"
27776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27778    VIRTUAL_DIR="$unix_path"
27779  fi
27780
27781
27782  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27783  BOOT_JDK_SUFFIX=""
27784  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27785  if test "x$ALL_JDKS_FOUND" != x; then
27786    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27787
27788  if test "x$BOOT_JDK_FOUND" = xno; then
27789    # Now execute the test
27790
27791        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27792        if test -d "$BOOT_JDK"; then
27793          BOOT_JDK_FOUND=maybe
27794          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27795$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27796        fi
27797
27798
27799    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27800    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27801      # Do we have a bin/java?
27802      if test ! -x "$BOOT_JDK/bin/java"; then
27803        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27804$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27805        BOOT_JDK_FOUND=no
27806      else
27807        # Do we have a bin/javac?
27808        if test ! -x "$BOOT_JDK/bin/javac"; then
27809          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27810$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27811          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27812$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27813          BOOT_JDK_FOUND=no
27814        else
27815          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27816          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27817
27818          # Extra M4 quote needed to protect [] in grep expression.
27819          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27820          if test "x$FOUND_CORRECT_VERSION" = x; then
27821            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27824$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27825            BOOT_JDK_FOUND=no
27826          else
27827            # We're done! :-)
27828            BOOT_JDK_FOUND=yes
27829
27830  # Only process if variable expands to non-empty
27831
27832  if test "x$BOOT_JDK" != x; then
27833    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27834
27835  # Input might be given as Windows format, start by converting to
27836  # unix format.
27837  path="$BOOT_JDK"
27838  new_path=`$CYGPATH -u "$path"`
27839
27840  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27841  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27842  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27843  # "foo.exe" is OK but "foo" is an error.
27844  #
27845  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27846  # It is also a way to make sure we got the proper file name for the real test later on.
27847  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27848  if test "x$test_shortpath" = x; then
27849    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27850$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27851    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27852  fi
27853
27854  # Call helper function which possibly converts this using DOS-style short mode.
27855  # If so, the updated path is stored in $new_path.
27856
27857  input_path="$new_path"
27858  # Check if we need to convert this using DOS-style short mode. If the path
27859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27860  # take no chances and rewrite it.
27861  # Note: m4 eats our [], so we need to use [ and ] instead.
27862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27863  if test "x$has_forbidden_chars" != x; then
27864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27865    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27866    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27867    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27868      # Going to short mode and back again did indeed matter. Since short mode is
27869      # case insensitive, let's make it lowercase to improve readability.
27870      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27871      # Now convert it back to Unix-style (cygpath)
27872      input_path=`$CYGPATH -u "$shortmode_path"`
27873      new_path="$input_path"
27874    fi
27875  fi
27876
27877  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27878  if test "x$test_cygdrive_prefix" = x; then
27879    # As a simple fix, exclude /usr/bin since it's not a real path.
27880    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27881      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27882      # a path prefixed by /cygdrive for fixpath to work.
27883      new_path="$CYGWIN_ROOT_PATH$input_path"
27884    fi
27885  fi
27886
27887
27888  if test "x$path" != "x$new_path"; then
27889    BOOT_JDK="$new_path"
27890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27892  fi
27893
27894    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27895
27896  path="$BOOT_JDK"
27897  has_colon=`$ECHO $path | $GREP ^.:`
27898  new_path="$path"
27899  if test "x$has_colon" = x; then
27900    # Not in mixed or Windows style, start by that.
27901    new_path=`cmd //c echo $path`
27902  fi
27903
27904
27905  input_path="$new_path"
27906  # Check if we need to convert this using DOS-style short mode. If the path
27907  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27908  # take no chances and rewrite it.
27909  # Note: m4 eats our [], so we need to use [ and ] instead.
27910  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27911  if test "x$has_forbidden_chars" != x; then
27912    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27913    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27914  fi
27915
27916
27917  windows_path="$new_path"
27918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27919    unix_path=`$CYGPATH -u "$windows_path"`
27920    new_path="$unix_path"
27921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27923    new_path="$unix_path"
27924  fi
27925
27926  if test "x$path" != "x$new_path"; then
27927    BOOT_JDK="$new_path"
27928    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27929$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27930  fi
27931
27932  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27933  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27934
27935    else
27936      # We're on a unix platform. Hooray! :)
27937      path="$BOOT_JDK"
27938      has_space=`$ECHO "$path" | $GREP " "`
27939      if test "x$has_space" != x; then
27940        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27941$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27942        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27943      fi
27944
27945      # Use eval to expand a potential ~
27946      eval path="$path"
27947      if test ! -f "$path" && test ! -d "$path"; then
27948        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27949      fi
27950
27951      if test -d "$path"; then
27952        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27953      else
27954        dir="`$DIRNAME "$path"`"
27955        base="`$BASENAME "$path"`"
27956        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27957      fi
27958    fi
27959  fi
27960
27961            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27962$as_echo_n "checking for Boot JDK... " >&6; }
27963            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27964$as_echo "$BOOT_JDK" >&6; }
27965            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27966$as_echo_n "checking Boot JDK version... " >&6; }
27967            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27968            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27969$as_echo "$BOOT_JDK_VERSION" >&6; }
27970          fi # end check jdk version
27971        fi # end check javac
27972      fi # end check java
27973    fi # end check boot jdk found
27974  fi
27975
27976    done
27977  fi
27978
27979  fi
27980
27981
27982    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27983    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27984      # Do we have a bin/java?
27985      if test ! -x "$BOOT_JDK/bin/java"; then
27986        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27987$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27988        BOOT_JDK_FOUND=no
27989      else
27990        # Do we have a bin/javac?
27991        if test ! -x "$BOOT_JDK/bin/javac"; then
27992          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27994          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27995$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27996          BOOT_JDK_FOUND=no
27997        else
27998          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27999          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28000
28001          # Extra M4 quote needed to protect [] in grep expression.
28002          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28003          if test "x$FOUND_CORRECT_VERSION" = x; then
28004            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28006            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28007$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28008            BOOT_JDK_FOUND=no
28009          else
28010            # We're done! :-)
28011            BOOT_JDK_FOUND=yes
28012
28013  # Only process if variable expands to non-empty
28014
28015  if test "x$BOOT_JDK" != x; then
28016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28017
28018  # Input might be given as Windows format, start by converting to
28019  # unix format.
28020  path="$BOOT_JDK"
28021  new_path=`$CYGPATH -u "$path"`
28022
28023  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28024  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28025  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28026  # "foo.exe" is OK but "foo" is an error.
28027  #
28028  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28029  # It is also a way to make sure we got the proper file name for the real test later on.
28030  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28031  if test "x$test_shortpath" = x; then
28032    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28033$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28034    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28035  fi
28036
28037  # Call helper function which possibly converts this using DOS-style short mode.
28038  # If so, the updated path is stored in $new_path.
28039
28040  input_path="$new_path"
28041  # Check if we need to convert this using DOS-style short mode. If the path
28042  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28043  # take no chances and rewrite it.
28044  # Note: m4 eats our [], so we need to use [ and ] instead.
28045  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28046  if test "x$has_forbidden_chars" != x; then
28047    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28048    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28049    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28050    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28051      # Going to short mode and back again did indeed matter. Since short mode is
28052      # case insensitive, let's make it lowercase to improve readability.
28053      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28054      # Now convert it back to Unix-style (cygpath)
28055      input_path=`$CYGPATH -u "$shortmode_path"`
28056      new_path="$input_path"
28057    fi
28058  fi
28059
28060  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28061  if test "x$test_cygdrive_prefix" = x; then
28062    # As a simple fix, exclude /usr/bin since it's not a real path.
28063    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28064      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28065      # a path prefixed by /cygdrive for fixpath to work.
28066      new_path="$CYGWIN_ROOT_PATH$input_path"
28067    fi
28068  fi
28069
28070
28071  if test "x$path" != "x$new_path"; then
28072    BOOT_JDK="$new_path"
28073    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28074$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28075  fi
28076
28077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28078
28079  path="$BOOT_JDK"
28080  has_colon=`$ECHO $path | $GREP ^.:`
28081  new_path="$path"
28082  if test "x$has_colon" = x; then
28083    # Not in mixed or Windows style, start by that.
28084    new_path=`cmd //c echo $path`
28085  fi
28086
28087
28088  input_path="$new_path"
28089  # Check if we need to convert this using DOS-style short mode. If the path
28090  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28091  # take no chances and rewrite it.
28092  # Note: m4 eats our [], so we need to use [ and ] instead.
28093  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28094  if test "x$has_forbidden_chars" != x; then
28095    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28096    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28097  fi
28098
28099
28100  windows_path="$new_path"
28101  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28102    unix_path=`$CYGPATH -u "$windows_path"`
28103    new_path="$unix_path"
28104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28105    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28106    new_path="$unix_path"
28107  fi
28108
28109  if test "x$path" != "x$new_path"; then
28110    BOOT_JDK="$new_path"
28111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28113  fi
28114
28115  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28116  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28117
28118    else
28119      # We're on a unix platform. Hooray! :)
28120      path="$BOOT_JDK"
28121      has_space=`$ECHO "$path" | $GREP " "`
28122      if test "x$has_space" != x; then
28123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28124$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28125        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28126      fi
28127
28128      # Use eval to expand a potential ~
28129      eval path="$path"
28130      if test ! -f "$path" && test ! -d "$path"; then
28131        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28132      fi
28133
28134      if test -d "$path"; then
28135        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28136      else
28137        dir="`$DIRNAME "$path"`"
28138        base="`$BASENAME "$path"`"
28139        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28140      fi
28141    fi
28142  fi
28143
28144            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28145$as_echo_n "checking for Boot JDK... " >&6; }
28146            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28147$as_echo "$BOOT_JDK" >&6; }
28148            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28149$as_echo_n "checking Boot JDK version... " >&6; }
28150            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28151            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28152$as_echo "$BOOT_JDK_VERSION" >&6; }
28153          fi # end check jdk version
28154        fi # end check javac
28155      fi # end check java
28156    fi # end check boot jdk found
28157  fi
28158
28159
28160  if test "x$BOOT_JDK_FOUND" = xno; then
28161    # Now execute the test
28162
28163  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28164  BOOT_JDK_SUFFIX=""
28165  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28166  if test "x$ALL_JDKS_FOUND" != x; then
28167    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28168
28169  if test "x$BOOT_JDK_FOUND" = xno; then
28170    # Now execute the test
28171
28172        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28173        if test -d "$BOOT_JDK"; then
28174          BOOT_JDK_FOUND=maybe
28175          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28176$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28177        fi
28178
28179
28180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28182      # Do we have a bin/java?
28183      if test ! -x "$BOOT_JDK/bin/java"; then
28184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28186        BOOT_JDK_FOUND=no
28187      else
28188        # Do we have a bin/javac?
28189        if test ! -x "$BOOT_JDK/bin/javac"; then
28190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28194          BOOT_JDK_FOUND=no
28195        else
28196          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28197          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28198
28199          # Extra M4 quote needed to protect [] in grep expression.
28200          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28201          if test "x$FOUND_CORRECT_VERSION" = x; then
28202            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28203$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28204            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28205$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28206            BOOT_JDK_FOUND=no
28207          else
28208            # We're done! :-)
28209            BOOT_JDK_FOUND=yes
28210
28211  # Only process if variable expands to non-empty
28212
28213  if test "x$BOOT_JDK" != x; then
28214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28215
28216  # Input might be given as Windows format, start by converting to
28217  # unix format.
28218  path="$BOOT_JDK"
28219  new_path=`$CYGPATH -u "$path"`
28220
28221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28224  # "foo.exe" is OK but "foo" is an error.
28225  #
28226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28227  # It is also a way to make sure we got the proper file name for the real test later on.
28228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28229  if test "x$test_shortpath" = x; then
28230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28231$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28232    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28233  fi
28234
28235  # Call helper function which possibly converts this using DOS-style short mode.
28236  # If so, the updated path is stored in $new_path.
28237
28238  input_path="$new_path"
28239  # Check if we need to convert this using DOS-style short mode. If the path
28240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28241  # take no chances and rewrite it.
28242  # Note: m4 eats our [], so we need to use [ and ] instead.
28243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28244  if test "x$has_forbidden_chars" != x; then
28245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28249      # Going to short mode and back again did indeed matter. Since short mode is
28250      # case insensitive, let's make it lowercase to improve readability.
28251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28252      # Now convert it back to Unix-style (cygpath)
28253      input_path=`$CYGPATH -u "$shortmode_path"`
28254      new_path="$input_path"
28255    fi
28256  fi
28257
28258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28259  if test "x$test_cygdrive_prefix" = x; then
28260    # As a simple fix, exclude /usr/bin since it's not a real path.
28261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28263      # a path prefixed by /cygdrive for fixpath to work.
28264      new_path="$CYGWIN_ROOT_PATH$input_path"
28265    fi
28266  fi
28267
28268
28269  if test "x$path" != "x$new_path"; then
28270    BOOT_JDK="$new_path"
28271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28272$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28273  fi
28274
28275    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28276
28277  path="$BOOT_JDK"
28278  has_colon=`$ECHO $path | $GREP ^.:`
28279  new_path="$path"
28280  if test "x$has_colon" = x; then
28281    # Not in mixed or Windows style, start by that.
28282    new_path=`cmd //c echo $path`
28283  fi
28284
28285
28286  input_path="$new_path"
28287  # Check if we need to convert this using DOS-style short mode. If the path
28288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28289  # take no chances and rewrite it.
28290  # Note: m4 eats our [], so we need to use [ and ] instead.
28291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28292  if test "x$has_forbidden_chars" != x; then
28293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28295  fi
28296
28297
28298  windows_path="$new_path"
28299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28300    unix_path=`$CYGPATH -u "$windows_path"`
28301    new_path="$unix_path"
28302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28304    new_path="$unix_path"
28305  fi
28306
28307  if test "x$path" != "x$new_path"; then
28308    BOOT_JDK="$new_path"
28309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28311  fi
28312
28313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28315
28316    else
28317      # We're on a unix platform. Hooray! :)
28318      path="$BOOT_JDK"
28319      has_space=`$ECHO "$path" | $GREP " "`
28320      if test "x$has_space" != x; then
28321        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28322$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28323        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28324      fi
28325
28326      # Use eval to expand a potential ~
28327      eval path="$path"
28328      if test ! -f "$path" && test ! -d "$path"; then
28329        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28330      fi
28331
28332      if test -d "$path"; then
28333        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28334      else
28335        dir="`$DIRNAME "$path"`"
28336        base="`$BASENAME "$path"`"
28337        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28338      fi
28339    fi
28340  fi
28341
28342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28343$as_echo_n "checking for Boot JDK... " >&6; }
28344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28345$as_echo "$BOOT_JDK" >&6; }
28346            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28347$as_echo_n "checking Boot JDK version... " >&6; }
28348            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28350$as_echo "$BOOT_JDK_VERSION" >&6; }
28351          fi # end check jdk version
28352        fi # end check javac
28353      fi # end check java
28354    fi # end check boot jdk found
28355  fi
28356
28357    done
28358  fi
28359
28360
28361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28363      # Do we have a bin/java?
28364      if test ! -x "$BOOT_JDK/bin/java"; then
28365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28367        BOOT_JDK_FOUND=no
28368      else
28369        # Do we have a bin/javac?
28370        if test ! -x "$BOOT_JDK/bin/javac"; then
28371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28375          BOOT_JDK_FOUND=no
28376        else
28377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28379
28380          # Extra M4 quote needed to protect [] in grep expression.
28381          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28382          if test "x$FOUND_CORRECT_VERSION" = x; then
28383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28387            BOOT_JDK_FOUND=no
28388          else
28389            # We're done! :-)
28390            BOOT_JDK_FOUND=yes
28391
28392  # Only process if variable expands to non-empty
28393
28394  if test "x$BOOT_JDK" != x; then
28395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28396
28397  # Input might be given as Windows format, start by converting to
28398  # unix format.
28399  path="$BOOT_JDK"
28400  new_path=`$CYGPATH -u "$path"`
28401
28402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28405  # "foo.exe" is OK but "foo" is an error.
28406  #
28407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28408  # It is also a way to make sure we got the proper file name for the real test later on.
28409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28410  if test "x$test_shortpath" = x; then
28411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28414  fi
28415
28416  # Call helper function which possibly converts this using DOS-style short mode.
28417  # If so, the updated path is stored in $new_path.
28418
28419  input_path="$new_path"
28420  # Check if we need to convert this using DOS-style short mode. If the path
28421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28422  # take no chances and rewrite it.
28423  # Note: m4 eats our [], so we need to use [ and ] instead.
28424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28425  if test "x$has_forbidden_chars" != x; then
28426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28430      # Going to short mode and back again did indeed matter. Since short mode is
28431      # case insensitive, let's make it lowercase to improve readability.
28432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28433      # Now convert it back to Unix-style (cygpath)
28434      input_path=`$CYGPATH -u "$shortmode_path"`
28435      new_path="$input_path"
28436    fi
28437  fi
28438
28439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28440  if test "x$test_cygdrive_prefix" = x; then
28441    # As a simple fix, exclude /usr/bin since it's not a real path.
28442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28444      # a path prefixed by /cygdrive for fixpath to work.
28445      new_path="$CYGWIN_ROOT_PATH$input_path"
28446    fi
28447  fi
28448
28449
28450  if test "x$path" != "x$new_path"; then
28451    BOOT_JDK="$new_path"
28452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28454  fi
28455
28456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28457
28458  path="$BOOT_JDK"
28459  has_colon=`$ECHO $path | $GREP ^.:`
28460  new_path="$path"
28461  if test "x$has_colon" = x; then
28462    # Not in mixed or Windows style, start by that.
28463    new_path=`cmd //c echo $path`
28464  fi
28465
28466
28467  input_path="$new_path"
28468  # Check if we need to convert this using DOS-style short mode. If the path
28469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28470  # take no chances and rewrite it.
28471  # Note: m4 eats our [], so we need to use [ and ] instead.
28472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28473  if test "x$has_forbidden_chars" != x; then
28474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28476  fi
28477
28478
28479  windows_path="$new_path"
28480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28481    unix_path=`$CYGPATH -u "$windows_path"`
28482    new_path="$unix_path"
28483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28485    new_path="$unix_path"
28486  fi
28487
28488  if test "x$path" != "x$new_path"; then
28489    BOOT_JDK="$new_path"
28490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28492  fi
28493
28494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28496
28497    else
28498      # We're on a unix platform. Hooray! :)
28499      path="$BOOT_JDK"
28500      has_space=`$ECHO "$path" | $GREP " "`
28501      if test "x$has_space" != x; then
28502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28505      fi
28506
28507      # Use eval to expand a potential ~
28508      eval path="$path"
28509      if test ! -f "$path" && test ! -d "$path"; then
28510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28511      fi
28512
28513      if test -d "$path"; then
28514        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28515      else
28516        dir="`$DIRNAME "$path"`"
28517        base="`$BASENAME "$path"`"
28518        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28519      fi
28520    fi
28521  fi
28522
28523            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28524$as_echo_n "checking for Boot JDK... " >&6; }
28525            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28526$as_echo "$BOOT_JDK" >&6; }
28527            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28528$as_echo_n "checking Boot JDK version... " >&6; }
28529            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28530            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28531$as_echo "$BOOT_JDK_VERSION" >&6; }
28532          fi # end check jdk version
28533        fi # end check javac
28534      fi # end check java
28535    fi # end check boot jdk found
28536  fi
28537
28538  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28539
28540  if test "x$BOOT_JDK_FOUND" = xno; then
28541    # Now execute the test
28542
28543  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28544  BOOT_JDK_SUFFIX="/Contents/Home"
28545  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28546  if test "x$ALL_JDKS_FOUND" != x; then
28547    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28548
28549  if test "x$BOOT_JDK_FOUND" = xno; then
28550    # Now execute the test
28551
28552        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28553        if test -d "$BOOT_JDK"; then
28554          BOOT_JDK_FOUND=maybe
28555          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28556$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28557        fi
28558
28559
28560    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28561    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28562      # Do we have a bin/java?
28563      if test ! -x "$BOOT_JDK/bin/java"; then
28564        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28565$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28566        BOOT_JDK_FOUND=no
28567      else
28568        # Do we have a bin/javac?
28569        if test ! -x "$BOOT_JDK/bin/javac"; then
28570          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28571$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28572          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28573$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28574          BOOT_JDK_FOUND=no
28575        else
28576          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28577          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28578
28579          # Extra M4 quote needed to protect [] in grep expression.
28580          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28581          if test "x$FOUND_CORRECT_VERSION" = x; then
28582            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28583$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28584            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28585$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28586            BOOT_JDK_FOUND=no
28587          else
28588            # We're done! :-)
28589            BOOT_JDK_FOUND=yes
28590
28591  # Only process if variable expands to non-empty
28592
28593  if test "x$BOOT_JDK" != x; then
28594    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28595
28596  # Input might be given as Windows format, start by converting to
28597  # unix format.
28598  path="$BOOT_JDK"
28599  new_path=`$CYGPATH -u "$path"`
28600
28601  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28602  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28603  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28604  # "foo.exe" is OK but "foo" is an error.
28605  #
28606  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28607  # It is also a way to make sure we got the proper file name for the real test later on.
28608  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28609  if test "x$test_shortpath" = x; then
28610    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28612    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28613  fi
28614
28615  # Call helper function which possibly converts this using DOS-style short mode.
28616  # If so, the updated path is stored in $new_path.
28617
28618  input_path="$new_path"
28619  # Check if we need to convert this using DOS-style short mode. If the path
28620  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28621  # take no chances and rewrite it.
28622  # Note: m4 eats our [], so we need to use [ and ] instead.
28623  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28624  if test "x$has_forbidden_chars" != x; then
28625    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28626    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28627    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28628    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28629      # Going to short mode and back again did indeed matter. Since short mode is
28630      # case insensitive, let's make it lowercase to improve readability.
28631      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28632      # Now convert it back to Unix-style (cygpath)
28633      input_path=`$CYGPATH -u "$shortmode_path"`
28634      new_path="$input_path"
28635    fi
28636  fi
28637
28638  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28639  if test "x$test_cygdrive_prefix" = x; then
28640    # As a simple fix, exclude /usr/bin since it's not a real path.
28641    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28642      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28643      # a path prefixed by /cygdrive for fixpath to work.
28644      new_path="$CYGWIN_ROOT_PATH$input_path"
28645    fi
28646  fi
28647
28648
28649  if test "x$path" != "x$new_path"; then
28650    BOOT_JDK="$new_path"
28651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28653  fi
28654
28655    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28656
28657  path="$BOOT_JDK"
28658  has_colon=`$ECHO $path | $GREP ^.:`
28659  new_path="$path"
28660  if test "x$has_colon" = x; then
28661    # Not in mixed or Windows style, start by that.
28662    new_path=`cmd //c echo $path`
28663  fi
28664
28665
28666  input_path="$new_path"
28667  # Check if we need to convert this using DOS-style short mode. If the path
28668  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28669  # take no chances and rewrite it.
28670  # Note: m4 eats our [], so we need to use [ and ] instead.
28671  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28672  if test "x$has_forbidden_chars" != x; then
28673    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28674    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28675  fi
28676
28677
28678  windows_path="$new_path"
28679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28680    unix_path=`$CYGPATH -u "$windows_path"`
28681    new_path="$unix_path"
28682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28684    new_path="$unix_path"
28685  fi
28686
28687  if test "x$path" != "x$new_path"; then
28688    BOOT_JDK="$new_path"
28689    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28690$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28691  fi
28692
28693  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28694  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28695
28696    else
28697      # We're on a unix platform. Hooray! :)
28698      path="$BOOT_JDK"
28699      has_space=`$ECHO "$path" | $GREP " "`
28700      if test "x$has_space" != x; then
28701        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28702$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28703        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28704      fi
28705
28706      # Use eval to expand a potential ~
28707      eval path="$path"
28708      if test ! -f "$path" && test ! -d "$path"; then
28709        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28710      fi
28711
28712      if test -d "$path"; then
28713        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28714      else
28715        dir="`$DIRNAME "$path"`"
28716        base="`$BASENAME "$path"`"
28717        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28718      fi
28719    fi
28720  fi
28721
28722            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28723$as_echo_n "checking for Boot JDK... " >&6; }
28724            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28725$as_echo "$BOOT_JDK" >&6; }
28726            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28727$as_echo_n "checking Boot JDK version... " >&6; }
28728            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28729            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28730$as_echo "$BOOT_JDK_VERSION" >&6; }
28731          fi # end check jdk version
28732        fi # end check javac
28733      fi # end check java
28734    fi # end check boot jdk found
28735  fi
28736
28737    done
28738  fi
28739
28740
28741    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28742    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28743      # Do we have a bin/java?
28744      if test ! -x "$BOOT_JDK/bin/java"; then
28745        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28746$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28747        BOOT_JDK_FOUND=no
28748      else
28749        # Do we have a bin/javac?
28750        if test ! -x "$BOOT_JDK/bin/javac"; then
28751          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28753          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28754$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28755          BOOT_JDK_FOUND=no
28756        else
28757          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28758          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28759
28760          # Extra M4 quote needed to protect [] in grep expression.
28761          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28762          if test "x$FOUND_CORRECT_VERSION" = x; then
28763            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28764$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28765            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28766$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28767            BOOT_JDK_FOUND=no
28768          else
28769            # We're done! :-)
28770            BOOT_JDK_FOUND=yes
28771
28772  # Only process if variable expands to non-empty
28773
28774  if test "x$BOOT_JDK" != x; then
28775    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28776
28777  # Input might be given as Windows format, start by converting to
28778  # unix format.
28779  path="$BOOT_JDK"
28780  new_path=`$CYGPATH -u "$path"`
28781
28782  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28783  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28784  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28785  # "foo.exe" is OK but "foo" is an error.
28786  #
28787  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28788  # It is also a way to make sure we got the proper file name for the real test later on.
28789  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28790  if test "x$test_shortpath" = x; then
28791    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28792$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28793    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28794  fi
28795
28796  # Call helper function which possibly converts this using DOS-style short mode.
28797  # If so, the updated path is stored in $new_path.
28798
28799  input_path="$new_path"
28800  # Check if we need to convert this using DOS-style short mode. If the path
28801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28802  # take no chances and rewrite it.
28803  # Note: m4 eats our [], so we need to use [ and ] instead.
28804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28805  if test "x$has_forbidden_chars" != x; then
28806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28810      # Going to short mode and back again did indeed matter. Since short mode is
28811      # case insensitive, let's make it lowercase to improve readability.
28812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28813      # Now convert it back to Unix-style (cygpath)
28814      input_path=`$CYGPATH -u "$shortmode_path"`
28815      new_path="$input_path"
28816    fi
28817  fi
28818
28819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28820  if test "x$test_cygdrive_prefix" = x; then
28821    # As a simple fix, exclude /usr/bin since it's not a real path.
28822    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28824      # a path prefixed by /cygdrive for fixpath to work.
28825      new_path="$CYGWIN_ROOT_PATH$input_path"
28826    fi
28827  fi
28828
28829
28830  if test "x$path" != "x$new_path"; then
28831    BOOT_JDK="$new_path"
28832    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28833$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28834  fi
28835
28836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28837
28838  path="$BOOT_JDK"
28839  has_colon=`$ECHO $path | $GREP ^.:`
28840  new_path="$path"
28841  if test "x$has_colon" = x; then
28842    # Not in mixed or Windows style, start by that.
28843    new_path=`cmd //c echo $path`
28844  fi
28845
28846
28847  input_path="$new_path"
28848  # Check if we need to convert this using DOS-style short mode. If the path
28849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28850  # take no chances and rewrite it.
28851  # Note: m4 eats our [], so we need to use [ and ] instead.
28852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28853  if test "x$has_forbidden_chars" != x; then
28854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28855    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28856  fi
28857
28858
28859  windows_path="$new_path"
28860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28861    unix_path=`$CYGPATH -u "$windows_path"`
28862    new_path="$unix_path"
28863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28865    new_path="$unix_path"
28866  fi
28867
28868  if test "x$path" != "x$new_path"; then
28869    BOOT_JDK="$new_path"
28870    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28871$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28872  fi
28873
28874  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28875  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28876
28877    else
28878      # We're on a unix platform. Hooray! :)
28879      path="$BOOT_JDK"
28880      has_space=`$ECHO "$path" | $GREP " "`
28881      if test "x$has_space" != x; then
28882        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28884        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28885      fi
28886
28887      # Use eval to expand a potential ~
28888      eval path="$path"
28889      if test ! -f "$path" && test ! -d "$path"; then
28890        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28891      fi
28892
28893      if test -d "$path"; then
28894        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28895      else
28896        dir="`$DIRNAME "$path"`"
28897        base="`$BASENAME "$path"`"
28898        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28899      fi
28900    fi
28901  fi
28902
28903            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28904$as_echo_n "checking for Boot JDK... " >&6; }
28905            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28906$as_echo "$BOOT_JDK" >&6; }
28907            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28908$as_echo_n "checking Boot JDK version... " >&6; }
28909            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28910            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28911$as_echo "$BOOT_JDK_VERSION" >&6; }
28912          fi # end check jdk version
28913        fi # end check javac
28914      fi # end check java
28915    fi # end check boot jdk found
28916  fi
28917
28918
28919  if test "x$BOOT_JDK_FOUND" = xno; then
28920    # Now execute the test
28921
28922  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28923  BOOT_JDK_SUFFIX="/Contents/Home"
28924  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28925  if test "x$ALL_JDKS_FOUND" != x; then
28926    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28927
28928  if test "x$BOOT_JDK_FOUND" = xno; then
28929    # Now execute the test
28930
28931        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28932        if test -d "$BOOT_JDK"; then
28933          BOOT_JDK_FOUND=maybe
28934          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28935$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28936        fi
28937
28938
28939    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28940    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28941      # Do we have a bin/java?
28942      if test ! -x "$BOOT_JDK/bin/java"; then
28943        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28944$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28945        BOOT_JDK_FOUND=no
28946      else
28947        # Do we have a bin/javac?
28948        if test ! -x "$BOOT_JDK/bin/javac"; then
28949          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28950$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28951          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28952$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28953          BOOT_JDK_FOUND=no
28954        else
28955          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28956          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28957
28958          # Extra M4 quote needed to protect [] in grep expression.
28959          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28960          if test "x$FOUND_CORRECT_VERSION" = x; then
28961            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28962$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28963            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28964$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28965            BOOT_JDK_FOUND=no
28966          else
28967            # We're done! :-)
28968            BOOT_JDK_FOUND=yes
28969
28970  # Only process if variable expands to non-empty
28971
28972  if test "x$BOOT_JDK" != x; then
28973    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28974
28975  # Input might be given as Windows format, start by converting to
28976  # unix format.
28977  path="$BOOT_JDK"
28978  new_path=`$CYGPATH -u "$path"`
28979
28980  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28981  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28982  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28983  # "foo.exe" is OK but "foo" is an error.
28984  #
28985  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28986  # It is also a way to make sure we got the proper file name for the real test later on.
28987  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28988  if test "x$test_shortpath" = x; then
28989    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28990$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28991    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28992  fi
28993
28994  # Call helper function which possibly converts this using DOS-style short mode.
28995  # If so, the updated path is stored in $new_path.
28996
28997  input_path="$new_path"
28998  # Check if we need to convert this using DOS-style short mode. If the path
28999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29000  # take no chances and rewrite it.
29001  # Note: m4 eats our [], so we need to use [ and ] instead.
29002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29003  if test "x$has_forbidden_chars" != x; then
29004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29005    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29006    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29007    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29008      # Going to short mode and back again did indeed matter. Since short mode is
29009      # case insensitive, let's make it lowercase to improve readability.
29010      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29011      # Now convert it back to Unix-style (cygpath)
29012      input_path=`$CYGPATH -u "$shortmode_path"`
29013      new_path="$input_path"
29014    fi
29015  fi
29016
29017  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29018  if test "x$test_cygdrive_prefix" = x; then
29019    # As a simple fix, exclude /usr/bin since it's not a real path.
29020    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29021      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29022      # a path prefixed by /cygdrive for fixpath to work.
29023      new_path="$CYGWIN_ROOT_PATH$input_path"
29024    fi
29025  fi
29026
29027
29028  if test "x$path" != "x$new_path"; then
29029    BOOT_JDK="$new_path"
29030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29032  fi
29033
29034    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29035
29036  path="$BOOT_JDK"
29037  has_colon=`$ECHO $path | $GREP ^.:`
29038  new_path="$path"
29039  if test "x$has_colon" = x; then
29040    # Not in mixed or Windows style, start by that.
29041    new_path=`cmd //c echo $path`
29042  fi
29043
29044
29045  input_path="$new_path"
29046  # Check if we need to convert this using DOS-style short mode. If the path
29047  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29048  # take no chances and rewrite it.
29049  # Note: m4 eats our [], so we need to use [ and ] instead.
29050  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29051  if test "x$has_forbidden_chars" != x; then
29052    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29053    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29054  fi
29055
29056
29057  windows_path="$new_path"
29058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29059    unix_path=`$CYGPATH -u "$windows_path"`
29060    new_path="$unix_path"
29061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29063    new_path="$unix_path"
29064  fi
29065
29066  if test "x$path" != "x$new_path"; then
29067    BOOT_JDK="$new_path"
29068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29070  fi
29071
29072  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29073  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29074
29075    else
29076      # We're on a unix platform. Hooray! :)
29077      path="$BOOT_JDK"
29078      has_space=`$ECHO "$path" | $GREP " "`
29079      if test "x$has_space" != x; then
29080        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29081$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29082        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29083      fi
29084
29085      # Use eval to expand a potential ~
29086      eval path="$path"
29087      if test ! -f "$path" && test ! -d "$path"; then
29088        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29089      fi
29090
29091      if test -d "$path"; then
29092        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29093      else
29094        dir="`$DIRNAME "$path"`"
29095        base="`$BASENAME "$path"`"
29096        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29097      fi
29098    fi
29099  fi
29100
29101            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29102$as_echo_n "checking for Boot JDK... " >&6; }
29103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29104$as_echo "$BOOT_JDK" >&6; }
29105            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29106$as_echo_n "checking Boot JDK version... " >&6; }
29107            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29108            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29109$as_echo "$BOOT_JDK_VERSION" >&6; }
29110          fi # end check jdk version
29111        fi # end check javac
29112      fi # end check java
29113    fi # end check boot jdk found
29114  fi
29115
29116    done
29117  fi
29118
29119
29120    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29121    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29122      # Do we have a bin/java?
29123      if test ! -x "$BOOT_JDK/bin/java"; then
29124        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29126        BOOT_JDK_FOUND=no
29127      else
29128        # Do we have a bin/javac?
29129        if test ! -x "$BOOT_JDK/bin/javac"; then
29130          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29132          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29133$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29134          BOOT_JDK_FOUND=no
29135        else
29136          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29137          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29138
29139          # Extra M4 quote needed to protect [] in grep expression.
29140          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29141          if test "x$FOUND_CORRECT_VERSION" = x; then
29142            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29143$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29144            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29145$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29146            BOOT_JDK_FOUND=no
29147          else
29148            # We're done! :-)
29149            BOOT_JDK_FOUND=yes
29150
29151  # Only process if variable expands to non-empty
29152
29153  if test "x$BOOT_JDK" != x; then
29154    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29155
29156  # Input might be given as Windows format, start by converting to
29157  # unix format.
29158  path="$BOOT_JDK"
29159  new_path=`$CYGPATH -u "$path"`
29160
29161  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29162  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29163  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29164  # "foo.exe" is OK but "foo" is an error.
29165  #
29166  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29167  # It is also a way to make sure we got the proper file name for the real test later on.
29168  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29169  if test "x$test_shortpath" = x; then
29170    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29171$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29172    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29173  fi
29174
29175  # Call helper function which possibly converts this using DOS-style short mode.
29176  # If so, the updated path is stored in $new_path.
29177
29178  input_path="$new_path"
29179  # Check if we need to convert this using DOS-style short mode. If the path
29180  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29181  # take no chances and rewrite it.
29182  # Note: m4 eats our [], so we need to use [ and ] instead.
29183  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29184  if test "x$has_forbidden_chars" != x; then
29185    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29186    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29187    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29188    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29189      # Going to short mode and back again did indeed matter. Since short mode is
29190      # case insensitive, let's make it lowercase to improve readability.
29191      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29192      # Now convert it back to Unix-style (cygpath)
29193      input_path=`$CYGPATH -u "$shortmode_path"`
29194      new_path="$input_path"
29195    fi
29196  fi
29197
29198  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29199  if test "x$test_cygdrive_prefix" = x; then
29200    # As a simple fix, exclude /usr/bin since it's not a real path.
29201    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29202      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29203      # a path prefixed by /cygdrive for fixpath to work.
29204      new_path="$CYGWIN_ROOT_PATH$input_path"
29205    fi
29206  fi
29207
29208
29209  if test "x$path" != "x$new_path"; then
29210    BOOT_JDK="$new_path"
29211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29212$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29213  fi
29214
29215    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29216
29217  path="$BOOT_JDK"
29218  has_colon=`$ECHO $path | $GREP ^.:`
29219  new_path="$path"
29220  if test "x$has_colon" = x; then
29221    # Not in mixed or Windows style, start by that.
29222    new_path=`cmd //c echo $path`
29223  fi
29224
29225
29226  input_path="$new_path"
29227  # Check if we need to convert this using DOS-style short mode. If the path
29228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29229  # take no chances and rewrite it.
29230  # Note: m4 eats our [], so we need to use [ and ] instead.
29231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29232  if test "x$has_forbidden_chars" != x; then
29233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29235  fi
29236
29237
29238  windows_path="$new_path"
29239  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29240    unix_path=`$CYGPATH -u "$windows_path"`
29241    new_path="$unix_path"
29242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29243    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29244    new_path="$unix_path"
29245  fi
29246
29247  if test "x$path" != "x$new_path"; then
29248    BOOT_JDK="$new_path"
29249    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29250$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29251  fi
29252
29253  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29254  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29255
29256    else
29257      # We're on a unix platform. Hooray! :)
29258      path="$BOOT_JDK"
29259      has_space=`$ECHO "$path" | $GREP " "`
29260      if test "x$has_space" != x; then
29261        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29262$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29263        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29264      fi
29265
29266      # Use eval to expand a potential ~
29267      eval path="$path"
29268      if test ! -f "$path" && test ! -d "$path"; then
29269        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29270      fi
29271
29272      if test -d "$path"; then
29273        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29274      else
29275        dir="`$DIRNAME "$path"`"
29276        base="`$BASENAME "$path"`"
29277        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29278      fi
29279    fi
29280  fi
29281
29282            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29283$as_echo_n "checking for Boot JDK... " >&6; }
29284            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29285$as_echo "$BOOT_JDK" >&6; }
29286            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29287$as_echo_n "checking Boot JDK version... " >&6; }
29288            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29289            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29290$as_echo "$BOOT_JDK_VERSION" >&6; }
29291          fi # end check jdk version
29292        fi # end check javac
29293      fi # end check java
29294    fi # end check boot jdk found
29295  fi
29296
29297  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29298
29299  if test "x$BOOT_JDK_FOUND" = xno; then
29300    # Now execute the test
29301
29302  BOOT_JDK_PREFIX="/usr/lib/jvm"
29303  BOOT_JDK_SUFFIX=""
29304  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29305  if test "x$ALL_JDKS_FOUND" != x; then
29306    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29307
29308  if test "x$BOOT_JDK_FOUND" = xno; then
29309    # Now execute the test
29310
29311        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29312        if test -d "$BOOT_JDK"; then
29313          BOOT_JDK_FOUND=maybe
29314          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29315$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29316        fi
29317
29318
29319    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29320    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29321      # Do we have a bin/java?
29322      if test ! -x "$BOOT_JDK/bin/java"; then
29323        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29325        BOOT_JDK_FOUND=no
29326      else
29327        # Do we have a bin/javac?
29328        if test ! -x "$BOOT_JDK/bin/javac"; then
29329          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29331          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29332$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29333          BOOT_JDK_FOUND=no
29334        else
29335          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29336          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29337
29338          # Extra M4 quote needed to protect [] in grep expression.
29339          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29340          if test "x$FOUND_CORRECT_VERSION" = x; then
29341            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29342$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29343            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29344$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29345            BOOT_JDK_FOUND=no
29346          else
29347            # We're done! :-)
29348            BOOT_JDK_FOUND=yes
29349
29350  # Only process if variable expands to non-empty
29351
29352  if test "x$BOOT_JDK" != x; then
29353    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29354
29355  # Input might be given as Windows format, start by converting to
29356  # unix format.
29357  path="$BOOT_JDK"
29358  new_path=`$CYGPATH -u "$path"`
29359
29360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29363  # "foo.exe" is OK but "foo" is an error.
29364  #
29365  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29366  # It is also a way to make sure we got the proper file name for the real test later on.
29367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29368  if test "x$test_shortpath" = x; then
29369    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29371    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29372  fi
29373
29374  # Call helper function which possibly converts this using DOS-style short mode.
29375  # If so, the updated path is stored in $new_path.
29376
29377  input_path="$new_path"
29378  # Check if we need to convert this using DOS-style short mode. If the path
29379  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29380  # take no chances and rewrite it.
29381  # Note: m4 eats our [], so we need to use [ and ] instead.
29382  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29383  if test "x$has_forbidden_chars" != x; then
29384    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29385    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29386    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29387    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29388      # Going to short mode and back again did indeed matter. Since short mode is
29389      # case insensitive, let's make it lowercase to improve readability.
29390      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29391      # Now convert it back to Unix-style (cygpath)
29392      input_path=`$CYGPATH -u "$shortmode_path"`
29393      new_path="$input_path"
29394    fi
29395  fi
29396
29397  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29398  if test "x$test_cygdrive_prefix" = x; then
29399    # As a simple fix, exclude /usr/bin since it's not a real path.
29400    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29401      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29402      # a path prefixed by /cygdrive for fixpath to work.
29403      new_path="$CYGWIN_ROOT_PATH$input_path"
29404    fi
29405  fi
29406
29407
29408  if test "x$path" != "x$new_path"; then
29409    BOOT_JDK="$new_path"
29410    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29411$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29412  fi
29413
29414    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29415
29416  path="$BOOT_JDK"
29417  has_colon=`$ECHO $path | $GREP ^.:`
29418  new_path="$path"
29419  if test "x$has_colon" = x; then
29420    # Not in mixed or Windows style, start by that.
29421    new_path=`cmd //c echo $path`
29422  fi
29423
29424
29425  input_path="$new_path"
29426  # Check if we need to convert this using DOS-style short mode. If the path
29427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29428  # take no chances and rewrite it.
29429  # Note: m4 eats our [], so we need to use [ and ] instead.
29430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29431  if test "x$has_forbidden_chars" != x; then
29432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29434  fi
29435
29436
29437  windows_path="$new_path"
29438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29439    unix_path=`$CYGPATH -u "$windows_path"`
29440    new_path="$unix_path"
29441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29443    new_path="$unix_path"
29444  fi
29445
29446  if test "x$path" != "x$new_path"; then
29447    BOOT_JDK="$new_path"
29448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29449$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29450  fi
29451
29452  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29453  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29454
29455    else
29456      # We're on a unix platform. Hooray! :)
29457      path="$BOOT_JDK"
29458      has_space=`$ECHO "$path" | $GREP " "`
29459      if test "x$has_space" != x; then
29460        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29461$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29462        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29463      fi
29464
29465      # Use eval to expand a potential ~
29466      eval path="$path"
29467      if test ! -f "$path" && test ! -d "$path"; then
29468        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29469      fi
29470
29471      if test -d "$path"; then
29472        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29473      else
29474        dir="`$DIRNAME "$path"`"
29475        base="`$BASENAME "$path"`"
29476        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29477      fi
29478    fi
29479  fi
29480
29481            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29482$as_echo_n "checking for Boot JDK... " >&6; }
29483            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29484$as_echo "$BOOT_JDK" >&6; }
29485            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29486$as_echo_n "checking Boot JDK version... " >&6; }
29487            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29489$as_echo "$BOOT_JDK_VERSION" >&6; }
29490          fi # end check jdk version
29491        fi # end check javac
29492      fi # end check java
29493    fi # end check boot jdk found
29494  fi
29495
29496    done
29497  fi
29498
29499
29500    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29501    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29502      # Do we have a bin/java?
29503      if test ! -x "$BOOT_JDK/bin/java"; then
29504        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29506        BOOT_JDK_FOUND=no
29507      else
29508        # Do we have a bin/javac?
29509        if test ! -x "$BOOT_JDK/bin/javac"; then
29510          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29511$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29512          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29513$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29514          BOOT_JDK_FOUND=no
29515        else
29516          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29517          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29518
29519          # Extra M4 quote needed to protect [] in grep expression.
29520          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29521          if test "x$FOUND_CORRECT_VERSION" = x; then
29522            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29524            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29525$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29526            BOOT_JDK_FOUND=no
29527          else
29528            # We're done! :-)
29529            BOOT_JDK_FOUND=yes
29530
29531  # Only process if variable expands to non-empty
29532
29533  if test "x$BOOT_JDK" != x; then
29534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29535
29536  # Input might be given as Windows format, start by converting to
29537  # unix format.
29538  path="$BOOT_JDK"
29539  new_path=`$CYGPATH -u "$path"`
29540
29541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29544  # "foo.exe" is OK but "foo" is an error.
29545  #
29546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29547  # It is also a way to make sure we got the proper file name for the real test later on.
29548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29549  if test "x$test_shortpath" = x; then
29550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29551$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29552    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29553  fi
29554
29555  # Call helper function which possibly converts this using DOS-style short mode.
29556  # If so, the updated path is stored in $new_path.
29557
29558  input_path="$new_path"
29559  # Check if we need to convert this using DOS-style short mode. If the path
29560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29561  # take no chances and rewrite it.
29562  # Note: m4 eats our [], so we need to use [ and ] instead.
29563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29564  if test "x$has_forbidden_chars" != x; then
29565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29569      # Going to short mode and back again did indeed matter. Since short mode is
29570      # case insensitive, let's make it lowercase to improve readability.
29571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29572      # Now convert it back to Unix-style (cygpath)
29573      input_path=`$CYGPATH -u "$shortmode_path"`
29574      new_path="$input_path"
29575    fi
29576  fi
29577
29578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29579  if test "x$test_cygdrive_prefix" = x; then
29580    # As a simple fix, exclude /usr/bin since it's not a real path.
29581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29583      # a path prefixed by /cygdrive for fixpath to work.
29584      new_path="$CYGWIN_ROOT_PATH$input_path"
29585    fi
29586  fi
29587
29588
29589  if test "x$path" != "x$new_path"; then
29590    BOOT_JDK="$new_path"
29591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29592$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29593  fi
29594
29595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29596
29597  path="$BOOT_JDK"
29598  has_colon=`$ECHO $path | $GREP ^.:`
29599  new_path="$path"
29600  if test "x$has_colon" = x; then
29601    # Not in mixed or Windows style, start by that.
29602    new_path=`cmd //c echo $path`
29603  fi
29604
29605
29606  input_path="$new_path"
29607  # Check if we need to convert this using DOS-style short mode. If the path
29608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29609  # take no chances and rewrite it.
29610  # Note: m4 eats our [], so we need to use [ and ] instead.
29611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29612  if test "x$has_forbidden_chars" != x; then
29613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29615  fi
29616
29617
29618  windows_path="$new_path"
29619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29620    unix_path=`$CYGPATH -u "$windows_path"`
29621    new_path="$unix_path"
29622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29624    new_path="$unix_path"
29625  fi
29626
29627  if test "x$path" != "x$new_path"; then
29628    BOOT_JDK="$new_path"
29629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29631  fi
29632
29633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29635
29636    else
29637      # We're on a unix platform. Hooray! :)
29638      path="$BOOT_JDK"
29639      has_space=`$ECHO "$path" | $GREP " "`
29640      if test "x$has_space" != x; then
29641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29642$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29644      fi
29645
29646      # Use eval to expand a potential ~
29647      eval path="$path"
29648      if test ! -f "$path" && test ! -d "$path"; then
29649        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29650      fi
29651
29652      if test -d "$path"; then
29653        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29654      else
29655        dir="`$DIRNAME "$path"`"
29656        base="`$BASENAME "$path"`"
29657        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29658      fi
29659    fi
29660  fi
29661
29662            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29663$as_echo_n "checking for Boot JDK... " >&6; }
29664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29665$as_echo "$BOOT_JDK" >&6; }
29666            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29667$as_echo_n "checking Boot JDK version... " >&6; }
29668            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29669            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29670$as_echo "$BOOT_JDK_VERSION" >&6; }
29671          fi # end check jdk version
29672        fi # end check javac
29673      fi # end check java
29674    fi # end check boot jdk found
29675  fi
29676
29677  fi
29678
29679
29680    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29681    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29682      # Do we have a bin/java?
29683      if test ! -x "$BOOT_JDK/bin/java"; then
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29686        BOOT_JDK_FOUND=no
29687      else
29688        # Do we have a bin/javac?
29689        if test ! -x "$BOOT_JDK/bin/javac"; then
29690          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29691$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29692          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29693$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29694          BOOT_JDK_FOUND=no
29695        else
29696          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29697          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29698
29699          # Extra M4 quote needed to protect [] in grep expression.
29700          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29701          if test "x$FOUND_CORRECT_VERSION" = x; then
29702            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29704            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29705$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29706            BOOT_JDK_FOUND=no
29707          else
29708            # We're done! :-)
29709            BOOT_JDK_FOUND=yes
29710
29711  # Only process if variable expands to non-empty
29712
29713  if test "x$BOOT_JDK" != x; then
29714    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29715
29716  # Input might be given as Windows format, start by converting to
29717  # unix format.
29718  path="$BOOT_JDK"
29719  new_path=`$CYGPATH -u "$path"`
29720
29721  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29722  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29723  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29724  # "foo.exe" is OK but "foo" is an error.
29725  #
29726  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29727  # It is also a way to make sure we got the proper file name for the real test later on.
29728  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29729  if test "x$test_shortpath" = x; then
29730    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29731$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29732    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29733  fi
29734
29735  # Call helper function which possibly converts this using DOS-style short mode.
29736  # If so, the updated path is stored in $new_path.
29737
29738  input_path="$new_path"
29739  # Check if we need to convert this using DOS-style short mode. If the path
29740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29741  # take no chances and rewrite it.
29742  # Note: m4 eats our [], so we need to use [ and ] instead.
29743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29744  if test "x$has_forbidden_chars" != x; then
29745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29746    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29747    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29748    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29749      # Going to short mode and back again did indeed matter. Since short mode is
29750      # case insensitive, let's make it lowercase to improve readability.
29751      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29752      # Now convert it back to Unix-style (cygpath)
29753      input_path=`$CYGPATH -u "$shortmode_path"`
29754      new_path="$input_path"
29755    fi
29756  fi
29757
29758  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29759  if test "x$test_cygdrive_prefix" = x; then
29760    # As a simple fix, exclude /usr/bin since it's not a real path.
29761    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29762      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29763      # a path prefixed by /cygdrive for fixpath to work.
29764      new_path="$CYGWIN_ROOT_PATH$input_path"
29765    fi
29766  fi
29767
29768
29769  if test "x$path" != "x$new_path"; then
29770    BOOT_JDK="$new_path"
29771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29772$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29773  fi
29774
29775    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29776
29777  path="$BOOT_JDK"
29778  has_colon=`$ECHO $path | $GREP ^.:`
29779  new_path="$path"
29780  if test "x$has_colon" = x; then
29781    # Not in mixed or Windows style, start by that.
29782    new_path=`cmd //c echo $path`
29783  fi
29784
29785
29786  input_path="$new_path"
29787  # Check if we need to convert this using DOS-style short mode. If the path
29788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29789  # take no chances and rewrite it.
29790  # Note: m4 eats our [], so we need to use [ and ] instead.
29791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29792  if test "x$has_forbidden_chars" != x; then
29793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29795  fi
29796
29797
29798  windows_path="$new_path"
29799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29800    unix_path=`$CYGPATH -u "$windows_path"`
29801    new_path="$unix_path"
29802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29804    new_path="$unix_path"
29805  fi
29806
29807  if test "x$path" != "x$new_path"; then
29808    BOOT_JDK="$new_path"
29809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29810$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29811  fi
29812
29813  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29814  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29815
29816    else
29817      # We're on a unix platform. Hooray! :)
29818      path="$BOOT_JDK"
29819      has_space=`$ECHO "$path" | $GREP " "`
29820      if test "x$has_space" != x; then
29821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29822$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29823        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29824      fi
29825
29826      # Use eval to expand a potential ~
29827      eval path="$path"
29828      if test ! -f "$path" && test ! -d "$path"; then
29829        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29830      fi
29831
29832      if test -d "$path"; then
29833        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29834      else
29835        dir="`$DIRNAME "$path"`"
29836        base="`$BASENAME "$path"`"
29837        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29838      fi
29839    fi
29840  fi
29841
29842            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29843$as_echo_n "checking for Boot JDK... " >&6; }
29844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29845$as_echo "$BOOT_JDK" >&6; }
29846            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29847$as_echo_n "checking Boot JDK version... " >&6; }
29848            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29850$as_echo "$BOOT_JDK_VERSION" >&6; }
29851          fi # end check jdk version
29852        fi # end check javac
29853      fi # end check java
29854    fi # end check boot jdk found
29855  fi
29856
29857
29858  # If we haven't found anything yet, we've truly lost. Give up.
29859  if test "x$BOOT_JDK_FOUND" = xno; then
29860
29861  # Print a helpful message on how to acquire the necessary build dependency.
29862  # openjdk is the help tag: freetype, cups, alsa etc
29863  MISSING_DEPENDENCY=openjdk
29864
29865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29866    cygwin_help $MISSING_DEPENDENCY
29867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29868    msys_help $MISSING_DEPENDENCY
29869  else
29870    PKGHANDLER_COMMAND=
29871
29872    case $PKGHANDLER in
29873      apt-get)
29874        apt_help     $MISSING_DEPENDENCY ;;
29875      yum)
29876        yum_help     $MISSING_DEPENDENCY ;;
29877      port)
29878        port_help    $MISSING_DEPENDENCY ;;
29879      pkgutil)
29880        pkgutil_help $MISSING_DEPENDENCY ;;
29881      pkgadd)
29882        pkgadd_help  $MISSING_DEPENDENCY ;;
29883    esac
29884
29885    if test "x$PKGHANDLER_COMMAND" != x; then
29886      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29887    fi
29888  fi
29889
29890    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29891$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29892    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29893$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29894    as_fn_error $? "Cannot continue" "$LINENO" 5
29895  fi
29896
29897
29898
29899  # Setup tools from the Boot JDK.
29900
29901  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29902
29903  # Publish this variable in the help.
29904
29905
29906  if [ -z "${JAVA+x}" ]; then
29907    # The variable is not set by user, try to locate tool using the code snippet
29908
29909      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29910$as_echo_n "checking for java in Boot JDK... " >&6; }
29911      JAVA=$BOOT_JDK/bin/java
29912      if test ! -x $JAVA; then
29913        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29914$as_echo "not found" >&6; }
29915        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29916$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29917        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29918      fi
29919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29920$as_echo "ok" >&6; }
29921
29922
29923  else
29924    # The variable is set, but is it from the command line or the environment?
29925
29926    # Try to remove the string !JAVA! from our list.
29927    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29928    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29929      # If it failed, the variable was not from the command line. Ignore it,
29930      # but warn the user (except for BASH, which is always set by the calling BASH).
29931      if test "xJAVA" != xBASH; then
29932        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29933$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29934      fi
29935      # Try to locate tool using the code snippet
29936
29937      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29938$as_echo_n "checking for java in Boot JDK... " >&6; }
29939      JAVA=$BOOT_JDK/bin/java
29940      if test ! -x $JAVA; then
29941        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29942$as_echo "not found" >&6; }
29943        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29944$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29945        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29946      fi
29947      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29948$as_echo "ok" >&6; }
29949
29950
29951    else
29952      # If it succeeded, then it was overridden by the user. We will use it
29953      # for the tool.
29954
29955      # First remove it from the list of overridden variables, so we can test
29956      # for unknown variables in the end.
29957      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29958
29959      # Check if we try to supply an empty value
29960      if test "x$JAVA" = x; then
29961        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29962$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29964$as_echo_n "checking for JAVA... " >&6; }
29965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29966$as_echo "disabled" >&6; }
29967      else
29968        # Check if the provided tool contains a complete path.
29969        tool_specified="$JAVA"
29970        tool_basename="${tool_specified##*/}"
29971        if test "x$tool_basename" = "x$tool_specified"; then
29972          # A command without a complete path is provided, search $PATH.
29973          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29974$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29975          # Extract the first word of "$tool_basename", so it can be a program name with args.
29976set dummy $tool_basename; ac_word=$2
29977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29978$as_echo_n "checking for $ac_word... " >&6; }
29979if ${ac_cv_path_JAVA+:} false; then :
29980  $as_echo_n "(cached) " >&6
29981else
29982  case $JAVA in
29983  [\\/]* | ?:[\\/]*)
29984  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29985  ;;
29986  *)
29987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29988for as_dir in $PATH
29989do
29990  IFS=$as_save_IFS
29991  test -z "$as_dir" && as_dir=.
29992    for ac_exec_ext in '' $ac_executable_extensions; do
29993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29994    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29996    break 2
29997  fi
29998done
29999  done
30000IFS=$as_save_IFS
30001
30002  ;;
30003esac
30004fi
30005JAVA=$ac_cv_path_JAVA
30006if test -n "$JAVA"; then
30007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30008$as_echo "$JAVA" >&6; }
30009else
30010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30011$as_echo "no" >&6; }
30012fi
30013
30014
30015          if test "x$JAVA" = x; then
30016            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30017          fi
30018        else
30019          # Otherwise we believe it is a complete path. Use it as it is.
30020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30021$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30022          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30023$as_echo_n "checking for JAVA... " >&6; }
30024          if test ! -x "$tool_specified"; then
30025            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30026$as_echo "not found" >&6; }
30027            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30028          fi
30029          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30030$as_echo "$tool_specified" >&6; }
30031        fi
30032      fi
30033    fi
30034
30035  fi
30036
30037
30038
30039  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30040
30041  # Publish this variable in the help.
30042
30043
30044  if [ -z "${JAVAC+x}" ]; then
30045    # The variable is not set by user, try to locate tool using the code snippet
30046
30047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30048$as_echo_n "checking for javac in Boot JDK... " >&6; }
30049      JAVAC=$BOOT_JDK/bin/javac
30050      if test ! -x $JAVAC; then
30051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30052$as_echo "not found" >&6; }
30053        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30054$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30055        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30056      fi
30057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30058$as_echo "ok" >&6; }
30059
30060
30061  else
30062    # The variable is set, but is it from the command line or the environment?
30063
30064    # Try to remove the string !JAVAC! from our list.
30065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30067      # If it failed, the variable was not from the command line. Ignore it,
30068      # but warn the user (except for BASH, which is always set by the calling BASH).
30069      if test "xJAVAC" != xBASH; then
30070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30071$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30072      fi
30073      # Try to locate tool using the code snippet
30074
30075      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30076$as_echo_n "checking for javac in Boot JDK... " >&6; }
30077      JAVAC=$BOOT_JDK/bin/javac
30078      if test ! -x $JAVAC; then
30079        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30080$as_echo "not found" >&6; }
30081        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30082$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30083        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30084      fi
30085      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30086$as_echo "ok" >&6; }
30087
30088
30089    else
30090      # If it succeeded, then it was overridden by the user. We will use it
30091      # for the tool.
30092
30093      # First remove it from the list of overridden variables, so we can test
30094      # for unknown variables in the end.
30095      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30096
30097      # Check if we try to supply an empty value
30098      if test "x$JAVAC" = x; then
30099        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30100$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30102$as_echo_n "checking for JAVAC... " >&6; }
30103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30104$as_echo "disabled" >&6; }
30105      else
30106        # Check if the provided tool contains a complete path.
30107        tool_specified="$JAVAC"
30108        tool_basename="${tool_specified##*/}"
30109        if test "x$tool_basename" = "x$tool_specified"; then
30110          # A command without a complete path is provided, search $PATH.
30111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30112$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30113          # Extract the first word of "$tool_basename", so it can be a program name with args.
30114set dummy $tool_basename; ac_word=$2
30115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30116$as_echo_n "checking for $ac_word... " >&6; }
30117if ${ac_cv_path_JAVAC+:} false; then :
30118  $as_echo_n "(cached) " >&6
30119else
30120  case $JAVAC in
30121  [\\/]* | ?:[\\/]*)
30122  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30123  ;;
30124  *)
30125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30126for as_dir in $PATH
30127do
30128  IFS=$as_save_IFS
30129  test -z "$as_dir" && as_dir=.
30130    for ac_exec_ext in '' $ac_executable_extensions; do
30131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30132    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30134    break 2
30135  fi
30136done
30137  done
30138IFS=$as_save_IFS
30139
30140  ;;
30141esac
30142fi
30143JAVAC=$ac_cv_path_JAVAC
30144if test -n "$JAVAC"; then
30145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30146$as_echo "$JAVAC" >&6; }
30147else
30148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30149$as_echo "no" >&6; }
30150fi
30151
30152
30153          if test "x$JAVAC" = x; then
30154            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30155          fi
30156        else
30157          # Otherwise we believe it is a complete path. Use it as it is.
30158          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30159$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30160          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30161$as_echo_n "checking for JAVAC... " >&6; }
30162          if test ! -x "$tool_specified"; then
30163            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30164$as_echo "not found" >&6; }
30165            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30166          fi
30167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30168$as_echo "$tool_specified" >&6; }
30169        fi
30170      fi
30171    fi
30172
30173  fi
30174
30175
30176
30177  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30178
30179  # Publish this variable in the help.
30180
30181
30182  if [ -z "${JAVAH+x}" ]; then
30183    # The variable is not set by user, try to locate tool using the code snippet
30184
30185      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30186$as_echo_n "checking for javah in Boot JDK... " >&6; }
30187      JAVAH=$BOOT_JDK/bin/javah
30188      if test ! -x $JAVAH; then
30189        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30190$as_echo "not found" >&6; }
30191        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30192$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30193        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30194      fi
30195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30196$as_echo "ok" >&6; }
30197
30198
30199  else
30200    # The variable is set, but is it from the command line or the environment?
30201
30202    # Try to remove the string !JAVAH! from our list.
30203    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30204    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30205      # If it failed, the variable was not from the command line. Ignore it,
30206      # but warn the user (except for BASH, which is always set by the calling BASH).
30207      if test "xJAVAH" != xBASH; then
30208        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30209$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30210      fi
30211      # Try to locate tool using the code snippet
30212
30213      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30214$as_echo_n "checking for javah in Boot JDK... " >&6; }
30215      JAVAH=$BOOT_JDK/bin/javah
30216      if test ! -x $JAVAH; then
30217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30218$as_echo "not found" >&6; }
30219        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30220$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30221        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30222      fi
30223      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30224$as_echo "ok" >&6; }
30225
30226
30227    else
30228      # If it succeeded, then it was overridden by the user. We will use it
30229      # for the tool.
30230
30231      # First remove it from the list of overridden variables, so we can test
30232      # for unknown variables in the end.
30233      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30234
30235      # Check if we try to supply an empty value
30236      if test "x$JAVAH" = x; then
30237        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30238$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30239        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30240$as_echo_n "checking for JAVAH... " >&6; }
30241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30242$as_echo "disabled" >&6; }
30243      else
30244        # Check if the provided tool contains a complete path.
30245        tool_specified="$JAVAH"
30246        tool_basename="${tool_specified##*/}"
30247        if test "x$tool_basename" = "x$tool_specified"; then
30248          # A command without a complete path is provided, search $PATH.
30249          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30250$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30251          # Extract the first word of "$tool_basename", so it can be a program name with args.
30252set dummy $tool_basename; ac_word=$2
30253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30254$as_echo_n "checking for $ac_word... " >&6; }
30255if ${ac_cv_path_JAVAH+:} false; then :
30256  $as_echo_n "(cached) " >&6
30257else
30258  case $JAVAH in
30259  [\\/]* | ?:[\\/]*)
30260  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30261  ;;
30262  *)
30263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30264for as_dir in $PATH
30265do
30266  IFS=$as_save_IFS
30267  test -z "$as_dir" && as_dir=.
30268    for ac_exec_ext in '' $ac_executable_extensions; do
30269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30270    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30272    break 2
30273  fi
30274done
30275  done
30276IFS=$as_save_IFS
30277
30278  ;;
30279esac
30280fi
30281JAVAH=$ac_cv_path_JAVAH
30282if test -n "$JAVAH"; then
30283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30284$as_echo "$JAVAH" >&6; }
30285else
30286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30287$as_echo "no" >&6; }
30288fi
30289
30290
30291          if test "x$JAVAH" = x; then
30292            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30293          fi
30294        else
30295          # Otherwise we believe it is a complete path. Use it as it is.
30296          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30297$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30298          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30299$as_echo_n "checking for JAVAH... " >&6; }
30300          if test ! -x "$tool_specified"; then
30301            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30302$as_echo "not found" >&6; }
30303            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30304          fi
30305          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30306$as_echo "$tool_specified" >&6; }
30307        fi
30308      fi
30309    fi
30310
30311  fi
30312
30313
30314
30315  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30316
30317  # Publish this variable in the help.
30318
30319
30320  if [ -z "${JAR+x}" ]; then
30321    # The variable is not set by user, try to locate tool using the code snippet
30322
30323      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30324$as_echo_n "checking for jar in Boot JDK... " >&6; }
30325      JAR=$BOOT_JDK/bin/jar
30326      if test ! -x $JAR; then
30327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30328$as_echo "not found" >&6; }
30329        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30330$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30331        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30332      fi
30333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30334$as_echo "ok" >&6; }
30335
30336
30337  else
30338    # The variable is set, but is it from the command line or the environment?
30339
30340    # Try to remove the string !JAR! from our list.
30341    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30342    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30343      # If it failed, the variable was not from the command line. Ignore it,
30344      # but warn the user (except for BASH, which is always set by the calling BASH).
30345      if test "xJAR" != xBASH; then
30346        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30347$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30348      fi
30349      # Try to locate tool using the code snippet
30350
30351      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30352$as_echo_n "checking for jar in Boot JDK... " >&6; }
30353      JAR=$BOOT_JDK/bin/jar
30354      if test ! -x $JAR; then
30355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30356$as_echo "not found" >&6; }
30357        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30358$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30359        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30360      fi
30361      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30362$as_echo "ok" >&6; }
30363
30364
30365    else
30366      # If it succeeded, then it was overridden by the user. We will use it
30367      # for the tool.
30368
30369      # First remove it from the list of overridden variables, so we can test
30370      # for unknown variables in the end.
30371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30372
30373      # Check if we try to supply an empty value
30374      if test "x$JAR" = x; then
30375        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30376$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30377        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30378$as_echo_n "checking for JAR... " >&6; }
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30380$as_echo "disabled" >&6; }
30381      else
30382        # Check if the provided tool contains a complete path.
30383        tool_specified="$JAR"
30384        tool_basename="${tool_specified##*/}"
30385        if test "x$tool_basename" = "x$tool_specified"; then
30386          # A command without a complete path is provided, search $PATH.
30387          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30388$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30389          # Extract the first word of "$tool_basename", so it can be a program name with args.
30390set dummy $tool_basename; ac_word=$2
30391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30392$as_echo_n "checking for $ac_word... " >&6; }
30393if ${ac_cv_path_JAR+:} false; then :
30394  $as_echo_n "(cached) " >&6
30395else
30396  case $JAR in
30397  [\\/]* | ?:[\\/]*)
30398  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30399  ;;
30400  *)
30401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30402for as_dir in $PATH
30403do
30404  IFS=$as_save_IFS
30405  test -z "$as_dir" && as_dir=.
30406    for ac_exec_ext in '' $ac_executable_extensions; do
30407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30408    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30410    break 2
30411  fi
30412done
30413  done
30414IFS=$as_save_IFS
30415
30416  ;;
30417esac
30418fi
30419JAR=$ac_cv_path_JAR
30420if test -n "$JAR"; then
30421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30422$as_echo "$JAR" >&6; }
30423else
30424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30425$as_echo "no" >&6; }
30426fi
30427
30428
30429          if test "x$JAR" = x; then
30430            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30431          fi
30432        else
30433          # Otherwise we believe it is a complete path. Use it as it is.
30434          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30435$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30436          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30437$as_echo_n "checking for JAR... " >&6; }
30438          if test ! -x "$tool_specified"; then
30439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30440$as_echo "not found" >&6; }
30441            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30442          fi
30443          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30444$as_echo "$tool_specified" >&6; }
30445        fi
30446      fi
30447    fi
30448
30449  fi
30450
30451
30452
30453  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30454
30455  # Publish this variable in the help.
30456
30457
30458  if [ -z "${JARSIGNER+x}" ]; then
30459    # The variable is not set by user, try to locate tool using the code snippet
30460
30461      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30462$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30463      JARSIGNER=$BOOT_JDK/bin/jarsigner
30464      if test ! -x $JARSIGNER; then
30465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30466$as_echo "not found" >&6; }
30467        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30468$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30469        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30470      fi
30471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30472$as_echo "ok" >&6; }
30473
30474
30475  else
30476    # The variable is set, but is it from the command line or the environment?
30477
30478    # Try to remove the string !JARSIGNER! from our list.
30479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30481      # If it failed, the variable was not from the command line. Ignore it,
30482      # but warn the user (except for BASH, which is always set by the calling BASH).
30483      if test "xJARSIGNER" != xBASH; then
30484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30485$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30486      fi
30487      # Try to locate tool using the code snippet
30488
30489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30490$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30491      JARSIGNER=$BOOT_JDK/bin/jarsigner
30492      if test ! -x $JARSIGNER; then
30493        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30494$as_echo "not found" >&6; }
30495        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30496$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30497        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30498      fi
30499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30500$as_echo "ok" >&6; }
30501
30502
30503    else
30504      # If it succeeded, then it was overridden by the user. We will use it
30505      # for the tool.
30506
30507      # First remove it from the list of overridden variables, so we can test
30508      # for unknown variables in the end.
30509      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30510
30511      # Check if we try to supply an empty value
30512      if test "x$JARSIGNER" = x; then
30513        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30514$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30516$as_echo_n "checking for JARSIGNER... " >&6; }
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30518$as_echo "disabled" >&6; }
30519      else
30520        # Check if the provided tool contains a complete path.
30521        tool_specified="$JARSIGNER"
30522        tool_basename="${tool_specified##*/}"
30523        if test "x$tool_basename" = "x$tool_specified"; then
30524          # A command without a complete path is provided, search $PATH.
30525          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30526$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30527          # Extract the first word of "$tool_basename", so it can be a program name with args.
30528set dummy $tool_basename; ac_word=$2
30529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30530$as_echo_n "checking for $ac_word... " >&6; }
30531if ${ac_cv_path_JARSIGNER+:} false; then :
30532  $as_echo_n "(cached) " >&6
30533else
30534  case $JARSIGNER in
30535  [\\/]* | ?:[\\/]*)
30536  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30537  ;;
30538  *)
30539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30540for as_dir in $PATH
30541do
30542  IFS=$as_save_IFS
30543  test -z "$as_dir" && as_dir=.
30544    for ac_exec_ext in '' $ac_executable_extensions; do
30545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30546    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30548    break 2
30549  fi
30550done
30551  done
30552IFS=$as_save_IFS
30553
30554  ;;
30555esac
30556fi
30557JARSIGNER=$ac_cv_path_JARSIGNER
30558if test -n "$JARSIGNER"; then
30559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30560$as_echo "$JARSIGNER" >&6; }
30561else
30562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30563$as_echo "no" >&6; }
30564fi
30565
30566
30567          if test "x$JARSIGNER" = x; then
30568            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30569          fi
30570        else
30571          # Otherwise we believe it is a complete path. Use it as it is.
30572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30573$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30574          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30575$as_echo_n "checking for JARSIGNER... " >&6; }
30576          if test ! -x "$tool_specified"; then
30577            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30578$as_echo "not found" >&6; }
30579            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30580          fi
30581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30582$as_echo "$tool_specified" >&6; }
30583        fi
30584      fi
30585    fi
30586
30587  fi
30588
30589
30590
30591  # Finally, set some other options...
30592
30593  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30594  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30595
30596
30597
30598  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30599  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30600  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30601  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30602  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30603  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30604    dummy="$dummy -Xpatch:foo=bar"
30605    JVM_ARG_OK=true
30606  else
30607    $ECHO "Arg failed:" >&5
30608    $ECHO "$OUTPUT" >&5
30609    JVM_ARG_OK=false
30610  fi
30611
30612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30613$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30614  if test "x$JVM_ARG_OK" = "xtrue"; then
30615    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30616$as_echo "yes" >&6; }
30617    BOOT_JDK_MODULAR="true"
30618  else
30619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30620$as_echo "no" >&6; }
30621    BOOT_JDK_MODULAR="false"
30622  fi
30623
30624
30625
30626
30627  # Check if the boot jdk is 32 or 64 bit
30628  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30629    BOOT_JDK_BITS="64"
30630  else
30631    BOOT_JDK_BITS="32"
30632  fi
30633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30634$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30636$as_echo "$BOOT_JDK_BITS" >&6; }
30637
30638
30639
30640
30641# Check whether --with-build-jdk was given.
30642if test "${with_build_jdk+set}" = set; then :
30643  withval=$with_build_jdk;
30644fi
30645
30646
30647  CREATE_BUILDJDK=false
30648  EXTERNAL_BUILDJDK=false
30649  BUILD_JDK_FOUND="no"
30650  if test "x$with_build_jdk" != "x"; then
30651
30652  if test "x$BUILD_JDK_FOUND" = xno; then
30653    # Execute the test
30654
30655       if test "x$with_build_jdk" != x; then
30656         BUILD_JDK=$with_build_jdk
30657         BUILD_JDK_FOUND=maybe
30658         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30659$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30660       fi
30661
30662    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30663    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30664      # Do we have a bin/java?
30665      if test ! -x "$BUILD_JDK/bin/java"; then
30666        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30667$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30668        BUILD_JDK_FOUND=no
30669      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30670        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30671$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30672        BUILD_JDK_FOUND=no
30673      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30674        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30675$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30676        BUILD_JDK_FOUND=no
30677      elif test ! -x "$BUILD_JDK/bin/javac"; then
30678        # Do we have a bin/javac?
30679        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30680$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30681        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30682$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30683        BUILD_JDK_FOUND=no
30684      else
30685        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30686        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30687
30688        # Extra M4 quote needed to protect [] in grep expression.
30689        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30690        if test "x$FOUND_CORRECT_VERSION" = x; then
30691          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30692$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30693          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30694$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30695          BUILD_JDK_FOUND=no
30696        else
30697          # We're done!
30698          BUILD_JDK_FOUND=yes
30699
30700  # Only process if variable expands to non-empty
30701
30702  if test "x$BUILD_JDK" != x; then
30703    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30704
30705  # Input might be given as Windows format, start by converting to
30706  # unix format.
30707  path="$BUILD_JDK"
30708  new_path=`$CYGPATH -u "$path"`
30709
30710  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30711  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30712  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30713  # "foo.exe" is OK but "foo" is an error.
30714  #
30715  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30716  # It is also a way to make sure we got the proper file name for the real test later on.
30717  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30718  if test "x$test_shortpath" = x; then
30719    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30720$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30721    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30722  fi
30723
30724  # Call helper function which possibly converts this using DOS-style short mode.
30725  # If so, the updated path is stored in $new_path.
30726
30727  input_path="$new_path"
30728  # Check if we need to convert this using DOS-style short mode. If the path
30729  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30730  # take no chances and rewrite it.
30731  # Note: m4 eats our [], so we need to use [ and ] instead.
30732  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30733  if test "x$has_forbidden_chars" != x; then
30734    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30735    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30736    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30737    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30738      # Going to short mode and back again did indeed matter. Since short mode is
30739      # case insensitive, let's make it lowercase to improve readability.
30740      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30741      # Now convert it back to Unix-style (cygpath)
30742      input_path=`$CYGPATH -u "$shortmode_path"`
30743      new_path="$input_path"
30744    fi
30745  fi
30746
30747  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30748  if test "x$test_cygdrive_prefix" = x; then
30749    # As a simple fix, exclude /usr/bin since it's not a real path.
30750    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30751      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30752      # a path prefixed by /cygdrive for fixpath to work.
30753      new_path="$CYGWIN_ROOT_PATH$input_path"
30754    fi
30755  fi
30756
30757
30758  if test "x$path" != "x$new_path"; then
30759    BUILD_JDK="$new_path"
30760    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30761$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30762  fi
30763
30764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30765
30766  path="$BUILD_JDK"
30767  has_colon=`$ECHO $path | $GREP ^.:`
30768  new_path="$path"
30769  if test "x$has_colon" = x; then
30770    # Not in mixed or Windows style, start by that.
30771    new_path=`cmd //c echo $path`
30772  fi
30773
30774
30775  input_path="$new_path"
30776  # Check if we need to convert this using DOS-style short mode. If the path
30777  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30778  # take no chances and rewrite it.
30779  # Note: m4 eats our [], so we need to use [ and ] instead.
30780  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30781  if test "x$has_forbidden_chars" != x; then
30782    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30783    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30784  fi
30785
30786
30787  windows_path="$new_path"
30788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30789    unix_path=`$CYGPATH -u "$windows_path"`
30790    new_path="$unix_path"
30791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30793    new_path="$unix_path"
30794  fi
30795
30796  if test "x$path" != "x$new_path"; then
30797    BUILD_JDK="$new_path"
30798    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30799$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30800  fi
30801
30802  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30803  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30804
30805    else
30806      # We're on a unix platform. Hooray! :)
30807      path="$BUILD_JDK"
30808      has_space=`$ECHO "$path" | $GREP " "`
30809      if test "x$has_space" != x; then
30810        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30811$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30812        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30813      fi
30814
30815      # Use eval to expand a potential ~
30816      eval path="$path"
30817      if test ! -f "$path" && test ! -d "$path"; then
30818        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30819      fi
30820
30821      if test -d "$path"; then
30822        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30823      else
30824        dir="`$DIRNAME "$path"`"
30825        base="`$BASENAME "$path"`"
30826        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30827      fi
30828    fi
30829  fi
30830
30831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30832$as_echo_n "checking for Build JDK... " >&6; }
30833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30834$as_echo "$BUILD_JDK" >&6; }
30835          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30836$as_echo_n "checking Build JDK version... " >&6; }
30837          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30839$as_echo "$BUILD_JDK_VERSION" >&6; }
30840        fi # end check jdk version
30841      fi # end check java
30842    fi # end check build jdk found
30843  fi
30844
30845    EXTERNAL_BUILDJDK=true
30846  else
30847    if test "x$COMPILE_TYPE" = "xcross"; then
30848      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30849      BUILD_JDK_FOUND=yes
30850      CREATE_BUILDJDK=true
30851      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30852$as_echo_n "checking for Build JDK... " >&6; }
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30854$as_echo "yes, will build it for the host platform" >&6; }
30855    else
30856      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30857      BUILD_JDK_FOUND=yes
30858      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30859$as_echo_n "checking for Build JDK... " >&6; }
30860      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30861$as_echo "yes, will use output dir" >&6; }
30862    fi
30863  fi
30864
30865  JMOD="$BUILD_JDK/bin/jmod"
30866  JLINK="$BUILD_JDK/bin/jlink"
30867
30868
30869
30870  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30872$as_echo_n "checking for Build JDK... " >&6; }
30873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30874$as_echo "no" >&6; }
30875    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30876  fi
30877
30878
30879
30880
30881
30882
30883###############################################################################
30884#
30885# Configure the sources to use. We can add or override individual directories.
30886#
30887###############################################################################
30888
30889
30890  # Where are the sources.
30891  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30892  CORBA_TOPDIR="$SRC_ROOT/corba"
30893  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30894  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30895  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30896  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30897  JDK_TOPDIR="$SRC_ROOT/jdk"
30898
30899
30900
30901
30902
30903
30904
30905
30906
30907  # This feature is no longer supported.
30908
30909
30910
30911# Check whether --with-add-source-root was given.
30912if test "${with_add_source_root+set}" = set; then :
30913  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
30914$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30915fi
30916
30917
30918
30919
30920# Check whether --with-override-source-root was given.
30921if test "${with_override_source_root+set}" = set; then :
30922  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
30923$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30924fi
30925
30926
30927
30928
30929# Check whether --with-adds-and-overrides was given.
30930if test "${with_adds_and_overrides+set}" = set; then :
30931  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
30932$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30933fi
30934
30935
30936
30937
30938# Check whether --with-override-langtools was given.
30939if test "${with_override_langtools+set}" = set; then :
30940  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30941$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30942fi
30943
30944
30945
30946
30947# Check whether --with-override-corba was given.
30948if test "${with_override_corba+set}" = set; then :
30949  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30950$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30951fi
30952
30953
30954
30955
30956# Check whether --with-override-jaxp was given.
30957if test "${with_override_jaxp+set}" = set; then :
30958  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30959$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30960fi
30961
30962
30963
30964
30965# Check whether --with-override-jaxws was given.
30966if test "${with_override_jaxws+set}" = set; then :
30967  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30968$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30969fi
30970
30971
30972
30973
30974# Check whether --with-override-hotspot was given.
30975if test "${with_override_hotspot+set}" = set; then :
30976  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30977$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30978fi
30979
30980
30981
30982
30983# Check whether --with-override-nashorn was given.
30984if test "${with_override_nashorn+set}" = set; then :
30985  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30986$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30987fi
30988
30989
30990
30991
30992# Check whether --with-override-jdk was given.
30993if test "${with_override_jdk+set}" = set; then :
30994  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30995$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30996fi
30997
30998
30999
31000
31001  BUILD_OUTPUT="$OUTPUT_ROOT"
31002
31003
31004  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31005  BUILD_HOTSPOT=true
31006
31007
31008
31009# Check whether --with-import-hotspot was given.
31010if test "${with_import_hotspot+set}" = set; then :
31011  withval=$with_import_hotspot;
31012fi
31013
31014  if test "x$with_import_hotspot" != x; then
31015    CURDIR="$PWD"
31016    cd "$with_import_hotspot"
31017    HOTSPOT_DIST="`pwd`"
31018    cd "$CURDIR"
31019    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31020      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31021    fi
31022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31023$as_echo_n "checking if hotspot should be imported... " >&6; }
31024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31025$as_echo "yes from $HOTSPOT_DIST" >&6; }
31026    BUILD_HOTSPOT=false
31027  fi
31028
31029  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31030
31031
31032
31033
31034# Check whether --with-import-modules was given.
31035if test "${with_import_modules+set}" = set; then :
31036  withval=$with_import_modules;
31037fi
31038
31039
31040  if test "x$with_import_modules" != x \
31041      && test "x$with_import_modules" != "xno"; then
31042    if test -d "$with_import_modules"; then
31043      IMPORT_MODULES_TOPDIR="$with_import_modules"
31044
31045  # Only process if variable expands to non-empty
31046
31047  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31048    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31049
31050  # Input might be given as Windows format, start by converting to
31051  # unix format.
31052  path="$IMPORT_MODULES_TOPDIR"
31053  new_path=`$CYGPATH -u "$path"`
31054
31055  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31056  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31057  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31058  # "foo.exe" is OK but "foo" is an error.
31059  #
31060  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31061  # It is also a way to make sure we got the proper file name for the real test later on.
31062  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31063  if test "x$test_shortpath" = x; then
31064    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31065$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31066    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31067  fi
31068
31069  # Call helper function which possibly converts this using DOS-style short mode.
31070  # If so, the updated path is stored in $new_path.
31071
31072  input_path="$new_path"
31073  # Check if we need to convert this using DOS-style short mode. If the path
31074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31075  # take no chances and rewrite it.
31076  # Note: m4 eats our [], so we need to use [ and ] instead.
31077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31078  if test "x$has_forbidden_chars" != x; then
31079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31080    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31081    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31082    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31083      # Going to short mode and back again did indeed matter. Since short mode is
31084      # case insensitive, let's make it lowercase to improve readability.
31085      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31086      # Now convert it back to Unix-style (cygpath)
31087      input_path=`$CYGPATH -u "$shortmode_path"`
31088      new_path="$input_path"
31089    fi
31090  fi
31091
31092  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31093  if test "x$test_cygdrive_prefix" = x; then
31094    # As a simple fix, exclude /usr/bin since it's not a real path.
31095    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31096      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31097      # a path prefixed by /cygdrive for fixpath to work.
31098      new_path="$CYGWIN_ROOT_PATH$input_path"
31099    fi
31100  fi
31101
31102
31103  if test "x$path" != "x$new_path"; then
31104    IMPORT_MODULES_TOPDIR="$new_path"
31105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31106$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31107  fi
31108
31109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31110
31111  path="$IMPORT_MODULES_TOPDIR"
31112  has_colon=`$ECHO $path | $GREP ^.:`
31113  new_path="$path"
31114  if test "x$has_colon" = x; then
31115    # Not in mixed or Windows style, start by that.
31116    new_path=`cmd //c echo $path`
31117  fi
31118
31119
31120  input_path="$new_path"
31121  # Check if we need to convert this using DOS-style short mode. If the path
31122  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31123  # take no chances and rewrite it.
31124  # Note: m4 eats our [], so we need to use [ and ] instead.
31125  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31126  if test "x$has_forbidden_chars" != x; then
31127    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31128    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31129  fi
31130
31131
31132  windows_path="$new_path"
31133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31134    unix_path=`$CYGPATH -u "$windows_path"`
31135    new_path="$unix_path"
31136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31138    new_path="$unix_path"
31139  fi
31140
31141  if test "x$path" != "x$new_path"; then
31142    IMPORT_MODULES_TOPDIR="$new_path"
31143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31144$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31145  fi
31146
31147  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31148  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31149
31150    else
31151      # We're on a unix platform. Hooray! :)
31152      path="$IMPORT_MODULES_TOPDIR"
31153      has_space=`$ECHO "$path" | $GREP " "`
31154      if test "x$has_space" != x; then
31155        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31156$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31157        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31158      fi
31159
31160      # Use eval to expand a potential ~
31161      eval path="$path"
31162      if test ! -f "$path" && test ! -d "$path"; then
31163        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31164      fi
31165
31166      if test -d "$path"; then
31167        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31168      else
31169        dir="`$DIRNAME "$path"`"
31170        base="`$BASENAME "$path"`"
31171        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31172      fi
31173    fi
31174  fi
31175
31176    elif test -e "$with_import_modules"; then
31177      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31178      $RM -rf "$IMPORT_MODULES_TOPDIR"
31179      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31180      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31181        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31182      fi
31183    else
31184      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31185    fi
31186  fi
31187
31188  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31189    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31190  fi
31191  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31192    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31193  fi
31194  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31195    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31196  fi
31197  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31198    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31199  fi
31200  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31201    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31202  fi
31203  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31204    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31205  fi
31206
31207
31208
31209
31210
31211
31212
31213
31214
31215###############################################################################
31216#
31217# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31218# native code.
31219#
31220###############################################################################
31221
31222# See if we are doing a complete static build or not
31223
31224  # Check whether --enable-static-build was given.
31225if test "${enable_static_build+set}" = set; then :
31226  enableval=$enable_static_build;
31227fi
31228
31229  STATIC_BUILD=false
31230  if test "x$enable_static_build" = "xyes"; then
31231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31232$as_echo_n "checking if static build is enabled... " >&6; }
31233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31234$as_echo "yes" >&6; }
31235    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31236      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31237    fi
31238    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31239    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31240    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31241    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31242    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31243    STATIC_BUILD=true
31244  elif test "x$enable_static_build" = "xno"; then
31245    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31246$as_echo_n "checking if static build is enabled... " >&6; }
31247    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31248$as_echo "no" >&6; }
31249  elif test "x$enable_static_build" != "x"; then
31250    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31251  fi
31252
31253
31254
31255
31256# First determine the toolchain type (compiler family)
31257
31258
31259# Check whether --with-toolchain-type was given.
31260if test "${with_toolchain_type+set}" = set; then :
31261  withval=$with_toolchain_type;
31262fi
31263
31264
31265  # Use indirect variable referencing
31266  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31267  VALID_TOOLCHAINS=${!toolchain_var_name}
31268
31269  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31270    if test -n "$XCODEBUILD"; then
31271      # On Mac OS X, default toolchain to clang after Xcode 5
31272      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31273      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31274      if test $? -ne 0; then
31275        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31276      fi
31277      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31278          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31279          $CUT -f 1 -d .`
31280      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31281$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31282      if test $XCODE_MAJOR_VERSION -ge 5; then
31283          DEFAULT_TOOLCHAIN="clang"
31284      else
31285          DEFAULT_TOOLCHAIN="gcc"
31286      fi
31287    else
31288      # If Xcode is not installed, but the command line tools are
31289      # then we can't run xcodebuild. On these systems we should
31290      # default to clang
31291      DEFAULT_TOOLCHAIN="clang"
31292    fi
31293  else
31294    # First toolchain type in the list is the default
31295    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31296  fi
31297
31298  if test "x$with_toolchain_type" = xlist; then
31299    # List all toolchains
31300    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31301$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31302    for toolchain in $VALID_TOOLCHAINS; do
31303      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31304      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31305      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31306    done
31307
31308    exit 0
31309  elif test "x$with_toolchain_type" != x; then
31310    # User override; check that it is valid
31311    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31312      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31313$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31314      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31315$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31316      as_fn_error $? "Cannot continue." "$LINENO" 5
31317    fi
31318    TOOLCHAIN_TYPE=$with_toolchain_type
31319  else
31320    # No flag given, use default
31321    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31322  fi
31323
31324
31325  TOOLCHAIN_CC_BINARY_clang="clang"
31326  TOOLCHAIN_CC_BINARY_gcc="gcc"
31327  TOOLCHAIN_CC_BINARY_microsoft="cl"
31328  TOOLCHAIN_CC_BINARY_solstudio="cc"
31329  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31330
31331  TOOLCHAIN_CXX_BINARY_clang="clang++"
31332  TOOLCHAIN_CXX_BINARY_gcc="g++"
31333  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31334  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31335  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31336
31337  # Use indirect variable referencing
31338  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31339  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31340  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31341  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31342  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31343  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31344  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31345  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31346
31347
31348  # Define filename patterns
31349  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31350    LIBRARY_PREFIX=
31351    SHARED_LIBRARY_SUFFIX='.dll'
31352    STATIC_LIBRARY_SUFFIX='.lib'
31353    SHARED_LIBRARY='$1.dll'
31354    STATIC_LIBRARY='$1.lib'
31355    OBJ_SUFFIX='.obj'
31356    EXE_SUFFIX='.exe'
31357  else
31358    LIBRARY_PREFIX=lib
31359    SHARED_LIBRARY_SUFFIX='.so'
31360    STATIC_LIBRARY_SUFFIX='.a'
31361    SHARED_LIBRARY='lib$1.so'
31362    STATIC_LIBRARY='lib$1.a'
31363    OBJ_SUFFIX='.o'
31364    EXE_SUFFIX=''
31365    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31366      # For full static builds, we're overloading the SHARED_LIBRARY
31367      # variables in order to limit the amount of changes required.
31368      # It would be better to remove SHARED and just use LIBRARY and
31369      # LIBRARY_SUFFIX for libraries that can be built either
31370      # shared or static and use STATIC_* for libraries that are
31371      # always built statically.
31372      if test "x$STATIC_BUILD" = xtrue; then
31373        SHARED_LIBRARY='lib$1.a'
31374        SHARED_LIBRARY_SUFFIX='.a'
31375      else
31376        SHARED_LIBRARY='lib$1.dylib'
31377        SHARED_LIBRARY_SUFFIX='.dylib'
31378      fi
31379    fi
31380  fi
31381
31382
31383
31384
31385
31386
31387
31388
31389
31390
31391  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31392    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31393$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31394  else
31395    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31396$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31397  fi
31398
31399
31400# User supplied flags should be used when configure detects compilers
31401
31402  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31404$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31405  fi
31406
31407  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31409$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31410  fi
31411
31412  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31414$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31415  fi
31416
31417
31418# Check whether --with-extra-cflags was given.
31419if test "${with_extra_cflags+set}" = set; then :
31420  withval=$with_extra_cflags;
31421fi
31422
31423
31424
31425# Check whether --with-extra-cxxflags was given.
31426if test "${with_extra_cxxflags+set}" = set; then :
31427  withval=$with_extra_cxxflags;
31428fi
31429
31430
31431
31432# Check whether --with-extra-ldflags was given.
31433if test "${with_extra_ldflags+set}" = set; then :
31434  withval=$with_extra_ldflags;
31435fi
31436
31437
31438  EXTRA_CFLAGS="$with_extra_cflags"
31439  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31440  EXTRA_LDFLAGS="$with_extra_ldflags"
31441
31442  # Hotspot needs these set in their legacy form
31443  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31444  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31445  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31446
31447
31448
31449
31450
31451
31452
31453
31454
31455  # The global CFLAGS and LDLAGS variables are used by configure tests and
31456  # should include the extra parameters
31457  CFLAGS="$EXTRA_CFLAGS"
31458  CXXFLAGS="$EXTRA_CXXFLAGS"
31459  LDFLAGS="$EXTRA_LDFLAGS"
31460  CPPFLAGS=""
31461
31462# The sysroot cflags are needed for configure to be able to run the compilers
31463
31464  if test "x$SYSROOT" != "x"; then
31465    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31466      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31467        # Solaris Studio does not have a concept of sysroot. Instead we must
31468        # make sure the default include and lib dirs are appended to each
31469        # compile and link command line. Must also add -I-xbuiltin to enable
31470        # inlining of system functions and intrinsics.
31471        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31472        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31473            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31474            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31475      fi
31476    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31477      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31478      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31479    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31480      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31481      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31482    fi
31483    # Propagate the sysroot args to hotspot
31484    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31485    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31486    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31487    # The global CFLAGS and LDFLAGS variables need these for configure to function
31488    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31489    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31490    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31491    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31492  fi
31493
31494  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31495    # We also need -iframework<path>/System/Library/Frameworks
31496    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31497    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31498    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31499    # set this here so it doesn't have to be peppered throughout the forest
31500    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31501    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31502  fi
31503
31504
31505
31506
31507
31508# Then detect the actual binaries needed
31509
31510  # FIXME: Is this needed?
31511  ac_ext=cpp
31512ac_cpp='$CXXCPP $CPPFLAGS'
31513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31516
31517
31518  # Store the CFLAGS etc passed to the configure script.
31519  ORG_CFLAGS="$CFLAGS"
31520  ORG_CXXFLAGS="$CXXFLAGS"
31521
31522  # autoconf magic only relies on PATH, so update it if tools dir is specified
31523  OLD_PATH="$PATH"
31524
31525  # On Windows, we need to detect the visual studio installation first.
31526  # This will change the PATH, but we need to keep that new PATH even
31527  # after toolchain detection is done, since the compiler (on x86) uses
31528  # it for DLL resolution in runtime.
31529  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31530      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31531
31532  # Store path to cygwin link.exe to help excluding it when searching for
31533  # VS linker. This must be done before changing the PATH when looking for VS.
31534  # Extract the first word of "link", so it can be a program name with args.
31535set dummy link; ac_word=$2
31536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31537$as_echo_n "checking for $ac_word... " >&6; }
31538if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31539  $as_echo_n "(cached) " >&6
31540else
31541  case $CYGWIN_LINK in
31542  [\\/]* | ?:[\\/]*)
31543  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31544  ;;
31545  *)
31546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31547for as_dir in $PATH
31548do
31549  IFS=$as_save_IFS
31550  test -z "$as_dir" && as_dir=.
31551    for ac_exec_ext in '' $ac_executable_extensions; do
31552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31553    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31555    break 2
31556  fi
31557done
31558  done
31559IFS=$as_save_IFS
31560
31561  ;;
31562esac
31563fi
31564CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31565if test -n "$CYGWIN_LINK"; then
31566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31567$as_echo "$CYGWIN_LINK" >&6; }
31568else
31569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31570$as_echo "no" >&6; }
31571fi
31572
31573
31574  if test "x$CYGWIN_LINK" != x; then
31575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31576$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31577    "$CYGWIN_LINK" --version > /dev/null
31578    if test $? -eq 0 ; then
31579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31580$as_echo "yes" >&6; }
31581    else
31582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31583$as_echo "no" >&6; }
31584      # This might be the VS linker. Don't exclude it later on.
31585      CYGWIN_LINK=""
31586    fi
31587  fi
31588
31589  # First-hand choice is to locate and run the vsvars bat file.
31590
31591
31592# Check whether --with-toolchain-version was given.
31593if test "${with_toolchain_version+set}" = set; then :
31594  withval=$with_toolchain_version;
31595fi
31596
31597
31598  if test "x$with_toolchain_version" = xlist; then
31599    # List all toolchains
31600    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31601$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31602    for version in $VALID_VS_VERSIONS; do
31603      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31604      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31605    done
31606
31607    exit 0
31608  elif test "x$DEVKIT_VS_VERSION" != x; then
31609    VS_VERSION=$DEVKIT_VS_VERSION
31610    TOOLCHAIN_VERSION=$VS_VERSION
31611    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31612    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31613    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31614    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31615    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31616    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31617
31618    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31619    # can still be exported as INCLUDE for compiler invocations without
31620    # SYSROOT_CFLAGS
31621    OLDIFS="$IFS"
31622    IFS=";"
31623    for i in $DEVKIT_VS_INCLUDE; do
31624      ipath=$i
31625
31626  unix_path="$ipath"
31627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31628    windows_path=`$CYGPATH -m "$unix_path"`
31629    ipath="$windows_path"
31630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31631    windows_path=`cmd //c echo $unix_path`
31632    ipath="$windows_path"
31633  fi
31634
31635      VS_INCLUDE="$VS_INCLUDE;$ipath"
31636    done
31637    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31638    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31639    for i in $DEVKIT_VS_LIB; do
31640      libpath=$i
31641
31642  unix_path="$libpath"
31643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31644    windows_path=`$CYGPATH -m "$unix_path"`
31645    libpath="$windows_path"
31646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31647    windows_path=`cmd //c echo $unix_path`
31648    libpath="$windows_path"
31649  fi
31650
31651      VS_LIB="$VS_LIB;$libpath"
31652    done
31653    IFS="$OLDIFS"
31654
31655    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31656$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31657
31658  elif test "x$with_toolchain_version" != x; then
31659    # User override; check that it is valid
31660    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31661      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31662$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31663      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31664$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31665      as_fn_error $? "Cannot continue." "$LINENO" 5
31666    fi
31667    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31668  else
31669    # No flag given, use default
31670    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31671  fi
31672
31673  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31674
31675  VS_VERSION="$VS_VERSION"
31676  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31677  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31678  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31679  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31680
31681  # When using --with-tools-dir, assume it points to the correct and default
31682  # version of Visual Studio or that --with-toolchain-version was also set.
31683  if test "x$with_tools_dir" != x; then
31684
31685  if test "x$VS_ENV_CMD" = x; then
31686    VS_VERSION="${VS_VERSION}"
31687    VS_BASE="$with_tools_dir/../.."
31688    METHOD="--with-tools-dir"
31689
31690    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31691      VCVARSFILE="vc/bin/vcvars32.bat"
31692    else
31693      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31694    fi
31695
31696
31697  windows_path="$VS_BASE"
31698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31699    unix_path=`$CYGPATH -u "$windows_path"`
31700    VS_BASE="$unix_path"
31701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31703    VS_BASE="$unix_path"
31704  fi
31705
31706    if test -d "$VS_BASE"; then
31707      if test -f "$VS_BASE/$VCVARSFILE"; then
31708        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31709$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31710        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31711        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31712        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31713        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31714      else
31715        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31716$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31717        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31718$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31719      fi
31720    fi
31721  fi
31722
31723
31724  if test "x$VS_ENV_CMD" = x; then
31725    VS_VERSION="${VS_VERSION}"
31726    VS_BASE="$with_tools_dir/../../.."
31727    METHOD="--with-tools-dir"
31728
31729    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31730      VCVARSFILE="vc/bin/vcvars32.bat"
31731    else
31732      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31733    fi
31734
31735
31736  windows_path="$VS_BASE"
31737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31738    unix_path=`$CYGPATH -u "$windows_path"`
31739    VS_BASE="$unix_path"
31740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31742    VS_BASE="$unix_path"
31743  fi
31744
31745    if test -d "$VS_BASE"; then
31746      if test -f "$VS_BASE/$VCVARSFILE"; then
31747        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31748$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31749        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31750        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31751        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31752        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31753      else
31754        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31755$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31756        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31757$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31758      fi
31759    fi
31760  fi
31761
31762    if test "x$VS_ENV_CMD" = x; then
31763      # Having specified an argument which is incorrect will produce an instant failure;
31764      # we should not go on looking
31765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31766$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31767      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31768$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31769      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31770$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31771      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31772    fi
31773  fi
31774
31775  VS_ENV_CMD=""
31776  VS_ENV_ARGS=""
31777
31778  if test "x$VS_COMNTOOLS" != x; then
31779
31780  if test "x$VS_ENV_CMD" = x; then
31781    VS_VERSION="${VS_VERSION}"
31782    VS_BASE="$VS_COMNTOOLS/../.."
31783    METHOD="$VS_COMNTOOLS_VAR variable"
31784
31785    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31786      VCVARSFILE="vc/bin/vcvars32.bat"
31787    else
31788      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31789    fi
31790
31791
31792  windows_path="$VS_BASE"
31793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31794    unix_path=`$CYGPATH -u "$windows_path"`
31795    VS_BASE="$unix_path"
31796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31798    VS_BASE="$unix_path"
31799  fi
31800
31801    if test -d "$VS_BASE"; then
31802      if test -f "$VS_BASE/$VCVARSFILE"; then
31803        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31804$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31805        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31806        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31807        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31808        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31809      else
31810        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31811$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31812        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31813$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31814      fi
31815    fi
31816  fi
31817
31818  fi
31819  if test "x$PROGRAMFILES" != x; then
31820
31821  if test "x$VS_ENV_CMD" = x; then
31822    VS_VERSION="${VS_VERSION}"
31823    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31824    METHOD="well-known name"
31825
31826    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31827      VCVARSFILE="vc/bin/vcvars32.bat"
31828    else
31829      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31830    fi
31831
31832
31833  windows_path="$VS_BASE"
31834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31835    unix_path=`$CYGPATH -u "$windows_path"`
31836    VS_BASE="$unix_path"
31837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31839    VS_BASE="$unix_path"
31840  fi
31841
31842    if test -d "$VS_BASE"; then
31843      if test -f "$VS_BASE/$VCVARSFILE"; then
31844        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31845$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31846        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31847        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31848        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31849        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31850      else
31851        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31852$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31853        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31854$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31855      fi
31856    fi
31857  fi
31858
31859  fi
31860  # Work around the insanely named ProgramFiles(x86) env variable
31861  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31862  if test "x$PROGRAMFILES_X86" != x; then
31863
31864  if test "x$VS_ENV_CMD" = x; then
31865    VS_VERSION="${VS_VERSION}"
31866    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31867    METHOD="well-known name"
31868
31869    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31870      VCVARSFILE="vc/bin/vcvars32.bat"
31871    else
31872      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31873    fi
31874
31875
31876  windows_path="$VS_BASE"
31877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31878    unix_path=`$CYGPATH -u "$windows_path"`
31879    VS_BASE="$unix_path"
31880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31882    VS_BASE="$unix_path"
31883  fi
31884
31885    if test -d "$VS_BASE"; then
31886      if test -f "$VS_BASE/$VCVARSFILE"; then
31887        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31888$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31889        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31890        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31891        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31892        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31893      else
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31895$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31896        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31897$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31898      fi
31899    fi
31900  fi
31901
31902  fi
31903
31904  if test "x$VS_ENV_CMD" = x; then
31905    VS_VERSION="${VS_VERSION}"
31906    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31907    METHOD="well-known name"
31908
31909    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31910      VCVARSFILE="vc/bin/vcvars32.bat"
31911    else
31912      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31913    fi
31914
31915
31916  windows_path="$VS_BASE"
31917  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31918    unix_path=`$CYGPATH -u "$windows_path"`
31919    VS_BASE="$unix_path"
31920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31921    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31922    VS_BASE="$unix_path"
31923  fi
31924
31925    if test -d "$VS_BASE"; then
31926      if test -f "$VS_BASE/$VCVARSFILE"; then
31927        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31928$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31929        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31930        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31931        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31932        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31933      else
31934        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31935$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31936        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31937$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31938      fi
31939    fi
31940  fi
31941
31942
31943  if test "x$VS_ENV_CMD" = x; then
31944    VS_VERSION="${VS_VERSION}"
31945    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31946    METHOD="well-known name"
31947
31948    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31949      VCVARSFILE="vc/bin/vcvars32.bat"
31950    else
31951      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31952    fi
31953
31954
31955  windows_path="$VS_BASE"
31956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31957    unix_path=`$CYGPATH -u "$windows_path"`
31958    VS_BASE="$unix_path"
31959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31961    VS_BASE="$unix_path"
31962  fi
31963
31964    if test -d "$VS_BASE"; then
31965      if test -f "$VS_BASE/$VCVARSFILE"; then
31966        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31967$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31968        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31969        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31970        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31971        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31972      else
31973        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31974$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31975        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31976$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31977      fi
31978    fi
31979  fi
31980
31981
31982  if test "x$SDK_INSTALL_DIR" != x; then
31983    if test "x$ProgramW6432" != x; then
31984
31985  if test "x$VS_ENV_CMD" = x; then
31986    VS_VERSION="${VS_VERSION}"
31987    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31988    METHOD="well-known name"
31989
31990  windows_path="$WIN_SDK_BASE"
31991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31992    unix_path=`$CYGPATH -u "$windows_path"`
31993    WIN_SDK_BASE="$unix_path"
31994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31996    WIN_SDK_BASE="$unix_path"
31997  fi
31998
31999    if test -d "$WIN_SDK_BASE"; then
32000      # There have been cases of partial or broken SDK installations. A missing
32001      # lib dir is not going to work.
32002      if test ! -d "$WIN_SDK_BASE/lib"; then
32003        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32004$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32005        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32006$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32007      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32008        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32009$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32010        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32011        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32012          VS_ENV_ARGS="/x86"
32013        else
32014          VS_ENV_ARGS="/x64"
32015        fi
32016        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32017        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32018        # TODO: improve detection for other versions of SDK
32019        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32020      else
32021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32022$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32023        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32024$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32025      fi
32026    fi
32027  fi
32028
32029    fi
32030    if test "x$PROGRAMW6432" != x; then
32031
32032  if test "x$VS_ENV_CMD" = x; then
32033    VS_VERSION="${VS_VERSION}"
32034    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32035    METHOD="well-known name"
32036
32037  windows_path="$WIN_SDK_BASE"
32038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32039    unix_path=`$CYGPATH -u "$windows_path"`
32040    WIN_SDK_BASE="$unix_path"
32041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32043    WIN_SDK_BASE="$unix_path"
32044  fi
32045
32046    if test -d "$WIN_SDK_BASE"; then
32047      # There have been cases of partial or broken SDK installations. A missing
32048      # lib dir is not going to work.
32049      if test ! -d "$WIN_SDK_BASE/lib"; then
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32051$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32052        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32053$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32054      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32055        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32056$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32057        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32058        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32059          VS_ENV_ARGS="/x86"
32060        else
32061          VS_ENV_ARGS="/x64"
32062        fi
32063        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32064        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32065        # TODO: improve detection for other versions of SDK
32066        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32067      else
32068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32069$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32070        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32071$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32072      fi
32073    fi
32074  fi
32075
32076    fi
32077    if test "x$PROGRAMFILES" != x; then
32078
32079  if test "x$VS_ENV_CMD" = x; then
32080    VS_VERSION="${VS_VERSION}"
32081    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32082    METHOD="well-known name"
32083
32084  windows_path="$WIN_SDK_BASE"
32085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32086    unix_path=`$CYGPATH -u "$windows_path"`
32087    WIN_SDK_BASE="$unix_path"
32088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32090    WIN_SDK_BASE="$unix_path"
32091  fi
32092
32093    if test -d "$WIN_SDK_BASE"; then
32094      # There have been cases of partial or broken SDK installations. A missing
32095      # lib dir is not going to work.
32096      if test ! -d "$WIN_SDK_BASE/lib"; then
32097        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32098$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32099        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32100$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32101      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32102        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32103$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32104        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32105        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32106          VS_ENV_ARGS="/x86"
32107        else
32108          VS_ENV_ARGS="/x64"
32109        fi
32110        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32111        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32112        # TODO: improve detection for other versions of SDK
32113        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32114      else
32115        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32116$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32117        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32118$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32119      fi
32120    fi
32121  fi
32122
32123    fi
32124
32125  if test "x$VS_ENV_CMD" = x; then
32126    VS_VERSION="${VS_VERSION}"
32127    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32128    METHOD="well-known name"
32129
32130  windows_path="$WIN_SDK_BASE"
32131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32132    unix_path=`$CYGPATH -u "$windows_path"`
32133    WIN_SDK_BASE="$unix_path"
32134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32136    WIN_SDK_BASE="$unix_path"
32137  fi
32138
32139    if test -d "$WIN_SDK_BASE"; then
32140      # There have been cases of partial or broken SDK installations. A missing
32141      # lib dir is not going to work.
32142      if test ! -d "$WIN_SDK_BASE/lib"; then
32143        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32144$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32146$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32147      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32148        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32149$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32150        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32151        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32152          VS_ENV_ARGS="/x86"
32153        else
32154          VS_ENV_ARGS="/x64"
32155        fi
32156        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32157        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32158        # TODO: improve detection for other versions of SDK
32159        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32160      else
32161        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32162$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32163        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32164$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32165      fi
32166    fi
32167  fi
32168
32169
32170  if test "x$VS_ENV_CMD" = x; then
32171    VS_VERSION="${VS_VERSION}"
32172    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32173    METHOD="well-known name"
32174
32175  windows_path="$WIN_SDK_BASE"
32176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32177    unix_path=`$CYGPATH -u "$windows_path"`
32178    WIN_SDK_BASE="$unix_path"
32179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32181    WIN_SDK_BASE="$unix_path"
32182  fi
32183
32184    if test -d "$WIN_SDK_BASE"; then
32185      # There have been cases of partial or broken SDK installations. A missing
32186      # lib dir is not going to work.
32187      if test ! -d "$WIN_SDK_BASE/lib"; then
32188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32189$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32190        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32191$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32192      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32194$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32195        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32196        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32197          VS_ENV_ARGS="/x86"
32198        else
32199          VS_ENV_ARGS="/x64"
32200        fi
32201        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32202        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32203        # TODO: improve detection for other versions of SDK
32204        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32205      else
32206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32208        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32209$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32210      fi
32211    fi
32212  fi
32213
32214  fi
32215
32216    if test "x$VS_ENV_CMD" != x; then
32217      TOOLCHAIN_VERSION=$VS_VERSION
32218      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32219      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32220      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32221      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32222      # The rest of the variables are already evaled while probing
32223      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32224$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32225      break
32226    fi
32227  done
32228
32229
32230  # If we have a devkit, skip all of the below.
32231  if test "x$DEVKIT_VS_VERSION" = x; then
32232    if test "x$VS_ENV_CMD" != x; then
32233      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32234
32235  # Only process if variable expands to non-empty
32236
32237  if test "x$VS_ENV_CMD" != x; then
32238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32239
32240  # First separate the path from the arguments. This will split at the first
32241  # space.
32242  complete="$VS_ENV_CMD"
32243  path="${complete%% *}"
32244  tmp="$complete EOL"
32245  arguments="${tmp#* }"
32246
32247  # Input might be given as Windows format, start by converting to
32248  # unix format.
32249  new_path=`$CYGPATH -u "$path"`
32250
32251  # Now try to locate executable using which
32252  new_path=`$WHICH "$new_path" 2> /dev/null`
32253  # bat and cmd files are not always considered executable in cygwin causing which
32254  # to not find them
32255  if test "x$new_path" = x \
32256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32258    new_path=`$CYGPATH -u "$path"`
32259  fi
32260  if test "x$new_path" = x; then
32261    # Oops. Which didn't find the executable.
32262    # The splitting of arguments from the executable at a space might have been incorrect,
32263    # since paths with space are more likely in Windows. Give it another try with the whole
32264    # argument.
32265    path="$complete"
32266    arguments="EOL"
32267    new_path=`$CYGPATH -u "$path"`
32268    new_path=`$WHICH "$new_path" 2> /dev/null`
32269    # bat and cmd files are not always considered executable in cygwin causing which
32270    # to not find them
32271    if test "x$new_path" = x \
32272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32274      new_path=`$CYGPATH -u "$path"`
32275    fi
32276    if test "x$new_path" = x; then
32277      # It's still not found. Now this is an unrecoverable error.
32278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32279$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32280      has_space=`$ECHO "$complete" | $GREP " "`
32281      if test "x$has_space" != x; then
32282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32284      fi
32285      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32286    fi
32287  fi
32288
32289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32292  # "foo.exe" is OK but "foo" is an error.
32293  #
32294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32295  # It is also a way to make sure we got the proper file name for the real test later on.
32296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32297  if test "x$test_shortpath" = x; then
32298    # Short path failed, file does not exist as specified.
32299    # Try adding .exe or .cmd
32300    if test -f "${new_path}.exe"; then
32301      input_to_shortpath="${new_path}.exe"
32302    elif test -f "${new_path}.cmd"; then
32303      input_to_shortpath="${new_path}.cmd"
32304    else
32305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32306$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32309      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32310    fi
32311  else
32312    input_to_shortpath="$new_path"
32313  fi
32314
32315  # Call helper function which possibly converts this using DOS-style short mode.
32316  # If so, the updated path is stored in $new_path.
32317  new_path="$input_to_shortpath"
32318
32319  input_path="$input_to_shortpath"
32320  # Check if we need to convert this using DOS-style short mode. If the path
32321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32322  # take no chances and rewrite it.
32323  # Note: m4 eats our [], so we need to use [ and ] instead.
32324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32325  if test "x$has_forbidden_chars" != x; then
32326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32330      # Going to short mode and back again did indeed matter. Since short mode is
32331      # case insensitive, let's make it lowercase to improve readability.
32332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32333      # Now convert it back to Unix-style (cygpath)
32334      input_path=`$CYGPATH -u "$shortmode_path"`
32335      new_path="$input_path"
32336    fi
32337  fi
32338
32339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32340  if test "x$test_cygdrive_prefix" = x; then
32341    # As a simple fix, exclude /usr/bin since it's not a real path.
32342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32344      # a path prefixed by /cygdrive for fixpath to work.
32345      new_path="$CYGWIN_ROOT_PATH$input_path"
32346    fi
32347  fi
32348
32349  # remove trailing .exe if any
32350  new_path="${new_path/%.exe/}"
32351
32352    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32353
32354  # First separate the path from the arguments. This will split at the first
32355  # space.
32356  complete="$VS_ENV_CMD"
32357  path="${complete%% *}"
32358  tmp="$complete EOL"
32359  arguments="${tmp#* }"
32360
32361  # Input might be given as Windows format, start by converting to
32362  # unix format.
32363  new_path="$path"
32364
32365  windows_path="$new_path"
32366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32367    unix_path=`$CYGPATH -u "$windows_path"`
32368    new_path="$unix_path"
32369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32371    new_path="$unix_path"
32372  fi
32373
32374
32375  # Now try to locate executable using which
32376  new_path=`$WHICH "$new_path" 2> /dev/null`
32377
32378  if test "x$new_path" = x; then
32379    # Oops. Which didn't find the executable.
32380    # The splitting of arguments from the executable at a space might have been incorrect,
32381    # since paths with space are more likely in Windows. Give it another try with the whole
32382    # argument.
32383    path="$complete"
32384    arguments="EOL"
32385    new_path="$path"
32386
32387  windows_path="$new_path"
32388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32389    unix_path=`$CYGPATH -u "$windows_path"`
32390    new_path="$unix_path"
32391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32393    new_path="$unix_path"
32394  fi
32395
32396
32397    new_path=`$WHICH "$new_path" 2> /dev/null`
32398    # bat and cmd files are not always considered executable in MSYS causing which
32399    # to not find them
32400    if test "x$new_path" = x \
32401        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32402        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32403      new_path="$path"
32404
32405  windows_path="$new_path"
32406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32407    unix_path=`$CYGPATH -u "$windows_path"`
32408    new_path="$unix_path"
32409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32411    new_path="$unix_path"
32412  fi
32413
32414    fi
32415
32416    if test "x$new_path" = x; then
32417      # It's still not found. Now this is an unrecoverable error.
32418      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32419$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32420      has_space=`$ECHO "$complete" | $GREP " "`
32421      if test "x$has_space" != x; then
32422        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32423$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32424      fi
32425      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32426    fi
32427  fi
32428
32429  # Now new_path has a complete unix path to the binary
32430  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32431    # Keep paths in /bin as-is, but remove trailing .exe if any
32432    new_path="${new_path/%.exe/}"
32433    # Do not save /bin paths to all_fixpath_prefixes!
32434  else
32435    # Not in mixed or Windows style, start by that.
32436    new_path=`cmd //c echo $new_path`
32437
32438  input_path="$new_path"
32439  # Check if we need to convert this using DOS-style short mode. If the path
32440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32441  # take no chances and rewrite it.
32442  # Note: m4 eats our [], so we need to use [ and ] instead.
32443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32444  if test "x$has_forbidden_chars" != x; then
32445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32447  fi
32448
32449    # Output is in $new_path
32450
32451  windows_path="$new_path"
32452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32453    unix_path=`$CYGPATH -u "$windows_path"`
32454    new_path="$unix_path"
32455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32457    new_path="$unix_path"
32458  fi
32459
32460    # remove trailing .exe if any
32461    new_path="${new_path/%.exe/}"
32462
32463    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32464    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32465  fi
32466
32467    else
32468      # We're on a unix platform. Hooray! :)
32469      # First separate the path from the arguments. This will split at the first
32470      # space.
32471      complete="$VS_ENV_CMD"
32472      path="${complete%% *}"
32473      tmp="$complete EOL"
32474      arguments="${tmp#* }"
32475
32476      # Cannot rely on the command "which" here since it doesn't always work.
32477      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32478      if test -z "$is_absolute_path"; then
32479        # Path to executable is not absolute. Find it.
32480        IFS_save="$IFS"
32481        IFS=:
32482        for p in $PATH; do
32483          if test -f "$p/$path" && test -x "$p/$path"; then
32484            new_path="$p/$path"
32485            break
32486          fi
32487        done
32488        IFS="$IFS_save"
32489      else
32490        # This is an absolute path, we can use it without further modifications.
32491        new_path="$path"
32492      fi
32493
32494      if test "x$new_path" = x; then
32495        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32496$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32497        has_space=`$ECHO "$complete" | $GREP " "`
32498        if test "x$has_space" != x; then
32499          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32500$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32501        fi
32502        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32503      fi
32504    fi
32505
32506    # Now join together the path and the arguments once again
32507    if test "x$arguments" != xEOL; then
32508      new_complete="$new_path ${arguments% *}"
32509    else
32510      new_complete="$new_path"
32511    fi
32512
32513    if test "x$complete" != "x$new_complete"; then
32514      VS_ENV_CMD="$new_complete"
32515      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32516$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32517    fi
32518  fi
32519
32520
32521      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32522      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32523$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32524
32525      # We need to create a couple of temporary files.
32526      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32527      $MKDIR -p $VS_ENV_TMP_DIR
32528
32529      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32530      # Instead create a shell script which will set the relevant variables when run.
32531      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32532
32533  unix_path="$WINPATH_VS_ENV_CMD"
32534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32535    windows_path=`$CYGPATH -m "$unix_path"`
32536    WINPATH_VS_ENV_CMD="$windows_path"
32537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32538    windows_path=`cmd //c echo $unix_path`
32539    WINPATH_VS_ENV_CMD="$windows_path"
32540  fi
32541
32542      WINPATH_BASH="$BASH"
32543
32544  unix_path="$WINPATH_BASH"
32545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32546    windows_path=`$CYGPATH -m "$unix_path"`
32547    WINPATH_BASH="$windows_path"
32548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32549    windows_path=`cmd //c echo $unix_path`
32550    WINPATH_BASH="$windows_path"
32551  fi
32552
32553
32554      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32555      # script (executable by bash) that will setup the important variables.
32556      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32557      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32558      # This will end up something like:
32559      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32560      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32561      # These will end up something like:
32562      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32563      # The trailing space for everyone except PATH is no typo, but is needed due
32564      # to trailing \ in the Windows paths. These will be stripped later.
32565      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32566          >> $EXTRACT_VC_ENV_BAT_FILE
32567      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32568          >> $EXTRACT_VC_ENV_BAT_FILE
32569      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32570          >> $EXTRACT_VC_ENV_BAT_FILE
32571      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32572          >> $EXTRACT_VC_ENV_BAT_FILE
32573      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32574          >> $EXTRACT_VC_ENV_BAT_FILE
32575      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32576          >> $EXTRACT_VC_ENV_BAT_FILE
32577
32578      # Now execute the newly created bat file.
32579      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32580      # Change directory so we don't need to mess with Windows paths in redirects.
32581      cd $VS_ENV_TMP_DIR
32582      cmd /c extract-vs-env.bat | $CAT
32583      cd $CURDIR
32584
32585      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32586        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32587$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32588        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32589$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32590        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32591$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32592        as_fn_error $? "Cannot continue" "$LINENO" 5
32593      fi
32594
32595      # Now set all paths and other env variables. This will allow the rest of
32596      # the configure script to find and run the compiler in the proper way.
32597      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32598$as_echo "$as_me: Setting extracted environment variables" >&6;}
32599      . $VS_ENV_TMP_DIR/set-vs-env.sh
32600      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32601      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32602    else
32603      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32604      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32605$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32606    fi
32607  fi
32608
32609  # At this point, we should have correct variables in the environment, or we can't continue.
32610  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32611$as_echo_n "checking for Visual Studio variables... " >&6; }
32612
32613  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32614      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32615    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32616      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32617$as_echo "present but broken" >&6; }
32618      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32619    else
32620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32621$as_echo "ok" >&6; }
32622      # Remove any trailing "\" ";" and " " from the variables.
32623      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32624      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32625      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32626      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32627      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32628      # Remove any paths containing # (typically F#) as that messes up make. This
32629      # is needed if visual studio was installed with F# support.
32630      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32631
32632
32633
32634
32635
32636      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32637      OLDIFS="$IFS"
32638      IFS=";"
32639      for i in $VS_INCLUDE; do
32640        ipath=$i
32641        # Only process non-empty elements
32642        if test "x$ipath" != x; then
32643          IFS="$OLDIFS"
32644          # Check that directory exists before calling fixup_path
32645          testpath=$ipath
32646
32647  windows_path="$testpath"
32648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32649    unix_path=`$CYGPATH -u "$windows_path"`
32650    testpath="$unix_path"
32651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32652    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32653    testpath="$unix_path"
32654  fi
32655
32656          if test -d "$testpath"; then
32657
32658  # Only process if variable expands to non-empty
32659
32660  if test "x$ipath" != x; then
32661    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32662
32663  # Input might be given as Windows format, start by converting to
32664  # unix format.
32665  path="$ipath"
32666  new_path=`$CYGPATH -u "$path"`
32667
32668  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32669  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32670  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32671  # "foo.exe" is OK but "foo" is an error.
32672  #
32673  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32674  # It is also a way to make sure we got the proper file name for the real test later on.
32675  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32676  if test "x$test_shortpath" = x; then
32677    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32678$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32679    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32680  fi
32681
32682  # Call helper function which possibly converts this using DOS-style short mode.
32683  # If so, the updated path is stored in $new_path.
32684
32685  input_path="$new_path"
32686  # Check if we need to convert this using DOS-style short mode. If the path
32687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32688  # take no chances and rewrite it.
32689  # Note: m4 eats our [], so we need to use [ and ] instead.
32690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32691  if test "x$has_forbidden_chars" != x; then
32692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32693    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32694    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32695    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32696      # Going to short mode and back again did indeed matter. Since short mode is
32697      # case insensitive, let's make it lowercase to improve readability.
32698      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32699      # Now convert it back to Unix-style (cygpath)
32700      input_path=`$CYGPATH -u "$shortmode_path"`
32701      new_path="$input_path"
32702    fi
32703  fi
32704
32705  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32706  if test "x$test_cygdrive_prefix" = x; then
32707    # As a simple fix, exclude /usr/bin since it's not a real path.
32708    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32709      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32710      # a path prefixed by /cygdrive for fixpath to work.
32711      new_path="$CYGWIN_ROOT_PATH$input_path"
32712    fi
32713  fi
32714
32715
32716  if test "x$path" != "x$new_path"; then
32717    ipath="$new_path"
32718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32719$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32720  fi
32721
32722    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32723
32724  path="$ipath"
32725  has_colon=`$ECHO $path | $GREP ^.:`
32726  new_path="$path"
32727  if test "x$has_colon" = x; then
32728    # Not in mixed or Windows style, start by that.
32729    new_path=`cmd //c echo $path`
32730  fi
32731
32732
32733  input_path="$new_path"
32734  # Check if we need to convert this using DOS-style short mode. If the path
32735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32736  # take no chances and rewrite it.
32737  # Note: m4 eats our [], so we need to use [ and ] instead.
32738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32739  if test "x$has_forbidden_chars" != x; then
32740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32741    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32742  fi
32743
32744
32745  windows_path="$new_path"
32746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32747    unix_path=`$CYGPATH -u "$windows_path"`
32748    new_path="$unix_path"
32749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32750    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32751    new_path="$unix_path"
32752  fi
32753
32754  if test "x$path" != "x$new_path"; then
32755    ipath="$new_path"
32756    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32757$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32758  fi
32759
32760  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32761  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32762
32763    else
32764      # We're on a unix platform. Hooray! :)
32765      path="$ipath"
32766      has_space=`$ECHO "$path" | $GREP " "`
32767      if test "x$has_space" != x; then
32768        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32769$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32770        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32771      fi
32772
32773      # Use eval to expand a potential ~
32774      eval path="$path"
32775      if test ! -f "$path" && test ! -d "$path"; then
32776        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32777      fi
32778
32779      if test -d "$path"; then
32780        ipath="`cd "$path"; $THEPWDCMD -L`"
32781      else
32782        dir="`$DIRNAME "$path"`"
32783        base="`$BASENAME "$path"`"
32784        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32785      fi
32786    fi
32787  fi
32788
32789            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32790          fi
32791          IFS=";"
32792        fi
32793      done
32794      # Convert VS_LIB into SYSROOT_LDFLAGS
32795      for i in $VS_LIB; do
32796        libpath=$i
32797        # Only process non-empty elements
32798        if test "x$libpath" != x; then
32799          IFS="$OLDIFS"
32800          # Check that directory exists before calling fixup_path
32801          testpath=$libpath
32802
32803  windows_path="$testpath"
32804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32805    unix_path=`$CYGPATH -u "$windows_path"`
32806    testpath="$unix_path"
32807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32809    testpath="$unix_path"
32810  fi
32811
32812          if test -d "$testpath"; then
32813
32814  # Only process if variable expands to non-empty
32815
32816  if test "x$libpath" != x; then
32817    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32818
32819  # Input might be given as Windows format, start by converting to
32820  # unix format.
32821  path="$libpath"
32822  new_path=`$CYGPATH -u "$path"`
32823
32824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32827  # "foo.exe" is OK but "foo" is an error.
32828  #
32829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32830  # It is also a way to make sure we got the proper file name for the real test later on.
32831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32832  if test "x$test_shortpath" = x; then
32833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32834$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32835    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32836  fi
32837
32838  # Call helper function which possibly converts this using DOS-style short mode.
32839  # If so, the updated path is stored in $new_path.
32840
32841  input_path="$new_path"
32842  # Check if we need to convert this using DOS-style short mode. If the path
32843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32844  # take no chances and rewrite it.
32845  # Note: m4 eats our [], so we need to use [ and ] instead.
32846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32847  if test "x$has_forbidden_chars" != x; then
32848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32852      # Going to short mode and back again did indeed matter. Since short mode is
32853      # case insensitive, let's make it lowercase to improve readability.
32854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32855      # Now convert it back to Unix-style (cygpath)
32856      input_path=`$CYGPATH -u "$shortmode_path"`
32857      new_path="$input_path"
32858    fi
32859  fi
32860
32861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32862  if test "x$test_cygdrive_prefix" = x; then
32863    # As a simple fix, exclude /usr/bin since it's not a real path.
32864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32866      # a path prefixed by /cygdrive for fixpath to work.
32867      new_path="$CYGWIN_ROOT_PATH$input_path"
32868    fi
32869  fi
32870
32871
32872  if test "x$path" != "x$new_path"; then
32873    libpath="$new_path"
32874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32875$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32876  fi
32877
32878    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32879
32880  path="$libpath"
32881  has_colon=`$ECHO $path | $GREP ^.:`
32882  new_path="$path"
32883  if test "x$has_colon" = x; then
32884    # Not in mixed or Windows style, start by that.
32885    new_path=`cmd //c echo $path`
32886  fi
32887
32888
32889  input_path="$new_path"
32890  # Check if we need to convert this using DOS-style short mode. If the path
32891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32892  # take no chances and rewrite it.
32893  # Note: m4 eats our [], so we need to use [ and ] instead.
32894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32895  if test "x$has_forbidden_chars" != x; then
32896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32898  fi
32899
32900
32901  windows_path="$new_path"
32902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32903    unix_path=`$CYGPATH -u "$windows_path"`
32904    new_path="$unix_path"
32905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32907    new_path="$unix_path"
32908  fi
32909
32910  if test "x$path" != "x$new_path"; then
32911    libpath="$new_path"
32912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32913$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32914  fi
32915
32916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32918
32919    else
32920      # We're on a unix platform. Hooray! :)
32921      path="$libpath"
32922      has_space=`$ECHO "$path" | $GREP " "`
32923      if test "x$has_space" != x; then
32924        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32925$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32926        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32927      fi
32928
32929      # Use eval to expand a potential ~
32930      eval path="$path"
32931      if test ! -f "$path" && test ! -d "$path"; then
32932        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32933      fi
32934
32935      if test -d "$path"; then
32936        libpath="`cd "$path"; $THEPWDCMD -L`"
32937      else
32938        dir="`$DIRNAME "$path"`"
32939        base="`$BASENAME "$path"`"
32940        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32941      fi
32942    fi
32943  fi
32944
32945            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32946          fi
32947          IFS=";"
32948        fi
32949      done
32950      IFS="$OLDIFS"
32951    fi
32952  else
32953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32954$as_echo "not found" >&6; }
32955
32956    if test "x$VS_ENV_CMD" = x; then
32957      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32958$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32959      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32960$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32961    else
32962      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32963$as_echo "$as_me: Running the extraction script failed." >&6;}
32964    fi
32965    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32966$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32967    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32968$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32969    as_fn_error $? "Cannot continue" "$LINENO" 5
32970  fi
32971
32972    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32973    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32974    PATH="$VS_PATH"
32975    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32976    export INCLUDE="$VS_INCLUDE"
32977    export LIB="$VS_LIB"
32978  else
32979    if test "x$XCODE_VERSION_OUTPUT" != x; then
32980      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32981      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32982      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32983    else
32984      # Currently we do not define this for other toolchains. This might change as the need arise.
32985      TOOLCHAIN_VERSION=
32986    fi
32987  fi
32988
32989
32990  # For solaris we really need solaris tools, and not the GNU equivalent.
32991  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32992  # so add that to path before starting to probe.
32993  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32994  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32995    PATH="/usr/ccs/bin:$PATH"
32996  fi
32997
32998  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32999  # override all other locations.
33000  if test "x$TOOLCHAIN_PATH" != x; then
33001    PATH=$TOOLCHAIN_PATH:$PATH
33002  fi
33003
33004
33005  #
33006  # Setup the compilers (CC and CXX)
33007  #
33008
33009  COMPILER_NAME=C
33010  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33011
33012  if test "x$CC" != x; then
33013    # User has supplied compiler name already, always let that override.
33014    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33015$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33016    if test "x`basename $CC`" = "x$CC"; then
33017      # A command without a complete path is provided, search $PATH.
33018
33019      for ac_prog in $CC
33020do
33021  # Extract the first word of "$ac_prog", so it can be a program name with args.
33022set dummy $ac_prog; ac_word=$2
33023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33024$as_echo_n "checking for $ac_word... " >&6; }
33025if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33026  $as_echo_n "(cached) " >&6
33027else
33028  case $POTENTIAL_CC in
33029  [\\/]* | ?:[\\/]*)
33030  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33031  ;;
33032  *)
33033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33034for as_dir in $PATH
33035do
33036  IFS=$as_save_IFS
33037  test -z "$as_dir" && as_dir=.
33038    for ac_exec_ext in '' $ac_executable_extensions; do
33039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33040    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33042    break 2
33043  fi
33044done
33045  done
33046IFS=$as_save_IFS
33047
33048  ;;
33049esac
33050fi
33051POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33052if test -n "$POTENTIAL_CC"; then
33053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33054$as_echo "$POTENTIAL_CC" >&6; }
33055else
33056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33057$as_echo "no" >&6; }
33058fi
33059
33060
33061  test -n "$POTENTIAL_CC" && break
33062done
33063
33064      if test "x$POTENTIAL_CC" != x; then
33065        CC=$POTENTIAL_CC
33066      else
33067        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33068      fi
33069    else
33070      # Otherwise it might already be a complete path
33071      if test ! -x "$CC"; then
33072        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33073      fi
33074    fi
33075  else
33076    # No user supplied value. Locate compiler ourselves.
33077
33078    # If we are cross compiling, assume cross compilation tools follows the
33079    # cross compilation standard where they are prefixed with the autoconf
33080    # standard name for the target. For example the binary
33081    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33082    # If we are not cross compiling, then the default compiler name will be
33083    # used.
33084
33085    CC=
33086    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33087    # before checking the rest of the PATH.
33088    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33089    # step, this should not be necessary.
33090    if test -n "$TOOLCHAIN_PATH"; then
33091      PATH_save="$PATH"
33092      PATH="$TOOLCHAIN_PATH"
33093      for ac_prog in $SEARCH_LIST
33094do
33095  # Extract the first word of "$ac_prog", so it can be a program name with args.
33096set dummy $ac_prog; ac_word=$2
33097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33098$as_echo_n "checking for $ac_word... " >&6; }
33099if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33100  $as_echo_n "(cached) " >&6
33101else
33102  case $TOOLCHAIN_PATH_CC in
33103  [\\/]* | ?:[\\/]*)
33104  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33105  ;;
33106  *)
33107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33108for as_dir in $PATH
33109do
33110  IFS=$as_save_IFS
33111  test -z "$as_dir" && as_dir=.
33112    for ac_exec_ext in '' $ac_executable_extensions; do
33113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33114    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33116    break 2
33117  fi
33118done
33119  done
33120IFS=$as_save_IFS
33121
33122  ;;
33123esac
33124fi
33125TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33126if test -n "$TOOLCHAIN_PATH_CC"; then
33127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33128$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33129else
33130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33131$as_echo "no" >&6; }
33132fi
33133
33134
33135  test -n "$TOOLCHAIN_PATH_CC" && break
33136done
33137
33138      CC=$TOOLCHAIN_PATH_CC
33139      PATH="$PATH_save"
33140    fi
33141
33142    # AC_PATH_PROGS can't be run multiple times with the same variable,
33143    # so create a new name for this run.
33144    if test "x$CC" = x; then
33145      for ac_prog in $SEARCH_LIST
33146do
33147  # Extract the first word of "$ac_prog", so it can be a program name with args.
33148set dummy $ac_prog; ac_word=$2
33149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33150$as_echo_n "checking for $ac_word... " >&6; }
33151if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33152  $as_echo_n "(cached) " >&6
33153else
33154  case $POTENTIAL_CC in
33155  [\\/]* | ?:[\\/]*)
33156  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33157  ;;
33158  *)
33159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33160for as_dir in $PATH
33161do
33162  IFS=$as_save_IFS
33163  test -z "$as_dir" && as_dir=.
33164    for ac_exec_ext in '' $ac_executable_extensions; do
33165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33166    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33168    break 2
33169  fi
33170done
33171  done
33172IFS=$as_save_IFS
33173
33174  ;;
33175esac
33176fi
33177POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33178if test -n "$POTENTIAL_CC"; then
33179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33180$as_echo "$POTENTIAL_CC" >&6; }
33181else
33182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33183$as_echo "no" >&6; }
33184fi
33185
33186
33187  test -n "$POTENTIAL_CC" && break
33188done
33189
33190      CC=$POTENTIAL_CC
33191    fi
33192
33193    if test "x$CC" = x; then
33194
33195  # Print a helpful message on how to acquire the necessary build dependency.
33196  # devkit is the help tag: freetype, cups, alsa etc
33197  MISSING_DEPENDENCY=devkit
33198
33199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33200    cygwin_help $MISSING_DEPENDENCY
33201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33202    msys_help $MISSING_DEPENDENCY
33203  else
33204    PKGHANDLER_COMMAND=
33205
33206    case $PKGHANDLER in
33207      apt-get)
33208        apt_help     $MISSING_DEPENDENCY ;;
33209      yum)
33210        yum_help     $MISSING_DEPENDENCY ;;
33211      port)
33212        port_help    $MISSING_DEPENDENCY ;;
33213      pkgutil)
33214        pkgutil_help $MISSING_DEPENDENCY ;;
33215      pkgadd)
33216        pkgadd_help  $MISSING_DEPENDENCY ;;
33217    esac
33218
33219    if test "x$PKGHANDLER_COMMAND" != x; then
33220      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33221    fi
33222  fi
33223
33224      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33225    fi
33226  fi
33227
33228  # Now we have a compiler binary in CC. Make sure it's okay.
33229
33230  # Only process if variable expands to non-empty
33231
33232  if test "x$CC" != x; then
33233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33234
33235  # First separate the path from the arguments. This will split at the first
33236  # space.
33237  complete="$CC"
33238  path="${complete%% *}"
33239  tmp="$complete EOL"
33240  arguments="${tmp#* }"
33241
33242  # Input might be given as Windows format, start by converting to
33243  # unix format.
33244  new_path=`$CYGPATH -u "$path"`
33245
33246  # Now try to locate executable using which
33247  new_path=`$WHICH "$new_path" 2> /dev/null`
33248  # bat and cmd files are not always considered executable in cygwin causing which
33249  # to not find them
33250  if test "x$new_path" = x \
33251      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33252      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33253    new_path=`$CYGPATH -u "$path"`
33254  fi
33255  if test "x$new_path" = x; then
33256    # Oops. Which didn't find the executable.
33257    # The splitting of arguments from the executable at a space might have been incorrect,
33258    # since paths with space are more likely in Windows. Give it another try with the whole
33259    # argument.
33260    path="$complete"
33261    arguments="EOL"
33262    new_path=`$CYGPATH -u "$path"`
33263    new_path=`$WHICH "$new_path" 2> /dev/null`
33264    # bat and cmd files are not always considered executable in cygwin causing which
33265    # to not find them
33266    if test "x$new_path" = x \
33267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33269      new_path=`$CYGPATH -u "$path"`
33270    fi
33271    if test "x$new_path" = x; then
33272      # It's still not found. Now this is an unrecoverable error.
33273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33274$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33275      has_space=`$ECHO "$complete" | $GREP " "`
33276      if test "x$has_space" != x; then
33277        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33278$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33279      fi
33280      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33281    fi
33282  fi
33283
33284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33287  # "foo.exe" is OK but "foo" is an error.
33288  #
33289  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33290  # It is also a way to make sure we got the proper file name for the real test later on.
33291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33292  if test "x$test_shortpath" = x; then
33293    # Short path failed, file does not exist as specified.
33294    # Try adding .exe or .cmd
33295    if test -f "${new_path}.exe"; then
33296      input_to_shortpath="${new_path}.exe"
33297    elif test -f "${new_path}.cmd"; then
33298      input_to_shortpath="${new_path}.cmd"
33299    else
33300      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33301$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33302      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33303$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33304      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33305    fi
33306  else
33307    input_to_shortpath="$new_path"
33308  fi
33309
33310  # Call helper function which possibly converts this using DOS-style short mode.
33311  # If so, the updated path is stored in $new_path.
33312  new_path="$input_to_shortpath"
33313
33314  input_path="$input_to_shortpath"
33315  # Check if we need to convert this using DOS-style short mode. If the path
33316  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33317  # take no chances and rewrite it.
33318  # Note: m4 eats our [], so we need to use [ and ] instead.
33319  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33320  if test "x$has_forbidden_chars" != x; then
33321    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33322    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33323    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33324    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33325      # Going to short mode and back again did indeed matter. Since short mode is
33326      # case insensitive, let's make it lowercase to improve readability.
33327      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33328      # Now convert it back to Unix-style (cygpath)
33329      input_path=`$CYGPATH -u "$shortmode_path"`
33330      new_path="$input_path"
33331    fi
33332  fi
33333
33334  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33335  if test "x$test_cygdrive_prefix" = x; then
33336    # As a simple fix, exclude /usr/bin since it's not a real path.
33337    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33338      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33339      # a path prefixed by /cygdrive for fixpath to work.
33340      new_path="$CYGWIN_ROOT_PATH$input_path"
33341    fi
33342  fi
33343
33344  # remove trailing .exe if any
33345  new_path="${new_path/%.exe/}"
33346
33347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33348
33349  # First separate the path from the arguments. This will split at the first
33350  # space.
33351  complete="$CC"
33352  path="${complete%% *}"
33353  tmp="$complete EOL"
33354  arguments="${tmp#* }"
33355
33356  # Input might be given as Windows format, start by converting to
33357  # unix format.
33358  new_path="$path"
33359
33360  windows_path="$new_path"
33361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33362    unix_path=`$CYGPATH -u "$windows_path"`
33363    new_path="$unix_path"
33364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33366    new_path="$unix_path"
33367  fi
33368
33369
33370  # Now try to locate executable using which
33371  new_path=`$WHICH "$new_path" 2> /dev/null`
33372
33373  if test "x$new_path" = x; then
33374    # Oops. Which didn't find the executable.
33375    # The splitting of arguments from the executable at a space might have been incorrect,
33376    # since paths with space are more likely in Windows. Give it another try with the whole
33377    # argument.
33378    path="$complete"
33379    arguments="EOL"
33380    new_path="$path"
33381
33382  windows_path="$new_path"
33383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33384    unix_path=`$CYGPATH -u "$windows_path"`
33385    new_path="$unix_path"
33386  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33387    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33388    new_path="$unix_path"
33389  fi
33390
33391
33392    new_path=`$WHICH "$new_path" 2> /dev/null`
33393    # bat and cmd files are not always considered executable in MSYS causing which
33394    # to not find them
33395    if test "x$new_path" = x \
33396        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33397        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33398      new_path="$path"
33399
33400  windows_path="$new_path"
33401  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33402    unix_path=`$CYGPATH -u "$windows_path"`
33403    new_path="$unix_path"
33404  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33405    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33406    new_path="$unix_path"
33407  fi
33408
33409    fi
33410
33411    if test "x$new_path" = x; then
33412      # It's still not found. Now this is an unrecoverable error.
33413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33414$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33415      has_space=`$ECHO "$complete" | $GREP " "`
33416      if test "x$has_space" != x; then
33417        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33418$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33419      fi
33420      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33421    fi
33422  fi
33423
33424  # Now new_path has a complete unix path to the binary
33425  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33426    # Keep paths in /bin as-is, but remove trailing .exe if any
33427    new_path="${new_path/%.exe/}"
33428    # Do not save /bin paths to all_fixpath_prefixes!
33429  else
33430    # Not in mixed or Windows style, start by that.
33431    new_path=`cmd //c echo $new_path`
33432
33433  input_path="$new_path"
33434  # Check if we need to convert this using DOS-style short mode. If the path
33435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33436  # take no chances and rewrite it.
33437  # Note: m4 eats our [], so we need to use [ and ] instead.
33438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33439  if test "x$has_forbidden_chars" != x; then
33440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33442  fi
33443
33444    # Output is in $new_path
33445
33446  windows_path="$new_path"
33447  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33448    unix_path=`$CYGPATH -u "$windows_path"`
33449    new_path="$unix_path"
33450  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33451    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33452    new_path="$unix_path"
33453  fi
33454
33455    # remove trailing .exe if any
33456    new_path="${new_path/%.exe/}"
33457
33458    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33459    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33460  fi
33461
33462    else
33463      # We're on a unix platform. Hooray! :)
33464      # First separate the path from the arguments. This will split at the first
33465      # space.
33466      complete="$CC"
33467      path="${complete%% *}"
33468      tmp="$complete EOL"
33469      arguments="${tmp#* }"
33470
33471      # Cannot rely on the command "which" here since it doesn't always work.
33472      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33473      if test -z "$is_absolute_path"; then
33474        # Path to executable is not absolute. Find it.
33475        IFS_save="$IFS"
33476        IFS=:
33477        for p in $PATH; do
33478          if test -f "$p/$path" && test -x "$p/$path"; then
33479            new_path="$p/$path"
33480            break
33481          fi
33482        done
33483        IFS="$IFS_save"
33484      else
33485        # This is an absolute path, we can use it without further modifications.
33486        new_path="$path"
33487      fi
33488
33489      if test "x$new_path" = x; then
33490        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33491$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33492        has_space=`$ECHO "$complete" | $GREP " "`
33493        if test "x$has_space" != x; then
33494          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33495$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33496        fi
33497        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33498      fi
33499    fi
33500
33501    # Now join together the path and the arguments once again
33502    if test "x$arguments" != xEOL; then
33503      new_complete="$new_path ${arguments% *}"
33504    else
33505      new_complete="$new_path"
33506    fi
33507
33508    if test "x$complete" != "x$new_complete"; then
33509      CC="$new_complete"
33510      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33511$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33512    fi
33513  fi
33514
33515  TEST_COMPILER="$CC"
33516
33517  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33518$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33519  SYMLINK_ORIGINAL="$TEST_COMPILER"
33520
33521  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33522    # Follow a chain of symbolic links. Use readlink
33523    # where it exists, else fall back to horribly
33524    # complicated shell code.
33525    if test "x$READLINK_TESTED" != yes; then
33526      # On MacOSX there is a readlink tool with a different
33527      # purpose than the GNU readlink tool. Check the found readlink.
33528      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33529      if test "x$ISGNU" = x; then
33530        # A readlink that we do not know how to use.
33531        # Are there other non-GNU readlinks out there?
33532        READLINK_TESTED=yes
33533        READLINK=
33534      fi
33535    fi
33536
33537    if test "x$READLINK" != x; then
33538      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33539    else
33540      # Save the current directory for restoring afterwards
33541      STARTDIR=$PWD
33542      COUNTER=0
33543      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33544      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33545      cd $sym_link_dir
33546      # Use -P flag to resolve symlinks in directories.
33547      cd `$THEPWDCMD -P`
33548      sym_link_dir=`$THEPWDCMD -P`
33549      # Resolve file symlinks
33550      while test $COUNTER -lt 20; do
33551        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33552        if test "x$ISLINK" == x; then
33553          # This is not a symbolic link! We are done!
33554          break
33555        fi
33556        # Again resolve directory symlinks since the target of the just found
33557        # link could be in a different directory
33558        cd `$DIRNAME $ISLINK`
33559        sym_link_dir=`$THEPWDCMD -P`
33560        sym_link_file=`$BASENAME $ISLINK`
33561        let COUNTER=COUNTER+1
33562      done
33563      cd $STARTDIR
33564      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33565    fi
33566  fi
33567
33568  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33569    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33570$as_echo "no symlink" >&6; }
33571  else
33572    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33573$as_echo "$SYMLINK_ORIGINAL" >&6; }
33574
33575    # We can't handle ccache by gcc wrappers, since we need to know if we're
33576    # using ccache. Instead ccache usage must be controlled by a configure option.
33577    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33578    if test "x$COMPILER_BASENAME" = "xccache"; then
33579      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33580$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33581      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33582    fi
33583  fi
33584
33585
33586  COMPILER=$CC
33587  COMPILER_NAME=$COMPILER_NAME
33588
33589  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33590    # cc -V output typically looks like
33591    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33592    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33593    # Check that this is likely to be the Solaris Studio cc.
33594    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33595    if test $? -ne 0; then
33596      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33597      { $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
33598$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33599      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33600$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33601      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33602$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33603      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33604    fi
33605    # Remove usage instructions (if present), and
33606    # collapse compiler output into a single line
33607    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33608        $SED -e 's/ *[Uu]sage:.*//'`
33609    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33610        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33611  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33612    # xlc -qversion output typically looks like
33613    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33614    #     Version: 11.01.0000.0015
33615    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33616    # Check that this is likely to be the IBM XL C compiler.
33617    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33618    if test $? -ne 0; then
33619      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33620      { $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
33621$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33622      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33623$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33624      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33625$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33626      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33627    fi
33628    # Collapse compiler output into a single line
33629    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33630    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33631        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33632  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33633    # There is no specific version flag, but all output starts with a version string.
33634    # First line typically looks something like:
33635    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33636    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33637    # Check that this is likely to be Microsoft CL.EXE.
33638    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33639    if test $? -ne 0; then
33640      { $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
33641$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33642      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33643$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33644      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33645    fi
33646    # Collapse compiler output into a single line
33647    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33648    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33649        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33650  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33651    # gcc --version output typically looks like
33652    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33653    #     Copyright (C) 2013 Free Software Foundation, Inc.
33654    #     This is free software; see the source for copying conditions.  There is NO
33655    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33656    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33657    # Check that this is likely to be GCC.
33658    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33659    if test $? -ne 0; then
33660      { $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
33661$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33662      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33663$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33664      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33665    fi
33666    # Remove Copyright and legalese from version string, and
33667    # collapse into a single line
33668    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33669        $SED -e 's/ *Copyright .*//'`
33670    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33671        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33672  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33673    # clang --version output typically looks like
33674    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33675    #    clang version 3.3 (tags/RELEASE_33/final)
33676    # or
33677    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33678    #    Target: x86_64-pc-linux-gnu
33679    #    Thread model: posix
33680    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33681    # Check that this is likely to be clang
33682    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33683    if test $? -ne 0; then
33684      { $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
33685$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33686      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33687$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33688      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33689    fi
33690    # Collapse compiler output into a single line
33691    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33692    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33693        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33694  else
33695      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33696  fi
33697  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33698  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33699  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33700  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33701
33702  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33703$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33704
33705
33706  # Now that we have resolved CC ourself, let autoconf have its go at it
33707  ac_ext=c
33708ac_cpp='$CPP $CPPFLAGS'
33709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33711ac_compiler_gnu=$ac_cv_c_compiler_gnu
33712if test -n "$ac_tool_prefix"; then
33713  for ac_prog in $CC
33714  do
33715    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33716set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33718$as_echo_n "checking for $ac_word... " >&6; }
33719if ${ac_cv_prog_CC+:} false; then :
33720  $as_echo_n "(cached) " >&6
33721else
33722  if test -n "$CC"; then
33723  ac_cv_prog_CC="$CC" # Let the user override the test.
33724else
33725as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33726for as_dir in $PATH
33727do
33728  IFS=$as_save_IFS
33729  test -z "$as_dir" && as_dir=.
33730    for ac_exec_ext in '' $ac_executable_extensions; do
33731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33732    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33734    break 2
33735  fi
33736done
33737  done
33738IFS=$as_save_IFS
33739
33740fi
33741fi
33742CC=$ac_cv_prog_CC
33743if test -n "$CC"; then
33744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33745$as_echo "$CC" >&6; }
33746else
33747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33748$as_echo "no" >&6; }
33749fi
33750
33751
33752    test -n "$CC" && break
33753  done
33754fi
33755if test -z "$CC"; then
33756  ac_ct_CC=$CC
33757  for ac_prog in $CC
33758do
33759  # Extract the first word of "$ac_prog", so it can be a program name with args.
33760set dummy $ac_prog; ac_word=$2
33761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33762$as_echo_n "checking for $ac_word... " >&6; }
33763if ${ac_cv_prog_ac_ct_CC+:} false; then :
33764  $as_echo_n "(cached) " >&6
33765else
33766  if test -n "$ac_ct_CC"; then
33767  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33768else
33769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33770for as_dir in $PATH
33771do
33772  IFS=$as_save_IFS
33773  test -z "$as_dir" && as_dir=.
33774    for ac_exec_ext in '' $ac_executable_extensions; do
33775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33776    ac_cv_prog_ac_ct_CC="$ac_prog"
33777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33778    break 2
33779  fi
33780done
33781  done
33782IFS=$as_save_IFS
33783
33784fi
33785fi
33786ac_ct_CC=$ac_cv_prog_ac_ct_CC
33787if test -n "$ac_ct_CC"; then
33788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33789$as_echo "$ac_ct_CC" >&6; }
33790else
33791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33792$as_echo "no" >&6; }
33793fi
33794
33795
33796  test -n "$ac_ct_CC" && break
33797done
33798
33799  if test "x$ac_ct_CC" = x; then
33800    CC=""
33801  else
33802    case $cross_compiling:$ac_tool_warned in
33803yes:)
33804{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33805$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33806ac_tool_warned=yes ;;
33807esac
33808    CC=$ac_ct_CC
33809  fi
33810fi
33811
33812
33813test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33814$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33815as_fn_error $? "no acceptable C compiler found in \$PATH
33816See \`config.log' for more details" "$LINENO" 5; }
33817
33818# Provide some information about the compiler.
33819$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33820set X $ac_compile
33821ac_compiler=$2
33822for ac_option in --version -v -V -qversion; do
33823  { { ac_try="$ac_compiler $ac_option >&5"
33824case "(($ac_try" in
33825  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33826  *) ac_try_echo=$ac_try;;
33827esac
33828eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33829$as_echo "$ac_try_echo"; } >&5
33830  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33831  ac_status=$?
33832  if test -s conftest.err; then
33833    sed '10a\
33834... rest of stderr output deleted ...
33835         10q' conftest.err >conftest.er1
33836    cat conftest.er1 >&5
33837  fi
33838  rm -f conftest.er1 conftest.err
33839  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33840  test $ac_status = 0; }
33841done
33842
33843cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33844/* end confdefs.h.  */
33845
33846int
33847main ()
33848{
33849
33850  ;
33851  return 0;
33852}
33853_ACEOF
33854ac_clean_files_save=$ac_clean_files
33855ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33856# Try to create an executable without -o first, disregard a.out.
33857# It will help us diagnose broken compilers, and finding out an intuition
33858# of exeext.
33859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33860$as_echo_n "checking whether the C compiler works... " >&6; }
33861ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33862
33863# The possible output files:
33864ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33865
33866ac_rmfiles=
33867for ac_file in $ac_files
33868do
33869  case $ac_file in
33870    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33871    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33872  esac
33873done
33874rm -f $ac_rmfiles
33875
33876if { { ac_try="$ac_link_default"
33877case "(($ac_try" in
33878  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33879  *) ac_try_echo=$ac_try;;
33880esac
33881eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33882$as_echo "$ac_try_echo"; } >&5
33883  (eval "$ac_link_default") 2>&5
33884  ac_status=$?
33885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33886  test $ac_status = 0; }; then :
33887  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33888# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33889# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33890# so that the user can short-circuit this test for compilers unknown to
33891# Autoconf.
33892for ac_file in $ac_files ''
33893do
33894  test -f "$ac_file" || continue
33895  case $ac_file in
33896    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33897	;;
33898    [ab].out )
33899	# We found the default executable, but exeext='' is most
33900	# certainly right.
33901	break;;
33902    *.* )
33903	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33904	then :; else
33905	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33906	fi
33907	# We set ac_cv_exeext here because the later test for it is not
33908	# safe: cross compilers may not add the suffix if given an `-o'
33909	# argument, so we may need to know it at that point already.
33910	# Even if this section looks crufty: it has the advantage of
33911	# actually working.
33912	break;;
33913    * )
33914	break;;
33915  esac
33916done
33917test "$ac_cv_exeext" = no && ac_cv_exeext=
33918
33919else
33920  ac_file=''
33921fi
33922if test -z "$ac_file"; then :
33923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33924$as_echo "no" >&6; }
33925$as_echo "$as_me: failed program was:" >&5
33926sed 's/^/| /' conftest.$ac_ext >&5
33927
33928{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33930as_fn_error 77 "C compiler cannot create executables
33931See \`config.log' for more details" "$LINENO" 5; }
33932else
33933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33934$as_echo "yes" >&6; }
33935fi
33936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33937$as_echo_n "checking for C compiler default output file name... " >&6; }
33938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33939$as_echo "$ac_file" >&6; }
33940ac_exeext=$ac_cv_exeext
33941
33942rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33943ac_clean_files=$ac_clean_files_save
33944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33945$as_echo_n "checking for suffix of executables... " >&6; }
33946if { { ac_try="$ac_link"
33947case "(($ac_try" in
33948  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33949  *) ac_try_echo=$ac_try;;
33950esac
33951eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33952$as_echo "$ac_try_echo"; } >&5
33953  (eval "$ac_link") 2>&5
33954  ac_status=$?
33955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33956  test $ac_status = 0; }; then :
33957  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33958# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33959# work properly (i.e., refer to `conftest.exe'), while it won't with
33960# `rm'.
33961for ac_file in conftest.exe conftest conftest.*; do
33962  test -f "$ac_file" || continue
33963  case $ac_file in
33964    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33965    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33966	  break;;
33967    * ) break;;
33968  esac
33969done
33970else
33971  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33972$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33973as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33974See \`config.log' for more details" "$LINENO" 5; }
33975fi
33976rm -f conftest conftest$ac_cv_exeext
33977{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33978$as_echo "$ac_cv_exeext" >&6; }
33979
33980rm -f conftest.$ac_ext
33981EXEEXT=$ac_cv_exeext
33982ac_exeext=$EXEEXT
33983cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33984/* end confdefs.h.  */
33985#include <stdio.h>
33986int
33987main ()
33988{
33989FILE *f = fopen ("conftest.out", "w");
33990 return ferror (f) || fclose (f) != 0;
33991
33992  ;
33993  return 0;
33994}
33995_ACEOF
33996ac_clean_files="$ac_clean_files conftest.out"
33997# Check that the compiler produces executables we can run.  If not, either
33998# the compiler is broken, or we cross compile.
33999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34000$as_echo_n "checking whether we are cross compiling... " >&6; }
34001if test "$cross_compiling" != yes; then
34002  { { ac_try="$ac_link"
34003case "(($ac_try" in
34004  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34005  *) ac_try_echo=$ac_try;;
34006esac
34007eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34008$as_echo "$ac_try_echo"; } >&5
34009  (eval "$ac_link") 2>&5
34010  ac_status=$?
34011  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34012  test $ac_status = 0; }
34013  if { ac_try='./conftest$ac_cv_exeext'
34014  { { case "(($ac_try" in
34015  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34016  *) ac_try_echo=$ac_try;;
34017esac
34018eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34019$as_echo "$ac_try_echo"; } >&5
34020  (eval "$ac_try") 2>&5
34021  ac_status=$?
34022  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34023  test $ac_status = 0; }; }; then
34024    cross_compiling=no
34025  else
34026    if test "$cross_compiling" = maybe; then
34027	cross_compiling=yes
34028    else
34029	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34030$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34031as_fn_error $? "cannot run C compiled programs.
34032If you meant to cross compile, use \`--host'.
34033See \`config.log' for more details" "$LINENO" 5; }
34034    fi
34035  fi
34036fi
34037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34038$as_echo "$cross_compiling" >&6; }
34039
34040rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34041ac_clean_files=$ac_clean_files_save
34042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34043$as_echo_n "checking for suffix of object files... " >&6; }
34044if ${ac_cv_objext+:} false; then :
34045  $as_echo_n "(cached) " >&6
34046else
34047  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34048/* end confdefs.h.  */
34049
34050int
34051main ()
34052{
34053
34054  ;
34055  return 0;
34056}
34057_ACEOF
34058rm -f conftest.o conftest.obj
34059if { { ac_try="$ac_compile"
34060case "(($ac_try" in
34061  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34062  *) ac_try_echo=$ac_try;;
34063esac
34064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34065$as_echo "$ac_try_echo"; } >&5
34066  (eval "$ac_compile") 2>&5
34067  ac_status=$?
34068  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34069  test $ac_status = 0; }; then :
34070  for ac_file in conftest.o conftest.obj conftest.*; do
34071  test -f "$ac_file" || continue;
34072  case $ac_file in
34073    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34074    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34075       break;;
34076  esac
34077done
34078else
34079  $as_echo "$as_me: failed program was:" >&5
34080sed 's/^/| /' conftest.$ac_ext >&5
34081
34082{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34083$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34084as_fn_error $? "cannot compute suffix of object files: cannot compile
34085See \`config.log' for more details" "$LINENO" 5; }
34086fi
34087rm -f conftest.$ac_cv_objext conftest.$ac_ext
34088fi
34089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34090$as_echo "$ac_cv_objext" >&6; }
34091OBJEXT=$ac_cv_objext
34092ac_objext=$OBJEXT
34093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34094$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34095if ${ac_cv_c_compiler_gnu+:} false; then :
34096  $as_echo_n "(cached) " >&6
34097else
34098  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34099/* end confdefs.h.  */
34100
34101int
34102main ()
34103{
34104#ifndef __GNUC__
34105       choke me
34106#endif
34107
34108  ;
34109  return 0;
34110}
34111_ACEOF
34112if ac_fn_c_try_compile "$LINENO"; then :
34113  ac_compiler_gnu=yes
34114else
34115  ac_compiler_gnu=no
34116fi
34117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34118ac_cv_c_compiler_gnu=$ac_compiler_gnu
34119
34120fi
34121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34122$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34123if test $ac_compiler_gnu = yes; then
34124  GCC=yes
34125else
34126  GCC=
34127fi
34128ac_test_CFLAGS=${CFLAGS+set}
34129ac_save_CFLAGS=$CFLAGS
34130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34131$as_echo_n "checking whether $CC accepts -g... " >&6; }
34132if ${ac_cv_prog_cc_g+:} false; then :
34133  $as_echo_n "(cached) " >&6
34134else
34135  ac_save_c_werror_flag=$ac_c_werror_flag
34136   ac_c_werror_flag=yes
34137   ac_cv_prog_cc_g=no
34138   CFLAGS="-g"
34139   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34140/* end confdefs.h.  */
34141
34142int
34143main ()
34144{
34145
34146  ;
34147  return 0;
34148}
34149_ACEOF
34150if ac_fn_c_try_compile "$LINENO"; then :
34151  ac_cv_prog_cc_g=yes
34152else
34153  CFLAGS=""
34154      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34155/* end confdefs.h.  */
34156
34157int
34158main ()
34159{
34160
34161  ;
34162  return 0;
34163}
34164_ACEOF
34165if ac_fn_c_try_compile "$LINENO"; then :
34166
34167else
34168  ac_c_werror_flag=$ac_save_c_werror_flag
34169	 CFLAGS="-g"
34170	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34171/* end confdefs.h.  */
34172
34173int
34174main ()
34175{
34176
34177  ;
34178  return 0;
34179}
34180_ACEOF
34181if ac_fn_c_try_compile "$LINENO"; then :
34182  ac_cv_prog_cc_g=yes
34183fi
34184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34185fi
34186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34187fi
34188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34189   ac_c_werror_flag=$ac_save_c_werror_flag
34190fi
34191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34192$as_echo "$ac_cv_prog_cc_g" >&6; }
34193if test "$ac_test_CFLAGS" = set; then
34194  CFLAGS=$ac_save_CFLAGS
34195elif test $ac_cv_prog_cc_g = yes; then
34196  if test "$GCC" = yes; then
34197    CFLAGS="-g -O2"
34198  else
34199    CFLAGS="-g"
34200  fi
34201else
34202  if test "$GCC" = yes; then
34203    CFLAGS="-O2"
34204  else
34205    CFLAGS=
34206  fi
34207fi
34208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34209$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34210if ${ac_cv_prog_cc_c89+:} false; then :
34211  $as_echo_n "(cached) " >&6
34212else
34213  ac_cv_prog_cc_c89=no
34214ac_save_CC=$CC
34215cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34216/* end confdefs.h.  */
34217#include <stdarg.h>
34218#include <stdio.h>
34219struct stat;
34220/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34221struct buf { int x; };
34222FILE * (*rcsopen) (struct buf *, struct stat *, int);
34223static char *e (p, i)
34224     char **p;
34225     int i;
34226{
34227  return p[i];
34228}
34229static char *f (char * (*g) (char **, int), char **p, ...)
34230{
34231  char *s;
34232  va_list v;
34233  va_start (v,p);
34234  s = g (p, va_arg (v,int));
34235  va_end (v);
34236  return s;
34237}
34238
34239/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34240   function prototypes and stuff, but not '\xHH' hex character constants.
34241   These don't provoke an error unfortunately, instead are silently treated
34242   as 'x'.  The following induces an error, until -std is added to get
34243   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34244   array size at least.  It's necessary to write '\x00'==0 to get something
34245   that's true only with -std.  */
34246int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34247
34248/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34249   inside strings and character constants.  */
34250#define FOO(x) 'x'
34251int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34252
34253int test (int i, double x);
34254struct s1 {int (*f) (int a);};
34255struct s2 {int (*f) (double a);};
34256int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34257int argc;
34258char **argv;
34259int
34260main ()
34261{
34262return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34263  ;
34264  return 0;
34265}
34266_ACEOF
34267for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34268	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34269do
34270  CC="$ac_save_CC $ac_arg"
34271  if ac_fn_c_try_compile "$LINENO"; then :
34272  ac_cv_prog_cc_c89=$ac_arg
34273fi
34274rm -f core conftest.err conftest.$ac_objext
34275  test "x$ac_cv_prog_cc_c89" != "xno" && break
34276done
34277rm -f conftest.$ac_ext
34278CC=$ac_save_CC
34279
34280fi
34281# AC_CACHE_VAL
34282case "x$ac_cv_prog_cc_c89" in
34283  x)
34284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34285$as_echo "none needed" >&6; } ;;
34286  xno)
34287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34288$as_echo "unsupported" >&6; } ;;
34289  *)
34290    CC="$CC $ac_cv_prog_cc_c89"
34291    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34292$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34293esac
34294if test "x$ac_cv_prog_cc_c89" != xno; then :
34295
34296fi
34297
34298ac_ext=cpp
34299ac_cpp='$CXXCPP $CPPFLAGS'
34300ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34301ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34302ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34303
34304
34305
34306  COMPILER_NAME=C++
34307  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34308
34309  if test "x$CXX" != x; then
34310    # User has supplied compiler name already, always let that override.
34311    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34312$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34313    if test "x`basename $CXX`" = "x$CXX"; then
34314      # A command without a complete path is provided, search $PATH.
34315
34316      for ac_prog in $CXX
34317do
34318  # Extract the first word of "$ac_prog", so it can be a program name with args.
34319set dummy $ac_prog; ac_word=$2
34320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34321$as_echo_n "checking for $ac_word... " >&6; }
34322if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34323  $as_echo_n "(cached) " >&6
34324else
34325  case $POTENTIAL_CXX in
34326  [\\/]* | ?:[\\/]*)
34327  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34328  ;;
34329  *)
34330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34331for as_dir in $PATH
34332do
34333  IFS=$as_save_IFS
34334  test -z "$as_dir" && as_dir=.
34335    for ac_exec_ext in '' $ac_executable_extensions; do
34336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34337    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34339    break 2
34340  fi
34341done
34342  done
34343IFS=$as_save_IFS
34344
34345  ;;
34346esac
34347fi
34348POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34349if test -n "$POTENTIAL_CXX"; then
34350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34351$as_echo "$POTENTIAL_CXX" >&6; }
34352else
34353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34354$as_echo "no" >&6; }
34355fi
34356
34357
34358  test -n "$POTENTIAL_CXX" && break
34359done
34360
34361      if test "x$POTENTIAL_CXX" != x; then
34362        CXX=$POTENTIAL_CXX
34363      else
34364        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34365      fi
34366    else
34367      # Otherwise it might already be a complete path
34368      if test ! -x "$CXX"; then
34369        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34370      fi
34371    fi
34372  else
34373    # No user supplied value. Locate compiler ourselves.
34374
34375    # If we are cross compiling, assume cross compilation tools follows the
34376    # cross compilation standard where they are prefixed with the autoconf
34377    # standard name for the target. For example the binary
34378    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34379    # If we are not cross compiling, then the default compiler name will be
34380    # used.
34381
34382    CXX=
34383    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34384    # before checking the rest of the PATH.
34385    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34386    # step, this should not be necessary.
34387    if test -n "$TOOLCHAIN_PATH"; then
34388      PATH_save="$PATH"
34389      PATH="$TOOLCHAIN_PATH"
34390      for ac_prog in $SEARCH_LIST
34391do
34392  # Extract the first word of "$ac_prog", so it can be a program name with args.
34393set dummy $ac_prog; ac_word=$2
34394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34395$as_echo_n "checking for $ac_word... " >&6; }
34396if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34397  $as_echo_n "(cached) " >&6
34398else
34399  case $TOOLCHAIN_PATH_CXX in
34400  [\\/]* | ?:[\\/]*)
34401  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34402  ;;
34403  *)
34404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34405for as_dir in $PATH
34406do
34407  IFS=$as_save_IFS
34408  test -z "$as_dir" && as_dir=.
34409    for ac_exec_ext in '' $ac_executable_extensions; do
34410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34411    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34413    break 2
34414  fi
34415done
34416  done
34417IFS=$as_save_IFS
34418
34419  ;;
34420esac
34421fi
34422TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34423if test -n "$TOOLCHAIN_PATH_CXX"; then
34424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34425$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34426else
34427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34428$as_echo "no" >&6; }
34429fi
34430
34431
34432  test -n "$TOOLCHAIN_PATH_CXX" && break
34433done
34434
34435      CXX=$TOOLCHAIN_PATH_CXX
34436      PATH="$PATH_save"
34437    fi
34438
34439    # AC_PATH_PROGS can't be run multiple times with the same variable,
34440    # so create a new name for this run.
34441    if test "x$CXX" = x; then
34442      for ac_prog in $SEARCH_LIST
34443do
34444  # Extract the first word of "$ac_prog", so it can be a program name with args.
34445set dummy $ac_prog; ac_word=$2
34446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34447$as_echo_n "checking for $ac_word... " >&6; }
34448if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34449  $as_echo_n "(cached) " >&6
34450else
34451  case $POTENTIAL_CXX in
34452  [\\/]* | ?:[\\/]*)
34453  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34454  ;;
34455  *)
34456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34457for as_dir in $PATH
34458do
34459  IFS=$as_save_IFS
34460  test -z "$as_dir" && as_dir=.
34461    for ac_exec_ext in '' $ac_executable_extensions; do
34462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34463    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34465    break 2
34466  fi
34467done
34468  done
34469IFS=$as_save_IFS
34470
34471  ;;
34472esac
34473fi
34474POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34475if test -n "$POTENTIAL_CXX"; then
34476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34477$as_echo "$POTENTIAL_CXX" >&6; }
34478else
34479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34480$as_echo "no" >&6; }
34481fi
34482
34483
34484  test -n "$POTENTIAL_CXX" && break
34485done
34486
34487      CXX=$POTENTIAL_CXX
34488    fi
34489
34490    if test "x$CXX" = x; then
34491
34492  # Print a helpful message on how to acquire the necessary build dependency.
34493  # devkit is the help tag: freetype, cups, alsa etc
34494  MISSING_DEPENDENCY=devkit
34495
34496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34497    cygwin_help $MISSING_DEPENDENCY
34498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34499    msys_help $MISSING_DEPENDENCY
34500  else
34501    PKGHANDLER_COMMAND=
34502
34503    case $PKGHANDLER in
34504      apt-get)
34505        apt_help     $MISSING_DEPENDENCY ;;
34506      yum)
34507        yum_help     $MISSING_DEPENDENCY ;;
34508      port)
34509        port_help    $MISSING_DEPENDENCY ;;
34510      pkgutil)
34511        pkgutil_help $MISSING_DEPENDENCY ;;
34512      pkgadd)
34513        pkgadd_help  $MISSING_DEPENDENCY ;;
34514    esac
34515
34516    if test "x$PKGHANDLER_COMMAND" != x; then
34517      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34518    fi
34519  fi
34520
34521      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34522    fi
34523  fi
34524
34525  # Now we have a compiler binary in CXX. Make sure it's okay.
34526
34527  # Only process if variable expands to non-empty
34528
34529  if test "x$CXX" != x; then
34530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34531
34532  # First separate the path from the arguments. This will split at the first
34533  # space.
34534  complete="$CXX"
34535  path="${complete%% *}"
34536  tmp="$complete EOL"
34537  arguments="${tmp#* }"
34538
34539  # Input might be given as Windows format, start by converting to
34540  # unix format.
34541  new_path=`$CYGPATH -u "$path"`
34542
34543  # Now try to locate executable using which
34544  new_path=`$WHICH "$new_path" 2> /dev/null`
34545  # bat and cmd files are not always considered executable in cygwin causing which
34546  # to not find them
34547  if test "x$new_path" = x \
34548      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34549      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34550    new_path=`$CYGPATH -u "$path"`
34551  fi
34552  if test "x$new_path" = x; then
34553    # Oops. Which didn't find the executable.
34554    # The splitting of arguments from the executable at a space might have been incorrect,
34555    # since paths with space are more likely in Windows. Give it another try with the whole
34556    # argument.
34557    path="$complete"
34558    arguments="EOL"
34559    new_path=`$CYGPATH -u "$path"`
34560    new_path=`$WHICH "$new_path" 2> /dev/null`
34561    # bat and cmd files are not always considered executable in cygwin causing which
34562    # to not find them
34563    if test "x$new_path" = x \
34564        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34565        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34566      new_path=`$CYGPATH -u "$path"`
34567    fi
34568    if test "x$new_path" = x; then
34569      # It's still not found. Now this is an unrecoverable error.
34570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34571$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34572      has_space=`$ECHO "$complete" | $GREP " "`
34573      if test "x$has_space" != x; then
34574        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34575$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34576      fi
34577      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34578    fi
34579  fi
34580
34581  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34582  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34583  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34584  # "foo.exe" is OK but "foo" is an error.
34585  #
34586  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34587  # It is also a way to make sure we got the proper file name for the real test later on.
34588  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34589  if test "x$test_shortpath" = x; then
34590    # Short path failed, file does not exist as specified.
34591    # Try adding .exe or .cmd
34592    if test -f "${new_path}.exe"; then
34593      input_to_shortpath="${new_path}.exe"
34594    elif test -f "${new_path}.cmd"; then
34595      input_to_shortpath="${new_path}.cmd"
34596    else
34597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34598$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34599      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34600$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34601      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34602    fi
34603  else
34604    input_to_shortpath="$new_path"
34605  fi
34606
34607  # Call helper function which possibly converts this using DOS-style short mode.
34608  # If so, the updated path is stored in $new_path.
34609  new_path="$input_to_shortpath"
34610
34611  input_path="$input_to_shortpath"
34612  # Check if we need to convert this using DOS-style short mode. If the path
34613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34614  # take no chances and rewrite it.
34615  # Note: m4 eats our [], so we need to use [ and ] instead.
34616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34617  if test "x$has_forbidden_chars" != x; then
34618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34622      # Going to short mode and back again did indeed matter. Since short mode is
34623      # case insensitive, let's make it lowercase to improve readability.
34624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34625      # Now convert it back to Unix-style (cygpath)
34626      input_path=`$CYGPATH -u "$shortmode_path"`
34627      new_path="$input_path"
34628    fi
34629  fi
34630
34631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34632  if test "x$test_cygdrive_prefix" = x; then
34633    # As a simple fix, exclude /usr/bin since it's not a real path.
34634    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34636      # a path prefixed by /cygdrive for fixpath to work.
34637      new_path="$CYGWIN_ROOT_PATH$input_path"
34638    fi
34639  fi
34640
34641  # remove trailing .exe if any
34642  new_path="${new_path/%.exe/}"
34643
34644    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34645
34646  # First separate the path from the arguments. This will split at the first
34647  # space.
34648  complete="$CXX"
34649  path="${complete%% *}"
34650  tmp="$complete EOL"
34651  arguments="${tmp#* }"
34652
34653  # Input might be given as Windows format, start by converting to
34654  # unix format.
34655  new_path="$path"
34656
34657  windows_path="$new_path"
34658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34659    unix_path=`$CYGPATH -u "$windows_path"`
34660    new_path="$unix_path"
34661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34663    new_path="$unix_path"
34664  fi
34665
34666
34667  # Now try to locate executable using which
34668  new_path=`$WHICH "$new_path" 2> /dev/null`
34669
34670  if test "x$new_path" = x; then
34671    # Oops. Which didn't find the executable.
34672    # The splitting of arguments from the executable at a space might have been incorrect,
34673    # since paths with space are more likely in Windows. Give it another try with the whole
34674    # argument.
34675    path="$complete"
34676    arguments="EOL"
34677    new_path="$path"
34678
34679  windows_path="$new_path"
34680  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34681    unix_path=`$CYGPATH -u "$windows_path"`
34682    new_path="$unix_path"
34683  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34684    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34685    new_path="$unix_path"
34686  fi
34687
34688
34689    new_path=`$WHICH "$new_path" 2> /dev/null`
34690    # bat and cmd files are not always considered executable in MSYS causing which
34691    # to not find them
34692    if test "x$new_path" = x \
34693        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34694        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34695      new_path="$path"
34696
34697  windows_path="$new_path"
34698  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34699    unix_path=`$CYGPATH -u "$windows_path"`
34700    new_path="$unix_path"
34701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34702    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34703    new_path="$unix_path"
34704  fi
34705
34706    fi
34707
34708    if test "x$new_path" = x; then
34709      # It's still not found. Now this is an unrecoverable error.
34710      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34711$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34712      has_space=`$ECHO "$complete" | $GREP " "`
34713      if test "x$has_space" != x; then
34714        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34715$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34716      fi
34717      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34718    fi
34719  fi
34720
34721  # Now new_path has a complete unix path to the binary
34722  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34723    # Keep paths in /bin as-is, but remove trailing .exe if any
34724    new_path="${new_path/%.exe/}"
34725    # Do not save /bin paths to all_fixpath_prefixes!
34726  else
34727    # Not in mixed or Windows style, start by that.
34728    new_path=`cmd //c echo $new_path`
34729
34730  input_path="$new_path"
34731  # Check if we need to convert this using DOS-style short mode. If the path
34732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34733  # take no chances and rewrite it.
34734  # Note: m4 eats our [], so we need to use [ and ] instead.
34735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34736  if test "x$has_forbidden_chars" != x; then
34737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34739  fi
34740
34741    # Output is in $new_path
34742
34743  windows_path="$new_path"
34744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34745    unix_path=`$CYGPATH -u "$windows_path"`
34746    new_path="$unix_path"
34747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34749    new_path="$unix_path"
34750  fi
34751
34752    # remove trailing .exe if any
34753    new_path="${new_path/%.exe/}"
34754
34755    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34756    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34757  fi
34758
34759    else
34760      # We're on a unix platform. Hooray! :)
34761      # First separate the path from the arguments. This will split at the first
34762      # space.
34763      complete="$CXX"
34764      path="${complete%% *}"
34765      tmp="$complete EOL"
34766      arguments="${tmp#* }"
34767
34768      # Cannot rely on the command "which" here since it doesn't always work.
34769      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34770      if test -z "$is_absolute_path"; then
34771        # Path to executable is not absolute. Find it.
34772        IFS_save="$IFS"
34773        IFS=:
34774        for p in $PATH; do
34775          if test -f "$p/$path" && test -x "$p/$path"; then
34776            new_path="$p/$path"
34777            break
34778          fi
34779        done
34780        IFS="$IFS_save"
34781      else
34782        # This is an absolute path, we can use it without further modifications.
34783        new_path="$path"
34784      fi
34785
34786      if test "x$new_path" = x; then
34787        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34788$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34789        has_space=`$ECHO "$complete" | $GREP " "`
34790        if test "x$has_space" != x; then
34791          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34792$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34793        fi
34794        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34795      fi
34796    fi
34797
34798    # Now join together the path and the arguments once again
34799    if test "x$arguments" != xEOL; then
34800      new_complete="$new_path ${arguments% *}"
34801    else
34802      new_complete="$new_path"
34803    fi
34804
34805    if test "x$complete" != "x$new_complete"; then
34806      CXX="$new_complete"
34807      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34808$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34809    fi
34810  fi
34811
34812  TEST_COMPILER="$CXX"
34813
34814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34815$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34816  SYMLINK_ORIGINAL="$TEST_COMPILER"
34817
34818  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34819    # Follow a chain of symbolic links. Use readlink
34820    # where it exists, else fall back to horribly
34821    # complicated shell code.
34822    if test "x$READLINK_TESTED" != yes; then
34823      # On MacOSX there is a readlink tool with a different
34824      # purpose than the GNU readlink tool. Check the found readlink.
34825      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34826      if test "x$ISGNU" = x; then
34827        # A readlink that we do not know how to use.
34828        # Are there other non-GNU readlinks out there?
34829        READLINK_TESTED=yes
34830        READLINK=
34831      fi
34832    fi
34833
34834    if test "x$READLINK" != x; then
34835      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34836    else
34837      # Save the current directory for restoring afterwards
34838      STARTDIR=$PWD
34839      COUNTER=0
34840      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34841      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34842      cd $sym_link_dir
34843      # Use -P flag to resolve symlinks in directories.
34844      cd `$THEPWDCMD -P`
34845      sym_link_dir=`$THEPWDCMD -P`
34846      # Resolve file symlinks
34847      while test $COUNTER -lt 20; do
34848        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34849        if test "x$ISLINK" == x; then
34850          # This is not a symbolic link! We are done!
34851          break
34852        fi
34853        # Again resolve directory symlinks since the target of the just found
34854        # link could be in a different directory
34855        cd `$DIRNAME $ISLINK`
34856        sym_link_dir=`$THEPWDCMD -P`
34857        sym_link_file=`$BASENAME $ISLINK`
34858        let COUNTER=COUNTER+1
34859      done
34860      cd $STARTDIR
34861      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34862    fi
34863  fi
34864
34865  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34867$as_echo "no symlink" >&6; }
34868  else
34869    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34870$as_echo "$SYMLINK_ORIGINAL" >&6; }
34871
34872    # We can't handle ccache by gcc wrappers, since we need to know if we're
34873    # using ccache. Instead ccache usage must be controlled by a configure option.
34874    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34875    if test "x$COMPILER_BASENAME" = "xccache"; then
34876      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34877$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34878      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34879    fi
34880  fi
34881
34882
34883  COMPILER=$CXX
34884  COMPILER_NAME=$COMPILER_NAME
34885
34886  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34887    # cc -V output typically looks like
34888    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34889    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34890    # Check that this is likely to be the Solaris Studio cc.
34891    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34892    if test $? -ne 0; then
34893      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34894      { $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
34895$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34897$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34898      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34899$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34900      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34901    fi
34902    # Remove usage instructions (if present), and
34903    # collapse compiler output into a single line
34904    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34905        $SED -e 's/ *[Uu]sage:.*//'`
34906    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34907        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34908  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34909    # xlc -qversion output typically looks like
34910    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34911    #     Version: 11.01.0000.0015
34912    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34913    # Check that this is likely to be the IBM XL C compiler.
34914    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34915    if test $? -ne 0; then
34916      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34917      { $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
34918$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34919      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34920$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34922$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34924    fi
34925    # Collapse compiler output into a single line
34926    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34927    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34928        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34929  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34930    # There is no specific version flag, but all output starts with a version string.
34931    # First line typically looks something like:
34932    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34933    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34934    # Check that this is likely to be Microsoft CL.EXE.
34935    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34936    if test $? -ne 0; then
34937      { $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
34938$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34939      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34940$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34941      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34942    fi
34943    # Collapse compiler output into a single line
34944    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34945    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34946        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34947  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34948    # gcc --version output typically looks like
34949    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34950    #     Copyright (C) 2013 Free Software Foundation, Inc.
34951    #     This is free software; see the source for copying conditions.  There is NO
34952    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34953    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34954    # Check that this is likely to be GCC.
34955    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34956    if test $? -ne 0; then
34957      { $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
34958$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34959      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34960$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34961      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34962    fi
34963    # Remove Copyright and legalese from version string, and
34964    # collapse into a single line
34965    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34966        $SED -e 's/ *Copyright .*//'`
34967    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34968        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34969  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34970    # clang --version output typically looks like
34971    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34972    #    clang version 3.3 (tags/RELEASE_33/final)
34973    # or
34974    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34975    #    Target: x86_64-pc-linux-gnu
34976    #    Thread model: posix
34977    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34978    # Check that this is likely to be clang
34979    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34980    if test $? -ne 0; then
34981      { $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
34982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34984$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34985      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34986    fi
34987    # Collapse compiler output into a single line
34988    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34989    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34990        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34991  else
34992      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34993  fi
34994  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34995  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34996  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34997  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34998
34999  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35000$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35001
35002
35003  # Now that we have resolved CXX ourself, let autoconf have its go at it
35004  ac_ext=cpp
35005ac_cpp='$CXXCPP $CPPFLAGS'
35006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35009if test -z "$CXX"; then
35010  if test -n "$CCC"; then
35011    CXX=$CCC
35012  else
35013    if test -n "$ac_tool_prefix"; then
35014  for ac_prog in $CXX
35015  do
35016    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35017set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35019$as_echo_n "checking for $ac_word... " >&6; }
35020if ${ac_cv_prog_CXX+:} false; then :
35021  $as_echo_n "(cached) " >&6
35022else
35023  if test -n "$CXX"; then
35024  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35025else
35026as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35027for as_dir in $PATH
35028do
35029  IFS=$as_save_IFS
35030  test -z "$as_dir" && as_dir=.
35031    for ac_exec_ext in '' $ac_executable_extensions; do
35032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35033    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35035    break 2
35036  fi
35037done
35038  done
35039IFS=$as_save_IFS
35040
35041fi
35042fi
35043CXX=$ac_cv_prog_CXX
35044if test -n "$CXX"; then
35045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35046$as_echo "$CXX" >&6; }
35047else
35048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35049$as_echo "no" >&6; }
35050fi
35051
35052
35053    test -n "$CXX" && break
35054  done
35055fi
35056if test -z "$CXX"; then
35057  ac_ct_CXX=$CXX
35058  for ac_prog in $CXX
35059do
35060  # Extract the first word of "$ac_prog", so it can be a program name with args.
35061set dummy $ac_prog; ac_word=$2
35062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35063$as_echo_n "checking for $ac_word... " >&6; }
35064if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35065  $as_echo_n "(cached) " >&6
35066else
35067  if test -n "$ac_ct_CXX"; then
35068  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35069else
35070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35071for as_dir in $PATH
35072do
35073  IFS=$as_save_IFS
35074  test -z "$as_dir" && as_dir=.
35075    for ac_exec_ext in '' $ac_executable_extensions; do
35076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35077    ac_cv_prog_ac_ct_CXX="$ac_prog"
35078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35079    break 2
35080  fi
35081done
35082  done
35083IFS=$as_save_IFS
35084
35085fi
35086fi
35087ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35088if test -n "$ac_ct_CXX"; then
35089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35090$as_echo "$ac_ct_CXX" >&6; }
35091else
35092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35093$as_echo "no" >&6; }
35094fi
35095
35096
35097  test -n "$ac_ct_CXX" && break
35098done
35099
35100  if test "x$ac_ct_CXX" = x; then
35101    CXX="g++"
35102  else
35103    case $cross_compiling:$ac_tool_warned in
35104yes:)
35105{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35106$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35107ac_tool_warned=yes ;;
35108esac
35109    CXX=$ac_ct_CXX
35110  fi
35111fi
35112
35113  fi
35114fi
35115# Provide some information about the compiler.
35116$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35117set X $ac_compile
35118ac_compiler=$2
35119for ac_option in --version -v -V -qversion; do
35120  { { ac_try="$ac_compiler $ac_option >&5"
35121case "(($ac_try" in
35122  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35123  *) ac_try_echo=$ac_try;;
35124esac
35125eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35126$as_echo "$ac_try_echo"; } >&5
35127  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35128  ac_status=$?
35129  if test -s conftest.err; then
35130    sed '10a\
35131... rest of stderr output deleted ...
35132         10q' conftest.err >conftest.er1
35133    cat conftest.er1 >&5
35134  fi
35135  rm -f conftest.er1 conftest.err
35136  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35137  test $ac_status = 0; }
35138done
35139
35140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35141$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35142if ${ac_cv_cxx_compiler_gnu+:} false; then :
35143  $as_echo_n "(cached) " >&6
35144else
35145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35146/* end confdefs.h.  */
35147
35148int
35149main ()
35150{
35151#ifndef __GNUC__
35152       choke me
35153#endif
35154
35155  ;
35156  return 0;
35157}
35158_ACEOF
35159if ac_fn_cxx_try_compile "$LINENO"; then :
35160  ac_compiler_gnu=yes
35161else
35162  ac_compiler_gnu=no
35163fi
35164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35165ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35166
35167fi
35168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35169$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35170if test $ac_compiler_gnu = yes; then
35171  GXX=yes
35172else
35173  GXX=
35174fi
35175ac_test_CXXFLAGS=${CXXFLAGS+set}
35176ac_save_CXXFLAGS=$CXXFLAGS
35177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35178$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35179if ${ac_cv_prog_cxx_g+:} false; then :
35180  $as_echo_n "(cached) " >&6
35181else
35182  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35183   ac_cxx_werror_flag=yes
35184   ac_cv_prog_cxx_g=no
35185   CXXFLAGS="-g"
35186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35187/* end confdefs.h.  */
35188
35189int
35190main ()
35191{
35192
35193  ;
35194  return 0;
35195}
35196_ACEOF
35197if ac_fn_cxx_try_compile "$LINENO"; then :
35198  ac_cv_prog_cxx_g=yes
35199else
35200  CXXFLAGS=""
35201      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35202/* end confdefs.h.  */
35203
35204int
35205main ()
35206{
35207
35208  ;
35209  return 0;
35210}
35211_ACEOF
35212if ac_fn_cxx_try_compile "$LINENO"; then :
35213
35214else
35215  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35216	 CXXFLAGS="-g"
35217	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35218/* end confdefs.h.  */
35219
35220int
35221main ()
35222{
35223
35224  ;
35225  return 0;
35226}
35227_ACEOF
35228if ac_fn_cxx_try_compile "$LINENO"; then :
35229  ac_cv_prog_cxx_g=yes
35230fi
35231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35232fi
35233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35234fi
35235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35236   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35237fi
35238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35239$as_echo "$ac_cv_prog_cxx_g" >&6; }
35240if test "$ac_test_CXXFLAGS" = set; then
35241  CXXFLAGS=$ac_save_CXXFLAGS
35242elif test $ac_cv_prog_cxx_g = yes; then
35243  if test "$GXX" = yes; then
35244    CXXFLAGS="-g -O2"
35245  else
35246    CXXFLAGS="-g"
35247  fi
35248else
35249  if test "$GXX" = yes; then
35250    CXXFLAGS="-O2"
35251  else
35252    CXXFLAGS=
35253  fi
35254fi
35255ac_ext=cpp
35256ac_cpp='$CXXCPP $CPPFLAGS'
35257ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35258ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35259ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35260
35261
35262  # This is the compiler version number on the form X.Y[.Z]
35263
35264
35265
35266
35267  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35268    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35269$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35270    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35271$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35272  fi
35273
35274  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35275  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35276    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35277$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35278  fi
35279
35280  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35281    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35282$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35283  fi
35284
35285  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35286
35287
35288  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35289
35290
35291
35292
35293
35294
35295
35296
35297
35298
35299
35300
35301
35302
35303
35304
35305
35306
35307
35308
35309
35310
35311
35312
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338    # Execute function body
35339
35340  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35341  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35342
35343  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35344    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35345  fi
35346
35347  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35348    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35349  fi
35350
35351  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35352  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35353
35354  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35355    :
35356
35357  else
35358    :
35359
35360          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
35361$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35362
35363
35364  fi
35365
35366
35367
35368
35369
35370
35371
35372
35373
35374
35375
35376
35377
35378
35379  fi
35380
35381  #
35382  # Setup the preprocessor (CPP and CXXCPP)
35383  #
35384  ac_ext=c
35385ac_cpp='$CPP $CPPFLAGS'
35386ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35387ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35388ac_compiler_gnu=$ac_cv_c_compiler_gnu
35389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35390$as_echo_n "checking how to run the C preprocessor... " >&6; }
35391# On Suns, sometimes $CPP names a directory.
35392if test -n "$CPP" && test -d "$CPP"; then
35393  CPP=
35394fi
35395if test -z "$CPP"; then
35396  if ${ac_cv_prog_CPP+:} false; then :
35397  $as_echo_n "(cached) " >&6
35398else
35399      # Double quotes because CPP needs to be expanded
35400    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35401    do
35402      ac_preproc_ok=false
35403for ac_c_preproc_warn_flag in '' yes
35404do
35405  # Use a header file that comes with gcc, so configuring glibc
35406  # with a fresh cross-compiler works.
35407  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35408  # <limits.h> exists even on freestanding compilers.
35409  # On the NeXT, cc -E runs the code through the compiler's parser,
35410  # not just through cpp. "Syntax error" is here to catch this case.
35411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35412/* end confdefs.h.  */
35413#ifdef __STDC__
35414# include <limits.h>
35415#else
35416# include <assert.h>
35417#endif
35418		     Syntax error
35419_ACEOF
35420if ac_fn_c_try_cpp "$LINENO"; then :
35421
35422else
35423  # Broken: fails on valid input.
35424continue
35425fi
35426rm -f conftest.err conftest.i conftest.$ac_ext
35427
35428  # OK, works on sane cases.  Now check whether nonexistent headers
35429  # can be detected and how.
35430  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35431/* end confdefs.h.  */
35432#include <ac_nonexistent.h>
35433_ACEOF
35434if ac_fn_c_try_cpp "$LINENO"; then :
35435  # Broken: success on invalid input.
35436continue
35437else
35438  # Passes both tests.
35439ac_preproc_ok=:
35440break
35441fi
35442rm -f conftest.err conftest.i conftest.$ac_ext
35443
35444done
35445# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35446rm -f conftest.i conftest.err conftest.$ac_ext
35447if $ac_preproc_ok; then :
35448  break
35449fi
35450
35451    done
35452    ac_cv_prog_CPP=$CPP
35453
35454fi
35455  CPP=$ac_cv_prog_CPP
35456else
35457  ac_cv_prog_CPP=$CPP
35458fi
35459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35460$as_echo "$CPP" >&6; }
35461ac_preproc_ok=false
35462for ac_c_preproc_warn_flag in '' yes
35463do
35464  # Use a header file that comes with gcc, so configuring glibc
35465  # with a fresh cross-compiler works.
35466  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35467  # <limits.h> exists even on freestanding compilers.
35468  # On the NeXT, cc -E runs the code through the compiler's parser,
35469  # not just through cpp. "Syntax error" is here to catch this case.
35470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35471/* end confdefs.h.  */
35472#ifdef __STDC__
35473# include <limits.h>
35474#else
35475# include <assert.h>
35476#endif
35477		     Syntax error
35478_ACEOF
35479if ac_fn_c_try_cpp "$LINENO"; then :
35480
35481else
35482  # Broken: fails on valid input.
35483continue
35484fi
35485rm -f conftest.err conftest.i conftest.$ac_ext
35486
35487  # OK, works on sane cases.  Now check whether nonexistent headers
35488  # can be detected and how.
35489  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35490/* end confdefs.h.  */
35491#include <ac_nonexistent.h>
35492_ACEOF
35493if ac_fn_c_try_cpp "$LINENO"; then :
35494  # Broken: success on invalid input.
35495continue
35496else
35497  # Passes both tests.
35498ac_preproc_ok=:
35499break
35500fi
35501rm -f conftest.err conftest.i conftest.$ac_ext
35502
35503done
35504# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35505rm -f conftest.i conftest.err conftest.$ac_ext
35506if $ac_preproc_ok; then :
35507
35508else
35509  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35511as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35512See \`config.log' for more details" "$LINENO" 5; }
35513fi
35514
35515ac_ext=cpp
35516ac_cpp='$CXXCPP $CPPFLAGS'
35517ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35518ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35519ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35520
35521
35522  # Only process if variable expands to non-empty
35523
35524  if test "x$CPP" != x; then
35525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35526
35527  # First separate the path from the arguments. This will split at the first
35528  # space.
35529  complete="$CPP"
35530  path="${complete%% *}"
35531  tmp="$complete EOL"
35532  arguments="${tmp#* }"
35533
35534  # Input might be given as Windows format, start by converting to
35535  # unix format.
35536  new_path=`$CYGPATH -u "$path"`
35537
35538  # Now try to locate executable using which
35539  new_path=`$WHICH "$new_path" 2> /dev/null`
35540  # bat and cmd files are not always considered executable in cygwin causing which
35541  # to not find them
35542  if test "x$new_path" = x \
35543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35545    new_path=`$CYGPATH -u "$path"`
35546  fi
35547  if test "x$new_path" = x; then
35548    # Oops. Which didn't find the executable.
35549    # The splitting of arguments from the executable at a space might have been incorrect,
35550    # since paths with space are more likely in Windows. Give it another try with the whole
35551    # argument.
35552    path="$complete"
35553    arguments="EOL"
35554    new_path=`$CYGPATH -u "$path"`
35555    new_path=`$WHICH "$new_path" 2> /dev/null`
35556    # bat and cmd files are not always considered executable in cygwin causing which
35557    # to not find them
35558    if test "x$new_path" = x \
35559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35561      new_path=`$CYGPATH -u "$path"`
35562    fi
35563    if test "x$new_path" = x; then
35564      # It's still not found. Now this is an unrecoverable error.
35565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35566$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35567      has_space=`$ECHO "$complete" | $GREP " "`
35568      if test "x$has_space" != x; then
35569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35571      fi
35572      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35573    fi
35574  fi
35575
35576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35579  # "foo.exe" is OK but "foo" is an error.
35580  #
35581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35582  # It is also a way to make sure we got the proper file name for the real test later on.
35583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35584  if test "x$test_shortpath" = x; then
35585    # Short path failed, file does not exist as specified.
35586    # Try adding .exe or .cmd
35587    if test -f "${new_path}.exe"; then
35588      input_to_shortpath="${new_path}.exe"
35589    elif test -f "${new_path}.cmd"; then
35590      input_to_shortpath="${new_path}.cmd"
35591    else
35592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35593$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35596      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35597    fi
35598  else
35599    input_to_shortpath="$new_path"
35600  fi
35601
35602  # Call helper function which possibly converts this using DOS-style short mode.
35603  # If so, the updated path is stored in $new_path.
35604  new_path="$input_to_shortpath"
35605
35606  input_path="$input_to_shortpath"
35607  # Check if we need to convert this using DOS-style short mode. If the path
35608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35609  # take no chances and rewrite it.
35610  # Note: m4 eats our [], so we need to use [ and ] instead.
35611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35612  if test "x$has_forbidden_chars" != x; then
35613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35617      # Going to short mode and back again did indeed matter. Since short mode is
35618      # case insensitive, let's make it lowercase to improve readability.
35619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35620      # Now convert it back to Unix-style (cygpath)
35621      input_path=`$CYGPATH -u "$shortmode_path"`
35622      new_path="$input_path"
35623    fi
35624  fi
35625
35626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35627  if test "x$test_cygdrive_prefix" = x; then
35628    # As a simple fix, exclude /usr/bin since it's not a real path.
35629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35631      # a path prefixed by /cygdrive for fixpath to work.
35632      new_path="$CYGWIN_ROOT_PATH$input_path"
35633    fi
35634  fi
35635
35636  # remove trailing .exe if any
35637  new_path="${new_path/%.exe/}"
35638
35639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35640
35641  # First separate the path from the arguments. This will split at the first
35642  # space.
35643  complete="$CPP"
35644  path="${complete%% *}"
35645  tmp="$complete EOL"
35646  arguments="${tmp#* }"
35647
35648  # Input might be given as Windows format, start by converting to
35649  # unix format.
35650  new_path="$path"
35651
35652  windows_path="$new_path"
35653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35654    unix_path=`$CYGPATH -u "$windows_path"`
35655    new_path="$unix_path"
35656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35658    new_path="$unix_path"
35659  fi
35660
35661
35662  # Now try to locate executable using which
35663  new_path=`$WHICH "$new_path" 2> /dev/null`
35664
35665  if test "x$new_path" = x; then
35666    # Oops. Which didn't find the executable.
35667    # The splitting of arguments from the executable at a space might have been incorrect,
35668    # since paths with space are more likely in Windows. Give it another try with the whole
35669    # argument.
35670    path="$complete"
35671    arguments="EOL"
35672    new_path="$path"
35673
35674  windows_path="$new_path"
35675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35676    unix_path=`$CYGPATH -u "$windows_path"`
35677    new_path="$unix_path"
35678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35680    new_path="$unix_path"
35681  fi
35682
35683
35684    new_path=`$WHICH "$new_path" 2> /dev/null`
35685    # bat and cmd files are not always considered executable in MSYS causing which
35686    # to not find them
35687    if test "x$new_path" = x \
35688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35690      new_path="$path"
35691
35692  windows_path="$new_path"
35693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35694    unix_path=`$CYGPATH -u "$windows_path"`
35695    new_path="$unix_path"
35696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35698    new_path="$unix_path"
35699  fi
35700
35701    fi
35702
35703    if test "x$new_path" = x; then
35704      # It's still not found. Now this is an unrecoverable error.
35705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35706$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35707      has_space=`$ECHO "$complete" | $GREP " "`
35708      if test "x$has_space" != x; then
35709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35711      fi
35712      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35713    fi
35714  fi
35715
35716  # Now new_path has a complete unix path to the binary
35717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35718    # Keep paths in /bin as-is, but remove trailing .exe if any
35719    new_path="${new_path/%.exe/}"
35720    # Do not save /bin paths to all_fixpath_prefixes!
35721  else
35722    # Not in mixed or Windows style, start by that.
35723    new_path=`cmd //c echo $new_path`
35724
35725  input_path="$new_path"
35726  # Check if we need to convert this using DOS-style short mode. If the path
35727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35728  # take no chances and rewrite it.
35729  # Note: m4 eats our [], so we need to use [ and ] instead.
35730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35731  if test "x$has_forbidden_chars" != x; then
35732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35734  fi
35735
35736    # Output is in $new_path
35737
35738  windows_path="$new_path"
35739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35740    unix_path=`$CYGPATH -u "$windows_path"`
35741    new_path="$unix_path"
35742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35744    new_path="$unix_path"
35745  fi
35746
35747    # remove trailing .exe if any
35748    new_path="${new_path/%.exe/}"
35749
35750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35752  fi
35753
35754    else
35755      # We're on a unix platform. Hooray! :)
35756      # First separate the path from the arguments. This will split at the first
35757      # space.
35758      complete="$CPP"
35759      path="${complete%% *}"
35760      tmp="$complete EOL"
35761      arguments="${tmp#* }"
35762
35763      # Cannot rely on the command "which" here since it doesn't always work.
35764      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35765      if test -z "$is_absolute_path"; then
35766        # Path to executable is not absolute. Find it.
35767        IFS_save="$IFS"
35768        IFS=:
35769        for p in $PATH; do
35770          if test -f "$p/$path" && test -x "$p/$path"; then
35771            new_path="$p/$path"
35772            break
35773          fi
35774        done
35775        IFS="$IFS_save"
35776      else
35777        # This is an absolute path, we can use it without further modifications.
35778        new_path="$path"
35779      fi
35780
35781      if test "x$new_path" = x; then
35782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35783$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35784        has_space=`$ECHO "$complete" | $GREP " "`
35785        if test "x$has_space" != x; then
35786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35788        fi
35789        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35790      fi
35791    fi
35792
35793    # Now join together the path and the arguments once again
35794    if test "x$arguments" != xEOL; then
35795      new_complete="$new_path ${arguments% *}"
35796    else
35797      new_complete="$new_path"
35798    fi
35799
35800    if test "x$complete" != "x$new_complete"; then
35801      CPP="$new_complete"
35802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35803$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35804    fi
35805  fi
35806
35807  ac_ext=cpp
35808ac_cpp='$CXXCPP $CPPFLAGS'
35809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35813$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35814if test -z "$CXXCPP"; then
35815  if ${ac_cv_prog_CXXCPP+:} false; then :
35816  $as_echo_n "(cached) " >&6
35817else
35818      # Double quotes because CXXCPP needs to be expanded
35819    for CXXCPP in "$CXX -E" "/lib/cpp"
35820    do
35821      ac_preproc_ok=false
35822for ac_cxx_preproc_warn_flag in '' yes
35823do
35824  # Use a header file that comes with gcc, so configuring glibc
35825  # with a fresh cross-compiler works.
35826  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35827  # <limits.h> exists even on freestanding compilers.
35828  # On the NeXT, cc -E runs the code through the compiler's parser,
35829  # not just through cpp. "Syntax error" is here to catch this case.
35830  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35831/* end confdefs.h.  */
35832#ifdef __STDC__
35833# include <limits.h>
35834#else
35835# include <assert.h>
35836#endif
35837		     Syntax error
35838_ACEOF
35839if ac_fn_cxx_try_cpp "$LINENO"; then :
35840
35841else
35842  # Broken: fails on valid input.
35843continue
35844fi
35845rm -f conftest.err conftest.i conftest.$ac_ext
35846
35847  # OK, works on sane cases.  Now check whether nonexistent headers
35848  # can be detected and how.
35849  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35850/* end confdefs.h.  */
35851#include <ac_nonexistent.h>
35852_ACEOF
35853if ac_fn_cxx_try_cpp "$LINENO"; then :
35854  # Broken: success on invalid input.
35855continue
35856else
35857  # Passes both tests.
35858ac_preproc_ok=:
35859break
35860fi
35861rm -f conftest.err conftest.i conftest.$ac_ext
35862
35863done
35864# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35865rm -f conftest.i conftest.err conftest.$ac_ext
35866if $ac_preproc_ok; then :
35867  break
35868fi
35869
35870    done
35871    ac_cv_prog_CXXCPP=$CXXCPP
35872
35873fi
35874  CXXCPP=$ac_cv_prog_CXXCPP
35875else
35876  ac_cv_prog_CXXCPP=$CXXCPP
35877fi
35878{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35879$as_echo "$CXXCPP" >&6; }
35880ac_preproc_ok=false
35881for ac_cxx_preproc_warn_flag in '' yes
35882do
35883  # Use a header file that comes with gcc, so configuring glibc
35884  # with a fresh cross-compiler works.
35885  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35886  # <limits.h> exists even on freestanding compilers.
35887  # On the NeXT, cc -E runs the code through the compiler's parser,
35888  # not just through cpp. "Syntax error" is here to catch this case.
35889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35890/* end confdefs.h.  */
35891#ifdef __STDC__
35892# include <limits.h>
35893#else
35894# include <assert.h>
35895#endif
35896		     Syntax error
35897_ACEOF
35898if ac_fn_cxx_try_cpp "$LINENO"; then :
35899
35900else
35901  # Broken: fails on valid input.
35902continue
35903fi
35904rm -f conftest.err conftest.i conftest.$ac_ext
35905
35906  # OK, works on sane cases.  Now check whether nonexistent headers
35907  # can be detected and how.
35908  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35909/* end confdefs.h.  */
35910#include <ac_nonexistent.h>
35911_ACEOF
35912if ac_fn_cxx_try_cpp "$LINENO"; then :
35913  # Broken: success on invalid input.
35914continue
35915else
35916  # Passes both tests.
35917ac_preproc_ok=:
35918break
35919fi
35920rm -f conftest.err conftest.i conftest.$ac_ext
35921
35922done
35923# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35924rm -f conftest.i conftest.err conftest.$ac_ext
35925if $ac_preproc_ok; then :
35926
35927else
35928  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35929$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35930as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35931See \`config.log' for more details" "$LINENO" 5; }
35932fi
35933
35934ac_ext=cpp
35935ac_cpp='$CXXCPP $CPPFLAGS'
35936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35939
35940
35941  # Only process if variable expands to non-empty
35942
35943  if test "x$CXXCPP" != x; then
35944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35945
35946  # First separate the path from the arguments. This will split at the first
35947  # space.
35948  complete="$CXXCPP"
35949  path="${complete%% *}"
35950  tmp="$complete EOL"
35951  arguments="${tmp#* }"
35952
35953  # Input might be given as Windows format, start by converting to
35954  # unix format.
35955  new_path=`$CYGPATH -u "$path"`
35956
35957  # Now try to locate executable using which
35958  new_path=`$WHICH "$new_path" 2> /dev/null`
35959  # bat and cmd files are not always considered executable in cygwin causing which
35960  # to not find them
35961  if test "x$new_path" = x \
35962      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35963      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35964    new_path=`$CYGPATH -u "$path"`
35965  fi
35966  if test "x$new_path" = x; then
35967    # Oops. Which didn't find the executable.
35968    # The splitting of arguments from the executable at a space might have been incorrect,
35969    # since paths with space are more likely in Windows. Give it another try with the whole
35970    # argument.
35971    path="$complete"
35972    arguments="EOL"
35973    new_path=`$CYGPATH -u "$path"`
35974    new_path=`$WHICH "$new_path" 2> /dev/null`
35975    # bat and cmd files are not always considered executable in cygwin causing which
35976    # to not find them
35977    if test "x$new_path" = x \
35978        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35979        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35980      new_path=`$CYGPATH -u "$path"`
35981    fi
35982    if test "x$new_path" = x; then
35983      # It's still not found. Now this is an unrecoverable error.
35984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35985$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35986      has_space=`$ECHO "$complete" | $GREP " "`
35987      if test "x$has_space" != x; then
35988        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35989$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35990      fi
35991      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35992    fi
35993  fi
35994
35995  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35996  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35997  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35998  # "foo.exe" is OK but "foo" is an error.
35999  #
36000  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36001  # It is also a way to make sure we got the proper file name for the real test later on.
36002  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36003  if test "x$test_shortpath" = x; then
36004    # Short path failed, file does not exist as specified.
36005    # Try adding .exe or .cmd
36006    if test -f "${new_path}.exe"; then
36007      input_to_shortpath="${new_path}.exe"
36008    elif test -f "${new_path}.cmd"; then
36009      input_to_shortpath="${new_path}.cmd"
36010    else
36011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36012$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36013      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36014$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36015      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36016    fi
36017  else
36018    input_to_shortpath="$new_path"
36019  fi
36020
36021  # Call helper function which possibly converts this using DOS-style short mode.
36022  # If so, the updated path is stored in $new_path.
36023  new_path="$input_to_shortpath"
36024
36025  input_path="$input_to_shortpath"
36026  # Check if we need to convert this using DOS-style short mode. If the path
36027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36028  # take no chances and rewrite it.
36029  # Note: m4 eats our [], so we need to use [ and ] instead.
36030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36031  if test "x$has_forbidden_chars" != x; then
36032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36033    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36034    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36035    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36036      # Going to short mode and back again did indeed matter. Since short mode is
36037      # case insensitive, let's make it lowercase to improve readability.
36038      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36039      # Now convert it back to Unix-style (cygpath)
36040      input_path=`$CYGPATH -u "$shortmode_path"`
36041      new_path="$input_path"
36042    fi
36043  fi
36044
36045  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36046  if test "x$test_cygdrive_prefix" = x; then
36047    # As a simple fix, exclude /usr/bin since it's not a real path.
36048    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36049      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36050      # a path prefixed by /cygdrive for fixpath to work.
36051      new_path="$CYGWIN_ROOT_PATH$input_path"
36052    fi
36053  fi
36054
36055  # remove trailing .exe if any
36056  new_path="${new_path/%.exe/}"
36057
36058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36059
36060  # First separate the path from the arguments. This will split at the first
36061  # space.
36062  complete="$CXXCPP"
36063  path="${complete%% *}"
36064  tmp="$complete EOL"
36065  arguments="${tmp#* }"
36066
36067  # Input might be given as Windows format, start by converting to
36068  # unix format.
36069  new_path="$path"
36070
36071  windows_path="$new_path"
36072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36073    unix_path=`$CYGPATH -u "$windows_path"`
36074    new_path="$unix_path"
36075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36077    new_path="$unix_path"
36078  fi
36079
36080
36081  # Now try to locate executable using which
36082  new_path=`$WHICH "$new_path" 2> /dev/null`
36083
36084  if test "x$new_path" = x; then
36085    # Oops. Which didn't find the executable.
36086    # The splitting of arguments from the executable at a space might have been incorrect,
36087    # since paths with space are more likely in Windows. Give it another try with the whole
36088    # argument.
36089    path="$complete"
36090    arguments="EOL"
36091    new_path="$path"
36092
36093  windows_path="$new_path"
36094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36095    unix_path=`$CYGPATH -u "$windows_path"`
36096    new_path="$unix_path"
36097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36099    new_path="$unix_path"
36100  fi
36101
36102
36103    new_path=`$WHICH "$new_path" 2> /dev/null`
36104    # bat and cmd files are not always considered executable in MSYS causing which
36105    # to not find them
36106    if test "x$new_path" = x \
36107        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36108        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36109      new_path="$path"
36110
36111  windows_path="$new_path"
36112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36113    unix_path=`$CYGPATH -u "$windows_path"`
36114    new_path="$unix_path"
36115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36117    new_path="$unix_path"
36118  fi
36119
36120    fi
36121
36122    if test "x$new_path" = x; then
36123      # It's still not found. Now this is an unrecoverable error.
36124      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36125$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36126      has_space=`$ECHO "$complete" | $GREP " "`
36127      if test "x$has_space" != x; then
36128        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36129$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36130      fi
36131      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36132    fi
36133  fi
36134
36135  # Now new_path has a complete unix path to the binary
36136  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36137    # Keep paths in /bin as-is, but remove trailing .exe if any
36138    new_path="${new_path/%.exe/}"
36139    # Do not save /bin paths to all_fixpath_prefixes!
36140  else
36141    # Not in mixed or Windows style, start by that.
36142    new_path=`cmd //c echo $new_path`
36143
36144  input_path="$new_path"
36145  # Check if we need to convert this using DOS-style short mode. If the path
36146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36147  # take no chances and rewrite it.
36148  # Note: m4 eats our [], so we need to use [ and ] instead.
36149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36150  if test "x$has_forbidden_chars" != x; then
36151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36153  fi
36154
36155    # Output is in $new_path
36156
36157  windows_path="$new_path"
36158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36159    unix_path=`$CYGPATH -u "$windows_path"`
36160    new_path="$unix_path"
36161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36163    new_path="$unix_path"
36164  fi
36165
36166    # remove trailing .exe if any
36167    new_path="${new_path/%.exe/}"
36168
36169    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36170    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36171  fi
36172
36173    else
36174      # We're on a unix platform. Hooray! :)
36175      # First separate the path from the arguments. This will split at the first
36176      # space.
36177      complete="$CXXCPP"
36178      path="${complete%% *}"
36179      tmp="$complete EOL"
36180      arguments="${tmp#* }"
36181
36182      # Cannot rely on the command "which" here since it doesn't always work.
36183      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36184      if test -z "$is_absolute_path"; then
36185        # Path to executable is not absolute. Find it.
36186        IFS_save="$IFS"
36187        IFS=:
36188        for p in $PATH; do
36189          if test -f "$p/$path" && test -x "$p/$path"; then
36190            new_path="$p/$path"
36191            break
36192          fi
36193        done
36194        IFS="$IFS_save"
36195      else
36196        # This is an absolute path, we can use it without further modifications.
36197        new_path="$path"
36198      fi
36199
36200      if test "x$new_path" = x; then
36201        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36202$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36203        has_space=`$ECHO "$complete" | $GREP " "`
36204        if test "x$has_space" != x; then
36205          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36206$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36207        fi
36208        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36209      fi
36210    fi
36211
36212    # Now join together the path and the arguments once again
36213    if test "x$arguments" != xEOL; then
36214      new_complete="$new_path ${arguments% *}"
36215    else
36216      new_complete="$new_path"
36217    fi
36218
36219    if test "x$complete" != "x$new_complete"; then
36220      CXXCPP="$new_complete"
36221      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36222$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36223    fi
36224  fi
36225
36226
36227  #
36228  # Setup the linker (LD)
36229  #
36230  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36231    # In the Microsoft toolchain we have a separate LD command "link".
36232    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36233    # a cygwin program for something completely different.
36234    # Extract the first word of "link", so it can be a program name with args.
36235set dummy link; ac_word=$2
36236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36237$as_echo_n "checking for $ac_word... " >&6; }
36238if ${ac_cv_prog_LD+:} false; then :
36239  $as_echo_n "(cached) " >&6
36240else
36241  if test -n "$LD"; then
36242  ac_cv_prog_LD="$LD" # Let the user override the test.
36243else
36244  ac_prog_rejected=no
36245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36246for as_dir in $PATH
36247do
36248  IFS=$as_save_IFS
36249  test -z "$as_dir" && as_dir=.
36250    for ac_exec_ext in '' $ac_executable_extensions; do
36251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36252    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36253       ac_prog_rejected=yes
36254       continue
36255     fi
36256    ac_cv_prog_LD="link"
36257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36258    break 2
36259  fi
36260done
36261  done
36262IFS=$as_save_IFS
36263
36264if test $ac_prog_rejected = yes; then
36265  # We found a bogon in the path, so make sure we never use it.
36266  set dummy $ac_cv_prog_LD
36267  shift
36268  if test $# != 0; then
36269    # We chose a different compiler from the bogus one.
36270    # However, it has the same basename, so the bogon will be chosen
36271    # first if we set LD to just the basename; use the full file name.
36272    shift
36273    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36274  fi
36275fi
36276fi
36277fi
36278LD=$ac_cv_prog_LD
36279if test -n "$LD"; then
36280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36281$as_echo "$LD" >&6; }
36282else
36283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36284$as_echo "no" >&6; }
36285fi
36286
36287
36288
36289  # Only process if variable expands to non-empty
36290
36291  if test "x$LD" != x; then
36292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36293
36294  # First separate the path from the arguments. This will split at the first
36295  # space.
36296  complete="$LD"
36297  path="${complete%% *}"
36298  tmp="$complete EOL"
36299  arguments="${tmp#* }"
36300
36301  # Input might be given as Windows format, start by converting to
36302  # unix format.
36303  new_path=`$CYGPATH -u "$path"`
36304
36305  # Now try to locate executable using which
36306  new_path=`$WHICH "$new_path" 2> /dev/null`
36307  # bat and cmd files are not always considered executable in cygwin causing which
36308  # to not find them
36309  if test "x$new_path" = x \
36310      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36311      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36312    new_path=`$CYGPATH -u "$path"`
36313  fi
36314  if test "x$new_path" = x; then
36315    # Oops. Which didn't find the executable.
36316    # The splitting of arguments from the executable at a space might have been incorrect,
36317    # since paths with space are more likely in Windows. Give it another try with the whole
36318    # argument.
36319    path="$complete"
36320    arguments="EOL"
36321    new_path=`$CYGPATH -u "$path"`
36322    new_path=`$WHICH "$new_path" 2> /dev/null`
36323    # bat and cmd files are not always considered executable in cygwin causing which
36324    # to not find them
36325    if test "x$new_path" = x \
36326        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36327        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36328      new_path=`$CYGPATH -u "$path"`
36329    fi
36330    if test "x$new_path" = x; then
36331      # It's still not found. Now this is an unrecoverable error.
36332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36333$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36334      has_space=`$ECHO "$complete" | $GREP " "`
36335      if test "x$has_space" != x; then
36336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36338      fi
36339      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36340    fi
36341  fi
36342
36343  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36344  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36345  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36346  # "foo.exe" is OK but "foo" is an error.
36347  #
36348  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36349  # It is also a way to make sure we got the proper file name for the real test later on.
36350  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36351  if test "x$test_shortpath" = x; then
36352    # Short path failed, file does not exist as specified.
36353    # Try adding .exe or .cmd
36354    if test -f "${new_path}.exe"; then
36355      input_to_shortpath="${new_path}.exe"
36356    elif test -f "${new_path}.cmd"; then
36357      input_to_shortpath="${new_path}.cmd"
36358    else
36359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36360$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36361      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36362$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36363      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36364    fi
36365  else
36366    input_to_shortpath="$new_path"
36367  fi
36368
36369  # Call helper function which possibly converts this using DOS-style short mode.
36370  # If so, the updated path is stored in $new_path.
36371  new_path="$input_to_shortpath"
36372
36373  input_path="$input_to_shortpath"
36374  # Check if we need to convert this using DOS-style short mode. If the path
36375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36376  # take no chances and rewrite it.
36377  # Note: m4 eats our [], so we need to use [ and ] instead.
36378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36379  if test "x$has_forbidden_chars" != x; then
36380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36384      # Going to short mode and back again did indeed matter. Since short mode is
36385      # case insensitive, let's make it lowercase to improve readability.
36386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36387      # Now convert it back to Unix-style (cygpath)
36388      input_path=`$CYGPATH -u "$shortmode_path"`
36389      new_path="$input_path"
36390    fi
36391  fi
36392
36393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36394  if test "x$test_cygdrive_prefix" = x; then
36395    # As a simple fix, exclude /usr/bin since it's not a real path.
36396    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36398      # a path prefixed by /cygdrive for fixpath to work.
36399      new_path="$CYGWIN_ROOT_PATH$input_path"
36400    fi
36401  fi
36402
36403  # remove trailing .exe if any
36404  new_path="${new_path/%.exe/}"
36405
36406    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36407
36408  # First separate the path from the arguments. This will split at the first
36409  # space.
36410  complete="$LD"
36411  path="${complete%% *}"
36412  tmp="$complete EOL"
36413  arguments="${tmp#* }"
36414
36415  # Input might be given as Windows format, start by converting to
36416  # unix format.
36417  new_path="$path"
36418
36419  windows_path="$new_path"
36420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36421    unix_path=`$CYGPATH -u "$windows_path"`
36422    new_path="$unix_path"
36423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36425    new_path="$unix_path"
36426  fi
36427
36428
36429  # Now try to locate executable using which
36430  new_path=`$WHICH "$new_path" 2> /dev/null`
36431
36432  if test "x$new_path" = x; then
36433    # Oops. Which didn't find the executable.
36434    # The splitting of arguments from the executable at a space might have been incorrect,
36435    # since paths with space are more likely in Windows. Give it another try with the whole
36436    # argument.
36437    path="$complete"
36438    arguments="EOL"
36439    new_path="$path"
36440
36441  windows_path="$new_path"
36442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36443    unix_path=`$CYGPATH -u "$windows_path"`
36444    new_path="$unix_path"
36445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36447    new_path="$unix_path"
36448  fi
36449
36450
36451    new_path=`$WHICH "$new_path" 2> /dev/null`
36452    # bat and cmd files are not always considered executable in MSYS causing which
36453    # to not find them
36454    if test "x$new_path" = x \
36455        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36456        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36457      new_path="$path"
36458
36459  windows_path="$new_path"
36460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36461    unix_path=`$CYGPATH -u "$windows_path"`
36462    new_path="$unix_path"
36463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36464    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36465    new_path="$unix_path"
36466  fi
36467
36468    fi
36469
36470    if test "x$new_path" = x; then
36471      # It's still not found. Now this is an unrecoverable error.
36472      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36473$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36474      has_space=`$ECHO "$complete" | $GREP " "`
36475      if test "x$has_space" != x; then
36476        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36477$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36478      fi
36479      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36480    fi
36481  fi
36482
36483  # Now new_path has a complete unix path to the binary
36484  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36485    # Keep paths in /bin as-is, but remove trailing .exe if any
36486    new_path="${new_path/%.exe/}"
36487    # Do not save /bin paths to all_fixpath_prefixes!
36488  else
36489    # Not in mixed or Windows style, start by that.
36490    new_path=`cmd //c echo $new_path`
36491
36492  input_path="$new_path"
36493  # Check if we need to convert this using DOS-style short mode. If the path
36494  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36495  # take no chances and rewrite it.
36496  # Note: m4 eats our [], so we need to use [ and ] instead.
36497  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36498  if test "x$has_forbidden_chars" != x; then
36499    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36500    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36501  fi
36502
36503    # Output is in $new_path
36504
36505  windows_path="$new_path"
36506  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36507    unix_path=`$CYGPATH -u "$windows_path"`
36508    new_path="$unix_path"
36509  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36510    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36511    new_path="$unix_path"
36512  fi
36513
36514    # remove trailing .exe if any
36515    new_path="${new_path/%.exe/}"
36516
36517    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36518    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36519  fi
36520
36521    else
36522      # We're on a unix platform. Hooray! :)
36523      # First separate the path from the arguments. This will split at the first
36524      # space.
36525      complete="$LD"
36526      path="${complete%% *}"
36527      tmp="$complete EOL"
36528      arguments="${tmp#* }"
36529
36530      # Cannot rely on the command "which" here since it doesn't always work.
36531      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36532      if test -z "$is_absolute_path"; then
36533        # Path to executable is not absolute. Find it.
36534        IFS_save="$IFS"
36535        IFS=:
36536        for p in $PATH; do
36537          if test -f "$p/$path" && test -x "$p/$path"; then
36538            new_path="$p/$path"
36539            break
36540          fi
36541        done
36542        IFS="$IFS_save"
36543      else
36544        # This is an absolute path, we can use it without further modifications.
36545        new_path="$path"
36546      fi
36547
36548      if test "x$new_path" = x; then
36549        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36550$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36551        has_space=`$ECHO "$complete" | $GREP " "`
36552        if test "x$has_space" != x; then
36553          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36554$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36555        fi
36556        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36557      fi
36558    fi
36559
36560    # Now join together the path and the arguments once again
36561    if test "x$arguments" != xEOL; then
36562      new_complete="$new_path ${arguments% *}"
36563    else
36564      new_complete="$new_path"
36565    fi
36566
36567    if test "x$complete" != "x$new_complete"; then
36568      LD="$new_complete"
36569      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36570$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36571    fi
36572  fi
36573
36574    # Verify that we indeed succeeded with this trick.
36575    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36576$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36577    "$LD" --version > /dev/null
36578    if test $? -eq 0 ; then
36579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36580$as_echo "no" >&6; }
36581      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36582    else
36583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36584$as_echo "yes" >&6; }
36585    fi
36586    LDCXX="$LD"
36587  else
36588    # All other toolchains use the compiler to link.
36589    LD="$CC"
36590    LDCXX="$CXX"
36591  fi
36592
36593  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36594
36595
36596  #
36597  # Setup the assembler (AS)
36598  #
36599  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36600
36601
36602  # Publish this variable in the help.
36603
36604
36605  if [ -z "${AS+x}" ]; then
36606    # The variable is not set by user, try to locate tool using the code snippet
36607    for ac_prog in as
36608do
36609  # Extract the first word of "$ac_prog", so it can be a program name with args.
36610set dummy $ac_prog; ac_word=$2
36611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36612$as_echo_n "checking for $ac_word... " >&6; }
36613if ${ac_cv_path_AS+:} false; then :
36614  $as_echo_n "(cached) " >&6
36615else
36616  case $AS in
36617  [\\/]* | ?:[\\/]*)
36618  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36619  ;;
36620  *)
36621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36622for as_dir in $PATH
36623do
36624  IFS=$as_save_IFS
36625  test -z "$as_dir" && as_dir=.
36626    for ac_exec_ext in '' $ac_executable_extensions; do
36627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36628    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36630    break 2
36631  fi
36632done
36633  done
36634IFS=$as_save_IFS
36635
36636  ;;
36637esac
36638fi
36639AS=$ac_cv_path_AS
36640if test -n "$AS"; then
36641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36642$as_echo "$AS" >&6; }
36643else
36644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36645$as_echo "no" >&6; }
36646fi
36647
36648
36649  test -n "$AS" && break
36650done
36651
36652  else
36653    # The variable is set, but is it from the command line or the environment?
36654
36655    # Try to remove the string !AS! from our list.
36656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36658      # If it failed, the variable was not from the command line. Ignore it,
36659      # but warn the user (except for BASH, which is always set by the calling BASH).
36660      if test "xAS" != xBASH; then
36661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36662$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36663      fi
36664      # Try to locate tool using the code snippet
36665      for ac_prog in as
36666do
36667  # Extract the first word of "$ac_prog", so it can be a program name with args.
36668set dummy $ac_prog; ac_word=$2
36669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36670$as_echo_n "checking for $ac_word... " >&6; }
36671if ${ac_cv_path_AS+:} false; then :
36672  $as_echo_n "(cached) " >&6
36673else
36674  case $AS in
36675  [\\/]* | ?:[\\/]*)
36676  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36677  ;;
36678  *)
36679  as_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_path_AS="$as_dir/$ac_word$ac_exec_ext"
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
36694  ;;
36695esac
36696fi
36697AS=$ac_cv_path_AS
36698if test -n "$AS"; then
36699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36700$as_echo "$AS" >&6; }
36701else
36702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36703$as_echo "no" >&6; }
36704fi
36705
36706
36707  test -n "$AS" && break
36708done
36709
36710    else
36711      # If it succeeded, then it was overridden by the user. We will use it
36712      # for the tool.
36713
36714      # First remove it from the list of overridden variables, so we can test
36715      # for unknown variables in the end.
36716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36717
36718      # Check if we try to supply an empty value
36719      if test "x$AS" = x; then
36720        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36721$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36722        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36723$as_echo_n "checking for AS... " >&6; }
36724        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36725$as_echo "disabled" >&6; }
36726      else
36727        # Check if the provided tool contains a complete path.
36728        tool_specified="$AS"
36729        tool_basename="${tool_specified##*/}"
36730        if test "x$tool_basename" = "x$tool_specified"; then
36731          # A command without a complete path is provided, search $PATH.
36732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36733$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36734          # Extract the first word of "$tool_basename", so it can be a program name with args.
36735set dummy $tool_basename; ac_word=$2
36736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36737$as_echo_n "checking for $ac_word... " >&6; }
36738if ${ac_cv_path_AS+:} false; then :
36739  $as_echo_n "(cached) " >&6
36740else
36741  case $AS in
36742  [\\/]* | ?:[\\/]*)
36743  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36744  ;;
36745  *)
36746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36747for as_dir in $PATH
36748do
36749  IFS=$as_save_IFS
36750  test -z "$as_dir" && as_dir=.
36751    for ac_exec_ext in '' $ac_executable_extensions; do
36752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36753    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36755    break 2
36756  fi
36757done
36758  done
36759IFS=$as_save_IFS
36760
36761  ;;
36762esac
36763fi
36764AS=$ac_cv_path_AS
36765if test -n "$AS"; then
36766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36767$as_echo "$AS" >&6; }
36768else
36769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36770$as_echo "no" >&6; }
36771fi
36772
36773
36774          if test "x$AS" = x; then
36775            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36776          fi
36777        else
36778          # Otherwise we believe it is a complete path. Use it as it is.
36779          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36780$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36781          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36782$as_echo_n "checking for AS... " >&6; }
36783          if test ! -x "$tool_specified"; then
36784            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36785$as_echo "not found" >&6; }
36786            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36787          fi
36788          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36789$as_echo "$tool_specified" >&6; }
36790        fi
36791      fi
36792    fi
36793
36794  fi
36795
36796
36797
36798  # Only process if variable expands to non-empty
36799
36800  if test "x$AS" != x; then
36801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36802
36803  # First separate the path from the arguments. This will split at the first
36804  # space.
36805  complete="$AS"
36806  path="${complete%% *}"
36807  tmp="$complete EOL"
36808  arguments="${tmp#* }"
36809
36810  # Input might be given as Windows format, start by converting to
36811  # unix format.
36812  new_path=`$CYGPATH -u "$path"`
36813
36814  # Now try to locate executable using which
36815  new_path=`$WHICH "$new_path" 2> /dev/null`
36816  # bat and cmd files are not always considered executable in cygwin causing which
36817  # to not find them
36818  if test "x$new_path" = x \
36819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36821    new_path=`$CYGPATH -u "$path"`
36822  fi
36823  if test "x$new_path" = x; then
36824    # Oops. Which didn't find the executable.
36825    # The splitting of arguments from the executable at a space might have been incorrect,
36826    # since paths with space are more likely in Windows. Give it another try with the whole
36827    # argument.
36828    path="$complete"
36829    arguments="EOL"
36830    new_path=`$CYGPATH -u "$path"`
36831    new_path=`$WHICH "$new_path" 2> /dev/null`
36832    # bat and cmd files are not always considered executable in cygwin causing which
36833    # to not find them
36834    if test "x$new_path" = x \
36835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36837      new_path=`$CYGPATH -u "$path"`
36838    fi
36839    if test "x$new_path" = x; then
36840      # It's still not found. Now this is an unrecoverable error.
36841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36842$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36843      has_space=`$ECHO "$complete" | $GREP " "`
36844      if test "x$has_space" != x; then
36845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36847      fi
36848      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36849    fi
36850  fi
36851
36852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36855  # "foo.exe" is OK but "foo" is an error.
36856  #
36857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36858  # It is also a way to make sure we got the proper file name for the real test later on.
36859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36860  if test "x$test_shortpath" = x; then
36861    # Short path failed, file does not exist as specified.
36862    # Try adding .exe or .cmd
36863    if test -f "${new_path}.exe"; then
36864      input_to_shortpath="${new_path}.exe"
36865    elif test -f "${new_path}.cmd"; then
36866      input_to_shortpath="${new_path}.cmd"
36867    else
36868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36869$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36872      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36873    fi
36874  else
36875    input_to_shortpath="$new_path"
36876  fi
36877
36878  # Call helper function which possibly converts this using DOS-style short mode.
36879  # If so, the updated path is stored in $new_path.
36880  new_path="$input_to_shortpath"
36881
36882  input_path="$input_to_shortpath"
36883  # Check if we need to convert this using DOS-style short mode. If the path
36884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36885  # take no chances and rewrite it.
36886  # Note: m4 eats our [], so we need to use [ and ] instead.
36887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36888  if test "x$has_forbidden_chars" != x; then
36889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36893      # Going to short mode and back again did indeed matter. Since short mode is
36894      # case insensitive, let's make it lowercase to improve readability.
36895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36896      # Now convert it back to Unix-style (cygpath)
36897      input_path=`$CYGPATH -u "$shortmode_path"`
36898      new_path="$input_path"
36899    fi
36900  fi
36901
36902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36903  if test "x$test_cygdrive_prefix" = x; then
36904    # As a simple fix, exclude /usr/bin since it's not a real path.
36905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36907      # a path prefixed by /cygdrive for fixpath to work.
36908      new_path="$CYGWIN_ROOT_PATH$input_path"
36909    fi
36910  fi
36911
36912  # remove trailing .exe if any
36913  new_path="${new_path/%.exe/}"
36914
36915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36916
36917  # First separate the path from the arguments. This will split at the first
36918  # space.
36919  complete="$AS"
36920  path="${complete%% *}"
36921  tmp="$complete EOL"
36922  arguments="${tmp#* }"
36923
36924  # Input might be given as Windows format, start by converting to
36925  # unix format.
36926  new_path="$path"
36927
36928  windows_path="$new_path"
36929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36930    unix_path=`$CYGPATH -u "$windows_path"`
36931    new_path="$unix_path"
36932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36934    new_path="$unix_path"
36935  fi
36936
36937
36938  # Now try to locate executable using which
36939  new_path=`$WHICH "$new_path" 2> /dev/null`
36940
36941  if test "x$new_path" = x; then
36942    # Oops. Which didn't find the executable.
36943    # The splitting of arguments from the executable at a space might have been incorrect,
36944    # since paths with space are more likely in Windows. Give it another try with the whole
36945    # argument.
36946    path="$complete"
36947    arguments="EOL"
36948    new_path="$path"
36949
36950  windows_path="$new_path"
36951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36952    unix_path=`$CYGPATH -u "$windows_path"`
36953    new_path="$unix_path"
36954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36956    new_path="$unix_path"
36957  fi
36958
36959
36960    new_path=`$WHICH "$new_path" 2> /dev/null`
36961    # bat and cmd files are not always considered executable in MSYS causing which
36962    # to not find them
36963    if test "x$new_path" = x \
36964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36966      new_path="$path"
36967
36968  windows_path="$new_path"
36969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36970    unix_path=`$CYGPATH -u "$windows_path"`
36971    new_path="$unix_path"
36972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36974    new_path="$unix_path"
36975  fi
36976
36977    fi
36978
36979    if test "x$new_path" = x; then
36980      # It's still not found. Now this is an unrecoverable error.
36981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36982$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36983      has_space=`$ECHO "$complete" | $GREP " "`
36984      if test "x$has_space" != x; then
36985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36987      fi
36988      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36989    fi
36990  fi
36991
36992  # Now new_path has a complete unix path to the binary
36993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36994    # Keep paths in /bin as-is, but remove trailing .exe if any
36995    new_path="${new_path/%.exe/}"
36996    # Do not save /bin paths to all_fixpath_prefixes!
36997  else
36998    # Not in mixed or Windows style, start by that.
36999    new_path=`cmd //c echo $new_path`
37000
37001  input_path="$new_path"
37002  # Check if we need to convert this using DOS-style short mode. If the path
37003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37004  # take no chances and rewrite it.
37005  # Note: m4 eats our [], so we need to use [ and ] instead.
37006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37007  if test "x$has_forbidden_chars" != x; then
37008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37010  fi
37011
37012    # Output is in $new_path
37013
37014  windows_path="$new_path"
37015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37016    unix_path=`$CYGPATH -u "$windows_path"`
37017    new_path="$unix_path"
37018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37020    new_path="$unix_path"
37021  fi
37022
37023    # remove trailing .exe if any
37024    new_path="${new_path/%.exe/}"
37025
37026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37028  fi
37029
37030    else
37031      # We're on a unix platform. Hooray! :)
37032      # First separate the path from the arguments. This will split at the first
37033      # space.
37034      complete="$AS"
37035      path="${complete%% *}"
37036      tmp="$complete EOL"
37037      arguments="${tmp#* }"
37038
37039      # Cannot rely on the command "which" here since it doesn't always work.
37040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37041      if test -z "$is_absolute_path"; then
37042        # Path to executable is not absolute. Find it.
37043        IFS_save="$IFS"
37044        IFS=:
37045        for p in $PATH; do
37046          if test -f "$p/$path" && test -x "$p/$path"; then
37047            new_path="$p/$path"
37048            break
37049          fi
37050        done
37051        IFS="$IFS_save"
37052      else
37053        # This is an absolute path, we can use it without further modifications.
37054        new_path="$path"
37055      fi
37056
37057      if test "x$new_path" = x; then
37058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37059$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37060        has_space=`$ECHO "$complete" | $GREP " "`
37061        if test "x$has_space" != x; then
37062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37064        fi
37065        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37066      fi
37067    fi
37068
37069    # Now join together the path and the arguments once again
37070    if test "x$arguments" != xEOL; then
37071      new_complete="$new_path ${arguments% *}"
37072    else
37073      new_complete="$new_path"
37074    fi
37075
37076    if test "x$complete" != "x$new_complete"; then
37077      AS="$new_complete"
37078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37079$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37080    fi
37081  fi
37082
37083    if test "x$AS" = x; then
37084      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37085    fi
37086  else
37087    # FIXME: is this correct for microsoft?
37088    AS="$CC -c"
37089  fi
37090
37091
37092  #
37093  # Setup the archiver (AR)
37094  #
37095  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37096    # The corresponding ar tool is lib.exe (used to create static libraries)
37097    # Extract the first word of "lib", so it can be a program name with args.
37098set dummy lib; ac_word=$2
37099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37100$as_echo_n "checking for $ac_word... " >&6; }
37101if ${ac_cv_prog_AR+:} false; then :
37102  $as_echo_n "(cached) " >&6
37103else
37104  if test -n "$AR"; then
37105  ac_cv_prog_AR="$AR" # Let the user override the test.
37106else
37107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37108for as_dir in $PATH
37109do
37110  IFS=$as_save_IFS
37111  test -z "$as_dir" && as_dir=.
37112    for ac_exec_ext in '' $ac_executable_extensions; do
37113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37114    ac_cv_prog_AR="lib"
37115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37116    break 2
37117  fi
37118done
37119  done
37120IFS=$as_save_IFS
37121
37122fi
37123fi
37124AR=$ac_cv_prog_AR
37125if test -n "$AR"; then
37126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37127$as_echo "$AR" >&6; }
37128else
37129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37130$as_echo "no" >&6; }
37131fi
37132
37133
37134  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37135
37136
37137  # Publish this variable in the help.
37138
37139
37140  if [ -z "${AR+x}" ]; then
37141    # The variable is not set by user, try to locate tool using the code snippet
37142    if test -n "$ac_tool_prefix"; then
37143  for ac_prog in ar gcc-ar
37144  do
37145    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37148$as_echo_n "checking for $ac_word... " >&6; }
37149if ${ac_cv_prog_AR+:} false; then :
37150  $as_echo_n "(cached) " >&6
37151else
37152  if test -n "$AR"; then
37153  ac_cv_prog_AR="$AR" # Let the user override the test.
37154else
37155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37156for as_dir in $PATH
37157do
37158  IFS=$as_save_IFS
37159  test -z "$as_dir" && as_dir=.
37160    for ac_exec_ext in '' $ac_executable_extensions; do
37161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37162    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37164    break 2
37165  fi
37166done
37167  done
37168IFS=$as_save_IFS
37169
37170fi
37171fi
37172AR=$ac_cv_prog_AR
37173if test -n "$AR"; then
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37175$as_echo "$AR" >&6; }
37176else
37177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37178$as_echo "no" >&6; }
37179fi
37180
37181
37182    test -n "$AR" && break
37183  done
37184fi
37185if test -z "$AR"; then
37186  ac_ct_AR=$AR
37187  for ac_prog in ar gcc-ar
37188do
37189  # Extract the first word of "$ac_prog", so it can be a program name with args.
37190set dummy $ac_prog; ac_word=$2
37191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37192$as_echo_n "checking for $ac_word... " >&6; }
37193if ${ac_cv_prog_ac_ct_AR+:} false; then :
37194  $as_echo_n "(cached) " >&6
37195else
37196  if test -n "$ac_ct_AR"; then
37197  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37198else
37199as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37200for as_dir in $PATH
37201do
37202  IFS=$as_save_IFS
37203  test -z "$as_dir" && as_dir=.
37204    for ac_exec_ext in '' $ac_executable_extensions; do
37205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37206    ac_cv_prog_ac_ct_AR="$ac_prog"
37207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37208    break 2
37209  fi
37210done
37211  done
37212IFS=$as_save_IFS
37213
37214fi
37215fi
37216ac_ct_AR=$ac_cv_prog_ac_ct_AR
37217if test -n "$ac_ct_AR"; then
37218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37219$as_echo "$ac_ct_AR" >&6; }
37220else
37221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37222$as_echo "no" >&6; }
37223fi
37224
37225
37226  test -n "$ac_ct_AR" && break
37227done
37228
37229  if test "x$ac_ct_AR" = x; then
37230    AR=""
37231  else
37232    case $cross_compiling:$ac_tool_warned in
37233yes:)
37234{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37235$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37236ac_tool_warned=yes ;;
37237esac
37238    AR=$ac_ct_AR
37239  fi
37240fi
37241
37242  else
37243    # The variable is set, but is it from the command line or the environment?
37244
37245    # Try to remove the string !AR! from our list.
37246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37248      # If it failed, the variable was not from the command line. Ignore it,
37249      # but warn the user (except for BASH, which is always set by the calling BASH).
37250      if test "xAR" != xBASH; then
37251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37252$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37253      fi
37254      # Try to locate tool using the code snippet
37255      if test -n "$ac_tool_prefix"; then
37256  for ac_prog in ar gcc-ar
37257  do
37258    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37259set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37261$as_echo_n "checking for $ac_word... " >&6; }
37262if ${ac_cv_prog_AR+:} false; then :
37263  $as_echo_n "(cached) " >&6
37264else
37265  if test -n "$AR"; then
37266  ac_cv_prog_AR="$AR" # Let the user override the test.
37267else
37268as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37269for as_dir in $PATH
37270do
37271  IFS=$as_save_IFS
37272  test -z "$as_dir" && as_dir=.
37273    for ac_exec_ext in '' $ac_executable_extensions; do
37274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37275    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37277    break 2
37278  fi
37279done
37280  done
37281IFS=$as_save_IFS
37282
37283fi
37284fi
37285AR=$ac_cv_prog_AR
37286if test -n "$AR"; then
37287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37288$as_echo "$AR" >&6; }
37289else
37290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37291$as_echo "no" >&6; }
37292fi
37293
37294
37295    test -n "$AR" && break
37296  done
37297fi
37298if test -z "$AR"; then
37299  ac_ct_AR=$AR
37300  for ac_prog in ar gcc-ar
37301do
37302  # Extract the first word of "$ac_prog", so it can be a program name with args.
37303set dummy $ac_prog; ac_word=$2
37304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37305$as_echo_n "checking for $ac_word... " >&6; }
37306if ${ac_cv_prog_ac_ct_AR+:} false; then :
37307  $as_echo_n "(cached) " >&6
37308else
37309  if test -n "$ac_ct_AR"; then
37310  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37311else
37312as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37313for as_dir in $PATH
37314do
37315  IFS=$as_save_IFS
37316  test -z "$as_dir" && as_dir=.
37317    for ac_exec_ext in '' $ac_executable_extensions; do
37318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37319    ac_cv_prog_ac_ct_AR="$ac_prog"
37320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37321    break 2
37322  fi
37323done
37324  done
37325IFS=$as_save_IFS
37326
37327fi
37328fi
37329ac_ct_AR=$ac_cv_prog_ac_ct_AR
37330if test -n "$ac_ct_AR"; then
37331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37332$as_echo "$ac_ct_AR" >&6; }
37333else
37334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37335$as_echo "no" >&6; }
37336fi
37337
37338
37339  test -n "$ac_ct_AR" && break
37340done
37341
37342  if test "x$ac_ct_AR" = x; then
37343    AR=""
37344  else
37345    case $cross_compiling:$ac_tool_warned in
37346yes:)
37347{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37348$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37349ac_tool_warned=yes ;;
37350esac
37351    AR=$ac_ct_AR
37352  fi
37353fi
37354
37355    else
37356      # If it succeeded, then it was overridden by the user. We will use it
37357      # for the tool.
37358
37359      # First remove it from the list of overridden variables, so we can test
37360      # for unknown variables in the end.
37361      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37362
37363      # Check if we try to supply an empty value
37364      if test "x$AR" = x; then
37365        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37366$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37368$as_echo_n "checking for AR... " >&6; }
37369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37370$as_echo "disabled" >&6; }
37371      else
37372        # Check if the provided tool contains a complete path.
37373        tool_specified="$AR"
37374        tool_basename="${tool_specified##*/}"
37375        if test "x$tool_basename" = "x$tool_specified"; then
37376          # A command without a complete path is provided, search $PATH.
37377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37378$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37379          # Extract the first word of "$tool_basename", so it can be a program name with args.
37380set dummy $tool_basename; ac_word=$2
37381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37382$as_echo_n "checking for $ac_word... " >&6; }
37383if ${ac_cv_path_AR+:} false; then :
37384  $as_echo_n "(cached) " >&6
37385else
37386  case $AR in
37387  [\\/]* | ?:[\\/]*)
37388  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37389  ;;
37390  *)
37391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37392for as_dir in $PATH
37393do
37394  IFS=$as_save_IFS
37395  test -z "$as_dir" && as_dir=.
37396    for ac_exec_ext in '' $ac_executable_extensions; do
37397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37398    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37400    break 2
37401  fi
37402done
37403  done
37404IFS=$as_save_IFS
37405
37406  ;;
37407esac
37408fi
37409AR=$ac_cv_path_AR
37410if test -n "$AR"; then
37411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37412$as_echo "$AR" >&6; }
37413else
37414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37415$as_echo "no" >&6; }
37416fi
37417
37418
37419          if test "x$AR" = x; then
37420            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37421          fi
37422        else
37423          # Otherwise we believe it is a complete path. Use it as it is.
37424          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37425$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37426          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37427$as_echo_n "checking for AR... " >&6; }
37428          if test ! -x "$tool_specified"; then
37429            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37430$as_echo "not found" >&6; }
37431            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37432          fi
37433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37434$as_echo "$tool_specified" >&6; }
37435        fi
37436      fi
37437    fi
37438
37439  fi
37440
37441
37442  else
37443
37444
37445  # Publish this variable in the help.
37446
37447
37448  if [ -z "${AR+x}" ]; then
37449    # The variable is not set by user, try to locate tool using the code snippet
37450    if test -n "$ac_tool_prefix"; then
37451  for ac_prog in ar
37452  do
37453    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37454set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37456$as_echo_n "checking for $ac_word... " >&6; }
37457if ${ac_cv_prog_AR+:} false; then :
37458  $as_echo_n "(cached) " >&6
37459else
37460  if test -n "$AR"; then
37461  ac_cv_prog_AR="$AR" # Let the user override the test.
37462else
37463as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37464for as_dir in $PATH
37465do
37466  IFS=$as_save_IFS
37467  test -z "$as_dir" && as_dir=.
37468    for ac_exec_ext in '' $ac_executable_extensions; do
37469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37470    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37472    break 2
37473  fi
37474done
37475  done
37476IFS=$as_save_IFS
37477
37478fi
37479fi
37480AR=$ac_cv_prog_AR
37481if test -n "$AR"; then
37482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37483$as_echo "$AR" >&6; }
37484else
37485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37486$as_echo "no" >&6; }
37487fi
37488
37489
37490    test -n "$AR" && break
37491  done
37492fi
37493if test -z "$AR"; then
37494  ac_ct_AR=$AR
37495  for ac_prog in ar
37496do
37497  # Extract the first word of "$ac_prog", so it can be a program name with args.
37498set dummy $ac_prog; ac_word=$2
37499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37500$as_echo_n "checking for $ac_word... " >&6; }
37501if ${ac_cv_prog_ac_ct_AR+:} false; then :
37502  $as_echo_n "(cached) " >&6
37503else
37504  if test -n "$ac_ct_AR"; then
37505  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37506else
37507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37508for as_dir in $PATH
37509do
37510  IFS=$as_save_IFS
37511  test -z "$as_dir" && as_dir=.
37512    for ac_exec_ext in '' $ac_executable_extensions; do
37513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37514    ac_cv_prog_ac_ct_AR="$ac_prog"
37515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37516    break 2
37517  fi
37518done
37519  done
37520IFS=$as_save_IFS
37521
37522fi
37523fi
37524ac_ct_AR=$ac_cv_prog_ac_ct_AR
37525if test -n "$ac_ct_AR"; then
37526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37527$as_echo "$ac_ct_AR" >&6; }
37528else
37529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37530$as_echo "no" >&6; }
37531fi
37532
37533
37534  test -n "$ac_ct_AR" && break
37535done
37536
37537  if test "x$ac_ct_AR" = x; then
37538    AR=""
37539  else
37540    case $cross_compiling:$ac_tool_warned in
37541yes:)
37542{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37543$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37544ac_tool_warned=yes ;;
37545esac
37546    AR=$ac_ct_AR
37547  fi
37548fi
37549
37550  else
37551    # The variable is set, but is it from the command line or the environment?
37552
37553    # Try to remove the string !AR! from our list.
37554    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37555    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37556      # If it failed, the variable was not from the command line. Ignore it,
37557      # but warn the user (except for BASH, which is always set by the calling BASH).
37558      if test "xAR" != xBASH; then
37559        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37560$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37561      fi
37562      # Try to locate tool using the code snippet
37563      if test -n "$ac_tool_prefix"; then
37564  for ac_prog in ar
37565  do
37566    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37567set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37569$as_echo_n "checking for $ac_word... " >&6; }
37570if ${ac_cv_prog_AR+:} false; then :
37571  $as_echo_n "(cached) " >&6
37572else
37573  if test -n "$AR"; then
37574  ac_cv_prog_AR="$AR" # Let the user override the test.
37575else
37576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37577for as_dir in $PATH
37578do
37579  IFS=$as_save_IFS
37580  test -z "$as_dir" && as_dir=.
37581    for ac_exec_ext in '' $ac_executable_extensions; do
37582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37583    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37585    break 2
37586  fi
37587done
37588  done
37589IFS=$as_save_IFS
37590
37591fi
37592fi
37593AR=$ac_cv_prog_AR
37594if test -n "$AR"; then
37595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37596$as_echo "$AR" >&6; }
37597else
37598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37599$as_echo "no" >&6; }
37600fi
37601
37602
37603    test -n "$AR" && break
37604  done
37605fi
37606if test -z "$AR"; then
37607  ac_ct_AR=$AR
37608  for ac_prog in ar
37609do
37610  # Extract the first word of "$ac_prog", so it can be a program name with args.
37611set dummy $ac_prog; ac_word=$2
37612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37613$as_echo_n "checking for $ac_word... " >&6; }
37614if ${ac_cv_prog_ac_ct_AR+:} false; then :
37615  $as_echo_n "(cached) " >&6
37616else
37617  if test -n "$ac_ct_AR"; then
37618  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37619else
37620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37621for as_dir in $PATH
37622do
37623  IFS=$as_save_IFS
37624  test -z "$as_dir" && as_dir=.
37625    for ac_exec_ext in '' $ac_executable_extensions; do
37626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37627    ac_cv_prog_ac_ct_AR="$ac_prog"
37628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37629    break 2
37630  fi
37631done
37632  done
37633IFS=$as_save_IFS
37634
37635fi
37636fi
37637ac_ct_AR=$ac_cv_prog_ac_ct_AR
37638if test -n "$ac_ct_AR"; then
37639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37640$as_echo "$ac_ct_AR" >&6; }
37641else
37642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37643$as_echo "no" >&6; }
37644fi
37645
37646
37647  test -n "$ac_ct_AR" && break
37648done
37649
37650  if test "x$ac_ct_AR" = x; then
37651    AR=""
37652  else
37653    case $cross_compiling:$ac_tool_warned in
37654yes:)
37655{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37656$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37657ac_tool_warned=yes ;;
37658esac
37659    AR=$ac_ct_AR
37660  fi
37661fi
37662
37663    else
37664      # If it succeeded, then it was overridden by the user. We will use it
37665      # for the tool.
37666
37667      # First remove it from the list of overridden variables, so we can test
37668      # for unknown variables in the end.
37669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37670
37671      # Check if we try to supply an empty value
37672      if test "x$AR" = x; then
37673        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37674$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37676$as_echo_n "checking for AR... " >&6; }
37677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37678$as_echo "disabled" >&6; }
37679      else
37680        # Check if the provided tool contains a complete path.
37681        tool_specified="$AR"
37682        tool_basename="${tool_specified##*/}"
37683        if test "x$tool_basename" = "x$tool_specified"; then
37684          # A command without a complete path is provided, search $PATH.
37685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37686$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37687          # Extract the first word of "$tool_basename", so it can be a program name with args.
37688set dummy $tool_basename; ac_word=$2
37689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37690$as_echo_n "checking for $ac_word... " >&6; }
37691if ${ac_cv_path_AR+:} false; then :
37692  $as_echo_n "(cached) " >&6
37693else
37694  case $AR in
37695  [\\/]* | ?:[\\/]*)
37696  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37697  ;;
37698  *)
37699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37700for as_dir in $PATH
37701do
37702  IFS=$as_save_IFS
37703  test -z "$as_dir" && as_dir=.
37704    for ac_exec_ext in '' $ac_executable_extensions; do
37705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37706    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37708    break 2
37709  fi
37710done
37711  done
37712IFS=$as_save_IFS
37713
37714  ;;
37715esac
37716fi
37717AR=$ac_cv_path_AR
37718if test -n "$AR"; then
37719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37720$as_echo "$AR" >&6; }
37721else
37722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37723$as_echo "no" >&6; }
37724fi
37725
37726
37727          if test "x$AR" = x; then
37728            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37729          fi
37730        else
37731          # Otherwise we believe it is a complete path. Use it as it is.
37732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37733$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37734          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37735$as_echo_n "checking for AR... " >&6; }
37736          if test ! -x "$tool_specified"; then
37737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37738$as_echo "not found" >&6; }
37739            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37740          fi
37741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37742$as_echo "$tool_specified" >&6; }
37743        fi
37744      fi
37745    fi
37746
37747  fi
37748
37749
37750  fi
37751
37752  # Only process if variable expands to non-empty
37753
37754  if test "x$AR" != x; then
37755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37756
37757  # First separate the path from the arguments. This will split at the first
37758  # space.
37759  complete="$AR"
37760  path="${complete%% *}"
37761  tmp="$complete EOL"
37762  arguments="${tmp#* }"
37763
37764  # Input might be given as Windows format, start by converting to
37765  # unix format.
37766  new_path=`$CYGPATH -u "$path"`
37767
37768  # Now try to locate executable using which
37769  new_path=`$WHICH "$new_path" 2> /dev/null`
37770  # bat and cmd files are not always considered executable in cygwin causing which
37771  # to not find them
37772  if test "x$new_path" = x \
37773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37775    new_path=`$CYGPATH -u "$path"`
37776  fi
37777  if test "x$new_path" = x; then
37778    # Oops. Which didn't find the executable.
37779    # The splitting of arguments from the executable at a space might have been incorrect,
37780    # since paths with space are more likely in Windows. Give it another try with the whole
37781    # argument.
37782    path="$complete"
37783    arguments="EOL"
37784    new_path=`$CYGPATH -u "$path"`
37785    new_path=`$WHICH "$new_path" 2> /dev/null`
37786    # bat and cmd files are not always considered executable in cygwin causing which
37787    # to not find them
37788    if test "x$new_path" = x \
37789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37791      new_path=`$CYGPATH -u "$path"`
37792    fi
37793    if test "x$new_path" = x; then
37794      # It's still not found. Now this is an unrecoverable error.
37795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37796$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37797      has_space=`$ECHO "$complete" | $GREP " "`
37798      if test "x$has_space" != x; then
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37801      fi
37802      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37803    fi
37804  fi
37805
37806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37809  # "foo.exe" is OK but "foo" is an error.
37810  #
37811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37812  # It is also a way to make sure we got the proper file name for the real test later on.
37813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37814  if test "x$test_shortpath" = x; then
37815    # Short path failed, file does not exist as specified.
37816    # Try adding .exe or .cmd
37817    if test -f "${new_path}.exe"; then
37818      input_to_shortpath="${new_path}.exe"
37819    elif test -f "${new_path}.cmd"; then
37820      input_to_shortpath="${new_path}.cmd"
37821    else
37822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37823$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37826      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37827    fi
37828  else
37829    input_to_shortpath="$new_path"
37830  fi
37831
37832  # Call helper function which possibly converts this using DOS-style short mode.
37833  # If so, the updated path is stored in $new_path.
37834  new_path="$input_to_shortpath"
37835
37836  input_path="$input_to_shortpath"
37837  # Check if we need to convert this using DOS-style short mode. If the path
37838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37839  # take no chances and rewrite it.
37840  # Note: m4 eats our [], so we need to use [ and ] instead.
37841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37842  if test "x$has_forbidden_chars" != x; then
37843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37847      # Going to short mode and back again did indeed matter. Since short mode is
37848      # case insensitive, let's make it lowercase to improve readability.
37849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37850      # Now convert it back to Unix-style (cygpath)
37851      input_path=`$CYGPATH -u "$shortmode_path"`
37852      new_path="$input_path"
37853    fi
37854  fi
37855
37856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37857  if test "x$test_cygdrive_prefix" = x; then
37858    # As a simple fix, exclude /usr/bin since it's not a real path.
37859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37861      # a path prefixed by /cygdrive for fixpath to work.
37862      new_path="$CYGWIN_ROOT_PATH$input_path"
37863    fi
37864  fi
37865
37866  # remove trailing .exe if any
37867  new_path="${new_path/%.exe/}"
37868
37869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37870
37871  # First separate the path from the arguments. This will split at the first
37872  # space.
37873  complete="$AR"
37874  path="${complete%% *}"
37875  tmp="$complete EOL"
37876  arguments="${tmp#* }"
37877
37878  # Input might be given as Windows format, start by converting to
37879  # unix format.
37880  new_path="$path"
37881
37882  windows_path="$new_path"
37883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37884    unix_path=`$CYGPATH -u "$windows_path"`
37885    new_path="$unix_path"
37886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37888    new_path="$unix_path"
37889  fi
37890
37891
37892  # Now try to locate executable using which
37893  new_path=`$WHICH "$new_path" 2> /dev/null`
37894
37895  if test "x$new_path" = x; then
37896    # Oops. Which didn't find the executable.
37897    # The splitting of arguments from the executable at a space might have been incorrect,
37898    # since paths with space are more likely in Windows. Give it another try with the whole
37899    # argument.
37900    path="$complete"
37901    arguments="EOL"
37902    new_path="$path"
37903
37904  windows_path="$new_path"
37905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37906    unix_path=`$CYGPATH -u "$windows_path"`
37907    new_path="$unix_path"
37908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37910    new_path="$unix_path"
37911  fi
37912
37913
37914    new_path=`$WHICH "$new_path" 2> /dev/null`
37915    # bat and cmd files are not always considered executable in MSYS causing which
37916    # to not find them
37917    if test "x$new_path" = x \
37918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37920      new_path="$path"
37921
37922  windows_path="$new_path"
37923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37924    unix_path=`$CYGPATH -u "$windows_path"`
37925    new_path="$unix_path"
37926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37928    new_path="$unix_path"
37929  fi
37930
37931    fi
37932
37933    if test "x$new_path" = x; then
37934      # It's still not found. Now this is an unrecoverable error.
37935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37936$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37937      has_space=`$ECHO "$complete" | $GREP " "`
37938      if test "x$has_space" != x; then
37939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37941      fi
37942      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37943    fi
37944  fi
37945
37946  # Now new_path has a complete unix path to the binary
37947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37948    # Keep paths in /bin as-is, but remove trailing .exe if any
37949    new_path="${new_path/%.exe/}"
37950    # Do not save /bin paths to all_fixpath_prefixes!
37951  else
37952    # Not in mixed or Windows style, start by that.
37953    new_path=`cmd //c echo $new_path`
37954
37955  input_path="$new_path"
37956  # Check if we need to convert this using DOS-style short mode. If the path
37957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37958  # take no chances and rewrite it.
37959  # Note: m4 eats our [], so we need to use [ and ] instead.
37960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37961  if test "x$has_forbidden_chars" != x; then
37962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37964  fi
37965
37966    # Output is in $new_path
37967
37968  windows_path="$new_path"
37969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37970    unix_path=`$CYGPATH -u "$windows_path"`
37971    new_path="$unix_path"
37972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37974    new_path="$unix_path"
37975  fi
37976
37977    # remove trailing .exe if any
37978    new_path="${new_path/%.exe/}"
37979
37980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37982  fi
37983
37984    else
37985      # We're on a unix platform. Hooray! :)
37986      # First separate the path from the arguments. This will split at the first
37987      # space.
37988      complete="$AR"
37989      path="${complete%% *}"
37990      tmp="$complete EOL"
37991      arguments="${tmp#* }"
37992
37993      # Cannot rely on the command "which" here since it doesn't always work.
37994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37995      if test -z "$is_absolute_path"; then
37996        # Path to executable is not absolute. Find it.
37997        IFS_save="$IFS"
37998        IFS=:
37999        for p in $PATH; do
38000          if test -f "$p/$path" && test -x "$p/$path"; then
38001            new_path="$p/$path"
38002            break
38003          fi
38004        done
38005        IFS="$IFS_save"
38006      else
38007        # This is an absolute path, we can use it without further modifications.
38008        new_path="$path"
38009      fi
38010
38011      if test "x$new_path" = x; then
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38013$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38014        has_space=`$ECHO "$complete" | $GREP " "`
38015        if test "x$has_space" != x; then
38016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38018        fi
38019        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38020      fi
38021    fi
38022
38023    # Now join together the path and the arguments once again
38024    if test "x$arguments" != xEOL; then
38025      new_complete="$new_path ${arguments% *}"
38026    else
38027      new_complete="$new_path"
38028    fi
38029
38030    if test "x$complete" != "x$new_complete"; then
38031      AR="$new_complete"
38032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38033$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38034    fi
38035  fi
38036
38037
38038
38039  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38040
38041
38042  # Publish this variable in the help.
38043
38044
38045  if [ -z "${LIPO+x}" ]; then
38046    # The variable is not set by user, try to locate tool using the code snippet
38047    for ac_prog in lipo
38048do
38049  # Extract the first word of "$ac_prog", so it can be a program name with args.
38050set dummy $ac_prog; ac_word=$2
38051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38052$as_echo_n "checking for $ac_word... " >&6; }
38053if ${ac_cv_path_LIPO+:} false; then :
38054  $as_echo_n "(cached) " >&6
38055else
38056  case $LIPO in
38057  [\\/]* | ?:[\\/]*)
38058  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38059  ;;
38060  *)
38061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38062for as_dir in $PATH
38063do
38064  IFS=$as_save_IFS
38065  test -z "$as_dir" && as_dir=.
38066    for ac_exec_ext in '' $ac_executable_extensions; do
38067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38068    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38070    break 2
38071  fi
38072done
38073  done
38074IFS=$as_save_IFS
38075
38076  ;;
38077esac
38078fi
38079LIPO=$ac_cv_path_LIPO
38080if test -n "$LIPO"; then
38081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38082$as_echo "$LIPO" >&6; }
38083else
38084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38085$as_echo "no" >&6; }
38086fi
38087
38088
38089  test -n "$LIPO" && break
38090done
38091
38092  else
38093    # The variable is set, but is it from the command line or the environment?
38094
38095    # Try to remove the string !LIPO! from our list.
38096    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38097    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38098      # If it failed, the variable was not from the command line. Ignore it,
38099      # but warn the user (except for BASH, which is always set by the calling BASH).
38100      if test "xLIPO" != xBASH; then
38101        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38102$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38103      fi
38104      # Try to locate tool using the code snippet
38105      for ac_prog in lipo
38106do
38107  # Extract the first word of "$ac_prog", so it can be a program name with args.
38108set dummy $ac_prog; ac_word=$2
38109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38110$as_echo_n "checking for $ac_word... " >&6; }
38111if ${ac_cv_path_LIPO+:} false; then :
38112  $as_echo_n "(cached) " >&6
38113else
38114  case $LIPO in
38115  [\\/]* | ?:[\\/]*)
38116  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38117  ;;
38118  *)
38119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38120for as_dir in $PATH
38121do
38122  IFS=$as_save_IFS
38123  test -z "$as_dir" && as_dir=.
38124    for ac_exec_ext in '' $ac_executable_extensions; do
38125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38126    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38128    break 2
38129  fi
38130done
38131  done
38132IFS=$as_save_IFS
38133
38134  ;;
38135esac
38136fi
38137LIPO=$ac_cv_path_LIPO
38138if test -n "$LIPO"; then
38139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38140$as_echo "$LIPO" >&6; }
38141else
38142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38143$as_echo "no" >&6; }
38144fi
38145
38146
38147  test -n "$LIPO" && break
38148done
38149
38150    else
38151      # If it succeeded, then it was overridden by the user. We will use it
38152      # for the tool.
38153
38154      # First remove it from the list of overridden variables, so we can test
38155      # for unknown variables in the end.
38156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38157
38158      # Check if we try to supply an empty value
38159      if test "x$LIPO" = x; then
38160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38161$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38163$as_echo_n "checking for LIPO... " >&6; }
38164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38165$as_echo "disabled" >&6; }
38166      else
38167        # Check if the provided tool contains a complete path.
38168        tool_specified="$LIPO"
38169        tool_basename="${tool_specified##*/}"
38170        if test "x$tool_basename" = "x$tool_specified"; then
38171          # A command without a complete path is provided, search $PATH.
38172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38173$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38174          # Extract the first word of "$tool_basename", so it can be a program name with args.
38175set dummy $tool_basename; ac_word=$2
38176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38177$as_echo_n "checking for $ac_word... " >&6; }
38178if ${ac_cv_path_LIPO+:} false; then :
38179  $as_echo_n "(cached) " >&6
38180else
38181  case $LIPO in
38182  [\\/]* | ?:[\\/]*)
38183  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38184  ;;
38185  *)
38186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38187for as_dir in $PATH
38188do
38189  IFS=$as_save_IFS
38190  test -z "$as_dir" && as_dir=.
38191    for ac_exec_ext in '' $ac_executable_extensions; do
38192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38193    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38195    break 2
38196  fi
38197done
38198  done
38199IFS=$as_save_IFS
38200
38201  ;;
38202esac
38203fi
38204LIPO=$ac_cv_path_LIPO
38205if test -n "$LIPO"; then
38206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38207$as_echo "$LIPO" >&6; }
38208else
38209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38210$as_echo "no" >&6; }
38211fi
38212
38213
38214          if test "x$LIPO" = x; then
38215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38216          fi
38217        else
38218          # Otherwise we believe it is a complete path. Use it as it is.
38219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38220$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38222$as_echo_n "checking for LIPO... " >&6; }
38223          if test ! -x "$tool_specified"; then
38224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38225$as_echo "not found" >&6; }
38226            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38227          fi
38228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38229$as_echo "$tool_specified" >&6; }
38230        fi
38231      fi
38232    fi
38233
38234  fi
38235
38236
38237
38238  # Only process if variable expands to non-empty
38239
38240  if test "x$LIPO" != x; then
38241    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38242
38243  # First separate the path from the arguments. This will split at the first
38244  # space.
38245  complete="$LIPO"
38246  path="${complete%% *}"
38247  tmp="$complete EOL"
38248  arguments="${tmp#* }"
38249
38250  # Input might be given as Windows format, start by converting to
38251  # unix format.
38252  new_path=`$CYGPATH -u "$path"`
38253
38254  # Now try to locate executable using which
38255  new_path=`$WHICH "$new_path" 2> /dev/null`
38256  # bat and cmd files are not always considered executable in cygwin causing which
38257  # to not find them
38258  if test "x$new_path" = x \
38259      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38260      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38261    new_path=`$CYGPATH -u "$path"`
38262  fi
38263  if test "x$new_path" = x; then
38264    # Oops. Which didn't find the executable.
38265    # The splitting of arguments from the executable at a space might have been incorrect,
38266    # since paths with space are more likely in Windows. Give it another try with the whole
38267    # argument.
38268    path="$complete"
38269    arguments="EOL"
38270    new_path=`$CYGPATH -u "$path"`
38271    new_path=`$WHICH "$new_path" 2> /dev/null`
38272    # bat and cmd files are not always considered executable in cygwin causing which
38273    # to not find them
38274    if test "x$new_path" = x \
38275        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38276        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38277      new_path=`$CYGPATH -u "$path"`
38278    fi
38279    if test "x$new_path" = x; then
38280      # It's still not found. Now this is an unrecoverable error.
38281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38282$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38283      has_space=`$ECHO "$complete" | $GREP " "`
38284      if test "x$has_space" != x; then
38285        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38286$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38287      fi
38288      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38289    fi
38290  fi
38291
38292  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38293  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38294  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38295  # "foo.exe" is OK but "foo" is an error.
38296  #
38297  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38298  # It is also a way to make sure we got the proper file name for the real test later on.
38299  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38300  if test "x$test_shortpath" = x; then
38301    # Short path failed, file does not exist as specified.
38302    # Try adding .exe or .cmd
38303    if test -f "${new_path}.exe"; then
38304      input_to_shortpath="${new_path}.exe"
38305    elif test -f "${new_path}.cmd"; then
38306      input_to_shortpath="${new_path}.cmd"
38307    else
38308      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38309$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38310      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38311$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38312      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38313    fi
38314  else
38315    input_to_shortpath="$new_path"
38316  fi
38317
38318  # Call helper function which possibly converts this using DOS-style short mode.
38319  # If so, the updated path is stored in $new_path.
38320  new_path="$input_to_shortpath"
38321
38322  input_path="$input_to_shortpath"
38323  # Check if we need to convert this using DOS-style short mode. If the path
38324  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38325  # take no chances and rewrite it.
38326  # Note: m4 eats our [], so we need to use [ and ] instead.
38327  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38328  if test "x$has_forbidden_chars" != x; then
38329    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38330    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38331    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38332    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38333      # Going to short mode and back again did indeed matter. Since short mode is
38334      # case insensitive, let's make it lowercase to improve readability.
38335      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38336      # Now convert it back to Unix-style (cygpath)
38337      input_path=`$CYGPATH -u "$shortmode_path"`
38338      new_path="$input_path"
38339    fi
38340  fi
38341
38342  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38343  if test "x$test_cygdrive_prefix" = x; then
38344    # As a simple fix, exclude /usr/bin since it's not a real path.
38345    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38346      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38347      # a path prefixed by /cygdrive for fixpath to work.
38348      new_path="$CYGWIN_ROOT_PATH$input_path"
38349    fi
38350  fi
38351
38352  # remove trailing .exe if any
38353  new_path="${new_path/%.exe/}"
38354
38355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38356
38357  # First separate the path from the arguments. This will split at the first
38358  # space.
38359  complete="$LIPO"
38360  path="${complete%% *}"
38361  tmp="$complete EOL"
38362  arguments="${tmp#* }"
38363
38364  # Input might be given as Windows format, start by converting to
38365  # unix format.
38366  new_path="$path"
38367
38368  windows_path="$new_path"
38369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38370    unix_path=`$CYGPATH -u "$windows_path"`
38371    new_path="$unix_path"
38372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38374    new_path="$unix_path"
38375  fi
38376
38377
38378  # Now try to locate executable using which
38379  new_path=`$WHICH "$new_path" 2> /dev/null`
38380
38381  if test "x$new_path" = x; then
38382    # Oops. Which didn't find the executable.
38383    # The splitting of arguments from the executable at a space might have been incorrect,
38384    # since paths with space are more likely in Windows. Give it another try with the whole
38385    # argument.
38386    path="$complete"
38387    arguments="EOL"
38388    new_path="$path"
38389
38390  windows_path="$new_path"
38391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38392    unix_path=`$CYGPATH -u "$windows_path"`
38393    new_path="$unix_path"
38394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38396    new_path="$unix_path"
38397  fi
38398
38399
38400    new_path=`$WHICH "$new_path" 2> /dev/null`
38401    # bat and cmd files are not always considered executable in MSYS causing which
38402    # to not find them
38403    if test "x$new_path" = x \
38404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38406      new_path="$path"
38407
38408  windows_path="$new_path"
38409  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38410    unix_path=`$CYGPATH -u "$windows_path"`
38411    new_path="$unix_path"
38412  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38413    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38414    new_path="$unix_path"
38415  fi
38416
38417    fi
38418
38419    if test "x$new_path" = x; then
38420      # It's still not found. Now this is an unrecoverable error.
38421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38422$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38423      has_space=`$ECHO "$complete" | $GREP " "`
38424      if test "x$has_space" != x; then
38425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38427      fi
38428      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38429    fi
38430  fi
38431
38432  # Now new_path has a complete unix path to the binary
38433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38434    # Keep paths in /bin as-is, but remove trailing .exe if any
38435    new_path="${new_path/%.exe/}"
38436    # Do not save /bin paths to all_fixpath_prefixes!
38437  else
38438    # Not in mixed or Windows style, start by that.
38439    new_path=`cmd //c echo $new_path`
38440
38441  input_path="$new_path"
38442  # Check if we need to convert this using DOS-style short mode. If the path
38443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38444  # take no chances and rewrite it.
38445  # Note: m4 eats our [], so we need to use [ and ] instead.
38446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38447  if test "x$has_forbidden_chars" != x; then
38448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38450  fi
38451
38452    # Output is in $new_path
38453
38454  windows_path="$new_path"
38455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38456    unix_path=`$CYGPATH -u "$windows_path"`
38457    new_path="$unix_path"
38458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38460    new_path="$unix_path"
38461  fi
38462
38463    # remove trailing .exe if any
38464    new_path="${new_path/%.exe/}"
38465
38466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38468  fi
38469
38470    else
38471      # We're on a unix platform. Hooray! :)
38472      # First separate the path from the arguments. This will split at the first
38473      # space.
38474      complete="$LIPO"
38475      path="${complete%% *}"
38476      tmp="$complete EOL"
38477      arguments="${tmp#* }"
38478
38479      # Cannot rely on the command "which" here since it doesn't always work.
38480      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38481      if test -z "$is_absolute_path"; then
38482        # Path to executable is not absolute. Find it.
38483        IFS_save="$IFS"
38484        IFS=:
38485        for p in $PATH; do
38486          if test -f "$p/$path" && test -x "$p/$path"; then
38487            new_path="$p/$path"
38488            break
38489          fi
38490        done
38491        IFS="$IFS_save"
38492      else
38493        # This is an absolute path, we can use it without further modifications.
38494        new_path="$path"
38495      fi
38496
38497      if test "x$new_path" = x; then
38498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38499$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38500        has_space=`$ECHO "$complete" | $GREP " "`
38501        if test "x$has_space" != x; then
38502          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38504        fi
38505        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38506      fi
38507    fi
38508
38509    # Now join together the path and the arguments once again
38510    if test "x$arguments" != xEOL; then
38511      new_complete="$new_path ${arguments% *}"
38512    else
38513      new_complete="$new_path"
38514    fi
38515
38516    if test "x$complete" != "x$new_complete"; then
38517      LIPO="$new_complete"
38518      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38519$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38520    fi
38521  fi
38522
38523  fi
38524
38525  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38526    # Extract the first word of "mt", so it can be a program name with args.
38527set dummy mt; ac_word=$2
38528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38529$as_echo_n "checking for $ac_word... " >&6; }
38530if ${ac_cv_prog_MT+:} false; then :
38531  $as_echo_n "(cached) " >&6
38532else
38533  if test -n "$MT"; then
38534  ac_cv_prog_MT="$MT" # Let the user override the test.
38535else
38536  ac_prog_rejected=no
38537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38538for as_dir in $PATH
38539do
38540  IFS=$as_save_IFS
38541  test -z "$as_dir" && as_dir=.
38542    for ac_exec_ext in '' $ac_executable_extensions; do
38543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38544    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38545       ac_prog_rejected=yes
38546       continue
38547     fi
38548    ac_cv_prog_MT="mt"
38549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38550    break 2
38551  fi
38552done
38553  done
38554IFS=$as_save_IFS
38555
38556if test $ac_prog_rejected = yes; then
38557  # We found a bogon in the path, so make sure we never use it.
38558  set dummy $ac_cv_prog_MT
38559  shift
38560  if test $# != 0; then
38561    # We chose a different compiler from the bogus one.
38562    # However, it has the same basename, so the bogon will be chosen
38563    # first if we set MT to just the basename; use the full file name.
38564    shift
38565    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38566  fi
38567fi
38568fi
38569fi
38570MT=$ac_cv_prog_MT
38571if test -n "$MT"; then
38572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38573$as_echo "$MT" >&6; }
38574else
38575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38576$as_echo "no" >&6; }
38577fi
38578
38579
38580
38581  # Only process if variable expands to non-empty
38582
38583  if test "x$MT" != x; then
38584    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38585
38586  # First separate the path from the arguments. This will split at the first
38587  # space.
38588  complete="$MT"
38589  path="${complete%% *}"
38590  tmp="$complete EOL"
38591  arguments="${tmp#* }"
38592
38593  # Input might be given as Windows format, start by converting to
38594  # unix format.
38595  new_path=`$CYGPATH -u "$path"`
38596
38597  # Now try to locate executable using which
38598  new_path=`$WHICH "$new_path" 2> /dev/null`
38599  # bat and cmd files are not always considered executable in cygwin causing which
38600  # to not find them
38601  if test "x$new_path" = x \
38602      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38603      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38604    new_path=`$CYGPATH -u "$path"`
38605  fi
38606  if test "x$new_path" = x; then
38607    # Oops. Which didn't find the executable.
38608    # The splitting of arguments from the executable at a space might have been incorrect,
38609    # since paths with space are more likely in Windows. Give it another try with the whole
38610    # argument.
38611    path="$complete"
38612    arguments="EOL"
38613    new_path=`$CYGPATH -u "$path"`
38614    new_path=`$WHICH "$new_path" 2> /dev/null`
38615    # bat and cmd files are not always considered executable in cygwin causing which
38616    # to not find them
38617    if test "x$new_path" = x \
38618        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38619        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38620      new_path=`$CYGPATH -u "$path"`
38621    fi
38622    if test "x$new_path" = x; then
38623      # It's still not found. Now this is an unrecoverable error.
38624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38625$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38626      has_space=`$ECHO "$complete" | $GREP " "`
38627      if test "x$has_space" != x; then
38628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38630      fi
38631      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38632    fi
38633  fi
38634
38635  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38636  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38637  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38638  # "foo.exe" is OK but "foo" is an error.
38639  #
38640  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38641  # It is also a way to make sure we got the proper file name for the real test later on.
38642  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38643  if test "x$test_shortpath" = x; then
38644    # Short path failed, file does not exist as specified.
38645    # Try adding .exe or .cmd
38646    if test -f "${new_path}.exe"; then
38647      input_to_shortpath="${new_path}.exe"
38648    elif test -f "${new_path}.cmd"; then
38649      input_to_shortpath="${new_path}.cmd"
38650    else
38651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38652$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38653      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38654$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38655      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38656    fi
38657  else
38658    input_to_shortpath="$new_path"
38659  fi
38660
38661  # Call helper function which possibly converts this using DOS-style short mode.
38662  # If so, the updated path is stored in $new_path.
38663  new_path="$input_to_shortpath"
38664
38665  input_path="$input_to_shortpath"
38666  # Check if we need to convert this using DOS-style short mode. If the path
38667  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38668  # take no chances and rewrite it.
38669  # Note: m4 eats our [], so we need to use [ and ] instead.
38670  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38671  if test "x$has_forbidden_chars" != x; then
38672    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38673    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38674    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38675    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38676      # Going to short mode and back again did indeed matter. Since short mode is
38677      # case insensitive, let's make it lowercase to improve readability.
38678      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38679      # Now convert it back to Unix-style (cygpath)
38680      input_path=`$CYGPATH -u "$shortmode_path"`
38681      new_path="$input_path"
38682    fi
38683  fi
38684
38685  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38686  if test "x$test_cygdrive_prefix" = x; then
38687    # As a simple fix, exclude /usr/bin since it's not a real path.
38688    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38689      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38690      # a path prefixed by /cygdrive for fixpath to work.
38691      new_path="$CYGWIN_ROOT_PATH$input_path"
38692    fi
38693  fi
38694
38695  # remove trailing .exe if any
38696  new_path="${new_path/%.exe/}"
38697
38698    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38699
38700  # First separate the path from the arguments. This will split at the first
38701  # space.
38702  complete="$MT"
38703  path="${complete%% *}"
38704  tmp="$complete EOL"
38705  arguments="${tmp#* }"
38706
38707  # Input might be given as Windows format, start by converting to
38708  # unix format.
38709  new_path="$path"
38710
38711  windows_path="$new_path"
38712  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38713    unix_path=`$CYGPATH -u "$windows_path"`
38714    new_path="$unix_path"
38715  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38716    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38717    new_path="$unix_path"
38718  fi
38719
38720
38721  # Now try to locate executable using which
38722  new_path=`$WHICH "$new_path" 2> /dev/null`
38723
38724  if test "x$new_path" = x; then
38725    # Oops. Which didn't find the executable.
38726    # The splitting of arguments from the executable at a space might have been incorrect,
38727    # since paths with space are more likely in Windows. Give it another try with the whole
38728    # argument.
38729    path="$complete"
38730    arguments="EOL"
38731    new_path="$path"
38732
38733  windows_path="$new_path"
38734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38735    unix_path=`$CYGPATH -u "$windows_path"`
38736    new_path="$unix_path"
38737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38739    new_path="$unix_path"
38740  fi
38741
38742
38743    new_path=`$WHICH "$new_path" 2> /dev/null`
38744    # bat and cmd files are not always considered executable in MSYS causing which
38745    # to not find them
38746    if test "x$new_path" = x \
38747        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38748        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38749      new_path="$path"
38750
38751  windows_path="$new_path"
38752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38753    unix_path=`$CYGPATH -u "$windows_path"`
38754    new_path="$unix_path"
38755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38757    new_path="$unix_path"
38758  fi
38759
38760    fi
38761
38762    if test "x$new_path" = x; then
38763      # It's still not found. Now this is an unrecoverable error.
38764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38765$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38766      has_space=`$ECHO "$complete" | $GREP " "`
38767      if test "x$has_space" != x; then
38768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38770      fi
38771      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38772    fi
38773  fi
38774
38775  # Now new_path has a complete unix path to the binary
38776  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38777    # Keep paths in /bin as-is, but remove trailing .exe if any
38778    new_path="${new_path/%.exe/}"
38779    # Do not save /bin paths to all_fixpath_prefixes!
38780  else
38781    # Not in mixed or Windows style, start by that.
38782    new_path=`cmd //c echo $new_path`
38783
38784  input_path="$new_path"
38785  # Check if we need to convert this using DOS-style short mode. If the path
38786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38787  # take no chances and rewrite it.
38788  # Note: m4 eats our [], so we need to use [ and ] instead.
38789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38790  if test "x$has_forbidden_chars" != x; then
38791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38793  fi
38794
38795    # Output is in $new_path
38796
38797  windows_path="$new_path"
38798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38799    unix_path=`$CYGPATH -u "$windows_path"`
38800    new_path="$unix_path"
38801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38803    new_path="$unix_path"
38804  fi
38805
38806    # remove trailing .exe if any
38807    new_path="${new_path/%.exe/}"
38808
38809    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38810    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38811  fi
38812
38813    else
38814      # We're on a unix platform. Hooray! :)
38815      # First separate the path from the arguments. This will split at the first
38816      # space.
38817      complete="$MT"
38818      path="${complete%% *}"
38819      tmp="$complete EOL"
38820      arguments="${tmp#* }"
38821
38822      # Cannot rely on the command "which" here since it doesn't always work.
38823      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38824      if test -z "$is_absolute_path"; then
38825        # Path to executable is not absolute. Find it.
38826        IFS_save="$IFS"
38827        IFS=:
38828        for p in $PATH; do
38829          if test -f "$p/$path" && test -x "$p/$path"; then
38830            new_path="$p/$path"
38831            break
38832          fi
38833        done
38834        IFS="$IFS_save"
38835      else
38836        # This is an absolute path, we can use it without further modifications.
38837        new_path="$path"
38838      fi
38839
38840      if test "x$new_path" = x; then
38841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38842$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38843        has_space=`$ECHO "$complete" | $GREP " "`
38844        if test "x$has_space" != x; then
38845          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38846$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38847        fi
38848        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38849      fi
38850    fi
38851
38852    # Now join together the path and the arguments once again
38853    if test "x$arguments" != xEOL; then
38854      new_complete="$new_path ${arguments% *}"
38855    else
38856      new_complete="$new_path"
38857    fi
38858
38859    if test "x$complete" != "x$new_complete"; then
38860      MT="$new_complete"
38861      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38862$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38863    fi
38864  fi
38865
38866    # Setup the resource compiler (RC)
38867    # Extract the first word of "rc", so it can be a program name with args.
38868set dummy rc; ac_word=$2
38869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38870$as_echo_n "checking for $ac_word... " >&6; }
38871if ${ac_cv_prog_RC+:} false; then :
38872  $as_echo_n "(cached) " >&6
38873else
38874  if test -n "$RC"; then
38875  ac_cv_prog_RC="$RC" # Let the user override the test.
38876else
38877  ac_prog_rejected=no
38878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38879for as_dir in $PATH
38880do
38881  IFS=$as_save_IFS
38882  test -z "$as_dir" && as_dir=.
38883    for ac_exec_ext in '' $ac_executable_extensions; do
38884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38885    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38886       ac_prog_rejected=yes
38887       continue
38888     fi
38889    ac_cv_prog_RC="rc"
38890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38891    break 2
38892  fi
38893done
38894  done
38895IFS=$as_save_IFS
38896
38897if test $ac_prog_rejected = yes; then
38898  # We found a bogon in the path, so make sure we never use it.
38899  set dummy $ac_cv_prog_RC
38900  shift
38901  if test $# != 0; then
38902    # We chose a different compiler from the bogus one.
38903    # However, it has the same basename, so the bogon will be chosen
38904    # first if we set RC to just the basename; use the full file name.
38905    shift
38906    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38907  fi
38908fi
38909fi
38910fi
38911RC=$ac_cv_prog_RC
38912if test -n "$RC"; then
38913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38914$as_echo "$RC" >&6; }
38915else
38916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38917$as_echo "no" >&6; }
38918fi
38919
38920
38921
38922  # Only process if variable expands to non-empty
38923
38924  if test "x$RC" != x; then
38925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38926
38927  # First separate the path from the arguments. This will split at the first
38928  # space.
38929  complete="$RC"
38930  path="${complete%% *}"
38931  tmp="$complete EOL"
38932  arguments="${tmp#* }"
38933
38934  # Input might be given as Windows format, start by converting to
38935  # unix format.
38936  new_path=`$CYGPATH -u "$path"`
38937
38938  # Now try to locate executable using which
38939  new_path=`$WHICH "$new_path" 2> /dev/null`
38940  # bat and cmd files are not always considered executable in cygwin causing which
38941  # to not find them
38942  if test "x$new_path" = x \
38943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38945    new_path=`$CYGPATH -u "$path"`
38946  fi
38947  if test "x$new_path" = x; then
38948    # Oops. Which didn't find the executable.
38949    # The splitting of arguments from the executable at a space might have been incorrect,
38950    # since paths with space are more likely in Windows. Give it another try with the whole
38951    # argument.
38952    path="$complete"
38953    arguments="EOL"
38954    new_path=`$CYGPATH -u "$path"`
38955    new_path=`$WHICH "$new_path" 2> /dev/null`
38956    # bat and cmd files are not always considered executable in cygwin causing which
38957    # to not find them
38958    if test "x$new_path" = x \
38959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38961      new_path=`$CYGPATH -u "$path"`
38962    fi
38963    if test "x$new_path" = x; then
38964      # It's still not found. Now this is an unrecoverable error.
38965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38966$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38967      has_space=`$ECHO "$complete" | $GREP " "`
38968      if test "x$has_space" != x; then
38969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38971      fi
38972      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38973    fi
38974  fi
38975
38976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38979  # "foo.exe" is OK but "foo" is an error.
38980  #
38981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38982  # It is also a way to make sure we got the proper file name for the real test later on.
38983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38984  if test "x$test_shortpath" = x; then
38985    # Short path failed, file does not exist as specified.
38986    # Try adding .exe or .cmd
38987    if test -f "${new_path}.exe"; then
38988      input_to_shortpath="${new_path}.exe"
38989    elif test -f "${new_path}.cmd"; then
38990      input_to_shortpath="${new_path}.cmd"
38991    else
38992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38993$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38996      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38997    fi
38998  else
38999    input_to_shortpath="$new_path"
39000  fi
39001
39002  # Call helper function which possibly converts this using DOS-style short mode.
39003  # If so, the updated path is stored in $new_path.
39004  new_path="$input_to_shortpath"
39005
39006  input_path="$input_to_shortpath"
39007  # Check if we need to convert this using DOS-style short mode. If the path
39008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39009  # take no chances and rewrite it.
39010  # Note: m4 eats our [], so we need to use [ and ] instead.
39011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39012  if test "x$has_forbidden_chars" != x; then
39013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39017      # Going to short mode and back again did indeed matter. Since short mode is
39018      # case insensitive, let's make it lowercase to improve readability.
39019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39020      # Now convert it back to Unix-style (cygpath)
39021      input_path=`$CYGPATH -u "$shortmode_path"`
39022      new_path="$input_path"
39023    fi
39024  fi
39025
39026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39027  if test "x$test_cygdrive_prefix" = x; then
39028    # As a simple fix, exclude /usr/bin since it's not a real path.
39029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39031      # a path prefixed by /cygdrive for fixpath to work.
39032      new_path="$CYGWIN_ROOT_PATH$input_path"
39033    fi
39034  fi
39035
39036  # remove trailing .exe if any
39037  new_path="${new_path/%.exe/}"
39038
39039    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39040
39041  # First separate the path from the arguments. This will split at the first
39042  # space.
39043  complete="$RC"
39044  path="${complete%% *}"
39045  tmp="$complete EOL"
39046  arguments="${tmp#* }"
39047
39048  # Input might be given as Windows format, start by converting to
39049  # unix format.
39050  new_path="$path"
39051
39052  windows_path="$new_path"
39053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39054    unix_path=`$CYGPATH -u "$windows_path"`
39055    new_path="$unix_path"
39056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39058    new_path="$unix_path"
39059  fi
39060
39061
39062  # Now try to locate executable using which
39063  new_path=`$WHICH "$new_path" 2> /dev/null`
39064
39065  if test "x$new_path" = x; then
39066    # Oops. Which didn't find the executable.
39067    # The splitting of arguments from the executable at a space might have been incorrect,
39068    # since paths with space are more likely in Windows. Give it another try with the whole
39069    # argument.
39070    path="$complete"
39071    arguments="EOL"
39072    new_path="$path"
39073
39074  windows_path="$new_path"
39075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39076    unix_path=`$CYGPATH -u "$windows_path"`
39077    new_path="$unix_path"
39078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39080    new_path="$unix_path"
39081  fi
39082
39083
39084    new_path=`$WHICH "$new_path" 2> /dev/null`
39085    # bat and cmd files are not always considered executable in MSYS causing which
39086    # to not find them
39087    if test "x$new_path" = x \
39088        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39089        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39090      new_path="$path"
39091
39092  windows_path="$new_path"
39093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39094    unix_path=`$CYGPATH -u "$windows_path"`
39095    new_path="$unix_path"
39096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39098    new_path="$unix_path"
39099  fi
39100
39101    fi
39102
39103    if test "x$new_path" = x; then
39104      # It's still not found. Now this is an unrecoverable error.
39105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39106$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39107      has_space=`$ECHO "$complete" | $GREP " "`
39108      if test "x$has_space" != x; then
39109        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39110$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39111      fi
39112      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39113    fi
39114  fi
39115
39116  # Now new_path has a complete unix path to the binary
39117  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39118    # Keep paths in /bin as-is, but remove trailing .exe if any
39119    new_path="${new_path/%.exe/}"
39120    # Do not save /bin paths to all_fixpath_prefixes!
39121  else
39122    # Not in mixed or Windows style, start by that.
39123    new_path=`cmd //c echo $new_path`
39124
39125  input_path="$new_path"
39126  # Check if we need to convert this using DOS-style short mode. If the path
39127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39128  # take no chances and rewrite it.
39129  # Note: m4 eats our [], so we need to use [ and ] instead.
39130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39131  if test "x$has_forbidden_chars" != x; then
39132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39134  fi
39135
39136    # Output is in $new_path
39137
39138  windows_path="$new_path"
39139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39140    unix_path=`$CYGPATH -u "$windows_path"`
39141    new_path="$unix_path"
39142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39144    new_path="$unix_path"
39145  fi
39146
39147    # remove trailing .exe if any
39148    new_path="${new_path/%.exe/}"
39149
39150    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39151    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39152  fi
39153
39154    else
39155      # We're on a unix platform. Hooray! :)
39156      # First separate the path from the arguments. This will split at the first
39157      # space.
39158      complete="$RC"
39159      path="${complete%% *}"
39160      tmp="$complete EOL"
39161      arguments="${tmp#* }"
39162
39163      # Cannot rely on the command "which" here since it doesn't always work.
39164      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39165      if test -z "$is_absolute_path"; then
39166        # Path to executable is not absolute. Find it.
39167        IFS_save="$IFS"
39168        IFS=:
39169        for p in $PATH; do
39170          if test -f "$p/$path" && test -x "$p/$path"; then
39171            new_path="$p/$path"
39172            break
39173          fi
39174        done
39175        IFS="$IFS_save"
39176      else
39177        # This is an absolute path, we can use it without further modifications.
39178        new_path="$path"
39179      fi
39180
39181      if test "x$new_path" = x; then
39182        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39183$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39184        has_space=`$ECHO "$complete" | $GREP " "`
39185        if test "x$has_space" != x; then
39186          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39187$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39188        fi
39189        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39190      fi
39191    fi
39192
39193    # Now join together the path and the arguments once again
39194    if test "x$arguments" != xEOL; then
39195      new_complete="$new_path ${arguments% *}"
39196    else
39197      new_complete="$new_path"
39198    fi
39199
39200    if test "x$complete" != "x$new_complete"; then
39201      RC="$new_complete"
39202      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39203$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39204    fi
39205  fi
39206
39207    # Extract the first word of "dumpbin", so it can be a program name with args.
39208set dummy dumpbin; ac_word=$2
39209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39210$as_echo_n "checking for $ac_word... " >&6; }
39211if ${ac_cv_prog_DUMPBIN+:} false; then :
39212  $as_echo_n "(cached) " >&6
39213else
39214  if test -n "$DUMPBIN"; then
39215  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39216else
39217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39218for as_dir in $PATH
39219do
39220  IFS=$as_save_IFS
39221  test -z "$as_dir" && as_dir=.
39222    for ac_exec_ext in '' $ac_executable_extensions; do
39223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39224    ac_cv_prog_DUMPBIN="dumpbin"
39225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39226    break 2
39227  fi
39228done
39229  done
39230IFS=$as_save_IFS
39231
39232fi
39233fi
39234DUMPBIN=$ac_cv_prog_DUMPBIN
39235if test -n "$DUMPBIN"; then
39236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39237$as_echo "$DUMPBIN" >&6; }
39238else
39239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39240$as_echo "no" >&6; }
39241fi
39242
39243
39244
39245  # Only process if variable expands to non-empty
39246
39247  if test "x$DUMPBIN" != x; then
39248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39249
39250  # First separate the path from the arguments. This will split at the first
39251  # space.
39252  complete="$DUMPBIN"
39253  path="${complete%% *}"
39254  tmp="$complete EOL"
39255  arguments="${tmp#* }"
39256
39257  # Input might be given as Windows format, start by converting to
39258  # unix format.
39259  new_path=`$CYGPATH -u "$path"`
39260
39261  # Now try to locate executable using which
39262  new_path=`$WHICH "$new_path" 2> /dev/null`
39263  # bat and cmd files are not always considered executable in cygwin 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=`$CYGPATH -u "$path"`
39269  fi
39270  if test "x$new_path" = x; then
39271    # Oops. Which didn't find the executable.
39272    # The splitting of arguments from the executable at a space might have been incorrect,
39273    # since paths with space are more likely in Windows. Give it another try with the whole
39274    # argument.
39275    path="$complete"
39276    arguments="EOL"
39277    new_path=`$CYGPATH -u "$path"`
39278    new_path=`$WHICH "$new_path" 2> /dev/null`
39279    # bat and cmd files are not always considered executable in cygwin causing which
39280    # to not find them
39281    if test "x$new_path" = x \
39282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39284      new_path=`$CYGPATH -u "$path"`
39285    fi
39286    if test "x$new_path" = x; then
39287      # It's still not found. Now this is an unrecoverable error.
39288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39289$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39290      has_space=`$ECHO "$complete" | $GREP " "`
39291      if test "x$has_space" != x; then
39292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39294      fi
39295      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39296    fi
39297  fi
39298
39299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39302  # "foo.exe" is OK but "foo" is an error.
39303  #
39304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39305  # It is also a way to make sure we got the proper file name for the real test later on.
39306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39307  if test "x$test_shortpath" = x; then
39308    # Short path failed, file does not exist as specified.
39309    # Try adding .exe or .cmd
39310    if test -f "${new_path}.exe"; then
39311      input_to_shortpath="${new_path}.exe"
39312    elif test -f "${new_path}.cmd"; then
39313      input_to_shortpath="${new_path}.cmd"
39314    else
39315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39316$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39319      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39320    fi
39321  else
39322    input_to_shortpath="$new_path"
39323  fi
39324
39325  # Call helper function which possibly converts this using DOS-style short mode.
39326  # If so, the updated path is stored in $new_path.
39327  new_path="$input_to_shortpath"
39328
39329  input_path="$input_to_shortpath"
39330  # Check if we need to convert this using DOS-style short mode. If the path
39331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39332  # take no chances and rewrite it.
39333  # Note: m4 eats our [], so we need to use [ and ] instead.
39334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39335  if test "x$has_forbidden_chars" != x; then
39336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39340      # Going to short mode and back again did indeed matter. Since short mode is
39341      # case insensitive, let's make it lowercase to improve readability.
39342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39343      # Now convert it back to Unix-style (cygpath)
39344      input_path=`$CYGPATH -u "$shortmode_path"`
39345      new_path="$input_path"
39346    fi
39347  fi
39348
39349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39350  if test "x$test_cygdrive_prefix" = x; then
39351    # As a simple fix, exclude /usr/bin since it's not a real path.
39352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39354      # a path prefixed by /cygdrive for fixpath to work.
39355      new_path="$CYGWIN_ROOT_PATH$input_path"
39356    fi
39357  fi
39358
39359  # remove trailing .exe if any
39360  new_path="${new_path/%.exe/}"
39361
39362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39363
39364  # First separate the path from the arguments. This will split at the first
39365  # space.
39366  complete="$DUMPBIN"
39367  path="${complete%% *}"
39368  tmp="$complete EOL"
39369  arguments="${tmp#* }"
39370
39371  # Input might be given as Windows format, start by converting to
39372  # unix format.
39373  new_path="$path"
39374
39375  windows_path="$new_path"
39376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39377    unix_path=`$CYGPATH -u "$windows_path"`
39378    new_path="$unix_path"
39379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39381    new_path="$unix_path"
39382  fi
39383
39384
39385  # Now try to locate executable using which
39386  new_path=`$WHICH "$new_path" 2> /dev/null`
39387
39388  if test "x$new_path" = x; then
39389    # Oops. Which didn't find the executable.
39390    # The splitting of arguments from the executable at a space might have been incorrect,
39391    # since paths with space are more likely in Windows. Give it another try with the whole
39392    # argument.
39393    path="$complete"
39394    arguments="EOL"
39395    new_path="$path"
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406
39407    new_path=`$WHICH "$new_path" 2> /dev/null`
39408    # bat and cmd files are not always considered executable in MSYS causing which
39409    # to not find them
39410    if test "x$new_path" = x \
39411        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39412        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39413      new_path="$path"
39414
39415  windows_path="$new_path"
39416  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39417    unix_path=`$CYGPATH -u "$windows_path"`
39418    new_path="$unix_path"
39419  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39420    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39421    new_path="$unix_path"
39422  fi
39423
39424    fi
39425
39426    if test "x$new_path" = x; then
39427      # It's still not found. Now this is an unrecoverable error.
39428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39429$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39430      has_space=`$ECHO "$complete" | $GREP " "`
39431      if test "x$has_space" != x; then
39432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39434      fi
39435      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39436    fi
39437  fi
39438
39439  # Now new_path has a complete unix path to the binary
39440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39441    # Keep paths in /bin as-is, but remove trailing .exe if any
39442    new_path="${new_path/%.exe/}"
39443    # Do not save /bin paths to all_fixpath_prefixes!
39444  else
39445    # Not in mixed or Windows style, start by that.
39446    new_path=`cmd //c echo $new_path`
39447
39448  input_path="$new_path"
39449  # Check if we need to convert this using DOS-style short mode. If the path
39450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39451  # take no chances and rewrite it.
39452  # Note: m4 eats our [], so we need to use [ and ] instead.
39453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39454  if test "x$has_forbidden_chars" != x; then
39455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39457  fi
39458
39459    # Output is in $new_path
39460
39461  windows_path="$new_path"
39462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39463    unix_path=`$CYGPATH -u "$windows_path"`
39464    new_path="$unix_path"
39465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39467    new_path="$unix_path"
39468  fi
39469
39470    # remove trailing .exe if any
39471    new_path="${new_path/%.exe/}"
39472
39473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39475  fi
39476
39477    else
39478      # We're on a unix platform. Hooray! :)
39479      # First separate the path from the arguments. This will split at the first
39480      # space.
39481      complete="$DUMPBIN"
39482      path="${complete%% *}"
39483      tmp="$complete EOL"
39484      arguments="${tmp#* }"
39485
39486      # Cannot rely on the command "which" here since it doesn't always work.
39487      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39488      if test -z "$is_absolute_path"; then
39489        # Path to executable is not absolute. Find it.
39490        IFS_save="$IFS"
39491        IFS=:
39492        for p in $PATH; do
39493          if test -f "$p/$path" && test -x "$p/$path"; then
39494            new_path="$p/$path"
39495            break
39496          fi
39497        done
39498        IFS="$IFS_save"
39499      else
39500        # This is an absolute path, we can use it without further modifications.
39501        new_path="$path"
39502      fi
39503
39504      if test "x$new_path" = x; then
39505        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39506$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39507        has_space=`$ECHO "$complete" | $GREP " "`
39508        if test "x$has_space" != x; then
39509          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39511        fi
39512        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39513      fi
39514    fi
39515
39516    # Now join together the path and the arguments once again
39517    if test "x$arguments" != xEOL; then
39518      new_complete="$new_path ${arguments% *}"
39519    else
39520      new_complete="$new_path"
39521    fi
39522
39523    if test "x$complete" != "x$new_complete"; then
39524      DUMPBIN="$new_complete"
39525      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39526$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39527    fi
39528  fi
39529
39530    # We need to check for 'msbuild.exe' because at the place where we expect to
39531    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39532    # won't find the 'msbuild.exe' executable in that case (and the
39533    # 'ac_executable_extensions' is unusable due to performance reasons).
39534    # Notice that we intentionally don't fix up the path to MSBUILD because we
39535    # will call it in a DOS shell during freetype detection on Windows (see
39536    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39537    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39538set dummy msbuild.exe; ac_word=$2
39539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39540$as_echo_n "checking for $ac_word... " >&6; }
39541if ${ac_cv_prog_MSBUILD+:} false; then :
39542  $as_echo_n "(cached) " >&6
39543else
39544  if test -n "$MSBUILD"; then
39545  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39546else
39547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39548for as_dir in $PATH
39549do
39550  IFS=$as_save_IFS
39551  test -z "$as_dir" && as_dir=.
39552    for ac_exec_ext in '' $ac_executable_extensions; do
39553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39554    ac_cv_prog_MSBUILD="msbuild.exe"
39555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39556    break 2
39557  fi
39558done
39559  done
39560IFS=$as_save_IFS
39561
39562fi
39563fi
39564MSBUILD=$ac_cv_prog_MSBUILD
39565if test -n "$MSBUILD"; then
39566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39567$as_echo "$MSBUILD" >&6; }
39568else
39569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39570$as_echo "no" >&6; }
39571fi
39572
39573
39574  fi
39575
39576  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39577
39578
39579  # Publish this variable in the help.
39580
39581
39582  if [ -z "${STRIP+x}" ]; then
39583    # The variable is not set by user, try to locate tool using the code snippet
39584    for ac_prog in strip
39585do
39586  # Extract the first word of "$ac_prog", so it can be a program name with args.
39587set dummy $ac_prog; ac_word=$2
39588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39589$as_echo_n "checking for $ac_word... " >&6; }
39590if ${ac_cv_path_STRIP+:} false; then :
39591  $as_echo_n "(cached) " >&6
39592else
39593  case $STRIP in
39594  [\\/]* | ?:[\\/]*)
39595  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39596  ;;
39597  *)
39598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39599for as_dir in $PATH
39600do
39601  IFS=$as_save_IFS
39602  test -z "$as_dir" && as_dir=.
39603    for ac_exec_ext in '' $ac_executable_extensions; do
39604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39605    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39607    break 2
39608  fi
39609done
39610  done
39611IFS=$as_save_IFS
39612
39613  ;;
39614esac
39615fi
39616STRIP=$ac_cv_path_STRIP
39617if test -n "$STRIP"; then
39618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39619$as_echo "$STRIP" >&6; }
39620else
39621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39622$as_echo "no" >&6; }
39623fi
39624
39625
39626  test -n "$STRIP" && break
39627done
39628
39629  else
39630    # The variable is set, but is it from the command line or the environment?
39631
39632    # Try to remove the string !STRIP! from our list.
39633    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39634    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39635      # If it failed, the variable was not from the command line. Ignore it,
39636      # but warn the user (except for BASH, which is always set by the calling BASH).
39637      if test "xSTRIP" != xBASH; then
39638        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39639$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39640      fi
39641      # Try to locate tool using the code snippet
39642      for ac_prog in strip
39643do
39644  # Extract the first word of "$ac_prog", so it can be a program name with args.
39645set dummy $ac_prog; ac_word=$2
39646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39647$as_echo_n "checking for $ac_word... " >&6; }
39648if ${ac_cv_path_STRIP+:} false; then :
39649  $as_echo_n "(cached) " >&6
39650else
39651  case $STRIP in
39652  [\\/]* | ?:[\\/]*)
39653  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39654  ;;
39655  *)
39656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39657for as_dir in $PATH
39658do
39659  IFS=$as_save_IFS
39660  test -z "$as_dir" && as_dir=.
39661    for ac_exec_ext in '' $ac_executable_extensions; do
39662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39663    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39665    break 2
39666  fi
39667done
39668  done
39669IFS=$as_save_IFS
39670
39671  ;;
39672esac
39673fi
39674STRIP=$ac_cv_path_STRIP
39675if test -n "$STRIP"; then
39676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39677$as_echo "$STRIP" >&6; }
39678else
39679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39680$as_echo "no" >&6; }
39681fi
39682
39683
39684  test -n "$STRIP" && break
39685done
39686
39687    else
39688      # If it succeeded, then it was overridden by the user. We will use it
39689      # for the tool.
39690
39691      # First remove it from the list of overridden variables, so we can test
39692      # for unknown variables in the end.
39693      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39694
39695      # Check if we try to supply an empty value
39696      if test "x$STRIP" = x; then
39697        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39698$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39700$as_echo_n "checking for STRIP... " >&6; }
39701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39702$as_echo "disabled" >&6; }
39703      else
39704        # Check if the provided tool contains a complete path.
39705        tool_specified="$STRIP"
39706        tool_basename="${tool_specified##*/}"
39707        if test "x$tool_basename" = "x$tool_specified"; then
39708          # A command without a complete path is provided, search $PATH.
39709          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39710$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39711          # Extract the first word of "$tool_basename", so it can be a program name with args.
39712set dummy $tool_basename; ac_word=$2
39713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39714$as_echo_n "checking for $ac_word... " >&6; }
39715if ${ac_cv_path_STRIP+:} false; then :
39716  $as_echo_n "(cached) " >&6
39717else
39718  case $STRIP in
39719  [\\/]* | ?:[\\/]*)
39720  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39721  ;;
39722  *)
39723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39724for as_dir in $PATH
39725do
39726  IFS=$as_save_IFS
39727  test -z "$as_dir" && as_dir=.
39728    for ac_exec_ext in '' $ac_executable_extensions; do
39729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39730    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39732    break 2
39733  fi
39734done
39735  done
39736IFS=$as_save_IFS
39737
39738  ;;
39739esac
39740fi
39741STRIP=$ac_cv_path_STRIP
39742if test -n "$STRIP"; then
39743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39744$as_echo "$STRIP" >&6; }
39745else
39746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39747$as_echo "no" >&6; }
39748fi
39749
39750
39751          if test "x$STRIP" = x; then
39752            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39753          fi
39754        else
39755          # Otherwise we believe it is a complete path. Use it as it is.
39756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39757$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39758          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39759$as_echo_n "checking for STRIP... " >&6; }
39760          if test ! -x "$tool_specified"; then
39761            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39762$as_echo "not found" >&6; }
39763            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39764          fi
39765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39766$as_echo "$tool_specified" >&6; }
39767        fi
39768      fi
39769    fi
39770
39771  fi
39772
39773
39774
39775  # Only process if variable expands to non-empty
39776
39777  if test "x$STRIP" != x; then
39778    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39779
39780  # First separate the path from the arguments. This will split at the first
39781  # space.
39782  complete="$STRIP"
39783  path="${complete%% *}"
39784  tmp="$complete EOL"
39785  arguments="${tmp#* }"
39786
39787  # Input might be given as Windows format, start by converting to
39788  # unix format.
39789  new_path=`$CYGPATH -u "$path"`
39790
39791  # Now try to locate executable using which
39792  new_path=`$WHICH "$new_path" 2> /dev/null`
39793  # bat and cmd files are not always considered executable in cygwin causing which
39794  # to not find them
39795  if test "x$new_path" = x \
39796      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39797      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39798    new_path=`$CYGPATH -u "$path"`
39799  fi
39800  if test "x$new_path" = x; then
39801    # Oops. Which didn't find the executable.
39802    # The splitting of arguments from the executable at a space might have been incorrect,
39803    # since paths with space are more likely in Windows. Give it another try with the whole
39804    # argument.
39805    path="$complete"
39806    arguments="EOL"
39807    new_path=`$CYGPATH -u "$path"`
39808    new_path=`$WHICH "$new_path" 2> /dev/null`
39809    # bat and cmd files are not always considered executable in cygwin causing which
39810    # to not find them
39811    if test "x$new_path" = x \
39812        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39813        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39814      new_path=`$CYGPATH -u "$path"`
39815    fi
39816    if test "x$new_path" = x; then
39817      # It's still not found. Now this is an unrecoverable error.
39818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39819$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39820      has_space=`$ECHO "$complete" | $GREP " "`
39821      if test "x$has_space" != x; then
39822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39824      fi
39825      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39826    fi
39827  fi
39828
39829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39832  # "foo.exe" is OK but "foo" is an error.
39833  #
39834  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39835  # It is also a way to make sure we got the proper file name for the real test later on.
39836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39837  if test "x$test_shortpath" = x; then
39838    # Short path failed, file does not exist as specified.
39839    # Try adding .exe or .cmd
39840    if test -f "${new_path}.exe"; then
39841      input_to_shortpath="${new_path}.exe"
39842    elif test -f "${new_path}.cmd"; then
39843      input_to_shortpath="${new_path}.cmd"
39844    else
39845      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39846$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39847      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39848$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39849      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39850    fi
39851  else
39852    input_to_shortpath="$new_path"
39853  fi
39854
39855  # Call helper function which possibly converts this using DOS-style short mode.
39856  # If so, the updated path is stored in $new_path.
39857  new_path="$input_to_shortpath"
39858
39859  input_path="$input_to_shortpath"
39860  # Check if we need to convert this using DOS-style short mode. If the path
39861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39862  # take no chances and rewrite it.
39863  # Note: m4 eats our [], so we need to use [ and ] instead.
39864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39865  if test "x$has_forbidden_chars" != x; then
39866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39870      # Going to short mode and back again did indeed matter. Since short mode is
39871      # case insensitive, let's make it lowercase to improve readability.
39872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39873      # Now convert it back to Unix-style (cygpath)
39874      input_path=`$CYGPATH -u "$shortmode_path"`
39875      new_path="$input_path"
39876    fi
39877  fi
39878
39879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39880  if test "x$test_cygdrive_prefix" = x; then
39881    # As a simple fix, exclude /usr/bin since it's not a real path.
39882    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39884      # a path prefixed by /cygdrive for fixpath to work.
39885      new_path="$CYGWIN_ROOT_PATH$input_path"
39886    fi
39887  fi
39888
39889  # remove trailing .exe if any
39890  new_path="${new_path/%.exe/}"
39891
39892    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39893
39894  # First separate the path from the arguments. This will split at the first
39895  # space.
39896  complete="$STRIP"
39897  path="${complete%% *}"
39898  tmp="$complete EOL"
39899  arguments="${tmp#* }"
39900
39901  # Input might be given as Windows format, start by converting to
39902  # unix format.
39903  new_path="$path"
39904
39905  windows_path="$new_path"
39906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39907    unix_path=`$CYGPATH -u "$windows_path"`
39908    new_path="$unix_path"
39909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39911    new_path="$unix_path"
39912  fi
39913
39914
39915  # Now try to locate executable using which
39916  new_path=`$WHICH "$new_path" 2> /dev/null`
39917
39918  if test "x$new_path" = x; then
39919    # Oops. Which didn't find the executable.
39920    # The splitting of arguments from the executable at a space might have been incorrect,
39921    # since paths with space are more likely in Windows. Give it another try with the whole
39922    # argument.
39923    path="$complete"
39924    arguments="EOL"
39925    new_path="$path"
39926
39927  windows_path="$new_path"
39928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39929    unix_path=`$CYGPATH -u "$windows_path"`
39930    new_path="$unix_path"
39931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39933    new_path="$unix_path"
39934  fi
39935
39936
39937    new_path=`$WHICH "$new_path" 2> /dev/null`
39938    # bat and cmd files are not always considered executable in MSYS causing which
39939    # to not find them
39940    if test "x$new_path" = x \
39941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39943      new_path="$path"
39944
39945  windows_path="$new_path"
39946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39947    unix_path=`$CYGPATH -u "$windows_path"`
39948    new_path="$unix_path"
39949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39951    new_path="$unix_path"
39952  fi
39953
39954    fi
39955
39956    if test "x$new_path" = x; then
39957      # It's still not found. Now this is an unrecoverable error.
39958      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39959$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39960      has_space=`$ECHO "$complete" | $GREP " "`
39961      if test "x$has_space" != x; then
39962        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39963$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39964      fi
39965      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39966    fi
39967  fi
39968
39969  # Now new_path has a complete unix path to the binary
39970  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39971    # Keep paths in /bin as-is, but remove trailing .exe if any
39972    new_path="${new_path/%.exe/}"
39973    # Do not save /bin paths to all_fixpath_prefixes!
39974  else
39975    # Not in mixed or Windows style, start by that.
39976    new_path=`cmd //c echo $new_path`
39977
39978  input_path="$new_path"
39979  # Check if we need to convert this using DOS-style short mode. If the path
39980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39981  # take no chances and rewrite it.
39982  # Note: m4 eats our [], so we need to use [ and ] instead.
39983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39984  if test "x$has_forbidden_chars" != x; then
39985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39987  fi
39988
39989    # Output is in $new_path
39990
39991  windows_path="$new_path"
39992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39993    unix_path=`$CYGPATH -u "$windows_path"`
39994    new_path="$unix_path"
39995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39997    new_path="$unix_path"
39998  fi
39999
40000    # remove trailing .exe if any
40001    new_path="${new_path/%.exe/}"
40002
40003    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40004    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40005  fi
40006
40007    else
40008      # We're on a unix platform. Hooray! :)
40009      # First separate the path from the arguments. This will split at the first
40010      # space.
40011      complete="$STRIP"
40012      path="${complete%% *}"
40013      tmp="$complete EOL"
40014      arguments="${tmp#* }"
40015
40016      # Cannot rely on the command "which" here since it doesn't always work.
40017      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40018      if test -z "$is_absolute_path"; then
40019        # Path to executable is not absolute. Find it.
40020        IFS_save="$IFS"
40021        IFS=:
40022        for p in $PATH; do
40023          if test -f "$p/$path" && test -x "$p/$path"; then
40024            new_path="$p/$path"
40025            break
40026          fi
40027        done
40028        IFS="$IFS_save"
40029      else
40030        # This is an absolute path, we can use it without further modifications.
40031        new_path="$path"
40032      fi
40033
40034      if test "x$new_path" = x; then
40035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40036$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40037        has_space=`$ECHO "$complete" | $GREP " "`
40038        if test "x$has_space" != x; then
40039          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40040$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40041        fi
40042        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40043      fi
40044    fi
40045
40046    # Now join together the path and the arguments once again
40047    if test "x$arguments" != xEOL; then
40048      new_complete="$new_path ${arguments% *}"
40049    else
40050      new_complete="$new_path"
40051    fi
40052
40053    if test "x$complete" != "x$new_complete"; then
40054      STRIP="$new_complete"
40055      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40056$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40057    fi
40058  fi
40059
40060
40061
40062  # Publish this variable in the help.
40063
40064
40065  if [ -z "${NM+x}" ]; then
40066    # The variable is not set by user, try to locate tool using the code snippet
40067    for ac_prog in nm
40068do
40069  # Extract the first word of "$ac_prog", so it can be a program name with args.
40070set dummy $ac_prog; ac_word=$2
40071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40072$as_echo_n "checking for $ac_word... " >&6; }
40073if ${ac_cv_path_NM+:} false; then :
40074  $as_echo_n "(cached) " >&6
40075else
40076  case $NM in
40077  [\\/]* | ?:[\\/]*)
40078  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40079  ;;
40080  *)
40081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40082for as_dir in $PATH
40083do
40084  IFS=$as_save_IFS
40085  test -z "$as_dir" && as_dir=.
40086    for ac_exec_ext in '' $ac_executable_extensions; do
40087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40088    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40090    break 2
40091  fi
40092done
40093  done
40094IFS=$as_save_IFS
40095
40096  ;;
40097esac
40098fi
40099NM=$ac_cv_path_NM
40100if test -n "$NM"; then
40101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40102$as_echo "$NM" >&6; }
40103else
40104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40105$as_echo "no" >&6; }
40106fi
40107
40108
40109  test -n "$NM" && break
40110done
40111
40112  else
40113    # The variable is set, but is it from the command line or the environment?
40114
40115    # Try to remove the string !NM! from our list.
40116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40118      # If it failed, the variable was not from the command line. Ignore it,
40119      # but warn the user (except for BASH, which is always set by the calling BASH).
40120      if test "xNM" != xBASH; then
40121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40122$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40123      fi
40124      # Try to locate tool using the code snippet
40125      for ac_prog in nm
40126do
40127  # Extract the first word of "$ac_prog", so it can be a program name with args.
40128set dummy $ac_prog; ac_word=$2
40129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40130$as_echo_n "checking for $ac_word... " >&6; }
40131if ${ac_cv_path_NM+:} false; then :
40132  $as_echo_n "(cached) " >&6
40133else
40134  case $NM in
40135  [\\/]* | ?:[\\/]*)
40136  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40137  ;;
40138  *)
40139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40140for as_dir in $PATH
40141do
40142  IFS=$as_save_IFS
40143  test -z "$as_dir" && as_dir=.
40144    for ac_exec_ext in '' $ac_executable_extensions; do
40145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40146    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40148    break 2
40149  fi
40150done
40151  done
40152IFS=$as_save_IFS
40153
40154  ;;
40155esac
40156fi
40157NM=$ac_cv_path_NM
40158if test -n "$NM"; then
40159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40160$as_echo "$NM" >&6; }
40161else
40162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40163$as_echo "no" >&6; }
40164fi
40165
40166
40167  test -n "$NM" && break
40168done
40169
40170    else
40171      # If it succeeded, then it was overridden by the user. We will use it
40172      # for the tool.
40173
40174      # First remove it from the list of overridden variables, so we can test
40175      # for unknown variables in the end.
40176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40177
40178      # Check if we try to supply an empty value
40179      if test "x$NM" = x; then
40180        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40181$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40182        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40183$as_echo_n "checking for NM... " >&6; }
40184        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40185$as_echo "disabled" >&6; }
40186      else
40187        # Check if the provided tool contains a complete path.
40188        tool_specified="$NM"
40189        tool_basename="${tool_specified##*/}"
40190        if test "x$tool_basename" = "x$tool_specified"; then
40191          # A command without a complete path is provided, search $PATH.
40192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40193$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40194          # Extract the first word of "$tool_basename", so it can be a program name with args.
40195set dummy $tool_basename; ac_word=$2
40196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40197$as_echo_n "checking for $ac_word... " >&6; }
40198if ${ac_cv_path_NM+:} false; then :
40199  $as_echo_n "(cached) " >&6
40200else
40201  case $NM in
40202  [\\/]* | ?:[\\/]*)
40203  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40204  ;;
40205  *)
40206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40207for as_dir in $PATH
40208do
40209  IFS=$as_save_IFS
40210  test -z "$as_dir" && as_dir=.
40211    for ac_exec_ext in '' $ac_executable_extensions; do
40212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40213    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40215    break 2
40216  fi
40217done
40218  done
40219IFS=$as_save_IFS
40220
40221  ;;
40222esac
40223fi
40224NM=$ac_cv_path_NM
40225if test -n "$NM"; then
40226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40227$as_echo "$NM" >&6; }
40228else
40229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40230$as_echo "no" >&6; }
40231fi
40232
40233
40234          if test "x$NM" = x; then
40235            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40236          fi
40237        else
40238          # Otherwise we believe it is a complete path. Use it as it is.
40239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40240$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40241          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40242$as_echo_n "checking for NM... " >&6; }
40243          if test ! -x "$tool_specified"; then
40244            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40245$as_echo "not found" >&6; }
40246            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40247          fi
40248          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40249$as_echo "$tool_specified" >&6; }
40250        fi
40251      fi
40252    fi
40253
40254  fi
40255
40256
40257
40258  # Only process if variable expands to non-empty
40259
40260  if test "x$NM" != x; then
40261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40262
40263  # First separate the path from the arguments. This will split at the first
40264  # space.
40265  complete="$NM"
40266  path="${complete%% *}"
40267  tmp="$complete EOL"
40268  arguments="${tmp#* }"
40269
40270  # Input might be given as Windows format, start by converting to
40271  # unix format.
40272  new_path=`$CYGPATH -u "$path"`
40273
40274  # Now try to locate executable using which
40275  new_path=`$WHICH "$new_path" 2> /dev/null`
40276  # bat and cmd files are not always considered executable in cygwin causing which
40277  # to not find them
40278  if test "x$new_path" = x \
40279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40281    new_path=`$CYGPATH -u "$path"`
40282  fi
40283  if test "x$new_path" = x; then
40284    # Oops. Which didn't find the executable.
40285    # The splitting of arguments from the executable at a space might have been incorrect,
40286    # since paths with space are more likely in Windows. Give it another try with the whole
40287    # argument.
40288    path="$complete"
40289    arguments="EOL"
40290    new_path=`$CYGPATH -u "$path"`
40291    new_path=`$WHICH "$new_path" 2> /dev/null`
40292    # bat and cmd files are not always considered executable in cygwin causing which
40293    # to not find them
40294    if test "x$new_path" = x \
40295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40297      new_path=`$CYGPATH -u "$path"`
40298    fi
40299    if test "x$new_path" = x; then
40300      # It's still not found. Now this is an unrecoverable error.
40301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40302$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40303      has_space=`$ECHO "$complete" | $GREP " "`
40304      if test "x$has_space" != x; then
40305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40307      fi
40308      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40309    fi
40310  fi
40311
40312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40315  # "foo.exe" is OK but "foo" is an error.
40316  #
40317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40318  # It is also a way to make sure we got the proper file name for the real test later on.
40319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40320  if test "x$test_shortpath" = x; then
40321    # Short path failed, file does not exist as specified.
40322    # Try adding .exe or .cmd
40323    if test -f "${new_path}.exe"; then
40324      input_to_shortpath="${new_path}.exe"
40325    elif test -f "${new_path}.cmd"; then
40326      input_to_shortpath="${new_path}.cmd"
40327    else
40328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40329$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40332      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40333    fi
40334  else
40335    input_to_shortpath="$new_path"
40336  fi
40337
40338  # Call helper function which possibly converts this using DOS-style short mode.
40339  # If so, the updated path is stored in $new_path.
40340  new_path="$input_to_shortpath"
40341
40342  input_path="$input_to_shortpath"
40343  # Check if we need to convert this using DOS-style short mode. If the path
40344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40345  # take no chances and rewrite it.
40346  # Note: m4 eats our [], so we need to use [ and ] instead.
40347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40348  if test "x$has_forbidden_chars" != x; then
40349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40353      # Going to short mode and back again did indeed matter. Since short mode is
40354      # case insensitive, let's make it lowercase to improve readability.
40355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40356      # Now convert it back to Unix-style (cygpath)
40357      input_path=`$CYGPATH -u "$shortmode_path"`
40358      new_path="$input_path"
40359    fi
40360  fi
40361
40362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40363  if test "x$test_cygdrive_prefix" = x; then
40364    # As a simple fix, exclude /usr/bin since it's not a real path.
40365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40367      # a path prefixed by /cygdrive for fixpath to work.
40368      new_path="$CYGWIN_ROOT_PATH$input_path"
40369    fi
40370  fi
40371
40372  # remove trailing .exe if any
40373  new_path="${new_path/%.exe/}"
40374
40375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40376
40377  # First separate the path from the arguments. This will split at the first
40378  # space.
40379  complete="$NM"
40380  path="${complete%% *}"
40381  tmp="$complete EOL"
40382  arguments="${tmp#* }"
40383
40384  # Input might be given as Windows format, start by converting to
40385  # unix format.
40386  new_path="$path"
40387
40388  windows_path="$new_path"
40389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40390    unix_path=`$CYGPATH -u "$windows_path"`
40391    new_path="$unix_path"
40392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40394    new_path="$unix_path"
40395  fi
40396
40397
40398  # Now try to locate executable using which
40399  new_path=`$WHICH "$new_path" 2> /dev/null`
40400
40401  if test "x$new_path" = x; then
40402    # Oops. Which didn't find the executable.
40403    # The splitting of arguments from the executable at a space might have been incorrect,
40404    # since paths with space are more likely in Windows. Give it another try with the whole
40405    # argument.
40406    path="$complete"
40407    arguments="EOL"
40408    new_path="$path"
40409
40410  windows_path="$new_path"
40411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40412    unix_path=`$CYGPATH -u "$windows_path"`
40413    new_path="$unix_path"
40414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40416    new_path="$unix_path"
40417  fi
40418
40419
40420    new_path=`$WHICH "$new_path" 2> /dev/null`
40421    # bat and cmd files are not always considered executable in MSYS causing which
40422    # to not find them
40423    if test "x$new_path" = x \
40424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40426      new_path="$path"
40427
40428  windows_path="$new_path"
40429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40430    unix_path=`$CYGPATH -u "$windows_path"`
40431    new_path="$unix_path"
40432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40434    new_path="$unix_path"
40435  fi
40436
40437    fi
40438
40439    if test "x$new_path" = x; then
40440      # It's still not found. Now this is an unrecoverable error.
40441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40442$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40443      has_space=`$ECHO "$complete" | $GREP " "`
40444      if test "x$has_space" != x; then
40445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40447      fi
40448      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40449    fi
40450  fi
40451
40452  # Now new_path has a complete unix path to the binary
40453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40454    # Keep paths in /bin as-is, but remove trailing .exe if any
40455    new_path="${new_path/%.exe/}"
40456    # Do not save /bin paths to all_fixpath_prefixes!
40457  else
40458    # Not in mixed or Windows style, start by that.
40459    new_path=`cmd //c echo $new_path`
40460
40461  input_path="$new_path"
40462  # Check if we need to convert this using DOS-style short mode. If the path
40463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40464  # take no chances and rewrite it.
40465  # Note: m4 eats our [], so we need to use [ and ] instead.
40466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40467  if test "x$has_forbidden_chars" != x; then
40468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40470  fi
40471
40472    # Output is in $new_path
40473
40474  windows_path="$new_path"
40475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40476    unix_path=`$CYGPATH -u "$windows_path"`
40477    new_path="$unix_path"
40478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40480    new_path="$unix_path"
40481  fi
40482
40483    # remove trailing .exe if any
40484    new_path="${new_path/%.exe/}"
40485
40486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40488  fi
40489
40490    else
40491      # We're on a unix platform. Hooray! :)
40492      # First separate the path from the arguments. This will split at the first
40493      # space.
40494      complete="$NM"
40495      path="${complete%% *}"
40496      tmp="$complete EOL"
40497      arguments="${tmp#* }"
40498
40499      # Cannot rely on the command "which" here since it doesn't always work.
40500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40501      if test -z "$is_absolute_path"; then
40502        # Path to executable is not absolute. Find it.
40503        IFS_save="$IFS"
40504        IFS=:
40505        for p in $PATH; do
40506          if test -f "$p/$path" && test -x "$p/$path"; then
40507            new_path="$p/$path"
40508            break
40509          fi
40510        done
40511        IFS="$IFS_save"
40512      else
40513        # This is an absolute path, we can use it without further modifications.
40514        new_path="$path"
40515      fi
40516
40517      if test "x$new_path" = x; then
40518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40519$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40520        has_space=`$ECHO "$complete" | $GREP " "`
40521        if test "x$has_space" != x; then
40522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40524        fi
40525        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40526      fi
40527    fi
40528
40529    # Now join together the path and the arguments once again
40530    if test "x$arguments" != xEOL; then
40531      new_complete="$new_path ${arguments% *}"
40532    else
40533      new_complete="$new_path"
40534    fi
40535
40536    if test "x$complete" != "x$new_complete"; then
40537      NM="$new_complete"
40538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40539$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40540    fi
40541  fi
40542
40543
40544
40545  # Publish this variable in the help.
40546
40547
40548  if [ -z "${GNM+x}" ]; then
40549    # The variable is not set by user, try to locate tool using the code snippet
40550    for ac_prog in gnm
40551do
40552  # Extract the first word of "$ac_prog", so it can be a program name with args.
40553set dummy $ac_prog; ac_word=$2
40554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40555$as_echo_n "checking for $ac_word... " >&6; }
40556if ${ac_cv_path_GNM+:} false; then :
40557  $as_echo_n "(cached) " >&6
40558else
40559  case $GNM in
40560  [\\/]* | ?:[\\/]*)
40561  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40562  ;;
40563  *)
40564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40565for as_dir in $PATH
40566do
40567  IFS=$as_save_IFS
40568  test -z "$as_dir" && as_dir=.
40569    for ac_exec_ext in '' $ac_executable_extensions; do
40570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40571    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40573    break 2
40574  fi
40575done
40576  done
40577IFS=$as_save_IFS
40578
40579  ;;
40580esac
40581fi
40582GNM=$ac_cv_path_GNM
40583if test -n "$GNM"; then
40584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40585$as_echo "$GNM" >&6; }
40586else
40587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40588$as_echo "no" >&6; }
40589fi
40590
40591
40592  test -n "$GNM" && break
40593done
40594
40595  else
40596    # The variable is set, but is it from the command line or the environment?
40597
40598    # Try to remove the string !GNM! from our list.
40599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40601      # If it failed, the variable was not from the command line. Ignore it,
40602      # but warn the user (except for BASH, which is always set by the calling BASH).
40603      if test "xGNM" != xBASH; then
40604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40605$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40606      fi
40607      # Try to locate tool using the code snippet
40608      for ac_prog in gnm
40609do
40610  # Extract the first word of "$ac_prog", so it can be a program name with args.
40611set dummy $ac_prog; ac_word=$2
40612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40613$as_echo_n "checking for $ac_word... " >&6; }
40614if ${ac_cv_path_GNM+:} false; then :
40615  $as_echo_n "(cached) " >&6
40616else
40617  case $GNM in
40618  [\\/]* | ?:[\\/]*)
40619  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40620  ;;
40621  *)
40622  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40623for as_dir in $PATH
40624do
40625  IFS=$as_save_IFS
40626  test -z "$as_dir" && as_dir=.
40627    for ac_exec_ext in '' $ac_executable_extensions; do
40628  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40629    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40630    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40631    break 2
40632  fi
40633done
40634  done
40635IFS=$as_save_IFS
40636
40637  ;;
40638esac
40639fi
40640GNM=$ac_cv_path_GNM
40641if test -n "$GNM"; then
40642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40643$as_echo "$GNM" >&6; }
40644else
40645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40646$as_echo "no" >&6; }
40647fi
40648
40649
40650  test -n "$GNM" && break
40651done
40652
40653    else
40654      # If it succeeded, then it was overridden by the user. We will use it
40655      # for the tool.
40656
40657      # First remove it from the list of overridden variables, so we can test
40658      # for unknown variables in the end.
40659      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40660
40661      # Check if we try to supply an empty value
40662      if test "x$GNM" = x; then
40663        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40664$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40666$as_echo_n "checking for GNM... " >&6; }
40667        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40668$as_echo "disabled" >&6; }
40669      else
40670        # Check if the provided tool contains a complete path.
40671        tool_specified="$GNM"
40672        tool_basename="${tool_specified##*/}"
40673        if test "x$tool_basename" = "x$tool_specified"; then
40674          # A command without a complete path is provided, search $PATH.
40675          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40676$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40677          # Extract the first word of "$tool_basename", so it can be a program name with args.
40678set dummy $tool_basename; ac_word=$2
40679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40680$as_echo_n "checking for $ac_word... " >&6; }
40681if ${ac_cv_path_GNM+:} false; then :
40682  $as_echo_n "(cached) " >&6
40683else
40684  case $GNM in
40685  [\\/]* | ?:[\\/]*)
40686  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40687  ;;
40688  *)
40689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40690for as_dir in $PATH
40691do
40692  IFS=$as_save_IFS
40693  test -z "$as_dir" && as_dir=.
40694    for ac_exec_ext in '' $ac_executable_extensions; do
40695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40696    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40698    break 2
40699  fi
40700done
40701  done
40702IFS=$as_save_IFS
40703
40704  ;;
40705esac
40706fi
40707GNM=$ac_cv_path_GNM
40708if test -n "$GNM"; then
40709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40710$as_echo "$GNM" >&6; }
40711else
40712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40713$as_echo "no" >&6; }
40714fi
40715
40716
40717          if test "x$GNM" = x; then
40718            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40719          fi
40720        else
40721          # Otherwise we believe it is a complete path. Use it as it is.
40722          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40723$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40724          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40725$as_echo_n "checking for GNM... " >&6; }
40726          if test ! -x "$tool_specified"; then
40727            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40728$as_echo "not found" >&6; }
40729            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40730          fi
40731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40732$as_echo "$tool_specified" >&6; }
40733        fi
40734      fi
40735    fi
40736
40737  fi
40738
40739
40740
40741  # Only process if variable expands to non-empty
40742
40743  if test "x$GNM" != x; then
40744    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40745
40746  # First separate the path from the arguments. This will split at the first
40747  # space.
40748  complete="$GNM"
40749  path="${complete%% *}"
40750  tmp="$complete EOL"
40751  arguments="${tmp#* }"
40752
40753  # Input might be given as Windows format, start by converting to
40754  # unix format.
40755  new_path=`$CYGPATH -u "$path"`
40756
40757  # Now try to locate executable using which
40758  new_path=`$WHICH "$new_path" 2> /dev/null`
40759  # bat and cmd files are not always considered executable in cygwin causing which
40760  # to not find them
40761  if test "x$new_path" = x \
40762      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40763      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40764    new_path=`$CYGPATH -u "$path"`
40765  fi
40766  if test "x$new_path" = x; then
40767    # Oops. Which didn't find the executable.
40768    # The splitting of arguments from the executable at a space might have been incorrect,
40769    # since paths with space are more likely in Windows. Give it another try with the whole
40770    # argument.
40771    path="$complete"
40772    arguments="EOL"
40773    new_path=`$CYGPATH -u "$path"`
40774    new_path=`$WHICH "$new_path" 2> /dev/null`
40775    # bat and cmd files are not always considered executable in cygwin causing which
40776    # to not find them
40777    if test "x$new_path" = x \
40778        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40779        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40780      new_path=`$CYGPATH -u "$path"`
40781    fi
40782    if test "x$new_path" = x; then
40783      # It's still not found. Now this is an unrecoverable error.
40784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40785$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40786      has_space=`$ECHO "$complete" | $GREP " "`
40787      if test "x$has_space" != x; then
40788        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40789$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40790      fi
40791      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40792    fi
40793  fi
40794
40795  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40796  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40797  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40798  # "foo.exe" is OK but "foo" is an error.
40799  #
40800  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40801  # It is also a way to make sure we got the proper file name for the real test later on.
40802  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40803  if test "x$test_shortpath" = x; then
40804    # Short path failed, file does not exist as specified.
40805    # Try adding .exe or .cmd
40806    if test -f "${new_path}.exe"; then
40807      input_to_shortpath="${new_path}.exe"
40808    elif test -f "${new_path}.cmd"; then
40809      input_to_shortpath="${new_path}.cmd"
40810    else
40811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40812$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40813      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40814$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40815      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40816    fi
40817  else
40818    input_to_shortpath="$new_path"
40819  fi
40820
40821  # Call helper function which possibly converts this using DOS-style short mode.
40822  # If so, the updated path is stored in $new_path.
40823  new_path="$input_to_shortpath"
40824
40825  input_path="$input_to_shortpath"
40826  # Check if we need to convert this using DOS-style short mode. If the path
40827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40828  # take no chances and rewrite it.
40829  # Note: m4 eats our [], so we need to use [ and ] instead.
40830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40831  if test "x$has_forbidden_chars" != x; then
40832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40836      # Going to short mode and back again did indeed matter. Since short mode is
40837      # case insensitive, let's make it lowercase to improve readability.
40838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40839      # Now convert it back to Unix-style (cygpath)
40840      input_path=`$CYGPATH -u "$shortmode_path"`
40841      new_path="$input_path"
40842    fi
40843  fi
40844
40845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40846  if test "x$test_cygdrive_prefix" = x; then
40847    # As a simple fix, exclude /usr/bin since it's not a real path.
40848    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40850      # a path prefixed by /cygdrive for fixpath to work.
40851      new_path="$CYGWIN_ROOT_PATH$input_path"
40852    fi
40853  fi
40854
40855  # remove trailing .exe if any
40856  new_path="${new_path/%.exe/}"
40857
40858    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40859
40860  # First separate the path from the arguments. This will split at the first
40861  # space.
40862  complete="$GNM"
40863  path="${complete%% *}"
40864  tmp="$complete EOL"
40865  arguments="${tmp#* }"
40866
40867  # Input might be given as Windows format, start by converting to
40868  # unix format.
40869  new_path="$path"
40870
40871  windows_path="$new_path"
40872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40873    unix_path=`$CYGPATH -u "$windows_path"`
40874    new_path="$unix_path"
40875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40877    new_path="$unix_path"
40878  fi
40879
40880
40881  # Now try to locate executable using which
40882  new_path=`$WHICH "$new_path" 2> /dev/null`
40883
40884  if test "x$new_path" = x; then
40885    # Oops. Which didn't find the executable.
40886    # The splitting of arguments from the executable at a space might have been incorrect,
40887    # since paths with space are more likely in Windows. Give it another try with the whole
40888    # argument.
40889    path="$complete"
40890    arguments="EOL"
40891    new_path="$path"
40892
40893  windows_path="$new_path"
40894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895    unix_path=`$CYGPATH -u "$windows_path"`
40896    new_path="$unix_path"
40897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899    new_path="$unix_path"
40900  fi
40901
40902
40903    new_path=`$WHICH "$new_path" 2> /dev/null`
40904    # bat and cmd files are not always considered executable in MSYS causing which
40905    # to not find them
40906    if test "x$new_path" = x \
40907        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40908        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40909      new_path="$path"
40910
40911  windows_path="$new_path"
40912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40913    unix_path=`$CYGPATH -u "$windows_path"`
40914    new_path="$unix_path"
40915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40917    new_path="$unix_path"
40918  fi
40919
40920    fi
40921
40922    if test "x$new_path" = x; then
40923      # It's still not found. Now this is an unrecoverable error.
40924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40925$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40926      has_space=`$ECHO "$complete" | $GREP " "`
40927      if test "x$has_space" != x; then
40928        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40929$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40930      fi
40931      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40932    fi
40933  fi
40934
40935  # Now new_path has a complete unix path to the binary
40936  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40937    # Keep paths in /bin as-is, but remove trailing .exe if any
40938    new_path="${new_path/%.exe/}"
40939    # Do not save /bin paths to all_fixpath_prefixes!
40940  else
40941    # Not in mixed or Windows style, start by that.
40942    new_path=`cmd //c echo $new_path`
40943
40944  input_path="$new_path"
40945  # Check if we need to convert this using DOS-style short mode. If the path
40946  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40947  # take no chances and rewrite it.
40948  # Note: m4 eats our [], so we need to use [ and ] instead.
40949  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40950  if test "x$has_forbidden_chars" != x; then
40951    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40952    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40953  fi
40954
40955    # Output is in $new_path
40956
40957  windows_path="$new_path"
40958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40959    unix_path=`$CYGPATH -u "$windows_path"`
40960    new_path="$unix_path"
40961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40963    new_path="$unix_path"
40964  fi
40965
40966    # remove trailing .exe if any
40967    new_path="${new_path/%.exe/}"
40968
40969    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40970    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40971  fi
40972
40973    else
40974      # We're on a unix platform. Hooray! :)
40975      # First separate the path from the arguments. This will split at the first
40976      # space.
40977      complete="$GNM"
40978      path="${complete%% *}"
40979      tmp="$complete EOL"
40980      arguments="${tmp#* }"
40981
40982      # Cannot rely on the command "which" here since it doesn't always work.
40983      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40984      if test -z "$is_absolute_path"; then
40985        # Path to executable is not absolute. Find it.
40986        IFS_save="$IFS"
40987        IFS=:
40988        for p in $PATH; do
40989          if test -f "$p/$path" && test -x "$p/$path"; then
40990            new_path="$p/$path"
40991            break
40992          fi
40993        done
40994        IFS="$IFS_save"
40995      else
40996        # This is an absolute path, we can use it without further modifications.
40997        new_path="$path"
40998      fi
40999
41000      if test "x$new_path" = x; then
41001        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41002$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41003        has_space=`$ECHO "$complete" | $GREP " "`
41004        if test "x$has_space" != x; then
41005          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41006$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41007        fi
41008        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41009      fi
41010    fi
41011
41012    # Now join together the path and the arguments once again
41013    if test "x$arguments" != xEOL; then
41014      new_complete="$new_path ${arguments% *}"
41015    else
41016      new_complete="$new_path"
41017    fi
41018
41019    if test "x$complete" != "x$new_complete"; then
41020      GNM="$new_complete"
41021      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41022$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41023    fi
41024  fi
41025
41026  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41027    # FIXME: we should unify this with the solaris case above.
41028
41029
41030  # Publish this variable in the help.
41031
41032
41033  if [ -z "${STRIP+x}" ]; then
41034    # The variable is not set by user, try to locate tool using the code snippet
41035    if test -n "$ac_tool_prefix"; then
41036  for ac_prog in strip
41037  do
41038    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41039set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41040{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41041$as_echo_n "checking for $ac_word... " >&6; }
41042if ${ac_cv_prog_STRIP+:} false; then :
41043  $as_echo_n "(cached) " >&6
41044else
41045  if test -n "$STRIP"; then
41046  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41047else
41048as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41049for as_dir in $PATH
41050do
41051  IFS=$as_save_IFS
41052  test -z "$as_dir" && as_dir=.
41053    for ac_exec_ext in '' $ac_executable_extensions; do
41054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41055    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41057    break 2
41058  fi
41059done
41060  done
41061IFS=$as_save_IFS
41062
41063fi
41064fi
41065STRIP=$ac_cv_prog_STRIP
41066if test -n "$STRIP"; then
41067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41068$as_echo "$STRIP" >&6; }
41069else
41070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41071$as_echo "no" >&6; }
41072fi
41073
41074
41075    test -n "$STRIP" && break
41076  done
41077fi
41078if test -z "$STRIP"; then
41079  ac_ct_STRIP=$STRIP
41080  for ac_prog in strip
41081do
41082  # Extract the first word of "$ac_prog", so it can be a program name with args.
41083set dummy $ac_prog; ac_word=$2
41084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41085$as_echo_n "checking for $ac_word... " >&6; }
41086if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41087  $as_echo_n "(cached) " >&6
41088else
41089  if test -n "$ac_ct_STRIP"; then
41090  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41091else
41092as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41093for as_dir in $PATH
41094do
41095  IFS=$as_save_IFS
41096  test -z "$as_dir" && as_dir=.
41097    for ac_exec_ext in '' $ac_executable_extensions; do
41098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41099    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41101    break 2
41102  fi
41103done
41104  done
41105IFS=$as_save_IFS
41106
41107fi
41108fi
41109ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41110if test -n "$ac_ct_STRIP"; then
41111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41112$as_echo "$ac_ct_STRIP" >&6; }
41113else
41114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41115$as_echo "no" >&6; }
41116fi
41117
41118
41119  test -n "$ac_ct_STRIP" && break
41120done
41121
41122  if test "x$ac_ct_STRIP" = x; then
41123    STRIP=""
41124  else
41125    case $cross_compiling:$ac_tool_warned in
41126yes:)
41127{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41128$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41129ac_tool_warned=yes ;;
41130esac
41131    STRIP=$ac_ct_STRIP
41132  fi
41133fi
41134
41135  else
41136    # The variable is set, but is it from the command line or the environment?
41137
41138    # Try to remove the string !STRIP! from our list.
41139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41141      # If it failed, the variable was not from the command line. Ignore it,
41142      # but warn the user (except for BASH, which is always set by the calling BASH).
41143      if test "xSTRIP" != xBASH; then
41144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41145$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41146      fi
41147      # Try to locate tool using the code snippet
41148      if test -n "$ac_tool_prefix"; then
41149  for ac_prog in strip
41150  do
41151    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41152set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41154$as_echo_n "checking for $ac_word... " >&6; }
41155if ${ac_cv_prog_STRIP+:} false; then :
41156  $as_echo_n "(cached) " >&6
41157else
41158  if test -n "$STRIP"; then
41159  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41160else
41161as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41162for as_dir in $PATH
41163do
41164  IFS=$as_save_IFS
41165  test -z "$as_dir" && as_dir=.
41166    for ac_exec_ext in '' $ac_executable_extensions; do
41167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41168    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41170    break 2
41171  fi
41172done
41173  done
41174IFS=$as_save_IFS
41175
41176fi
41177fi
41178STRIP=$ac_cv_prog_STRIP
41179if test -n "$STRIP"; then
41180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41181$as_echo "$STRIP" >&6; }
41182else
41183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41184$as_echo "no" >&6; }
41185fi
41186
41187
41188    test -n "$STRIP" && break
41189  done
41190fi
41191if test -z "$STRIP"; then
41192  ac_ct_STRIP=$STRIP
41193  for ac_prog in strip
41194do
41195  # Extract the first word of "$ac_prog", so it can be a program name with args.
41196set dummy $ac_prog; ac_word=$2
41197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41198$as_echo_n "checking for $ac_word... " >&6; }
41199if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41200  $as_echo_n "(cached) " >&6
41201else
41202  if test -n "$ac_ct_STRIP"; then
41203  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41204else
41205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41206for as_dir in $PATH
41207do
41208  IFS=$as_save_IFS
41209  test -z "$as_dir" && as_dir=.
41210    for ac_exec_ext in '' $ac_executable_extensions; do
41211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41212    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41214    break 2
41215  fi
41216done
41217  done
41218IFS=$as_save_IFS
41219
41220fi
41221fi
41222ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41223if test -n "$ac_ct_STRIP"; then
41224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41225$as_echo "$ac_ct_STRIP" >&6; }
41226else
41227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41228$as_echo "no" >&6; }
41229fi
41230
41231
41232  test -n "$ac_ct_STRIP" && break
41233done
41234
41235  if test "x$ac_ct_STRIP" = x; then
41236    STRIP=""
41237  else
41238    case $cross_compiling:$ac_tool_warned in
41239yes:)
41240{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41241$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41242ac_tool_warned=yes ;;
41243esac
41244    STRIP=$ac_ct_STRIP
41245  fi
41246fi
41247
41248    else
41249      # If it succeeded, then it was overridden by the user. We will use it
41250      # for the tool.
41251
41252      # First remove it from the list of overridden variables, so we can test
41253      # for unknown variables in the end.
41254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41255
41256      # Check if we try to supply an empty value
41257      if test "x$STRIP" = x; then
41258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41259$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41261$as_echo_n "checking for STRIP... " >&6; }
41262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41263$as_echo "disabled" >&6; }
41264      else
41265        # Check if the provided tool contains a complete path.
41266        tool_specified="$STRIP"
41267        tool_basename="${tool_specified##*/}"
41268        if test "x$tool_basename" = "x$tool_specified"; then
41269          # A command without a complete path is provided, search $PATH.
41270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41271$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41272          # Extract the first word of "$tool_basename", so it can be a program name with args.
41273set dummy $tool_basename; ac_word=$2
41274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41275$as_echo_n "checking for $ac_word... " >&6; }
41276if ${ac_cv_path_STRIP+:} false; then :
41277  $as_echo_n "(cached) " >&6
41278else
41279  case $STRIP in
41280  [\\/]* | ?:[\\/]*)
41281  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41282  ;;
41283  *)
41284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41285for as_dir in $PATH
41286do
41287  IFS=$as_save_IFS
41288  test -z "$as_dir" && as_dir=.
41289    for ac_exec_ext in '' $ac_executable_extensions; do
41290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41291    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41293    break 2
41294  fi
41295done
41296  done
41297IFS=$as_save_IFS
41298
41299  ;;
41300esac
41301fi
41302STRIP=$ac_cv_path_STRIP
41303if test -n "$STRIP"; then
41304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41305$as_echo "$STRIP" >&6; }
41306else
41307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41308$as_echo "no" >&6; }
41309fi
41310
41311
41312          if test "x$STRIP" = x; then
41313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41314          fi
41315        else
41316          # Otherwise we believe it is a complete path. Use it as it is.
41317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41318$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41320$as_echo_n "checking for STRIP... " >&6; }
41321          if test ! -x "$tool_specified"; then
41322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41323$as_echo "not found" >&6; }
41324            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41325          fi
41326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41327$as_echo "$tool_specified" >&6; }
41328        fi
41329      fi
41330    fi
41331
41332  fi
41333
41334
41335
41336  # Only process if variable expands to non-empty
41337
41338  if test "x$STRIP" != x; then
41339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41340
41341  # First separate the path from the arguments. This will split at the first
41342  # space.
41343  complete="$STRIP"
41344  path="${complete%% *}"
41345  tmp="$complete EOL"
41346  arguments="${tmp#* }"
41347
41348  # Input might be given as Windows format, start by converting to
41349  # unix format.
41350  new_path=`$CYGPATH -u "$path"`
41351
41352  # Now try to locate executable using which
41353  new_path=`$WHICH "$new_path" 2> /dev/null`
41354  # bat and cmd files are not always considered executable in cygwin causing which
41355  # to not find them
41356  if test "x$new_path" = x \
41357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41359    new_path=`$CYGPATH -u "$path"`
41360  fi
41361  if test "x$new_path" = x; then
41362    # Oops. Which didn't find the executable.
41363    # The splitting of arguments from the executable at a space might have been incorrect,
41364    # since paths with space are more likely in Windows. Give it another try with the whole
41365    # argument.
41366    path="$complete"
41367    arguments="EOL"
41368    new_path=`$CYGPATH -u "$path"`
41369    new_path=`$WHICH "$new_path" 2> /dev/null`
41370    # bat and cmd files are not always considered executable in cygwin causing which
41371    # to not find them
41372    if test "x$new_path" = x \
41373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41375      new_path=`$CYGPATH -u "$path"`
41376    fi
41377    if test "x$new_path" = x; then
41378      # It's still not found. Now this is an unrecoverable error.
41379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41380$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41381      has_space=`$ECHO "$complete" | $GREP " "`
41382      if test "x$has_space" != x; then
41383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41385      fi
41386      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41387    fi
41388  fi
41389
41390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41393  # "foo.exe" is OK but "foo" is an error.
41394  #
41395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41396  # It is also a way to make sure we got the proper file name for the real test later on.
41397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41398  if test "x$test_shortpath" = x; then
41399    # Short path failed, file does not exist as specified.
41400    # Try adding .exe or .cmd
41401    if test -f "${new_path}.exe"; then
41402      input_to_shortpath="${new_path}.exe"
41403    elif test -f "${new_path}.cmd"; then
41404      input_to_shortpath="${new_path}.cmd"
41405    else
41406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41407$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41410      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41411    fi
41412  else
41413    input_to_shortpath="$new_path"
41414  fi
41415
41416  # Call helper function which possibly converts this using DOS-style short mode.
41417  # If so, the updated path is stored in $new_path.
41418  new_path="$input_to_shortpath"
41419
41420  input_path="$input_to_shortpath"
41421  # Check if we need to convert this using DOS-style short mode. If the path
41422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41423  # take no chances and rewrite it.
41424  # Note: m4 eats our [], so we need to use [ and ] instead.
41425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41426  if test "x$has_forbidden_chars" != x; then
41427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41431      # Going to short mode and back again did indeed matter. Since short mode is
41432      # case insensitive, let's make it lowercase to improve readability.
41433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41434      # Now convert it back to Unix-style (cygpath)
41435      input_path=`$CYGPATH -u "$shortmode_path"`
41436      new_path="$input_path"
41437    fi
41438  fi
41439
41440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41441  if test "x$test_cygdrive_prefix" = x; then
41442    # As a simple fix, exclude /usr/bin since it's not a real path.
41443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41445      # a path prefixed by /cygdrive for fixpath to work.
41446      new_path="$CYGWIN_ROOT_PATH$input_path"
41447    fi
41448  fi
41449
41450  # remove trailing .exe if any
41451  new_path="${new_path/%.exe/}"
41452
41453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41454
41455  # First separate the path from the arguments. This will split at the first
41456  # space.
41457  complete="$STRIP"
41458  path="${complete%% *}"
41459  tmp="$complete EOL"
41460  arguments="${tmp#* }"
41461
41462  # Input might be given as Windows format, start by converting to
41463  # unix format.
41464  new_path="$path"
41465
41466  windows_path="$new_path"
41467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41468    unix_path=`$CYGPATH -u "$windows_path"`
41469    new_path="$unix_path"
41470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41472    new_path="$unix_path"
41473  fi
41474
41475
41476  # Now try to locate executable using which
41477  new_path=`$WHICH "$new_path" 2> /dev/null`
41478
41479  if test "x$new_path" = x; then
41480    # Oops. Which didn't find the executable.
41481    # The splitting of arguments from the executable at a space might have been incorrect,
41482    # since paths with space are more likely in Windows. Give it another try with the whole
41483    # argument.
41484    path="$complete"
41485    arguments="EOL"
41486    new_path="$path"
41487
41488  windows_path="$new_path"
41489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41490    unix_path=`$CYGPATH -u "$windows_path"`
41491    new_path="$unix_path"
41492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41494    new_path="$unix_path"
41495  fi
41496
41497
41498    new_path=`$WHICH "$new_path" 2> /dev/null`
41499    # bat and cmd files are not always considered executable in MSYS causing which
41500    # to not find them
41501    if test "x$new_path" = x \
41502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41504      new_path="$path"
41505
41506  windows_path="$new_path"
41507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41508    unix_path=`$CYGPATH -u "$windows_path"`
41509    new_path="$unix_path"
41510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41512    new_path="$unix_path"
41513  fi
41514
41515    fi
41516
41517    if test "x$new_path" = x; then
41518      # It's still not found. Now this is an unrecoverable error.
41519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41520$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41521      has_space=`$ECHO "$complete" | $GREP " "`
41522      if test "x$has_space" != x; then
41523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41525      fi
41526      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41527    fi
41528  fi
41529
41530  # Now new_path has a complete unix path to the binary
41531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41532    # Keep paths in /bin as-is, but remove trailing .exe if any
41533    new_path="${new_path/%.exe/}"
41534    # Do not save /bin paths to all_fixpath_prefixes!
41535  else
41536    # Not in mixed or Windows style, start by that.
41537    new_path=`cmd //c echo $new_path`
41538
41539  input_path="$new_path"
41540  # Check if we need to convert this using DOS-style short mode. If the path
41541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41542  # take no chances and rewrite it.
41543  # Note: m4 eats our [], so we need to use [ and ] instead.
41544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41545  if test "x$has_forbidden_chars" != x; then
41546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41548  fi
41549
41550    # Output is in $new_path
41551
41552  windows_path="$new_path"
41553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41554    unix_path=`$CYGPATH -u "$windows_path"`
41555    new_path="$unix_path"
41556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41558    new_path="$unix_path"
41559  fi
41560
41561    # remove trailing .exe if any
41562    new_path="${new_path/%.exe/}"
41563
41564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41566  fi
41567
41568    else
41569      # We're on a unix platform. Hooray! :)
41570      # First separate the path from the arguments. This will split at the first
41571      # space.
41572      complete="$STRIP"
41573      path="${complete%% *}"
41574      tmp="$complete EOL"
41575      arguments="${tmp#* }"
41576
41577      # Cannot rely on the command "which" here since it doesn't always work.
41578      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41579      if test -z "$is_absolute_path"; then
41580        # Path to executable is not absolute. Find it.
41581        IFS_save="$IFS"
41582        IFS=:
41583        for p in $PATH; do
41584          if test -f "$p/$path" && test -x "$p/$path"; then
41585            new_path="$p/$path"
41586            break
41587          fi
41588        done
41589        IFS="$IFS_save"
41590      else
41591        # This is an absolute path, we can use it without further modifications.
41592        new_path="$path"
41593      fi
41594
41595      if test "x$new_path" = x; then
41596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41597$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41598        has_space=`$ECHO "$complete" | $GREP " "`
41599        if test "x$has_space" != x; then
41600          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41601$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41602        fi
41603        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41604      fi
41605    fi
41606
41607    # Now join together the path and the arguments once again
41608    if test "x$arguments" != xEOL; then
41609      new_complete="$new_path ${arguments% *}"
41610    else
41611      new_complete="$new_path"
41612    fi
41613
41614    if test "x$complete" != "x$new_complete"; then
41615      STRIP="$new_complete"
41616      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41617$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41618    fi
41619  fi
41620
41621    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41622
41623
41624  # Publish this variable in the help.
41625
41626
41627  if [ -z "${NM+x}" ]; then
41628    # The variable is not set by user, try to locate tool using the code snippet
41629    if test -n "$ac_tool_prefix"; then
41630  for ac_prog in nm gcc-nm
41631  do
41632    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41633set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41635$as_echo_n "checking for $ac_word... " >&6; }
41636if ${ac_cv_prog_NM+:} false; then :
41637  $as_echo_n "(cached) " >&6
41638else
41639  if test -n "$NM"; then
41640  ac_cv_prog_NM="$NM" # Let the user override the test.
41641else
41642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41643for as_dir in $PATH
41644do
41645  IFS=$as_save_IFS
41646  test -z "$as_dir" && as_dir=.
41647    for ac_exec_ext in '' $ac_executable_extensions; do
41648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41649    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41651    break 2
41652  fi
41653done
41654  done
41655IFS=$as_save_IFS
41656
41657fi
41658fi
41659NM=$ac_cv_prog_NM
41660if test -n "$NM"; then
41661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41662$as_echo "$NM" >&6; }
41663else
41664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41665$as_echo "no" >&6; }
41666fi
41667
41668
41669    test -n "$NM" && break
41670  done
41671fi
41672if test -z "$NM"; then
41673  ac_ct_NM=$NM
41674  for ac_prog in nm gcc-nm
41675do
41676  # Extract the first word of "$ac_prog", so it can be a program name with args.
41677set dummy $ac_prog; ac_word=$2
41678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41679$as_echo_n "checking for $ac_word... " >&6; }
41680if ${ac_cv_prog_ac_ct_NM+:} false; then :
41681  $as_echo_n "(cached) " >&6
41682else
41683  if test -n "$ac_ct_NM"; then
41684  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41685else
41686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41687for as_dir in $PATH
41688do
41689  IFS=$as_save_IFS
41690  test -z "$as_dir" && as_dir=.
41691    for ac_exec_ext in '' $ac_executable_extensions; do
41692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41693    ac_cv_prog_ac_ct_NM="$ac_prog"
41694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41695    break 2
41696  fi
41697done
41698  done
41699IFS=$as_save_IFS
41700
41701fi
41702fi
41703ac_ct_NM=$ac_cv_prog_ac_ct_NM
41704if test -n "$ac_ct_NM"; then
41705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41706$as_echo "$ac_ct_NM" >&6; }
41707else
41708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41709$as_echo "no" >&6; }
41710fi
41711
41712
41713  test -n "$ac_ct_NM" && break
41714done
41715
41716  if test "x$ac_ct_NM" = x; then
41717    NM=""
41718  else
41719    case $cross_compiling:$ac_tool_warned in
41720yes:)
41721{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41722$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41723ac_tool_warned=yes ;;
41724esac
41725    NM=$ac_ct_NM
41726  fi
41727fi
41728
41729  else
41730    # The variable is set, but is it from the command line or the environment?
41731
41732    # Try to remove the string !NM! from our list.
41733    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41734    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41735      # If it failed, the variable was not from the command line. Ignore it,
41736      # but warn the user (except for BASH, which is always set by the calling BASH).
41737      if test "xNM" != xBASH; then
41738        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41739$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41740      fi
41741      # Try to locate tool using the code snippet
41742      if test -n "$ac_tool_prefix"; then
41743  for ac_prog in nm gcc-nm
41744  do
41745    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41746set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41747{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41748$as_echo_n "checking for $ac_word... " >&6; }
41749if ${ac_cv_prog_NM+:} false; then :
41750  $as_echo_n "(cached) " >&6
41751else
41752  if test -n "$NM"; then
41753  ac_cv_prog_NM="$NM" # Let the user override the test.
41754else
41755as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41756for as_dir in $PATH
41757do
41758  IFS=$as_save_IFS
41759  test -z "$as_dir" && as_dir=.
41760    for ac_exec_ext in '' $ac_executable_extensions; do
41761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41762    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41764    break 2
41765  fi
41766done
41767  done
41768IFS=$as_save_IFS
41769
41770fi
41771fi
41772NM=$ac_cv_prog_NM
41773if test -n "$NM"; then
41774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41775$as_echo "$NM" >&6; }
41776else
41777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41778$as_echo "no" >&6; }
41779fi
41780
41781
41782    test -n "$NM" && break
41783  done
41784fi
41785if test -z "$NM"; then
41786  ac_ct_NM=$NM
41787  for ac_prog in nm gcc-nm
41788do
41789  # Extract the first word of "$ac_prog", so it can be a program name with args.
41790set dummy $ac_prog; ac_word=$2
41791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41792$as_echo_n "checking for $ac_word... " >&6; }
41793if ${ac_cv_prog_ac_ct_NM+:} false; then :
41794  $as_echo_n "(cached) " >&6
41795else
41796  if test -n "$ac_ct_NM"; then
41797  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41798else
41799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41800for as_dir in $PATH
41801do
41802  IFS=$as_save_IFS
41803  test -z "$as_dir" && as_dir=.
41804    for ac_exec_ext in '' $ac_executable_extensions; do
41805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41806    ac_cv_prog_ac_ct_NM="$ac_prog"
41807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41808    break 2
41809  fi
41810done
41811  done
41812IFS=$as_save_IFS
41813
41814fi
41815fi
41816ac_ct_NM=$ac_cv_prog_ac_ct_NM
41817if test -n "$ac_ct_NM"; then
41818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41819$as_echo "$ac_ct_NM" >&6; }
41820else
41821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41822$as_echo "no" >&6; }
41823fi
41824
41825
41826  test -n "$ac_ct_NM" && break
41827done
41828
41829  if test "x$ac_ct_NM" = x; then
41830    NM=""
41831  else
41832    case $cross_compiling:$ac_tool_warned in
41833yes:)
41834{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41835$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41836ac_tool_warned=yes ;;
41837esac
41838    NM=$ac_ct_NM
41839  fi
41840fi
41841
41842    else
41843      # If it succeeded, then it was overridden by the user. We will use it
41844      # for the tool.
41845
41846      # First remove it from the list of overridden variables, so we can test
41847      # for unknown variables in the end.
41848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41849
41850      # Check if we try to supply an empty value
41851      if test "x$NM" = x; then
41852        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41853$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41854        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41855$as_echo_n "checking for NM... " >&6; }
41856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41857$as_echo "disabled" >&6; }
41858      else
41859        # Check if the provided tool contains a complete path.
41860        tool_specified="$NM"
41861        tool_basename="${tool_specified##*/}"
41862        if test "x$tool_basename" = "x$tool_specified"; then
41863          # A command without a complete path is provided, search $PATH.
41864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41865$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41866          # Extract the first word of "$tool_basename", so it can be a program name with args.
41867set dummy $tool_basename; ac_word=$2
41868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41869$as_echo_n "checking for $ac_word... " >&6; }
41870if ${ac_cv_path_NM+:} false; then :
41871  $as_echo_n "(cached) " >&6
41872else
41873  case $NM in
41874  [\\/]* | ?:[\\/]*)
41875  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41876  ;;
41877  *)
41878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41879for as_dir in $PATH
41880do
41881  IFS=$as_save_IFS
41882  test -z "$as_dir" && as_dir=.
41883    for ac_exec_ext in '' $ac_executable_extensions; do
41884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41885    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41887    break 2
41888  fi
41889done
41890  done
41891IFS=$as_save_IFS
41892
41893  ;;
41894esac
41895fi
41896NM=$ac_cv_path_NM
41897if test -n "$NM"; then
41898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41899$as_echo "$NM" >&6; }
41900else
41901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41902$as_echo "no" >&6; }
41903fi
41904
41905
41906          if test "x$NM" = x; then
41907            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41908          fi
41909        else
41910          # Otherwise we believe it is a complete path. Use it as it is.
41911          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41912$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41913          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41914$as_echo_n "checking for NM... " >&6; }
41915          if test ! -x "$tool_specified"; then
41916            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41917$as_echo "not found" >&6; }
41918            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41919          fi
41920          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41921$as_echo "$tool_specified" >&6; }
41922        fi
41923      fi
41924    fi
41925
41926  fi
41927
41928
41929    else
41930
41931
41932  # Publish this variable in the help.
41933
41934
41935  if [ -z "${NM+x}" ]; then
41936    # The variable is not set by user, try to locate tool using the code snippet
41937    if test -n "$ac_tool_prefix"; then
41938  for ac_prog in nm
41939  do
41940    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41941set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41943$as_echo_n "checking for $ac_word... " >&6; }
41944if ${ac_cv_prog_NM+:} false; then :
41945  $as_echo_n "(cached) " >&6
41946else
41947  if test -n "$NM"; then
41948  ac_cv_prog_NM="$NM" # Let the user override the test.
41949else
41950as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41951for as_dir in $PATH
41952do
41953  IFS=$as_save_IFS
41954  test -z "$as_dir" && as_dir=.
41955    for ac_exec_ext in '' $ac_executable_extensions; do
41956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41957    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41959    break 2
41960  fi
41961done
41962  done
41963IFS=$as_save_IFS
41964
41965fi
41966fi
41967NM=$ac_cv_prog_NM
41968if test -n "$NM"; then
41969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41970$as_echo "$NM" >&6; }
41971else
41972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41973$as_echo "no" >&6; }
41974fi
41975
41976
41977    test -n "$NM" && break
41978  done
41979fi
41980if test -z "$NM"; then
41981  ac_ct_NM=$NM
41982  for ac_prog in nm
41983do
41984  # Extract the first word of "$ac_prog", so it can be a program name with args.
41985set dummy $ac_prog; ac_word=$2
41986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41987$as_echo_n "checking for $ac_word... " >&6; }
41988if ${ac_cv_prog_ac_ct_NM+:} false; then :
41989  $as_echo_n "(cached) " >&6
41990else
41991  if test -n "$ac_ct_NM"; then
41992  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41993else
41994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41995for as_dir in $PATH
41996do
41997  IFS=$as_save_IFS
41998  test -z "$as_dir" && as_dir=.
41999    for ac_exec_ext in '' $ac_executable_extensions; do
42000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42001    ac_cv_prog_ac_ct_NM="$ac_prog"
42002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42003    break 2
42004  fi
42005done
42006  done
42007IFS=$as_save_IFS
42008
42009fi
42010fi
42011ac_ct_NM=$ac_cv_prog_ac_ct_NM
42012if test -n "$ac_ct_NM"; then
42013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42014$as_echo "$ac_ct_NM" >&6; }
42015else
42016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42017$as_echo "no" >&6; }
42018fi
42019
42020
42021  test -n "$ac_ct_NM" && break
42022done
42023
42024  if test "x$ac_ct_NM" = x; then
42025    NM=""
42026  else
42027    case $cross_compiling:$ac_tool_warned in
42028yes:)
42029{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42030$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42031ac_tool_warned=yes ;;
42032esac
42033    NM=$ac_ct_NM
42034  fi
42035fi
42036
42037  else
42038    # The variable is set, but is it from the command line or the environment?
42039
42040    # Try to remove the string !NM! from our list.
42041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42043      # If it failed, the variable was not from the command line. Ignore it,
42044      # but warn the user (except for BASH, which is always set by the calling BASH).
42045      if test "xNM" != xBASH; then
42046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42047$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42048      fi
42049      # Try to locate tool using the code snippet
42050      if test -n "$ac_tool_prefix"; then
42051  for ac_prog in nm
42052  do
42053    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42054set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42056$as_echo_n "checking for $ac_word... " >&6; }
42057if ${ac_cv_prog_NM+:} false; then :
42058  $as_echo_n "(cached) " >&6
42059else
42060  if test -n "$NM"; then
42061  ac_cv_prog_NM="$NM" # Let the user override the test.
42062else
42063as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42064for as_dir in $PATH
42065do
42066  IFS=$as_save_IFS
42067  test -z "$as_dir" && as_dir=.
42068    for ac_exec_ext in '' $ac_executable_extensions; do
42069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42070    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42072    break 2
42073  fi
42074done
42075  done
42076IFS=$as_save_IFS
42077
42078fi
42079fi
42080NM=$ac_cv_prog_NM
42081if test -n "$NM"; then
42082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42083$as_echo "$NM" >&6; }
42084else
42085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42086$as_echo "no" >&6; }
42087fi
42088
42089
42090    test -n "$NM" && break
42091  done
42092fi
42093if test -z "$NM"; then
42094  ac_ct_NM=$NM
42095  for ac_prog in nm
42096do
42097  # Extract the first word of "$ac_prog", so it can be a program name with args.
42098set dummy $ac_prog; ac_word=$2
42099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42100$as_echo_n "checking for $ac_word... " >&6; }
42101if ${ac_cv_prog_ac_ct_NM+:} false; then :
42102  $as_echo_n "(cached) " >&6
42103else
42104  if test -n "$ac_ct_NM"; then
42105  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42106else
42107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42108for as_dir in $PATH
42109do
42110  IFS=$as_save_IFS
42111  test -z "$as_dir" && as_dir=.
42112    for ac_exec_ext in '' $ac_executable_extensions; do
42113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42114    ac_cv_prog_ac_ct_NM="$ac_prog"
42115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42116    break 2
42117  fi
42118done
42119  done
42120IFS=$as_save_IFS
42121
42122fi
42123fi
42124ac_ct_NM=$ac_cv_prog_ac_ct_NM
42125if test -n "$ac_ct_NM"; then
42126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42127$as_echo "$ac_ct_NM" >&6; }
42128else
42129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42130$as_echo "no" >&6; }
42131fi
42132
42133
42134  test -n "$ac_ct_NM" && break
42135done
42136
42137  if test "x$ac_ct_NM" = x; then
42138    NM=""
42139  else
42140    case $cross_compiling:$ac_tool_warned in
42141yes:)
42142{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42143$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42144ac_tool_warned=yes ;;
42145esac
42146    NM=$ac_ct_NM
42147  fi
42148fi
42149
42150    else
42151      # If it succeeded, then it was overridden by the user. We will use it
42152      # for the tool.
42153
42154      # First remove it from the list of overridden variables, so we can test
42155      # for unknown variables in the end.
42156      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42157
42158      # Check if we try to supply an empty value
42159      if test "x$NM" = x; then
42160        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42161$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42163$as_echo_n "checking for NM... " >&6; }
42164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42165$as_echo "disabled" >&6; }
42166      else
42167        # Check if the provided tool contains a complete path.
42168        tool_specified="$NM"
42169        tool_basename="${tool_specified##*/}"
42170        if test "x$tool_basename" = "x$tool_specified"; then
42171          # A command without a complete path is provided, search $PATH.
42172          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42173$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42174          # Extract the first word of "$tool_basename", so it can be a program name with args.
42175set dummy $tool_basename; ac_word=$2
42176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42177$as_echo_n "checking for $ac_word... " >&6; }
42178if ${ac_cv_path_NM+:} false; then :
42179  $as_echo_n "(cached) " >&6
42180else
42181  case $NM in
42182  [\\/]* | ?:[\\/]*)
42183  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42184  ;;
42185  *)
42186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42187for as_dir in $PATH
42188do
42189  IFS=$as_save_IFS
42190  test -z "$as_dir" && as_dir=.
42191    for ac_exec_ext in '' $ac_executable_extensions; do
42192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42193    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42195    break 2
42196  fi
42197done
42198  done
42199IFS=$as_save_IFS
42200
42201  ;;
42202esac
42203fi
42204NM=$ac_cv_path_NM
42205if test -n "$NM"; then
42206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42207$as_echo "$NM" >&6; }
42208else
42209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42210$as_echo "no" >&6; }
42211fi
42212
42213
42214          if test "x$NM" = x; then
42215            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42216          fi
42217        else
42218          # Otherwise we believe it is a complete path. Use it as it is.
42219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42220$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42221          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42222$as_echo_n "checking for NM... " >&6; }
42223          if test ! -x "$tool_specified"; then
42224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42225$as_echo "not found" >&6; }
42226            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42227          fi
42228          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42229$as_echo "$tool_specified" >&6; }
42230        fi
42231      fi
42232    fi
42233
42234  fi
42235
42236
42237    fi
42238
42239  # Only process if variable expands to non-empty
42240
42241  if test "x$NM" != x; then
42242    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42243
42244  # First separate the path from the arguments. This will split at the first
42245  # space.
42246  complete="$NM"
42247  path="${complete%% *}"
42248  tmp="$complete EOL"
42249  arguments="${tmp#* }"
42250
42251  # Input might be given as Windows format, start by converting to
42252  # unix format.
42253  new_path=`$CYGPATH -u "$path"`
42254
42255  # Now try to locate executable using which
42256  new_path=`$WHICH "$new_path" 2> /dev/null`
42257  # bat and cmd files are not always considered executable in cygwin causing which
42258  # to not find them
42259  if test "x$new_path" = x \
42260      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42261      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42262    new_path=`$CYGPATH -u "$path"`
42263  fi
42264  if test "x$new_path" = x; then
42265    # Oops. Which didn't find the executable.
42266    # The splitting of arguments from the executable at a space might have been incorrect,
42267    # since paths with space are more likely in Windows. Give it another try with the whole
42268    # argument.
42269    path="$complete"
42270    arguments="EOL"
42271    new_path=`$CYGPATH -u "$path"`
42272    new_path=`$WHICH "$new_path" 2> /dev/null`
42273    # bat and cmd files are not always considered executable in cygwin causing which
42274    # to not find them
42275    if test "x$new_path" = x \
42276        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42277        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42278      new_path=`$CYGPATH -u "$path"`
42279    fi
42280    if test "x$new_path" = x; then
42281      # It's still not found. Now this is an unrecoverable error.
42282      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42283$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42284      has_space=`$ECHO "$complete" | $GREP " "`
42285      if test "x$has_space" != x; then
42286        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42287$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42288      fi
42289      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42290    fi
42291  fi
42292
42293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42296  # "foo.exe" is OK but "foo" is an error.
42297  #
42298  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42299  # It is also a way to make sure we got the proper file name for the real test later on.
42300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42301  if test "x$test_shortpath" = x; then
42302    # Short path failed, file does not exist as specified.
42303    # Try adding .exe or .cmd
42304    if test -f "${new_path}.exe"; then
42305      input_to_shortpath="${new_path}.exe"
42306    elif test -f "${new_path}.cmd"; then
42307      input_to_shortpath="${new_path}.cmd"
42308    else
42309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42310$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42311      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42312$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42313      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42314    fi
42315  else
42316    input_to_shortpath="$new_path"
42317  fi
42318
42319  # Call helper function which possibly converts this using DOS-style short mode.
42320  # If so, the updated path is stored in $new_path.
42321  new_path="$input_to_shortpath"
42322
42323  input_path="$input_to_shortpath"
42324  # Check if we need to convert this using DOS-style short mode. If the path
42325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42326  # take no chances and rewrite it.
42327  # Note: m4 eats our [], so we need to use [ and ] instead.
42328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42329  if test "x$has_forbidden_chars" != x; then
42330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42334      # Going to short mode and back again did indeed matter. Since short mode is
42335      # case insensitive, let's make it lowercase to improve readability.
42336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42337      # Now convert it back to Unix-style (cygpath)
42338      input_path=`$CYGPATH -u "$shortmode_path"`
42339      new_path="$input_path"
42340    fi
42341  fi
42342
42343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42344  if test "x$test_cygdrive_prefix" = x; then
42345    # As a simple fix, exclude /usr/bin since it's not a real path.
42346    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42348      # a path prefixed by /cygdrive for fixpath to work.
42349      new_path="$CYGWIN_ROOT_PATH$input_path"
42350    fi
42351  fi
42352
42353  # remove trailing .exe if any
42354  new_path="${new_path/%.exe/}"
42355
42356    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42357
42358  # First separate the path from the arguments. This will split at the first
42359  # space.
42360  complete="$NM"
42361  path="${complete%% *}"
42362  tmp="$complete EOL"
42363  arguments="${tmp#* }"
42364
42365  # Input might be given as Windows format, start by converting to
42366  # unix format.
42367  new_path="$path"
42368
42369  windows_path="$new_path"
42370  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42371    unix_path=`$CYGPATH -u "$windows_path"`
42372    new_path="$unix_path"
42373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42374    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42375    new_path="$unix_path"
42376  fi
42377
42378
42379  # Now try to locate executable using which
42380  new_path=`$WHICH "$new_path" 2> /dev/null`
42381
42382  if test "x$new_path" = x; then
42383    # Oops. Which didn't find the executable.
42384    # The splitting of arguments from the executable at a space might have been incorrect,
42385    # since paths with space are more likely in Windows. Give it another try with the whole
42386    # argument.
42387    path="$complete"
42388    arguments="EOL"
42389    new_path="$path"
42390
42391  windows_path="$new_path"
42392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42393    unix_path=`$CYGPATH -u "$windows_path"`
42394    new_path="$unix_path"
42395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42397    new_path="$unix_path"
42398  fi
42399
42400
42401    new_path=`$WHICH "$new_path" 2> /dev/null`
42402    # bat and cmd files are not always considered executable in MSYS causing which
42403    # to not find them
42404    if test "x$new_path" = x \
42405        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42406        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42407      new_path="$path"
42408
42409  windows_path="$new_path"
42410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42411    unix_path=`$CYGPATH -u "$windows_path"`
42412    new_path="$unix_path"
42413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42415    new_path="$unix_path"
42416  fi
42417
42418    fi
42419
42420    if test "x$new_path" = x; then
42421      # It's still not found. Now this is an unrecoverable error.
42422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42423$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42424      has_space=`$ECHO "$complete" | $GREP " "`
42425      if test "x$has_space" != x; then
42426        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42427$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42428      fi
42429      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42430    fi
42431  fi
42432
42433  # Now new_path has a complete unix path to the binary
42434  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42435    # Keep paths in /bin as-is, but remove trailing .exe if any
42436    new_path="${new_path/%.exe/}"
42437    # Do not save /bin paths to all_fixpath_prefixes!
42438  else
42439    # Not in mixed or Windows style, start by that.
42440    new_path=`cmd //c echo $new_path`
42441
42442  input_path="$new_path"
42443  # Check if we need to convert this using DOS-style short mode. If the path
42444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42445  # take no chances and rewrite it.
42446  # Note: m4 eats our [], so we need to use [ and ] instead.
42447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42448  if test "x$has_forbidden_chars" != x; then
42449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42451  fi
42452
42453    # Output is in $new_path
42454
42455  windows_path="$new_path"
42456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42457    unix_path=`$CYGPATH -u "$windows_path"`
42458    new_path="$unix_path"
42459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42461    new_path="$unix_path"
42462  fi
42463
42464    # remove trailing .exe if any
42465    new_path="${new_path/%.exe/}"
42466
42467    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42468    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42469  fi
42470
42471    else
42472      # We're on a unix platform. Hooray! :)
42473      # First separate the path from the arguments. This will split at the first
42474      # space.
42475      complete="$NM"
42476      path="${complete%% *}"
42477      tmp="$complete EOL"
42478      arguments="${tmp#* }"
42479
42480      # Cannot rely on the command "which" here since it doesn't always work.
42481      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42482      if test -z "$is_absolute_path"; then
42483        # Path to executable is not absolute. Find it.
42484        IFS_save="$IFS"
42485        IFS=:
42486        for p in $PATH; do
42487          if test -f "$p/$path" && test -x "$p/$path"; then
42488            new_path="$p/$path"
42489            break
42490          fi
42491        done
42492        IFS="$IFS_save"
42493      else
42494        # This is an absolute path, we can use it without further modifications.
42495        new_path="$path"
42496      fi
42497
42498      if test "x$new_path" = x; then
42499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42500$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42501        has_space=`$ECHO "$complete" | $GREP " "`
42502        if test "x$has_space" != x; then
42503          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42504$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42505        fi
42506        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42507      fi
42508    fi
42509
42510    # Now join together the path and the arguments once again
42511    if test "x$arguments" != xEOL; then
42512      new_complete="$new_path ${arguments% *}"
42513    else
42514      new_complete="$new_path"
42515    fi
42516
42517    if test "x$complete" != "x$new_complete"; then
42518      NM="$new_complete"
42519      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42520$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42521    fi
42522  fi
42523
42524    GNM="$NM"
42525
42526  fi
42527
42528  # objcopy is used for moving debug symbols to separate files when
42529  # full debug symbols are enabled.
42530  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42531
42532
42533  # Publish this variable in the help.
42534
42535
42536  if [ -z "${OBJCOPY+x}" ]; then
42537    # The variable is not set by user, try to locate tool using the code snippet
42538    if test -n "$ac_tool_prefix"; then
42539  for ac_prog in gobjcopy objcopy
42540  do
42541    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42542set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42544$as_echo_n "checking for $ac_word... " >&6; }
42545if ${ac_cv_prog_OBJCOPY+:} false; then :
42546  $as_echo_n "(cached) " >&6
42547else
42548  if test -n "$OBJCOPY"; then
42549  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42550else
42551as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42552for as_dir in $PATH
42553do
42554  IFS=$as_save_IFS
42555  test -z "$as_dir" && as_dir=.
42556    for ac_exec_ext in '' $ac_executable_extensions; do
42557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42558    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42560    break 2
42561  fi
42562done
42563  done
42564IFS=$as_save_IFS
42565
42566fi
42567fi
42568OBJCOPY=$ac_cv_prog_OBJCOPY
42569if test -n "$OBJCOPY"; then
42570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42571$as_echo "$OBJCOPY" >&6; }
42572else
42573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42574$as_echo "no" >&6; }
42575fi
42576
42577
42578    test -n "$OBJCOPY" && break
42579  done
42580fi
42581if test -z "$OBJCOPY"; then
42582  ac_ct_OBJCOPY=$OBJCOPY
42583  for ac_prog in gobjcopy objcopy
42584do
42585  # Extract the first word of "$ac_prog", so it can be a program name with args.
42586set dummy $ac_prog; ac_word=$2
42587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42588$as_echo_n "checking for $ac_word... " >&6; }
42589if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42590  $as_echo_n "(cached) " >&6
42591else
42592  if test -n "$ac_ct_OBJCOPY"; then
42593  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42594else
42595as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42596for as_dir in $PATH
42597do
42598  IFS=$as_save_IFS
42599  test -z "$as_dir" && as_dir=.
42600    for ac_exec_ext in '' $ac_executable_extensions; do
42601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42602    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42604    break 2
42605  fi
42606done
42607  done
42608IFS=$as_save_IFS
42609
42610fi
42611fi
42612ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42613if test -n "$ac_ct_OBJCOPY"; then
42614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42615$as_echo "$ac_ct_OBJCOPY" >&6; }
42616else
42617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42618$as_echo "no" >&6; }
42619fi
42620
42621
42622  test -n "$ac_ct_OBJCOPY" && break
42623done
42624
42625  if test "x$ac_ct_OBJCOPY" = x; then
42626    OBJCOPY=""
42627  else
42628    case $cross_compiling:$ac_tool_warned in
42629yes:)
42630{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42631$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42632ac_tool_warned=yes ;;
42633esac
42634    OBJCOPY=$ac_ct_OBJCOPY
42635  fi
42636fi
42637
42638  else
42639    # The variable is set, but is it from the command line or the environment?
42640
42641    # Try to remove the string !OBJCOPY! from our list.
42642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42644      # If it failed, the variable was not from the command line. Ignore it,
42645      # but warn the user (except for BASH, which is always set by the calling BASH).
42646      if test "xOBJCOPY" != xBASH; then
42647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42648$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42649      fi
42650      # Try to locate tool using the code snippet
42651      if test -n "$ac_tool_prefix"; then
42652  for ac_prog in gobjcopy objcopy
42653  do
42654    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42655set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42657$as_echo_n "checking for $ac_word... " >&6; }
42658if ${ac_cv_prog_OBJCOPY+:} false; then :
42659  $as_echo_n "(cached) " >&6
42660else
42661  if test -n "$OBJCOPY"; then
42662  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42663else
42664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42665for as_dir in $PATH
42666do
42667  IFS=$as_save_IFS
42668  test -z "$as_dir" && as_dir=.
42669    for ac_exec_ext in '' $ac_executable_extensions; do
42670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42671    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42673    break 2
42674  fi
42675done
42676  done
42677IFS=$as_save_IFS
42678
42679fi
42680fi
42681OBJCOPY=$ac_cv_prog_OBJCOPY
42682if test -n "$OBJCOPY"; then
42683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42684$as_echo "$OBJCOPY" >&6; }
42685else
42686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42687$as_echo "no" >&6; }
42688fi
42689
42690
42691    test -n "$OBJCOPY" && break
42692  done
42693fi
42694if test -z "$OBJCOPY"; then
42695  ac_ct_OBJCOPY=$OBJCOPY
42696  for ac_prog in gobjcopy objcopy
42697do
42698  # Extract the first word of "$ac_prog", so it can be a program name with args.
42699set dummy $ac_prog; ac_word=$2
42700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42701$as_echo_n "checking for $ac_word... " >&6; }
42702if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42703  $as_echo_n "(cached) " >&6
42704else
42705  if test -n "$ac_ct_OBJCOPY"; then
42706  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42707else
42708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42709for as_dir in $PATH
42710do
42711  IFS=$as_save_IFS
42712  test -z "$as_dir" && as_dir=.
42713    for ac_exec_ext in '' $ac_executable_extensions; do
42714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42715    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42717    break 2
42718  fi
42719done
42720  done
42721IFS=$as_save_IFS
42722
42723fi
42724fi
42725ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42726if test -n "$ac_ct_OBJCOPY"; then
42727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42728$as_echo "$ac_ct_OBJCOPY" >&6; }
42729else
42730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42731$as_echo "no" >&6; }
42732fi
42733
42734
42735  test -n "$ac_ct_OBJCOPY" && break
42736done
42737
42738  if test "x$ac_ct_OBJCOPY" = x; then
42739    OBJCOPY=""
42740  else
42741    case $cross_compiling:$ac_tool_warned in
42742yes:)
42743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42745ac_tool_warned=yes ;;
42746esac
42747    OBJCOPY=$ac_ct_OBJCOPY
42748  fi
42749fi
42750
42751    else
42752      # If it succeeded, then it was overridden by the user. We will use it
42753      # for the tool.
42754
42755      # First remove it from the list of overridden variables, so we can test
42756      # for unknown variables in the end.
42757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42758
42759      # Check if we try to supply an empty value
42760      if test "x$OBJCOPY" = x; then
42761        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42762$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42764$as_echo_n "checking for OBJCOPY... " >&6; }
42765        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42766$as_echo "disabled" >&6; }
42767      else
42768        # Check if the provided tool contains a complete path.
42769        tool_specified="$OBJCOPY"
42770        tool_basename="${tool_specified##*/}"
42771        if test "x$tool_basename" = "x$tool_specified"; then
42772          # A command without a complete path is provided, search $PATH.
42773          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42774$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42775          # Extract the first word of "$tool_basename", so it can be a program name with args.
42776set dummy $tool_basename; ac_word=$2
42777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42778$as_echo_n "checking for $ac_word... " >&6; }
42779if ${ac_cv_path_OBJCOPY+:} false; then :
42780  $as_echo_n "(cached) " >&6
42781else
42782  case $OBJCOPY in
42783  [\\/]* | ?:[\\/]*)
42784  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42785  ;;
42786  *)
42787  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42788for as_dir in $PATH
42789do
42790  IFS=$as_save_IFS
42791  test -z "$as_dir" && as_dir=.
42792    for ac_exec_ext in '' $ac_executable_extensions; do
42793  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42794    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42795    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42796    break 2
42797  fi
42798done
42799  done
42800IFS=$as_save_IFS
42801
42802  ;;
42803esac
42804fi
42805OBJCOPY=$ac_cv_path_OBJCOPY
42806if test -n "$OBJCOPY"; then
42807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42808$as_echo "$OBJCOPY" >&6; }
42809else
42810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42811$as_echo "no" >&6; }
42812fi
42813
42814
42815          if test "x$OBJCOPY" = x; then
42816            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42817          fi
42818        else
42819          # Otherwise we believe it is a complete path. Use it as it is.
42820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42821$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42822          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42823$as_echo_n "checking for OBJCOPY... " >&6; }
42824          if test ! -x "$tool_specified"; then
42825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42826$as_echo "not found" >&6; }
42827            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42828          fi
42829          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42830$as_echo "$tool_specified" >&6; }
42831        fi
42832      fi
42833    fi
42834
42835  fi
42836
42837
42838    # Only call fixup if objcopy was found.
42839    if test -n "$OBJCOPY"; then
42840
42841  # Only process if variable expands to non-empty
42842
42843  if test "x$OBJCOPY" != x; then
42844    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42845
42846  # First separate the path from the arguments. This will split at the first
42847  # space.
42848  complete="$OBJCOPY"
42849  path="${complete%% *}"
42850  tmp="$complete EOL"
42851  arguments="${tmp#* }"
42852
42853  # Input might be given as Windows format, start by converting to
42854  # unix format.
42855  new_path=`$CYGPATH -u "$path"`
42856
42857  # Now try to locate executable using which
42858  new_path=`$WHICH "$new_path" 2> /dev/null`
42859  # bat and cmd files are not always considered executable in cygwin causing which
42860  # to not find them
42861  if test "x$new_path" = x \
42862      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42863      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42864    new_path=`$CYGPATH -u "$path"`
42865  fi
42866  if test "x$new_path" = x; then
42867    # Oops. Which didn't find the executable.
42868    # The splitting of arguments from the executable at a space might have been incorrect,
42869    # since paths with space are more likely in Windows. Give it another try with the whole
42870    # argument.
42871    path="$complete"
42872    arguments="EOL"
42873    new_path=`$CYGPATH -u "$path"`
42874    new_path=`$WHICH "$new_path" 2> /dev/null`
42875    # bat and cmd files are not always considered executable in cygwin causing which
42876    # to not find them
42877    if test "x$new_path" = x \
42878        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42879        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42880      new_path=`$CYGPATH -u "$path"`
42881    fi
42882    if test "x$new_path" = x; then
42883      # It's still not found. Now this is an unrecoverable error.
42884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42885$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42886      has_space=`$ECHO "$complete" | $GREP " "`
42887      if test "x$has_space" != x; then
42888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42890      fi
42891      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42892    fi
42893  fi
42894
42895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42898  # "foo.exe" is OK but "foo" is an error.
42899  #
42900  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42901  # It is also a way to make sure we got the proper file name for the real test later on.
42902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42903  if test "x$test_shortpath" = x; then
42904    # Short path failed, file does not exist as specified.
42905    # Try adding .exe or .cmd
42906    if test -f "${new_path}.exe"; then
42907      input_to_shortpath="${new_path}.exe"
42908    elif test -f "${new_path}.cmd"; then
42909      input_to_shortpath="${new_path}.cmd"
42910    else
42911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42912$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42913      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42914$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42915      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42916    fi
42917  else
42918    input_to_shortpath="$new_path"
42919  fi
42920
42921  # Call helper function which possibly converts this using DOS-style short mode.
42922  # If so, the updated path is stored in $new_path.
42923  new_path="$input_to_shortpath"
42924
42925  input_path="$input_to_shortpath"
42926  # Check if we need to convert this using DOS-style short mode. If the path
42927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42928  # take no chances and rewrite it.
42929  # Note: m4 eats our [], so we need to use [ and ] instead.
42930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42931  if test "x$has_forbidden_chars" != x; then
42932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42936      # Going to short mode and back again did indeed matter. Since short mode is
42937      # case insensitive, let's make it lowercase to improve readability.
42938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42939      # Now convert it back to Unix-style (cygpath)
42940      input_path=`$CYGPATH -u "$shortmode_path"`
42941      new_path="$input_path"
42942    fi
42943  fi
42944
42945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42946  if test "x$test_cygdrive_prefix" = x; then
42947    # As a simple fix, exclude /usr/bin since it's not a real path.
42948    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42950      # a path prefixed by /cygdrive for fixpath to work.
42951      new_path="$CYGWIN_ROOT_PATH$input_path"
42952    fi
42953  fi
42954
42955  # remove trailing .exe if any
42956  new_path="${new_path/%.exe/}"
42957
42958    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42959
42960  # First separate the path from the arguments. This will split at the first
42961  # space.
42962  complete="$OBJCOPY"
42963  path="${complete%% *}"
42964  tmp="$complete EOL"
42965  arguments="${tmp#* }"
42966
42967  # Input might be given as Windows format, start by converting to
42968  # unix format.
42969  new_path="$path"
42970
42971  windows_path="$new_path"
42972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42973    unix_path=`$CYGPATH -u "$windows_path"`
42974    new_path="$unix_path"
42975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42977    new_path="$unix_path"
42978  fi
42979
42980
42981  # Now try to locate executable using which
42982  new_path=`$WHICH "$new_path" 2> /dev/null`
42983
42984  if test "x$new_path" = x; then
42985    # Oops. Which didn't find the executable.
42986    # The splitting of arguments from the executable at a space might have been incorrect,
42987    # since paths with space are more likely in Windows. Give it another try with the whole
42988    # argument.
42989    path="$complete"
42990    arguments="EOL"
42991    new_path="$path"
42992
42993  windows_path="$new_path"
42994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42995    unix_path=`$CYGPATH -u "$windows_path"`
42996    new_path="$unix_path"
42997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42999    new_path="$unix_path"
43000  fi
43001
43002
43003    new_path=`$WHICH "$new_path" 2> /dev/null`
43004    # bat and cmd files are not always considered executable in MSYS causing which
43005    # to not find them
43006    if test "x$new_path" = x \
43007        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43008        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43009      new_path="$path"
43010
43011  windows_path="$new_path"
43012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43013    unix_path=`$CYGPATH -u "$windows_path"`
43014    new_path="$unix_path"
43015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43016    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43017    new_path="$unix_path"
43018  fi
43019
43020    fi
43021
43022    if test "x$new_path" = x; then
43023      # It's still not found. Now this is an unrecoverable error.
43024      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43025$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43026      has_space=`$ECHO "$complete" | $GREP " "`
43027      if test "x$has_space" != x; then
43028        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43029$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43030      fi
43031      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43032    fi
43033  fi
43034
43035  # Now new_path has a complete unix path to the binary
43036  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43037    # Keep paths in /bin as-is, but remove trailing .exe if any
43038    new_path="${new_path/%.exe/}"
43039    # Do not save /bin paths to all_fixpath_prefixes!
43040  else
43041    # Not in mixed or Windows style, start by that.
43042    new_path=`cmd //c echo $new_path`
43043
43044  input_path="$new_path"
43045  # Check if we need to convert this using DOS-style short mode. If the path
43046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43047  # take no chances and rewrite it.
43048  # Note: m4 eats our [], so we need to use [ and ] instead.
43049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43050  if test "x$has_forbidden_chars" != x; then
43051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43053  fi
43054
43055    # Output is in $new_path
43056
43057  windows_path="$new_path"
43058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43059    unix_path=`$CYGPATH -u "$windows_path"`
43060    new_path="$unix_path"
43061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43063    new_path="$unix_path"
43064  fi
43065
43066    # remove trailing .exe if any
43067    new_path="${new_path/%.exe/}"
43068
43069    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43070    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43071  fi
43072
43073    else
43074      # We're on a unix platform. Hooray! :)
43075      # First separate the path from the arguments. This will split at the first
43076      # space.
43077      complete="$OBJCOPY"
43078      path="${complete%% *}"
43079      tmp="$complete EOL"
43080      arguments="${tmp#* }"
43081
43082      # Cannot rely on the command "which" here since it doesn't always work.
43083      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43084      if test -z "$is_absolute_path"; then
43085        # Path to executable is not absolute. Find it.
43086        IFS_save="$IFS"
43087        IFS=:
43088        for p in $PATH; do
43089          if test -f "$p/$path" && test -x "$p/$path"; then
43090            new_path="$p/$path"
43091            break
43092          fi
43093        done
43094        IFS="$IFS_save"
43095      else
43096        # This is an absolute path, we can use it without further modifications.
43097        new_path="$path"
43098      fi
43099
43100      if test "x$new_path" = x; then
43101        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43102$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43103        has_space=`$ECHO "$complete" | $GREP " "`
43104        if test "x$has_space" != x; then
43105          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43106$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43107        fi
43108        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43109      fi
43110    fi
43111
43112    # Now join together the path and the arguments once again
43113    if test "x$arguments" != xEOL; then
43114      new_complete="$new_path ${arguments% *}"
43115    else
43116      new_complete="$new_path"
43117    fi
43118
43119    if test "x$complete" != "x$new_complete"; then
43120      OBJCOPY="$new_complete"
43121      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43122$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43123    fi
43124  fi
43125
43126      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43127        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43128        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43129        # - version number is last blank separate word on first line
43130        # - version number formats that have been seen:
43131        #   - <major>.<minor>
43132        #   - <major>.<minor>.<micro>
43133        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43134        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43135         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43136              -e 's/.* //' \
43137              -e '/^[01]\./b bad' \
43138              -e '/^2\./{' \
43139              -e '  s/^2\.//' \
43140              -e '  /^[0-9]$/b bad' \
43141              -e '  /^[0-9]\./b bad' \
43142              -e '  /^1[0-9]$/b bad' \
43143              -e '  /^1[0-9]\./b bad' \
43144              -e '  /^20\./b bad' \
43145              -e '  /^21\.0$/b bad' \
43146              -e '  /^21\.0\./b bad' \
43147              -e '}' \
43148              -e ':good' \
43149              -e 's/.*/VALID_VERSION/p' \
43150              -e 'q' \
43151              -e ':bad' \
43152              -e 's/.*/BAD_VERSION/p' \
43153              -e 'q'`
43154        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43155          OBJCOPY=
43156          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&5
43157$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43158          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43159$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43160          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43161$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43162          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43163$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43164          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43165$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43166        fi
43167      fi
43168    fi
43169  fi
43170
43171
43172
43173  # Publish this variable in the help.
43174
43175
43176  if [ -z "${OBJDUMP+x}" ]; then
43177    # The variable is not set by user, try to locate tool using the code snippet
43178    if test -n "$ac_tool_prefix"; then
43179  for ac_prog in gobjdump objdump
43180  do
43181    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43182set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43184$as_echo_n "checking for $ac_word... " >&6; }
43185if ${ac_cv_prog_OBJDUMP+:} false; then :
43186  $as_echo_n "(cached) " >&6
43187else
43188  if test -n "$OBJDUMP"; then
43189  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43190else
43191as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43192for as_dir in $PATH
43193do
43194  IFS=$as_save_IFS
43195  test -z "$as_dir" && as_dir=.
43196    for ac_exec_ext in '' $ac_executable_extensions; do
43197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43198    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43200    break 2
43201  fi
43202done
43203  done
43204IFS=$as_save_IFS
43205
43206fi
43207fi
43208OBJDUMP=$ac_cv_prog_OBJDUMP
43209if test -n "$OBJDUMP"; then
43210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43211$as_echo "$OBJDUMP" >&6; }
43212else
43213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43214$as_echo "no" >&6; }
43215fi
43216
43217
43218    test -n "$OBJDUMP" && break
43219  done
43220fi
43221if test -z "$OBJDUMP"; then
43222  ac_ct_OBJDUMP=$OBJDUMP
43223  for ac_prog in gobjdump objdump
43224do
43225  # Extract the first word of "$ac_prog", so it can be a program name with args.
43226set dummy $ac_prog; ac_word=$2
43227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43228$as_echo_n "checking for $ac_word... " >&6; }
43229if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43230  $as_echo_n "(cached) " >&6
43231else
43232  if test -n "$ac_ct_OBJDUMP"; then
43233  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43234else
43235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43236for as_dir in $PATH
43237do
43238  IFS=$as_save_IFS
43239  test -z "$as_dir" && as_dir=.
43240    for ac_exec_ext in '' $ac_executable_extensions; do
43241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43242    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43244    break 2
43245  fi
43246done
43247  done
43248IFS=$as_save_IFS
43249
43250fi
43251fi
43252ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43253if test -n "$ac_ct_OBJDUMP"; then
43254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43255$as_echo "$ac_ct_OBJDUMP" >&6; }
43256else
43257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43258$as_echo "no" >&6; }
43259fi
43260
43261
43262  test -n "$ac_ct_OBJDUMP" && break
43263done
43264
43265  if test "x$ac_ct_OBJDUMP" = x; then
43266    OBJDUMP=""
43267  else
43268    case $cross_compiling:$ac_tool_warned in
43269yes:)
43270{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43271$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43272ac_tool_warned=yes ;;
43273esac
43274    OBJDUMP=$ac_ct_OBJDUMP
43275  fi
43276fi
43277
43278  else
43279    # The variable is set, but is it from the command line or the environment?
43280
43281    # Try to remove the string !OBJDUMP! from our list.
43282    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43283    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43284      # If it failed, the variable was not from the command line. Ignore it,
43285      # but warn the user (except for BASH, which is always set by the calling BASH).
43286      if test "xOBJDUMP" != xBASH; then
43287        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43288$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43289      fi
43290      # Try to locate tool using the code snippet
43291      if test -n "$ac_tool_prefix"; then
43292  for ac_prog in gobjdump objdump
43293  do
43294    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43295set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43297$as_echo_n "checking for $ac_word... " >&6; }
43298if ${ac_cv_prog_OBJDUMP+:} false; then :
43299  $as_echo_n "(cached) " >&6
43300else
43301  if test -n "$OBJDUMP"; then
43302  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43303else
43304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43305for as_dir in $PATH
43306do
43307  IFS=$as_save_IFS
43308  test -z "$as_dir" && as_dir=.
43309    for ac_exec_ext in '' $ac_executable_extensions; do
43310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43311    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43313    break 2
43314  fi
43315done
43316  done
43317IFS=$as_save_IFS
43318
43319fi
43320fi
43321OBJDUMP=$ac_cv_prog_OBJDUMP
43322if test -n "$OBJDUMP"; then
43323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43324$as_echo "$OBJDUMP" >&6; }
43325else
43326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43327$as_echo "no" >&6; }
43328fi
43329
43330
43331    test -n "$OBJDUMP" && break
43332  done
43333fi
43334if test -z "$OBJDUMP"; then
43335  ac_ct_OBJDUMP=$OBJDUMP
43336  for ac_prog in gobjdump objdump
43337do
43338  # Extract the first word of "$ac_prog", so it can be a program name with args.
43339set dummy $ac_prog; ac_word=$2
43340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43341$as_echo_n "checking for $ac_word... " >&6; }
43342if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43343  $as_echo_n "(cached) " >&6
43344else
43345  if test -n "$ac_ct_OBJDUMP"; then
43346  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43347else
43348as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43349for as_dir in $PATH
43350do
43351  IFS=$as_save_IFS
43352  test -z "$as_dir" && as_dir=.
43353    for ac_exec_ext in '' $ac_executable_extensions; do
43354  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43355    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43356    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43357    break 2
43358  fi
43359done
43360  done
43361IFS=$as_save_IFS
43362
43363fi
43364fi
43365ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43366if test -n "$ac_ct_OBJDUMP"; then
43367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43368$as_echo "$ac_ct_OBJDUMP" >&6; }
43369else
43370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43371$as_echo "no" >&6; }
43372fi
43373
43374
43375  test -n "$ac_ct_OBJDUMP" && break
43376done
43377
43378  if test "x$ac_ct_OBJDUMP" = x; then
43379    OBJDUMP=""
43380  else
43381    case $cross_compiling:$ac_tool_warned in
43382yes:)
43383{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43384$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43385ac_tool_warned=yes ;;
43386esac
43387    OBJDUMP=$ac_ct_OBJDUMP
43388  fi
43389fi
43390
43391    else
43392      # If it succeeded, then it was overridden by the user. We will use it
43393      # for the tool.
43394
43395      # First remove it from the list of overridden variables, so we can test
43396      # for unknown variables in the end.
43397      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43398
43399      # Check if we try to supply an empty value
43400      if test "x$OBJDUMP" = x; then
43401        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43402$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43403        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43404$as_echo_n "checking for OBJDUMP... " >&6; }
43405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43406$as_echo "disabled" >&6; }
43407      else
43408        # Check if the provided tool contains a complete path.
43409        tool_specified="$OBJDUMP"
43410        tool_basename="${tool_specified##*/}"
43411        if test "x$tool_basename" = "x$tool_specified"; then
43412          # A command without a complete path is provided, search $PATH.
43413          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43414$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43415          # Extract the first word of "$tool_basename", so it can be a program name with args.
43416set dummy $tool_basename; ac_word=$2
43417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43418$as_echo_n "checking for $ac_word... " >&6; }
43419if ${ac_cv_path_OBJDUMP+:} false; then :
43420  $as_echo_n "(cached) " >&6
43421else
43422  case $OBJDUMP in
43423  [\\/]* | ?:[\\/]*)
43424  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43425  ;;
43426  *)
43427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43428for as_dir in $PATH
43429do
43430  IFS=$as_save_IFS
43431  test -z "$as_dir" && as_dir=.
43432    for ac_exec_ext in '' $ac_executable_extensions; do
43433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43434    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43436    break 2
43437  fi
43438done
43439  done
43440IFS=$as_save_IFS
43441
43442  ;;
43443esac
43444fi
43445OBJDUMP=$ac_cv_path_OBJDUMP
43446if test -n "$OBJDUMP"; then
43447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43448$as_echo "$OBJDUMP" >&6; }
43449else
43450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43451$as_echo "no" >&6; }
43452fi
43453
43454
43455          if test "x$OBJDUMP" = x; then
43456            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43457          fi
43458        else
43459          # Otherwise we believe it is a complete path. Use it as it is.
43460          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43461$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43462          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43463$as_echo_n "checking for OBJDUMP... " >&6; }
43464          if test ! -x "$tool_specified"; then
43465            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43466$as_echo "not found" >&6; }
43467            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43468          fi
43469          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43470$as_echo "$tool_specified" >&6; }
43471        fi
43472      fi
43473    fi
43474
43475  fi
43476
43477
43478  if test "x$OBJDUMP" != x; then
43479    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43480    # bails if argument is missing.
43481
43482  # Only process if variable expands to non-empty
43483
43484  if test "x$OBJDUMP" != x; then
43485    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43486
43487  # First separate the path from the arguments. This will split at the first
43488  # space.
43489  complete="$OBJDUMP"
43490  path="${complete%% *}"
43491  tmp="$complete EOL"
43492  arguments="${tmp#* }"
43493
43494  # Input might be given as Windows format, start by converting to
43495  # unix format.
43496  new_path=`$CYGPATH -u "$path"`
43497
43498  # Now try to locate executable using which
43499  new_path=`$WHICH "$new_path" 2> /dev/null`
43500  # bat and cmd files are not always considered executable in cygwin causing which
43501  # to not find them
43502  if test "x$new_path" = x \
43503      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43504      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43505    new_path=`$CYGPATH -u "$path"`
43506  fi
43507  if test "x$new_path" = x; then
43508    # Oops. Which didn't find the executable.
43509    # The splitting of arguments from the executable at a space might have been incorrect,
43510    # since paths with space are more likely in Windows. Give it another try with the whole
43511    # argument.
43512    path="$complete"
43513    arguments="EOL"
43514    new_path=`$CYGPATH -u "$path"`
43515    new_path=`$WHICH "$new_path" 2> /dev/null`
43516    # bat and cmd files are not always considered executable in cygwin causing which
43517    # to not find them
43518    if test "x$new_path" = x \
43519        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43520        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43521      new_path=`$CYGPATH -u "$path"`
43522    fi
43523    if test "x$new_path" = x; then
43524      # It's still not found. Now this is an unrecoverable error.
43525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43526$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43527      has_space=`$ECHO "$complete" | $GREP " "`
43528      if test "x$has_space" != x; then
43529        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43530$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43531      fi
43532      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43533    fi
43534  fi
43535
43536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43539  # "foo.exe" is OK but "foo" is an error.
43540  #
43541  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43542  # It is also a way to make sure we got the proper file name for the real test later on.
43543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43544  if test "x$test_shortpath" = x; then
43545    # Short path failed, file does not exist as specified.
43546    # Try adding .exe or .cmd
43547    if test -f "${new_path}.exe"; then
43548      input_to_shortpath="${new_path}.exe"
43549    elif test -f "${new_path}.cmd"; then
43550      input_to_shortpath="${new_path}.cmd"
43551    else
43552      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43553$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43554      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43555$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43556      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43557    fi
43558  else
43559    input_to_shortpath="$new_path"
43560  fi
43561
43562  # Call helper function which possibly converts this using DOS-style short mode.
43563  # If so, the updated path is stored in $new_path.
43564  new_path="$input_to_shortpath"
43565
43566  input_path="$input_to_shortpath"
43567  # Check if we need to convert this using DOS-style short mode. If the path
43568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43569  # take no chances and rewrite it.
43570  # Note: m4 eats our [], so we need to use [ and ] instead.
43571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43572  if test "x$has_forbidden_chars" != x; then
43573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43577      # Going to short mode and back again did indeed matter. Since short mode is
43578      # case insensitive, let's make it lowercase to improve readability.
43579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43580      # Now convert it back to Unix-style (cygpath)
43581      input_path=`$CYGPATH -u "$shortmode_path"`
43582      new_path="$input_path"
43583    fi
43584  fi
43585
43586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43587  if test "x$test_cygdrive_prefix" = x; then
43588    # As a simple fix, exclude /usr/bin since it's not a real path.
43589    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43591      # a path prefixed by /cygdrive for fixpath to work.
43592      new_path="$CYGWIN_ROOT_PATH$input_path"
43593    fi
43594  fi
43595
43596  # remove trailing .exe if any
43597  new_path="${new_path/%.exe/}"
43598
43599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43600
43601  # First separate the path from the arguments. This will split at the first
43602  # space.
43603  complete="$OBJDUMP"
43604  path="${complete%% *}"
43605  tmp="$complete EOL"
43606  arguments="${tmp#* }"
43607
43608  # Input might be given as Windows format, start by converting to
43609  # unix format.
43610  new_path="$path"
43611
43612  windows_path="$new_path"
43613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43614    unix_path=`$CYGPATH -u "$windows_path"`
43615    new_path="$unix_path"
43616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43618    new_path="$unix_path"
43619  fi
43620
43621
43622  # Now try to locate executable using which
43623  new_path=`$WHICH "$new_path" 2> /dev/null`
43624
43625  if test "x$new_path" = x; then
43626    # Oops. Which didn't find the executable.
43627    # The splitting of arguments from the executable at a space might have been incorrect,
43628    # since paths with space are more likely in Windows. Give it another try with the whole
43629    # argument.
43630    path="$complete"
43631    arguments="EOL"
43632    new_path="$path"
43633
43634  windows_path="$new_path"
43635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43636    unix_path=`$CYGPATH -u "$windows_path"`
43637    new_path="$unix_path"
43638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43640    new_path="$unix_path"
43641  fi
43642
43643
43644    new_path=`$WHICH "$new_path" 2> /dev/null`
43645    # bat and cmd files are not always considered executable in MSYS causing which
43646    # to not find them
43647    if test "x$new_path" = x \
43648        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43649        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43650      new_path="$path"
43651
43652  windows_path="$new_path"
43653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43654    unix_path=`$CYGPATH -u "$windows_path"`
43655    new_path="$unix_path"
43656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43658    new_path="$unix_path"
43659  fi
43660
43661    fi
43662
43663    if test "x$new_path" = x; then
43664      # It's still not found. Now this is an unrecoverable error.
43665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43666$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43667      has_space=`$ECHO "$complete" | $GREP " "`
43668      if test "x$has_space" != x; then
43669        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43670$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43671      fi
43672      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43673    fi
43674  fi
43675
43676  # Now new_path has a complete unix path to the binary
43677  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43678    # Keep paths in /bin as-is, but remove trailing .exe if any
43679    new_path="${new_path/%.exe/}"
43680    # Do not save /bin paths to all_fixpath_prefixes!
43681  else
43682    # Not in mixed or Windows style, start by that.
43683    new_path=`cmd //c echo $new_path`
43684
43685  input_path="$new_path"
43686  # Check if we need to convert this using DOS-style short mode. If the path
43687  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43688  # take no chances and rewrite it.
43689  # Note: m4 eats our [], so we need to use [ and ] instead.
43690  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43691  if test "x$has_forbidden_chars" != x; then
43692    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43693    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43694  fi
43695
43696    # Output is in $new_path
43697
43698  windows_path="$new_path"
43699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43700    unix_path=`$CYGPATH -u "$windows_path"`
43701    new_path="$unix_path"
43702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43704    new_path="$unix_path"
43705  fi
43706
43707    # remove trailing .exe if any
43708    new_path="${new_path/%.exe/}"
43709
43710    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43711    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43712  fi
43713
43714    else
43715      # We're on a unix platform. Hooray! :)
43716      # First separate the path from the arguments. This will split at the first
43717      # space.
43718      complete="$OBJDUMP"
43719      path="${complete%% *}"
43720      tmp="$complete EOL"
43721      arguments="${tmp#* }"
43722
43723      # Cannot rely on the command "which" here since it doesn't always work.
43724      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43725      if test -z "$is_absolute_path"; then
43726        # Path to executable is not absolute. Find it.
43727        IFS_save="$IFS"
43728        IFS=:
43729        for p in $PATH; do
43730          if test -f "$p/$path" && test -x "$p/$path"; then
43731            new_path="$p/$path"
43732            break
43733          fi
43734        done
43735        IFS="$IFS_save"
43736      else
43737        # This is an absolute path, we can use it without further modifications.
43738        new_path="$path"
43739      fi
43740
43741      if test "x$new_path" = x; then
43742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43743$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43744        has_space=`$ECHO "$complete" | $GREP " "`
43745        if test "x$has_space" != x; then
43746          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43747$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43748        fi
43749        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43750      fi
43751    fi
43752
43753    # Now join together the path and the arguments once again
43754    if test "x$arguments" != xEOL; then
43755      new_complete="$new_path ${arguments% *}"
43756    else
43757      new_complete="$new_path"
43758    fi
43759
43760    if test "x$complete" != "x$new_complete"; then
43761      OBJDUMP="$new_complete"
43762      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43763$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43764    fi
43765  fi
43766
43767  fi
43768
43769
43770  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
43771  # to remain in place. Otherwise the compiler will not work in some siutations
43772  # in later configure checks.
43773  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
43774    PATH="$OLD_PATH"
43775  fi
43776
43777  # Restore the flags to the user specified values.
43778  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43779  CFLAGS="$ORG_CFLAGS"
43780  CXXFLAGS="$ORG_CXXFLAGS"
43781
43782
43783# Finally do some processing after the detection phase
43784
43785  if test "x$COMPILE_TYPE" = "xcross"; then
43786    # Now we need to find a C/C++ compiler that can build executables for the
43787    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43788    # used once. Also, we need to do this without adding a tools dir to the
43789    # path, otherwise we might pick up cross-compilers which don't use standard
43790    # naming.
43791
43792    OLDPATH="$PATH"
43793
43794
43795# Check whether --with-build-devkit was given.
43796if test "${with_build_devkit+set}" = set; then :
43797  withval=$with_build_devkit;
43798fi
43799
43800    if test "x$with_build_devkit" = "xyes"; then
43801      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43802    elif test -n "$with_build_devkit"; then
43803      if test ! -d "$with_build_devkit"; then
43804        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43805      else
43806
43807  # Only process if variable expands to non-empty
43808
43809  if test "x$with_build_devkit" != x; then
43810    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43811
43812  # Input might be given as Windows format, start by converting to
43813  # unix format.
43814  path="$with_build_devkit"
43815  new_path=`$CYGPATH -u "$path"`
43816
43817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43820  # "foo.exe" is OK but "foo" is an error.
43821  #
43822  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43823  # It is also a way to make sure we got the proper file name for the real test later on.
43824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43825  if test "x$test_shortpath" = x; then
43826    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43827$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43828    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43829  fi
43830
43831  # Call helper function which possibly converts this using DOS-style short mode.
43832  # If so, the updated path is stored in $new_path.
43833
43834  input_path="$new_path"
43835  # Check if we need to convert this using DOS-style short mode. If the path
43836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43837  # take no chances and rewrite it.
43838  # Note: m4 eats our [], so we need to use [ and ] instead.
43839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43840  if test "x$has_forbidden_chars" != x; then
43841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43842    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43843    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43844    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43845      # Going to short mode and back again did indeed matter. Since short mode is
43846      # case insensitive, let's make it lowercase to improve readability.
43847      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43848      # Now convert it back to Unix-style (cygpath)
43849      input_path=`$CYGPATH -u "$shortmode_path"`
43850      new_path="$input_path"
43851    fi
43852  fi
43853
43854  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43855  if test "x$test_cygdrive_prefix" = x; then
43856    # As a simple fix, exclude /usr/bin since it's not a real path.
43857    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43858      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43859      # a path prefixed by /cygdrive for fixpath to work.
43860      new_path="$CYGWIN_ROOT_PATH$input_path"
43861    fi
43862  fi
43863
43864
43865  if test "x$path" != "x$new_path"; then
43866    with_build_devkit="$new_path"
43867    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43868$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43869  fi
43870
43871    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43872
43873  path="$with_build_devkit"
43874  has_colon=`$ECHO $path | $GREP ^.:`
43875  new_path="$path"
43876  if test "x$has_colon" = x; then
43877    # Not in mixed or Windows style, start by that.
43878    new_path=`cmd //c echo $path`
43879  fi
43880
43881
43882  input_path="$new_path"
43883  # Check if we need to convert this using DOS-style short mode. If the path
43884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43885  # take no chances and rewrite it.
43886  # Note: m4 eats our [], so we need to use [ and ] instead.
43887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43888  if test "x$has_forbidden_chars" != x; then
43889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43891  fi
43892
43893
43894  windows_path="$new_path"
43895  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43896    unix_path=`$CYGPATH -u "$windows_path"`
43897    new_path="$unix_path"
43898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43899    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43900    new_path="$unix_path"
43901  fi
43902
43903  if test "x$path" != "x$new_path"; then
43904    with_build_devkit="$new_path"
43905    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43906$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43907  fi
43908
43909  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43910  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43911
43912    else
43913      # We're on a unix platform. Hooray! :)
43914      path="$with_build_devkit"
43915      has_space=`$ECHO "$path" | $GREP " "`
43916      if test "x$has_space" != x; then
43917        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43918$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43919        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43920      fi
43921
43922      # Use eval to expand a potential ~
43923      eval path="$path"
43924      if test ! -f "$path" && test ! -d "$path"; then
43925        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43926      fi
43927
43928      if test -d "$path"; then
43929        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43930      else
43931        dir="`$DIRNAME "$path"`"
43932        base="`$BASENAME "$path"`"
43933        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43934      fi
43935    fi
43936  fi
43937
43938        BUILD_DEVKIT_ROOT="$with_build_devkit"
43939        # Check for a meta data info file in the root of the devkit
43940        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43941          # Process devkit.info so that existing devkit variables are not
43942          # modified by this
43943          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43944              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43945              -e "s/\$host/\$build/g" \
43946              $BUILD_DEVKIT_ROOT/devkit.info \
43947              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43948          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43949          # This potentially sets the following:
43950          # A descriptive name of the devkit
43951
43952  if test "x$BUILD_DEVKIT_NAME" = x; then
43953    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43954  fi
43955
43956          # Corresponds to --with-extra-path
43957
43958  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43959    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43960  fi
43961
43962          # Corresponds to --with-toolchain-path
43963
43964  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43965    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43966  fi
43967
43968          # Corresponds to --with-sysroot
43969
43970  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43971    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43972  fi
43973
43974          # Skip the Window specific parts
43975        fi
43976
43977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43978$as_echo_n "checking for build platform devkit... " >&6; }
43979        if test "x$BUILD_DEVKIT_NAME" != x; then
43980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43981$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43982        else
43983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43984$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43985        fi
43986
43987        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43988
43989  if test "x$BUILD_SYSROOT" != "x"; then
43990    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43991      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43992        # Solaris Studio does not have a concept of sysroot. Instead we must
43993        # make sure the default include and lib dirs are appended to each
43994        # compile and link command line. Must also add -I-xbuiltin to enable
43995        # inlining of system functions and intrinsics.
43996        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43997        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43998            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43999            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
44000      fi
44001    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44002      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44003      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44004    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44005      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44006      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44007    fi
44008    # Propagate the sysroot args to hotspot
44009    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44010    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44011    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44012    # The global CFLAGS and LDFLAGS variables need these for configure to function
44013    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44014    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44015    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44016    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44017  fi
44018
44019  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44020    # We also need -iframework<path>/System/Library/Frameworks
44021    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44022    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44023    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44024    # set this here so it doesn't have to be peppered throughout the forest
44025    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44026    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44027  fi
44028
44029
44030
44031
44032
44033         # Fallback default of just /bin if DEVKIT_PATH is not defined
44034        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44035          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44036        fi
44037        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44038      fi
44039    fi
44040
44041    # FIXME: we should list the discovered compilers as an exclude pattern!
44042    # If we do that, we can do this detection before POST_DETECTION, and still
44043    # find the build compilers in the tools dir, if needed.
44044
44045
44046
44047  # Publish this variable in the help.
44048
44049
44050  if [ -z "${BUILD_CC+x}" ]; then
44051    # The variable is not set by user, try to locate tool using the code snippet
44052    for ac_prog in cl cc gcc
44053do
44054  # Extract the first word of "$ac_prog", so it can be a program name with args.
44055set dummy $ac_prog; ac_word=$2
44056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44057$as_echo_n "checking for $ac_word... " >&6; }
44058if ${ac_cv_path_BUILD_CC+:} false; then :
44059  $as_echo_n "(cached) " >&6
44060else
44061  case $BUILD_CC in
44062  [\\/]* | ?:[\\/]*)
44063  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44064  ;;
44065  *)
44066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44067for as_dir in $PATH
44068do
44069  IFS=$as_save_IFS
44070  test -z "$as_dir" && as_dir=.
44071    for ac_exec_ext in '' $ac_executable_extensions; do
44072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44073    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44075    break 2
44076  fi
44077done
44078  done
44079IFS=$as_save_IFS
44080
44081  ;;
44082esac
44083fi
44084BUILD_CC=$ac_cv_path_BUILD_CC
44085if test -n "$BUILD_CC"; then
44086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44087$as_echo "$BUILD_CC" >&6; }
44088else
44089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44090$as_echo "no" >&6; }
44091fi
44092
44093
44094  test -n "$BUILD_CC" && break
44095done
44096
44097  else
44098    # The variable is set, but is it from the command line or the environment?
44099
44100    # Try to remove the string !BUILD_CC! from our list.
44101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44103      # If it failed, the variable was not from the command line. Ignore it,
44104      # but warn the user (except for BASH, which is always set by the calling BASH).
44105      if test "xBUILD_CC" != xBASH; then
44106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44107$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44108      fi
44109      # Try to locate tool using the code snippet
44110      for ac_prog in cl cc gcc
44111do
44112  # Extract the first word of "$ac_prog", so it can be a program name with args.
44113set dummy $ac_prog; ac_word=$2
44114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44115$as_echo_n "checking for $ac_word... " >&6; }
44116if ${ac_cv_path_BUILD_CC+:} false; then :
44117  $as_echo_n "(cached) " >&6
44118else
44119  case $BUILD_CC in
44120  [\\/]* | ?:[\\/]*)
44121  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44122  ;;
44123  *)
44124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44125for as_dir in $PATH
44126do
44127  IFS=$as_save_IFS
44128  test -z "$as_dir" && as_dir=.
44129    for ac_exec_ext in '' $ac_executable_extensions; do
44130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44131    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44133    break 2
44134  fi
44135done
44136  done
44137IFS=$as_save_IFS
44138
44139  ;;
44140esac
44141fi
44142BUILD_CC=$ac_cv_path_BUILD_CC
44143if test -n "$BUILD_CC"; then
44144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44145$as_echo "$BUILD_CC" >&6; }
44146else
44147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44148$as_echo "no" >&6; }
44149fi
44150
44151
44152  test -n "$BUILD_CC" && break
44153done
44154
44155    else
44156      # If it succeeded, then it was overridden by the user. We will use it
44157      # for the tool.
44158
44159      # First remove it from the list of overridden variables, so we can test
44160      # for unknown variables in the end.
44161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44162
44163      # Check if we try to supply an empty value
44164      if test "x$BUILD_CC" = x; then
44165        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44166$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44168$as_echo_n "checking for BUILD_CC... " >&6; }
44169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44170$as_echo "disabled" >&6; }
44171      else
44172        # Check if the provided tool contains a complete path.
44173        tool_specified="$BUILD_CC"
44174        tool_basename="${tool_specified##*/}"
44175        if test "x$tool_basename" = "x$tool_specified"; then
44176          # A command without a complete path is provided, search $PATH.
44177          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44178$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44179          # Extract the first word of "$tool_basename", so it can be a program name with args.
44180set dummy $tool_basename; ac_word=$2
44181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44182$as_echo_n "checking for $ac_word... " >&6; }
44183if ${ac_cv_path_BUILD_CC+:} false; then :
44184  $as_echo_n "(cached) " >&6
44185else
44186  case $BUILD_CC in
44187  [\\/]* | ?:[\\/]*)
44188  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44189  ;;
44190  *)
44191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44192for as_dir in $PATH
44193do
44194  IFS=$as_save_IFS
44195  test -z "$as_dir" && as_dir=.
44196    for ac_exec_ext in '' $ac_executable_extensions; do
44197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44198    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44200    break 2
44201  fi
44202done
44203  done
44204IFS=$as_save_IFS
44205
44206  ;;
44207esac
44208fi
44209BUILD_CC=$ac_cv_path_BUILD_CC
44210if test -n "$BUILD_CC"; then
44211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44212$as_echo "$BUILD_CC" >&6; }
44213else
44214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44215$as_echo "no" >&6; }
44216fi
44217
44218
44219          if test "x$BUILD_CC" = x; then
44220            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44221          fi
44222        else
44223          # Otherwise we believe it is a complete path. Use it as it is.
44224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44225$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44226          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44227$as_echo_n "checking for BUILD_CC... " >&6; }
44228          if test ! -x "$tool_specified"; then
44229            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44230$as_echo "not found" >&6; }
44231            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44232          fi
44233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44234$as_echo "$tool_specified" >&6; }
44235        fi
44236      fi
44237    fi
44238
44239  fi
44240
44241
44242
44243  if test "x$BUILD_CC" = x; then
44244    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44245  fi
44246
44247
44248
44249  # Only process if variable expands to non-empty
44250
44251  if test "x$BUILD_CC" != x; then
44252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44253
44254  # First separate the path from the arguments. This will split at the first
44255  # space.
44256  complete="$BUILD_CC"
44257  path="${complete%% *}"
44258  tmp="$complete EOL"
44259  arguments="${tmp#* }"
44260
44261  # Input might be given as Windows format, start by converting to
44262  # unix format.
44263  new_path=`$CYGPATH -u "$path"`
44264
44265  # Now try to locate executable using which
44266  new_path=`$WHICH "$new_path" 2> /dev/null`
44267  # bat and cmd files are not always considered executable in cygwin causing which
44268  # to not find them
44269  if test "x$new_path" = x \
44270      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44271      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44272    new_path=`$CYGPATH -u "$path"`
44273  fi
44274  if test "x$new_path" = x; then
44275    # Oops. Which didn't find the executable.
44276    # The splitting of arguments from the executable at a space might have been incorrect,
44277    # since paths with space are more likely in Windows. Give it another try with the whole
44278    # argument.
44279    path="$complete"
44280    arguments="EOL"
44281    new_path=`$CYGPATH -u "$path"`
44282    new_path=`$WHICH "$new_path" 2> /dev/null`
44283    # bat and cmd files are not always considered executable in cygwin causing which
44284    # to not find them
44285    if test "x$new_path" = x \
44286        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44287        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44288      new_path=`$CYGPATH -u "$path"`
44289    fi
44290    if test "x$new_path" = x; then
44291      # It's still not found. Now this is an unrecoverable error.
44292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44293$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44294      has_space=`$ECHO "$complete" | $GREP " "`
44295      if test "x$has_space" != x; then
44296        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44297$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44298      fi
44299      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44300    fi
44301  fi
44302
44303  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44304  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44305  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44306  # "foo.exe" is OK but "foo" is an error.
44307  #
44308  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44309  # It is also a way to make sure we got the proper file name for the real test later on.
44310  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44311  if test "x$test_shortpath" = x; then
44312    # Short path failed, file does not exist as specified.
44313    # Try adding .exe or .cmd
44314    if test -f "${new_path}.exe"; then
44315      input_to_shortpath="${new_path}.exe"
44316    elif test -f "${new_path}.cmd"; then
44317      input_to_shortpath="${new_path}.cmd"
44318    else
44319      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44320$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44321      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44322$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44323      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44324    fi
44325  else
44326    input_to_shortpath="$new_path"
44327  fi
44328
44329  # Call helper function which possibly converts this using DOS-style short mode.
44330  # If so, the updated path is stored in $new_path.
44331  new_path="$input_to_shortpath"
44332
44333  input_path="$input_to_shortpath"
44334  # Check if we need to convert this using DOS-style short mode. If the path
44335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44336  # take no chances and rewrite it.
44337  # Note: m4 eats our [], so we need to use [ and ] instead.
44338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44339  if test "x$has_forbidden_chars" != x; then
44340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44344      # Going to short mode and back again did indeed matter. Since short mode is
44345      # case insensitive, let's make it lowercase to improve readability.
44346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44347      # Now convert it back to Unix-style (cygpath)
44348      input_path=`$CYGPATH -u "$shortmode_path"`
44349      new_path="$input_path"
44350    fi
44351  fi
44352
44353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44354  if test "x$test_cygdrive_prefix" = x; then
44355    # As a simple fix, exclude /usr/bin since it's not a real path.
44356    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44358      # a path prefixed by /cygdrive for fixpath to work.
44359      new_path="$CYGWIN_ROOT_PATH$input_path"
44360    fi
44361  fi
44362
44363  # remove trailing .exe if any
44364  new_path="${new_path/%.exe/}"
44365
44366    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44367
44368  # First separate the path from the arguments. This will split at the first
44369  # space.
44370  complete="$BUILD_CC"
44371  path="${complete%% *}"
44372  tmp="$complete EOL"
44373  arguments="${tmp#* }"
44374
44375  # Input might be given as Windows format, start by converting to
44376  # unix format.
44377  new_path="$path"
44378
44379  windows_path="$new_path"
44380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44381    unix_path=`$CYGPATH -u "$windows_path"`
44382    new_path="$unix_path"
44383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44385    new_path="$unix_path"
44386  fi
44387
44388
44389  # Now try to locate executable using which
44390  new_path=`$WHICH "$new_path" 2> /dev/null`
44391
44392  if test "x$new_path" = x; then
44393    # Oops. Which didn't find the executable.
44394    # The splitting of arguments from the executable at a space might have been incorrect,
44395    # since paths with space are more likely in Windows. Give it another try with the whole
44396    # argument.
44397    path="$complete"
44398    arguments="EOL"
44399    new_path="$path"
44400
44401  windows_path="$new_path"
44402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44403    unix_path=`$CYGPATH -u "$windows_path"`
44404    new_path="$unix_path"
44405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44407    new_path="$unix_path"
44408  fi
44409
44410
44411    new_path=`$WHICH "$new_path" 2> /dev/null`
44412    # bat and cmd files are not always considered executable in MSYS causing which
44413    # to not find them
44414    if test "x$new_path" = x \
44415        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44416        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44417      new_path="$path"
44418
44419  windows_path="$new_path"
44420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44421    unix_path=`$CYGPATH -u "$windows_path"`
44422    new_path="$unix_path"
44423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44425    new_path="$unix_path"
44426  fi
44427
44428    fi
44429
44430    if test "x$new_path" = x; then
44431      # It's still not found. Now this is an unrecoverable error.
44432      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44433$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44434      has_space=`$ECHO "$complete" | $GREP " "`
44435      if test "x$has_space" != x; then
44436        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44437$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44438      fi
44439      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44440    fi
44441  fi
44442
44443  # Now new_path has a complete unix path to the binary
44444  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44445    # Keep paths in /bin as-is, but remove trailing .exe if any
44446    new_path="${new_path/%.exe/}"
44447    # Do not save /bin paths to all_fixpath_prefixes!
44448  else
44449    # Not in mixed or Windows style, start by that.
44450    new_path=`cmd //c echo $new_path`
44451
44452  input_path="$new_path"
44453  # Check if we need to convert this using DOS-style short mode. If the path
44454  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44455  # take no chances and rewrite it.
44456  # Note: m4 eats our [], so we need to use [ and ] instead.
44457  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44458  if test "x$has_forbidden_chars" != x; then
44459    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44460    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44461  fi
44462
44463    # Output is in $new_path
44464
44465  windows_path="$new_path"
44466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44467    unix_path=`$CYGPATH -u "$windows_path"`
44468    new_path="$unix_path"
44469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44471    new_path="$unix_path"
44472  fi
44473
44474    # remove trailing .exe if any
44475    new_path="${new_path/%.exe/}"
44476
44477    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44478    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44479  fi
44480
44481    else
44482      # We're on a unix platform. Hooray! :)
44483      # First separate the path from the arguments. This will split at the first
44484      # space.
44485      complete="$BUILD_CC"
44486      path="${complete%% *}"
44487      tmp="$complete EOL"
44488      arguments="${tmp#* }"
44489
44490      # Cannot rely on the command "which" here since it doesn't always work.
44491      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44492      if test -z "$is_absolute_path"; then
44493        # Path to executable is not absolute. Find it.
44494        IFS_save="$IFS"
44495        IFS=:
44496        for p in $PATH; do
44497          if test -f "$p/$path" && test -x "$p/$path"; then
44498            new_path="$p/$path"
44499            break
44500          fi
44501        done
44502        IFS="$IFS_save"
44503      else
44504        # This is an absolute path, we can use it without further modifications.
44505        new_path="$path"
44506      fi
44507
44508      if test "x$new_path" = x; then
44509        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44510$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44511        has_space=`$ECHO "$complete" | $GREP " "`
44512        if test "x$has_space" != x; then
44513          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44514$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44515        fi
44516        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44517      fi
44518    fi
44519
44520    # Now join together the path and the arguments once again
44521    if test "x$arguments" != xEOL; then
44522      new_complete="$new_path ${arguments% *}"
44523    else
44524      new_complete="$new_path"
44525    fi
44526
44527    if test "x$complete" != "x$new_complete"; then
44528      BUILD_CC="$new_complete"
44529      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44530$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44531    fi
44532  fi
44533
44534
44535
44536
44537  # Publish this variable in the help.
44538
44539
44540  if [ -z "${BUILD_CXX+x}" ]; then
44541    # The variable is not set by user, try to locate tool using the code snippet
44542    for ac_prog in cl CC g++
44543do
44544  # Extract the first word of "$ac_prog", so it can be a program name with args.
44545set dummy $ac_prog; ac_word=$2
44546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44547$as_echo_n "checking for $ac_word... " >&6; }
44548if ${ac_cv_path_BUILD_CXX+:} false; then :
44549  $as_echo_n "(cached) " >&6
44550else
44551  case $BUILD_CXX in
44552  [\\/]* | ?:[\\/]*)
44553  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44554  ;;
44555  *)
44556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44557for as_dir in $PATH
44558do
44559  IFS=$as_save_IFS
44560  test -z "$as_dir" && as_dir=.
44561    for ac_exec_ext in '' $ac_executable_extensions; do
44562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44563    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44565    break 2
44566  fi
44567done
44568  done
44569IFS=$as_save_IFS
44570
44571  ;;
44572esac
44573fi
44574BUILD_CXX=$ac_cv_path_BUILD_CXX
44575if test -n "$BUILD_CXX"; then
44576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44577$as_echo "$BUILD_CXX" >&6; }
44578else
44579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44580$as_echo "no" >&6; }
44581fi
44582
44583
44584  test -n "$BUILD_CXX" && break
44585done
44586
44587  else
44588    # The variable is set, but is it from the command line or the environment?
44589
44590    # Try to remove the string !BUILD_CXX! from our list.
44591    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44592    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44593      # If it failed, the variable was not from the command line. Ignore it,
44594      # but warn the user (except for BASH, which is always set by the calling BASH).
44595      if test "xBUILD_CXX" != xBASH; then
44596        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44597$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44598      fi
44599      # Try to locate tool using the code snippet
44600      for ac_prog in cl CC g++
44601do
44602  # Extract the first word of "$ac_prog", so it can be a program name with args.
44603set dummy $ac_prog; ac_word=$2
44604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44605$as_echo_n "checking for $ac_word... " >&6; }
44606if ${ac_cv_path_BUILD_CXX+:} false; then :
44607  $as_echo_n "(cached) " >&6
44608else
44609  case $BUILD_CXX in
44610  [\\/]* | ?:[\\/]*)
44611  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44612  ;;
44613  *)
44614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44615for as_dir in $PATH
44616do
44617  IFS=$as_save_IFS
44618  test -z "$as_dir" && as_dir=.
44619    for ac_exec_ext in '' $ac_executable_extensions; do
44620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44621    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44623    break 2
44624  fi
44625done
44626  done
44627IFS=$as_save_IFS
44628
44629  ;;
44630esac
44631fi
44632BUILD_CXX=$ac_cv_path_BUILD_CXX
44633if test -n "$BUILD_CXX"; then
44634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44635$as_echo "$BUILD_CXX" >&6; }
44636else
44637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44638$as_echo "no" >&6; }
44639fi
44640
44641
44642  test -n "$BUILD_CXX" && break
44643done
44644
44645    else
44646      # If it succeeded, then it was overridden by the user. We will use it
44647      # for the tool.
44648
44649      # First remove it from the list of overridden variables, so we can test
44650      # for unknown variables in the end.
44651      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44652
44653      # Check if we try to supply an empty value
44654      if test "x$BUILD_CXX" = x; then
44655        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44656$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44657        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44658$as_echo_n "checking for BUILD_CXX... " >&6; }
44659        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44660$as_echo "disabled" >&6; }
44661      else
44662        # Check if the provided tool contains a complete path.
44663        tool_specified="$BUILD_CXX"
44664        tool_basename="${tool_specified##*/}"
44665        if test "x$tool_basename" = "x$tool_specified"; then
44666          # A command without a complete path is provided, search $PATH.
44667          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44668$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44669          # Extract the first word of "$tool_basename", so it can be a program name with args.
44670set dummy $tool_basename; ac_word=$2
44671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44672$as_echo_n "checking for $ac_word... " >&6; }
44673if ${ac_cv_path_BUILD_CXX+:} false; then :
44674  $as_echo_n "(cached) " >&6
44675else
44676  case $BUILD_CXX in
44677  [\\/]* | ?:[\\/]*)
44678  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44679  ;;
44680  *)
44681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44682for as_dir in $PATH
44683do
44684  IFS=$as_save_IFS
44685  test -z "$as_dir" && as_dir=.
44686    for ac_exec_ext in '' $ac_executable_extensions; do
44687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44688    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44690    break 2
44691  fi
44692done
44693  done
44694IFS=$as_save_IFS
44695
44696  ;;
44697esac
44698fi
44699BUILD_CXX=$ac_cv_path_BUILD_CXX
44700if test -n "$BUILD_CXX"; then
44701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44702$as_echo "$BUILD_CXX" >&6; }
44703else
44704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44705$as_echo "no" >&6; }
44706fi
44707
44708
44709          if test "x$BUILD_CXX" = x; then
44710            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44711          fi
44712        else
44713          # Otherwise we believe it is a complete path. Use it as it is.
44714          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44715$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44716          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44717$as_echo_n "checking for BUILD_CXX... " >&6; }
44718          if test ! -x "$tool_specified"; then
44719            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44720$as_echo "not found" >&6; }
44721            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44722          fi
44723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44724$as_echo "$tool_specified" >&6; }
44725        fi
44726      fi
44727    fi
44728
44729  fi
44730
44731
44732
44733  if test "x$BUILD_CXX" = x; then
44734    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44735  fi
44736
44737
44738
44739  # Only process if variable expands to non-empty
44740
44741  if test "x$BUILD_CXX" != x; then
44742    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44743
44744  # First separate the path from the arguments. This will split at the first
44745  # space.
44746  complete="$BUILD_CXX"
44747  path="${complete%% *}"
44748  tmp="$complete EOL"
44749  arguments="${tmp#* }"
44750
44751  # Input might be given as Windows format, start by converting to
44752  # unix format.
44753  new_path=`$CYGPATH -u "$path"`
44754
44755  # Now try to locate executable using which
44756  new_path=`$WHICH "$new_path" 2> /dev/null`
44757  # bat and cmd files are not always considered executable in cygwin causing which
44758  # to not find them
44759  if test "x$new_path" = x \
44760      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44761      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44762    new_path=`$CYGPATH -u "$path"`
44763  fi
44764  if test "x$new_path" = x; then
44765    # Oops. Which didn't find the executable.
44766    # The splitting of arguments from the executable at a space might have been incorrect,
44767    # since paths with space are more likely in Windows. Give it another try with the whole
44768    # argument.
44769    path="$complete"
44770    arguments="EOL"
44771    new_path=`$CYGPATH -u "$path"`
44772    new_path=`$WHICH "$new_path" 2> /dev/null`
44773    # bat and cmd files are not always considered executable in cygwin causing which
44774    # to not find them
44775    if test "x$new_path" = x \
44776        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44777        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44778      new_path=`$CYGPATH -u "$path"`
44779    fi
44780    if test "x$new_path" = x; then
44781      # It's still not found. Now this is an unrecoverable error.
44782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44783$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44784      has_space=`$ECHO "$complete" | $GREP " "`
44785      if test "x$has_space" != x; then
44786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44788      fi
44789      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44790    fi
44791  fi
44792
44793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44796  # "foo.exe" is OK but "foo" is an error.
44797  #
44798  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44799  # It is also a way to make sure we got the proper file name for the real test later on.
44800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44801  if test "x$test_shortpath" = x; then
44802    # Short path failed, file does not exist as specified.
44803    # Try adding .exe or .cmd
44804    if test -f "${new_path}.exe"; then
44805      input_to_shortpath="${new_path}.exe"
44806    elif test -f "${new_path}.cmd"; then
44807      input_to_shortpath="${new_path}.cmd"
44808    else
44809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44810$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44811      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44812$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44813      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44814    fi
44815  else
44816    input_to_shortpath="$new_path"
44817  fi
44818
44819  # Call helper function which possibly converts this using DOS-style short mode.
44820  # If so, the updated path is stored in $new_path.
44821  new_path="$input_to_shortpath"
44822
44823  input_path="$input_to_shortpath"
44824  # Check if we need to convert this using DOS-style short mode. If the path
44825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44826  # take no chances and rewrite it.
44827  # Note: m4 eats our [], so we need to use [ and ] instead.
44828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44829  if test "x$has_forbidden_chars" != x; then
44830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44834      # Going to short mode and back again did indeed matter. Since short mode is
44835      # case insensitive, let's make it lowercase to improve readability.
44836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44837      # Now convert it back to Unix-style (cygpath)
44838      input_path=`$CYGPATH -u "$shortmode_path"`
44839      new_path="$input_path"
44840    fi
44841  fi
44842
44843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44844  if test "x$test_cygdrive_prefix" = x; then
44845    # As a simple fix, exclude /usr/bin since it's not a real path.
44846    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44848      # a path prefixed by /cygdrive for fixpath to work.
44849      new_path="$CYGWIN_ROOT_PATH$input_path"
44850    fi
44851  fi
44852
44853  # remove trailing .exe if any
44854  new_path="${new_path/%.exe/}"
44855
44856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44857
44858  # First separate the path from the arguments. This will split at the first
44859  # space.
44860  complete="$BUILD_CXX"
44861  path="${complete%% *}"
44862  tmp="$complete EOL"
44863  arguments="${tmp#* }"
44864
44865  # Input might be given as Windows format, start by converting to
44866  # unix format.
44867  new_path="$path"
44868
44869  windows_path="$new_path"
44870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44871    unix_path=`$CYGPATH -u "$windows_path"`
44872    new_path="$unix_path"
44873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44875    new_path="$unix_path"
44876  fi
44877
44878
44879  # Now try to locate executable using which
44880  new_path=`$WHICH "$new_path" 2> /dev/null`
44881
44882  if test "x$new_path" = x; then
44883    # Oops. Which didn't find the executable.
44884    # The splitting of arguments from the executable at a space might have been incorrect,
44885    # since paths with space are more likely in Windows. Give it another try with the whole
44886    # argument.
44887    path="$complete"
44888    arguments="EOL"
44889    new_path="$path"
44890
44891  windows_path="$new_path"
44892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44893    unix_path=`$CYGPATH -u "$windows_path"`
44894    new_path="$unix_path"
44895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44897    new_path="$unix_path"
44898  fi
44899
44900
44901    new_path=`$WHICH "$new_path" 2> /dev/null`
44902    # bat and cmd files are not always considered executable in MSYS causing which
44903    # to not find them
44904    if test "x$new_path" = x \
44905        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44906        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44907      new_path="$path"
44908
44909  windows_path="$new_path"
44910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44911    unix_path=`$CYGPATH -u "$windows_path"`
44912    new_path="$unix_path"
44913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44915    new_path="$unix_path"
44916  fi
44917
44918    fi
44919
44920    if test "x$new_path" = x; then
44921      # It's still not found. Now this is an unrecoverable error.
44922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44923$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44924      has_space=`$ECHO "$complete" | $GREP " "`
44925      if test "x$has_space" != x; then
44926        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44927$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44928      fi
44929      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44930    fi
44931  fi
44932
44933  # Now new_path has a complete unix path to the binary
44934  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44935    # Keep paths in /bin as-is, but remove trailing .exe if any
44936    new_path="${new_path/%.exe/}"
44937    # Do not save /bin paths to all_fixpath_prefixes!
44938  else
44939    # Not in mixed or Windows style, start by that.
44940    new_path=`cmd //c echo $new_path`
44941
44942  input_path="$new_path"
44943  # Check if we need to convert this using DOS-style short mode. If the path
44944  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44945  # take no chances and rewrite it.
44946  # Note: m4 eats our [], so we need to use [ and ] instead.
44947  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44948  if test "x$has_forbidden_chars" != x; then
44949    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44950    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44951  fi
44952
44953    # Output is in $new_path
44954
44955  windows_path="$new_path"
44956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44957    unix_path=`$CYGPATH -u "$windows_path"`
44958    new_path="$unix_path"
44959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44961    new_path="$unix_path"
44962  fi
44963
44964    # remove trailing .exe if any
44965    new_path="${new_path/%.exe/}"
44966
44967    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44968    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44969  fi
44970
44971    else
44972      # We're on a unix platform. Hooray! :)
44973      # First separate the path from the arguments. This will split at the first
44974      # space.
44975      complete="$BUILD_CXX"
44976      path="${complete%% *}"
44977      tmp="$complete EOL"
44978      arguments="${tmp#* }"
44979
44980      # Cannot rely on the command "which" here since it doesn't always work.
44981      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44982      if test -z "$is_absolute_path"; then
44983        # Path to executable is not absolute. Find it.
44984        IFS_save="$IFS"
44985        IFS=:
44986        for p in $PATH; do
44987          if test -f "$p/$path" && test -x "$p/$path"; then
44988            new_path="$p/$path"
44989            break
44990          fi
44991        done
44992        IFS="$IFS_save"
44993      else
44994        # This is an absolute path, we can use it without further modifications.
44995        new_path="$path"
44996      fi
44997
44998      if test "x$new_path" = x; then
44999        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45000$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45001        has_space=`$ECHO "$complete" | $GREP " "`
45002        if test "x$has_space" != x; then
45003          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45004$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45005        fi
45006        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45007      fi
45008    fi
45009
45010    # Now join together the path and the arguments once again
45011    if test "x$arguments" != xEOL; then
45012      new_complete="$new_path ${arguments% *}"
45013    else
45014      new_complete="$new_path"
45015    fi
45016
45017    if test "x$complete" != "x$new_complete"; then
45018      BUILD_CXX="$new_complete"
45019      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45020$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45021    fi
45022  fi
45023
45024
45025
45026  # Publish this variable in the help.
45027
45028
45029  if [ -z "${BUILD_NM+x}" ]; then
45030    # The variable is not set by user, try to locate tool using the code snippet
45031    for ac_prog in nm gcc-nm
45032do
45033  # Extract the first word of "$ac_prog", so it can be a program name with args.
45034set dummy $ac_prog; ac_word=$2
45035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45036$as_echo_n "checking for $ac_word... " >&6; }
45037if ${ac_cv_path_BUILD_NM+:} false; then :
45038  $as_echo_n "(cached) " >&6
45039else
45040  case $BUILD_NM in
45041  [\\/]* | ?:[\\/]*)
45042  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45043  ;;
45044  *)
45045  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45046for as_dir in $PATH
45047do
45048  IFS=$as_save_IFS
45049  test -z "$as_dir" && as_dir=.
45050    for ac_exec_ext in '' $ac_executable_extensions; do
45051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45052    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45054    break 2
45055  fi
45056done
45057  done
45058IFS=$as_save_IFS
45059
45060  ;;
45061esac
45062fi
45063BUILD_NM=$ac_cv_path_BUILD_NM
45064if test -n "$BUILD_NM"; then
45065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45066$as_echo "$BUILD_NM" >&6; }
45067else
45068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45069$as_echo "no" >&6; }
45070fi
45071
45072
45073  test -n "$BUILD_NM" && break
45074done
45075
45076  else
45077    # The variable is set, but is it from the command line or the environment?
45078
45079    # Try to remove the string !BUILD_NM! from our list.
45080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45082      # If it failed, the variable was not from the command line. Ignore it,
45083      # but warn the user (except for BASH, which is always set by the calling BASH).
45084      if test "xBUILD_NM" != xBASH; then
45085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45086$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45087      fi
45088      # Try to locate tool using the code snippet
45089      for ac_prog in nm gcc-nm
45090do
45091  # Extract the first word of "$ac_prog", so it can be a program name with args.
45092set dummy $ac_prog; ac_word=$2
45093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45094$as_echo_n "checking for $ac_word... " >&6; }
45095if ${ac_cv_path_BUILD_NM+:} false; then :
45096  $as_echo_n "(cached) " >&6
45097else
45098  case $BUILD_NM in
45099  [\\/]* | ?:[\\/]*)
45100  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45101  ;;
45102  *)
45103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45104for as_dir in $PATH
45105do
45106  IFS=$as_save_IFS
45107  test -z "$as_dir" && as_dir=.
45108    for ac_exec_ext in '' $ac_executable_extensions; do
45109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45110    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45112    break 2
45113  fi
45114done
45115  done
45116IFS=$as_save_IFS
45117
45118  ;;
45119esac
45120fi
45121BUILD_NM=$ac_cv_path_BUILD_NM
45122if test -n "$BUILD_NM"; then
45123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45124$as_echo "$BUILD_NM" >&6; }
45125else
45126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45127$as_echo "no" >&6; }
45128fi
45129
45130
45131  test -n "$BUILD_NM" && break
45132done
45133
45134    else
45135      # If it succeeded, then it was overridden by the user. We will use it
45136      # for the tool.
45137
45138      # First remove it from the list of overridden variables, so we can test
45139      # for unknown variables in the end.
45140      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45141
45142      # Check if we try to supply an empty value
45143      if test "x$BUILD_NM" = x; then
45144        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45145$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45147$as_echo_n "checking for BUILD_NM... " >&6; }
45148        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45149$as_echo "disabled" >&6; }
45150      else
45151        # Check if the provided tool contains a complete path.
45152        tool_specified="$BUILD_NM"
45153        tool_basename="${tool_specified##*/}"
45154        if test "x$tool_basename" = "x$tool_specified"; then
45155          # A command without a complete path is provided, search $PATH.
45156          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45157$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45158          # Extract the first word of "$tool_basename", so it can be a program name with args.
45159set dummy $tool_basename; ac_word=$2
45160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45161$as_echo_n "checking for $ac_word... " >&6; }
45162if ${ac_cv_path_BUILD_NM+:} false; then :
45163  $as_echo_n "(cached) " >&6
45164else
45165  case $BUILD_NM in
45166  [\\/]* | ?:[\\/]*)
45167  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45168  ;;
45169  *)
45170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45171for as_dir in $PATH
45172do
45173  IFS=$as_save_IFS
45174  test -z "$as_dir" && as_dir=.
45175    for ac_exec_ext in '' $ac_executable_extensions; do
45176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45177    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45179    break 2
45180  fi
45181done
45182  done
45183IFS=$as_save_IFS
45184
45185  ;;
45186esac
45187fi
45188BUILD_NM=$ac_cv_path_BUILD_NM
45189if test -n "$BUILD_NM"; then
45190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45191$as_echo "$BUILD_NM" >&6; }
45192else
45193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45194$as_echo "no" >&6; }
45195fi
45196
45197
45198          if test "x$BUILD_NM" = x; then
45199            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45200          fi
45201        else
45202          # Otherwise we believe it is a complete path. Use it as it is.
45203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45204$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45205          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45206$as_echo_n "checking for BUILD_NM... " >&6; }
45207          if test ! -x "$tool_specified"; then
45208            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45209$as_echo "not found" >&6; }
45210            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45211          fi
45212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45213$as_echo "$tool_specified" >&6; }
45214        fi
45215      fi
45216    fi
45217
45218  fi
45219
45220
45221
45222  # Only process if variable expands to non-empty
45223
45224  if test "x$BUILD_NM" != x; then
45225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45226
45227  # First separate the path from the arguments. This will split at the first
45228  # space.
45229  complete="$BUILD_NM"
45230  path="${complete%% *}"
45231  tmp="$complete EOL"
45232  arguments="${tmp#* }"
45233
45234  # Input might be given as Windows format, start by converting to
45235  # unix format.
45236  new_path=`$CYGPATH -u "$path"`
45237
45238  # Now try to locate executable using which
45239  new_path=`$WHICH "$new_path" 2> /dev/null`
45240  # bat and cmd files are not always considered executable in cygwin causing which
45241  # to not find them
45242  if test "x$new_path" = x \
45243      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45244      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45245    new_path=`$CYGPATH -u "$path"`
45246  fi
45247  if test "x$new_path" = x; then
45248    # Oops. Which didn't find the executable.
45249    # The splitting of arguments from the executable at a space might have been incorrect,
45250    # since paths with space are more likely in Windows. Give it another try with the whole
45251    # argument.
45252    path="$complete"
45253    arguments="EOL"
45254    new_path=`$CYGPATH -u "$path"`
45255    new_path=`$WHICH "$new_path" 2> /dev/null`
45256    # bat and cmd files are not always considered executable in cygwin causing which
45257    # to not find them
45258    if test "x$new_path" = x \
45259        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45260        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45261      new_path=`$CYGPATH -u "$path"`
45262    fi
45263    if test "x$new_path" = x; then
45264      # It's still not found. Now this is an unrecoverable error.
45265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45266$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45267      has_space=`$ECHO "$complete" | $GREP " "`
45268      if test "x$has_space" != x; then
45269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45271      fi
45272      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45273    fi
45274  fi
45275
45276  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45277  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45278  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45279  # "foo.exe" is OK but "foo" is an error.
45280  #
45281  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45282  # It is also a way to make sure we got the proper file name for the real test later on.
45283  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45284  if test "x$test_shortpath" = x; then
45285    # Short path failed, file does not exist as specified.
45286    # Try adding .exe or .cmd
45287    if test -f "${new_path}.exe"; then
45288      input_to_shortpath="${new_path}.exe"
45289    elif test -f "${new_path}.cmd"; then
45290      input_to_shortpath="${new_path}.cmd"
45291    else
45292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45293$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45294      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45295$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45296      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45297    fi
45298  else
45299    input_to_shortpath="$new_path"
45300  fi
45301
45302  # Call helper function which possibly converts this using DOS-style short mode.
45303  # If so, the updated path is stored in $new_path.
45304  new_path="$input_to_shortpath"
45305
45306  input_path="$input_to_shortpath"
45307  # Check if we need to convert this using DOS-style short mode. If the path
45308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45309  # take no chances and rewrite it.
45310  # Note: m4 eats our [], so we need to use [ and ] instead.
45311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45312  if test "x$has_forbidden_chars" != x; then
45313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45317      # Going to short mode and back again did indeed matter. Since short mode is
45318      # case insensitive, let's make it lowercase to improve readability.
45319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45320      # Now convert it back to Unix-style (cygpath)
45321      input_path=`$CYGPATH -u "$shortmode_path"`
45322      new_path="$input_path"
45323    fi
45324  fi
45325
45326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45327  if test "x$test_cygdrive_prefix" = x; then
45328    # As a simple fix, exclude /usr/bin since it's not a real path.
45329    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45331      # a path prefixed by /cygdrive for fixpath to work.
45332      new_path="$CYGWIN_ROOT_PATH$input_path"
45333    fi
45334  fi
45335
45336  # remove trailing .exe if any
45337  new_path="${new_path/%.exe/}"
45338
45339    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45340
45341  # First separate the path from the arguments. This will split at the first
45342  # space.
45343  complete="$BUILD_NM"
45344  path="${complete%% *}"
45345  tmp="$complete EOL"
45346  arguments="${tmp#* }"
45347
45348  # Input might be given as Windows format, start by converting to
45349  # unix format.
45350  new_path="$path"
45351
45352  windows_path="$new_path"
45353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45354    unix_path=`$CYGPATH -u "$windows_path"`
45355    new_path="$unix_path"
45356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45358    new_path="$unix_path"
45359  fi
45360
45361
45362  # Now try to locate executable using which
45363  new_path=`$WHICH "$new_path" 2> /dev/null`
45364
45365  if test "x$new_path" = x; then
45366    # Oops. Which didn't find the executable.
45367    # The splitting of arguments from the executable at a space might have been incorrect,
45368    # since paths with space are more likely in Windows. Give it another try with the whole
45369    # argument.
45370    path="$complete"
45371    arguments="EOL"
45372    new_path="$path"
45373
45374  windows_path="$new_path"
45375  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45376    unix_path=`$CYGPATH -u "$windows_path"`
45377    new_path="$unix_path"
45378  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45379    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45380    new_path="$unix_path"
45381  fi
45382
45383
45384    new_path=`$WHICH "$new_path" 2> /dev/null`
45385    # bat and cmd files are not always considered executable in MSYS causing which
45386    # to not find them
45387    if test "x$new_path" = x \
45388        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45389        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45390      new_path="$path"
45391
45392  windows_path="$new_path"
45393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45394    unix_path=`$CYGPATH -u "$windows_path"`
45395    new_path="$unix_path"
45396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45398    new_path="$unix_path"
45399  fi
45400
45401    fi
45402
45403    if test "x$new_path" = x; then
45404      # It's still not found. Now this is an unrecoverable error.
45405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45406$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45407      has_space=`$ECHO "$complete" | $GREP " "`
45408      if test "x$has_space" != x; then
45409        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45410$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45411      fi
45412      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45413    fi
45414  fi
45415
45416  # Now new_path has a complete unix path to the binary
45417  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45418    # Keep paths in /bin as-is, but remove trailing .exe if any
45419    new_path="${new_path/%.exe/}"
45420    # Do not save /bin paths to all_fixpath_prefixes!
45421  else
45422    # Not in mixed or Windows style, start by that.
45423    new_path=`cmd //c echo $new_path`
45424
45425  input_path="$new_path"
45426  # Check if we need to convert this using DOS-style short mode. If the path
45427  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45428  # take no chances and rewrite it.
45429  # Note: m4 eats our [], so we need to use [ and ] instead.
45430  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45431  if test "x$has_forbidden_chars" != x; then
45432    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45433    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45434  fi
45435
45436    # Output is in $new_path
45437
45438  windows_path="$new_path"
45439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45440    unix_path=`$CYGPATH -u "$windows_path"`
45441    new_path="$unix_path"
45442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45444    new_path="$unix_path"
45445  fi
45446
45447    # remove trailing .exe if any
45448    new_path="${new_path/%.exe/}"
45449
45450    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45451    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45452  fi
45453
45454    else
45455      # We're on a unix platform. Hooray! :)
45456      # First separate the path from the arguments. This will split at the first
45457      # space.
45458      complete="$BUILD_NM"
45459      path="${complete%% *}"
45460      tmp="$complete EOL"
45461      arguments="${tmp#* }"
45462
45463      # Cannot rely on the command "which" here since it doesn't always work.
45464      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45465      if test -z "$is_absolute_path"; then
45466        # Path to executable is not absolute. Find it.
45467        IFS_save="$IFS"
45468        IFS=:
45469        for p in $PATH; do
45470          if test -f "$p/$path" && test -x "$p/$path"; then
45471            new_path="$p/$path"
45472            break
45473          fi
45474        done
45475        IFS="$IFS_save"
45476      else
45477        # This is an absolute path, we can use it without further modifications.
45478        new_path="$path"
45479      fi
45480
45481      if test "x$new_path" = x; then
45482        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45483$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45484        has_space=`$ECHO "$complete" | $GREP " "`
45485        if test "x$has_space" != x; then
45486          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45487$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45488        fi
45489        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45490      fi
45491    fi
45492
45493    # Now join together the path and the arguments once again
45494    if test "x$arguments" != xEOL; then
45495      new_complete="$new_path ${arguments% *}"
45496    else
45497      new_complete="$new_path"
45498    fi
45499
45500    if test "x$complete" != "x$new_complete"; then
45501      BUILD_NM="$new_complete"
45502      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45503$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45504    fi
45505  fi
45506
45507
45508
45509  # Publish this variable in the help.
45510
45511
45512  if [ -z "${BUILD_AR+x}" ]; then
45513    # The variable is not set by user, try to locate tool using the code snippet
45514    for ac_prog in ar gcc-ar
45515do
45516  # Extract the first word of "$ac_prog", so it can be a program name with args.
45517set dummy $ac_prog; ac_word=$2
45518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45519$as_echo_n "checking for $ac_word... " >&6; }
45520if ${ac_cv_path_BUILD_AR+:} false; then :
45521  $as_echo_n "(cached) " >&6
45522else
45523  case $BUILD_AR in
45524  [\\/]* | ?:[\\/]*)
45525  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45526  ;;
45527  *)
45528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45529for as_dir in $PATH
45530do
45531  IFS=$as_save_IFS
45532  test -z "$as_dir" && as_dir=.
45533    for ac_exec_ext in '' $ac_executable_extensions; do
45534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45535    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45537    break 2
45538  fi
45539done
45540  done
45541IFS=$as_save_IFS
45542
45543  ;;
45544esac
45545fi
45546BUILD_AR=$ac_cv_path_BUILD_AR
45547if test -n "$BUILD_AR"; then
45548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45549$as_echo "$BUILD_AR" >&6; }
45550else
45551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45552$as_echo "no" >&6; }
45553fi
45554
45555
45556  test -n "$BUILD_AR" && break
45557done
45558
45559  else
45560    # The variable is set, but is it from the command line or the environment?
45561
45562    # Try to remove the string !BUILD_AR! from our list.
45563    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45564    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45565      # If it failed, the variable was not from the command line. Ignore it,
45566      # but warn the user (except for BASH, which is always set by the calling BASH).
45567      if test "xBUILD_AR" != xBASH; then
45568        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45569$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45570      fi
45571      # Try to locate tool using the code snippet
45572      for ac_prog in ar gcc-ar
45573do
45574  # Extract the first word of "$ac_prog", so it can be a program name with args.
45575set dummy $ac_prog; ac_word=$2
45576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45577$as_echo_n "checking for $ac_word... " >&6; }
45578if ${ac_cv_path_BUILD_AR+:} false; then :
45579  $as_echo_n "(cached) " >&6
45580else
45581  case $BUILD_AR in
45582  [\\/]* | ?:[\\/]*)
45583  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45584  ;;
45585  *)
45586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45587for as_dir in $PATH
45588do
45589  IFS=$as_save_IFS
45590  test -z "$as_dir" && as_dir=.
45591    for ac_exec_ext in '' $ac_executable_extensions; do
45592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45593    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45595    break 2
45596  fi
45597done
45598  done
45599IFS=$as_save_IFS
45600
45601  ;;
45602esac
45603fi
45604BUILD_AR=$ac_cv_path_BUILD_AR
45605if test -n "$BUILD_AR"; then
45606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45607$as_echo "$BUILD_AR" >&6; }
45608else
45609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45610$as_echo "no" >&6; }
45611fi
45612
45613
45614  test -n "$BUILD_AR" && break
45615done
45616
45617    else
45618      # If it succeeded, then it was overridden by the user. We will use it
45619      # for the tool.
45620
45621      # First remove it from the list of overridden variables, so we can test
45622      # for unknown variables in the end.
45623      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45624
45625      # Check if we try to supply an empty value
45626      if test "x$BUILD_AR" = x; then
45627        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45628$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45629        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45630$as_echo_n "checking for BUILD_AR... " >&6; }
45631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45632$as_echo "disabled" >&6; }
45633      else
45634        # Check if the provided tool contains a complete path.
45635        tool_specified="$BUILD_AR"
45636        tool_basename="${tool_specified##*/}"
45637        if test "x$tool_basename" = "x$tool_specified"; then
45638          # A command without a complete path is provided, search $PATH.
45639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45640$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45641          # Extract the first word of "$tool_basename", so it can be a program name with args.
45642set dummy $tool_basename; ac_word=$2
45643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45644$as_echo_n "checking for $ac_word... " >&6; }
45645if ${ac_cv_path_BUILD_AR+:} false; then :
45646  $as_echo_n "(cached) " >&6
45647else
45648  case $BUILD_AR in
45649  [\\/]* | ?:[\\/]*)
45650  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45651  ;;
45652  *)
45653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45654for as_dir in $PATH
45655do
45656  IFS=$as_save_IFS
45657  test -z "$as_dir" && as_dir=.
45658    for ac_exec_ext in '' $ac_executable_extensions; do
45659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45660    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45662    break 2
45663  fi
45664done
45665  done
45666IFS=$as_save_IFS
45667
45668  ;;
45669esac
45670fi
45671BUILD_AR=$ac_cv_path_BUILD_AR
45672if test -n "$BUILD_AR"; then
45673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45674$as_echo "$BUILD_AR" >&6; }
45675else
45676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45677$as_echo "no" >&6; }
45678fi
45679
45680
45681          if test "x$BUILD_AR" = x; then
45682            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45683          fi
45684        else
45685          # Otherwise we believe it is a complete path. Use it as it is.
45686          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45687$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45688          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45689$as_echo_n "checking for BUILD_AR... " >&6; }
45690          if test ! -x "$tool_specified"; then
45691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45692$as_echo "not found" >&6; }
45693            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45694          fi
45695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45696$as_echo "$tool_specified" >&6; }
45697        fi
45698      fi
45699    fi
45700
45701  fi
45702
45703
45704
45705  # Only process if variable expands to non-empty
45706
45707  if test "x$BUILD_AR" != x; then
45708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45709
45710  # First separate the path from the arguments. This will split at the first
45711  # space.
45712  complete="$BUILD_AR"
45713  path="${complete%% *}"
45714  tmp="$complete EOL"
45715  arguments="${tmp#* }"
45716
45717  # Input might be given as Windows format, start by converting to
45718  # unix format.
45719  new_path=`$CYGPATH -u "$path"`
45720
45721  # Now try to locate executable using which
45722  new_path=`$WHICH "$new_path" 2> /dev/null`
45723  # bat and cmd files are not always considered executable in cygwin causing which
45724  # to not find them
45725  if test "x$new_path" = x \
45726      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45727      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45728    new_path=`$CYGPATH -u "$path"`
45729  fi
45730  if test "x$new_path" = x; then
45731    # Oops. Which didn't find the executable.
45732    # The splitting of arguments from the executable at a space might have been incorrect,
45733    # since paths with space are more likely in Windows. Give it another try with the whole
45734    # argument.
45735    path="$complete"
45736    arguments="EOL"
45737    new_path=`$CYGPATH -u "$path"`
45738    new_path=`$WHICH "$new_path" 2> /dev/null`
45739    # bat and cmd files are not always considered executable in cygwin causing which
45740    # to not find them
45741    if test "x$new_path" = x \
45742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45744      new_path=`$CYGPATH -u "$path"`
45745    fi
45746    if test "x$new_path" = x; then
45747      # It's still not found. Now this is an unrecoverable error.
45748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45749$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45750      has_space=`$ECHO "$complete" | $GREP " "`
45751      if test "x$has_space" != x; then
45752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45754      fi
45755      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45756    fi
45757  fi
45758
45759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45762  # "foo.exe" is OK but "foo" is an error.
45763  #
45764  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45765  # It is also a way to make sure we got the proper file name for the real test later on.
45766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45767  if test "x$test_shortpath" = x; then
45768    # Short path failed, file does not exist as specified.
45769    # Try adding .exe or .cmd
45770    if test -f "${new_path}.exe"; then
45771      input_to_shortpath="${new_path}.exe"
45772    elif test -f "${new_path}.cmd"; then
45773      input_to_shortpath="${new_path}.cmd"
45774    else
45775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45776$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45779      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45780    fi
45781  else
45782    input_to_shortpath="$new_path"
45783  fi
45784
45785  # Call helper function which possibly converts this using DOS-style short mode.
45786  # If so, the updated path is stored in $new_path.
45787  new_path="$input_to_shortpath"
45788
45789  input_path="$input_to_shortpath"
45790  # Check if we need to convert this using DOS-style short mode. If the path
45791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45792  # take no chances and rewrite it.
45793  # Note: m4 eats our [], so we need to use [ and ] instead.
45794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45795  if test "x$has_forbidden_chars" != x; then
45796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45800      # Going to short mode and back again did indeed matter. Since short mode is
45801      # case insensitive, let's make it lowercase to improve readability.
45802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45803      # Now convert it back to Unix-style (cygpath)
45804      input_path=`$CYGPATH -u "$shortmode_path"`
45805      new_path="$input_path"
45806    fi
45807  fi
45808
45809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45810  if test "x$test_cygdrive_prefix" = x; then
45811    # As a simple fix, exclude /usr/bin since it's not a real path.
45812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45814      # a path prefixed by /cygdrive for fixpath to work.
45815      new_path="$CYGWIN_ROOT_PATH$input_path"
45816    fi
45817  fi
45818
45819  # remove trailing .exe if any
45820  new_path="${new_path/%.exe/}"
45821
45822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45823
45824  # First separate the path from the arguments. This will split at the first
45825  # space.
45826  complete="$BUILD_AR"
45827  path="${complete%% *}"
45828  tmp="$complete EOL"
45829  arguments="${tmp#* }"
45830
45831  # Input might be given as Windows format, start by converting to
45832  # unix format.
45833  new_path="$path"
45834
45835  windows_path="$new_path"
45836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45837    unix_path=`$CYGPATH -u "$windows_path"`
45838    new_path="$unix_path"
45839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45841    new_path="$unix_path"
45842  fi
45843
45844
45845  # Now try to locate executable using which
45846  new_path=`$WHICH "$new_path" 2> /dev/null`
45847
45848  if test "x$new_path" = x; then
45849    # Oops. Which didn't find the executable.
45850    # The splitting of arguments from the executable at a space might have been incorrect,
45851    # since paths with space are more likely in Windows. Give it another try with the whole
45852    # argument.
45853    path="$complete"
45854    arguments="EOL"
45855    new_path="$path"
45856
45857  windows_path="$new_path"
45858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45859    unix_path=`$CYGPATH -u "$windows_path"`
45860    new_path="$unix_path"
45861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45863    new_path="$unix_path"
45864  fi
45865
45866
45867    new_path=`$WHICH "$new_path" 2> /dev/null`
45868    # bat and cmd files are not always considered executable in MSYS causing which
45869    # to not find them
45870    if test "x$new_path" = x \
45871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45873      new_path="$path"
45874
45875  windows_path="$new_path"
45876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45877    unix_path=`$CYGPATH -u "$windows_path"`
45878    new_path="$unix_path"
45879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45881    new_path="$unix_path"
45882  fi
45883
45884    fi
45885
45886    if test "x$new_path" = x; then
45887      # It's still not found. Now this is an unrecoverable error.
45888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45889$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45890      has_space=`$ECHO "$complete" | $GREP " "`
45891      if test "x$has_space" != x; then
45892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45894      fi
45895      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45896    fi
45897  fi
45898
45899  # Now new_path has a complete unix path to the binary
45900  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45901    # Keep paths in /bin as-is, but remove trailing .exe if any
45902    new_path="${new_path/%.exe/}"
45903    # Do not save /bin paths to all_fixpath_prefixes!
45904  else
45905    # Not in mixed or Windows style, start by that.
45906    new_path=`cmd //c echo $new_path`
45907
45908  input_path="$new_path"
45909  # Check if we need to convert this using DOS-style short mode. If the path
45910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45911  # take no chances and rewrite it.
45912  # Note: m4 eats our [], so we need to use [ and ] instead.
45913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45914  if test "x$has_forbidden_chars" != x; then
45915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45917  fi
45918
45919    # Output is in $new_path
45920
45921  windows_path="$new_path"
45922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45923    unix_path=`$CYGPATH -u "$windows_path"`
45924    new_path="$unix_path"
45925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45927    new_path="$unix_path"
45928  fi
45929
45930    # remove trailing .exe if any
45931    new_path="${new_path/%.exe/}"
45932
45933    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45934    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45935  fi
45936
45937    else
45938      # We're on a unix platform. Hooray! :)
45939      # First separate the path from the arguments. This will split at the first
45940      # space.
45941      complete="$BUILD_AR"
45942      path="${complete%% *}"
45943      tmp="$complete EOL"
45944      arguments="${tmp#* }"
45945
45946      # Cannot rely on the command "which" here since it doesn't always work.
45947      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45948      if test -z "$is_absolute_path"; then
45949        # Path to executable is not absolute. Find it.
45950        IFS_save="$IFS"
45951        IFS=:
45952        for p in $PATH; do
45953          if test -f "$p/$path" && test -x "$p/$path"; then
45954            new_path="$p/$path"
45955            break
45956          fi
45957        done
45958        IFS="$IFS_save"
45959      else
45960        # This is an absolute path, we can use it without further modifications.
45961        new_path="$path"
45962      fi
45963
45964      if test "x$new_path" = x; then
45965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45966$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45967        has_space=`$ECHO "$complete" | $GREP " "`
45968        if test "x$has_space" != x; then
45969          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45971        fi
45972        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45973      fi
45974    fi
45975
45976    # Now join together the path and the arguments once again
45977    if test "x$arguments" != xEOL; then
45978      new_complete="$new_path ${arguments% *}"
45979    else
45980      new_complete="$new_path"
45981    fi
45982
45983    if test "x$complete" != "x$new_complete"; then
45984      BUILD_AR="$new_complete"
45985      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45986$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45987    fi
45988  fi
45989
45990
45991
45992  # Publish this variable in the help.
45993
45994
45995  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45996    # The variable is not set by user, try to locate tool using the code snippet
45997    for ac_prog in objcopy
45998do
45999  # Extract the first word of "$ac_prog", so it can be a program name with args.
46000set dummy $ac_prog; ac_word=$2
46001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46002$as_echo_n "checking for $ac_word... " >&6; }
46003if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46004  $as_echo_n "(cached) " >&6
46005else
46006  case $BUILD_OBJCOPY in
46007  [\\/]* | ?:[\\/]*)
46008  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46009  ;;
46010  *)
46011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46012for as_dir in $PATH
46013do
46014  IFS=$as_save_IFS
46015  test -z "$as_dir" && as_dir=.
46016    for ac_exec_ext in '' $ac_executable_extensions; do
46017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46018    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46020    break 2
46021  fi
46022done
46023  done
46024IFS=$as_save_IFS
46025
46026  ;;
46027esac
46028fi
46029BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46030if test -n "$BUILD_OBJCOPY"; then
46031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46032$as_echo "$BUILD_OBJCOPY" >&6; }
46033else
46034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46035$as_echo "no" >&6; }
46036fi
46037
46038
46039  test -n "$BUILD_OBJCOPY" && break
46040done
46041
46042  else
46043    # The variable is set, but is it from the command line or the environment?
46044
46045    # Try to remove the string !BUILD_OBJCOPY! from our list.
46046    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46047    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46048      # If it failed, the variable was not from the command line. Ignore it,
46049      # but warn the user (except for BASH, which is always set by the calling BASH).
46050      if test "xBUILD_OBJCOPY" != xBASH; then
46051        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46052$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46053      fi
46054      # Try to locate tool using the code snippet
46055      for ac_prog in objcopy
46056do
46057  # Extract the first word of "$ac_prog", so it can be a program name with args.
46058set dummy $ac_prog; ac_word=$2
46059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46060$as_echo_n "checking for $ac_word... " >&6; }
46061if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46062  $as_echo_n "(cached) " >&6
46063else
46064  case $BUILD_OBJCOPY in
46065  [\\/]* | ?:[\\/]*)
46066  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46067  ;;
46068  *)
46069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46070for as_dir in $PATH
46071do
46072  IFS=$as_save_IFS
46073  test -z "$as_dir" && as_dir=.
46074    for ac_exec_ext in '' $ac_executable_extensions; do
46075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46076    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46078    break 2
46079  fi
46080done
46081  done
46082IFS=$as_save_IFS
46083
46084  ;;
46085esac
46086fi
46087BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46088if test -n "$BUILD_OBJCOPY"; then
46089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46090$as_echo "$BUILD_OBJCOPY" >&6; }
46091else
46092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46093$as_echo "no" >&6; }
46094fi
46095
46096
46097  test -n "$BUILD_OBJCOPY" && break
46098done
46099
46100    else
46101      # If it succeeded, then it was overridden by the user. We will use it
46102      # for the tool.
46103
46104      # First remove it from the list of overridden variables, so we can test
46105      # for unknown variables in the end.
46106      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46107
46108      # Check if we try to supply an empty value
46109      if test "x$BUILD_OBJCOPY" = x; then
46110        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46111$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46112        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46113$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46114        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46115$as_echo "disabled" >&6; }
46116      else
46117        # Check if the provided tool contains a complete path.
46118        tool_specified="$BUILD_OBJCOPY"
46119        tool_basename="${tool_specified##*/}"
46120        if test "x$tool_basename" = "x$tool_specified"; then
46121          # A command without a complete path is provided, search $PATH.
46122          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46123$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46124          # Extract the first word of "$tool_basename", so it can be a program name with args.
46125set dummy $tool_basename; ac_word=$2
46126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46127$as_echo_n "checking for $ac_word... " >&6; }
46128if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46129  $as_echo_n "(cached) " >&6
46130else
46131  case $BUILD_OBJCOPY in
46132  [\\/]* | ?:[\\/]*)
46133  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46134  ;;
46135  *)
46136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46137for as_dir in $PATH
46138do
46139  IFS=$as_save_IFS
46140  test -z "$as_dir" && as_dir=.
46141    for ac_exec_ext in '' $ac_executable_extensions; do
46142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46143    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46145    break 2
46146  fi
46147done
46148  done
46149IFS=$as_save_IFS
46150
46151  ;;
46152esac
46153fi
46154BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46155if test -n "$BUILD_OBJCOPY"; then
46156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46157$as_echo "$BUILD_OBJCOPY" >&6; }
46158else
46159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46160$as_echo "no" >&6; }
46161fi
46162
46163
46164          if test "x$BUILD_OBJCOPY" = x; then
46165            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46166          fi
46167        else
46168          # Otherwise we believe it is a complete path. Use it as it is.
46169          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46170$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46171          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46172$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46173          if test ! -x "$tool_specified"; then
46174            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46175$as_echo "not found" >&6; }
46176            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46177          fi
46178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46179$as_echo "$tool_specified" >&6; }
46180        fi
46181      fi
46182    fi
46183
46184  fi
46185
46186
46187
46188  # Only process if variable expands to non-empty
46189
46190  if test "x$BUILD_OBJCOPY" != x; then
46191    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46192
46193  # First separate the path from the arguments. This will split at the first
46194  # space.
46195  complete="$BUILD_OBJCOPY"
46196  path="${complete%% *}"
46197  tmp="$complete EOL"
46198  arguments="${tmp#* }"
46199
46200  # Input might be given as Windows format, start by converting to
46201  # unix format.
46202  new_path=`$CYGPATH -u "$path"`
46203
46204  # Now try to locate executable using which
46205  new_path=`$WHICH "$new_path" 2> /dev/null`
46206  # bat and cmd files are not always considered executable in cygwin causing which
46207  # to not find them
46208  if test "x$new_path" = x \
46209      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46210      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46211    new_path=`$CYGPATH -u "$path"`
46212  fi
46213  if test "x$new_path" = x; then
46214    # Oops. Which didn't find the executable.
46215    # The splitting of arguments from the executable at a space might have been incorrect,
46216    # since paths with space are more likely in Windows. Give it another try with the whole
46217    # argument.
46218    path="$complete"
46219    arguments="EOL"
46220    new_path=`$CYGPATH -u "$path"`
46221    new_path=`$WHICH "$new_path" 2> /dev/null`
46222    # bat and cmd files are not always considered executable in cygwin causing which
46223    # to not find them
46224    if test "x$new_path" = x \
46225        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46226        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46227      new_path=`$CYGPATH -u "$path"`
46228    fi
46229    if test "x$new_path" = x; then
46230      # It's still not found. Now this is an unrecoverable error.
46231      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46232$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46233      has_space=`$ECHO "$complete" | $GREP " "`
46234      if test "x$has_space" != x; then
46235        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46236$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46237      fi
46238      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46239    fi
46240  fi
46241
46242  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46243  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46244  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46245  # "foo.exe" is OK but "foo" is an error.
46246  #
46247  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46248  # It is also a way to make sure we got the proper file name for the real test later on.
46249  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46250  if test "x$test_shortpath" = x; then
46251    # Short path failed, file does not exist as specified.
46252    # Try adding .exe or .cmd
46253    if test -f "${new_path}.exe"; then
46254      input_to_shortpath="${new_path}.exe"
46255    elif test -f "${new_path}.cmd"; then
46256      input_to_shortpath="${new_path}.cmd"
46257    else
46258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46259$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46260      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46261$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46262      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46263    fi
46264  else
46265    input_to_shortpath="$new_path"
46266  fi
46267
46268  # Call helper function which possibly converts this using DOS-style short mode.
46269  # If so, the updated path is stored in $new_path.
46270  new_path="$input_to_shortpath"
46271
46272  input_path="$input_to_shortpath"
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46283      # Going to short mode and back again did indeed matter. Since short mode is
46284      # case insensitive, let's make it lowercase to improve readability.
46285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46286      # Now convert it back to Unix-style (cygpath)
46287      input_path=`$CYGPATH -u "$shortmode_path"`
46288      new_path="$input_path"
46289    fi
46290  fi
46291
46292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46293  if test "x$test_cygdrive_prefix" = x; then
46294    # As a simple fix, exclude /usr/bin since it's not a real path.
46295    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46297      # a path prefixed by /cygdrive for fixpath to work.
46298      new_path="$CYGWIN_ROOT_PATH$input_path"
46299    fi
46300  fi
46301
46302  # remove trailing .exe if any
46303  new_path="${new_path/%.exe/}"
46304
46305    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46306
46307  # First separate the path from the arguments. This will split at the first
46308  # space.
46309  complete="$BUILD_OBJCOPY"
46310  path="${complete%% *}"
46311  tmp="$complete EOL"
46312  arguments="${tmp#* }"
46313
46314  # Input might be given as Windows format, start by converting to
46315  # unix format.
46316  new_path="$path"
46317
46318  windows_path="$new_path"
46319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46320    unix_path=`$CYGPATH -u "$windows_path"`
46321    new_path="$unix_path"
46322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46324    new_path="$unix_path"
46325  fi
46326
46327
46328  # Now try to locate executable using which
46329  new_path=`$WHICH "$new_path" 2> /dev/null`
46330
46331  if test "x$new_path" = x; then
46332    # Oops. Which didn't find the executable.
46333    # The splitting of arguments from the executable at a space might have been incorrect,
46334    # since paths with space are more likely in Windows. Give it another try with the whole
46335    # argument.
46336    path="$complete"
46337    arguments="EOL"
46338    new_path="$path"
46339
46340  windows_path="$new_path"
46341  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46342    unix_path=`$CYGPATH -u "$windows_path"`
46343    new_path="$unix_path"
46344  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46345    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46346    new_path="$unix_path"
46347  fi
46348
46349
46350    new_path=`$WHICH "$new_path" 2> /dev/null`
46351    # bat and cmd files are not always considered executable in MSYS causing which
46352    # to not find them
46353    if test "x$new_path" = x \
46354        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46355        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46356      new_path="$path"
46357
46358  windows_path="$new_path"
46359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46360    unix_path=`$CYGPATH -u "$windows_path"`
46361    new_path="$unix_path"
46362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46364    new_path="$unix_path"
46365  fi
46366
46367    fi
46368
46369    if test "x$new_path" = x; then
46370      # It's still not found. Now this is an unrecoverable error.
46371      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46372$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46373      has_space=`$ECHO "$complete" | $GREP " "`
46374      if test "x$has_space" != x; then
46375        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46376$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46377      fi
46378      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46379    fi
46380  fi
46381
46382  # Now new_path has a complete unix path to the binary
46383  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46384    # Keep paths in /bin as-is, but remove trailing .exe if any
46385    new_path="${new_path/%.exe/}"
46386    # Do not save /bin paths to all_fixpath_prefixes!
46387  else
46388    # Not in mixed or Windows style, start by that.
46389    new_path=`cmd //c echo $new_path`
46390
46391  input_path="$new_path"
46392  # Check if we need to convert this using DOS-style short mode. If the path
46393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46394  # take no chances and rewrite it.
46395  # Note: m4 eats our [], so we need to use [ and ] instead.
46396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46397  if test "x$has_forbidden_chars" != x; then
46398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46399    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46400  fi
46401
46402    # Output is in $new_path
46403
46404  windows_path="$new_path"
46405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46406    unix_path=`$CYGPATH -u "$windows_path"`
46407    new_path="$unix_path"
46408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46410    new_path="$unix_path"
46411  fi
46412
46413    # remove trailing .exe if any
46414    new_path="${new_path/%.exe/}"
46415
46416    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46417    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46418  fi
46419
46420    else
46421      # We're on a unix platform. Hooray! :)
46422      # First separate the path from the arguments. This will split at the first
46423      # space.
46424      complete="$BUILD_OBJCOPY"
46425      path="${complete%% *}"
46426      tmp="$complete EOL"
46427      arguments="${tmp#* }"
46428
46429      # Cannot rely on the command "which" here since it doesn't always work.
46430      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46431      if test -z "$is_absolute_path"; then
46432        # Path to executable is not absolute. Find it.
46433        IFS_save="$IFS"
46434        IFS=:
46435        for p in $PATH; do
46436          if test -f "$p/$path" && test -x "$p/$path"; then
46437            new_path="$p/$path"
46438            break
46439          fi
46440        done
46441        IFS="$IFS_save"
46442      else
46443        # This is an absolute path, we can use it without further modifications.
46444        new_path="$path"
46445      fi
46446
46447      if test "x$new_path" = x; then
46448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46449$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46450        has_space=`$ECHO "$complete" | $GREP " "`
46451        if test "x$has_space" != x; then
46452          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46453$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46454        fi
46455        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46456      fi
46457    fi
46458
46459    # Now join together the path and the arguments once again
46460    if test "x$arguments" != xEOL; then
46461      new_complete="$new_path ${arguments% *}"
46462    else
46463      new_complete="$new_path"
46464    fi
46465
46466    if test "x$complete" != "x$new_complete"; then
46467      BUILD_OBJCOPY="$new_complete"
46468      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46469$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46470    fi
46471  fi
46472
46473
46474
46475  # Publish this variable in the help.
46476
46477
46478  if [ -z "${BUILD_STRIP+x}" ]; then
46479    # The variable is not set by user, try to locate tool using the code snippet
46480    for ac_prog in strip
46481do
46482  # Extract the first word of "$ac_prog", so it can be a program name with args.
46483set dummy $ac_prog; ac_word=$2
46484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46485$as_echo_n "checking for $ac_word... " >&6; }
46486if ${ac_cv_path_BUILD_STRIP+:} false; then :
46487  $as_echo_n "(cached) " >&6
46488else
46489  case $BUILD_STRIP in
46490  [\\/]* | ?:[\\/]*)
46491  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46492  ;;
46493  *)
46494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46495for as_dir in $PATH
46496do
46497  IFS=$as_save_IFS
46498  test -z "$as_dir" && as_dir=.
46499    for ac_exec_ext in '' $ac_executable_extensions; do
46500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46501    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46503    break 2
46504  fi
46505done
46506  done
46507IFS=$as_save_IFS
46508
46509  ;;
46510esac
46511fi
46512BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46513if test -n "$BUILD_STRIP"; then
46514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46515$as_echo "$BUILD_STRIP" >&6; }
46516else
46517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46518$as_echo "no" >&6; }
46519fi
46520
46521
46522  test -n "$BUILD_STRIP" && break
46523done
46524
46525  else
46526    # The variable is set, but is it from the command line or the environment?
46527
46528    # Try to remove the string !BUILD_STRIP! from our list.
46529    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46530    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46531      # If it failed, the variable was not from the command line. Ignore it,
46532      # but warn the user (except for BASH, which is always set by the calling BASH).
46533      if test "xBUILD_STRIP" != xBASH; then
46534        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46535$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46536      fi
46537      # Try to locate tool using the code snippet
46538      for ac_prog in strip
46539do
46540  # Extract the first word of "$ac_prog", so it can be a program name with args.
46541set dummy $ac_prog; ac_word=$2
46542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46543$as_echo_n "checking for $ac_word... " >&6; }
46544if ${ac_cv_path_BUILD_STRIP+:} false; then :
46545  $as_echo_n "(cached) " >&6
46546else
46547  case $BUILD_STRIP in
46548  [\\/]* | ?:[\\/]*)
46549  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46550  ;;
46551  *)
46552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46553for as_dir in $PATH
46554do
46555  IFS=$as_save_IFS
46556  test -z "$as_dir" && as_dir=.
46557    for ac_exec_ext in '' $ac_executable_extensions; do
46558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46559    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46561    break 2
46562  fi
46563done
46564  done
46565IFS=$as_save_IFS
46566
46567  ;;
46568esac
46569fi
46570BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46571if test -n "$BUILD_STRIP"; then
46572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46573$as_echo "$BUILD_STRIP" >&6; }
46574else
46575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46576$as_echo "no" >&6; }
46577fi
46578
46579
46580  test -n "$BUILD_STRIP" && break
46581done
46582
46583    else
46584      # If it succeeded, then it was overridden by the user. We will use it
46585      # for the tool.
46586
46587      # First remove it from the list of overridden variables, so we can test
46588      # for unknown variables in the end.
46589      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46590
46591      # Check if we try to supply an empty value
46592      if test "x$BUILD_STRIP" = x; then
46593        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46594$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46596$as_echo_n "checking for BUILD_STRIP... " >&6; }
46597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46598$as_echo "disabled" >&6; }
46599      else
46600        # Check if the provided tool contains a complete path.
46601        tool_specified="$BUILD_STRIP"
46602        tool_basename="${tool_specified##*/}"
46603        if test "x$tool_basename" = "x$tool_specified"; then
46604          # A command without a complete path is provided, search $PATH.
46605          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46606$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46607          # Extract the first word of "$tool_basename", so it can be a program name with args.
46608set dummy $tool_basename; ac_word=$2
46609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46610$as_echo_n "checking for $ac_word... " >&6; }
46611if ${ac_cv_path_BUILD_STRIP+:} false; then :
46612  $as_echo_n "(cached) " >&6
46613else
46614  case $BUILD_STRIP in
46615  [\\/]* | ?:[\\/]*)
46616  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46617  ;;
46618  *)
46619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46620for as_dir in $PATH
46621do
46622  IFS=$as_save_IFS
46623  test -z "$as_dir" && as_dir=.
46624    for ac_exec_ext in '' $ac_executable_extensions; do
46625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46626    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46628    break 2
46629  fi
46630done
46631  done
46632IFS=$as_save_IFS
46633
46634  ;;
46635esac
46636fi
46637BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46638if test -n "$BUILD_STRIP"; then
46639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46640$as_echo "$BUILD_STRIP" >&6; }
46641else
46642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46643$as_echo "no" >&6; }
46644fi
46645
46646
46647          if test "x$BUILD_STRIP" = x; then
46648            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46649          fi
46650        else
46651          # Otherwise we believe it is a complete path. Use it as it is.
46652          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46653$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46654          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46655$as_echo_n "checking for BUILD_STRIP... " >&6; }
46656          if test ! -x "$tool_specified"; then
46657            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46658$as_echo "not found" >&6; }
46659            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46660          fi
46661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46662$as_echo "$tool_specified" >&6; }
46663        fi
46664      fi
46665    fi
46666
46667  fi
46668
46669
46670
46671  # Only process if variable expands to non-empty
46672
46673  if test "x$BUILD_STRIP" != x; then
46674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46675
46676  # First separate the path from the arguments. This will split at the first
46677  # space.
46678  complete="$BUILD_STRIP"
46679  path="${complete%% *}"
46680  tmp="$complete EOL"
46681  arguments="${tmp#* }"
46682
46683  # Input might be given as Windows format, start by converting to
46684  # unix format.
46685  new_path=`$CYGPATH -u "$path"`
46686
46687  # Now try to locate executable using which
46688  new_path=`$WHICH "$new_path" 2> /dev/null`
46689  # bat and cmd files are not always considered executable in cygwin causing which
46690  # to not find them
46691  if test "x$new_path" = x \
46692      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46693      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46694    new_path=`$CYGPATH -u "$path"`
46695  fi
46696  if test "x$new_path" = x; then
46697    # Oops. Which didn't find the executable.
46698    # The splitting of arguments from the executable at a space might have been incorrect,
46699    # since paths with space are more likely in Windows. Give it another try with the whole
46700    # argument.
46701    path="$complete"
46702    arguments="EOL"
46703    new_path=`$CYGPATH -u "$path"`
46704    new_path=`$WHICH "$new_path" 2> /dev/null`
46705    # bat and cmd files are not always considered executable in cygwin causing which
46706    # to not find them
46707    if test "x$new_path" = x \
46708        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46709        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46710      new_path=`$CYGPATH -u "$path"`
46711    fi
46712    if test "x$new_path" = x; then
46713      # It's still not found. Now this is an unrecoverable error.
46714      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46715$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46716      has_space=`$ECHO "$complete" | $GREP " "`
46717      if test "x$has_space" != x; then
46718        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46719$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46720      fi
46721      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46722    fi
46723  fi
46724
46725  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46726  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46727  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46728  # "foo.exe" is OK but "foo" is an error.
46729  #
46730  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46731  # It is also a way to make sure we got the proper file name for the real test later on.
46732  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46733  if test "x$test_shortpath" = x; then
46734    # Short path failed, file does not exist as specified.
46735    # Try adding .exe or .cmd
46736    if test -f "${new_path}.exe"; then
46737      input_to_shortpath="${new_path}.exe"
46738    elif test -f "${new_path}.cmd"; then
46739      input_to_shortpath="${new_path}.cmd"
46740    else
46741      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46742$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46743      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46744$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46745      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46746    fi
46747  else
46748    input_to_shortpath="$new_path"
46749  fi
46750
46751  # Call helper function which possibly converts this using DOS-style short mode.
46752  # If so, the updated path is stored in $new_path.
46753  new_path="$input_to_shortpath"
46754
46755  input_path="$input_to_shortpath"
46756  # Check if we need to convert this using DOS-style short mode. If the path
46757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46758  # take no chances and rewrite it.
46759  # Note: m4 eats our [], so we need to use [ and ] instead.
46760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46761  if test "x$has_forbidden_chars" != x; then
46762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46766      # Going to short mode and back again did indeed matter. Since short mode is
46767      # case insensitive, let's make it lowercase to improve readability.
46768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46769      # Now convert it back to Unix-style (cygpath)
46770      input_path=`$CYGPATH -u "$shortmode_path"`
46771      new_path="$input_path"
46772    fi
46773  fi
46774
46775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46776  if test "x$test_cygdrive_prefix" = x; then
46777    # As a simple fix, exclude /usr/bin since it's not a real path.
46778    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46780      # a path prefixed by /cygdrive for fixpath to work.
46781      new_path="$CYGWIN_ROOT_PATH$input_path"
46782    fi
46783  fi
46784
46785  # remove trailing .exe if any
46786  new_path="${new_path/%.exe/}"
46787
46788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46789
46790  # First separate the path from the arguments. This will split at the first
46791  # space.
46792  complete="$BUILD_STRIP"
46793  path="${complete%% *}"
46794  tmp="$complete EOL"
46795  arguments="${tmp#* }"
46796
46797  # Input might be given as Windows format, start by converting to
46798  # unix format.
46799  new_path="$path"
46800
46801  windows_path="$new_path"
46802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46803    unix_path=`$CYGPATH -u "$windows_path"`
46804    new_path="$unix_path"
46805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46807    new_path="$unix_path"
46808  fi
46809
46810
46811  # Now try to locate executable using which
46812  new_path=`$WHICH "$new_path" 2> /dev/null`
46813
46814  if test "x$new_path" = x; then
46815    # Oops. Which didn't find the executable.
46816    # The splitting of arguments from the executable at a space might have been incorrect,
46817    # since paths with space are more likely in Windows. Give it another try with the whole
46818    # argument.
46819    path="$complete"
46820    arguments="EOL"
46821    new_path="$path"
46822
46823  windows_path="$new_path"
46824  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46825    unix_path=`$CYGPATH -u "$windows_path"`
46826    new_path="$unix_path"
46827  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46828    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46829    new_path="$unix_path"
46830  fi
46831
46832
46833    new_path=`$WHICH "$new_path" 2> /dev/null`
46834    # bat and cmd files are not always considered executable in MSYS causing which
46835    # to not find them
46836    if test "x$new_path" = x \
46837        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46838        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46839      new_path="$path"
46840
46841  windows_path="$new_path"
46842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46843    unix_path=`$CYGPATH -u "$windows_path"`
46844    new_path="$unix_path"
46845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46847    new_path="$unix_path"
46848  fi
46849
46850    fi
46851
46852    if test "x$new_path" = x; then
46853      # It's still not found. Now this is an unrecoverable error.
46854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46855$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46856      has_space=`$ECHO "$complete" | $GREP " "`
46857      if test "x$has_space" != x; then
46858        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46859$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46860      fi
46861      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46862    fi
46863  fi
46864
46865  # Now new_path has a complete unix path to the binary
46866  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46867    # Keep paths in /bin as-is, but remove trailing .exe if any
46868    new_path="${new_path/%.exe/}"
46869    # Do not save /bin paths to all_fixpath_prefixes!
46870  else
46871    # Not in mixed or Windows style, start by that.
46872    new_path=`cmd //c echo $new_path`
46873
46874  input_path="$new_path"
46875  # Check if we need to convert this using DOS-style short mode. If the path
46876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46877  # take no chances and rewrite it.
46878  # Note: m4 eats our [], so we need to use [ and ] instead.
46879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46880  if test "x$has_forbidden_chars" != x; then
46881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46883  fi
46884
46885    # Output is in $new_path
46886
46887  windows_path="$new_path"
46888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46889    unix_path=`$CYGPATH -u "$windows_path"`
46890    new_path="$unix_path"
46891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46893    new_path="$unix_path"
46894  fi
46895
46896    # remove trailing .exe if any
46897    new_path="${new_path/%.exe/}"
46898
46899    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46900    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46901  fi
46902
46903    else
46904      # We're on a unix platform. Hooray! :)
46905      # First separate the path from the arguments. This will split at the first
46906      # space.
46907      complete="$BUILD_STRIP"
46908      path="${complete%% *}"
46909      tmp="$complete EOL"
46910      arguments="${tmp#* }"
46911
46912      # Cannot rely on the command "which" here since it doesn't always work.
46913      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46914      if test -z "$is_absolute_path"; then
46915        # Path to executable is not absolute. Find it.
46916        IFS_save="$IFS"
46917        IFS=:
46918        for p in $PATH; do
46919          if test -f "$p/$path" && test -x "$p/$path"; then
46920            new_path="$p/$path"
46921            break
46922          fi
46923        done
46924        IFS="$IFS_save"
46925      else
46926        # This is an absolute path, we can use it without further modifications.
46927        new_path="$path"
46928      fi
46929
46930      if test "x$new_path" = x; then
46931        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46932$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46933        has_space=`$ECHO "$complete" | $GREP " "`
46934        if test "x$has_space" != x; then
46935          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46936$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46937        fi
46938        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46939      fi
46940    fi
46941
46942    # Now join together the path and the arguments once again
46943    if test "x$arguments" != xEOL; then
46944      new_complete="$new_path ${arguments% *}"
46945    else
46946      new_complete="$new_path"
46947    fi
46948
46949    if test "x$complete" != "x$new_complete"; then
46950      BUILD_STRIP="$new_complete"
46951      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46952$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46953    fi
46954  fi
46955
46956    # Assume the C compiler is the assembler
46957    BUILD_AS="$BUILD_CC -c"
46958    # Just like for the target compiler, use the compiler as linker
46959    BUILD_LD="$BUILD_CC"
46960    BUILD_LDCXX="$BUILD_CXX"
46961
46962    PATH="$OLDPATH"
46963
46964
46965  COMPILER=$BUILD_CC
46966  COMPILER_NAME=BuildC
46967
46968  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46969    # cc -V output typically looks like
46970    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46971    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46972    # Check that this is likely to be the Solaris Studio cc.
46973    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46974    if test $? -ne 0; then
46975      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46976      { $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
46977$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46978      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46979$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46980      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46981$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46982      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46983    fi
46984    # Remove usage instructions (if present), and
46985    # collapse compiler output into a single line
46986    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46987        $SED -e 's/ *[Uu]sage:.*//'`
46988    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46989        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46990  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46991    # xlc -qversion output typically looks like
46992    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46993    #     Version: 11.01.0000.0015
46994    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46995    # Check that this is likely to be the IBM XL C compiler.
46996    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46997    if test $? -ne 0; then
46998      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46999      { $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
47000$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47001      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47002$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47003      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47004$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47005      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47006    fi
47007    # Collapse compiler output into a single line
47008    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47009    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47010        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47011  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47012    # There is no specific version flag, but all output starts with a version string.
47013    # First line typically looks something like:
47014    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47015    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47016    # Check that this is likely to be Microsoft CL.EXE.
47017    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47018    if test $? -ne 0; then
47019      { $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
47020$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47021      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47022$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47023      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47024    fi
47025    # Collapse compiler output into a single line
47026    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47027    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47028        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47029  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47030    # gcc --version output typically looks like
47031    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47032    #     Copyright (C) 2013 Free Software Foundation, Inc.
47033    #     This is free software; see the source for copying conditions.  There is NO
47034    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47035    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47036    # Check that this is likely to be GCC.
47037    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47038    if test $? -ne 0; then
47039      { $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
47040$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47041      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47042$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47043      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47044    fi
47045    # Remove Copyright and legalese from version string, and
47046    # collapse into a single line
47047    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47048        $SED -e 's/ *Copyright .*//'`
47049    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47050        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47051  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47052    # clang --version output typically looks like
47053    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47054    #    clang version 3.3 (tags/RELEASE_33/final)
47055    # or
47056    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47057    #    Target: x86_64-pc-linux-gnu
47058    #    Thread model: posix
47059    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47060    # Check that this is likely to be clang
47061    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47062    if test $? -ne 0; then
47063      { $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
47064$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47065      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47066$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47067      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47068    fi
47069    # Collapse compiler output into a single line
47070    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47071    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47072        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47073  else
47074      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47075  fi
47076  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47077  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47078  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47079  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47080
47081  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47082$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47083
47084
47085  COMPILER=$BUILD_CXX
47086  COMPILER_NAME=BuildC++
47087
47088  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47089    # cc -V output typically looks like
47090    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47091    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47092    # Check that this is likely to be the Solaris Studio cc.
47093    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47094    if test $? -ne 0; then
47095      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47096      { $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
47097$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47098      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47099$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47100      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47101$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47102      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47103    fi
47104    # Remove usage instructions (if present), and
47105    # collapse compiler output into a single line
47106    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47107        $SED -e 's/ *[Uu]sage:.*//'`
47108    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47109        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47110  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47111    # xlc -qversion output typically looks like
47112    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47113    #     Version: 11.01.0000.0015
47114    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47115    # Check that this is likely to be the IBM XL C compiler.
47116    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47117    if test $? -ne 0; then
47118      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47119      { $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
47120$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47122$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47123      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47124$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47125      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47126    fi
47127    # Collapse compiler output into a single line
47128    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47129    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47130        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47131  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47132    # There is no specific version flag, but all output starts with a version string.
47133    # First line typically looks something like:
47134    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47135    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47136    # Check that this is likely to be Microsoft CL.EXE.
47137    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47138    if test $? -ne 0; then
47139      { $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
47140$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47142$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47143      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47144    fi
47145    # Collapse compiler output into a single line
47146    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47147    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47148        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47149  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47150    # gcc --version output typically looks like
47151    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47152    #     Copyright (C) 2013 Free Software Foundation, Inc.
47153    #     This is free software; see the source for copying conditions.  There is NO
47154    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47155    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47156    # Check that this is likely to be GCC.
47157    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47158    if test $? -ne 0; then
47159      { $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
47160$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47161      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47162$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47163      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47164    fi
47165    # Remove Copyright and legalese from version string, and
47166    # collapse into a single line
47167    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47168        $SED -e 's/ *Copyright .*//'`
47169    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47170        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47171  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47172    # clang --version output typically looks like
47173    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47174    #    clang version 3.3 (tags/RELEASE_33/final)
47175    # or
47176    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47177    #    Target: x86_64-pc-linux-gnu
47178    #    Thread model: posix
47179    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47180    # Check that this is likely to be clang
47181    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47182    if test $? -ne 0; then
47183      { $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
47184$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47185      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47186$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47187      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47188    fi
47189    # Collapse compiler output into a single line
47190    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47191    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47192        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47193  else
47194      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47195  fi
47196  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47197  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47198  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47199  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47200
47201  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47202$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47203
47204
47205  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47206    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
47207$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47208    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47209$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47210  fi
47211
47212  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47213  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47214    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47215$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47216  fi
47217
47218  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47219    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47220$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47221  fi
47222
47223  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47224
47225  else
47226    # If we are not cross compiling, use the normal target compilers for
47227    # building the build platform executables.
47228    BUILD_CC="$CC"
47229    BUILD_CXX="$CXX"
47230    BUILD_LD="$LD"
47231    BUILD_LDCXX="$LDCXX"
47232    BUILD_NM="$NM"
47233    BUILD_AS="$AS"
47234    BUILD_OBJCOPY="$OBJCOPY"
47235    BUILD_STRIP="$STRIP"
47236    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47237    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47238    BUILD_AR="$AR"
47239  fi
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47253    # For hotspot, we need these in Windows mixed path,
47254    # so rewrite them all. Need added .exe suffix.
47255    HOTSPOT_CXX="$CXX.exe"
47256    HOTSPOT_LD="$LD.exe"
47257    HOTSPOT_MT="$MT.exe"
47258    HOTSPOT_RC="$RC.exe"
47259
47260  unix_path="$HOTSPOT_CXX"
47261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47262    windows_path=`$CYGPATH -m "$unix_path"`
47263    HOTSPOT_CXX="$windows_path"
47264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47265    windows_path=`cmd //c echo $unix_path`
47266    HOTSPOT_CXX="$windows_path"
47267  fi
47268
47269
47270  unix_path="$HOTSPOT_LD"
47271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47272    windows_path=`$CYGPATH -m "$unix_path"`
47273    HOTSPOT_LD="$windows_path"
47274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47275    windows_path=`cmd //c echo $unix_path`
47276    HOTSPOT_LD="$windows_path"
47277  fi
47278
47279
47280  unix_path="$HOTSPOT_MT"
47281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47282    windows_path=`$CYGPATH -m "$unix_path"`
47283    HOTSPOT_MT="$windows_path"
47284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47285    windows_path=`cmd //c echo $unix_path`
47286    HOTSPOT_MT="$windows_path"
47287  fi
47288
47289
47290  unix_path="$HOTSPOT_RC"
47291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47292    windows_path=`$CYGPATH -m "$unix_path"`
47293    HOTSPOT_RC="$windows_path"
47294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47295    windows_path=`cmd //c echo $unix_path`
47296    HOTSPOT_RC="$windows_path"
47297  fi
47298
47299
47300
47301  else
47302    HOTSPOT_CXX="$CXX"
47303    HOTSPOT_LD="$LD"
47304  fi
47305
47306
47307
47308  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47309    USE_CLANG=true
47310  fi
47311
47312
47313
47314
47315
47316  # The package path is used only on macosx?
47317  # FIXME: clean this up, and/or move it elsewhere.
47318  PACKAGE_PATH=/opt/local
47319
47320
47321  # Check for extra potential brokenness.
47322  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47323    # On Windows, double-check that we got the right compiler.
47324    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47325    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47326    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47327      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47328        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
47329      fi
47330    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47331      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47332        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47333      fi
47334    fi
47335  fi
47336
47337  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47338    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47339    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47340    # This is later checked when setting flags.
47341
47342    # "-Og" suppported for GCC 4.8 and later
47343    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47344
47345
47346
47347
47348
47349
47350
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391    # Execute function body
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440    # Execute function body
47441
47442  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47443$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47444  supports=yes
47445
47446  saved_cflags="$CFLAGS"
47447  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47448  ac_ext=c
47449ac_cpp='$CPP $CPPFLAGS'
47450ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47451ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47452ac_compiler_gnu=$ac_cv_c_compiler_gnu
47453
47454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47455/* end confdefs.h.  */
47456int i;
47457_ACEOF
47458if ac_fn_c_try_compile "$LINENO"; then :
47459
47460else
47461  supports=no
47462fi
47463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47464  ac_ext=cpp
47465ac_cpp='$CXXCPP $CPPFLAGS'
47466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47469
47470  CFLAGS="$saved_cflags"
47471
47472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47473$as_echo "$supports" >&6; }
47474  if test "x$supports" = "xyes" ; then
47475    :
47476    C_COMP_SUPPORTS="yes"
47477  else
47478    :
47479    C_COMP_SUPPORTS="no"
47480  fi
47481
47482
47483
47484
47485
47486
47487
47488
47489
47490
47491
47492
47493
47494
47495
47496
47497
47498
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540    # Execute function body
47541
47542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47543$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47544  supports=yes
47545
47546  saved_cxxflags="$CXXFLAGS"
47547  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47548  ac_ext=cpp
47549ac_cpp='$CXXCPP $CPPFLAGS'
47550ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47551ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47552ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47553
47554  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47555/* end confdefs.h.  */
47556int i;
47557_ACEOF
47558if ac_fn_cxx_try_compile "$LINENO"; then :
47559
47560else
47561  supports=no
47562fi
47563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47564  ac_ext=cpp
47565ac_cpp='$CXXCPP $CPPFLAGS'
47566ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47567ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47568ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47569
47570  CXXFLAGS="$saved_cxxflags"
47571
47572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47573$as_echo "$supports" >&6; }
47574  if test "x$supports" = "xyes" ; then
47575    :
47576    CXX_COMP_SUPPORTS="yes"
47577  else
47578    :
47579    CXX_COMP_SUPPORTS="no"
47580  fi
47581
47582
47583
47584
47585
47586
47587
47588
47589
47590
47591
47592
47593
47594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47595$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47596  supports=no
47597  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47598
47599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47600$as_echo "$supports" >&6; }
47601  if test "x$supports" = "xyes" ; then
47602    :
47603    HAS_CFLAG_OPTIMIZE_DEBUG=true
47604  else
47605    :
47606    HAS_CFLAG_OPTIMIZE_DEBUG=false
47607  fi
47608
47609
47610
47611
47612
47613
47614
47615    # "-z relro" supported in GNU binutils 2.17 and later
47616    LINKER_RELRO_FLAG="-Wl,-z,relro"
47617
47618
47619
47620
47621
47622
47623
47624
47625
47626
47627
47628
47629
47630
47631
47632
47633
47634
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664    # Execute function body
47665
47666  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47667$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47668  supports=yes
47669
47670  saved_ldflags="$LDFLAGS"
47671  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47672  ac_ext=c
47673ac_cpp='$CPP $CPPFLAGS'
47674ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47675ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47676ac_compiler_gnu=$ac_cv_c_compiler_gnu
47677
47678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47679/* end confdefs.h.  */
47680
47681int
47682main ()
47683{
47684
47685  ;
47686  return 0;
47687}
47688_ACEOF
47689if ac_fn_c_try_link "$LINENO"; then :
47690
47691else
47692  supports=no
47693fi
47694rm -f core conftest.err conftest.$ac_objext \
47695    conftest$ac_exeext conftest.$ac_ext
47696  ac_ext=cpp
47697ac_cpp='$CXXCPP $CPPFLAGS'
47698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47701
47702  LDFLAGS="$saved_ldflags"
47703
47704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47705$as_echo "$supports" >&6; }
47706  if test "x$supports" = "xyes" ; then
47707    :
47708    HAS_LINKER_RELRO=true
47709  else
47710    :
47711    HAS_LINKER_RELRO=false
47712  fi
47713
47714
47715
47716
47717
47718
47719
47720
47721
47722
47723
47724
47725
47726    # "-z now" supported in GNU binutils 2.11 and later
47727    LINKER_NOW_FLAG="-Wl,-z,now"
47728
47729
47730
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775    # Execute function body
47776
47777  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47778$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47779  supports=yes
47780
47781  saved_ldflags="$LDFLAGS"
47782  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47783  ac_ext=c
47784ac_cpp='$CPP $CPPFLAGS'
47785ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47786ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47787ac_compiler_gnu=$ac_cv_c_compiler_gnu
47788
47789  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47790/* end confdefs.h.  */
47791
47792int
47793main ()
47794{
47795
47796  ;
47797  return 0;
47798}
47799_ACEOF
47800if ac_fn_c_try_link "$LINENO"; then :
47801
47802else
47803  supports=no
47804fi
47805rm -f core conftest.err conftest.$ac_objext \
47806    conftest$ac_exeext conftest.$ac_ext
47807  ac_ext=cpp
47808ac_cpp='$CXXCPP $CPPFLAGS'
47809ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47810ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47811ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47812
47813  LDFLAGS="$saved_ldflags"
47814
47815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47816$as_echo "$supports" >&6; }
47817  if test "x$supports" = "xyes" ; then
47818    :
47819    HAS_LINKER_NOW=true
47820  else
47821    :
47822    HAS_LINKER_NOW=false
47823  fi
47824
47825
47826
47827
47828
47829
47830
47831
47832
47833
47834
47835
47836  fi
47837
47838  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47839  # in executable.'
47840  USING_BROKEN_SUSE_LD=no
47841  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47843$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47844    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47845    $ECHO "int main() { }" > main.c
47846    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47848$as_echo "no" >&6; }
47849      USING_BROKEN_SUSE_LD=no
47850    else
47851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47852$as_echo "yes" >&6; }
47853      USING_BROKEN_SUSE_LD=yes
47854    fi
47855    $RM version-script.map main.c a.out
47856  fi
47857
47858
47859  # Setup hotspot lecagy names for toolchains
47860  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47861  if test "x$TOOLCHAIN_TYPE" = xclang; then
47862    HOTSPOT_TOOLCHAIN_TYPE=gcc
47863  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47864    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47865  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47866    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47867  fi
47868
47869
47870
47871# Setup the JTReg Regression Test Harness.
47872
47873
47874# Check whether --with-jtreg was given.
47875if test "${with_jtreg+set}" = set; then :
47876  withval=$with_jtreg;
47877else
47878  with_jtreg=no
47879fi
47880
47881
47882  if test "x$with_jtreg" = xno; then
47883    # jtreg disabled
47884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47885$as_echo_n "checking for jtreg... " >&6; }
47886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47887$as_echo "no" >&6; }
47888  else
47889    if test "x$with_jtreg" != xyes; then
47890      # with path specified.
47891      JT_HOME="$with_jtreg"
47892    fi
47893
47894    if test "x$JT_HOME" != x; then
47895      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47896$as_echo_n "checking for jtreg... " >&6; }
47897
47898      # use JT_HOME enviroment var.
47899
47900  # Only process if variable expands to non-empty
47901
47902  if test "x$JT_HOME" != x; then
47903    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47904
47905  # Input might be given as Windows format, start by converting to
47906  # unix format.
47907  path="$JT_HOME"
47908  new_path=`$CYGPATH -u "$path"`
47909
47910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47913  # "foo.exe" is OK but "foo" is an error.
47914  #
47915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47916  # It is also a way to make sure we got the proper file name for the real test later on.
47917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47918  if test "x$test_shortpath" = x; then
47919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47920$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47921    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47922  fi
47923
47924  # Call helper function which possibly converts this using DOS-style short mode.
47925  # If so, the updated path is stored in $new_path.
47926
47927  input_path="$new_path"
47928  # Check if we need to convert this using DOS-style short mode. If the path
47929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47930  # take no chances and rewrite it.
47931  # Note: m4 eats our [], so we need to use [ and ] instead.
47932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47933  if test "x$has_forbidden_chars" != x; then
47934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47938      # Going to short mode and back again did indeed matter. Since short mode is
47939      # case insensitive, let's make it lowercase to improve readability.
47940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47941      # Now convert it back to Unix-style (cygpath)
47942      input_path=`$CYGPATH -u "$shortmode_path"`
47943      new_path="$input_path"
47944    fi
47945  fi
47946
47947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47948  if test "x$test_cygdrive_prefix" = x; then
47949    # As a simple fix, exclude /usr/bin since it's not a real path.
47950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47952      # a path prefixed by /cygdrive for fixpath to work.
47953      new_path="$CYGWIN_ROOT_PATH$input_path"
47954    fi
47955  fi
47956
47957
47958  if test "x$path" != "x$new_path"; then
47959    JT_HOME="$new_path"
47960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47961$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47962  fi
47963
47964    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47965
47966  path="$JT_HOME"
47967  has_colon=`$ECHO $path | $GREP ^.:`
47968  new_path="$path"
47969  if test "x$has_colon" = x; then
47970    # Not in mixed or Windows style, start by that.
47971    new_path=`cmd //c echo $path`
47972  fi
47973
47974
47975  input_path="$new_path"
47976  # Check if we need to convert this using DOS-style short mode. If the path
47977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47978  # take no chances and rewrite it.
47979  # Note: m4 eats our [], so we need to use [ and ] instead.
47980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47981  if test "x$has_forbidden_chars" != x; then
47982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47984  fi
47985
47986
47987  windows_path="$new_path"
47988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47989    unix_path=`$CYGPATH -u "$windows_path"`
47990    new_path="$unix_path"
47991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47993    new_path="$unix_path"
47994  fi
47995
47996  if test "x$path" != "x$new_path"; then
47997    JT_HOME="$new_path"
47998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47999$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48000  fi
48001
48002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48004
48005    else
48006      # We're on a unix platform. Hooray! :)
48007      path="$JT_HOME"
48008      has_space=`$ECHO "$path" | $GREP " "`
48009      if test "x$has_space" != x; then
48010        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48011$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48012        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48013      fi
48014
48015      # Use eval to expand a potential ~
48016      eval path="$path"
48017      if test ! -f "$path" && test ! -d "$path"; then
48018        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48019      fi
48020
48021      if test -d "$path"; then
48022        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48023      else
48024        dir="`$DIRNAME "$path"`"
48025        base="`$BASENAME "$path"`"
48026        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48027      fi
48028    fi
48029  fi
48030
48031
48032      # jtreg win32 script works for everybody
48033      JTREGEXE="$JT_HOME/bin/jtreg"
48034
48035      if test ! -f "$JTREGEXE"; then
48036        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48037      fi
48038
48039      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48040$as_echo "$JTREGEXE" >&6; }
48041    else
48042      # try to find jtreg on path
48043
48044
48045
48046  # Publish this variable in the help.
48047
48048
48049  if [ -z "${JTREGEXE+x}" ]; then
48050    # The variable is not set by user, try to locate tool using the code snippet
48051    for ac_prog in jtreg
48052do
48053  # Extract the first word of "$ac_prog", so it can be a program name with args.
48054set dummy $ac_prog; ac_word=$2
48055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48056$as_echo_n "checking for $ac_word... " >&6; }
48057if ${ac_cv_path_JTREGEXE+:} false; then :
48058  $as_echo_n "(cached) " >&6
48059else
48060  case $JTREGEXE in
48061  [\\/]* | ?:[\\/]*)
48062  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48063  ;;
48064  *)
48065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48066for as_dir in $PATH
48067do
48068  IFS=$as_save_IFS
48069  test -z "$as_dir" && as_dir=.
48070    for ac_exec_ext in '' $ac_executable_extensions; do
48071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48072    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48074    break 2
48075  fi
48076done
48077  done
48078IFS=$as_save_IFS
48079
48080  ;;
48081esac
48082fi
48083JTREGEXE=$ac_cv_path_JTREGEXE
48084if test -n "$JTREGEXE"; then
48085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48086$as_echo "$JTREGEXE" >&6; }
48087else
48088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48089$as_echo "no" >&6; }
48090fi
48091
48092
48093  test -n "$JTREGEXE" && break
48094done
48095
48096  else
48097    # The variable is set, but is it from the command line or the environment?
48098
48099    # Try to remove the string !JTREGEXE! from our list.
48100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48102      # If it failed, the variable was not from the command line. Ignore it,
48103      # but warn the user (except for BASH, which is always set by the calling BASH).
48104      if test "xJTREGEXE" != xBASH; then
48105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48106$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48107      fi
48108      # Try to locate tool using the code snippet
48109      for ac_prog in jtreg
48110do
48111  # Extract the first word of "$ac_prog", so it can be a program name with args.
48112set dummy $ac_prog; ac_word=$2
48113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48114$as_echo_n "checking for $ac_word... " >&6; }
48115if ${ac_cv_path_JTREGEXE+:} false; then :
48116  $as_echo_n "(cached) " >&6
48117else
48118  case $JTREGEXE in
48119  [\\/]* | ?:[\\/]*)
48120  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48121  ;;
48122  *)
48123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48124for as_dir in $PATH
48125do
48126  IFS=$as_save_IFS
48127  test -z "$as_dir" && as_dir=.
48128    for ac_exec_ext in '' $ac_executable_extensions; do
48129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48130    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48132    break 2
48133  fi
48134done
48135  done
48136IFS=$as_save_IFS
48137
48138  ;;
48139esac
48140fi
48141JTREGEXE=$ac_cv_path_JTREGEXE
48142if test -n "$JTREGEXE"; then
48143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48144$as_echo "$JTREGEXE" >&6; }
48145else
48146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48147$as_echo "no" >&6; }
48148fi
48149
48150
48151  test -n "$JTREGEXE" && break
48152done
48153
48154    else
48155      # If it succeeded, then it was overridden by the user. We will use it
48156      # for the tool.
48157
48158      # First remove it from the list of overridden variables, so we can test
48159      # for unknown variables in the end.
48160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48161
48162      # Check if we try to supply an empty value
48163      if test "x$JTREGEXE" = x; then
48164        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48165$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48166        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48167$as_echo_n "checking for JTREGEXE... " >&6; }
48168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48169$as_echo "disabled" >&6; }
48170      else
48171        # Check if the provided tool contains a complete path.
48172        tool_specified="$JTREGEXE"
48173        tool_basename="${tool_specified##*/}"
48174        if test "x$tool_basename" = "x$tool_specified"; then
48175          # A command without a complete path is provided, search $PATH.
48176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48177$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48178          # Extract the first word of "$tool_basename", so it can be a program name with args.
48179set dummy $tool_basename; ac_word=$2
48180{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48181$as_echo_n "checking for $ac_word... " >&6; }
48182if ${ac_cv_path_JTREGEXE+:} false; then :
48183  $as_echo_n "(cached) " >&6
48184else
48185  case $JTREGEXE in
48186  [\\/]* | ?:[\\/]*)
48187  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48188  ;;
48189  *)
48190  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48191for as_dir in $PATH
48192do
48193  IFS=$as_save_IFS
48194  test -z "$as_dir" && as_dir=.
48195    for ac_exec_ext in '' $ac_executable_extensions; do
48196  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48197    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48198    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48199    break 2
48200  fi
48201done
48202  done
48203IFS=$as_save_IFS
48204
48205  ;;
48206esac
48207fi
48208JTREGEXE=$ac_cv_path_JTREGEXE
48209if test -n "$JTREGEXE"; then
48210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48211$as_echo "$JTREGEXE" >&6; }
48212else
48213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48214$as_echo "no" >&6; }
48215fi
48216
48217
48218          if test "x$JTREGEXE" = x; then
48219            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48220          fi
48221        else
48222          # Otherwise we believe it is a complete path. Use it as it is.
48223          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48224$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48225          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48226$as_echo_n "checking for JTREGEXE... " >&6; }
48227          if test ! -x "$tool_specified"; then
48228            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48229$as_echo "not found" >&6; }
48230            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48231          fi
48232          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48233$as_echo "$tool_specified" >&6; }
48234        fi
48235      fi
48236    fi
48237
48238  fi
48239
48240
48241
48242  if test "x$JTREGEXE" = x; then
48243    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48244  fi
48245
48246
48247      JT_HOME="`$DIRNAME $JTREGEXE`"
48248    fi
48249  fi
48250
48251
48252
48253
48254
48255
48256  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48257  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48258  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48259  #                              commands produced by the link step (currently AIX only)
48260  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48261    COMPILER_TARGET_BITS_FLAG="-q"
48262    COMPILER_COMMAND_FILE_FLAG="-f"
48263    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48264  else
48265    COMPILER_TARGET_BITS_FLAG="-m"
48266    COMPILER_COMMAND_FILE_FLAG="@"
48267    COMPILER_BINDCMD_FILE_FLAG=""
48268
48269    # The solstudio linker does not support @-files.
48270    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48271      COMPILER_COMMAND_FILE_FLAG=
48272    fi
48273
48274    # Check if @file is supported by gcc
48275    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48277$as_echo_n "checking if @file is supported by gcc... " >&6; }
48278      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48279      $ECHO "" "--version" > command.file
48280      if $CXX @command.file 2>&5 >&5; then
48281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48282$as_echo "yes" >&6; }
48283        COMPILER_COMMAND_FILE_FLAG="@"
48284      else
48285        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48286$as_echo "no" >&6; }
48287        COMPILER_COMMAND_FILE_FLAG=
48288      fi
48289      $RM command.file
48290    fi
48291  fi
48292
48293
48294
48295
48296  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48297  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48298    ARFLAGS="-r"
48299  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48300    ARFLAGS="-X64"
48301  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48302    # lib.exe is used as AR to create static libraries.
48303    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48304  else
48305    ARFLAGS=""
48306  fi
48307
48308
48309  ## Setup strip.
48310  # FIXME: should this really be per platform, or should it be per toolchain type?
48311  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48312  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48313  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48314    STRIPFLAGS="-g"
48315  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48316    STRIPFLAGS="-x"
48317  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48318    STRIPFLAGS="-S"
48319  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48320    STRIPFLAGS="-X32_64"
48321  fi
48322
48323
48324
48325  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48326    CC_OUT_OPTION=-Fo
48327    EXE_OUT_OPTION=-out:
48328    LD_OUT_OPTION=-out:
48329    AR_OUT_OPTION=-out:
48330  else
48331    # The option used to specify the target .o,.a or .so file.
48332    # When compiling, how to specify the to be created object file.
48333    CC_OUT_OPTION='-o$(SPACE)'
48334    # When linking, how to specify the to be created executable.
48335    EXE_OUT_OPTION='-o$(SPACE)'
48336    # When linking, how to specify the to be created dynamically linkable library.
48337    LD_OUT_OPTION='-o$(SPACE)'
48338    # When archiving, how to specify the to be create static archive for object files.
48339    AR_OUT_OPTION='rcs$(SPACE)'
48340  fi
48341
48342
48343
48344
48345
48346  # On Windows, we need to set RC flags.
48347  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48348    RC_FLAGS="-nologo -l0x409"
48349    JVM_RCFLAGS="-nologo"
48350    if test "x$DEBUG_LEVEL" = xrelease; then
48351      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48352      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48353    fi
48354
48355    # The version variables used to create RC_FLAGS may be overridden
48356    # in a custom configure script, or possibly the command line.
48357    # Let those variables be expanded at make time in spec.gmk.
48358    # The \$ are escaped to the shell, and the $(...) variables
48359    # are evaluated by make.
48360    RC_FLAGS="$RC_FLAGS \
48361        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48362        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48363        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48364        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48365        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48366        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48367        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48368
48369    JVM_RCFLAGS="$JVM_RCFLAGS \
48370        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48371        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48372        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48373        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48374        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48375        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48376        -D\"HS_FNAME=jvm.dll\" \
48377        -D\"HS_INTERNAL_NAME=jvm\""
48378  fi
48379
48380
48381
48382  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48383    # silence copyright notice and other headers.
48384    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48385  fi
48386
48387
48388# Now we can test some aspects on the target using configure macros.
48389
48390{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48391$as_echo_n "checking for ANSI C header files... " >&6; }
48392if ${ac_cv_header_stdc+:} false; then :
48393  $as_echo_n "(cached) " >&6
48394else
48395  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48396/* end confdefs.h.  */
48397#include <stdlib.h>
48398#include <stdarg.h>
48399#include <string.h>
48400#include <float.h>
48401
48402int
48403main ()
48404{
48405
48406  ;
48407  return 0;
48408}
48409_ACEOF
48410if ac_fn_cxx_try_compile "$LINENO"; then :
48411  ac_cv_header_stdc=yes
48412else
48413  ac_cv_header_stdc=no
48414fi
48415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48416
48417if test $ac_cv_header_stdc = yes; then
48418  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48419  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48420/* end confdefs.h.  */
48421#include <string.h>
48422
48423_ACEOF
48424if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48425  $EGREP "memchr" >/dev/null 2>&1; then :
48426
48427else
48428  ac_cv_header_stdc=no
48429fi
48430rm -f conftest*
48431
48432fi
48433
48434if test $ac_cv_header_stdc = yes; then
48435  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48436  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48437/* end confdefs.h.  */
48438#include <stdlib.h>
48439
48440_ACEOF
48441if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48442  $EGREP "free" >/dev/null 2>&1; then :
48443
48444else
48445  ac_cv_header_stdc=no
48446fi
48447rm -f conftest*
48448
48449fi
48450
48451if test $ac_cv_header_stdc = yes; then
48452  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48453  if test "$cross_compiling" = yes; then :
48454  :
48455else
48456  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48457/* end confdefs.h.  */
48458#include <ctype.h>
48459#include <stdlib.h>
48460#if ((' ' & 0x0FF) == 0x020)
48461# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48462# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48463#else
48464# define ISLOWER(c) \
48465		   (('a' <= (c) && (c) <= 'i') \
48466		     || ('j' <= (c) && (c) <= 'r') \
48467		     || ('s' <= (c) && (c) <= 'z'))
48468# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48469#endif
48470
48471#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48472int
48473main ()
48474{
48475  int i;
48476  for (i = 0; i < 256; i++)
48477    if (XOR (islower (i), ISLOWER (i))
48478	|| toupper (i) != TOUPPER (i))
48479      return 2;
48480  return 0;
48481}
48482_ACEOF
48483if ac_fn_cxx_try_run "$LINENO"; then :
48484
48485else
48486  ac_cv_header_stdc=no
48487fi
48488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48489  conftest.$ac_objext conftest.beam conftest.$ac_ext
48490fi
48491
48492fi
48493fi
48494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48495$as_echo "$ac_cv_header_stdc" >&6; }
48496if test $ac_cv_header_stdc = yes; then
48497
48498$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48499
48500fi
48501
48502# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48503for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48504		  inttypes.h stdint.h unistd.h
48505do :
48506  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48507ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48508"
48509if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48510  cat >>confdefs.h <<_ACEOF
48511#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48512_ACEOF
48513
48514fi
48515
48516done
48517
48518
48519
48520  ###############################################################################
48521  #
48522  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48523  # (The JVM can use 32 or 64 bit Java pointers but that decision
48524  # is made at runtime.)
48525  #
48526
48527  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48528    # Always specify -m flag on Solaris
48529    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48530
48531  # When we add flags to the "official" CFLAGS etc, we need to
48532  # keep track of these additions in ADDED_CFLAGS etc. These
48533  # will later be checked to make sure only controlled additions
48534  # have been made to CFLAGS etc.
48535  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48536  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48537  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48538
48539  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48540  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48541  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48542
48543  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48544  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48545  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48546
48547  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48548  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48549  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48550
48551  elif test "x$COMPILE_TYPE" = xreduced; then
48552    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48553      # Specify -m if running reduced on unix platforms
48554
48555  # When we add flags to the "official" CFLAGS etc, we need to
48556  # keep track of these additions in ADDED_CFLAGS etc. These
48557  # will later be checked to make sure only controlled additions
48558  # have been made to CFLAGS etc.
48559  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48560  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48561  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48562
48563  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48564  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48565  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48566
48567  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48568  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48569  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48570
48571  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48572  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48573  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48574
48575    fi
48576  fi
48577  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48578    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48579    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48580    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48581  fi
48582
48583  # Make compilation sanity check
48584  for ac_header in stdio.h
48585do :
48586  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48587if test "x$ac_cv_header_stdio_h" = xyes; then :
48588  cat >>confdefs.h <<_ACEOF
48589#define HAVE_STDIO_H 1
48590_ACEOF
48591
48592else
48593
48594    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48595$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48596    if test "x$COMPILE_TYPE" = xreduced; then
48597
48598  # Print a helpful message on how to acquire the necessary build dependency.
48599  # reduced is the help tag: freetype, cups, alsa etc
48600  MISSING_DEPENDENCY=reduced
48601
48602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48603    cygwin_help $MISSING_DEPENDENCY
48604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48605    msys_help $MISSING_DEPENDENCY
48606  else
48607    PKGHANDLER_COMMAND=
48608
48609    case $PKGHANDLER in
48610      apt-get)
48611        apt_help     $MISSING_DEPENDENCY ;;
48612      yum)
48613        yum_help     $MISSING_DEPENDENCY ;;
48614      port)
48615        port_help    $MISSING_DEPENDENCY ;;
48616      pkgutil)
48617        pkgutil_help $MISSING_DEPENDENCY ;;
48618      pkgadd)
48619        pkgadd_help  $MISSING_DEPENDENCY ;;
48620    esac
48621
48622    if test "x$PKGHANDLER_COMMAND" != x; then
48623      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48624    fi
48625  fi
48626
48627      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48628$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48629    elif test "x$COMPILE_TYPE" = xcross; then
48630      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48631$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48632    fi
48633    as_fn_error $? "Cannot continue." "$LINENO" 5
48634
48635fi
48636
48637done
48638
48639
48640  # The cast to long int works around a bug in the HP C Compiler
48641# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48642# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48643# This bug is HP SR number 8606223364.
48644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48645$as_echo_n "checking size of int *... " >&6; }
48646if ${ac_cv_sizeof_int_p+:} false; then :
48647  $as_echo_n "(cached) " >&6
48648else
48649  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48650
48651else
48652  if test "$ac_cv_type_int_p" = yes; then
48653     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48654$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48655as_fn_error 77 "cannot compute sizeof (int *)
48656See \`config.log' for more details" "$LINENO" 5; }
48657   else
48658     ac_cv_sizeof_int_p=0
48659   fi
48660fi
48661
48662fi
48663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48664$as_echo "$ac_cv_sizeof_int_p" >&6; }
48665
48666
48667
48668cat >>confdefs.h <<_ACEOF
48669#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48670_ACEOF
48671
48672
48673
48674  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48675  if test "x$ac_cv_sizeof_int_p" = x; then
48676    # The test failed, lets stick to the assumed value.
48677    { $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
48678$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48679  else
48680    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48681
48682    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48683      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48684      # Let's try to implicitely set the compilers target architecture and retry the test
48685      { $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
48686$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;}
48687      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48688$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48689
48690  # When we add flags to the "official" CFLAGS etc, we need to
48691  # keep track of these additions in ADDED_CFLAGS etc. These
48692  # will later be checked to make sure only controlled additions
48693  # have been made to CFLAGS etc.
48694  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48695  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48696  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48697
48698  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48699  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48700  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48701
48702  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48703  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48704  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48705
48706  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48707  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48708  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48709
48710
48711      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48712      unset ac_cv_sizeof_int_p
48713      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48714      cat >>confdefs.h <<_ACEOF
48715#undef SIZEOF_INT_P
48716_ACEOF
48717
48718      # The cast to long int works around a bug in the HP C Compiler
48719# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48720# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48721# This bug is HP SR number 8606223364.
48722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48723$as_echo_n "checking size of int *... " >&6; }
48724if ${ac_cv_sizeof_int_p+:} false; then :
48725  $as_echo_n "(cached) " >&6
48726else
48727  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48728
48729else
48730  if test "$ac_cv_type_int_p" = yes; then
48731     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48733as_fn_error 77 "cannot compute sizeof (int *)
48734See \`config.log' for more details" "$LINENO" 5; }
48735   else
48736     ac_cv_sizeof_int_p=0
48737   fi
48738fi
48739
48740fi
48741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48742$as_echo "$ac_cv_sizeof_int_p" >&6; }
48743
48744
48745
48746cat >>confdefs.h <<_ACEOF
48747#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48748_ACEOF
48749
48750
48751
48752      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48753
48754      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48755        { $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
48756$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;}
48757        if test "x$COMPILE_TYPE" = xreduced; then
48758
48759  # Print a helpful message on how to acquire the necessary build dependency.
48760  # reduced is the help tag: freetype, cups, alsa etc
48761  MISSING_DEPENDENCY=reduced
48762
48763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48764    cygwin_help $MISSING_DEPENDENCY
48765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48766    msys_help $MISSING_DEPENDENCY
48767  else
48768    PKGHANDLER_COMMAND=
48769
48770    case $PKGHANDLER in
48771      apt-get)
48772        apt_help     $MISSING_DEPENDENCY ;;
48773      yum)
48774        yum_help     $MISSING_DEPENDENCY ;;
48775      port)
48776        port_help    $MISSING_DEPENDENCY ;;
48777      pkgutil)
48778        pkgutil_help $MISSING_DEPENDENCY ;;
48779      pkgadd)
48780        pkgadd_help  $MISSING_DEPENDENCY ;;
48781    esac
48782
48783    if test "x$PKGHANDLER_COMMAND" != x; then
48784      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48785    fi
48786  fi
48787
48788          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48789$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48790        elif test "x$COMPILE_TYPE" = xcross; then
48791          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48792$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48793        fi
48794        as_fn_error $? "Cannot continue." "$LINENO" 5
48795      fi
48796    fi
48797  fi
48798
48799  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48800$as_echo_n "checking for target address size... " >&6; }
48801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48802$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48803
48804
48805  ###############################################################################
48806  #
48807  # Is the target little of big endian?
48808  #
48809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48810$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48811if ${ac_cv_c_bigendian+:} false; then :
48812  $as_echo_n "(cached) " >&6
48813else
48814  ac_cv_c_bigendian=unknown
48815    # See if we're dealing with a universal compiler.
48816    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48817/* end confdefs.h.  */
48818#ifndef __APPLE_CC__
48819	       not a universal capable compiler
48820	     #endif
48821	     typedef int dummy;
48822
48823_ACEOF
48824if ac_fn_cxx_try_compile "$LINENO"; then :
48825
48826	# Check for potential -arch flags.  It is not universal unless
48827	# there are at least two -arch flags with different values.
48828	ac_arch=
48829	ac_prev=
48830	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48831	 if test -n "$ac_prev"; then
48832	   case $ac_word in
48833	     i?86 | x86_64 | ppc | ppc64)
48834	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48835		 ac_arch=$ac_word
48836	       else
48837		 ac_cv_c_bigendian=universal
48838		 break
48839	       fi
48840	       ;;
48841	   esac
48842	   ac_prev=
48843	 elif test "x$ac_word" = "x-arch"; then
48844	   ac_prev=arch
48845	 fi
48846       done
48847fi
48848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48849    if test $ac_cv_c_bigendian = unknown; then
48850      # See if sys/param.h defines the BYTE_ORDER macro.
48851      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48852/* end confdefs.h.  */
48853#include <sys/types.h>
48854	     #include <sys/param.h>
48855
48856int
48857main ()
48858{
48859#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48860		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48861		     && LITTLE_ENDIAN)
48862	      bogus endian macros
48863	     #endif
48864
48865  ;
48866  return 0;
48867}
48868_ACEOF
48869if ac_fn_cxx_try_compile "$LINENO"; then :
48870  # It does; now see whether it defined to BIG_ENDIAN or not.
48871	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48872/* end confdefs.h.  */
48873#include <sys/types.h>
48874		#include <sys/param.h>
48875
48876int
48877main ()
48878{
48879#if BYTE_ORDER != BIG_ENDIAN
48880		 not big endian
48881		#endif
48882
48883  ;
48884  return 0;
48885}
48886_ACEOF
48887if ac_fn_cxx_try_compile "$LINENO"; then :
48888  ac_cv_c_bigendian=yes
48889else
48890  ac_cv_c_bigendian=no
48891fi
48892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48893fi
48894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48895    fi
48896    if test $ac_cv_c_bigendian = unknown; then
48897      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48898      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48899/* end confdefs.h.  */
48900#include <limits.h>
48901
48902int
48903main ()
48904{
48905#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48906	      bogus endian macros
48907	     #endif
48908
48909  ;
48910  return 0;
48911}
48912_ACEOF
48913if ac_fn_cxx_try_compile "$LINENO"; then :
48914  # It does; now see whether it defined to _BIG_ENDIAN or not.
48915	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48916/* end confdefs.h.  */
48917#include <limits.h>
48918
48919int
48920main ()
48921{
48922#ifndef _BIG_ENDIAN
48923		 not big endian
48924		#endif
48925
48926  ;
48927  return 0;
48928}
48929_ACEOF
48930if ac_fn_cxx_try_compile "$LINENO"; then :
48931  ac_cv_c_bigendian=yes
48932else
48933  ac_cv_c_bigendian=no
48934fi
48935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48936fi
48937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48938    fi
48939    if test $ac_cv_c_bigendian = unknown; then
48940      # Compile a test program.
48941      if test "$cross_compiling" = yes; then :
48942  # Try to guess by grepping values from an object file.
48943	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48944/* end confdefs.h.  */
48945short int ascii_mm[] =
48946		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48947		short int ascii_ii[] =
48948		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48949		int use_ascii (int i) {
48950		  return ascii_mm[i] + ascii_ii[i];
48951		}
48952		short int ebcdic_ii[] =
48953		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48954		short int ebcdic_mm[] =
48955		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48956		int use_ebcdic (int i) {
48957		  return ebcdic_mm[i] + ebcdic_ii[i];
48958		}
48959		extern int foo;
48960
48961int
48962main ()
48963{
48964return use_ascii (foo) == use_ebcdic (foo);
48965  ;
48966  return 0;
48967}
48968_ACEOF
48969if ac_fn_cxx_try_compile "$LINENO"; then :
48970  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48971	      ac_cv_c_bigendian=yes
48972	    fi
48973	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48974	      if test "$ac_cv_c_bigendian" = unknown; then
48975		ac_cv_c_bigendian=no
48976	      else
48977		# finding both strings is unlikely to happen, but who knows?
48978		ac_cv_c_bigendian=unknown
48979	      fi
48980	    fi
48981fi
48982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48983else
48984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48985/* end confdefs.h.  */
48986$ac_includes_default
48987int
48988main ()
48989{
48990
48991	     /* Are we little or big endian?  From Harbison&Steele.  */
48992	     union
48993	     {
48994	       long int l;
48995	       char c[sizeof (long int)];
48996	     } u;
48997	     u.l = 1;
48998	     return u.c[sizeof (long int) - 1] == 1;
48999
49000  ;
49001  return 0;
49002}
49003_ACEOF
49004if ac_fn_cxx_try_run "$LINENO"; then :
49005  ac_cv_c_bigendian=no
49006else
49007  ac_cv_c_bigendian=yes
49008fi
49009rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49010  conftest.$ac_objext conftest.beam conftest.$ac_ext
49011fi
49012
49013    fi
49014fi
49015{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49016$as_echo "$ac_cv_c_bigendian" >&6; }
49017 case $ac_cv_c_bigendian in #(
49018   yes)
49019     ENDIAN="big";; #(
49020   no)
49021     ENDIAN="little" ;; #(
49022   universal)
49023     ENDIAN="universal_endianness"
49024     ;; #(
49025   *)
49026     ENDIAN="unknown" ;;
49027 esac
49028
49029
49030  if test "x$ENDIAN" = xuniversal_endianness; then
49031    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49032  fi
49033  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49034    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
49035  fi
49036
49037
49038# Configure flags for the tools
49039
49040  ###############################################################################
49041  #
49042  # How to compile shared libraries.
49043  #
49044
49045  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49046    PICFLAG="-fPIC"
49047    C_FLAG_REORDER=''
49048    CXX_FLAG_REORDER=''
49049
49050    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49051      # Linking is different on MacOSX
49052      if test "x$STATIC_BUILD" = xtrue; then
49053        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49054      else
49055        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49056        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49057      fi
49058      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49059      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49060      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49061      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49062    else
49063      # Default works for linux, might work on other platforms as well.
49064      SHARED_LIBRARY_FLAGS='-shared'
49065      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49066      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49067      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49068      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49069    fi
49070  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49071    C_FLAG_REORDER=''
49072    CXX_FLAG_REORDER=''
49073
49074    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49075      # Linking is different on MacOSX
49076      PICFLAG=''
49077      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49078      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49079      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49080      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49081      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49082
49083      if test "x$STATIC_BUILD" = xfalse; then
49084        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49085      fi
49086    else
49087      # Default works for linux, might work on other platforms as well.
49088      PICFLAG='-fPIC'
49089      SHARED_LIBRARY_FLAGS='-shared'
49090      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49091      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49092      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49093      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49094    fi
49095  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49096    PICFLAG="-KPIC"
49097    C_FLAG_REORDER='-xF'
49098    CXX_FLAG_REORDER='-xF'
49099    SHARED_LIBRARY_FLAGS="-G"
49100    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49101    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49102    SET_SHARED_LIBRARY_NAME='-h $1'
49103    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49104  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49105    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49106    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49107    # will have to patch this single instruction with a call to some out-of-order code which
49108    # does the load from the TOC. This is of course slow. But in that case we also would have
49109    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49110    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49111    # can be patched directly by the linker and does not require a jump to out-of-order code.
49112    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49113    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49114    # loads for accessing a global variable). But there are rumors that this may be seen as a
49115    # 'performance feature' because of improved code locality of the symbols used in a
49116    # compilation unit.
49117    PICFLAG="-qpic"
49118    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49119    C_FLAG_REORDER=''
49120    CXX_FLAG_REORDER=''
49121    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49122    SET_EXECUTABLE_ORIGIN=""
49123    SET_SHARED_LIBRARY_ORIGIN=''
49124    SET_SHARED_LIBRARY_NAME=''
49125    SET_SHARED_LIBRARY_MAPFILE=''
49126  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49127    PICFLAG=""
49128    C_FLAG_REORDER=''
49129    CXX_FLAG_REORDER=''
49130    SHARED_LIBRARY_FLAGS="-dll"
49131    SET_EXECUTABLE_ORIGIN=''
49132    SET_SHARED_LIBRARY_ORIGIN=''
49133    SET_SHARED_LIBRARY_NAME=''
49134    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49135  fi
49136
49137
49138
49139
49140
49141
49142
49143
49144
49145  # The (cross) compiler is now configured, we can now test capabilities
49146  # of the target platform.
49147
49148
49149
49150  ###############################################################################
49151  #
49152  # Setup the opt flags for different compilers
49153  # and different operating systems.
49154  #
49155
49156  # FIXME: this was indirectly the old default, but just inherited.
49157  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49158  #   C_FLAG_DEPS="-MMD -MF"
49159  # fi
49160
49161  # Generate make dependency files
49162  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49163    C_FLAG_DEPS="-MMD -MF"
49164  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49165    C_FLAG_DEPS="-MMD -MF"
49166  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49167    C_FLAG_DEPS="-xMMD -xMF"
49168  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49169    C_FLAG_DEPS="-qmakedep=gcc -MF"
49170  fi
49171  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49172
49173
49174
49175  # Debug symbols
49176  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49177    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49178      # reduce from default "-g2" option to save space
49179      CFLAGS_DEBUG_SYMBOLS="-g1"
49180      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49181    else
49182      CFLAGS_DEBUG_SYMBOLS="-g"
49183      CXXFLAGS_DEBUG_SYMBOLS="-g"
49184    fi
49185  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49186    CFLAGS_DEBUG_SYMBOLS="-g"
49187    CXXFLAGS_DEBUG_SYMBOLS="-g"
49188  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49189    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49190    # -g0 enables debug symbols without disabling inlining.
49191    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49192  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49193    CFLAGS_DEBUG_SYMBOLS="-g"
49194    CXXFLAGS_DEBUG_SYMBOLS="-g"
49195  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49196    CFLAGS_DEBUG_SYMBOLS="-Zi"
49197    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49198  fi
49199
49200
49201
49202  # Debug symbols for JVM_CFLAGS
49203  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49204    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49205    if test "x$DEBUG_LEVEL" = xslowdebug; then
49206      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49207    else
49208      # -g0 does not disable inlining, which -g does.
49209      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49210    fi
49211  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49212    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49213  else
49214    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49215  fi
49216
49217
49218  # bounds, memory and behavior checking options
49219  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49220    case $DEBUG_LEVEL in
49221    release )
49222      # no adjustment
49223      ;;
49224    fastdebug )
49225      # no adjustment
49226      ;;
49227    slowdebug )
49228      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49229      # get's added conditionally on whether we produce debug symbols or not.
49230      # This is most likely not really correct.
49231
49232      # Add runtime stack smashing and undefined behavior checks.
49233      # Not all versions of gcc support -fstack-protector
49234      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277    # Execute function body
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326    # Execute function body
49327
49328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49329$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49330  supports=yes
49331
49332  saved_cflags="$CFLAGS"
49333  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49334  ac_ext=c
49335ac_cpp='$CPP $CPPFLAGS'
49336ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49337ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49338ac_compiler_gnu=$ac_cv_c_compiler_gnu
49339
49340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49341/* end confdefs.h.  */
49342int i;
49343_ACEOF
49344if ac_fn_c_try_compile "$LINENO"; then :
49345
49346else
49347  supports=no
49348fi
49349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49350  ac_ext=cpp
49351ac_cpp='$CXXCPP $CPPFLAGS'
49352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49355
49356  CFLAGS="$saved_cflags"
49357
49358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49359$as_echo "$supports" >&6; }
49360  if test "x$supports" = "xyes" ; then
49361    :
49362    C_COMP_SUPPORTS="yes"
49363  else
49364    :
49365    C_COMP_SUPPORTS="no"
49366  fi
49367
49368
49369
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426    # Execute function body
49427
49428  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49429$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49430  supports=yes
49431
49432  saved_cxxflags="$CXXFLAGS"
49433  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49434  ac_ext=cpp
49435ac_cpp='$CXXCPP $CPPFLAGS'
49436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49439
49440  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49441/* end confdefs.h.  */
49442int i;
49443_ACEOF
49444if ac_fn_cxx_try_compile "$LINENO"; then :
49445
49446else
49447  supports=no
49448fi
49449rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49450  ac_ext=cpp
49451ac_cpp='$CXXCPP $CPPFLAGS'
49452ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49453ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49454ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49455
49456  CXXFLAGS="$saved_cxxflags"
49457
49458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49459$as_echo "$supports" >&6; }
49460  if test "x$supports" = "xyes" ; then
49461    :
49462    CXX_COMP_SUPPORTS="yes"
49463  else
49464    :
49465    CXX_COMP_SUPPORTS="no"
49466  fi
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49481$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49482  supports=no
49483  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49484
49485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49486$as_echo "$supports" >&6; }
49487  if test "x$supports" = "xyes" ; then
49488    :
49489
49490  else
49491    :
49492    STACK_PROTECTOR_CFLAG=""
49493  fi
49494
49495
49496
49497
49498
49499
49500
49501      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49502      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49503      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49504        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49505      fi
49506      ;;
49507    esac
49508  fi
49509
49510  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49511    if test "x$DEBUG_LEVEL" != xrelease; then
49512      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49513        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49514      fi
49515    fi
49516  fi
49517
49518  # Optimization levels
49519  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49520    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49521
49522    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49523      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49524      C_O_FLAG_HIGHEST_JVM="-xO4"
49525      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49526      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49527      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49528      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49529      C_O_FLAG_DEBUG_JVM=""
49530      C_O_FLAG_NONE="-xregs=no%frameptr"
49531      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49532      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49533      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49534      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49535      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49536      CXX_O_FLAG_DEBUG_JVM=""
49537      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49538      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49539        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49540        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49541      fi
49542    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49543      C_O_FLAG_HIGHEST_JVM="-xO4"
49544      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49545      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49546      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49547      C_O_FLAG_DEBUG=""
49548      C_O_FLAG_DEBUG_JVM=""
49549      C_O_FLAG_NONE=""
49550      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49551      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49552      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49553      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49554      CXX_O_FLAG_DEBUG=""
49555      CXX_O_FLAG_DEBUG_JVM=""
49556      CXX_O_FLAG_NONE=""
49557    fi
49558  else
49559    # The remaining toolchains share opt flags between CC and CXX;
49560    # setup for C and duplicate afterwards.
49561    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49562      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49563        # On MacOSX we optimize for size, something
49564        # we should do for all platforms?
49565        C_O_FLAG_HIGHEST_JVM="-Os"
49566        C_O_FLAG_HIGHEST="-Os"
49567        C_O_FLAG_HI="-Os"
49568        C_O_FLAG_NORM="-Os"
49569        C_O_FLAG_SIZE="-Os"
49570      else
49571        C_O_FLAG_HIGHEST_JVM="-O3"
49572        C_O_FLAG_HIGHEST="-O3"
49573        C_O_FLAG_HI="-O3"
49574        C_O_FLAG_NORM="-O2"
49575        C_O_FLAG_SIZE="-Os"
49576      fi
49577      C_O_FLAG_DEBUG="-O0"
49578      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49579        C_O_FLAG_DEBUG_JVM=""
49580      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49581        C_O_FLAG_DEBUG_JVM="-O0"
49582      fi
49583      C_O_FLAG_NONE="-O0"
49584    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49585      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49586        # On MacOSX we optimize for size, something
49587        # we should do for all platforms?
49588        C_O_FLAG_HIGHEST_JVM="-Os"
49589        C_O_FLAG_HIGHEST="-Os"
49590        C_O_FLAG_HI="-Os"
49591        C_O_FLAG_NORM="-Os"
49592        C_O_FLAG_SIZE="-Os"
49593      else
49594        C_O_FLAG_HIGHEST_JVM="-O3"
49595        C_O_FLAG_HIGHEST="-O3"
49596        C_O_FLAG_HI="-O3"
49597        C_O_FLAG_NORM="-O2"
49598        C_O_FLAG_SIZE="-Os"
49599      fi
49600      C_O_FLAG_DEBUG="-O0"
49601      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49602        C_O_FLAG_DEBUG_JVM=""
49603      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49604        C_O_FLAG_DEBUG_JVM="-O0"
49605      fi
49606      C_O_FLAG_NONE="-O0"
49607    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49608      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49609      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49610      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49611      C_O_FLAG_NORM="-O2"
49612      C_O_FLAG_DEBUG="-qnoopt"
49613      # FIXME: Value below not verified.
49614      C_O_FLAG_DEBUG_JVM=""
49615      C_O_FLAG_NONE="-qnoopt"
49616    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49617      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49618      C_O_FLAG_HIGHEST="-O2"
49619      C_O_FLAG_HI="-O1"
49620      C_O_FLAG_NORM="-O1"
49621      C_O_FLAG_DEBUG="-Od"
49622      C_O_FLAG_DEBUG_JVM=""
49623      C_O_FLAG_NONE="-Od"
49624      C_O_FLAG_SIZE="-Os"
49625    fi
49626    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49627    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49628    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49629    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49630    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49631    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49632    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49633    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49634  fi
49635
49636  # Adjust optimization flags according to debug level.
49637  case $DEBUG_LEVEL in
49638    release )
49639      # no adjustment
49640      ;;
49641    fastdebug )
49642      # Not quite so much optimization
49643      C_O_FLAG_HI="$C_O_FLAG_NORM"
49644      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49645      ;;
49646    slowdebug )
49647      # Disable optimization
49648      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49649      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49650      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49651      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49652      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49653      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49654      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49655      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49656      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49657      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49658      ;;
49659  esac
49660
49661
49662
49663
49664
49665
49666
49667
49668
49669
49670
49671
49672
49673
49674
49675
49676
49677
49678
49679  # Special extras...
49680  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49681    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49682      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49683      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49684    fi
49685    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49686    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49687  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49688    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49689    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49690  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49691    CXXSTD_CXXFLAG="-std=gnu++98"
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734    # Execute function body
49735
49736  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49737$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49738  supports=yes
49739
49740  saved_cxxflags="$CXXFLAGS"
49741  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49742  ac_ext=cpp
49743ac_cpp='$CXXCPP $CPPFLAGS'
49744ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49745ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49746ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49747
49748  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49749/* end confdefs.h.  */
49750int i;
49751_ACEOF
49752if ac_fn_cxx_try_compile "$LINENO"; then :
49753
49754else
49755  supports=no
49756fi
49757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49758  ac_ext=cpp
49759ac_cpp='$CXXCPP $CPPFLAGS'
49760ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49761ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49762ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49763
49764  CXXFLAGS="$saved_cxxflags"
49765
49766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49767$as_echo "$supports" >&6; }
49768  if test "x$supports" = "xyes" ; then
49769    :
49770
49771  else
49772    :
49773    CXXSTD_CXXFLAG=""
49774  fi
49775
49776
49777
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49788
49789  fi
49790  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49791    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49792    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49793    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49794    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49795    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49796  fi
49797
49798  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49799    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49800    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49801    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49802  fi
49803
49804  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49805  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49806  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49807
49808  ###############################################################################
49809  #
49810  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49811  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49812  #
49813
49814  # Setup compiler/platform specific flags into
49815  #    CFLAGS_JDK    - C Compiler flags
49816  #    CXXFLAGS_JDK  - C++ Compiler flags
49817  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49818  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49819    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49820    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49821    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49822    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49823      # Force compatibility with i586 on 32 bit intel platforms.
49824      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49825      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49826    fi
49827    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49828        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49829    case $OPENJDK_TARGET_CPU_ARCH in
49830      arm )
49831        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49832        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49833        ;;
49834      ppc )
49835        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49836        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49837        ;;
49838      * )
49839        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49840        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49841        ;;
49842    esac
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897    # Execute function body
49898
49899  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49900  REFERENCE_VERSION=6
49901
49902  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49903    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49904  fi
49905
49906  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49907    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49908  fi
49909
49910  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49911  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49912
49913  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49914    :
49915
49916  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49917  # runs afoul of the more aggressive versions of these optimisations.
49918  # Notably, value range propagation now assumes that the this pointer of C++
49919  # member functions is non-null.
49920  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49921
49922
49923
49924
49925
49926
49927
49928
49929
49930
49931
49932
49933
49934
49935
49936
49937
49938
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963    # Execute function body
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012    # Execute function body
50013
50014  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50015$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50016  supports=yes
50017
50018  saved_cflags="$CFLAGS"
50019  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50020  ac_ext=c
50021ac_cpp='$CPP $CPPFLAGS'
50022ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50023ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50024ac_compiler_gnu=$ac_cv_c_compiler_gnu
50025
50026  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50027/* end confdefs.h.  */
50028int i;
50029_ACEOF
50030if ac_fn_c_try_compile "$LINENO"; then :
50031
50032else
50033  supports=no
50034fi
50035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50036  ac_ext=cpp
50037ac_cpp='$CXXCPP $CPPFLAGS'
50038ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50039ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50040ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50041
50042  CFLAGS="$saved_cflags"
50043
50044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50045$as_echo "$supports" >&6; }
50046  if test "x$supports" = "xyes" ; then
50047    :
50048    C_COMP_SUPPORTS="yes"
50049  else
50050    :
50051    C_COMP_SUPPORTS="no"
50052  fi
50053
50054
50055
50056
50057
50058
50059
50060
50061
50062
50063
50064
50065
50066
50067
50068
50069
50070
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112    # Execute function body
50113
50114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50115$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50116  supports=yes
50117
50118  saved_cxxflags="$CXXFLAGS"
50119  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50120  ac_ext=cpp
50121ac_cpp='$CXXCPP $CPPFLAGS'
50122ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50123ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50124ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50125
50126  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50127/* end confdefs.h.  */
50128int i;
50129_ACEOF
50130if ac_fn_cxx_try_compile "$LINENO"; then :
50131
50132else
50133  supports=no
50134fi
50135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50136  ac_ext=cpp
50137ac_cpp='$CXXCPP $CPPFLAGS'
50138ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50139ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50140ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50141
50142  CXXFLAGS="$saved_cxxflags"
50143
50144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50145$as_echo "$supports" >&6; }
50146  if test "x$supports" = "xyes" ; then
50147    :
50148    CXX_COMP_SUPPORTS="yes"
50149  else
50150    :
50151    CXX_COMP_SUPPORTS="no"
50152  fi
50153
50154
50155
50156
50157
50158
50159
50160
50161
50162
50163
50164
50165
50166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50167$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50168  supports=no
50169  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50170
50171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50172$as_echo "$supports" >&6; }
50173  if test "x$supports" = "xyes" ; then
50174    :
50175
50176  else
50177    :
50178    NO_NULL_POINTER_CHECK_CFLAG=""
50179  fi
50180
50181
50182
50183
50184
50185
50186
50187  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50188
50189
50190
50191
50192
50193
50194
50195
50196
50197
50198
50199
50200
50201
50202
50203
50204
50205
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230    # Execute function body
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276
50277
50278
50279    # Execute function body
50280
50281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50282$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50283  supports=yes
50284
50285  saved_cflags="$CFLAGS"
50286  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
50287  ac_ext=c
50288ac_cpp='$CPP $CPPFLAGS'
50289ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50290ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50291ac_compiler_gnu=$ac_cv_c_compiler_gnu
50292
50293  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50294/* end confdefs.h.  */
50295int i;
50296_ACEOF
50297if ac_fn_c_try_compile "$LINENO"; then :
50298
50299else
50300  supports=no
50301fi
50302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50303  ac_ext=cpp
50304ac_cpp='$CXXCPP $CPPFLAGS'
50305ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50306ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50307ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50308
50309  CFLAGS="$saved_cflags"
50310
50311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50312$as_echo "$supports" >&6; }
50313  if test "x$supports" = "xyes" ; then
50314    :
50315    C_COMP_SUPPORTS="yes"
50316  else
50317    :
50318    C_COMP_SUPPORTS="no"
50319  fi
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329
50330
50331
50332
50333
50334
50335
50336
50337
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379    # Execute function body
50380
50381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50382$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50383  supports=yes
50384
50385  saved_cxxflags="$CXXFLAGS"
50386  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
50387  ac_ext=cpp
50388ac_cpp='$CXXCPP $CPPFLAGS'
50389ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50390ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50391ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50392
50393  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50394/* end confdefs.h.  */
50395int i;
50396_ACEOF
50397if ac_fn_cxx_try_compile "$LINENO"; then :
50398
50399else
50400  supports=no
50401fi
50402rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50403  ac_ext=cpp
50404ac_cpp='$CXXCPP $CPPFLAGS'
50405ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50406ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50407ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50408
50409  CXXFLAGS="$saved_cxxflags"
50410
50411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50412$as_echo "$supports" >&6; }
50413  if test "x$supports" = "xyes" ; then
50414    :
50415    CXX_COMP_SUPPORTS="yes"
50416  else
50417    :
50418    CXX_COMP_SUPPORTS="no"
50419  fi
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430
50431
50432
50433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50434$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50435  supports=no
50436  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50437
50438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50439$as_echo "$supports" >&6; }
50440  if test "x$supports" = "xyes" ; then
50441    :
50442
50443  else
50444    :
50445    NO_LIFETIME_DSE_CFLAG=""
50446  fi
50447
50448
50449
50450
50451
50452
50453  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50454
50455
50456
50457  else
50458    :
50459
50460  fi
50461
50462
50463
50464
50465
50466
50467
50468
50469
50470
50471
50472
50473
50474
50475  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50476    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50477
50478    # Restrict the debug information created by Clang to avoid
50479    # too big object files and speed the build up a little bit
50480    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50481    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50482    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50483      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50484        # Force compatibility with i586 on 32 bit intel platforms.
50485        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50486        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50487      fi
50488      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50489      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50490          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50491      case $OPENJDK_TARGET_CPU_ARCH in
50492        ppc )
50493          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50494          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50495          ;;
50496        * )
50497          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50498          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50499          ;;
50500      esac
50501    fi
50502  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50503    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50504    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50505    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50506      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50507    fi
50508
50509    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50510    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50511  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50512    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50513    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50514    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50515  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50516    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50517        -MD -Zc:wchar_t- -W3 -wd4800 \
50518        -DWIN32_LEAN_AND_MEAN \
50519        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50520        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50521        -DWIN32 -DIAL"
50522    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50523      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50524    else
50525      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50526    fi
50527    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50528    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50529    # studio.
50530    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50531      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50532      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50533      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50534    fi
50535  fi
50536
50537  ###############################################################################
50538
50539  # Adjust flags according to debug level.
50540  case $DEBUG_LEVEL in
50541    fastdebug | slowdebug )
50542      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50543      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50544      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50545      ;;
50546    release )
50547      ;;
50548    * )
50549      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50550      ;;
50551  esac
50552
50553  # Set some common defines. These works for all compilers, but assume
50554  # -D is universally accepted.
50555
50556  # Setup endianness
50557  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50558    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50559    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50560    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50561    #   Note: -Dmacro         is the same as    #define macro 1
50562    #         -Dmacro=        is the same as    #define macro
50563    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50564      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50565    else
50566      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50567    fi
50568  else
50569    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50570    # are defined in the system?
50571    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50572      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50573    else
50574      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50575    fi
50576  fi
50577
50578  # Setup target OS define. Use OS target name but in upper case.
50579  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50580  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50581
50582  # Setup target CPU
50583  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50584      $OPENJDK_TARGET_ADD_LP64 \
50585      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50586
50587  # Setup debug/release defines
50588  if test "x$DEBUG_LEVEL" = xrelease; then
50589    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50590    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50591      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50592    fi
50593  else
50594    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50595  fi
50596
50597  # Set some additional per-OS defines.
50598  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50599    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50600    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50601        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50602  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50603    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50604    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50605        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50606  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50607    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50608    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50609    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50610    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50611        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50612        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50613        -fno-omit-frame-pointer"
50614  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50615    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50616    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50617    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50618        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50619        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50620  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50621    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50622  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50623    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50624    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50625  fi
50626
50627  # Set some additional per-CPU defines.
50628  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50629    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50630  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50631    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50632  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50633    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50634      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50635      # fixes `relocation truncated to fit' error for gcc 4.1.
50636      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50637      # Use ppc64 instructions, but schedule for power5
50638      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50639    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50640      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50641    fi
50642  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50643    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50644      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50645      # Little endian machine uses ELFv2 ABI.
50646      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50647      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50648      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50649    fi
50650  fi
50651
50652  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50653    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50654  fi
50655
50656  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50657    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50658      # Solaris does not have _LP64=1 in the old build.
50659      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50660      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50661    fi
50662  fi
50663
50664  # Set JVM_CFLAGS warning handling
50665  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50666    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50667        -Wunused-value -Woverloaded-virtual"
50668
50669    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50670
50671
50672
50673
50674
50675
50676
50677
50678
50679
50680
50681
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724    # Execute function body
50725
50726  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50727  REFERENCE_VERSION=4.8
50728
50729  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50730    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50731  fi
50732
50733  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50734    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50735  fi
50736
50737  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50738  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50739
50740  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50741    :
50742
50743            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50744            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50745
50746
50747  else
50748    :
50749
50750  fi
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765    fi
50766    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50767      # Non-zero builds have stricter warnings
50768      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50769    else
50770      if test "x$TOOLCHAIN_TYPE" = xclang; then
50771        # Some versions of llvm do not like -Wundef
50772        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50773      fi
50774    fi
50775  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50776    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50777        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50778  fi
50779
50780  # Additional macosx handling
50781  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50782    # Setting these parameters makes it an error to link to macosx APIs that are
50783    # newer than the given OS version and makes the linked binaries compatible
50784    # even if built on a newer version of the OS.
50785    # The expected format is X.Y.Z
50786    MACOSX_VERSION_MIN=10.7.0
50787
50788
50789    # The macro takes the version with no dots, ex: 1070
50790    # Let the flags variables get resolved in make for easier override on make
50791    # command line.
50792    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50793    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50794  fi
50795
50796  # Setup some hard coded includes
50797  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50798      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50799      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50800      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50801      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50802      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50803
50804  # The shared libraries are compiled using the picflag.
50805  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50806      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50807  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50808      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50809
50810  # Executable flags
50811  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50812  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50813
50814
50815
50816
50817
50818
50819  # Setup LDFLAGS et al.
50820  #
50821
50822  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50823    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50824    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50825    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50826    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50827      LDFLAGS_SAFESH="-safeseh"
50828      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50829      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50830      # NOTE: Old build added -machine. Probably not needed.
50831      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50832    else
50833      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50834    fi
50835  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50836      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50837      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50838        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50839        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50840    fi
50841  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50842    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50843    # We have previously set HAS_GNU_HASH if this is the case
50844    if test -n "$HAS_GNU_HASH"; then
50845      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50846      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50847      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50848    fi
50849      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50850        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50851    fi
50852    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50853      # And since we now know that the linker is gnu, then add -z defs, to forbid
50854      # undefined symbols in object files.
50855      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50856      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50857      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50858      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50859      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50860      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50861        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50862      fi
50863      case $DEBUG_LEVEL in
50864        release )
50865          # tell linker to optimize libraries.
50866          # Should this be supplied to the OSS linker as well?
50867          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50868          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50869          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50870          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50871            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50872          fi
50873          ;;
50874        slowdebug )
50875          # Hotspot always let the linker optimize
50876          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50877          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50878            # do relocations at load
50879            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50880            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50881            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50882          fi
50883          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50884            # mark relocations read only
50885            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50886            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50887            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50888          fi
50889          ;;
50890        fastdebug )
50891          # Hotspot always let the linker optimize
50892          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50893          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50894            # mark relocations read only
50895            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50896            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50897            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50898          fi
50899          ;;
50900        * )
50901          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50902          ;;
50903        esac
50904    fi
50905  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50906    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50907    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50908    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50909    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50910    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50911    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50912      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50913    fi
50914  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50915    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50916    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50917    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50918  fi
50919
50920  # Customize LDFLAGS for executables
50921
50922  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50923
50924  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50925    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50926      LDFLAGS_STACK_SIZE=1048576
50927    else
50928      LDFLAGS_STACK_SIZE=327680
50929    fi
50930    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50931  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50932    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50933  fi
50934
50935  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50936
50937  # Customize LDFLAGS for libs
50938  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50939
50940  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50941  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50942    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50943        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50944    JDKLIB_LIBS=""
50945  else
50946    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50947        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50948
50949    if test "xTARGET" = "xTARGET"; then
50950    # On some platforms (mac) the linker warns about non existing -L dirs.
50951    # Add server first if available. Linking aginst client does not always produce the same results.
50952      # Only add client/minimal dir if client/minimal is being built.
50953    # Default to server for other variants.
50954      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50955        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50956      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50957        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50958      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50959        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50960    else
50961        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50962    fi
50963    elif test "xTARGET" = "xBUILD"; then
50964      # When building a buildjdk, it's always only the server variant
50965      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50966          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50967    fi
50968
50969    JDKLIB_LIBS="-ljava -ljvm"
50970    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50971      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50972    fi
50973
50974  fi
50975
50976  # Set JVM_LIBS (per os)
50977  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50978    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50979  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50980    # FIXME: This hard-coded path is not really proper.
50981    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50982      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50983    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50984      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50985    fi
50986    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50987        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50988  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50989    JVM_LIBS="$JVM_LIBS -lm"
50990  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50991    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50992  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50993    JVM_LIBS="$JVM_LIBS -lm"
50994  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50995    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50996        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50997        wsock32.lib winmm.lib version.lib psapi.lib"
50998    fi
50999
51000  # Set JVM_ASFLAGS
51001  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51002    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51003      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51004    fi
51005  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51006    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51007  fi
51008
51009  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025  # Special extras...
51026  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51027    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51028      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51029      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51030    fi
51031    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51032    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51033  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51034    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51035    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51036  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51037    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056
51057
51058
51059
51060
51061
51062
51063
51064
51065
51066
51067
51068
51069
51070
51071
51072
51073
51074
51075
51076
51077
51078
51079
51080    # Execute function body
51081
51082  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51083$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51084  supports=yes
51085
51086  saved_cxxflags="$CXXFLAGS"
51087  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51088  ac_ext=cpp
51089ac_cpp='$CXXCPP $CPPFLAGS'
51090ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51091ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51092ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51093
51094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51095/* end confdefs.h.  */
51096int i;
51097_ACEOF
51098if ac_fn_cxx_try_compile "$LINENO"; then :
51099
51100else
51101  supports=no
51102fi
51103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51104  ac_ext=cpp
51105ac_cpp='$CXXCPP $CPPFLAGS'
51106ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51107ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51108ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51109
51110  CXXFLAGS="$saved_cxxflags"
51111
51112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51113$as_echo "$supports" >&6; }
51114  if test "x$supports" = "xyes" ; then
51115    :
51116
51117  else
51118    :
51119    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51120  fi
51121
51122
51123
51124
51125
51126
51127
51128
51129
51130
51131
51132
51133    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51134
51135  fi
51136  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51137    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51138    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51139    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51140    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51141    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51142  fi
51143
51144  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51145    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51146    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51147    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51148  fi
51149
51150  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51151  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51152  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51153
51154  ###############################################################################
51155  #
51156  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51157  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51158  #
51159
51160  # Setup compiler/platform specific flags into
51161  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51162  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51163  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51164  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51165    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51166    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51167    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51168    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51169      # Force compatibility with i586 on 32 bit intel platforms.
51170      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51171      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51172    fi
51173    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51174        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51175    case $OPENJDK_BUILD_CPU_ARCH in
51176      arm )
51177        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51178        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51179        ;;
51180      ppc )
51181        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51182        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51183        ;;
51184      * )
51185        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51186        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51187        ;;
51188    esac
51189
51190
51191
51192
51193
51194
51195
51196
51197
51198
51199
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243    # Execute function body
51244
51245  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51246  REFERENCE_VERSION=6
51247
51248  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51249    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
51250  fi
51251
51252  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51253    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51254  fi
51255
51256  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51257  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51258
51259  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51260    :
51261
51262  else
51263    :
51264
51265  fi
51266
51267
51268
51269
51270
51271
51272
51273
51274
51275
51276
51277
51278
51279
51280  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51281    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51282
51283    # Restrict the debug information created by Clang to avoid
51284    # too big object files and speed the build up a little bit
51285    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51286    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51287    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51288      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51289        # Force compatibility with i586 on 32 bit intel platforms.
51290        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51291        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51292      fi
51293      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51294      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51295          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51296      case $OPENJDK_BUILD_CPU_ARCH in
51297        ppc )
51298          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51299          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51300          ;;
51301        * )
51302          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51303          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51304          ;;
51305      esac
51306    fi
51307  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51308    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51309    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51310    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51311      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51312    fi
51313
51314    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51315    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51316  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51317    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51318    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51319    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51320  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51321    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51322        -MD -Zc:wchar_t- -W3 -wd4800 \
51323        -DWIN32_LEAN_AND_MEAN \
51324        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51325        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51326        -DWIN32 -DIAL"
51327    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51328      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51329    else
51330      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51331    fi
51332    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51333    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51334    # studio.
51335    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51336      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51337      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51338      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51339    fi
51340  fi
51341
51342  ###############################################################################
51343
51344  # Adjust flags according to debug level.
51345  case $DEBUG_LEVEL in
51346    fastdebug | slowdebug )
51347      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51348      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51349      JAVAC_FLAGS="$JAVAC_FLAGS -g"
51350      ;;
51351    release )
51352      ;;
51353    * )
51354      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51355      ;;
51356  esac
51357
51358  # Set some common defines. These works for all compilers, but assume
51359  # -D is universally accepted.
51360
51361  # Setup endianness
51362  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51363    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51364    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51365    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51366    #   Note: -Dmacro         is the same as    #define macro 1
51367    #         -Dmacro=        is the same as    #define macro
51368    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51369      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51370    else
51371      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51372    fi
51373  else
51374    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51375    # are defined in the system?
51376    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51377      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51378    else
51379      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51380    fi
51381  fi
51382
51383  # Setup target OS define. Use OS target name but in upper case.
51384  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51385  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51386
51387  # Setup target CPU
51388  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51389      $OPENJDK_BUILD_ADD_LP64 \
51390      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51391
51392  # Setup debug/release defines
51393  if test "x$DEBUG_LEVEL" = xrelease; then
51394    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51395    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51396      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51397    fi
51398  else
51399    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51400  fi
51401
51402  # Set some additional per-OS defines.
51403  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51404    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51405    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51406        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51407  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51408    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51409    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51410        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
51411  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51412    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51413    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51414    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51415    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51416        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51417        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51418        -fno-omit-frame-pointer"
51419  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51420    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51421    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51422    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51423        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51424        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51425  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51426    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51427  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51428    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51429    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51430  fi
51431
51432  # Set some additional per-CPU defines.
51433  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51434    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51435  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51436    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51437  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51438    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51439      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51440      # fixes `relocation truncated to fit' error for gcc 4.1.
51441      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51442      # Use ppc64 instructions, but schedule for power5
51443      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51444    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51445      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51446    fi
51447  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51448    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51449      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51450      # Little endian machine uses ELFv2 ABI.
51451      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51452      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51453      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51454    fi
51455  fi
51456
51457  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51458    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51459  fi
51460
51461  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51462    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51463      # Solaris does not have _LP64=1 in the old build.
51464      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51465      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51466    fi
51467  fi
51468
51469  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51470  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51471    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51472        -Wunused-value -Woverloaded-virtual"
51473
51474    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51475
51476
51477
51478
51479
51480
51481
51482
51483
51484
51485
51486
51487
51488
51489
51490
51491
51492
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529    # Execute function body
51530
51531  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51532  REFERENCE_VERSION=4.8
51533
51534  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51535    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51536  fi
51537
51538  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51539    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51540  fi
51541
51542  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51543  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51544
51545  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51546    :
51547
51548            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51549            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51550
51551
51552  else
51553    :
51554
51555  fi
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570    fi
51571    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51572      # Non-zero builds have stricter warnings
51573      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51574    else
51575      if test "x$TOOLCHAIN_TYPE" = xclang; then
51576        # Some versions of llvm do not like -Wundef
51577        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51578      fi
51579    fi
51580  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51581    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51582        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51583  fi
51584
51585  # Additional macosx handling
51586  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51587    # Setting these parameters makes it an error to link to macosx APIs that are
51588    # newer than the given OS version and makes the linked binaries compatible
51589    # even if built on a newer version of the OS.
51590    # The expected format is X.Y.Z
51591    MACOSX_VERSION_MIN=10.7.0
51592
51593
51594    # The macro takes the version with no dots, ex: 1070
51595    # Let the flags variables get resolved in make for easier override on make
51596    # command line.
51597    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51598    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51599  fi
51600
51601  # Setup some hard coded includes
51602  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51603      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51604      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51605      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51606      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51607      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51608
51609  # The shared libraries are compiled using the picflag.
51610  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51611      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51612  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51613      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51614
51615  # Executable flags
51616  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51617  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51618
51619
51620
51621
51622
51623
51624  # Setup LDFLAGS et al.
51625  #
51626
51627  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51628    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51629    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51630    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51631    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51632      LDFLAGS_SAFESH="-safeseh"
51633      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51634      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51635      # NOTE: Old build added -machine. Probably not needed.
51636      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51637    else
51638      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51639    fi
51640  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51641      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51642      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51643        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51644        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51645    fi
51646  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51647    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51648    # We have previously set HAS_GNU_HASH if this is the case
51649    if test -n "$HAS_GNU_HASH"; then
51650      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51651      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51652      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51653    fi
51654      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51655        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51656    fi
51657    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51658      # And since we now know that the linker is gnu, then add -z defs, to forbid
51659      # undefined symbols in object files.
51660      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51661      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51662      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51663      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51664      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51665      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51666        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51667      fi
51668      case $DEBUG_LEVEL in
51669        release )
51670          # tell linker to optimize libraries.
51671          # Should this be supplied to the OSS linker as well?
51672          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51673          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51674          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51675          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51676            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51677          fi
51678          ;;
51679        slowdebug )
51680          # Hotspot always let the linker optimize
51681          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51682          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51683            # do relocations at load
51684            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51685            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51686            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51687          fi
51688          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51689            # mark relocations read only
51690            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51691            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51692            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51693          fi
51694          ;;
51695        fastdebug )
51696          # Hotspot always let the linker optimize
51697          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51698          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51699            # mark relocations read only
51700            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51701            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51702            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51703          fi
51704          ;;
51705        * )
51706          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51707          ;;
51708        esac
51709    fi
51710  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51711    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51712    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51713    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51714    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51715    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51716    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51717      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51718    fi
51719  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51720    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51721    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51722    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51723  fi
51724
51725  # Customize LDFLAGS for executables
51726
51727  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51728
51729  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51730    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51731      LDFLAGS_STACK_SIZE=1048576
51732    else
51733      LDFLAGS_STACK_SIZE=327680
51734    fi
51735    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51736  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51737    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51738  fi
51739
51740  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51741
51742  # Customize LDFLAGS for libs
51743  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51744
51745  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51746  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51747    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51748        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51749    OPENJDK_BUILD_JDKLIB_LIBS=""
51750  else
51751    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51752        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51753
51754    if test "xBUILD" = "xTARGET"; then
51755    # On some platforms (mac) the linker warns about non existing -L dirs.
51756    # Add server first if available. Linking aginst client does not always produce the same results.
51757      # Only add client/minimal dir if client/minimal is being built.
51758    # Default to server for other variants.
51759      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51760        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51761      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51762        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51763      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51764        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51765    else
51766        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51767    fi
51768    elif test "xBUILD" = "xBUILD"; then
51769      # When building a buildjdk, it's always only the server variant
51770      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51771          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51772    fi
51773
51774    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51775    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51776      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51777    fi
51778
51779  fi
51780
51781  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51782  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51783    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51784  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51785    # FIXME: This hard-coded path is not really proper.
51786    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51787      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51788    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51789      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51790    fi
51791    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51792        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51793  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51794    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51795  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51796    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51797  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51798    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51799  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51800    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51801        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51802        wsock32.lib winmm.lib version.lib psapi.lib"
51803    fi
51804
51805  # Set OPENJDK_BUILD_JVM_ASFLAGS
51806  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51807    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51808      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51809    fi
51810  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51811    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51812  fi
51813
51814  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830  # Tests are only ever compiled for TARGET
51831  # Flags for compiling test libraries
51832  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51833  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51834
51835  # Flags for compiling test executables
51836  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51837  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51838
51839
51840
51841
51842
51843
51844  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51845  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51846
51847
51848
51849
51850
51851
51852  # Some Zero and Shark settings.
51853  # ZERO_ARCHFLAG tells the compiler which mode to build for
51854  case "${OPENJDK_TARGET_CPU}" in
51855    s390)
51856      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51857      ;;
51858    *)
51859      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51860  esac
51861
51862
51863
51864
51865
51866
51867
51868
51869
51870
51871
51872
51873
51874
51875
51876
51877
51878
51879
51880
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903    # Execute function body
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952    # Execute function body
51953
51954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51955$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51956  supports=yes
51957
51958  saved_cflags="$CFLAGS"
51959  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51960  ac_ext=c
51961ac_cpp='$CPP $CPPFLAGS'
51962ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51963ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51964ac_compiler_gnu=$ac_cv_c_compiler_gnu
51965
51966  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51967/* end confdefs.h.  */
51968int i;
51969_ACEOF
51970if ac_fn_c_try_compile "$LINENO"; then :
51971
51972else
51973  supports=no
51974fi
51975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51976  ac_ext=cpp
51977ac_cpp='$CXXCPP $CPPFLAGS'
51978ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51979ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51980ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51981
51982  CFLAGS="$saved_cflags"
51983
51984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51985$as_echo "$supports" >&6; }
51986  if test "x$supports" = "xyes" ; then
51987    :
51988    C_COMP_SUPPORTS="yes"
51989  else
51990    :
51991    C_COMP_SUPPORTS="no"
51992  fi
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052    # Execute function body
52053
52054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
52055$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
52056  supports=yes
52057
52058  saved_cxxflags="$CXXFLAGS"
52059  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
52060  ac_ext=cpp
52061ac_cpp='$CXXCPP $CPPFLAGS'
52062ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52063ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52064ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52065
52066  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52067/* end confdefs.h.  */
52068int i;
52069_ACEOF
52070if ac_fn_cxx_try_compile "$LINENO"; then :
52071
52072else
52073  supports=no
52074fi
52075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52076  ac_ext=cpp
52077ac_cpp='$CXXCPP $CPPFLAGS'
52078ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52079ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52080ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52081
52082  CXXFLAGS="$saved_cxxflags"
52083
52084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52085$as_echo "$supports" >&6; }
52086  if test "x$supports" = "xyes" ; then
52087    :
52088    CXX_COMP_SUPPORTS="yes"
52089  else
52090    :
52091    CXX_COMP_SUPPORTS="no"
52092  fi
52093
52094
52095
52096
52097
52098
52099
52100
52101
52102
52103
52104
52105
52106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
52107$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
52108  supports=no
52109  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52110
52111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52112$as_echo "$supports" >&6; }
52113  if test "x$supports" = "xyes" ; then
52114    :
52115
52116  else
52117    :
52118    ZERO_ARCHFLAG=""
52119  fi
52120
52121
52122
52123
52124
52125
52126
52127
52128  # Check that the compiler supports -mX (or -qX on AIX) flags
52129  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177    # Execute function body
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226    # Execute function body
52227
52228  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52229$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52230  supports=yes
52231
52232  saved_cflags="$CFLAGS"
52233  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52234  ac_ext=c
52235ac_cpp='$CPP $CPPFLAGS'
52236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52238ac_compiler_gnu=$ac_cv_c_compiler_gnu
52239
52240  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52241/* end confdefs.h.  */
52242int i;
52243_ACEOF
52244if ac_fn_c_try_compile "$LINENO"; then :
52245
52246else
52247  supports=no
52248fi
52249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52250  ac_ext=cpp
52251ac_cpp='$CXXCPP $CPPFLAGS'
52252ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52253ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52254ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52255
52256  CFLAGS="$saved_cflags"
52257
52258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52259$as_echo "$supports" >&6; }
52260  if test "x$supports" = "xyes" ; then
52261    :
52262    C_COMP_SUPPORTS="yes"
52263  else
52264    :
52265    C_COMP_SUPPORTS="no"
52266  fi
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326    # Execute function body
52327
52328  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52329$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52330  supports=yes
52331
52332  saved_cxxflags="$CXXFLAGS"
52333  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52334  ac_ext=cpp
52335ac_cpp='$CXXCPP $CPPFLAGS'
52336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52339
52340  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52341/* end confdefs.h.  */
52342int i;
52343_ACEOF
52344if ac_fn_cxx_try_compile "$LINENO"; then :
52345
52346else
52347  supports=no
52348fi
52349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52350  ac_ext=cpp
52351ac_cpp='$CXXCPP $CPPFLAGS'
52352ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52353ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52354ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52355
52356  CXXFLAGS="$saved_cxxflags"
52357
52358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52359$as_echo "$supports" >&6; }
52360  if test "x$supports" = "xyes" ; then
52361    :
52362    CXX_COMP_SUPPORTS="yes"
52363  else
52364    :
52365    CXX_COMP_SUPPORTS="no"
52366  fi
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52381$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52382  supports=no
52383  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52384
52385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52386$as_echo "$supports" >&6; }
52387  if test "x$supports" = "xyes" ; then
52388    :
52389    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52390  else
52391    :
52392    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52393  fi
52394
52395
52396
52397
52398
52399
52400
52401
52402  # Check whether --enable-warnings-as-errors was given.
52403if test "${enable_warnings_as_errors+set}" = set; then :
52404  enableval=$enable_warnings_as_errors;
52405fi
52406
52407
52408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52409$as_echo_n "checking if native warnings are errors... " >&6; }
52410  if test "x$enable_warnings_as_errors" = "xyes"; then
52411    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52412$as_echo "yes (explicitely set)" >&6; }
52413    WARNINGS_AS_ERRORS=true
52414  elif test "x$enable_warnings_as_errors" = "xno"; then
52415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52416$as_echo "no" >&6; }
52417    WARNINGS_AS_ERRORS=false
52418  elif test "x$enable_warnings_as_errors" = "x"; then
52419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52420$as_echo "yes (default)" >&6; }
52421    WARNINGS_AS_ERRORS=true
52422  else
52423    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52424  fi
52425
52426  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52427    # Set legacy hotspot variable
52428    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52429  else
52430    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52431  fi
52432
52433
52434
52435
52436  case "${TOOLCHAIN_TYPE}" in
52437    microsoft)
52438      DISABLE_WARNING_PREFIX="-wd"
52439      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52440      ;;
52441    solstudio)
52442      DISABLE_WARNING_PREFIX="-erroff="
52443      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52444      ;;
52445    gcc)
52446      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456
52457
52458
52459
52460
52461
52462
52463
52464
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494    # Execute function body
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543    # Execute function body
52544
52545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52546$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52547  supports=yes
52548
52549  saved_cflags="$CFLAGS"
52550  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52551  ac_ext=c
52552ac_cpp='$CPP $CPPFLAGS'
52553ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52554ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52555ac_compiler_gnu=$ac_cv_c_compiler_gnu
52556
52557  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52558/* end confdefs.h.  */
52559int i;
52560_ACEOF
52561if ac_fn_c_try_compile "$LINENO"; then :
52562
52563else
52564  supports=no
52565fi
52566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52567  ac_ext=cpp
52568ac_cpp='$CXXCPP $CPPFLAGS'
52569ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52570ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52571ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52572
52573  CFLAGS="$saved_cflags"
52574
52575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52576$as_echo "$supports" >&6; }
52577  if test "x$supports" = "xyes" ; then
52578    :
52579    C_COMP_SUPPORTS="yes"
52580  else
52581    :
52582    C_COMP_SUPPORTS="no"
52583  fi
52584
52585
52586
52587
52588
52589
52590
52591
52592
52593
52594
52595
52596
52597
52598
52599
52600
52601
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643    # Execute function body
52644
52645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52646$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52647  supports=yes
52648
52649  saved_cxxflags="$CXXFLAGS"
52650  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52651  ac_ext=cpp
52652ac_cpp='$CXXCPP $CPPFLAGS'
52653ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52654ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52655ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52656
52657  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52658/* end confdefs.h.  */
52659int i;
52660_ACEOF
52661if ac_fn_cxx_try_compile "$LINENO"; then :
52662
52663else
52664  supports=no
52665fi
52666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52667  ac_ext=cpp
52668ac_cpp='$CXXCPP $CPPFLAGS'
52669ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52670ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52671ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52672
52673  CXXFLAGS="$saved_cxxflags"
52674
52675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52676$as_echo "$supports" >&6; }
52677  if test "x$supports" = "xyes" ; then
52678    :
52679    CXX_COMP_SUPPORTS="yes"
52680  else
52681    :
52682    CXX_COMP_SUPPORTS="no"
52683  fi
52684
52685
52686
52687
52688
52689
52690
52691
52692
52693
52694
52695
52696
52697  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52698$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52699  supports=no
52700  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52701
52702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52703$as_echo "$supports" >&6; }
52704  if test "x$supports" = "xyes" ; then
52705    :
52706    GCC_CAN_DISABLE_WARNINGS=true
52707  else
52708    :
52709    GCC_CAN_DISABLE_WARNINGS=false
52710
52711  fi
52712
52713
52714
52715
52716
52717
52718      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52719        DISABLE_WARNING_PREFIX="-Wno-"
52720      else
52721        DISABLE_WARNING_PREFIX=
52722      fi
52723      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52724      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52725      # CFLAGS since any target specific flags will likely not work with the
52726      # build compiler
52727      CC_OLD="$CC"
52728      CXX_OLD="$CXX"
52729      CC="$BUILD_CC"
52730      CXX="$BUILD_CXX"
52731      CFLAGS_OLD="$CFLAGS"
52732      CFLAGS=""
52733
52734
52735
52736
52737
52738
52739
52740
52741
52742
52743
52744
52745
52746
52747
52748
52749
52750
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780    # Execute function body
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829    # Execute function body
52830
52831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52832$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52833  supports=yes
52834
52835  saved_cflags="$CFLAGS"
52836  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52837  ac_ext=c
52838ac_cpp='$CPP $CPPFLAGS'
52839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52841ac_compiler_gnu=$ac_cv_c_compiler_gnu
52842
52843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52844/* end confdefs.h.  */
52845int i;
52846_ACEOF
52847if ac_fn_c_try_compile "$LINENO"; then :
52848
52849else
52850  supports=no
52851fi
52852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52853  ac_ext=cpp
52854ac_cpp='$CXXCPP $CPPFLAGS'
52855ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52856ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52857ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52858
52859  CFLAGS="$saved_cflags"
52860
52861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52862$as_echo "$supports" >&6; }
52863  if test "x$supports" = "xyes" ; then
52864    :
52865    C_COMP_SUPPORTS="yes"
52866  else
52867    :
52868    C_COMP_SUPPORTS="no"
52869  fi
52870
52871
52872
52873
52874
52875
52876
52877
52878
52879
52880
52881
52882
52883
52884
52885
52886
52887
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929    # Execute function body
52930
52931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52932$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52933  supports=yes
52934
52935  saved_cxxflags="$CXXFLAGS"
52936  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52937  ac_ext=cpp
52938ac_cpp='$CXXCPP $CPPFLAGS'
52939ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52940ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52941ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52942
52943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52944/* end confdefs.h.  */
52945int i;
52946_ACEOF
52947if ac_fn_cxx_try_compile "$LINENO"; then :
52948
52949else
52950  supports=no
52951fi
52952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52953  ac_ext=cpp
52954ac_cpp='$CXXCPP $CPPFLAGS'
52955ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52956ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52957ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52958
52959  CXXFLAGS="$saved_cxxflags"
52960
52961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52962$as_echo "$supports" >&6; }
52963  if test "x$supports" = "xyes" ; then
52964    :
52965    CXX_COMP_SUPPORTS="yes"
52966  else
52967    :
52968    CXX_COMP_SUPPORTS="no"
52969  fi
52970
52971
52972
52973
52974
52975
52976
52977
52978
52979
52980
52981
52982
52983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52984$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52985  supports=no
52986  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52987
52988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52989$as_echo "$supports" >&6; }
52990  if test "x$supports" = "xyes" ; then
52991    :
52992    BUILD_CC_CAN_DISABLE_WARNINGS=true
52993  else
52994    :
52995    BUILD_CC_CAN_DISABLE_WARNINGS=false
52996
52997  fi
52998
52999
53000
53001
53002
53003
53004      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53005        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53006      else
53007        BUILD_CC_DISABLE_WARNING_PREFIX=
53008      fi
53009      CC="$CC_OLD"
53010      CXX="$CXX_OLD"
53011      CFLAGS="$CFLAGS_OLD"
53012      ;;
53013    clang)
53014      DISABLE_WARNING_PREFIX="-Wno-"
53015      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53016      ;;
53017    xlc)
53018      DISABLE_WARNING_PREFIX="-qsuppress="
53019      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53020      ;;
53021  esac
53022
53023
53024
53025
53026
53027# Setup debug symbols (need objcopy from the toolchain for that)
53028
53029  #
53030  # NATIVE_DEBUG_SYMBOLS
53031  # This must be done after the toolchain is setup, since we're looking at objcopy.
53032  #
53033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53034$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53035
53036# Check whether --with-native-debug-symbols was given.
53037if test "${with_native_debug_symbols+set}" = set; then :
53038  withval=$with_native_debug_symbols;
53039        if test "x$OPENJDK_TARGET_OS" = xaix; then
53040          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53041            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53042          fi
53043        fi
53044
53045else
53046
53047        if test "x$OPENJDK_TARGET_OS" = xaix; then
53048          # AIX doesn't support 'zipped' so use 'internal' as default
53049          with_native_debug_symbols="internal"
53050        else
53051          if test "x$STATIC_BUILD" = xtrue; then
53052            with_native_debug_symbols="none"
53053          else
53054            with_native_debug_symbols="zipped"
53055          fi
53056        fi
53057
53058fi
53059
53060  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53062$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53063
53064  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53065
53066    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53067      if test "x$OBJCOPY" = x; then
53068        # enabling of enable-debug-symbols and can't find objcopy
53069        # this is an error
53070        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53071      fi
53072    fi
53073
53074    COMPILE_WITH_DEBUG_SYMBOLS=true
53075    COPY_DEBUG_SYMBOLS=true
53076    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53077
53078    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53079    DEBUG_BINARIES=false
53080    STRIP_POLICY=min_strip
53081
53082  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53083    COMPILE_WITH_DEBUG_SYMBOLS=false
53084    COPY_DEBUG_SYMBOLS=false
53085    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53086
53087    DEBUG_BINARIES=false
53088    STRIP_POLICY=no_strip
53089  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53090    COMPILE_WITH_DEBUG_SYMBOLS=true
53091    COPY_DEBUG_SYMBOLS=false
53092    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53093
53094    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
53095    DEBUG_BINARIES=true
53096    STRIP_POLICY=no_strip
53097    STRIP=""
53098
53099  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53100
53101    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53102      if test "x$OBJCOPY" = x; then
53103        # enabling of enable-debug-symbols and can't find objcopy
53104        # this is an error
53105        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53106      fi
53107    fi
53108
53109    COMPILE_WITH_DEBUG_SYMBOLS=true
53110    COPY_DEBUG_SYMBOLS=true
53111    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53112
53113    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53114    DEBUG_BINARIES=false
53115    STRIP_POLICY=min_strip
53116  else
53117    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53118  fi
53119
53120  # --enable-debug-symbols is deprecated.
53121  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53122
53123  # Check whether --enable-debug-symbols was given.
53124if test "${enable_debug_symbols+set}" = set; then :
53125  enableval=$enable_debug_symbols;
53126fi
53127
53128  if test "x$enable_debug_symbols" != x; then
53129    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53130$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53131
53132    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53133      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53134$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53135    fi
53136
53137  fi
53138
53139
53140  # --enable-zip-debug-info is deprecated.
53141  # Please use --with-native-debug-symbols=zipped .
53142
53143  # Check whether --enable-zip-debug-info was given.
53144if test "${enable_zip_debug_info+set}" = set; then :
53145  enableval=$enable_zip_debug_info;
53146fi
53147
53148  if test "x$enable_zip_debug_info" != x; then
53149    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53150$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53151
53152    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53153      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53154$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53155    fi
53156
53157  fi
53158
53159
53160
53161
53162
53163
53164  # Legacy values
53165
53166
53167
53168
53169  # Check whether --enable-native-coverage was given.
53170if test "${enable_native_coverage+set}" = set; then :
53171  enableval=$enable_native_coverage;
53172fi
53173
53174  GCOV_ENABLED="false"
53175  if test "x$enable_native_coverage" = "xyes"; then
53176    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53177      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53178$as_echo_n "checking if native coverage is enabled... " >&6; }
53179      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53180$as_echo "yes" >&6; }
53181      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53182      GCOV_LDFLAGS="-fprofile-arcs"
53183      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
53184      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
53185      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
53186      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53187      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53188      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53189      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53190      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53191      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53192      GCOV_ENABLED="true"
53193    else
53194      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53195    fi
53196  elif test "x$enable_native_coverage" = "xno"; then
53197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53198$as_echo_n "checking if native coverage is enabled... " >&6; }
53199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53200$as_echo "no" >&6; }
53201  elif test "x$enable_native_coverage" != "x"; then
53202    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53203  fi
53204
53205
53206
53207
53208# Need toolchain to setup dtrace
53209
53210  # Test for dtrace dependencies
53211  # Check whether --enable-dtrace was given.
53212if test "${enable_dtrace+set}" = set; then :
53213  enableval=$enable_dtrace;
53214fi
53215
53216
53217  DTRACE_DEP_MISSING=false
53218
53219  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53220$as_echo_n "checking for dtrace tool... " >&6; }
53221  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53223$as_echo "$DTRACE" >&6; }
53224  else
53225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53226$as_echo "not found, cannot build dtrace" >&6; }
53227    DTRACE_DEP_MISSING=true
53228  fi
53229
53230  for ac_header in sys/sdt.h
53231do :
53232  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53233if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53234  cat >>confdefs.h <<_ACEOF
53235#define HAVE_SYS_SDT_H 1
53236_ACEOF
53237 DTRACE_HEADERS_OK=yes
53238else
53239  DTRACE_HEADERS_OK=no
53240fi
53241
53242done
53243
53244  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53245    DTRACE_DEP_MISSING=true
53246  fi
53247
53248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53249$as_echo_n "checking if dtrace should be built... " >&6; }
53250  if test "x$enable_dtrace" = "xyes"; then
53251    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53252      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53253$as_echo "no, missing dependencies" >&6; }
53254
53255  # Print a helpful message on how to acquire the necessary build dependency.
53256  # dtrace is the help tag: freetype, cups, alsa etc
53257  MISSING_DEPENDENCY=dtrace
53258
53259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53260    cygwin_help $MISSING_DEPENDENCY
53261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53262    msys_help $MISSING_DEPENDENCY
53263  else
53264    PKGHANDLER_COMMAND=
53265
53266    case $PKGHANDLER in
53267      apt-get)
53268        apt_help     $MISSING_DEPENDENCY ;;
53269      yum)
53270        yum_help     $MISSING_DEPENDENCY ;;
53271      port)
53272        port_help    $MISSING_DEPENDENCY ;;
53273      pkgutil)
53274        pkgutil_help $MISSING_DEPENDENCY ;;
53275      pkgadd)
53276        pkgadd_help  $MISSING_DEPENDENCY ;;
53277    esac
53278
53279    if test "x$PKGHANDLER_COMMAND" != x; then
53280      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53281    fi
53282  fi
53283
53284      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53285    else
53286      INCLUDE_DTRACE=true
53287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53288$as_echo "yes, forced" >&6; }
53289    fi
53290  elif test "x$enable_dtrace" = "xno"; then
53291    INCLUDE_DTRACE=false
53292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53293$as_echo "no, forced" >&6; }
53294  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53295    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53296      INCLUDE_DTRACE=false
53297      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53298$as_echo "no, missing dependencies" >&6; }
53299    else
53300      INCLUDE_DTRACE=true
53301      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53302$as_echo "yes, dependencies present" >&6; }
53303    fi
53304  else
53305    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53306  fi
53307
53308
53309
53310  # The user can in some cases supply additional jvm features. For the custom
53311  # variant, this defines the entire variant.
53312
53313# Check whether --with-jvm-features was given.
53314if test "${with_jvm_features+set}" = set; then :
53315  withval=$with_jvm_features;
53316fi
53317
53318  if test "x$with_jvm_features" != x; then
53319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
53320$as_echo_n "checking additional JVM features... " >&6; }
53321    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
53322    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
53323$as_echo "$JVM_FEATURES" >&6; }
53324  fi
53325
53326  # Verify that dependencies are met for explicitly set features.
53327  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
53328    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
53329  fi
53330
53331  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
53332    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
53333  fi
53334
53335  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
53336    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
53337  fi
53338
53339  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53340    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
53341  fi
53342
53343  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53344    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
53345  fi
53346
53347  # Turn on additional features based on other parts of configure
53348  if test "x$INCLUDE_DTRACE" = "xtrue"; then
53349    JVM_FEATURES="$JVM_FEATURES dtrace"
53350  else
53351    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
53352      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
53353    fi
53354  fi
53355
53356  if test "x$STATIC_BUILD" = "xtrue"; then
53357    JVM_FEATURES="$JVM_FEATURES static-build"
53358  else
53359    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
53360      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53361    fi
53362  fi
53363
53364  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53365    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53366      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53367    fi
53368  fi
53369
53370  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53371    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53372      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53373    fi
53374  fi
53375
53376  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
53377  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53378      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53379      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53380    JVM_FEATURES_jvmci="jvmci"
53381  else
53382    JVM_FEATURES_jvmci=""
53383  fi
53384
53385  # All variants but minimal (and custom) get these features
53386  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53387
53388  # Enable features depending on variant.
53389  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53390  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
53391  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53392  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
53393  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53394  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53395  JVM_FEATURES_custom="$JVM_FEATURES"
53396
53397
53398
53399
53400
53401
53402
53403
53404
53405  # Used for verification of Makefiles by check-jvm-feature
53406
53407
53408  # We don't support --with-jvm-interpreter anymore, use zero instead.
53409
53410
53411# Check whether --with-jvm-interpreter was given.
53412if test "${with_jvm_interpreter+set}" = set; then :
53413  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53414$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53415fi
53416
53417
53418
53419
53420  # Check whether --enable-hotspot-gtest was given.
53421if test "${enable_hotspot_gtest+set}" = set; then :
53422  enableval=$enable_hotspot_gtest;
53423fi
53424
53425
53426  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53427    GTEST_DIR_EXISTS="true"
53428  else
53429    GTEST_DIR_EXISTS="false"
53430  fi
53431
53432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53433$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53434  if test "x$enable_hotspot_gtest" = "xyes"; then
53435    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53437$as_echo "yes, forced" >&6; }
53438      BUILD_GTEST="true"
53439    else
53440      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53441    fi
53442  elif test "x$enable_hotspot_gtest" = "xno"; then
53443    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53444$as_echo "no, forced" >&6; }
53445    BUILD_GTEST="false"
53446  elif test "x$enable_hotspot_gtest" = "x"; then
53447    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
53448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53449$as_echo "yes" >&6; }
53450      BUILD_GTEST="true"
53451    else
53452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53453$as_echo "no" >&6; }
53454      BUILD_GTEST="false"
53455    fi
53456  else
53457    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53458  fi
53459
53460
53461
53462
53463###############################################################################
53464#
53465# Check dependencies for external and internal libraries.
53466#
53467###############################################################################
53468
53469# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53470
53471  # When using cygwin or msys, we need a wrapper binary that renames
53472  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53473  # @files and rewrites these too! This wrapper binary is
53474  # called fixpath.
53475  FIXPATH=
53476  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53478$as_echo_n "checking if fixpath can be created... " >&6; }
53479    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53480    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53481    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53482    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53483      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53484      FIXPATH="$FIXPATH_BIN -c"
53485    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53486      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53487      # @ was chosen as separator to minimize risk of other tools messing around with it
53488      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53489          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53490      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53491      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53492    fi
53493    FIXPATH_SRC_W="$FIXPATH_SRC"
53494    FIXPATH_BIN_W="$FIXPATH_BIN"
53495
53496  unix_path="$FIXPATH_SRC_W"
53497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53498    windows_path=`$CYGPATH -m "$unix_path"`
53499    FIXPATH_SRC_W="$windows_path"
53500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53501    windows_path=`cmd //c echo $unix_path`
53502    FIXPATH_SRC_W="$windows_path"
53503  fi
53504
53505
53506  unix_path="$FIXPATH_BIN_W"
53507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53508    windows_path=`$CYGPATH -m "$unix_path"`
53509    FIXPATH_BIN_W="$windows_path"
53510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53511    windows_path=`cmd //c echo $unix_path`
53512    FIXPATH_BIN_W="$windows_path"
53513  fi
53514
53515    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53516    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53517    cd $FIXPATH_DIR
53518    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53519    cd $CURDIR
53520
53521    if test ! -x $FIXPATH_BIN; then
53522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53523$as_echo "no" >&6; }
53524      cat $FIXPATH_DIR/fixpath1.log
53525      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53526    fi
53527    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53528$as_echo "yes" >&6; }
53529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53530$as_echo_n "checking if fixpath.exe works... " >&6; }
53531    cd $FIXPATH_DIR
53532    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53533        > $FIXPATH_DIR/fixpath2.log 2>&1
53534    cd $CURDIR
53535    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53537$as_echo "no" >&6; }
53538      cat $FIXPATH_DIR/fixpath2.log
53539      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53540    fi
53541    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53542$as_echo "yes" >&6; }
53543
53544    FIXPATH_DETACH_FLAG="--detach"
53545  fi
53546
53547
53548
53549
53550
53551
53552  # Check if X11 is needed
53553  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53554    # No X11 support on windows or macosx
53555    NEEDS_LIB_X11=false
53556  else
53557    if test "x$SUPPORT_HEADFUL" = xno; then
53558      # No X11 support if building headless-only
53559      NEEDS_LIB_X11=false
53560    else
53561      # All other instances need X11
53562      NEEDS_LIB_X11=true
53563    fi
53564  fi
53565
53566  # Check if cups is needed
53567  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53568    # Windows have a separate print system
53569    NEEDS_LIB_CUPS=false
53570  else
53571    NEEDS_LIB_CUPS=true
53572  fi
53573
53574  # A custom hook may have set this already
53575  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53576    NEEDS_LIB_FREETYPE=true
53577  fi
53578
53579  # Check if alsa is needed
53580  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53581    NEEDS_LIB_ALSA=true
53582  else
53583    NEEDS_LIB_ALSA=false
53584  fi
53585
53586  # Check if ffi is needed
53587  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53588    NEEDS_LIB_FFI=true
53589  else
53590    NEEDS_LIB_FFI=false
53591  fi
53592
53593
53594  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53595  # dynamic build is configured on command line.
53596
53597# Check whether --with-stdc++lib was given.
53598if test "${with_stdc__lib+set}" = set; then :
53599  withval=$with_stdc__lib;
53600        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53601                && test "x$with_stdc__lib" != xdefault; then
53602          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53603        fi
53604
53605else
53606  with_stdc__lib=default
53607
53608fi
53609
53610
53611  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53612    # Test if -lstdc++ works.
53613    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53614$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53615    ac_ext=cpp
53616ac_cpp='$CXXCPP $CPPFLAGS'
53617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53620
53621    OLD_CXXFLAGS="$CXXFLAGS"
53622    CXXFLAGS="$CXXFLAGS -lstdc++"
53623    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53624/* end confdefs.h.  */
53625
53626int
53627main ()
53628{
53629return 0;
53630  ;
53631  return 0;
53632}
53633_ACEOF
53634if ac_fn_cxx_try_link "$LINENO"; then :
53635  has_dynamic_libstdcxx=yes
53636else
53637  has_dynamic_libstdcxx=no
53638fi
53639rm -f core conftest.err conftest.$ac_objext \
53640    conftest$ac_exeext conftest.$ac_ext
53641    CXXFLAGS="$OLD_CXXFLAGS"
53642    ac_ext=cpp
53643ac_cpp='$CXXCPP $CPPFLAGS'
53644ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53645ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53646ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53647
53648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53649$as_echo "$has_dynamic_libstdcxx" >&6; }
53650
53651    # Test if stdc++ can be linked statically.
53652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53653$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53654    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53655    ac_ext=cpp
53656ac_cpp='$CXXCPP $CPPFLAGS'
53657ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53658ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53659ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53660
53661    OLD_LIBS="$LIBS"
53662    OLD_CXX="$CXX"
53663    LIBS="$STATIC_STDCXX_FLAGS"
53664    CXX="$CC"
53665    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53666/* end confdefs.h.  */
53667
53668int
53669main ()
53670{
53671return 0;
53672  ;
53673  return 0;
53674}
53675_ACEOF
53676if ac_fn_cxx_try_link "$LINENO"; then :
53677  has_static_libstdcxx=yes
53678else
53679  has_static_libstdcxx=no
53680fi
53681rm -f core conftest.err conftest.$ac_objext \
53682    conftest$ac_exeext conftest.$ac_ext
53683    LIBS="$OLD_LIBS"
53684    CXX="$OLD_CXX"
53685    ac_ext=cpp
53686ac_cpp='$CXXCPP $CPPFLAGS'
53687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53690
53691    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53692$as_echo "$has_static_libstdcxx" >&6; }
53693
53694    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53695      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53696    fi
53697
53698    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53699      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53700    fi
53701
53702    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53703      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53704    fi
53705
53706    # If dynamic was requested, it's available since it would fail above otherwise.
53707    # If dynamic wasn't requested, go with static unless it isn't available.
53708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53709$as_echo_n "checking how to link with libstdc++... " >&6; }
53710    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53711      LIBCXX="$LIBCXX -lstdc++"
53712      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53713      JVM_LIBS="-lstdc++ $JVM_LIBS"
53714      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53715      # just use the same setting as for the TARGET toolchain.
53716      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53717      LDCXX="$CXX"
53718      STATIC_CXX_SETTING="STATIC_CXX=false"
53719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53720$as_echo "dynamic" >&6; }
53721    else
53722      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53723      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53724      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53725      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53726      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53727      # just use the same setting as for the TARGET toolchain.
53728      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53729      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53730      LDCXX="$CC"
53731      STATIC_CXX_SETTING="STATIC_CXX=true"
53732      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53733$as_echo "static" >&6; }
53734    fi
53735  fi
53736
53737
53738  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53739  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53740    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53741  fi
53742
53743  # TODO better (platform agnostic) test
53744  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53745    LIBCXX="-lstdc++"
53746  fi
53747
53748
53749  # Setup Windows runtime dlls
53750  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53751
53752
53753# Check whether --with-msvcr-dll was given.
53754if test "${with_msvcr_dll+set}" = set; then :
53755  withval=$with_msvcr_dll;
53756fi
53757
53758
53759  if test "x$with_msvcr_dll" != x; then
53760    # If given explicitely by user, do not probe. If not present, fail directly.
53761
53762  DLL_NAME="$MSVCR_NAME"
53763  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53764  METHOD="--with-msvcr-dll"
53765  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53766    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53767$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53768
53769    # Need to check if the found msvcr is correct architecture
53770    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53771$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53772    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53774      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53775      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53776      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53777        CORRECT_MSVCR_ARCH="PE32 executable"
53778      else
53779        CORRECT_MSVCR_ARCH="PE32+ executable"
53780      fi
53781    else
53782      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53783        CORRECT_MSVCR_ARCH=386
53784      else
53785        CORRECT_MSVCR_ARCH=x86-64
53786      fi
53787    fi
53788    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53789      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53790$as_echo "ok" >&6; }
53791      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53792
53793  # Only process if variable expands to non-empty
53794
53795  if test "x$MSVC_DLL" != x; then
53796    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53797
53798  # Input might be given as Windows format, start by converting to
53799  # unix format.
53800  path="$MSVC_DLL"
53801  new_path=`$CYGPATH -u "$path"`
53802
53803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53806  # "foo.exe" is OK but "foo" is an error.
53807  #
53808  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53809  # It is also a way to make sure we got the proper file name for the real test later on.
53810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53811  if test "x$test_shortpath" = x; then
53812    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53813$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53814    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53815  fi
53816
53817  # Call helper function which possibly converts this using DOS-style short mode.
53818  # If so, the updated path is stored in $new_path.
53819
53820  input_path="$new_path"
53821  # Check if we need to convert this using DOS-style short mode. If the path
53822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53823  # take no chances and rewrite it.
53824  # Note: m4 eats our [], so we need to use [ and ] instead.
53825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53826  if test "x$has_forbidden_chars" != x; then
53827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53831      # Going to short mode and back again did indeed matter. Since short mode is
53832      # case insensitive, let's make it lowercase to improve readability.
53833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53834      # Now convert it back to Unix-style (cygpath)
53835      input_path=`$CYGPATH -u "$shortmode_path"`
53836      new_path="$input_path"
53837    fi
53838  fi
53839
53840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53841  if test "x$test_cygdrive_prefix" = x; then
53842    # As a simple fix, exclude /usr/bin since it's not a real path.
53843    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53845      # a path prefixed by /cygdrive for fixpath to work.
53846      new_path="$CYGWIN_ROOT_PATH$input_path"
53847    fi
53848  fi
53849
53850
53851  if test "x$path" != "x$new_path"; then
53852    MSVC_DLL="$new_path"
53853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53854$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53855  fi
53856
53857    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53858
53859  path="$MSVC_DLL"
53860  has_colon=`$ECHO $path | $GREP ^.:`
53861  new_path="$path"
53862  if test "x$has_colon" = x; then
53863    # Not in mixed or Windows style, start by that.
53864    new_path=`cmd //c echo $path`
53865  fi
53866
53867
53868  input_path="$new_path"
53869  # Check if we need to convert this using DOS-style short mode. If the path
53870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53871  # take no chances and rewrite it.
53872  # Note: m4 eats our [], so we need to use [ and ] instead.
53873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53874  if test "x$has_forbidden_chars" != x; then
53875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53876    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53877  fi
53878
53879
53880  windows_path="$new_path"
53881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53882    unix_path=`$CYGPATH -u "$windows_path"`
53883    new_path="$unix_path"
53884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53886    new_path="$unix_path"
53887  fi
53888
53889  if test "x$path" != "x$new_path"; then
53890    MSVC_DLL="$new_path"
53891    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53892$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53893  fi
53894
53895  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53896  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53897
53898    else
53899      # We're on a unix platform. Hooray! :)
53900      path="$MSVC_DLL"
53901      has_space=`$ECHO "$path" | $GREP " "`
53902      if test "x$has_space" != x; then
53903        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53904$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53905        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53906      fi
53907
53908      # Use eval to expand a potential ~
53909      eval path="$path"
53910      if test ! -f "$path" && test ! -d "$path"; then
53911        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53912      fi
53913
53914      if test -d "$path"; then
53915        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53916      else
53917        dir="`$DIRNAME "$path"`"
53918        base="`$BASENAME "$path"`"
53919        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53920      fi
53921    fi
53922  fi
53923
53924      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53925$as_echo_n "checking for $DLL_NAME... " >&6; }
53926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53927$as_echo "$MSVC_DLL" >&6; }
53928    else
53929      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53930$as_echo "incorrect, ignoring" >&6; }
53931      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53932$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53933    fi
53934  fi
53935
53936    if test "x$MSVC_DLL" = x; then
53937      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53938    fi
53939    MSVCR_DLL="$MSVC_DLL"
53940  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53941
53942  DLL_NAME="$MSVCR_NAME"
53943  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53944  METHOD="devkit"
53945  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53946    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53947$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53948
53949    # Need to check if the found msvcr is correct architecture
53950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53951$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53952    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53953    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53954      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53955      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53956      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53957        CORRECT_MSVCR_ARCH="PE32 executable"
53958      else
53959        CORRECT_MSVCR_ARCH="PE32+ executable"
53960      fi
53961    else
53962      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53963        CORRECT_MSVCR_ARCH=386
53964      else
53965        CORRECT_MSVCR_ARCH=x86-64
53966      fi
53967    fi
53968    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53970$as_echo "ok" >&6; }
53971      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53972
53973  # Only process if variable expands to non-empty
53974
53975  if test "x$MSVC_DLL" != x; then
53976    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53977
53978  # Input might be given as Windows format, start by converting to
53979  # unix format.
53980  path="$MSVC_DLL"
53981  new_path=`$CYGPATH -u "$path"`
53982
53983  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53984  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53985  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53986  # "foo.exe" is OK but "foo" is an error.
53987  #
53988  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53989  # It is also a way to make sure we got the proper file name for the real test later on.
53990  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53991  if test "x$test_shortpath" = x; then
53992    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53993$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53994    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53995  fi
53996
53997  # Call helper function which possibly converts this using DOS-style short mode.
53998  # If so, the updated path is stored in $new_path.
53999
54000  input_path="$new_path"
54001  # Check if we need to convert this using DOS-style short mode. If the path
54002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54003  # take no chances and rewrite it.
54004  # Note: m4 eats our [], so we need to use [ and ] instead.
54005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54006  if test "x$has_forbidden_chars" != x; then
54007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54008    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54009    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54010    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54011      # Going to short mode and back again did indeed matter. Since short mode is
54012      # case insensitive, let's make it lowercase to improve readability.
54013      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54014      # Now convert it back to Unix-style (cygpath)
54015      input_path=`$CYGPATH -u "$shortmode_path"`
54016      new_path="$input_path"
54017    fi
54018  fi
54019
54020  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54021  if test "x$test_cygdrive_prefix" = x; then
54022    # As a simple fix, exclude /usr/bin since it's not a real path.
54023    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54024      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54025      # a path prefixed by /cygdrive for fixpath to work.
54026      new_path="$CYGWIN_ROOT_PATH$input_path"
54027    fi
54028  fi
54029
54030
54031  if test "x$path" != "x$new_path"; then
54032    MSVC_DLL="$new_path"
54033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54034$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54035  fi
54036
54037    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54038
54039  path="$MSVC_DLL"
54040  has_colon=`$ECHO $path | $GREP ^.:`
54041  new_path="$path"
54042  if test "x$has_colon" = x; then
54043    # Not in mixed or Windows style, start by that.
54044    new_path=`cmd //c echo $path`
54045  fi
54046
54047
54048  input_path="$new_path"
54049  # Check if we need to convert this using DOS-style short mode. If the path
54050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54051  # take no chances and rewrite it.
54052  # Note: m4 eats our [], so we need to use [ and ] instead.
54053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54054  if test "x$has_forbidden_chars" != x; then
54055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54057  fi
54058
54059
54060  windows_path="$new_path"
54061  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54062    unix_path=`$CYGPATH -u "$windows_path"`
54063    new_path="$unix_path"
54064  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54065    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54066    new_path="$unix_path"
54067  fi
54068
54069  if test "x$path" != "x$new_path"; then
54070    MSVC_DLL="$new_path"
54071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54072$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54073  fi
54074
54075  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54076  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54077
54078    else
54079      # We're on a unix platform. Hooray! :)
54080      path="$MSVC_DLL"
54081      has_space=`$ECHO "$path" | $GREP " "`
54082      if test "x$has_space" != x; then
54083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54084$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54085        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54086      fi
54087
54088      # Use eval to expand a potential ~
54089      eval path="$path"
54090      if test ! -f "$path" && test ! -d "$path"; then
54091        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54092      fi
54093
54094      if test -d "$path"; then
54095        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54096      else
54097        dir="`$DIRNAME "$path"`"
54098        base="`$BASENAME "$path"`"
54099        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54100      fi
54101    fi
54102  fi
54103
54104      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54105$as_echo_n "checking for $DLL_NAME... " >&6; }
54106      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54107$as_echo "$MSVC_DLL" >&6; }
54108    else
54109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54110$as_echo "incorrect, ignoring" >&6; }
54111      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54112$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54113    fi
54114  fi
54115
54116    if test "x$MSVC_DLL" = x; then
54117      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54118    fi
54119    MSVCR_DLL="$MSVC_DLL"
54120  else
54121
54122  DLL_NAME="${MSVCR_NAME}"
54123  MSVC_DLL=
54124
54125  if test "x$MSVC_DLL" = x; then
54126    # Probe: Using well-known location from Visual Studio 10.0
54127    if test "x$VCINSTALLDIR" != x; then
54128      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54129
54130  windows_path="$CYGWIN_VC_INSTALL_DIR"
54131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54132    unix_path=`$CYGPATH -u "$windows_path"`
54133    CYGWIN_VC_INSTALL_DIR="$unix_path"
54134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54136    CYGWIN_VC_INSTALL_DIR="$unix_path"
54137  fi
54138
54139      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54140        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54141      else
54142        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54143      fi
54144      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54145
54146  DLL_NAME="$DLL_NAME"
54147  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54148  METHOD="well-known location in VCINSTALLDIR"
54149  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54150    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54151$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54152
54153    # Need to check if the found msvcr is correct architecture
54154    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54155$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54156    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54157    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54158      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54159      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54160      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54161        CORRECT_MSVCR_ARCH="PE32 executable"
54162      else
54163        CORRECT_MSVCR_ARCH="PE32+ executable"
54164      fi
54165    else
54166      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54167        CORRECT_MSVCR_ARCH=386
54168      else
54169        CORRECT_MSVCR_ARCH=x86-64
54170      fi
54171    fi
54172    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54174$as_echo "ok" >&6; }
54175      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54176
54177  # Only process if variable expands to non-empty
54178
54179  if test "x$MSVC_DLL" != x; then
54180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54181
54182  # Input might be given as Windows format, start by converting to
54183  # unix format.
54184  path="$MSVC_DLL"
54185  new_path=`$CYGPATH -u "$path"`
54186
54187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54190  # "foo.exe" is OK but "foo" is an error.
54191  #
54192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54193  # It is also a way to make sure we got the proper file name for the real test later on.
54194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54195  if test "x$test_shortpath" = x; then
54196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54197$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54198    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54199  fi
54200
54201  # Call helper function which possibly converts this using DOS-style short mode.
54202  # If so, the updated path is stored in $new_path.
54203
54204  input_path="$new_path"
54205  # Check if we need to convert this using DOS-style short mode. If the path
54206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54207  # take no chances and rewrite it.
54208  # Note: m4 eats our [], so we need to use [ and ] instead.
54209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54210  if test "x$has_forbidden_chars" != x; then
54211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54215      # Going to short mode and back again did indeed matter. Since short mode is
54216      # case insensitive, let's make it lowercase to improve readability.
54217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54218      # Now convert it back to Unix-style (cygpath)
54219      input_path=`$CYGPATH -u "$shortmode_path"`
54220      new_path="$input_path"
54221    fi
54222  fi
54223
54224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54225  if test "x$test_cygdrive_prefix" = x; then
54226    # As a simple fix, exclude /usr/bin since it's not a real path.
54227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54229      # a path prefixed by /cygdrive for fixpath to work.
54230      new_path="$CYGWIN_ROOT_PATH$input_path"
54231    fi
54232  fi
54233
54234
54235  if test "x$path" != "x$new_path"; then
54236    MSVC_DLL="$new_path"
54237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54238$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54239  fi
54240
54241    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54242
54243  path="$MSVC_DLL"
54244  has_colon=`$ECHO $path | $GREP ^.:`
54245  new_path="$path"
54246  if test "x$has_colon" = x; then
54247    # Not in mixed or Windows style, start by that.
54248    new_path=`cmd //c echo $path`
54249  fi
54250
54251
54252  input_path="$new_path"
54253  # Check if we need to convert this using DOS-style short mode. If the path
54254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54255  # take no chances and rewrite it.
54256  # Note: m4 eats our [], so we need to use [ and ] instead.
54257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54258  if test "x$has_forbidden_chars" != x; then
54259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54261  fi
54262
54263
54264  windows_path="$new_path"
54265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54266    unix_path=`$CYGPATH -u "$windows_path"`
54267    new_path="$unix_path"
54268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54270    new_path="$unix_path"
54271  fi
54272
54273  if test "x$path" != "x$new_path"; then
54274    MSVC_DLL="$new_path"
54275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54276$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54277  fi
54278
54279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54281
54282    else
54283      # We're on a unix platform. Hooray! :)
54284      path="$MSVC_DLL"
54285      has_space=`$ECHO "$path" | $GREP " "`
54286      if test "x$has_space" != x; then
54287        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54288$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54289        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54290      fi
54291
54292      # Use eval to expand a potential ~
54293      eval path="$path"
54294      if test ! -f "$path" && test ! -d "$path"; then
54295        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54296      fi
54297
54298      if test -d "$path"; then
54299        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54300      else
54301        dir="`$DIRNAME "$path"`"
54302        base="`$BASENAME "$path"`"
54303        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54304      fi
54305    fi
54306  fi
54307
54308      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54309$as_echo_n "checking for $DLL_NAME... " >&6; }
54310      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54311$as_echo "$MSVC_DLL" >&6; }
54312    else
54313      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54314$as_echo "incorrect, ignoring" >&6; }
54315      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54316$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54317    fi
54318  fi
54319
54320    fi
54321  fi
54322
54323  if test "x$MSVC_DLL" = x; then
54324    # Probe: Check in the Boot JDK directory.
54325    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54326
54327  DLL_NAME="$DLL_NAME"
54328  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54329  METHOD="well-known location in Boot JDK"
54330  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54332$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54333
54334    # Need to check if the found msvcr is correct architecture
54335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54336$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54337    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54339      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54340      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54341      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54342        CORRECT_MSVCR_ARCH="PE32 executable"
54343      else
54344        CORRECT_MSVCR_ARCH="PE32+ executable"
54345      fi
54346    else
54347      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54348        CORRECT_MSVCR_ARCH=386
54349      else
54350        CORRECT_MSVCR_ARCH=x86-64
54351      fi
54352    fi
54353    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54355$as_echo "ok" >&6; }
54356      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54357
54358  # Only process if variable expands to non-empty
54359
54360  if test "x$MSVC_DLL" != x; then
54361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54362
54363  # Input might be given as Windows format, start by converting to
54364  # unix format.
54365  path="$MSVC_DLL"
54366  new_path=`$CYGPATH -u "$path"`
54367
54368  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54369  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54370  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54371  # "foo.exe" is OK but "foo" is an error.
54372  #
54373  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54374  # It is also a way to make sure we got the proper file name for the real test later on.
54375  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54376  if test "x$test_shortpath" = x; then
54377    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54378$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54379    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54380  fi
54381
54382  # Call helper function which possibly converts this using DOS-style short mode.
54383  # If so, the updated path is stored in $new_path.
54384
54385  input_path="$new_path"
54386  # Check if we need to convert this using DOS-style short mode. If the path
54387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54388  # take no chances and rewrite it.
54389  # Note: m4 eats our [], so we need to use [ and ] instead.
54390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54391  if test "x$has_forbidden_chars" != x; then
54392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54393    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54394    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54395    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54396      # Going to short mode and back again did indeed matter. Since short mode is
54397      # case insensitive, let's make it lowercase to improve readability.
54398      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54399      # Now convert it back to Unix-style (cygpath)
54400      input_path=`$CYGPATH -u "$shortmode_path"`
54401      new_path="$input_path"
54402    fi
54403  fi
54404
54405  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54406  if test "x$test_cygdrive_prefix" = x; then
54407    # As a simple fix, exclude /usr/bin since it's not a real path.
54408    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54409      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54410      # a path prefixed by /cygdrive for fixpath to work.
54411      new_path="$CYGWIN_ROOT_PATH$input_path"
54412    fi
54413  fi
54414
54415
54416  if test "x$path" != "x$new_path"; then
54417    MSVC_DLL="$new_path"
54418    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54419$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54420  fi
54421
54422    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54423
54424  path="$MSVC_DLL"
54425  has_colon=`$ECHO $path | $GREP ^.:`
54426  new_path="$path"
54427  if test "x$has_colon" = x; then
54428    # Not in mixed or Windows style, start by that.
54429    new_path=`cmd //c echo $path`
54430  fi
54431
54432
54433  input_path="$new_path"
54434  # Check if we need to convert this using DOS-style short mode. If the path
54435  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54436  # take no chances and rewrite it.
54437  # Note: m4 eats our [], so we need to use [ and ] instead.
54438  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54439  if test "x$has_forbidden_chars" != x; then
54440    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54441    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54442  fi
54443
54444
54445  windows_path="$new_path"
54446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54447    unix_path=`$CYGPATH -u "$windows_path"`
54448    new_path="$unix_path"
54449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54451    new_path="$unix_path"
54452  fi
54453
54454  if test "x$path" != "x$new_path"; then
54455    MSVC_DLL="$new_path"
54456    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54457$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54458  fi
54459
54460  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54461  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54462
54463    else
54464      # We're on a unix platform. Hooray! :)
54465      path="$MSVC_DLL"
54466      has_space=`$ECHO "$path" | $GREP " "`
54467      if test "x$has_space" != x; then
54468        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54469$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54470        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54471      fi
54472
54473      # Use eval to expand a potential ~
54474      eval path="$path"
54475      if test ! -f "$path" && test ! -d "$path"; then
54476        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54477      fi
54478
54479      if test -d "$path"; then
54480        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54481      else
54482        dir="`$DIRNAME "$path"`"
54483        base="`$BASENAME "$path"`"
54484        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54485      fi
54486    fi
54487  fi
54488
54489      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54490$as_echo_n "checking for $DLL_NAME... " >&6; }
54491      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54492$as_echo "$MSVC_DLL" >&6; }
54493    else
54494      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54495$as_echo "incorrect, ignoring" >&6; }
54496      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54497$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54498    fi
54499  fi
54500
54501  fi
54502
54503  if test "x$MSVC_DLL" = x; then
54504    # Probe: Look in the Windows system32 directory
54505    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54506
54507  windows_path="$CYGWIN_SYSTEMROOT"
54508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54509    unix_path=`$CYGPATH -u "$windows_path"`
54510    CYGWIN_SYSTEMROOT="$unix_path"
54511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54513    CYGWIN_SYSTEMROOT="$unix_path"
54514  fi
54515
54516    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54517
54518  DLL_NAME="$DLL_NAME"
54519  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54520  METHOD="well-known location in SYSTEMROOT"
54521  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54522    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54523$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54524
54525    # Need to check if the found msvcr is correct architecture
54526    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54527$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54528    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54530      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54531      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54532      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54533        CORRECT_MSVCR_ARCH="PE32 executable"
54534      else
54535        CORRECT_MSVCR_ARCH="PE32+ executable"
54536      fi
54537    else
54538      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54539        CORRECT_MSVCR_ARCH=386
54540      else
54541        CORRECT_MSVCR_ARCH=x86-64
54542      fi
54543    fi
54544    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54545      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54546$as_echo "ok" >&6; }
54547      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54548
54549  # Only process if variable expands to non-empty
54550
54551  if test "x$MSVC_DLL" != x; then
54552    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54553
54554  # Input might be given as Windows format, start by converting to
54555  # unix format.
54556  path="$MSVC_DLL"
54557  new_path=`$CYGPATH -u "$path"`
54558
54559  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54560  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54561  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54562  # "foo.exe" is OK but "foo" is an error.
54563  #
54564  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54565  # It is also a way to make sure we got the proper file name for the real test later on.
54566  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54567  if test "x$test_shortpath" = x; then
54568    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54569$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54570    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54571  fi
54572
54573  # Call helper function which possibly converts this using DOS-style short mode.
54574  # If so, the updated path is stored in $new_path.
54575
54576  input_path="$new_path"
54577  # Check if we need to convert this using DOS-style short mode. If the path
54578  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54579  # take no chances and rewrite it.
54580  # Note: m4 eats our [], so we need to use [ and ] instead.
54581  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54582  if test "x$has_forbidden_chars" != x; then
54583    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54584    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54585    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54586    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54587      # Going to short mode and back again did indeed matter. Since short mode is
54588      # case insensitive, let's make it lowercase to improve readability.
54589      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54590      # Now convert it back to Unix-style (cygpath)
54591      input_path=`$CYGPATH -u "$shortmode_path"`
54592      new_path="$input_path"
54593    fi
54594  fi
54595
54596  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54597  if test "x$test_cygdrive_prefix" = x; then
54598    # As a simple fix, exclude /usr/bin since it's not a real path.
54599    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54600      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54601      # a path prefixed by /cygdrive for fixpath to work.
54602      new_path="$CYGWIN_ROOT_PATH$input_path"
54603    fi
54604  fi
54605
54606
54607  if test "x$path" != "x$new_path"; then
54608    MSVC_DLL="$new_path"
54609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54610$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54611  fi
54612
54613    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54614
54615  path="$MSVC_DLL"
54616  has_colon=`$ECHO $path | $GREP ^.:`
54617  new_path="$path"
54618  if test "x$has_colon" = x; then
54619    # Not in mixed or Windows style, start by that.
54620    new_path=`cmd //c echo $path`
54621  fi
54622
54623
54624  input_path="$new_path"
54625  # Check if we need to convert this using DOS-style short mode. If the path
54626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54627  # take no chances and rewrite it.
54628  # Note: m4 eats our [], so we need to use [ and ] instead.
54629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54630  if test "x$has_forbidden_chars" != x; then
54631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54632    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54633  fi
54634
54635
54636  windows_path="$new_path"
54637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54638    unix_path=`$CYGPATH -u "$windows_path"`
54639    new_path="$unix_path"
54640  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54641    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54642    new_path="$unix_path"
54643  fi
54644
54645  if test "x$path" != "x$new_path"; then
54646    MSVC_DLL="$new_path"
54647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54648$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54649  fi
54650
54651  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54652  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54653
54654    else
54655      # We're on a unix platform. Hooray! :)
54656      path="$MSVC_DLL"
54657      has_space=`$ECHO "$path" | $GREP " "`
54658      if test "x$has_space" != x; then
54659        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54660$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54661        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54662      fi
54663
54664      # Use eval to expand a potential ~
54665      eval path="$path"
54666      if test ! -f "$path" && test ! -d "$path"; then
54667        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54668      fi
54669
54670      if test -d "$path"; then
54671        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54672      else
54673        dir="`$DIRNAME "$path"`"
54674        base="`$BASENAME "$path"`"
54675        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54676      fi
54677    fi
54678  fi
54679
54680      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54681$as_echo_n "checking for $DLL_NAME... " >&6; }
54682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54683$as_echo "$MSVC_DLL" >&6; }
54684    else
54685      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54686$as_echo "incorrect, ignoring" >&6; }
54687      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54688$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54689    fi
54690  fi
54691
54692  fi
54693
54694  if test "x$MSVC_DLL" = x; then
54695    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54696    if test "x$VS100COMNTOOLS" != x; then
54697      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54698
54699  windows_path="$CYGWIN_VS_TOOLS_DIR"
54700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54701    unix_path=`$CYGPATH -u "$windows_path"`
54702    CYGWIN_VS_TOOLS_DIR="$unix_path"
54703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54705    CYGWIN_VS_TOOLS_DIR="$unix_path"
54706  fi
54707
54708      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54709        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54710	    | $GREP -i /x64/ | $HEAD --lines 1`
54711      else
54712        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54713	    | $GREP -i /x86/ | $HEAD --lines 1`
54714      fi
54715
54716  DLL_NAME="$DLL_NAME"
54717  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54718  METHOD="search of VS100COMNTOOLS"
54719  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54720    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54721$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54722
54723    # Need to check if the found msvcr is correct architecture
54724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54725$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54726    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54728      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54729      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54730      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54731        CORRECT_MSVCR_ARCH="PE32 executable"
54732      else
54733        CORRECT_MSVCR_ARCH="PE32+ executable"
54734      fi
54735    else
54736      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54737        CORRECT_MSVCR_ARCH=386
54738      else
54739        CORRECT_MSVCR_ARCH=x86-64
54740      fi
54741    fi
54742    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54744$as_echo "ok" >&6; }
54745      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54746
54747  # Only process if variable expands to non-empty
54748
54749  if test "x$MSVC_DLL" != x; then
54750    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54751
54752  # Input might be given as Windows format, start by converting to
54753  # unix format.
54754  path="$MSVC_DLL"
54755  new_path=`$CYGPATH -u "$path"`
54756
54757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54760  # "foo.exe" is OK but "foo" is an error.
54761  #
54762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54763  # It is also a way to make sure we got the proper file name for the real test later on.
54764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54765  if test "x$test_shortpath" = x; then
54766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54767$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54768    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54769  fi
54770
54771  # Call helper function which possibly converts this using DOS-style short mode.
54772  # If so, the updated path is stored in $new_path.
54773
54774  input_path="$new_path"
54775  # Check if we need to convert this using DOS-style short mode. If the path
54776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54777  # take no chances and rewrite it.
54778  # Note: m4 eats our [], so we need to use [ and ] instead.
54779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54780  if test "x$has_forbidden_chars" != x; then
54781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54785      # Going to short mode and back again did indeed matter. Since short mode is
54786      # case insensitive, let's make it lowercase to improve readability.
54787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54788      # Now convert it back to Unix-style (cygpath)
54789      input_path=`$CYGPATH -u "$shortmode_path"`
54790      new_path="$input_path"
54791    fi
54792  fi
54793
54794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54795  if test "x$test_cygdrive_prefix" = x; then
54796    # As a simple fix, exclude /usr/bin since it's not a real path.
54797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54799      # a path prefixed by /cygdrive for fixpath to work.
54800      new_path="$CYGWIN_ROOT_PATH$input_path"
54801    fi
54802  fi
54803
54804
54805  if test "x$path" != "x$new_path"; then
54806    MSVC_DLL="$new_path"
54807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54808$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54809  fi
54810
54811    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54812
54813  path="$MSVC_DLL"
54814  has_colon=`$ECHO $path | $GREP ^.:`
54815  new_path="$path"
54816  if test "x$has_colon" = x; then
54817    # Not in mixed or Windows style, start by that.
54818    new_path=`cmd //c echo $path`
54819  fi
54820
54821
54822  input_path="$new_path"
54823  # Check if we need to convert this using DOS-style short mode. If the path
54824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54825  # take no chances and rewrite it.
54826  # Note: m4 eats our [], so we need to use [ and ] instead.
54827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54828  if test "x$has_forbidden_chars" != x; then
54829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54831  fi
54832
54833
54834  windows_path="$new_path"
54835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54836    unix_path=`$CYGPATH -u "$windows_path"`
54837    new_path="$unix_path"
54838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54840    new_path="$unix_path"
54841  fi
54842
54843  if test "x$path" != "x$new_path"; then
54844    MSVC_DLL="$new_path"
54845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54846$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54847  fi
54848
54849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54851
54852    else
54853      # We're on a unix platform. Hooray! :)
54854      path="$MSVC_DLL"
54855      has_space=`$ECHO "$path" | $GREP " "`
54856      if test "x$has_space" != x; then
54857        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54858$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54859        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54860      fi
54861
54862      # Use eval to expand a potential ~
54863      eval path="$path"
54864      if test ! -f "$path" && test ! -d "$path"; then
54865        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54866      fi
54867
54868      if test -d "$path"; then
54869        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54870      else
54871        dir="`$DIRNAME "$path"`"
54872        base="`$BASENAME "$path"`"
54873        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54874      fi
54875    fi
54876  fi
54877
54878      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54879$as_echo_n "checking for $DLL_NAME... " >&6; }
54880      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54881$as_echo "$MSVC_DLL" >&6; }
54882    else
54883      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54884$as_echo "incorrect, ignoring" >&6; }
54885      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54886$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54887    fi
54888  fi
54889
54890    fi
54891  fi
54892
54893  if test "x$MSVC_DLL" = x; then
54894    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54895    # (This was the original behaviour; kept since it might turn something up)
54896    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54897      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54898        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54899	    | $GREP x64 | $HEAD --lines 1`
54900      else
54901        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54902	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54903        if test "x$POSSIBLE_MSVC_DLL" = x; then
54904          # We're grasping at straws now...
54905          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54906	      | $HEAD --lines 1`
54907        fi
54908      fi
54909
54910
54911  DLL_NAME="$DLL_NAME"
54912  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54913  METHOD="search of VCINSTALLDIR"
54914  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54915    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54916$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54917
54918    # Need to check if the found msvcr is correct architecture
54919    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54920$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54921    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54922    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54923      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54924      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54925      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54926        CORRECT_MSVCR_ARCH="PE32 executable"
54927      else
54928        CORRECT_MSVCR_ARCH="PE32+ executable"
54929      fi
54930    else
54931      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54932        CORRECT_MSVCR_ARCH=386
54933      else
54934        CORRECT_MSVCR_ARCH=x86-64
54935      fi
54936    fi
54937    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54938      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54939$as_echo "ok" >&6; }
54940      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54941
54942  # Only process if variable expands to non-empty
54943
54944  if test "x$MSVC_DLL" != x; then
54945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54946
54947  # Input might be given as Windows format, start by converting to
54948  # unix format.
54949  path="$MSVC_DLL"
54950  new_path=`$CYGPATH -u "$path"`
54951
54952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54955  # "foo.exe" is OK but "foo" is an error.
54956  #
54957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54958  # It is also a way to make sure we got the proper file name for the real test later on.
54959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54960  if test "x$test_shortpath" = x; then
54961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54962$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54963    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54964  fi
54965
54966  # Call helper function which possibly converts this using DOS-style short mode.
54967  # If so, the updated path is stored in $new_path.
54968
54969  input_path="$new_path"
54970  # Check if we need to convert this using DOS-style short mode. If the path
54971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54972  # take no chances and rewrite it.
54973  # Note: m4 eats our [], so we need to use [ and ] instead.
54974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54975  if test "x$has_forbidden_chars" != x; then
54976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54980      # Going to short mode and back again did indeed matter. Since short mode is
54981      # case insensitive, let's make it lowercase to improve readability.
54982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54983      # Now convert it back to Unix-style (cygpath)
54984      input_path=`$CYGPATH -u "$shortmode_path"`
54985      new_path="$input_path"
54986    fi
54987  fi
54988
54989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54990  if test "x$test_cygdrive_prefix" = x; then
54991    # As a simple fix, exclude /usr/bin since it's not a real path.
54992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54994      # a path prefixed by /cygdrive for fixpath to work.
54995      new_path="$CYGWIN_ROOT_PATH$input_path"
54996    fi
54997  fi
54998
54999
55000  if test "x$path" != "x$new_path"; then
55001    MSVC_DLL="$new_path"
55002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55003$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55004  fi
55005
55006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55007
55008  path="$MSVC_DLL"
55009  has_colon=`$ECHO $path | $GREP ^.:`
55010  new_path="$path"
55011  if test "x$has_colon" = x; then
55012    # Not in mixed or Windows style, start by that.
55013    new_path=`cmd //c echo $path`
55014  fi
55015
55016
55017  input_path="$new_path"
55018  # Check if we need to convert this using DOS-style short mode. If the path
55019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55020  # take no chances and rewrite it.
55021  # Note: m4 eats our [], so we need to use [ and ] instead.
55022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55023  if test "x$has_forbidden_chars" != x; then
55024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55026  fi
55027
55028
55029  windows_path="$new_path"
55030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55031    unix_path=`$CYGPATH -u "$windows_path"`
55032    new_path="$unix_path"
55033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55035    new_path="$unix_path"
55036  fi
55037
55038  if test "x$path" != "x$new_path"; then
55039    MSVC_DLL="$new_path"
55040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55041$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55042  fi
55043
55044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55046
55047    else
55048      # We're on a unix platform. Hooray! :)
55049      path="$MSVC_DLL"
55050      has_space=`$ECHO "$path" | $GREP " "`
55051      if test "x$has_space" != x; then
55052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55053$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55055      fi
55056
55057      # Use eval to expand a potential ~
55058      eval path="$path"
55059      if test ! -f "$path" && test ! -d "$path"; then
55060        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55061      fi
55062
55063      if test -d "$path"; then
55064        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55065      else
55066        dir="`$DIRNAME "$path"`"
55067        base="`$BASENAME "$path"`"
55068        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55069      fi
55070    fi
55071  fi
55072
55073      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55074$as_echo_n "checking for $DLL_NAME... " >&6; }
55075      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55076$as_echo "$MSVC_DLL" >&6; }
55077    else
55078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55079$as_echo "incorrect, ignoring" >&6; }
55080      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55081$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55082    fi
55083  fi
55084
55085    fi
55086  fi
55087
55088  if test "x$MSVC_DLL" = x; then
55089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55090$as_echo_n "checking for $DLL_NAME... " >&6; }
55091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55092$as_echo "no" >&6; }
55093    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55094  fi
55095
55096    MSVCR_DLL="$MSVC_DLL"
55097  fi
55098
55099
55100
55101# Check whether --with-msvcp-dll was given.
55102if test "${with_msvcp_dll+set}" = set; then :
55103  withval=$with_msvcp_dll;
55104fi
55105
55106
55107  if test "x$MSVCP_NAME" != "x"; then
55108    if test "x$with_msvcp_dll" != x; then
55109      # If given explicitely by user, do not probe. If not present, fail directly.
55110
55111  DLL_NAME="$MSVCP_NAME"
55112  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55113  METHOD="--with-msvcp-dll"
55114  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55116$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55117
55118    # Need to check if the found msvcr is correct architecture
55119    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55120$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55121    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55122    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55123      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55124      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55125      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55126        CORRECT_MSVCR_ARCH="PE32 executable"
55127      else
55128        CORRECT_MSVCR_ARCH="PE32+ executable"
55129      fi
55130    else
55131      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55132        CORRECT_MSVCR_ARCH=386
55133      else
55134        CORRECT_MSVCR_ARCH=x86-64
55135      fi
55136    fi
55137    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55138      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55139$as_echo "ok" >&6; }
55140      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55141
55142  # Only process if variable expands to non-empty
55143
55144  if test "x$MSVC_DLL" != x; then
55145    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55146
55147  # Input might be given as Windows format, start by converting to
55148  # unix format.
55149  path="$MSVC_DLL"
55150  new_path=`$CYGPATH -u "$path"`
55151
55152  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55153  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55154  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55155  # "foo.exe" is OK but "foo" is an error.
55156  #
55157  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55158  # It is also a way to make sure we got the proper file name for the real test later on.
55159  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55160  if test "x$test_shortpath" = x; then
55161    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55162$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55163    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55164  fi
55165
55166  # Call helper function which possibly converts this using DOS-style short mode.
55167  # If so, the updated path is stored in $new_path.
55168
55169  input_path="$new_path"
55170  # Check if we need to convert this using DOS-style short mode. If the path
55171  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55172  # take no chances and rewrite it.
55173  # Note: m4 eats our [], so we need to use [ and ] instead.
55174  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55175  if test "x$has_forbidden_chars" != x; then
55176    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55177    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55178    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55179    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55180      # Going to short mode and back again did indeed matter. Since short mode is
55181      # case insensitive, let's make it lowercase to improve readability.
55182      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55183      # Now convert it back to Unix-style (cygpath)
55184      input_path=`$CYGPATH -u "$shortmode_path"`
55185      new_path="$input_path"
55186    fi
55187  fi
55188
55189  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55190  if test "x$test_cygdrive_prefix" = x; then
55191    # As a simple fix, exclude /usr/bin since it's not a real path.
55192    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55193      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55194      # a path prefixed by /cygdrive for fixpath to work.
55195      new_path="$CYGWIN_ROOT_PATH$input_path"
55196    fi
55197  fi
55198
55199
55200  if test "x$path" != "x$new_path"; then
55201    MSVC_DLL="$new_path"
55202    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55203$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55204  fi
55205
55206    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55207
55208  path="$MSVC_DLL"
55209  has_colon=`$ECHO $path | $GREP ^.:`
55210  new_path="$path"
55211  if test "x$has_colon" = x; then
55212    # Not in mixed or Windows style, start by that.
55213    new_path=`cmd //c echo $path`
55214  fi
55215
55216
55217  input_path="$new_path"
55218  # Check if we need to convert this using DOS-style short mode. If the path
55219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55220  # take no chances and rewrite it.
55221  # Note: m4 eats our [], so we need to use [ and ] instead.
55222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55223  if test "x$has_forbidden_chars" != x; then
55224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55225    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55226  fi
55227
55228
55229  windows_path="$new_path"
55230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55231    unix_path=`$CYGPATH -u "$windows_path"`
55232    new_path="$unix_path"
55233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55235    new_path="$unix_path"
55236  fi
55237
55238  if test "x$path" != "x$new_path"; then
55239    MSVC_DLL="$new_path"
55240    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55241$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55242  fi
55243
55244  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55245  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55246
55247    else
55248      # We're on a unix platform. Hooray! :)
55249      path="$MSVC_DLL"
55250      has_space=`$ECHO "$path" | $GREP " "`
55251      if test "x$has_space" != x; then
55252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55253$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55254        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55255      fi
55256
55257      # Use eval to expand a potential ~
55258      eval path="$path"
55259      if test ! -f "$path" && test ! -d "$path"; then
55260        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55261      fi
55262
55263      if test -d "$path"; then
55264        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55265      else
55266        dir="`$DIRNAME "$path"`"
55267        base="`$BASENAME "$path"`"
55268        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55269      fi
55270    fi
55271  fi
55272
55273      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55274$as_echo_n "checking for $DLL_NAME... " >&6; }
55275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55276$as_echo "$MSVC_DLL" >&6; }
55277    else
55278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55279$as_echo "incorrect, ignoring" >&6; }
55280      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55281$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55282    fi
55283  fi
55284
55285      if test "x$MSVC_DLL" = x; then
55286        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55287      fi
55288      MSVCP_DLL="$MSVC_DLL"
55289    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55290
55291  DLL_NAME="$MSVCP_NAME"
55292  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55293  METHOD="devkit"
55294  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55295    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55296$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55297
55298    # Need to check if the found msvcr is correct architecture
55299    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55300$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55301    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55303      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55304      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55305      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55306        CORRECT_MSVCR_ARCH="PE32 executable"
55307      else
55308        CORRECT_MSVCR_ARCH="PE32+ executable"
55309      fi
55310    else
55311      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55312        CORRECT_MSVCR_ARCH=386
55313      else
55314        CORRECT_MSVCR_ARCH=x86-64
55315      fi
55316    fi
55317    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55319$as_echo "ok" >&6; }
55320      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55321
55322  # Only process if variable expands to non-empty
55323
55324  if test "x$MSVC_DLL" != x; then
55325    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55326
55327  # Input might be given as Windows format, start by converting to
55328  # unix format.
55329  path="$MSVC_DLL"
55330  new_path=`$CYGPATH -u "$path"`
55331
55332  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55333  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55334  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55335  # "foo.exe" is OK but "foo" is an error.
55336  #
55337  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55338  # It is also a way to make sure we got the proper file name for the real test later on.
55339  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55340  if test "x$test_shortpath" = x; then
55341    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55342$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55343    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55344  fi
55345
55346  # Call helper function which possibly converts this using DOS-style short mode.
55347  # If so, the updated path is stored in $new_path.
55348
55349  input_path="$new_path"
55350  # Check if we need to convert this using DOS-style short mode. If the path
55351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55352  # take no chances and rewrite it.
55353  # Note: m4 eats our [], so we need to use [ and ] instead.
55354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55355  if test "x$has_forbidden_chars" != x; then
55356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55357    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55358    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55359    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55360      # Going to short mode and back again did indeed matter. Since short mode is
55361      # case insensitive, let's make it lowercase to improve readability.
55362      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55363      # Now convert it back to Unix-style (cygpath)
55364      input_path=`$CYGPATH -u "$shortmode_path"`
55365      new_path="$input_path"
55366    fi
55367  fi
55368
55369  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55370  if test "x$test_cygdrive_prefix" = x; then
55371    # As a simple fix, exclude /usr/bin since it's not a real path.
55372    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55373      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55374      # a path prefixed by /cygdrive for fixpath to work.
55375      new_path="$CYGWIN_ROOT_PATH$input_path"
55376    fi
55377  fi
55378
55379
55380  if test "x$path" != "x$new_path"; then
55381    MSVC_DLL="$new_path"
55382    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55383$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55384  fi
55385
55386    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55387
55388  path="$MSVC_DLL"
55389  has_colon=`$ECHO $path | $GREP ^.:`
55390  new_path="$path"
55391  if test "x$has_colon" = x; then
55392    # Not in mixed or Windows style, start by that.
55393    new_path=`cmd //c echo $path`
55394  fi
55395
55396
55397  input_path="$new_path"
55398  # Check if we need to convert this using DOS-style short mode. If the path
55399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55400  # take no chances and rewrite it.
55401  # Note: m4 eats our [], so we need to use [ and ] instead.
55402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55403  if test "x$has_forbidden_chars" != x; then
55404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55405    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55406  fi
55407
55408
55409  windows_path="$new_path"
55410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55411    unix_path=`$CYGPATH -u "$windows_path"`
55412    new_path="$unix_path"
55413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55415    new_path="$unix_path"
55416  fi
55417
55418  if test "x$path" != "x$new_path"; then
55419    MSVC_DLL="$new_path"
55420    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55421$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55422  fi
55423
55424  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55425  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55426
55427    else
55428      # We're on a unix platform. Hooray! :)
55429      path="$MSVC_DLL"
55430      has_space=`$ECHO "$path" | $GREP " "`
55431      if test "x$has_space" != x; then
55432        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55433$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55434        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55435      fi
55436
55437      # Use eval to expand a potential ~
55438      eval path="$path"
55439      if test ! -f "$path" && test ! -d "$path"; then
55440        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55441      fi
55442
55443      if test -d "$path"; then
55444        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55445      else
55446        dir="`$DIRNAME "$path"`"
55447        base="`$BASENAME "$path"`"
55448        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55449      fi
55450    fi
55451  fi
55452
55453      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55454$as_echo_n "checking for $DLL_NAME... " >&6; }
55455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55456$as_echo "$MSVC_DLL" >&6; }
55457    else
55458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55459$as_echo "incorrect, ignoring" >&6; }
55460      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55461$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55462    fi
55463  fi
55464
55465      if test "x$MSVC_DLL" = x; then
55466        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55467      fi
55468      MSVCP_DLL="$MSVC_DLL"
55469    else
55470
55471  DLL_NAME="${MSVCP_NAME}"
55472  MSVC_DLL=
55473
55474  if test "x$MSVC_DLL" = x; then
55475    # Probe: Using well-known location from Visual Studio 10.0
55476    if test "x$VCINSTALLDIR" != x; then
55477      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55478
55479  windows_path="$CYGWIN_VC_INSTALL_DIR"
55480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55481    unix_path=`$CYGPATH -u "$windows_path"`
55482    CYGWIN_VC_INSTALL_DIR="$unix_path"
55483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55485    CYGWIN_VC_INSTALL_DIR="$unix_path"
55486  fi
55487
55488      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55489        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55490      else
55491        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55492      fi
55493      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55494
55495  DLL_NAME="$DLL_NAME"
55496  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55497  METHOD="well-known location in VCINSTALLDIR"
55498  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55499    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55500$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55501
55502    # Need to check if the found msvcr is correct architecture
55503    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55504$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55505    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55507      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55508      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55509      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55510        CORRECT_MSVCR_ARCH="PE32 executable"
55511      else
55512        CORRECT_MSVCR_ARCH="PE32+ executable"
55513      fi
55514    else
55515      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55516        CORRECT_MSVCR_ARCH=386
55517      else
55518        CORRECT_MSVCR_ARCH=x86-64
55519      fi
55520    fi
55521    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55523$as_echo "ok" >&6; }
55524      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55525
55526  # Only process if variable expands to non-empty
55527
55528  if test "x$MSVC_DLL" != x; then
55529    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55530
55531  # Input might be given as Windows format, start by converting to
55532  # unix format.
55533  path="$MSVC_DLL"
55534  new_path=`$CYGPATH -u "$path"`
55535
55536  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55537  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55538  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55539  # "foo.exe" is OK but "foo" is an error.
55540  #
55541  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55542  # It is also a way to make sure we got the proper file name for the real test later on.
55543  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55544  if test "x$test_shortpath" = x; then
55545    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55546$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55547    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55548  fi
55549
55550  # Call helper function which possibly converts this using DOS-style short mode.
55551  # If so, the updated path is stored in $new_path.
55552
55553  input_path="$new_path"
55554  # Check if we need to convert this using DOS-style short mode. If the path
55555  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55556  # take no chances and rewrite it.
55557  # Note: m4 eats our [], so we need to use [ and ] instead.
55558  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55559  if test "x$has_forbidden_chars" != x; then
55560    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55561    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55562    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55563    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55564      # Going to short mode and back again did indeed matter. Since short mode is
55565      # case insensitive, let's make it lowercase to improve readability.
55566      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55567      # Now convert it back to Unix-style (cygpath)
55568      input_path=`$CYGPATH -u "$shortmode_path"`
55569      new_path="$input_path"
55570    fi
55571  fi
55572
55573  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55574  if test "x$test_cygdrive_prefix" = x; then
55575    # As a simple fix, exclude /usr/bin since it's not a real path.
55576    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55577      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55578      # a path prefixed by /cygdrive for fixpath to work.
55579      new_path="$CYGWIN_ROOT_PATH$input_path"
55580    fi
55581  fi
55582
55583
55584  if test "x$path" != "x$new_path"; then
55585    MSVC_DLL="$new_path"
55586    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55587$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55588  fi
55589
55590    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55591
55592  path="$MSVC_DLL"
55593  has_colon=`$ECHO $path | $GREP ^.:`
55594  new_path="$path"
55595  if test "x$has_colon" = x; then
55596    # Not in mixed or Windows style, start by that.
55597    new_path=`cmd //c echo $path`
55598  fi
55599
55600
55601  input_path="$new_path"
55602  # Check if we need to convert this using DOS-style short mode. If the path
55603  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55604  # take no chances and rewrite it.
55605  # Note: m4 eats our [], so we need to use [ and ] instead.
55606  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55607  if test "x$has_forbidden_chars" != x; then
55608    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55609    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55610  fi
55611
55612
55613  windows_path="$new_path"
55614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55615    unix_path=`$CYGPATH -u "$windows_path"`
55616    new_path="$unix_path"
55617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55619    new_path="$unix_path"
55620  fi
55621
55622  if test "x$path" != "x$new_path"; then
55623    MSVC_DLL="$new_path"
55624    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55625$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55626  fi
55627
55628  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55629  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55630
55631    else
55632      # We're on a unix platform. Hooray! :)
55633      path="$MSVC_DLL"
55634      has_space=`$ECHO "$path" | $GREP " "`
55635      if test "x$has_space" != x; then
55636        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55637$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55638        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55639      fi
55640
55641      # Use eval to expand a potential ~
55642      eval path="$path"
55643      if test ! -f "$path" && test ! -d "$path"; then
55644        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55645      fi
55646
55647      if test -d "$path"; then
55648        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55649      else
55650        dir="`$DIRNAME "$path"`"
55651        base="`$BASENAME "$path"`"
55652        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55653      fi
55654    fi
55655  fi
55656
55657      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55658$as_echo_n "checking for $DLL_NAME... " >&6; }
55659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55660$as_echo "$MSVC_DLL" >&6; }
55661    else
55662      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55663$as_echo "incorrect, ignoring" >&6; }
55664      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55665$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55666    fi
55667  fi
55668
55669    fi
55670  fi
55671
55672  if test "x$MSVC_DLL" = x; then
55673    # Probe: Check in the Boot JDK directory.
55674    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55675
55676  DLL_NAME="$DLL_NAME"
55677  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55678  METHOD="well-known location in Boot JDK"
55679  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55681$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55682
55683    # Need to check if the found msvcr is correct architecture
55684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55685$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55686    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55688      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55689      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55690      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55691        CORRECT_MSVCR_ARCH="PE32 executable"
55692      else
55693        CORRECT_MSVCR_ARCH="PE32+ executable"
55694      fi
55695    else
55696      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55697        CORRECT_MSVCR_ARCH=386
55698      else
55699        CORRECT_MSVCR_ARCH=x86-64
55700      fi
55701    fi
55702    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55704$as_echo "ok" >&6; }
55705      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55706
55707  # Only process if variable expands to non-empty
55708
55709  if test "x$MSVC_DLL" != x; then
55710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55711
55712  # Input might be given as Windows format, start by converting to
55713  # unix format.
55714  path="$MSVC_DLL"
55715  new_path=`$CYGPATH -u "$path"`
55716
55717  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55718  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55719  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55720  # "foo.exe" is OK but "foo" is an error.
55721  #
55722  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55723  # It is also a way to make sure we got the proper file name for the real test later on.
55724  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55725  if test "x$test_shortpath" = x; then
55726    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55727$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55728    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55729  fi
55730
55731  # Call helper function which possibly converts this using DOS-style short mode.
55732  # If so, the updated path is stored in $new_path.
55733
55734  input_path="$new_path"
55735  # Check if we need to convert this using DOS-style short mode. If the path
55736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55737  # take no chances and rewrite it.
55738  # Note: m4 eats our [], so we need to use [ and ] instead.
55739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55740  if test "x$has_forbidden_chars" != x; then
55741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55745      # Going to short mode and back again did indeed matter. Since short mode is
55746      # case insensitive, let's make it lowercase to improve readability.
55747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55748      # Now convert it back to Unix-style (cygpath)
55749      input_path=`$CYGPATH -u "$shortmode_path"`
55750      new_path="$input_path"
55751    fi
55752  fi
55753
55754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55755  if test "x$test_cygdrive_prefix" = x; then
55756    # As a simple fix, exclude /usr/bin since it's not a real path.
55757    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55759      # a path prefixed by /cygdrive for fixpath to work.
55760      new_path="$CYGWIN_ROOT_PATH$input_path"
55761    fi
55762  fi
55763
55764
55765  if test "x$path" != "x$new_path"; then
55766    MSVC_DLL="$new_path"
55767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55768$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55769  fi
55770
55771    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55772
55773  path="$MSVC_DLL"
55774  has_colon=`$ECHO $path | $GREP ^.:`
55775  new_path="$path"
55776  if test "x$has_colon" = x; then
55777    # Not in mixed or Windows style, start by that.
55778    new_path=`cmd //c echo $path`
55779  fi
55780
55781
55782  input_path="$new_path"
55783  # Check if we need to convert this using DOS-style short mode. If the path
55784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55785  # take no chances and rewrite it.
55786  # Note: m4 eats our [], so we need to use [ and ] instead.
55787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55788  if test "x$has_forbidden_chars" != x; then
55789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55790    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55791  fi
55792
55793
55794  windows_path="$new_path"
55795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55796    unix_path=`$CYGPATH -u "$windows_path"`
55797    new_path="$unix_path"
55798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55800    new_path="$unix_path"
55801  fi
55802
55803  if test "x$path" != "x$new_path"; then
55804    MSVC_DLL="$new_path"
55805    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55806$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55807  fi
55808
55809  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55810  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55811
55812    else
55813      # We're on a unix platform. Hooray! :)
55814      path="$MSVC_DLL"
55815      has_space=`$ECHO "$path" | $GREP " "`
55816      if test "x$has_space" != x; then
55817        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55818$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55819        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55820      fi
55821
55822      # Use eval to expand a potential ~
55823      eval path="$path"
55824      if test ! -f "$path" && test ! -d "$path"; then
55825        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55826      fi
55827
55828      if test -d "$path"; then
55829        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55830      else
55831        dir="`$DIRNAME "$path"`"
55832        base="`$BASENAME "$path"`"
55833        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55834      fi
55835    fi
55836  fi
55837
55838      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55839$as_echo_n "checking for $DLL_NAME... " >&6; }
55840      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55841$as_echo "$MSVC_DLL" >&6; }
55842    else
55843      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55844$as_echo "incorrect, ignoring" >&6; }
55845      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55846$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55847    fi
55848  fi
55849
55850  fi
55851
55852  if test "x$MSVC_DLL" = x; then
55853    # Probe: Look in the Windows system32 directory
55854    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55855
55856  windows_path="$CYGWIN_SYSTEMROOT"
55857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55858    unix_path=`$CYGPATH -u "$windows_path"`
55859    CYGWIN_SYSTEMROOT="$unix_path"
55860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55862    CYGWIN_SYSTEMROOT="$unix_path"
55863  fi
55864
55865    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55866
55867  DLL_NAME="$DLL_NAME"
55868  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55869  METHOD="well-known location in SYSTEMROOT"
55870  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55871    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55872$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55873
55874    # Need to check if the found msvcr is correct architecture
55875    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55876$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55877    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55878    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55879      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55880      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55881      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55882        CORRECT_MSVCR_ARCH="PE32 executable"
55883      else
55884        CORRECT_MSVCR_ARCH="PE32+ executable"
55885      fi
55886    else
55887      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55888        CORRECT_MSVCR_ARCH=386
55889      else
55890        CORRECT_MSVCR_ARCH=x86-64
55891      fi
55892    fi
55893    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55895$as_echo "ok" >&6; }
55896      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55897
55898  # Only process if variable expands to non-empty
55899
55900  if test "x$MSVC_DLL" != x; then
55901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55902
55903  # Input might be given as Windows format, start by converting to
55904  # unix format.
55905  path="$MSVC_DLL"
55906  new_path=`$CYGPATH -u "$path"`
55907
55908  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55909  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55910  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55911  # "foo.exe" is OK but "foo" is an error.
55912  #
55913  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55914  # It is also a way to make sure we got the proper file name for the real test later on.
55915  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55916  if test "x$test_shortpath" = x; then
55917    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55918$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55919    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55920  fi
55921
55922  # Call helper function which possibly converts this using DOS-style short mode.
55923  # If so, the updated path is stored in $new_path.
55924
55925  input_path="$new_path"
55926  # Check if we need to convert this using DOS-style short mode. If the path
55927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55928  # take no chances and rewrite it.
55929  # Note: m4 eats our [], so we need to use [ and ] instead.
55930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55931  if test "x$has_forbidden_chars" != x; then
55932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55933    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55934    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55935    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55936      # Going to short mode and back again did indeed matter. Since short mode is
55937      # case insensitive, let's make it lowercase to improve readability.
55938      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55939      # Now convert it back to Unix-style (cygpath)
55940      input_path=`$CYGPATH -u "$shortmode_path"`
55941      new_path="$input_path"
55942    fi
55943  fi
55944
55945  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55946  if test "x$test_cygdrive_prefix" = x; then
55947    # As a simple fix, exclude /usr/bin since it's not a real path.
55948    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55949      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55950      # a path prefixed by /cygdrive for fixpath to work.
55951      new_path="$CYGWIN_ROOT_PATH$input_path"
55952    fi
55953  fi
55954
55955
55956  if test "x$path" != "x$new_path"; then
55957    MSVC_DLL="$new_path"
55958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55959$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55960  fi
55961
55962    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55963
55964  path="$MSVC_DLL"
55965  has_colon=`$ECHO $path | $GREP ^.:`
55966  new_path="$path"
55967  if test "x$has_colon" = x; then
55968    # Not in mixed or Windows style, start by that.
55969    new_path=`cmd //c echo $path`
55970  fi
55971
55972
55973  input_path="$new_path"
55974  # Check if we need to convert this using DOS-style short mode. If the path
55975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55976  # take no chances and rewrite it.
55977  # Note: m4 eats our [], so we need to use [ and ] instead.
55978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55979  if test "x$has_forbidden_chars" != x; then
55980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55982  fi
55983
55984
55985  windows_path="$new_path"
55986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55987    unix_path=`$CYGPATH -u "$windows_path"`
55988    new_path="$unix_path"
55989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55991    new_path="$unix_path"
55992  fi
55993
55994  if test "x$path" != "x$new_path"; then
55995    MSVC_DLL="$new_path"
55996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55997$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55998  fi
55999
56000  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56001  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56002
56003    else
56004      # We're on a unix platform. Hooray! :)
56005      path="$MSVC_DLL"
56006      has_space=`$ECHO "$path" | $GREP " "`
56007      if test "x$has_space" != x; then
56008        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56009$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56010        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56011      fi
56012
56013      # Use eval to expand a potential ~
56014      eval path="$path"
56015      if test ! -f "$path" && test ! -d "$path"; then
56016        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56017      fi
56018
56019      if test -d "$path"; then
56020        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56021      else
56022        dir="`$DIRNAME "$path"`"
56023        base="`$BASENAME "$path"`"
56024        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56025      fi
56026    fi
56027  fi
56028
56029      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56030$as_echo_n "checking for $DLL_NAME... " >&6; }
56031      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56032$as_echo "$MSVC_DLL" >&6; }
56033    else
56034      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56035$as_echo "incorrect, ignoring" >&6; }
56036      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56037$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56038    fi
56039  fi
56040
56041  fi
56042
56043  if test "x$MSVC_DLL" = x; then
56044    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56045    if test "x$VS100COMNTOOLS" != x; then
56046      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56047
56048  windows_path="$CYGWIN_VS_TOOLS_DIR"
56049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56050    unix_path=`$CYGPATH -u "$windows_path"`
56051    CYGWIN_VS_TOOLS_DIR="$unix_path"
56052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56054    CYGWIN_VS_TOOLS_DIR="$unix_path"
56055  fi
56056
56057      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56058        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56059	    | $GREP -i /x64/ | $HEAD --lines 1`
56060      else
56061        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56062	    | $GREP -i /x86/ | $HEAD --lines 1`
56063      fi
56064
56065  DLL_NAME="$DLL_NAME"
56066  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56067  METHOD="search of VS100COMNTOOLS"
56068  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56069    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56070$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56071
56072    # Need to check if the found msvcr is correct architecture
56073    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56074$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56075    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56076    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56077      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56078      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56079      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56080        CORRECT_MSVCR_ARCH="PE32 executable"
56081      else
56082        CORRECT_MSVCR_ARCH="PE32+ executable"
56083      fi
56084    else
56085      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56086        CORRECT_MSVCR_ARCH=386
56087      else
56088        CORRECT_MSVCR_ARCH=x86-64
56089      fi
56090    fi
56091    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56092      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56093$as_echo "ok" >&6; }
56094      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56095
56096  # Only process if variable expands to non-empty
56097
56098  if test "x$MSVC_DLL" != x; then
56099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56100
56101  # Input might be given as Windows format, start by converting to
56102  # unix format.
56103  path="$MSVC_DLL"
56104  new_path=`$CYGPATH -u "$path"`
56105
56106  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56107  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56108  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56109  # "foo.exe" is OK but "foo" is an error.
56110  #
56111  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56112  # It is also a way to make sure we got the proper file name for the real test later on.
56113  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56114  if test "x$test_shortpath" = x; then
56115    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56116$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56117    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56118  fi
56119
56120  # Call helper function which possibly converts this using DOS-style short mode.
56121  # If so, the updated path is stored in $new_path.
56122
56123  input_path="$new_path"
56124  # Check if we need to convert this using DOS-style short mode. If the path
56125  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56126  # take no chances and rewrite it.
56127  # Note: m4 eats our [], so we need to use [ and ] instead.
56128  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56129  if test "x$has_forbidden_chars" != x; then
56130    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56131    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56132    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56133    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56134      # Going to short mode and back again did indeed matter. Since short mode is
56135      # case insensitive, let's make it lowercase to improve readability.
56136      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56137      # Now convert it back to Unix-style (cygpath)
56138      input_path=`$CYGPATH -u "$shortmode_path"`
56139      new_path="$input_path"
56140    fi
56141  fi
56142
56143  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56144  if test "x$test_cygdrive_prefix" = x; then
56145    # As a simple fix, exclude /usr/bin since it's not a real path.
56146    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56147      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56148      # a path prefixed by /cygdrive for fixpath to work.
56149      new_path="$CYGWIN_ROOT_PATH$input_path"
56150    fi
56151  fi
56152
56153
56154  if test "x$path" != "x$new_path"; then
56155    MSVC_DLL="$new_path"
56156    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56157$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56158  fi
56159
56160    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56161
56162  path="$MSVC_DLL"
56163  has_colon=`$ECHO $path | $GREP ^.:`
56164  new_path="$path"
56165  if test "x$has_colon" = x; then
56166    # Not in mixed or Windows style, start by that.
56167    new_path=`cmd //c echo $path`
56168  fi
56169
56170
56171  input_path="$new_path"
56172  # Check if we need to convert this using DOS-style short mode. If the path
56173  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56174  # take no chances and rewrite it.
56175  # Note: m4 eats our [], so we need to use [ and ] instead.
56176  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56177  if test "x$has_forbidden_chars" != x; then
56178    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56179    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56180  fi
56181
56182
56183  windows_path="$new_path"
56184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56185    unix_path=`$CYGPATH -u "$windows_path"`
56186    new_path="$unix_path"
56187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56189    new_path="$unix_path"
56190  fi
56191
56192  if test "x$path" != "x$new_path"; then
56193    MSVC_DLL="$new_path"
56194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56195$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56196  fi
56197
56198  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56199  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56200
56201    else
56202      # We're on a unix platform. Hooray! :)
56203      path="$MSVC_DLL"
56204      has_space=`$ECHO "$path" | $GREP " "`
56205      if test "x$has_space" != x; then
56206        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56207$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56208        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56209      fi
56210
56211      # Use eval to expand a potential ~
56212      eval path="$path"
56213      if test ! -f "$path" && test ! -d "$path"; then
56214        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56215      fi
56216
56217      if test -d "$path"; then
56218        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56219      else
56220        dir="`$DIRNAME "$path"`"
56221        base="`$BASENAME "$path"`"
56222        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56223      fi
56224    fi
56225  fi
56226
56227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56228$as_echo_n "checking for $DLL_NAME... " >&6; }
56229      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56230$as_echo "$MSVC_DLL" >&6; }
56231    else
56232      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56233$as_echo "incorrect, ignoring" >&6; }
56234      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56235$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56236    fi
56237  fi
56238
56239    fi
56240  fi
56241
56242  if test "x$MSVC_DLL" = x; then
56243    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56244    # (This was the original behaviour; kept since it might turn something up)
56245    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56246      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56247        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56248	    | $GREP x64 | $HEAD --lines 1`
56249      else
56250        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56251	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56252        if test "x$POSSIBLE_MSVC_DLL" = x; then
56253          # We're grasping at straws now...
56254          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56255	      | $HEAD --lines 1`
56256        fi
56257      fi
56258
56259
56260  DLL_NAME="$DLL_NAME"
56261  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56262  METHOD="search of VCINSTALLDIR"
56263  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56264    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56265$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56266
56267    # Need to check if the found msvcr is correct architecture
56268    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56269$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56270    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56272      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56273      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56274      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56275        CORRECT_MSVCR_ARCH="PE32 executable"
56276      else
56277        CORRECT_MSVCR_ARCH="PE32+ executable"
56278      fi
56279    else
56280      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56281        CORRECT_MSVCR_ARCH=386
56282      else
56283        CORRECT_MSVCR_ARCH=x86-64
56284      fi
56285    fi
56286    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56287      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56288$as_echo "ok" >&6; }
56289      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56290
56291  # Only process if variable expands to non-empty
56292
56293  if test "x$MSVC_DLL" != x; then
56294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56295
56296  # Input might be given as Windows format, start by converting to
56297  # unix format.
56298  path="$MSVC_DLL"
56299  new_path=`$CYGPATH -u "$path"`
56300
56301  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56302  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56303  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56304  # "foo.exe" is OK but "foo" is an error.
56305  #
56306  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56307  # It is also a way to make sure we got the proper file name for the real test later on.
56308  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56309  if test "x$test_shortpath" = x; then
56310    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56311$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56312    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56313  fi
56314
56315  # Call helper function which possibly converts this using DOS-style short mode.
56316  # If so, the updated path is stored in $new_path.
56317
56318  input_path="$new_path"
56319  # Check if we need to convert this using DOS-style short mode. If the path
56320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56321  # take no chances and rewrite it.
56322  # Note: m4 eats our [], so we need to use [ and ] instead.
56323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56324  if test "x$has_forbidden_chars" != x; then
56325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56329      # Going to short mode and back again did indeed matter. Since short mode is
56330      # case insensitive, let's make it lowercase to improve readability.
56331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56332      # Now convert it back to Unix-style (cygpath)
56333      input_path=`$CYGPATH -u "$shortmode_path"`
56334      new_path="$input_path"
56335    fi
56336  fi
56337
56338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56339  if test "x$test_cygdrive_prefix" = x; then
56340    # As a simple fix, exclude /usr/bin since it's not a real path.
56341    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56343      # a path prefixed by /cygdrive for fixpath to work.
56344      new_path="$CYGWIN_ROOT_PATH$input_path"
56345    fi
56346  fi
56347
56348
56349  if test "x$path" != "x$new_path"; then
56350    MSVC_DLL="$new_path"
56351    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56352$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56353  fi
56354
56355    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56356
56357  path="$MSVC_DLL"
56358  has_colon=`$ECHO $path | $GREP ^.:`
56359  new_path="$path"
56360  if test "x$has_colon" = x; then
56361    # Not in mixed or Windows style, start by that.
56362    new_path=`cmd //c echo $path`
56363  fi
56364
56365
56366  input_path="$new_path"
56367  # Check if we need to convert this using DOS-style short mode. If the path
56368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56369  # take no chances and rewrite it.
56370  # Note: m4 eats our [], so we need to use [ and ] instead.
56371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56372  if test "x$has_forbidden_chars" != x; then
56373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56374    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56375  fi
56376
56377
56378  windows_path="$new_path"
56379  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56380    unix_path=`$CYGPATH -u "$windows_path"`
56381    new_path="$unix_path"
56382  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56383    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56384    new_path="$unix_path"
56385  fi
56386
56387  if test "x$path" != "x$new_path"; then
56388    MSVC_DLL="$new_path"
56389    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56390$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56391  fi
56392
56393  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56394  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56395
56396    else
56397      # We're on a unix platform. Hooray! :)
56398      path="$MSVC_DLL"
56399      has_space=`$ECHO "$path" | $GREP " "`
56400      if test "x$has_space" != x; then
56401        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56402$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56403        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56404      fi
56405
56406      # Use eval to expand a potential ~
56407      eval path="$path"
56408      if test ! -f "$path" && test ! -d "$path"; then
56409        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56410      fi
56411
56412      if test -d "$path"; then
56413        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56414      else
56415        dir="`$DIRNAME "$path"`"
56416        base="`$BASENAME "$path"`"
56417        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56418      fi
56419    fi
56420  fi
56421
56422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56423$as_echo_n "checking for $DLL_NAME... " >&6; }
56424      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56425$as_echo "$MSVC_DLL" >&6; }
56426    else
56427      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56428$as_echo "incorrect, ignoring" >&6; }
56429      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56430$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56431    fi
56432  fi
56433
56434    fi
56435  fi
56436
56437  if test "x$MSVC_DLL" = x; then
56438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56439$as_echo_n "checking for $DLL_NAME... " >&6; }
56440    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56441$as_echo "no" >&6; }
56442    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56443  fi
56444
56445      MSVCP_DLL="$MSVC_DLL"
56446    fi
56447
56448  fi
56449
56450  fi
56451
56452
56453  if test "x$NEEDS_LIB_X11" = xfalse; then
56454    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56455      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56456$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56457    fi
56458    X_CFLAGS=
56459    X_LIBS=
56460  else
56461
56462    if test "x${with_x}" = xno; then
56463      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56464    fi
56465
56466    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56467      # The user has specified a X11 base directory. Use it for includes and
56468      # libraries, unless explicitely overridden.
56469      if test "x$x_includes" = xNONE; then
56470        x_includes="${with_x}/include"
56471      fi
56472      if test "x$x_libraries" = xNONE; then
56473        x_libraries="${with_x}/lib"
56474      fi
56475    else
56476      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56477      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56478      # --x-libraries for the sysroot, if that seems to be correct.
56479      if test "x$SYSROOT" != "x"; then
56480        if test "x$x_includes" = xNONE; then
56481          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56482            x_includes="$SYSROOT/usr/X11R6/include"
56483          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56484            x_includes="$SYSROOT/usr/include"
56485          fi
56486        fi
56487        if test "x$x_libraries" = xNONE; then
56488          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56489            x_libraries="$SYSROOT/usr/X11R6/lib"
56490          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56491            x_libraries="$SYSROOT/usr/lib64"
56492          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56493            x_libraries="$SYSROOT/usr/lib"
56494          fi
56495        fi
56496      fi
56497    fi
56498
56499    # Now let autoconf do it's magic
56500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56501$as_echo_n "checking for X... " >&6; }
56502
56503
56504# Check whether --with-x was given.
56505if test "${with_x+set}" = set; then :
56506  withval=$with_x;
56507fi
56508
56509# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56510if test "x$with_x" = xno; then
56511  # The user explicitly disabled X.
56512  have_x=disabled
56513else
56514  case $x_includes,$x_libraries in #(
56515    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56516    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56517  $as_echo_n "(cached) " >&6
56518else
56519  # One or both of the vars are not set, and there is no cached value.
56520ac_x_includes=no ac_x_libraries=no
56521rm -f -r conftest.dir
56522if mkdir conftest.dir; then
56523  cd conftest.dir
56524  cat >Imakefile <<'_ACEOF'
56525incroot:
56526	@echo incroot='${INCROOT}'
56527usrlibdir:
56528	@echo usrlibdir='${USRLIBDIR}'
56529libdir:
56530	@echo libdir='${LIBDIR}'
56531_ACEOF
56532  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56533    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56534    for ac_var in incroot usrlibdir libdir; do
56535      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56536    done
56537    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56538    for ac_extension in a so sl dylib la dll; do
56539      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56540	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56541	ac_im_usrlibdir=$ac_im_libdir; break
56542      fi
56543    done
56544    # Screen out bogus values from the imake configuration.  They are
56545    # bogus both because they are the default anyway, and because
56546    # using them would break gcc on systems where it needs fixed includes.
56547    case $ac_im_incroot in
56548	/usr/include) ac_x_includes= ;;
56549	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56550    esac
56551    case $ac_im_usrlibdir in
56552	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56553	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56554    esac
56555  fi
56556  cd ..
56557  rm -f -r conftest.dir
56558fi
56559
56560# Standard set of common directories for X headers.
56561# Check X11 before X11Rn because it is often a symlink to the current release.
56562ac_x_header_dirs='
56563/usr/X11/include
56564/usr/X11R7/include
56565/usr/X11R6/include
56566/usr/X11R5/include
56567/usr/X11R4/include
56568
56569/usr/include/X11
56570/usr/include/X11R7
56571/usr/include/X11R6
56572/usr/include/X11R5
56573/usr/include/X11R4
56574
56575/usr/local/X11/include
56576/usr/local/X11R7/include
56577/usr/local/X11R6/include
56578/usr/local/X11R5/include
56579/usr/local/X11R4/include
56580
56581/usr/local/include/X11
56582/usr/local/include/X11R7
56583/usr/local/include/X11R6
56584/usr/local/include/X11R5
56585/usr/local/include/X11R4
56586
56587/usr/X386/include
56588/usr/x386/include
56589/usr/XFree86/include/X11
56590
56591/usr/include
56592/usr/local/include
56593/usr/unsupported/include
56594/usr/athena/include
56595/usr/local/x11r5/include
56596/usr/lpp/Xamples/include
56597
56598/usr/openwin/include
56599/usr/openwin/share/include'
56600
56601if test "$ac_x_includes" = no; then
56602  # Guess where to find include files, by looking for Xlib.h.
56603  # First, try using that file with no special directory specified.
56604  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56605/* end confdefs.h.  */
56606#include <X11/Xlib.h>
56607_ACEOF
56608if ac_fn_cxx_try_cpp "$LINENO"; then :
56609  # We can compile using X headers with no special include directory.
56610ac_x_includes=
56611else
56612  for ac_dir in $ac_x_header_dirs; do
56613  if test -r "$ac_dir/X11/Xlib.h"; then
56614    ac_x_includes=$ac_dir
56615    break
56616  fi
56617done
56618fi
56619rm -f conftest.err conftest.i conftest.$ac_ext
56620fi # $ac_x_includes = no
56621
56622if test "$ac_x_libraries" = no; then
56623  # Check for the libraries.
56624  # See if we find them without any special options.
56625  # Don't add to $LIBS permanently.
56626  ac_save_LIBS=$LIBS
56627  LIBS="-lX11 $LIBS"
56628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56629/* end confdefs.h.  */
56630#include <X11/Xlib.h>
56631int
56632main ()
56633{
56634XrmInitialize ()
56635  ;
56636  return 0;
56637}
56638_ACEOF
56639if ac_fn_cxx_try_link "$LINENO"; then :
56640  LIBS=$ac_save_LIBS
56641# We can link X programs with no special library path.
56642ac_x_libraries=
56643else
56644  LIBS=$ac_save_LIBS
56645for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56646do
56647  # Don't even attempt the hair of trying to link an X program!
56648  for ac_extension in a so sl dylib la dll; do
56649    if test -r "$ac_dir/libX11.$ac_extension"; then
56650      ac_x_libraries=$ac_dir
56651      break 2
56652    fi
56653  done
56654done
56655fi
56656rm -f core conftest.err conftest.$ac_objext \
56657    conftest$ac_exeext conftest.$ac_ext
56658fi # $ac_x_libraries = no
56659
56660case $ac_x_includes,$ac_x_libraries in #(
56661  no,* | *,no | *\'*)
56662    # Didn't find X, or a directory has "'" in its name.
56663    ac_cv_have_x="have_x=no";; #(
56664  *)
56665    # Record where we found X for the cache.
56666    ac_cv_have_x="have_x=yes\
56667	ac_x_includes='$ac_x_includes'\
56668	ac_x_libraries='$ac_x_libraries'"
56669esac
56670fi
56671;; #(
56672    *) have_x=yes;;
56673  esac
56674  eval "$ac_cv_have_x"
56675fi # $with_x != no
56676
56677if test "$have_x" != yes; then
56678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56679$as_echo "$have_x" >&6; }
56680  no_x=yes
56681else
56682  # If each of the values was on the command line, it overrides each guess.
56683  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56684  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56685  # Update the cache value to reflect the command line values.
56686  ac_cv_have_x="have_x=yes\
56687	ac_x_includes='$x_includes'\
56688	ac_x_libraries='$x_libraries'"
56689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56690$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56691fi
56692
56693    if test "$no_x" = yes; then
56694  # Not all programs may use this symbol, but it does not hurt to define it.
56695
56696$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56697
56698  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56699else
56700  if test -n "$x_includes"; then
56701    X_CFLAGS="$X_CFLAGS -I$x_includes"
56702  fi
56703
56704  # It would also be nice to do this for all -L options, not just this one.
56705  if test -n "$x_libraries"; then
56706    X_LIBS="$X_LIBS -L$x_libraries"
56707    # For Solaris; some versions of Sun CC require a space after -R and
56708    # others require no space.  Words are not sufficient . . . .
56709    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56710$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56711    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56712    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56713    ac_cxx_werror_flag=yes
56714    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56715/* end confdefs.h.  */
56716
56717int
56718main ()
56719{
56720
56721  ;
56722  return 0;
56723}
56724_ACEOF
56725if ac_fn_cxx_try_link "$LINENO"; then :
56726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56727$as_echo "no" >&6; }
56728       X_LIBS="$X_LIBS -R$x_libraries"
56729else
56730  LIBS="$ac_xsave_LIBS -R $x_libraries"
56731       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56732/* end confdefs.h.  */
56733
56734int
56735main ()
56736{
56737
56738  ;
56739  return 0;
56740}
56741_ACEOF
56742if ac_fn_cxx_try_link "$LINENO"; then :
56743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56744$as_echo "yes" >&6; }
56745	  X_LIBS="$X_LIBS -R $x_libraries"
56746else
56747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56748$as_echo "neither works" >&6; }
56749fi
56750rm -f core conftest.err conftest.$ac_objext \
56751    conftest$ac_exeext conftest.$ac_ext
56752fi
56753rm -f core conftest.err conftest.$ac_objext \
56754    conftest$ac_exeext conftest.$ac_ext
56755    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56756    LIBS=$ac_xsave_LIBS
56757  fi
56758
56759  # Check for system-dependent libraries X programs must link with.
56760  # Do this before checking for the system-independent R6 libraries
56761  # (-lICE), since we may need -lsocket or whatever for X linking.
56762
56763  if test "$ISC" = yes; then
56764    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56765  else
56766    # Martyn Johnson says this is needed for Ultrix, if the X
56767    # libraries were built with DECnet support.  And Karl Berry says
56768    # the Alpha needs dnet_stub (dnet does not exist).
56769    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56770    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56771/* end confdefs.h.  */
56772
56773/* Override any GCC internal prototype to avoid an error.
56774   Use char because int might match the return type of a GCC
56775   builtin and then its argument prototype would still apply.  */
56776#ifdef __cplusplus
56777extern "C"
56778#endif
56779char XOpenDisplay ();
56780int
56781main ()
56782{
56783return XOpenDisplay ();
56784  ;
56785  return 0;
56786}
56787_ACEOF
56788if ac_fn_cxx_try_link "$LINENO"; then :
56789
56790else
56791  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56792$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56793if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56794  $as_echo_n "(cached) " >&6
56795else
56796  ac_check_lib_save_LIBS=$LIBS
56797LIBS="-ldnet  $LIBS"
56798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56799/* end confdefs.h.  */
56800
56801/* Override any GCC internal prototype to avoid an error.
56802   Use char because int might match the return type of a GCC
56803   builtin and then its argument prototype would still apply.  */
56804#ifdef __cplusplus
56805extern "C"
56806#endif
56807char dnet_ntoa ();
56808int
56809main ()
56810{
56811return dnet_ntoa ();
56812  ;
56813  return 0;
56814}
56815_ACEOF
56816if ac_fn_cxx_try_link "$LINENO"; then :
56817  ac_cv_lib_dnet_dnet_ntoa=yes
56818else
56819  ac_cv_lib_dnet_dnet_ntoa=no
56820fi
56821rm -f core conftest.err conftest.$ac_objext \
56822    conftest$ac_exeext conftest.$ac_ext
56823LIBS=$ac_check_lib_save_LIBS
56824fi
56825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56826$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56827if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56828  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56829fi
56830
56831    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56832      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56833$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56834if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56835  $as_echo_n "(cached) " >&6
56836else
56837  ac_check_lib_save_LIBS=$LIBS
56838LIBS="-ldnet_stub  $LIBS"
56839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56840/* end confdefs.h.  */
56841
56842/* Override any GCC internal prototype to avoid an error.
56843   Use char because int might match the return type of a GCC
56844   builtin and then its argument prototype would still apply.  */
56845#ifdef __cplusplus
56846extern "C"
56847#endif
56848char dnet_ntoa ();
56849int
56850main ()
56851{
56852return dnet_ntoa ();
56853  ;
56854  return 0;
56855}
56856_ACEOF
56857if ac_fn_cxx_try_link "$LINENO"; then :
56858  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56859else
56860  ac_cv_lib_dnet_stub_dnet_ntoa=no
56861fi
56862rm -f core conftest.err conftest.$ac_objext \
56863    conftest$ac_exeext conftest.$ac_ext
56864LIBS=$ac_check_lib_save_LIBS
56865fi
56866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56867$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56868if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56869  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56870fi
56871
56872    fi
56873fi
56874rm -f core conftest.err conftest.$ac_objext \
56875    conftest$ac_exeext conftest.$ac_ext
56876    LIBS="$ac_xsave_LIBS"
56877
56878    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56879    # to get the SysV transport functions.
56880    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56881    # needs -lnsl.
56882    # The nsl library prevents programs from opening the X display
56883    # on Irix 5.2, according to T.E. Dickey.
56884    # The functions gethostbyname, getservbyname, and inet_addr are
56885    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56886    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56887if test "x$ac_cv_func_gethostbyname" = xyes; then :
56888
56889fi
56890
56891    if test $ac_cv_func_gethostbyname = no; then
56892      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56893$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56894if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56895  $as_echo_n "(cached) " >&6
56896else
56897  ac_check_lib_save_LIBS=$LIBS
56898LIBS="-lnsl  $LIBS"
56899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56900/* end confdefs.h.  */
56901
56902/* Override any GCC internal prototype to avoid an error.
56903   Use char because int might match the return type of a GCC
56904   builtin and then its argument prototype would still apply.  */
56905#ifdef __cplusplus
56906extern "C"
56907#endif
56908char gethostbyname ();
56909int
56910main ()
56911{
56912return gethostbyname ();
56913  ;
56914  return 0;
56915}
56916_ACEOF
56917if ac_fn_cxx_try_link "$LINENO"; then :
56918  ac_cv_lib_nsl_gethostbyname=yes
56919else
56920  ac_cv_lib_nsl_gethostbyname=no
56921fi
56922rm -f core conftest.err conftest.$ac_objext \
56923    conftest$ac_exeext conftest.$ac_ext
56924LIBS=$ac_check_lib_save_LIBS
56925fi
56926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56927$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56928if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56929  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56930fi
56931
56932      if test $ac_cv_lib_nsl_gethostbyname = no; then
56933	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56934$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56935if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56936  $as_echo_n "(cached) " >&6
56937else
56938  ac_check_lib_save_LIBS=$LIBS
56939LIBS="-lbsd  $LIBS"
56940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56941/* end confdefs.h.  */
56942
56943/* Override any GCC internal prototype to avoid an error.
56944   Use char because int might match the return type of a GCC
56945   builtin and then its argument prototype would still apply.  */
56946#ifdef __cplusplus
56947extern "C"
56948#endif
56949char gethostbyname ();
56950int
56951main ()
56952{
56953return gethostbyname ();
56954  ;
56955  return 0;
56956}
56957_ACEOF
56958if ac_fn_cxx_try_link "$LINENO"; then :
56959  ac_cv_lib_bsd_gethostbyname=yes
56960else
56961  ac_cv_lib_bsd_gethostbyname=no
56962fi
56963rm -f core conftest.err conftest.$ac_objext \
56964    conftest$ac_exeext conftest.$ac_ext
56965LIBS=$ac_check_lib_save_LIBS
56966fi
56967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56968$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56969if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56970  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56971fi
56972
56973      fi
56974    fi
56975
56976    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56977    # socket/setsockopt and other routines are undefined under SCO ODT
56978    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56979    # on later versions), says Simon Leinen: it contains gethostby*
56980    # variants that don't use the name server (or something).  -lsocket
56981    # must be given before -lnsl if both are needed.  We assume that
56982    # if connect needs -lnsl, so does gethostbyname.
56983    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56984if test "x$ac_cv_func_connect" = xyes; then :
56985
56986fi
56987
56988    if test $ac_cv_func_connect = no; then
56989      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56990$as_echo_n "checking for connect in -lsocket... " >&6; }
56991if ${ac_cv_lib_socket_connect+:} false; then :
56992  $as_echo_n "(cached) " >&6
56993else
56994  ac_check_lib_save_LIBS=$LIBS
56995LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56996cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56997/* end confdefs.h.  */
56998
56999/* Override any GCC internal prototype to avoid an error.
57000   Use char because int might match the return type of a GCC
57001   builtin and then its argument prototype would still apply.  */
57002#ifdef __cplusplus
57003extern "C"
57004#endif
57005char connect ();
57006int
57007main ()
57008{
57009return connect ();
57010  ;
57011  return 0;
57012}
57013_ACEOF
57014if ac_fn_cxx_try_link "$LINENO"; then :
57015  ac_cv_lib_socket_connect=yes
57016else
57017  ac_cv_lib_socket_connect=no
57018fi
57019rm -f core conftest.err conftest.$ac_objext \
57020    conftest$ac_exeext conftest.$ac_ext
57021LIBS=$ac_check_lib_save_LIBS
57022fi
57023{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57024$as_echo "$ac_cv_lib_socket_connect" >&6; }
57025if test "x$ac_cv_lib_socket_connect" = xyes; then :
57026  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57027fi
57028
57029    fi
57030
57031    # Guillermo Gomez says -lposix is necessary on A/UX.
57032    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57033if test "x$ac_cv_func_remove" = xyes; then :
57034
57035fi
57036
57037    if test $ac_cv_func_remove = no; then
57038      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57039$as_echo_n "checking for remove in -lposix... " >&6; }
57040if ${ac_cv_lib_posix_remove+:} false; then :
57041  $as_echo_n "(cached) " >&6
57042else
57043  ac_check_lib_save_LIBS=$LIBS
57044LIBS="-lposix  $LIBS"
57045cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57046/* end confdefs.h.  */
57047
57048/* Override any GCC internal prototype to avoid an error.
57049   Use char because int might match the return type of a GCC
57050   builtin and then its argument prototype would still apply.  */
57051#ifdef __cplusplus
57052extern "C"
57053#endif
57054char remove ();
57055int
57056main ()
57057{
57058return remove ();
57059  ;
57060  return 0;
57061}
57062_ACEOF
57063if ac_fn_cxx_try_link "$LINENO"; then :
57064  ac_cv_lib_posix_remove=yes
57065else
57066  ac_cv_lib_posix_remove=no
57067fi
57068rm -f core conftest.err conftest.$ac_objext \
57069    conftest$ac_exeext conftest.$ac_ext
57070LIBS=$ac_check_lib_save_LIBS
57071fi
57072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57073$as_echo "$ac_cv_lib_posix_remove" >&6; }
57074if test "x$ac_cv_lib_posix_remove" = xyes; then :
57075  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57076fi
57077
57078    fi
57079
57080    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57081    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57082if test "x$ac_cv_func_shmat" = xyes; then :
57083
57084fi
57085
57086    if test $ac_cv_func_shmat = no; then
57087      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57088$as_echo_n "checking for shmat in -lipc... " >&6; }
57089if ${ac_cv_lib_ipc_shmat+:} false; then :
57090  $as_echo_n "(cached) " >&6
57091else
57092  ac_check_lib_save_LIBS=$LIBS
57093LIBS="-lipc  $LIBS"
57094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57095/* end confdefs.h.  */
57096
57097/* Override any GCC internal prototype to avoid an error.
57098   Use char because int might match the return type of a GCC
57099   builtin and then its argument prototype would still apply.  */
57100#ifdef __cplusplus
57101extern "C"
57102#endif
57103char shmat ();
57104int
57105main ()
57106{
57107return shmat ();
57108  ;
57109  return 0;
57110}
57111_ACEOF
57112if ac_fn_cxx_try_link "$LINENO"; then :
57113  ac_cv_lib_ipc_shmat=yes
57114else
57115  ac_cv_lib_ipc_shmat=no
57116fi
57117rm -f core conftest.err conftest.$ac_objext \
57118    conftest$ac_exeext conftest.$ac_ext
57119LIBS=$ac_check_lib_save_LIBS
57120fi
57121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57122$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57123if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57124  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57125fi
57126
57127    fi
57128  fi
57129
57130  # Check for libraries that X11R6 Xt/Xaw programs need.
57131  ac_save_LDFLAGS=$LDFLAGS
57132  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57133  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57134  # check for ICE first), but we must link in the order -lSM -lICE or
57135  # we get undefined symbols.  So assume we have SM if we have ICE.
57136  # These have to be linked with before -lX11, unlike the other
57137  # libraries we check for below, so use a different variable.
57138  # John Interrante, Karl Berry
57139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57140$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57141if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57142  $as_echo_n "(cached) " >&6
57143else
57144  ac_check_lib_save_LIBS=$LIBS
57145LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57147/* end confdefs.h.  */
57148
57149/* Override any GCC internal prototype to avoid an error.
57150   Use char because int might match the return type of a GCC
57151   builtin and then its argument prototype would still apply.  */
57152#ifdef __cplusplus
57153extern "C"
57154#endif
57155char IceConnectionNumber ();
57156int
57157main ()
57158{
57159return IceConnectionNumber ();
57160  ;
57161  return 0;
57162}
57163_ACEOF
57164if ac_fn_cxx_try_link "$LINENO"; then :
57165  ac_cv_lib_ICE_IceConnectionNumber=yes
57166else
57167  ac_cv_lib_ICE_IceConnectionNumber=no
57168fi
57169rm -f core conftest.err conftest.$ac_objext \
57170    conftest$ac_exeext conftest.$ac_ext
57171LIBS=$ac_check_lib_save_LIBS
57172fi
57173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57174$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57175if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57176  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57177fi
57178
57179  LDFLAGS=$ac_save_LDFLAGS
57180
57181fi
57182
57183
57184    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57185    # this doesn't make sense so we remove it.
57186    if test "x$COMPILE_TYPE" = xcross; then
57187      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57188    fi
57189
57190    if test "x$no_x" = xyes; then
57191
57192  # Print a helpful message on how to acquire the necessary build dependency.
57193  # x11 is the help tag: freetype, cups, alsa etc
57194  MISSING_DEPENDENCY=x11
57195
57196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57197    cygwin_help $MISSING_DEPENDENCY
57198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57199    msys_help $MISSING_DEPENDENCY
57200  else
57201    PKGHANDLER_COMMAND=
57202
57203    case $PKGHANDLER in
57204      apt-get)
57205        apt_help     $MISSING_DEPENDENCY ;;
57206      yum)
57207        yum_help     $MISSING_DEPENDENCY ;;
57208      port)
57209        port_help    $MISSING_DEPENDENCY ;;
57210      pkgutil)
57211        pkgutil_help $MISSING_DEPENDENCY ;;
57212      pkgadd)
57213        pkgadd_help  $MISSING_DEPENDENCY ;;
57214    esac
57215
57216    if test "x$PKGHANDLER_COMMAND" != x; then
57217      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57218    fi
57219  fi
57220
57221      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57222    fi
57223
57224    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57225      OPENWIN_HOME="/usr/openwin"
57226      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57227      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57228          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57229          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57230          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57231    fi
57232
57233    ac_ext=c
57234ac_cpp='$CPP $CPPFLAGS'
57235ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57236ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57237ac_compiler_gnu=$ac_cv_c_compiler_gnu
57238
57239    OLD_CFLAGS="$CFLAGS"
57240    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57241
57242    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57243    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57244do :
57245  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57246ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57247          # include <X11/Xlib.h>
57248          # include <X11/Xutil.h>
57249
57250
57251"
57252if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57253  cat >>confdefs.h <<_ACEOF
57254#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57255_ACEOF
57256 X11_HEADERS_OK=yes
57257else
57258  X11_HEADERS_OK=no; break
57259fi
57260
57261done
57262
57263
57264    if test "x$X11_HEADERS_OK" = xno; then
57265
57266  # Print a helpful message on how to acquire the necessary build dependency.
57267  # x11 is the help tag: freetype, cups, alsa etc
57268  MISSING_DEPENDENCY=x11
57269
57270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57271    cygwin_help $MISSING_DEPENDENCY
57272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57273    msys_help $MISSING_DEPENDENCY
57274  else
57275    PKGHANDLER_COMMAND=
57276
57277    case $PKGHANDLER in
57278      apt-get)
57279        apt_help     $MISSING_DEPENDENCY ;;
57280      yum)
57281        yum_help     $MISSING_DEPENDENCY ;;
57282      port)
57283        port_help    $MISSING_DEPENDENCY ;;
57284      pkgutil)
57285        pkgutil_help $MISSING_DEPENDENCY ;;
57286      pkgadd)
57287        pkgadd_help  $MISSING_DEPENDENCY ;;
57288    esac
57289
57290    if test "x$PKGHANDLER_COMMAND" != x; then
57291      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57292    fi
57293  fi
57294
57295      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57296    fi
57297
57298    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57299    # defined in libawt_xawt.
57300    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57301$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57302    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57303/* end confdefs.h.  */
57304#include <X11/extensions/Xrender.h>
57305int
57306main ()
57307{
57308XLinearGradient x;
57309  ;
57310  return 0;
57311}
57312_ACEOF
57313if ac_fn_c_try_compile "$LINENO"; then :
57314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57315$as_echo "yes" >&6; }
57316else
57317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57318$as_echo "no" >&6; }
57319         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57320fi
57321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57322
57323    CFLAGS="$OLD_CFLAGS"
57324    ac_ext=cpp
57325ac_cpp='$CXXCPP $CPPFLAGS'
57326ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57327ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57328ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57329
57330  fi # NEEDS_LIB_X11
57331
57332
57333
57334
57335
57336
57337# Check whether --with-cups was given.
57338if test "${with_cups+set}" = set; then :
57339  withval=$with_cups;
57340fi
57341
57342
57343# Check whether --with-cups-include was given.
57344if test "${with_cups_include+set}" = set; then :
57345  withval=$with_cups_include;
57346fi
57347
57348
57349  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57350    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57351        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57352      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57353$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57354    fi
57355    CUPS_CFLAGS=
57356  else
57357    CUPS_FOUND=no
57358
57359    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57360      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57361    fi
57362
57363    if test "x${with_cups}" != x; then
57364      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57365$as_echo_n "checking for cups headers... " >&6; }
57366      if test -s "${with_cups}/include/cups/cups.h"; then
57367        CUPS_CFLAGS="-I${with_cups}/include"
57368        CUPS_FOUND=yes
57369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57370$as_echo "$CUPS_FOUND" >&6; }
57371      else
57372        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57373      fi
57374    fi
57375    if test "x${with_cups_include}" != x; then
57376      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57377$as_echo_n "checking for cups headers... " >&6; }
57378      if test -s "${with_cups_include}/cups/cups.h"; then
57379        CUPS_CFLAGS="-I${with_cups_include}"
57380        CUPS_FOUND=yes
57381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57382$as_echo "$CUPS_FOUND" >&6; }
57383      else
57384        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57385      fi
57386    fi
57387    if test "x$CUPS_FOUND" = xno; then
57388      # Are the cups headers installed in the default /usr/include location?
57389      for ac_header in cups/cups.h cups/ppd.h
57390do :
57391  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57392ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57393if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57394  cat >>confdefs.h <<_ACEOF
57395#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57396_ACEOF
57397
57398          CUPS_FOUND=yes
57399          CUPS_CFLAGS=
57400          DEFAULT_CUPS=yes
57401
57402fi
57403
57404done
57405
57406    fi
57407    if test "x$CUPS_FOUND" = xno; then
57408      # Getting nervous now? Lets poke around for standard Solaris third-party
57409      # package installation locations.
57410      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57411$as_echo_n "checking for cups headers... " >&6; }
57412      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
57413        # An SFW package seems to be installed!
57414        CUPS_FOUND=yes
57415        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
57416      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
57417        # A CSW package seems to be installed!
57418        CUPS_FOUND=yes
57419        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
57420      fi
57421      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57422$as_echo "$CUPS_FOUND" >&6; }
57423    fi
57424    if test "x$CUPS_FOUND" = xno; then
57425
57426  # Print a helpful message on how to acquire the necessary build dependency.
57427  # cups is the help tag: freetype, cups, alsa etc
57428  MISSING_DEPENDENCY=cups
57429
57430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57431    cygwin_help $MISSING_DEPENDENCY
57432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57433    msys_help $MISSING_DEPENDENCY
57434  else
57435    PKGHANDLER_COMMAND=
57436
57437    case $PKGHANDLER in
57438      apt-get)
57439        apt_help     $MISSING_DEPENDENCY ;;
57440      yum)
57441        yum_help     $MISSING_DEPENDENCY ;;
57442      port)
57443        port_help    $MISSING_DEPENDENCY ;;
57444      pkgutil)
57445        pkgutil_help $MISSING_DEPENDENCY ;;
57446      pkgadd)
57447        pkgadd_help  $MISSING_DEPENDENCY ;;
57448    esac
57449
57450    if test "x$PKGHANDLER_COMMAND" != x; then
57451      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57452    fi
57453  fi
57454
57455      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57456    fi
57457  fi
57458
57459
57460
57461
57462
57463# Check whether --with-freetype was given.
57464if test "${with_freetype+set}" = set; then :
57465  withval=$with_freetype;
57466fi
57467
57468
57469# Check whether --with-freetype-include was given.
57470if test "${with_freetype_include+set}" = set; then :
57471  withval=$with_freetype_include;
57472fi
57473
57474
57475# Check whether --with-freetype-lib was given.
57476if test "${with_freetype_lib+set}" = set; then :
57477  withval=$with_freetype_lib;
57478fi
57479
57480
57481# Check whether --with-freetype-src was given.
57482if test "${with_freetype_src+set}" = set; then :
57483  withval=$with_freetype_src;
57484fi
57485
57486  # Check whether --enable-freetype-bundling was given.
57487if test "${enable_freetype_bundling+set}" = set; then :
57488  enableval=$enable_freetype_bundling;
57489fi
57490
57491
57492  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57493  FREETYPE_BASE_NAME=freetype
57494  FREETYPE_CFLAGS=
57495  FREETYPE_LIBS=
57496  FREETYPE_BUNDLE_LIB_PATH=
57497
57498  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57499    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57500        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57501        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57502        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57503      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57504$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57505    fi
57506    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57507      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57508$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57509    fi
57510  else
57511    # freetype is needed to build; go get it!
57512
57513    BUNDLE_FREETYPE="$enable_freetype_bundling"
57514
57515    if  test "x$with_freetype_src" != x; then
57516      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57517        # Try to build freetype if --with-freetype-src was given on Windows
57518
57519  FREETYPE_SRC_PATH="$with_freetype_src"
57520  BUILD_FREETYPE=yes
57521
57522  # Check if the freetype sources are acessible..
57523  if ! test -d $FREETYPE_SRC_PATH; then
57524    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
57525$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57526    BUILD_FREETYPE=no
57527  fi
57528  # ..and contain a vc2010 project file
57529  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57530  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57531    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
57532$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57533    BUILD_FREETYPE=no
57534  fi
57535  # Now check if configure found a version of 'msbuild.exe'
57536  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57537    { $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
57538$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;}
57539    BUILD_FREETYPE=no
57540  fi
57541
57542  # Ready to go..
57543  if test "x$BUILD_FREETYPE" = xyes; then
57544    # msbuild requires trailing slashes for output directories
57545    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57546    freetype_lib_path_unix="$freetype_lib_path"
57547    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57548
57549  unix_path="$vcxproj_path"
57550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57551    windows_path=`$CYGPATH -m "$unix_path"`
57552    vcxproj_path="$windows_path"
57553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57554    windows_path=`cmd //c echo $unix_path`
57555    vcxproj_path="$windows_path"
57556  fi
57557
57558
57559  unix_path="$freetype_lib_path"
57560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57561    windows_path=`$CYGPATH -m "$unix_path"`
57562    freetype_lib_path="$windows_path"
57563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57564    windows_path=`cmd //c echo $unix_path`
57565    freetype_lib_path="$windows_path"
57566  fi
57567
57568
57569  unix_path="$freetype_obj_path"
57570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57571    windows_path=`$CYGPATH -m "$unix_path"`
57572    freetype_obj_path="$windows_path"
57573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57574    windows_path=`cmd //c echo $unix_path`
57575    freetype_obj_path="$windows_path"
57576  fi
57577
57578    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57579      freetype_platform=x64
57580    else
57581      freetype_platform=win32
57582    fi
57583
57584    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57585    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57586    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57587    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57588    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57589$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57590
57591    # First we try to build the freetype.dll
57592    $ECHO -e "@echo off\n"\
57593        "$MSBUILD $vcxproj_path "\
57594        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57595        "/p:Configuration=\"Release Multithreaded\" "\
57596        "/p:Platform=$freetype_platform "\
57597        "/p:ConfigurationType=DynamicLibrary "\
57598        "/p:TargetName=freetype "\
57599        "/p:OutDir=\"$freetype_lib_path\" "\
57600        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57601    cmd /c freetype.bat
57602
57603    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57604      # If that succeeds we also build freetype.lib
57605      $ECHO -e "@echo off\n"\
57606          "$MSBUILD $vcxproj_path "\
57607          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57608          "/p:Configuration=\"Release Multithreaded\" "\
57609          "/p:Platform=$freetype_platform "\
57610          "/p:ConfigurationType=StaticLibrary "\
57611          "/p:TargetName=freetype "\
57612          "/p:OutDir=\"$freetype_lib_path\" "\
57613          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57614      cmd /c freetype.bat
57615
57616      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57617        # Once we build both, lib and dll, set freetype lib and include path appropriately
57618        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57619        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57620        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57621$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57622      else
57623        BUILD_FREETYPE=no
57624      fi
57625    else
57626      BUILD_FREETYPE=no
57627    fi
57628  fi
57629
57630        if test "x$BUILD_FREETYPE" = xyes; then
57631          # Okay, we built it. Check that it works.
57632
57633  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57634  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57635  METHOD="--with-freetype-src"
57636
57637  # Let's start with an optimistic view of the world :-)
57638  FOUND_FREETYPE=yes
57639
57640  # First look for the canonical freetype main include file ft2build.h.
57641  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57642    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57643    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57644    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57645      # Fail.
57646      FOUND_FREETYPE=no
57647    fi
57648  fi
57649
57650  if test "x$FOUND_FREETYPE" = xyes; then
57651    # Include file found, let's continue the sanity check.
57652    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57653$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57654
57655    # Reset to default value
57656    FREETYPE_BASE_NAME=freetype
57657    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57658    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57659      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57660          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57661        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57662        # for the .6 version explicitly.
57663        FREETYPE_BASE_NAME=freetype.6
57664        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57665        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57666$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57667      else
57668        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57669$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57670        FOUND_FREETYPE=no
57671      fi
57672    else
57673      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57674        # On Windows, we will need both .lib and .dll file.
57675        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57676          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57677$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57678          FOUND_FREETYPE=no
57679        fi
57680      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57681          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57682        # Found lib in isa dir, use that instead.
57683        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57684        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57685$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57686      fi
57687    fi
57688  fi
57689
57690  if test "x$FOUND_FREETYPE" = xyes; then
57691
57692  # Only process if variable expands to non-empty
57693
57694  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57696
57697  # Input might be given as Windows format, start by converting to
57698  # unix format.
57699  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57700  new_path=`$CYGPATH -u "$path"`
57701
57702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57705  # "foo.exe" is OK but "foo" is an error.
57706  #
57707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57708  # It is also a way to make sure we got the proper file name for the real test later on.
57709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57710  if test "x$test_shortpath" = x; then
57711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57712$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57713    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57714  fi
57715
57716  # Call helper function which possibly converts this using DOS-style short mode.
57717  # If so, the updated path is stored in $new_path.
57718
57719  input_path="$new_path"
57720  # Check if we need to convert this using DOS-style short mode. If the path
57721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57722  # take no chances and rewrite it.
57723  # Note: m4 eats our [], so we need to use [ and ] instead.
57724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57725  if test "x$has_forbidden_chars" != x; then
57726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57730      # Going to short mode and back again did indeed matter. Since short mode is
57731      # case insensitive, let's make it lowercase to improve readability.
57732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57733      # Now convert it back to Unix-style (cygpath)
57734      input_path=`$CYGPATH -u "$shortmode_path"`
57735      new_path="$input_path"
57736    fi
57737  fi
57738
57739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57740  if test "x$test_cygdrive_prefix" = x; then
57741    # As a simple fix, exclude /usr/bin since it's not a real path.
57742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57744      # a path prefixed by /cygdrive for fixpath to work.
57745      new_path="$CYGWIN_ROOT_PATH$input_path"
57746    fi
57747  fi
57748
57749
57750  if test "x$path" != "x$new_path"; then
57751    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57753$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57754  fi
57755
57756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57757
57758  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57759  has_colon=`$ECHO $path | $GREP ^.:`
57760  new_path="$path"
57761  if test "x$has_colon" = x; then
57762    # Not in mixed or Windows style, start by that.
57763    new_path=`cmd //c echo $path`
57764  fi
57765
57766
57767  input_path="$new_path"
57768  # Check if we need to convert this using DOS-style short mode. If the path
57769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57770  # take no chances and rewrite it.
57771  # Note: m4 eats our [], so we need to use [ and ] instead.
57772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57773  if test "x$has_forbidden_chars" != x; then
57774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57776  fi
57777
57778
57779  windows_path="$new_path"
57780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57781    unix_path=`$CYGPATH -u "$windows_path"`
57782    new_path="$unix_path"
57783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57785    new_path="$unix_path"
57786  fi
57787
57788  if test "x$path" != "x$new_path"; then
57789    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57792  fi
57793
57794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57796
57797    else
57798      # We're on a unix platform. Hooray! :)
57799      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57800      has_space=`$ECHO "$path" | $GREP " "`
57801      if test "x$has_space" != x; then
57802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57803$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57805      fi
57806
57807      # Use eval to expand a potential ~
57808      eval path="$path"
57809      if test ! -f "$path" && test ! -d "$path"; then
57810        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57811      fi
57812
57813      if test -d "$path"; then
57814        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57815      else
57816        dir="`$DIRNAME "$path"`"
57817        base="`$BASENAME "$path"`"
57818        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57819      fi
57820    fi
57821  fi
57822
57823
57824  # Only process if variable expands to non-empty
57825
57826  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57827    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57828
57829  # Input might be given as Windows format, start by converting to
57830  # unix format.
57831  path="$POTENTIAL_FREETYPE_LIB_PATH"
57832  new_path=`$CYGPATH -u "$path"`
57833
57834  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57835  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57836  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57837  # "foo.exe" is OK but "foo" is an error.
57838  #
57839  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57840  # It is also a way to make sure we got the proper file name for the real test later on.
57841  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57842  if test "x$test_shortpath" = x; then
57843    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57845    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57846  fi
57847
57848  # Call helper function which possibly converts this using DOS-style short mode.
57849  # If so, the updated path is stored in $new_path.
57850
57851  input_path="$new_path"
57852  # Check if we need to convert this using DOS-style short mode. If the path
57853  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57854  # take no chances and rewrite it.
57855  # Note: m4 eats our [], so we need to use [ and ] instead.
57856  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57857  if test "x$has_forbidden_chars" != x; then
57858    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57859    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57860    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57861    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57862      # Going to short mode and back again did indeed matter. Since short mode is
57863      # case insensitive, let's make it lowercase to improve readability.
57864      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57865      # Now convert it back to Unix-style (cygpath)
57866      input_path=`$CYGPATH -u "$shortmode_path"`
57867      new_path="$input_path"
57868    fi
57869  fi
57870
57871  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57872  if test "x$test_cygdrive_prefix" = x; then
57873    # As a simple fix, exclude /usr/bin since it's not a real path.
57874    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57875      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57876      # a path prefixed by /cygdrive for fixpath to work.
57877      new_path="$CYGWIN_ROOT_PATH$input_path"
57878    fi
57879  fi
57880
57881
57882  if test "x$path" != "x$new_path"; then
57883    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57884    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57885$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57886  fi
57887
57888    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57889
57890  path="$POTENTIAL_FREETYPE_LIB_PATH"
57891  has_colon=`$ECHO $path | $GREP ^.:`
57892  new_path="$path"
57893  if test "x$has_colon" = x; then
57894    # Not in mixed or Windows style, start by that.
57895    new_path=`cmd //c echo $path`
57896  fi
57897
57898
57899  input_path="$new_path"
57900  # Check if we need to convert this using DOS-style short mode. If the path
57901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57902  # take no chances and rewrite it.
57903  # Note: m4 eats our [], so we need to use [ and ] instead.
57904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57905  if test "x$has_forbidden_chars" != x; then
57906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57907    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57908  fi
57909
57910
57911  windows_path="$new_path"
57912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57913    unix_path=`$CYGPATH -u "$windows_path"`
57914    new_path="$unix_path"
57915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57917    new_path="$unix_path"
57918  fi
57919
57920  if test "x$path" != "x$new_path"; then
57921    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57922    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57923$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57924  fi
57925
57926  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57927  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57928
57929    else
57930      # We're on a unix platform. Hooray! :)
57931      path="$POTENTIAL_FREETYPE_LIB_PATH"
57932      has_space=`$ECHO "$path" | $GREP " "`
57933      if test "x$has_space" != x; then
57934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57935$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57936        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57937      fi
57938
57939      # Use eval to expand a potential ~
57940      eval path="$path"
57941      if test ! -f "$path" && test ! -d "$path"; then
57942        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57943      fi
57944
57945      if test -d "$path"; then
57946        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57947      else
57948        dir="`$DIRNAME "$path"`"
57949        base="`$BASENAME "$path"`"
57950        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57951      fi
57952    fi
57953  fi
57954
57955
57956    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57957    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57958$as_echo_n "checking for freetype includes... " >&6; }
57959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57960$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57961    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57963$as_echo_n "checking for freetype libraries... " >&6; }
57964    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57965$as_echo "$FREETYPE_LIB_PATH" >&6; }
57966  fi
57967
57968          if test "x$FOUND_FREETYPE" != xyes; then
57969            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57970          fi
57971        else
57972          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57973$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57974          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57975        fi
57976      else
57977        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57978$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57979      fi
57980    fi
57981
57982    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57983      # User has specified settings
57984
57985      if test "x$BUNDLE_FREETYPE" = x; then
57986        # If not specified, default is to bundle freetype
57987        BUNDLE_FREETYPE=yes
57988      fi
57989
57990      if test "x$with_freetype" != x; then
57991        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57992        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57993      fi
57994
57995      # Allow --with-freetype-lib and --with-freetype-include to override
57996      if test "x$with_freetype_include" != x; then
57997        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57998      fi
57999      if test "x$with_freetype_lib" != x; then
58000        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58001      fi
58002
58003      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58004        # Okay, we got it. Check that it works.
58005
58006  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58007  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58008  METHOD="--with-freetype"
58009
58010  # Let's start with an optimistic view of the world :-)
58011  FOUND_FREETYPE=yes
58012
58013  # First look for the canonical freetype main include file ft2build.h.
58014  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58015    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58016    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58017    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58018      # Fail.
58019      FOUND_FREETYPE=no
58020    fi
58021  fi
58022
58023  if test "x$FOUND_FREETYPE" = xyes; then
58024    # Include file found, let's continue the sanity check.
58025    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58026$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58027
58028    # Reset to default value
58029    FREETYPE_BASE_NAME=freetype
58030    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58031    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58032      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58033          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58034        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58035        # for the .6 version explicitly.
58036        FREETYPE_BASE_NAME=freetype.6
58037        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58038        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58039$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58040      else
58041        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58042$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58043        FOUND_FREETYPE=no
58044      fi
58045    else
58046      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58047        # On Windows, we will need both .lib and .dll file.
58048        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58049          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58050$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58051          FOUND_FREETYPE=no
58052        fi
58053      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58054          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58055        # Found lib in isa dir, use that instead.
58056        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58057        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58058$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58059      fi
58060    fi
58061  fi
58062
58063  if test "x$FOUND_FREETYPE" = xyes; then
58064
58065  # Only process if variable expands to non-empty
58066
58067  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58068    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58069
58070  # Input might be given as Windows format, start by converting to
58071  # unix format.
58072  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58073  new_path=`$CYGPATH -u "$path"`
58074
58075  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58076  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58077  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58078  # "foo.exe" is OK but "foo" is an error.
58079  #
58080  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58081  # It is also a way to make sure we got the proper file name for the real test later on.
58082  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58083  if test "x$test_shortpath" = x; then
58084    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58085$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58086    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58087  fi
58088
58089  # Call helper function which possibly converts this using DOS-style short mode.
58090  # If so, the updated path is stored in $new_path.
58091
58092  input_path="$new_path"
58093  # Check if we need to convert this using DOS-style short mode. If the path
58094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58095  # take no chances and rewrite it.
58096  # Note: m4 eats our [], so we need to use [ and ] instead.
58097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58098  if test "x$has_forbidden_chars" != x; then
58099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58103      # Going to short mode and back again did indeed matter. Since short mode is
58104      # case insensitive, let's make it lowercase to improve readability.
58105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58106      # Now convert it back to Unix-style (cygpath)
58107      input_path=`$CYGPATH -u "$shortmode_path"`
58108      new_path="$input_path"
58109    fi
58110  fi
58111
58112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58113  if test "x$test_cygdrive_prefix" = x; then
58114    # As a simple fix, exclude /usr/bin since it's not a real path.
58115    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58117      # a path prefixed by /cygdrive for fixpath to work.
58118      new_path="$CYGWIN_ROOT_PATH$input_path"
58119    fi
58120  fi
58121
58122
58123  if test "x$path" != "x$new_path"; then
58124    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58127  fi
58128
58129    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58130
58131  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58132  has_colon=`$ECHO $path | $GREP ^.:`
58133  new_path="$path"
58134  if test "x$has_colon" = x; then
58135    # Not in mixed or Windows style, start by that.
58136    new_path=`cmd //c echo $path`
58137  fi
58138
58139
58140  input_path="$new_path"
58141  # Check if we need to convert this using DOS-style short mode. If the path
58142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58143  # take no chances and rewrite it.
58144  # Note: m4 eats our [], so we need to use [ and ] instead.
58145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58146  if test "x$has_forbidden_chars" != x; then
58147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58148    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58149  fi
58150
58151
58152  windows_path="$new_path"
58153  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58154    unix_path=`$CYGPATH -u "$windows_path"`
58155    new_path="$unix_path"
58156  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58157    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58158    new_path="$unix_path"
58159  fi
58160
58161  if test "x$path" != "x$new_path"; then
58162    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58163    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58164$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58165  fi
58166
58167  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58168  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58169
58170    else
58171      # We're on a unix platform. Hooray! :)
58172      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58173      has_space=`$ECHO "$path" | $GREP " "`
58174      if test "x$has_space" != x; then
58175        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58176$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58177        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58178      fi
58179
58180      # Use eval to expand a potential ~
58181      eval path="$path"
58182      if test ! -f "$path" && test ! -d "$path"; then
58183        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58184      fi
58185
58186      if test -d "$path"; then
58187        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58188      else
58189        dir="`$DIRNAME "$path"`"
58190        base="`$BASENAME "$path"`"
58191        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58192      fi
58193    fi
58194  fi
58195
58196
58197  # Only process if variable expands to non-empty
58198
58199  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58201
58202  # Input might be given as Windows format, start by converting to
58203  # unix format.
58204  path="$POTENTIAL_FREETYPE_LIB_PATH"
58205  new_path=`$CYGPATH -u "$path"`
58206
58207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58210  # "foo.exe" is OK but "foo" is an error.
58211  #
58212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58213  # It is also a way to make sure we got the proper file name for the real test later on.
58214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58215  if test "x$test_shortpath" = x; then
58216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58217$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58218    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58219  fi
58220
58221  # Call helper function which possibly converts this using DOS-style short mode.
58222  # If so, the updated path is stored in $new_path.
58223
58224  input_path="$new_path"
58225  # Check if we need to convert this using DOS-style short mode. If the path
58226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58227  # take no chances and rewrite it.
58228  # Note: m4 eats our [], so we need to use [ and ] instead.
58229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58230  if test "x$has_forbidden_chars" != x; then
58231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58235      # Going to short mode and back again did indeed matter. Since short mode is
58236      # case insensitive, let's make it lowercase to improve readability.
58237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58238      # Now convert it back to Unix-style (cygpath)
58239      input_path=`$CYGPATH -u "$shortmode_path"`
58240      new_path="$input_path"
58241    fi
58242  fi
58243
58244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58245  if test "x$test_cygdrive_prefix" = x; then
58246    # As a simple fix, exclude /usr/bin since it's not a real path.
58247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58249      # a path prefixed by /cygdrive for fixpath to work.
58250      new_path="$CYGWIN_ROOT_PATH$input_path"
58251    fi
58252  fi
58253
58254
58255  if test "x$path" != "x$new_path"; then
58256    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58258$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58259  fi
58260
58261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58262
58263  path="$POTENTIAL_FREETYPE_LIB_PATH"
58264  has_colon=`$ECHO $path | $GREP ^.:`
58265  new_path="$path"
58266  if test "x$has_colon" = x; then
58267    # Not in mixed or Windows style, start by that.
58268    new_path=`cmd //c echo $path`
58269  fi
58270
58271
58272  input_path="$new_path"
58273  # Check if we need to convert this using DOS-style short mode. If the path
58274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58275  # take no chances and rewrite it.
58276  # Note: m4 eats our [], so we need to use [ and ] instead.
58277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58278  if test "x$has_forbidden_chars" != x; then
58279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58281  fi
58282
58283
58284  windows_path="$new_path"
58285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58286    unix_path=`$CYGPATH -u "$windows_path"`
58287    new_path="$unix_path"
58288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58290    new_path="$unix_path"
58291  fi
58292
58293  if test "x$path" != "x$new_path"; then
58294    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58296$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58297  fi
58298
58299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58301
58302    else
58303      # We're on a unix platform. Hooray! :)
58304      path="$POTENTIAL_FREETYPE_LIB_PATH"
58305      has_space=`$ECHO "$path" | $GREP " "`
58306      if test "x$has_space" != x; then
58307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58308$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58310      fi
58311
58312      # Use eval to expand a potential ~
58313      eval path="$path"
58314      if test ! -f "$path" && test ! -d "$path"; then
58315        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58316      fi
58317
58318      if test -d "$path"; then
58319        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58320      else
58321        dir="`$DIRNAME "$path"`"
58322        base="`$BASENAME "$path"`"
58323        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58324      fi
58325    fi
58326  fi
58327
58328
58329    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58330    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58331$as_echo_n "checking for freetype includes... " >&6; }
58332    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58333$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58334    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58335    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58336$as_echo_n "checking for freetype libraries... " >&6; }
58337    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58338$as_echo "$FREETYPE_LIB_PATH" >&6; }
58339  fi
58340
58341        if test "x$FOUND_FREETYPE" != xyes; then
58342          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58343        fi
58344      else
58345        # User specified only one of lib or include. This is an error.
58346        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58347          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58348$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58349          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58350        else
58351          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58352$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58353          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58354        fi
58355      fi
58356    else
58357      # User did not specify settings, but we need freetype. Try to locate it.
58358
58359      if test "x$BUNDLE_FREETYPE" = x; then
58360        # If not specified, default is to bundle freetype only on windows
58361        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58362          BUNDLE_FREETYPE=yes
58363        else
58364          BUNDLE_FREETYPE=no
58365        fi
58366      fi
58367
58368      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58369      if test "x$SYSROOT" = x; then
58370        if test "x$FOUND_FREETYPE" != xyes; then
58371          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58372          if test "x$PKG_CONFIG" != x; then
58373
58374pkg_failed=no
58375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58376$as_echo_n "checking for FREETYPE... " >&6; }
58377
58378if test -n "$FREETYPE_CFLAGS"; then
58379    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58380 elif test -n "$PKG_CONFIG"; then
58381    if test -n "$PKG_CONFIG" && \
58382    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58383  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58384  ac_status=$?
58385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58386  test $ac_status = 0; }; then
58387  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58388else
58389  pkg_failed=yes
58390fi
58391 else
58392    pkg_failed=untried
58393fi
58394if test -n "$FREETYPE_LIBS"; then
58395    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58396 elif test -n "$PKG_CONFIG"; then
58397    if test -n "$PKG_CONFIG" && \
58398    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58399  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58400  ac_status=$?
58401  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58402  test $ac_status = 0; }; then
58403  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58404else
58405  pkg_failed=yes
58406fi
58407 else
58408    pkg_failed=untried
58409fi
58410
58411
58412
58413if test $pkg_failed = yes; then
58414
58415if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58416        _pkg_short_errors_supported=yes
58417else
58418        _pkg_short_errors_supported=no
58419fi
58420        if test $_pkg_short_errors_supported = yes; then
58421	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58422        else
58423	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58424        fi
58425	# Put the nasty error message in config.log where it belongs
58426	echo "$FREETYPE_PKG_ERRORS" >&5
58427
58428	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58429$as_echo "no" >&6; }
58430                FOUND_FREETYPE=no
58431elif test $pkg_failed = untried; then
58432	FOUND_FREETYPE=no
58433else
58434	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58435	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58437$as_echo "yes" >&6; }
58438	FOUND_FREETYPE=yes
58439fi
58440            if test "x$FOUND_FREETYPE" = xyes; then
58441              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58442              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58443              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58444              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58445                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58446              fi
58447              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58448              if test "x$BUNDLE_FREETYPE" = xyes; then
58449                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58450$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58451                FOUND_FREETYPE=no
58452              else
58453                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58454$as_echo_n "checking for freetype... " >&6; }
58455                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58456$as_echo "yes (using pkg-config)" >&6; }
58457              fi
58458            fi
58459          fi
58460        fi
58461      fi
58462
58463      if test "x$FOUND_FREETYPE" != xyes; then
58464        # Check in well-known locations
58465        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58466          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58467
58468  windows_path="$FREETYPE_BASE_DIR"
58469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58470    unix_path=`$CYGPATH -u "$windows_path"`
58471    FREETYPE_BASE_DIR="$unix_path"
58472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58474    FREETYPE_BASE_DIR="$unix_path"
58475  fi
58476
58477
58478  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58479  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58480  METHOD="well-known location"
58481
58482  # Let's start with an optimistic view of the world :-)
58483  FOUND_FREETYPE=yes
58484
58485  # First look for the canonical freetype main include file ft2build.h.
58486  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58487    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58488    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58489    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58490      # Fail.
58491      FOUND_FREETYPE=no
58492    fi
58493  fi
58494
58495  if test "x$FOUND_FREETYPE" = xyes; then
58496    # Include file found, let's continue the sanity check.
58497    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58498$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58499
58500    # Reset to default value
58501    FREETYPE_BASE_NAME=freetype
58502    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58503    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58504      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58505          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58506        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58507        # for the .6 version explicitly.
58508        FREETYPE_BASE_NAME=freetype.6
58509        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58510        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58511$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58512      else
58513        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58514$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58515        FOUND_FREETYPE=no
58516      fi
58517    else
58518      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58519        # On Windows, we will need both .lib and .dll file.
58520        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58521          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58522$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58523          FOUND_FREETYPE=no
58524        fi
58525      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58526          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58527        # Found lib in isa dir, use that instead.
58528        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58529        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58530$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58531      fi
58532    fi
58533  fi
58534
58535  if test "x$FOUND_FREETYPE" = xyes; then
58536
58537  # Only process if variable expands to non-empty
58538
58539  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58540    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58541
58542  # Input might be given as Windows format, start by converting to
58543  # unix format.
58544  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58545  new_path=`$CYGPATH -u "$path"`
58546
58547  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58548  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58549  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58550  # "foo.exe" is OK but "foo" is an error.
58551  #
58552  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58553  # It is also a way to make sure we got the proper file name for the real test later on.
58554  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58555  if test "x$test_shortpath" = x; then
58556    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58557$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58558    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58559  fi
58560
58561  # Call helper function which possibly converts this using DOS-style short mode.
58562  # If so, the updated path is stored in $new_path.
58563
58564  input_path="$new_path"
58565  # Check if we need to convert this using DOS-style short mode. If the path
58566  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58567  # take no chances and rewrite it.
58568  # Note: m4 eats our [], so we need to use [ and ] instead.
58569  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58570  if test "x$has_forbidden_chars" != x; then
58571    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58572    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58573    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58574    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58575      # Going to short mode and back again did indeed matter. Since short mode is
58576      # case insensitive, let's make it lowercase to improve readability.
58577      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58578      # Now convert it back to Unix-style (cygpath)
58579      input_path=`$CYGPATH -u "$shortmode_path"`
58580      new_path="$input_path"
58581    fi
58582  fi
58583
58584  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58585  if test "x$test_cygdrive_prefix" = x; then
58586    # As a simple fix, exclude /usr/bin since it's not a real path.
58587    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58588      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58589      # a path prefixed by /cygdrive for fixpath to work.
58590      new_path="$CYGWIN_ROOT_PATH$input_path"
58591    fi
58592  fi
58593
58594
58595  if test "x$path" != "x$new_path"; then
58596    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58598$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58599  fi
58600
58601    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58602
58603  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58604  has_colon=`$ECHO $path | $GREP ^.:`
58605  new_path="$path"
58606  if test "x$has_colon" = x; then
58607    # Not in mixed or Windows style, start by that.
58608    new_path=`cmd //c echo $path`
58609  fi
58610
58611
58612  input_path="$new_path"
58613  # Check if we need to convert this using DOS-style short mode. If the path
58614  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58615  # take no chances and rewrite it.
58616  # Note: m4 eats our [], so we need to use [ and ] instead.
58617  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58618  if test "x$has_forbidden_chars" != x; then
58619    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58620    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58621  fi
58622
58623
58624  windows_path="$new_path"
58625  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58626    unix_path=`$CYGPATH -u "$windows_path"`
58627    new_path="$unix_path"
58628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58629    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58630    new_path="$unix_path"
58631  fi
58632
58633  if test "x$path" != "x$new_path"; then
58634    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58636$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58637  fi
58638
58639  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58640  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58641
58642    else
58643      # We're on a unix platform. Hooray! :)
58644      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58645      has_space=`$ECHO "$path" | $GREP " "`
58646      if test "x$has_space" != x; then
58647        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58649        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58650      fi
58651
58652      # Use eval to expand a potential ~
58653      eval path="$path"
58654      if test ! -f "$path" && test ! -d "$path"; then
58655        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58656      fi
58657
58658      if test -d "$path"; then
58659        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58660      else
58661        dir="`$DIRNAME "$path"`"
58662        base="`$BASENAME "$path"`"
58663        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58664      fi
58665    fi
58666  fi
58667
58668
58669  # Only process if variable expands to non-empty
58670
58671  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58673
58674  # Input might be given as Windows format, start by converting to
58675  # unix format.
58676  path="$POTENTIAL_FREETYPE_LIB_PATH"
58677  new_path=`$CYGPATH -u "$path"`
58678
58679  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58680  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58681  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58682  # "foo.exe" is OK but "foo" is an error.
58683  #
58684  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58685  # It is also a way to make sure we got the proper file name for the real test later on.
58686  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58687  if test "x$test_shortpath" = x; then
58688    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58689$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58690    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58691  fi
58692
58693  # Call helper function which possibly converts this using DOS-style short mode.
58694  # If so, the updated path is stored in $new_path.
58695
58696  input_path="$new_path"
58697  # Check if we need to convert this using DOS-style short mode. If the path
58698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58699  # take no chances and rewrite it.
58700  # Note: m4 eats our [], so we need to use [ and ] instead.
58701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58702  if test "x$has_forbidden_chars" != x; then
58703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58704    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58705    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58706    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58707      # Going to short mode and back again did indeed matter. Since short mode is
58708      # case insensitive, let's make it lowercase to improve readability.
58709      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58710      # Now convert it back to Unix-style (cygpath)
58711      input_path=`$CYGPATH -u "$shortmode_path"`
58712      new_path="$input_path"
58713    fi
58714  fi
58715
58716  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58717  if test "x$test_cygdrive_prefix" = x; then
58718    # As a simple fix, exclude /usr/bin since it's not a real path.
58719    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58720      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58721      # a path prefixed by /cygdrive for fixpath to work.
58722      new_path="$CYGWIN_ROOT_PATH$input_path"
58723    fi
58724  fi
58725
58726
58727  if test "x$path" != "x$new_path"; then
58728    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58729    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58730$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58731  fi
58732
58733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58734
58735  path="$POTENTIAL_FREETYPE_LIB_PATH"
58736  has_colon=`$ECHO $path | $GREP ^.:`
58737  new_path="$path"
58738  if test "x$has_colon" = x; then
58739    # Not in mixed or Windows style, start by that.
58740    new_path=`cmd //c echo $path`
58741  fi
58742
58743
58744  input_path="$new_path"
58745  # Check if we need to convert this using DOS-style short mode. If the path
58746  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58747  # take no chances and rewrite it.
58748  # Note: m4 eats our [], so we need to use [ and ] instead.
58749  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58750  if test "x$has_forbidden_chars" != x; then
58751    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58752    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58753  fi
58754
58755
58756  windows_path="$new_path"
58757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58758    unix_path=`$CYGPATH -u "$windows_path"`
58759    new_path="$unix_path"
58760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58762    new_path="$unix_path"
58763  fi
58764
58765  if test "x$path" != "x$new_path"; then
58766    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58767    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58768$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58769  fi
58770
58771  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58772  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58773
58774    else
58775      # We're on a unix platform. Hooray! :)
58776      path="$POTENTIAL_FREETYPE_LIB_PATH"
58777      has_space=`$ECHO "$path" | $GREP " "`
58778      if test "x$has_space" != x; then
58779        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58780$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58781        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58782      fi
58783
58784      # Use eval to expand a potential ~
58785      eval path="$path"
58786      if test ! -f "$path" && test ! -d "$path"; then
58787        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58788      fi
58789
58790      if test -d "$path"; then
58791        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58792      else
58793        dir="`$DIRNAME "$path"`"
58794        base="`$BASENAME "$path"`"
58795        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58796      fi
58797    fi
58798  fi
58799
58800
58801    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58803$as_echo_n "checking for freetype includes... " >&6; }
58804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58805$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58806    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58807    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58808$as_echo_n "checking for freetype libraries... " >&6; }
58809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58810$as_echo "$FREETYPE_LIB_PATH" >&6; }
58811  fi
58812
58813          if test "x$FOUND_FREETYPE" != xyes; then
58814            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58815
58816  windows_path="$FREETYPE_BASE_DIR"
58817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58818    unix_path=`$CYGPATH -u "$windows_path"`
58819    FREETYPE_BASE_DIR="$unix_path"
58820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58822    FREETYPE_BASE_DIR="$unix_path"
58823  fi
58824
58825
58826  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58827  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58828  METHOD="well-known location"
58829
58830  # Let's start with an optimistic view of the world :-)
58831  FOUND_FREETYPE=yes
58832
58833  # First look for the canonical freetype main include file ft2build.h.
58834  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58835    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58836    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58837    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58838      # Fail.
58839      FOUND_FREETYPE=no
58840    fi
58841  fi
58842
58843  if test "x$FOUND_FREETYPE" = xyes; then
58844    # Include file found, let's continue the sanity check.
58845    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58846$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58847
58848    # Reset to default value
58849    FREETYPE_BASE_NAME=freetype
58850    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58851    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58852      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58854        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58855        # for the .6 version explicitly.
58856        FREETYPE_BASE_NAME=freetype.6
58857        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58858        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58859$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58860      else
58861        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58862$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58863        FOUND_FREETYPE=no
58864      fi
58865    else
58866      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58867        # On Windows, we will need both .lib and .dll file.
58868        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58869          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58871          FOUND_FREETYPE=no
58872        fi
58873      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58874          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58875        # Found lib in isa dir, use that instead.
58876        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58877        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58878$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58879      fi
58880    fi
58881  fi
58882
58883  if test "x$FOUND_FREETYPE" = xyes; then
58884
58885  # Only process if variable expands to non-empty
58886
58887  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58889
58890  # Input might be given as Windows format, start by converting to
58891  # unix format.
58892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58893  new_path=`$CYGPATH -u "$path"`
58894
58895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58898  # "foo.exe" is OK but "foo" is an error.
58899  #
58900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58901  # It is also a way to make sure we got the proper file name for the real test later on.
58902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58903  if test "x$test_shortpath" = x; then
58904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58907  fi
58908
58909  # Call helper function which possibly converts this using DOS-style short mode.
58910  # If so, the updated path is stored in $new_path.
58911
58912  input_path="$new_path"
58913  # Check if we need to convert this using DOS-style short mode. If the path
58914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58915  # take no chances and rewrite it.
58916  # Note: m4 eats our [], so we need to use [ and ] instead.
58917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58918  if test "x$has_forbidden_chars" != x; then
58919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58923      # Going to short mode and back again did indeed matter. Since short mode is
58924      # case insensitive, let's make it lowercase to improve readability.
58925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58926      # Now convert it back to Unix-style (cygpath)
58927      input_path=`$CYGPATH -u "$shortmode_path"`
58928      new_path="$input_path"
58929    fi
58930  fi
58931
58932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58933  if test "x$test_cygdrive_prefix" = x; then
58934    # As a simple fix, exclude /usr/bin since it's not a real path.
58935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58937      # a path prefixed by /cygdrive for fixpath to work.
58938      new_path="$CYGWIN_ROOT_PATH$input_path"
58939    fi
58940  fi
58941
58942
58943  if test "x$path" != "x$new_path"; then
58944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58947  fi
58948
58949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58950
58951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58952  has_colon=`$ECHO $path | $GREP ^.:`
58953  new_path="$path"
58954  if test "x$has_colon" = x; then
58955    # Not in mixed or Windows style, start by that.
58956    new_path=`cmd //c echo $path`
58957  fi
58958
58959
58960  input_path="$new_path"
58961  # Check if we need to convert this using DOS-style short mode. If the path
58962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58963  # take no chances and rewrite it.
58964  # Note: m4 eats our [], so we need to use [ and ] instead.
58965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58966  if test "x$has_forbidden_chars" != x; then
58967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58969  fi
58970
58971
58972  windows_path="$new_path"
58973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58974    unix_path=`$CYGPATH -u "$windows_path"`
58975    new_path="$unix_path"
58976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58978    new_path="$unix_path"
58979  fi
58980
58981  if test "x$path" != "x$new_path"; then
58982    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58985  fi
58986
58987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58989
58990    else
58991      # We're on a unix platform. Hooray! :)
58992      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58993      has_space=`$ECHO "$path" | $GREP " "`
58994      if test "x$has_space" != x; then
58995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58998      fi
58999
59000      # Use eval to expand a potential ~
59001      eval path="$path"
59002      if test ! -f "$path" && test ! -d "$path"; then
59003        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59004      fi
59005
59006      if test -d "$path"; then
59007        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59008      else
59009        dir="`$DIRNAME "$path"`"
59010        base="`$BASENAME "$path"`"
59011        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59012      fi
59013    fi
59014  fi
59015
59016
59017  # Only process if variable expands to non-empty
59018
59019  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59020    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59021
59022  # Input might be given as Windows format, start by converting to
59023  # unix format.
59024  path="$POTENTIAL_FREETYPE_LIB_PATH"
59025  new_path=`$CYGPATH -u "$path"`
59026
59027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59030  # "foo.exe" is OK but "foo" is an error.
59031  #
59032  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59033  # It is also a way to make sure we got the proper file name for the real test later on.
59034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59035  if test "x$test_shortpath" = x; then
59036    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59037$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59038    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59039  fi
59040
59041  # Call helper function which possibly converts this using DOS-style short mode.
59042  # If so, the updated path is stored in $new_path.
59043
59044  input_path="$new_path"
59045  # Check if we need to convert this using DOS-style short mode. If the path
59046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59047  # take no chances and rewrite it.
59048  # Note: m4 eats our [], so we need to use [ and ] instead.
59049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59050  if test "x$has_forbidden_chars" != x; then
59051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59055      # Going to short mode and back again did indeed matter. Since short mode is
59056      # case insensitive, let's make it lowercase to improve readability.
59057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59058      # Now convert it back to Unix-style (cygpath)
59059      input_path=`$CYGPATH -u "$shortmode_path"`
59060      new_path="$input_path"
59061    fi
59062  fi
59063
59064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59065  if test "x$test_cygdrive_prefix" = x; then
59066    # As a simple fix, exclude /usr/bin since it's not a real path.
59067    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59069      # a path prefixed by /cygdrive for fixpath to work.
59070      new_path="$CYGWIN_ROOT_PATH$input_path"
59071    fi
59072  fi
59073
59074
59075  if test "x$path" != "x$new_path"; then
59076    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59077    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59078$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59079  fi
59080
59081    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59082
59083  path="$POTENTIAL_FREETYPE_LIB_PATH"
59084  has_colon=`$ECHO $path | $GREP ^.:`
59085  new_path="$path"
59086  if test "x$has_colon" = x; then
59087    # Not in mixed or Windows style, start by that.
59088    new_path=`cmd //c echo $path`
59089  fi
59090
59091
59092  input_path="$new_path"
59093  # Check if we need to convert this using DOS-style short mode. If the path
59094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59095  # take no chances and rewrite it.
59096  # Note: m4 eats our [], so we need to use [ and ] instead.
59097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59098  if test "x$has_forbidden_chars" != x; then
59099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59100    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59101  fi
59102
59103
59104  windows_path="$new_path"
59105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59106    unix_path=`$CYGPATH -u "$windows_path"`
59107    new_path="$unix_path"
59108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59110    new_path="$unix_path"
59111  fi
59112
59113  if test "x$path" != "x$new_path"; then
59114    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59115    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59116$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59117  fi
59118
59119  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59120  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59121
59122    else
59123      # We're on a unix platform. Hooray! :)
59124      path="$POTENTIAL_FREETYPE_LIB_PATH"
59125      has_space=`$ECHO "$path" | $GREP " "`
59126      if test "x$has_space" != x; then
59127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59129        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59130      fi
59131
59132      # Use eval to expand a potential ~
59133      eval path="$path"
59134      if test ! -f "$path" && test ! -d "$path"; then
59135        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59136      fi
59137
59138      if test -d "$path"; then
59139        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59140      else
59141        dir="`$DIRNAME "$path"`"
59142        base="`$BASENAME "$path"`"
59143        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59144      fi
59145    fi
59146  fi
59147
59148
59149    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59151$as_echo_n "checking for freetype includes... " >&6; }
59152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59153$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59154    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59156$as_echo_n "checking for freetype libraries... " >&6; }
59157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59158$as_echo "$FREETYPE_LIB_PATH" >&6; }
59159  fi
59160
59161          fi
59162          if test "x$FOUND_FREETYPE" != xyes; then
59163            FREETYPE_BASE_DIR="$HOME/freetype"
59164
59165  windows_path="$FREETYPE_BASE_DIR"
59166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59167    unix_path=`$CYGPATH -u "$windows_path"`
59168    FREETYPE_BASE_DIR="$unix_path"
59169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59171    FREETYPE_BASE_DIR="$unix_path"
59172  fi
59173
59174            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59175
59176  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59177  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59178  METHOD="well-known location"
59179
59180  # Let's start with an optimistic view of the world :-)
59181  FOUND_FREETYPE=yes
59182
59183  # First look for the canonical freetype main include file ft2build.h.
59184  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59185    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59186    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59187    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59188      # Fail.
59189      FOUND_FREETYPE=no
59190    fi
59191  fi
59192
59193  if test "x$FOUND_FREETYPE" = xyes; then
59194    # Include file found, let's continue the sanity check.
59195    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59196$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59197
59198    # Reset to default value
59199    FREETYPE_BASE_NAME=freetype
59200    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59201    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59202      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59204        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59205        # for the .6 version explicitly.
59206        FREETYPE_BASE_NAME=freetype.6
59207        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59208        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59209$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59210      else
59211        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59212$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59213        FOUND_FREETYPE=no
59214      fi
59215    else
59216      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59217        # On Windows, we will need both .lib and .dll file.
59218        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59219          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59220$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59221          FOUND_FREETYPE=no
59222        fi
59223      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59224          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59225        # Found lib in isa dir, use that instead.
59226        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59227        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59228$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59229      fi
59230    fi
59231  fi
59232
59233  if test "x$FOUND_FREETYPE" = xyes; then
59234
59235  # Only process if variable expands to non-empty
59236
59237  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59239
59240  # Input might be given as Windows format, start by converting to
59241  # unix format.
59242  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59243  new_path=`$CYGPATH -u "$path"`
59244
59245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59248  # "foo.exe" is OK but "foo" is an error.
59249  #
59250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59251  # It is also a way to make sure we got the proper file name for the real test later on.
59252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59253  if test "x$test_shortpath" = x; then
59254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59255$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59256    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59257  fi
59258
59259  # Call helper function which possibly converts this using DOS-style short mode.
59260  # If so, the updated path is stored in $new_path.
59261
59262  input_path="$new_path"
59263  # Check if we need to convert this using DOS-style short mode. If the path
59264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59265  # take no chances and rewrite it.
59266  # Note: m4 eats our [], so we need to use [ and ] instead.
59267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59268  if test "x$has_forbidden_chars" != x; then
59269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59273      # Going to short mode and back again did indeed matter. Since short mode is
59274      # case insensitive, let's make it lowercase to improve readability.
59275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59276      # Now convert it back to Unix-style (cygpath)
59277      input_path=`$CYGPATH -u "$shortmode_path"`
59278      new_path="$input_path"
59279    fi
59280  fi
59281
59282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59283  if test "x$test_cygdrive_prefix" = x; then
59284    # As a simple fix, exclude /usr/bin since it's not a real path.
59285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59287      # a path prefixed by /cygdrive for fixpath to work.
59288      new_path="$CYGWIN_ROOT_PATH$input_path"
59289    fi
59290  fi
59291
59292
59293  if test "x$path" != "x$new_path"; then
59294    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59296$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59297  fi
59298
59299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59300
59301  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59302  has_colon=`$ECHO $path | $GREP ^.:`
59303  new_path="$path"
59304  if test "x$has_colon" = x; then
59305    # Not in mixed or Windows style, start by that.
59306    new_path=`cmd //c echo $path`
59307  fi
59308
59309
59310  input_path="$new_path"
59311  # Check if we need to convert this using DOS-style short mode. If the path
59312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59313  # take no chances and rewrite it.
59314  # Note: m4 eats our [], so we need to use [ and ] instead.
59315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59316  if test "x$has_forbidden_chars" != x; then
59317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59319  fi
59320
59321
59322  windows_path="$new_path"
59323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59324    unix_path=`$CYGPATH -u "$windows_path"`
59325    new_path="$unix_path"
59326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59328    new_path="$unix_path"
59329  fi
59330
59331  if test "x$path" != "x$new_path"; then
59332    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59334$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59335  fi
59336
59337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59339
59340    else
59341      # We're on a unix platform. Hooray! :)
59342      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59343      has_space=`$ECHO "$path" | $GREP " "`
59344      if test "x$has_space" != x; then
59345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59346$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59347        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59348      fi
59349
59350      # Use eval to expand a potential ~
59351      eval path="$path"
59352      if test ! -f "$path" && test ! -d "$path"; then
59353        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59354      fi
59355
59356      if test -d "$path"; then
59357        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59358      else
59359        dir="`$DIRNAME "$path"`"
59360        base="`$BASENAME "$path"`"
59361        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59362      fi
59363    fi
59364  fi
59365
59366
59367  # Only process if variable expands to non-empty
59368
59369  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59371
59372  # Input might be given as Windows format, start by converting to
59373  # unix format.
59374  path="$POTENTIAL_FREETYPE_LIB_PATH"
59375  new_path=`$CYGPATH -u "$path"`
59376
59377  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59378  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59379  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59380  # "foo.exe" is OK but "foo" is an error.
59381  #
59382  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59383  # It is also a way to make sure we got the proper file name for the real test later on.
59384  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59385  if test "x$test_shortpath" = x; then
59386    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59387$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59388    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59389  fi
59390
59391  # Call helper function which possibly converts this using DOS-style short mode.
59392  # If so, the updated path is stored in $new_path.
59393
59394  input_path="$new_path"
59395  # Check if we need to convert this using DOS-style short mode. If the path
59396  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59397  # take no chances and rewrite it.
59398  # Note: m4 eats our [], so we need to use [ and ] instead.
59399  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59400  if test "x$has_forbidden_chars" != x; then
59401    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59402    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59403    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59404    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59405      # Going to short mode and back again did indeed matter. Since short mode is
59406      # case insensitive, let's make it lowercase to improve readability.
59407      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59408      # Now convert it back to Unix-style (cygpath)
59409      input_path=`$CYGPATH -u "$shortmode_path"`
59410      new_path="$input_path"
59411    fi
59412  fi
59413
59414  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59415  if test "x$test_cygdrive_prefix" = x; then
59416    # As a simple fix, exclude /usr/bin since it's not a real path.
59417    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59418      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59419      # a path prefixed by /cygdrive for fixpath to work.
59420      new_path="$CYGWIN_ROOT_PATH$input_path"
59421    fi
59422  fi
59423
59424
59425  if test "x$path" != "x$new_path"; then
59426    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59427    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59428$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59429  fi
59430
59431    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59432
59433  path="$POTENTIAL_FREETYPE_LIB_PATH"
59434  has_colon=`$ECHO $path | $GREP ^.:`
59435  new_path="$path"
59436  if test "x$has_colon" = x; then
59437    # Not in mixed or Windows style, start by that.
59438    new_path=`cmd //c echo $path`
59439  fi
59440
59441
59442  input_path="$new_path"
59443  # Check if we need to convert this using DOS-style short mode. If the path
59444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59445  # take no chances and rewrite it.
59446  # Note: m4 eats our [], so we need to use [ and ] instead.
59447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59448  if test "x$has_forbidden_chars" != x; then
59449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59450    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59451  fi
59452
59453
59454  windows_path="$new_path"
59455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59456    unix_path=`$CYGPATH -u "$windows_path"`
59457    new_path="$unix_path"
59458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59460    new_path="$unix_path"
59461  fi
59462
59463  if test "x$path" != "x$new_path"; then
59464    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59465    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59466$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59467  fi
59468
59469  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59470  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59471
59472    else
59473      # We're on a unix platform. Hooray! :)
59474      path="$POTENTIAL_FREETYPE_LIB_PATH"
59475      has_space=`$ECHO "$path" | $GREP " "`
59476      if test "x$has_space" != x; then
59477        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59478$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59479        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59480      fi
59481
59482      # Use eval to expand a potential ~
59483      eval path="$path"
59484      if test ! -f "$path" && test ! -d "$path"; then
59485        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59486      fi
59487
59488      if test -d "$path"; then
59489        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59490      else
59491        dir="`$DIRNAME "$path"`"
59492        base="`$BASENAME "$path"`"
59493        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59494      fi
59495    fi
59496  fi
59497
59498
59499    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59501$as_echo_n "checking for freetype includes... " >&6; }
59502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59503$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59504    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59505    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59506$as_echo_n "checking for freetype libraries... " >&6; }
59507    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59508$as_echo "$FREETYPE_LIB_PATH" >&6; }
59509  fi
59510
59511            else
59512
59513  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59514  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59515  METHOD="well-known location"
59516
59517  # Let's start with an optimistic view of the world :-)
59518  FOUND_FREETYPE=yes
59519
59520  # First look for the canonical freetype main include file ft2build.h.
59521  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59522    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59523    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59524    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59525      # Fail.
59526      FOUND_FREETYPE=no
59527    fi
59528  fi
59529
59530  if test "x$FOUND_FREETYPE" = xyes; then
59531    # Include file found, let's continue the sanity check.
59532    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59533$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59534
59535    # Reset to default value
59536    FREETYPE_BASE_NAME=freetype
59537    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59538    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59539      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59540          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59541        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59542        # for the .6 version explicitly.
59543        FREETYPE_BASE_NAME=freetype.6
59544        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59545        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59546$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59547      else
59548        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59549$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59550        FOUND_FREETYPE=no
59551      fi
59552    else
59553      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59554        # On Windows, we will need both .lib and .dll file.
59555        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59556          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59557$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59558          FOUND_FREETYPE=no
59559        fi
59560      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59561          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59562        # Found lib in isa dir, use that instead.
59563        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59564        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59565$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59566      fi
59567    fi
59568  fi
59569
59570  if test "x$FOUND_FREETYPE" = xyes; then
59571
59572  # Only process if variable expands to non-empty
59573
59574  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59575    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59576
59577  # Input might be given as Windows format, start by converting to
59578  # unix format.
59579  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59580  new_path=`$CYGPATH -u "$path"`
59581
59582  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59583  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59584  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59585  # "foo.exe" is OK but "foo" is an error.
59586  #
59587  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59588  # It is also a way to make sure we got the proper file name for the real test later on.
59589  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59590  if test "x$test_shortpath" = x; then
59591    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59592$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59593    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59594  fi
59595
59596  # Call helper function which possibly converts this using DOS-style short mode.
59597  # If so, the updated path is stored in $new_path.
59598
59599  input_path="$new_path"
59600  # Check if we need to convert this using DOS-style short mode. If the path
59601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59602  # take no chances and rewrite it.
59603  # Note: m4 eats our [], so we need to use [ and ] instead.
59604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59605  if test "x$has_forbidden_chars" != x; then
59606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59607    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59608    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59609    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59610      # Going to short mode and back again did indeed matter. Since short mode is
59611      # case insensitive, let's make it lowercase to improve readability.
59612      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59613      # Now convert it back to Unix-style (cygpath)
59614      input_path=`$CYGPATH -u "$shortmode_path"`
59615      new_path="$input_path"
59616    fi
59617  fi
59618
59619  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59620  if test "x$test_cygdrive_prefix" = x; then
59621    # As a simple fix, exclude /usr/bin since it's not a real path.
59622    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59623      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59624      # a path prefixed by /cygdrive for fixpath to work.
59625      new_path="$CYGWIN_ROOT_PATH$input_path"
59626    fi
59627  fi
59628
59629
59630  if test "x$path" != "x$new_path"; then
59631    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59633$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59634  fi
59635
59636    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59637
59638  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59639  has_colon=`$ECHO $path | $GREP ^.:`
59640  new_path="$path"
59641  if test "x$has_colon" = x; then
59642    # Not in mixed or Windows style, start by that.
59643    new_path=`cmd //c echo $path`
59644  fi
59645
59646
59647  input_path="$new_path"
59648  # Check if we need to convert this using DOS-style short mode. If the path
59649  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59650  # take no chances and rewrite it.
59651  # Note: m4 eats our [], so we need to use [ and ] instead.
59652  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59653  if test "x$has_forbidden_chars" != x; then
59654    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59655    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59656  fi
59657
59658
59659  windows_path="$new_path"
59660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59661    unix_path=`$CYGPATH -u "$windows_path"`
59662    new_path="$unix_path"
59663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59665    new_path="$unix_path"
59666  fi
59667
59668  if test "x$path" != "x$new_path"; then
59669    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59670    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59671$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59672  fi
59673
59674  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59675  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59676
59677    else
59678      # We're on a unix platform. Hooray! :)
59679      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59680      has_space=`$ECHO "$path" | $GREP " "`
59681      if test "x$has_space" != x; then
59682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59683$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59684        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59685      fi
59686
59687      # Use eval to expand a potential ~
59688      eval path="$path"
59689      if test ! -f "$path" && test ! -d "$path"; then
59690        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59691      fi
59692
59693      if test -d "$path"; then
59694        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59695      else
59696        dir="`$DIRNAME "$path"`"
59697        base="`$BASENAME "$path"`"
59698        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59699      fi
59700    fi
59701  fi
59702
59703
59704  # Only process if variable expands to non-empty
59705
59706  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59708
59709  # Input might be given as Windows format, start by converting to
59710  # unix format.
59711  path="$POTENTIAL_FREETYPE_LIB_PATH"
59712  new_path=`$CYGPATH -u "$path"`
59713
59714  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59715  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59716  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59717  # "foo.exe" is OK but "foo" is an error.
59718  #
59719  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59720  # It is also a way to make sure we got the proper file name for the real test later on.
59721  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59722  if test "x$test_shortpath" = x; then
59723    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59724$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59725    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59726  fi
59727
59728  # Call helper function which possibly converts this using DOS-style short mode.
59729  # If so, the updated path is stored in $new_path.
59730
59731  input_path="$new_path"
59732  # Check if we need to convert this using DOS-style short mode. If the path
59733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59734  # take no chances and rewrite it.
59735  # Note: m4 eats our [], so we need to use [ and ] instead.
59736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59737  if test "x$has_forbidden_chars" != x; then
59738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59742      # Going to short mode and back again did indeed matter. Since short mode is
59743      # case insensitive, let's make it lowercase to improve readability.
59744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59745      # Now convert it back to Unix-style (cygpath)
59746      input_path=`$CYGPATH -u "$shortmode_path"`
59747      new_path="$input_path"
59748    fi
59749  fi
59750
59751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59752  if test "x$test_cygdrive_prefix" = x; then
59753    # As a simple fix, exclude /usr/bin since it's not a real path.
59754    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59756      # a path prefixed by /cygdrive for fixpath to work.
59757      new_path="$CYGWIN_ROOT_PATH$input_path"
59758    fi
59759  fi
59760
59761
59762  if test "x$path" != "x$new_path"; then
59763    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59765$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59766  fi
59767
59768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59769
59770  path="$POTENTIAL_FREETYPE_LIB_PATH"
59771  has_colon=`$ECHO $path | $GREP ^.:`
59772  new_path="$path"
59773  if test "x$has_colon" = x; then
59774    # Not in mixed or Windows style, start by that.
59775    new_path=`cmd //c echo $path`
59776  fi
59777
59778
59779  input_path="$new_path"
59780  # Check if we need to convert this using DOS-style short mode. If the path
59781  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59782  # take no chances and rewrite it.
59783  # Note: m4 eats our [], so we need to use [ and ] instead.
59784  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59785  if test "x$has_forbidden_chars" != x; then
59786    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59787    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59788  fi
59789
59790
59791  windows_path="$new_path"
59792  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59793    unix_path=`$CYGPATH -u "$windows_path"`
59794    new_path="$unix_path"
59795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59796    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59797    new_path="$unix_path"
59798  fi
59799
59800  if test "x$path" != "x$new_path"; then
59801    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59802    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59803$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59804  fi
59805
59806  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59807  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59808
59809    else
59810      # We're on a unix platform. Hooray! :)
59811      path="$POTENTIAL_FREETYPE_LIB_PATH"
59812      has_space=`$ECHO "$path" | $GREP " "`
59813      if test "x$has_space" != x; then
59814        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59815$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59816        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59817      fi
59818
59819      # Use eval to expand a potential ~
59820      eval path="$path"
59821      if test ! -f "$path" && test ! -d "$path"; then
59822        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59823      fi
59824
59825      if test -d "$path"; then
59826        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59827      else
59828        dir="`$DIRNAME "$path"`"
59829        base="`$BASENAME "$path"`"
59830        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59831      fi
59832    fi
59833  fi
59834
59835
59836    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59838$as_echo_n "checking for freetype includes... " >&6; }
59839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59840$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59841    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59843$as_echo_n "checking for freetype libraries... " >&6; }
59844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59845$as_echo "$FREETYPE_LIB_PATH" >&6; }
59846  fi
59847
59848            fi
59849            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59850                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59851              # Source is available, as a last resort try to build freetype in default location
59852
59853  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59854  BUILD_FREETYPE=yes
59855
59856  # Check if the freetype sources are acessible..
59857  if ! test -d $FREETYPE_SRC_PATH; then
59858    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&5
59859$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59860    BUILD_FREETYPE=no
59861  fi
59862  # ..and contain a vc2010 project file
59863  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59864  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59865    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&5
59866$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59867    BUILD_FREETYPE=no
59868  fi
59869  # Now check if configure found a version of 'msbuild.exe'
59870  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59871    { $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
59872$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;}
59873    BUILD_FREETYPE=no
59874  fi
59875
59876  # Ready to go..
59877  if test "x$BUILD_FREETYPE" = xyes; then
59878    # msbuild requires trailing slashes for output directories
59879    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59880    freetype_lib_path_unix="$freetype_lib_path"
59881    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59882
59883  unix_path="$vcxproj_path"
59884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59885    windows_path=`$CYGPATH -m "$unix_path"`
59886    vcxproj_path="$windows_path"
59887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59888    windows_path=`cmd //c echo $unix_path`
59889    vcxproj_path="$windows_path"
59890  fi
59891
59892
59893  unix_path="$freetype_lib_path"
59894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59895    windows_path=`$CYGPATH -m "$unix_path"`
59896    freetype_lib_path="$windows_path"
59897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59898    windows_path=`cmd //c echo $unix_path`
59899    freetype_lib_path="$windows_path"
59900  fi
59901
59902
59903  unix_path="$freetype_obj_path"
59904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59905    windows_path=`$CYGPATH -m "$unix_path"`
59906    freetype_obj_path="$windows_path"
59907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59908    windows_path=`cmd //c echo $unix_path`
59909    freetype_obj_path="$windows_path"
59910  fi
59911
59912    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59913      freetype_platform=x64
59914    else
59915      freetype_platform=win32
59916    fi
59917
59918    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59919    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59920    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59921    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59922    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59923$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59924
59925    # First we try to build the freetype.dll
59926    $ECHO -e "@echo off\n"\
59927        "$MSBUILD $vcxproj_path "\
59928        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59929        "/p:Configuration=\"Release Multithreaded\" "\
59930        "/p:Platform=$freetype_platform "\
59931        "/p:ConfigurationType=DynamicLibrary "\
59932        "/p:TargetName=freetype "\
59933        "/p:OutDir=\"$freetype_lib_path\" "\
59934        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59935    cmd /c freetype.bat
59936
59937    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59938      # If that succeeds we also build freetype.lib
59939      $ECHO -e "@echo off\n"\
59940          "$MSBUILD $vcxproj_path "\
59941          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59942          "/p:Configuration=\"Release Multithreaded\" "\
59943          "/p:Platform=$freetype_platform "\
59944          "/p:ConfigurationType=StaticLibrary "\
59945          "/p:TargetName=freetype "\
59946          "/p:OutDir=\"$freetype_lib_path\" "\
59947          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59948      cmd /c freetype.bat
59949
59950      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59951        # Once we build both, lib and dll, set freetype lib and include path appropriately
59952        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59953        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59954        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59955$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59956      else
59957        BUILD_FREETYPE=no
59958      fi
59959    else
59960      BUILD_FREETYPE=no
59961    fi
59962  fi
59963
59964              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59965
59966  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59967  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59968  METHOD="well-known location"
59969
59970  # Let's start with an optimistic view of the world :-)
59971  FOUND_FREETYPE=yes
59972
59973  # First look for the canonical freetype main include file ft2build.h.
59974  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59975    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59976    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59977    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59978      # Fail.
59979      FOUND_FREETYPE=no
59980    fi
59981  fi
59982
59983  if test "x$FOUND_FREETYPE" = xyes; then
59984    # Include file found, let's continue the sanity check.
59985    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59986$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59987
59988    # Reset to default value
59989    FREETYPE_BASE_NAME=freetype
59990    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59991    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59992      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59993          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59994        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59995        # for the .6 version explicitly.
59996        FREETYPE_BASE_NAME=freetype.6
59997        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59998        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59999$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60000      else
60001        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60002$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60003        FOUND_FREETYPE=no
60004      fi
60005    else
60006      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60007        # On Windows, we will need both .lib and .dll file.
60008        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60009          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60010$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60011          FOUND_FREETYPE=no
60012        fi
60013      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60014          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60015        # Found lib in isa dir, use that instead.
60016        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60017        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60018$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60019      fi
60020    fi
60021  fi
60022
60023  if test "x$FOUND_FREETYPE" = xyes; then
60024
60025  # Only process if variable expands to non-empty
60026
60027  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60029
60030  # Input might be given as Windows format, start by converting to
60031  # unix format.
60032  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60033  new_path=`$CYGPATH -u "$path"`
60034
60035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60038  # "foo.exe" is OK but "foo" is an error.
60039  #
60040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60041  # It is also a way to make sure we got the proper file name for the real test later on.
60042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60043  if test "x$test_shortpath" = x; then
60044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60046    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60047  fi
60048
60049  # Call helper function which possibly converts this using DOS-style short mode.
60050  # If so, the updated path is stored in $new_path.
60051
60052  input_path="$new_path"
60053  # Check if we need to convert this using DOS-style short mode. If the path
60054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60055  # take no chances and rewrite it.
60056  # Note: m4 eats our [], so we need to use [ and ] instead.
60057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60058  if test "x$has_forbidden_chars" != x; then
60059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60063      # Going to short mode and back again did indeed matter. Since short mode is
60064      # case insensitive, let's make it lowercase to improve readability.
60065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60066      # Now convert it back to Unix-style (cygpath)
60067      input_path=`$CYGPATH -u "$shortmode_path"`
60068      new_path="$input_path"
60069    fi
60070  fi
60071
60072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60073  if test "x$test_cygdrive_prefix" = x; then
60074    # As a simple fix, exclude /usr/bin since it's not a real path.
60075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60077      # a path prefixed by /cygdrive for fixpath to work.
60078      new_path="$CYGWIN_ROOT_PATH$input_path"
60079    fi
60080  fi
60081
60082
60083  if test "x$path" != "x$new_path"; then
60084    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60087  fi
60088
60089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60090
60091  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60092  has_colon=`$ECHO $path | $GREP ^.:`
60093  new_path="$path"
60094  if test "x$has_colon" = x; then
60095    # Not in mixed or Windows style, start by that.
60096    new_path=`cmd //c echo $path`
60097  fi
60098
60099
60100  input_path="$new_path"
60101  # Check if we need to convert this using DOS-style short mode. If the path
60102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60103  # take no chances and rewrite it.
60104  # Note: m4 eats our [], so we need to use [ and ] instead.
60105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60106  if test "x$has_forbidden_chars" != x; then
60107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60109  fi
60110
60111
60112  windows_path="$new_path"
60113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60114    unix_path=`$CYGPATH -u "$windows_path"`
60115    new_path="$unix_path"
60116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60118    new_path="$unix_path"
60119  fi
60120
60121  if test "x$path" != "x$new_path"; then
60122    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60124$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60125  fi
60126
60127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60129
60130    else
60131      # We're on a unix platform. Hooray! :)
60132      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60133      has_space=`$ECHO "$path" | $GREP " "`
60134      if test "x$has_space" != x; then
60135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60136$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60138      fi
60139
60140      # Use eval to expand a potential ~
60141      eval path="$path"
60142      if test ! -f "$path" && test ! -d "$path"; then
60143        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60144      fi
60145
60146      if test -d "$path"; then
60147        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60148      else
60149        dir="`$DIRNAME "$path"`"
60150        base="`$BASENAME "$path"`"
60151        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60152      fi
60153    fi
60154  fi
60155
60156
60157  # Only process if variable expands to non-empty
60158
60159  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60160    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60161
60162  # Input might be given as Windows format, start by converting to
60163  # unix format.
60164  path="$POTENTIAL_FREETYPE_LIB_PATH"
60165  new_path=`$CYGPATH -u "$path"`
60166
60167  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60168  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60169  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60170  # "foo.exe" is OK but "foo" is an error.
60171  #
60172  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60173  # It is also a way to make sure we got the proper file name for the real test later on.
60174  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60175  if test "x$test_shortpath" = x; then
60176    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60178    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60179  fi
60180
60181  # Call helper function which possibly converts this using DOS-style short mode.
60182  # If so, the updated path is stored in $new_path.
60183
60184  input_path="$new_path"
60185  # Check if we need to convert this using DOS-style short mode. If the path
60186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60187  # take no chances and rewrite it.
60188  # Note: m4 eats our [], so we need to use [ and ] instead.
60189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60190  if test "x$has_forbidden_chars" != x; then
60191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60195      # Going to short mode and back again did indeed matter. Since short mode is
60196      # case insensitive, let's make it lowercase to improve readability.
60197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60198      # Now convert it back to Unix-style (cygpath)
60199      input_path=`$CYGPATH -u "$shortmode_path"`
60200      new_path="$input_path"
60201    fi
60202  fi
60203
60204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60205  if test "x$test_cygdrive_prefix" = x; then
60206    # As a simple fix, exclude /usr/bin since it's not a real path.
60207    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60209      # a path prefixed by /cygdrive for fixpath to work.
60210      new_path="$CYGWIN_ROOT_PATH$input_path"
60211    fi
60212  fi
60213
60214
60215  if test "x$path" != "x$new_path"; then
60216    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60217    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60218$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60219  fi
60220
60221    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60222
60223  path="$POTENTIAL_FREETYPE_LIB_PATH"
60224  has_colon=`$ECHO $path | $GREP ^.:`
60225  new_path="$path"
60226  if test "x$has_colon" = x; then
60227    # Not in mixed or Windows style, start by that.
60228    new_path=`cmd //c echo $path`
60229  fi
60230
60231
60232  input_path="$new_path"
60233  # Check if we need to convert this using DOS-style short mode. If the path
60234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60235  # take no chances and rewrite it.
60236  # Note: m4 eats our [], so we need to use [ and ] instead.
60237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60238  if test "x$has_forbidden_chars" != x; then
60239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60240    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60241  fi
60242
60243
60244  windows_path="$new_path"
60245  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60246    unix_path=`$CYGPATH -u "$windows_path"`
60247    new_path="$unix_path"
60248  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60249    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60250    new_path="$unix_path"
60251  fi
60252
60253  if test "x$path" != "x$new_path"; then
60254    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60257  fi
60258
60259  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60260  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60261
60262    else
60263      # We're on a unix platform. Hooray! :)
60264      path="$POTENTIAL_FREETYPE_LIB_PATH"
60265      has_space=`$ECHO "$path" | $GREP " "`
60266      if test "x$has_space" != x; then
60267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60268$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60269        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60270      fi
60271
60272      # Use eval to expand a potential ~
60273      eval path="$path"
60274      if test ! -f "$path" && test ! -d "$path"; then
60275        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60276      fi
60277
60278      if test -d "$path"; then
60279        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60280      else
60281        dir="`$DIRNAME "$path"`"
60282        base="`$BASENAME "$path"`"
60283        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60284      fi
60285    fi
60286  fi
60287
60288
60289    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60290    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60291$as_echo_n "checking for freetype includes... " >&6; }
60292    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60293$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60294    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60295    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60296$as_echo_n "checking for freetype libraries... " >&6; }
60297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60298$as_echo "$FREETYPE_LIB_PATH" >&6; }
60299  fi
60300
60301              else
60302
60303  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60304  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60305  METHOD="well-known location"
60306
60307  # Let's start with an optimistic view of the world :-)
60308  FOUND_FREETYPE=yes
60309
60310  # First look for the canonical freetype main include file ft2build.h.
60311  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60312    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60313    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60314    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60315      # Fail.
60316      FOUND_FREETYPE=no
60317    fi
60318  fi
60319
60320  if test "x$FOUND_FREETYPE" = xyes; then
60321    # Include file found, let's continue the sanity check.
60322    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60323$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60324
60325    # Reset to default value
60326    FREETYPE_BASE_NAME=freetype
60327    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60328    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60329      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60330          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60331        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60332        # for the .6 version explicitly.
60333        FREETYPE_BASE_NAME=freetype.6
60334        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60335        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60336$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60337      else
60338        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60339$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60340        FOUND_FREETYPE=no
60341      fi
60342    else
60343      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60344        # On Windows, we will need both .lib and .dll file.
60345        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60346          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60347$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60348          FOUND_FREETYPE=no
60349        fi
60350      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60351          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60352        # Found lib in isa dir, use that instead.
60353        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60354        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60355$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60356      fi
60357    fi
60358  fi
60359
60360  if test "x$FOUND_FREETYPE" = xyes; then
60361
60362  # Only process if variable expands to non-empty
60363
60364  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60366
60367  # Input might be given as Windows format, start by converting to
60368  # unix format.
60369  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60370  new_path=`$CYGPATH -u "$path"`
60371
60372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60375  # "foo.exe" is OK but "foo" is an error.
60376  #
60377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60378  # It is also a way to make sure we got the proper file name for the real test later on.
60379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60380  if test "x$test_shortpath" = x; then
60381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60383    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60384  fi
60385
60386  # Call helper function which possibly converts this using DOS-style short mode.
60387  # If so, the updated path is stored in $new_path.
60388
60389  input_path="$new_path"
60390  # Check if we need to convert this using DOS-style short mode. If the path
60391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60392  # take no chances and rewrite it.
60393  # Note: m4 eats our [], so we need to use [ and ] instead.
60394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60395  if test "x$has_forbidden_chars" != x; then
60396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60400      # Going to short mode and back again did indeed matter. Since short mode is
60401      # case insensitive, let's make it lowercase to improve readability.
60402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60403      # Now convert it back to Unix-style (cygpath)
60404      input_path=`$CYGPATH -u "$shortmode_path"`
60405      new_path="$input_path"
60406    fi
60407  fi
60408
60409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60410  if test "x$test_cygdrive_prefix" = x; then
60411    # As a simple fix, exclude /usr/bin since it's not a real path.
60412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60414      # a path prefixed by /cygdrive for fixpath to work.
60415      new_path="$CYGWIN_ROOT_PATH$input_path"
60416    fi
60417  fi
60418
60419
60420  if test "x$path" != "x$new_path"; then
60421    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60424  fi
60425
60426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60427
60428  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60429  has_colon=`$ECHO $path | $GREP ^.:`
60430  new_path="$path"
60431  if test "x$has_colon" = x; then
60432    # Not in mixed or Windows style, start by that.
60433    new_path=`cmd //c echo $path`
60434  fi
60435
60436
60437  input_path="$new_path"
60438  # Check if we need to convert this using DOS-style short mode. If the path
60439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60440  # take no chances and rewrite it.
60441  # Note: m4 eats our [], so we need to use [ and ] instead.
60442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60443  if test "x$has_forbidden_chars" != x; then
60444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60446  fi
60447
60448
60449  windows_path="$new_path"
60450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60451    unix_path=`$CYGPATH -u "$windows_path"`
60452    new_path="$unix_path"
60453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60455    new_path="$unix_path"
60456  fi
60457
60458  if test "x$path" != "x$new_path"; then
60459    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60462  fi
60463
60464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60466
60467    else
60468      # We're on a unix platform. Hooray! :)
60469      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60470      has_space=`$ECHO "$path" | $GREP " "`
60471      if test "x$has_space" != x; then
60472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60475      fi
60476
60477      # Use eval to expand a potential ~
60478      eval path="$path"
60479      if test ! -f "$path" && test ! -d "$path"; then
60480        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60481      fi
60482
60483      if test -d "$path"; then
60484        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60485      else
60486        dir="`$DIRNAME "$path"`"
60487        base="`$BASENAME "$path"`"
60488        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60489      fi
60490    fi
60491  fi
60492
60493
60494  # Only process if variable expands to non-empty
60495
60496  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60497    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60498
60499  # Input might be given as Windows format, start by converting to
60500  # unix format.
60501  path="$POTENTIAL_FREETYPE_LIB_PATH"
60502  new_path=`$CYGPATH -u "$path"`
60503
60504  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60505  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60506  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60507  # "foo.exe" is OK but "foo" is an error.
60508  #
60509  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60510  # It is also a way to make sure we got the proper file name for the real test later on.
60511  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60512  if test "x$test_shortpath" = x; then
60513    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60515    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60516  fi
60517
60518  # Call helper function which possibly converts this using DOS-style short mode.
60519  # If so, the updated path is stored in $new_path.
60520
60521  input_path="$new_path"
60522  # Check if we need to convert this using DOS-style short mode. If the path
60523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60524  # take no chances and rewrite it.
60525  # Note: m4 eats our [], so we need to use [ and ] instead.
60526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60527  if test "x$has_forbidden_chars" != x; then
60528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60529    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60530    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60531    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60532      # Going to short mode and back again did indeed matter. Since short mode is
60533      # case insensitive, let's make it lowercase to improve readability.
60534      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60535      # Now convert it back to Unix-style (cygpath)
60536      input_path=`$CYGPATH -u "$shortmode_path"`
60537      new_path="$input_path"
60538    fi
60539  fi
60540
60541  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60542  if test "x$test_cygdrive_prefix" = x; then
60543    # As a simple fix, exclude /usr/bin since it's not a real path.
60544    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60545      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60546      # a path prefixed by /cygdrive for fixpath to work.
60547      new_path="$CYGWIN_ROOT_PATH$input_path"
60548    fi
60549  fi
60550
60551
60552  if test "x$path" != "x$new_path"; then
60553    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60555$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60556  fi
60557
60558    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60559
60560  path="$POTENTIAL_FREETYPE_LIB_PATH"
60561  has_colon=`$ECHO $path | $GREP ^.:`
60562  new_path="$path"
60563  if test "x$has_colon" = x; then
60564    # Not in mixed or Windows style, start by that.
60565    new_path=`cmd //c echo $path`
60566  fi
60567
60568
60569  input_path="$new_path"
60570  # Check if we need to convert this using DOS-style short mode. If the path
60571  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60572  # take no chances and rewrite it.
60573  # Note: m4 eats our [], so we need to use [ and ] instead.
60574  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60575  if test "x$has_forbidden_chars" != x; then
60576    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60577    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60578  fi
60579
60580
60581  windows_path="$new_path"
60582  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60583    unix_path=`$CYGPATH -u "$windows_path"`
60584    new_path="$unix_path"
60585  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60586    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60587    new_path="$unix_path"
60588  fi
60589
60590  if test "x$path" != "x$new_path"; then
60591    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60594  fi
60595
60596  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60597  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60598
60599    else
60600      # We're on a unix platform. Hooray! :)
60601      path="$POTENTIAL_FREETYPE_LIB_PATH"
60602      has_space=`$ECHO "$path" | $GREP " "`
60603      if test "x$has_space" != x; then
60604        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60605$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60606        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60607      fi
60608
60609      # Use eval to expand a potential ~
60610      eval path="$path"
60611      if test ! -f "$path" && test ! -d "$path"; then
60612        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60613      fi
60614
60615      if test -d "$path"; then
60616        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60617      else
60618        dir="`$DIRNAME "$path"`"
60619        base="`$BASENAME "$path"`"
60620        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60621      fi
60622    fi
60623  fi
60624
60625
60626    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60627    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60628$as_echo_n "checking for freetype includes... " >&6; }
60629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60630$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60631    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60632    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60633$as_echo_n "checking for freetype libraries... " >&6; }
60634    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60635$as_echo "$FREETYPE_LIB_PATH" >&6; }
60636  fi
60637
60638              fi
60639            fi
60640          fi
60641        else
60642          FREETYPE_BASE_DIR="$SYSROOT/usr"
60643
60644  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60645  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60646  METHOD="well-known location"
60647
60648  # Let's start with an optimistic view of the world :-)
60649  FOUND_FREETYPE=yes
60650
60651  # First look for the canonical freetype main include file ft2build.h.
60652  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60653    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60654    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60655    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60656      # Fail.
60657      FOUND_FREETYPE=no
60658    fi
60659  fi
60660
60661  if test "x$FOUND_FREETYPE" = xyes; then
60662    # Include file found, let's continue the sanity check.
60663    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60664$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60665
60666    # Reset to default value
60667    FREETYPE_BASE_NAME=freetype
60668    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60669    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60670      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60671          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60672        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60673        # for the .6 version explicitly.
60674        FREETYPE_BASE_NAME=freetype.6
60675        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60676        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60677$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60678      else
60679        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60680$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60681        FOUND_FREETYPE=no
60682      fi
60683    else
60684      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60685        # On Windows, we will need both .lib and .dll file.
60686        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60687          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60688$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60689          FOUND_FREETYPE=no
60690        fi
60691      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60692          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60693        # Found lib in isa dir, use that instead.
60694        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60695        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60696$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60697      fi
60698    fi
60699  fi
60700
60701  if test "x$FOUND_FREETYPE" = xyes; then
60702
60703  # Only process if variable expands to non-empty
60704
60705  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60706    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60707
60708  # Input might be given as Windows format, start by converting to
60709  # unix format.
60710  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60711  new_path=`$CYGPATH -u "$path"`
60712
60713  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60714  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60715  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60716  # "foo.exe" is OK but "foo" is an error.
60717  #
60718  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60719  # It is also a way to make sure we got the proper file name for the real test later on.
60720  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60721  if test "x$test_shortpath" = x; then
60722    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60723$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60724    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60725  fi
60726
60727  # Call helper function which possibly converts this using DOS-style short mode.
60728  # If so, the updated path is stored in $new_path.
60729
60730  input_path="$new_path"
60731  # Check if we need to convert this using DOS-style short mode. If the path
60732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60733  # take no chances and rewrite it.
60734  # Note: m4 eats our [], so we need to use [ and ] instead.
60735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60736  if test "x$has_forbidden_chars" != x; then
60737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60738    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60739    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60740    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60741      # Going to short mode and back again did indeed matter. Since short mode is
60742      # case insensitive, let's make it lowercase to improve readability.
60743      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60744      # Now convert it back to Unix-style (cygpath)
60745      input_path=`$CYGPATH -u "$shortmode_path"`
60746      new_path="$input_path"
60747    fi
60748  fi
60749
60750  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60751  if test "x$test_cygdrive_prefix" = x; then
60752    # As a simple fix, exclude /usr/bin since it's not a real path.
60753    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60754      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60755      # a path prefixed by /cygdrive for fixpath to work.
60756      new_path="$CYGWIN_ROOT_PATH$input_path"
60757    fi
60758  fi
60759
60760
60761  if test "x$path" != "x$new_path"; then
60762    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60765  fi
60766
60767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60768
60769  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60770  has_colon=`$ECHO $path | $GREP ^.:`
60771  new_path="$path"
60772  if test "x$has_colon" = x; then
60773    # Not in mixed or Windows style, start by that.
60774    new_path=`cmd //c echo $path`
60775  fi
60776
60777
60778  input_path="$new_path"
60779  # Check if we need to convert this using DOS-style short mode. If the path
60780  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60781  # take no chances and rewrite it.
60782  # Note: m4 eats our [], so we need to use [ and ] instead.
60783  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60784  if test "x$has_forbidden_chars" != x; then
60785    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60786    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60787  fi
60788
60789
60790  windows_path="$new_path"
60791  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60792    unix_path=`$CYGPATH -u "$windows_path"`
60793    new_path="$unix_path"
60794  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60795    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60796    new_path="$unix_path"
60797  fi
60798
60799  if test "x$path" != "x$new_path"; then
60800    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60801    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60802$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60803  fi
60804
60805  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60806  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60807
60808    else
60809      # We're on a unix platform. Hooray! :)
60810      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60811      has_space=`$ECHO "$path" | $GREP " "`
60812      if test "x$has_space" != x; then
60813        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60814$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60815        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60816      fi
60817
60818      # Use eval to expand a potential ~
60819      eval path="$path"
60820      if test ! -f "$path" && test ! -d "$path"; then
60821        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60822      fi
60823
60824      if test -d "$path"; then
60825        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60826      else
60827        dir="`$DIRNAME "$path"`"
60828        base="`$BASENAME "$path"`"
60829        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60830      fi
60831    fi
60832  fi
60833
60834
60835  # Only process if variable expands to non-empty
60836
60837  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60838    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60839
60840  # Input might be given as Windows format, start by converting to
60841  # unix format.
60842  path="$POTENTIAL_FREETYPE_LIB_PATH"
60843  new_path=`$CYGPATH -u "$path"`
60844
60845  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60846  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60847  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60848  # "foo.exe" is OK but "foo" is an error.
60849  #
60850  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60851  # It is also a way to make sure we got the proper file name for the real test later on.
60852  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60853  if test "x$test_shortpath" = x; then
60854    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60855$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60856    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60857  fi
60858
60859  # Call helper function which possibly converts this using DOS-style short mode.
60860  # If so, the updated path is stored in $new_path.
60861
60862  input_path="$new_path"
60863  # Check if we need to convert this using DOS-style short mode. If the path
60864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60865  # take no chances and rewrite it.
60866  # Note: m4 eats our [], so we need to use [ and ] instead.
60867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60868  if test "x$has_forbidden_chars" != x; then
60869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60870    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60871    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60872    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60873      # Going to short mode and back again did indeed matter. Since short mode is
60874      # case insensitive, let's make it lowercase to improve readability.
60875      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60876      # Now convert it back to Unix-style (cygpath)
60877      input_path=`$CYGPATH -u "$shortmode_path"`
60878      new_path="$input_path"
60879    fi
60880  fi
60881
60882  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60883  if test "x$test_cygdrive_prefix" = x; then
60884    # As a simple fix, exclude /usr/bin since it's not a real path.
60885    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60886      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60887      # a path prefixed by /cygdrive for fixpath to work.
60888      new_path="$CYGWIN_ROOT_PATH$input_path"
60889    fi
60890  fi
60891
60892
60893  if test "x$path" != "x$new_path"; then
60894    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60896$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60897  fi
60898
60899    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60900
60901  path="$POTENTIAL_FREETYPE_LIB_PATH"
60902  has_colon=`$ECHO $path | $GREP ^.:`
60903  new_path="$path"
60904  if test "x$has_colon" = x; then
60905    # Not in mixed or Windows style, start by that.
60906    new_path=`cmd //c echo $path`
60907  fi
60908
60909
60910  input_path="$new_path"
60911  # Check if we need to convert this using DOS-style short mode. If the path
60912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60913  # take no chances and rewrite it.
60914  # Note: m4 eats our [], so we need to use [ and ] instead.
60915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60916  if test "x$has_forbidden_chars" != x; then
60917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60919  fi
60920
60921
60922  windows_path="$new_path"
60923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60924    unix_path=`$CYGPATH -u "$windows_path"`
60925    new_path="$unix_path"
60926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60928    new_path="$unix_path"
60929  fi
60930
60931  if test "x$path" != "x$new_path"; then
60932    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60934$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60935  fi
60936
60937  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60938  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60939
60940    else
60941      # We're on a unix platform. Hooray! :)
60942      path="$POTENTIAL_FREETYPE_LIB_PATH"
60943      has_space=`$ECHO "$path" | $GREP " "`
60944      if test "x$has_space" != x; then
60945        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60946$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60947        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60948      fi
60949
60950      # Use eval to expand a potential ~
60951      eval path="$path"
60952      if test ! -f "$path" && test ! -d "$path"; then
60953        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60954      fi
60955
60956      if test -d "$path"; then
60957        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60958      else
60959        dir="`$DIRNAME "$path"`"
60960        base="`$BASENAME "$path"`"
60961        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60962      fi
60963    fi
60964  fi
60965
60966
60967    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60968    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60969$as_echo_n "checking for freetype includes... " >&6; }
60970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60971$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60972    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60973    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60974$as_echo_n "checking for freetype libraries... " >&6; }
60975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60976$as_echo "$FREETYPE_LIB_PATH" >&6; }
60977  fi
60978
60979
60980          if test "x$FOUND_FREETYPE" != xyes; then
60981            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60982
60983  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60984  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60985  METHOD="well-known location"
60986
60987  # Let's start with an optimistic view of the world :-)
60988  FOUND_FREETYPE=yes
60989
60990  # First look for the canonical freetype main include file ft2build.h.
60991  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60992    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60993    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60994    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60995      # Fail.
60996      FOUND_FREETYPE=no
60997    fi
60998  fi
60999
61000  if test "x$FOUND_FREETYPE" = xyes; then
61001    # Include file found, let's continue the sanity check.
61002    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61003$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61004
61005    # Reset to default value
61006    FREETYPE_BASE_NAME=freetype
61007    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61008    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61009      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61010          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61011        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61012        # for the .6 version explicitly.
61013        FREETYPE_BASE_NAME=freetype.6
61014        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61015        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61016$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61017      else
61018        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61019$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61020        FOUND_FREETYPE=no
61021      fi
61022    else
61023      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61024        # On Windows, we will need both .lib and .dll file.
61025        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61026          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61027$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61028          FOUND_FREETYPE=no
61029        fi
61030      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61031          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61032        # Found lib in isa dir, use that instead.
61033        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61034        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61035$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61036      fi
61037    fi
61038  fi
61039
61040  if test "x$FOUND_FREETYPE" = xyes; then
61041
61042  # Only process if variable expands to non-empty
61043
61044  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61045    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61046
61047  # Input might be given as Windows format, start by converting to
61048  # unix format.
61049  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61050  new_path=`$CYGPATH -u "$path"`
61051
61052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61055  # "foo.exe" is OK but "foo" is an error.
61056  #
61057  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61058  # It is also a way to make sure we got the proper file name for the real test later on.
61059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61060  if test "x$test_shortpath" = x; then
61061    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61062$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61063    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61064  fi
61065
61066  # Call helper function which possibly converts this using DOS-style short mode.
61067  # If so, the updated path is stored in $new_path.
61068
61069  input_path="$new_path"
61070  # Check if we need to convert this using DOS-style short mode. If the path
61071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61072  # take no chances and rewrite it.
61073  # Note: m4 eats our [], so we need to use [ and ] instead.
61074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61075  if test "x$has_forbidden_chars" != x; then
61076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61077    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61078    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61079    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61080      # Going to short mode and back again did indeed matter. Since short mode is
61081      # case insensitive, let's make it lowercase to improve readability.
61082      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61083      # Now convert it back to Unix-style (cygpath)
61084      input_path=`$CYGPATH -u "$shortmode_path"`
61085      new_path="$input_path"
61086    fi
61087  fi
61088
61089  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61090  if test "x$test_cygdrive_prefix" = x; then
61091    # As a simple fix, exclude /usr/bin since it's not a real path.
61092    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61093      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61094      # a path prefixed by /cygdrive for fixpath to work.
61095      new_path="$CYGWIN_ROOT_PATH$input_path"
61096    fi
61097  fi
61098
61099
61100  if test "x$path" != "x$new_path"; then
61101    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61102    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61103$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61104  fi
61105
61106    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61107
61108  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61109  has_colon=`$ECHO $path | $GREP ^.:`
61110  new_path="$path"
61111  if test "x$has_colon" = x; then
61112    # Not in mixed or Windows style, start by that.
61113    new_path=`cmd //c echo $path`
61114  fi
61115
61116
61117  input_path="$new_path"
61118  # Check if we need to convert this using DOS-style short mode. If the path
61119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61120  # take no chances and rewrite it.
61121  # Note: m4 eats our [], so we need to use [ and ] instead.
61122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61123  if test "x$has_forbidden_chars" != x; then
61124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61126  fi
61127
61128
61129  windows_path="$new_path"
61130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61131    unix_path=`$CYGPATH -u "$windows_path"`
61132    new_path="$unix_path"
61133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61135    new_path="$unix_path"
61136  fi
61137
61138  if test "x$path" != "x$new_path"; then
61139    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61140    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61141$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61142  fi
61143
61144  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61145  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61146
61147    else
61148      # We're on a unix platform. Hooray! :)
61149      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61150      has_space=`$ECHO "$path" | $GREP " "`
61151      if test "x$has_space" != x; then
61152        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61153$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61154        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61155      fi
61156
61157      # Use eval to expand a potential ~
61158      eval path="$path"
61159      if test ! -f "$path" && test ! -d "$path"; then
61160        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61161      fi
61162
61163      if test -d "$path"; then
61164        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61165      else
61166        dir="`$DIRNAME "$path"`"
61167        base="`$BASENAME "$path"`"
61168        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61169      fi
61170    fi
61171  fi
61172
61173
61174  # Only process if variable expands to non-empty
61175
61176  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61178
61179  # Input might be given as Windows format, start by converting to
61180  # unix format.
61181  path="$POTENTIAL_FREETYPE_LIB_PATH"
61182  new_path=`$CYGPATH -u "$path"`
61183
61184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61187  # "foo.exe" is OK but "foo" is an error.
61188  #
61189  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61190  # It is also a way to make sure we got the proper file name for the real test later on.
61191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61192  if test "x$test_shortpath" = x; then
61193    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61194$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61195    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61196  fi
61197
61198  # Call helper function which possibly converts this using DOS-style short mode.
61199  # If so, the updated path is stored in $new_path.
61200
61201  input_path="$new_path"
61202  # Check if we need to convert this using DOS-style short mode. If the path
61203  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61204  # take no chances and rewrite it.
61205  # Note: m4 eats our [], so we need to use [ and ] instead.
61206  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61207  if test "x$has_forbidden_chars" != x; then
61208    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61209    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61210    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61211    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61212      # Going to short mode and back again did indeed matter. Since short mode is
61213      # case insensitive, let's make it lowercase to improve readability.
61214      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61215      # Now convert it back to Unix-style (cygpath)
61216      input_path=`$CYGPATH -u "$shortmode_path"`
61217      new_path="$input_path"
61218    fi
61219  fi
61220
61221  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61222  if test "x$test_cygdrive_prefix" = x; then
61223    # As a simple fix, exclude /usr/bin since it's not a real path.
61224    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61225      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61226      # a path prefixed by /cygdrive for fixpath to work.
61227      new_path="$CYGWIN_ROOT_PATH$input_path"
61228    fi
61229  fi
61230
61231
61232  if test "x$path" != "x$new_path"; then
61233    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61234    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61235$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61236  fi
61237
61238    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61239
61240  path="$POTENTIAL_FREETYPE_LIB_PATH"
61241  has_colon=`$ECHO $path | $GREP ^.:`
61242  new_path="$path"
61243  if test "x$has_colon" = x; then
61244    # Not in mixed or Windows style, start by that.
61245    new_path=`cmd //c echo $path`
61246  fi
61247
61248
61249  input_path="$new_path"
61250  # Check if we need to convert this using DOS-style short mode. If the path
61251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61252  # take no chances and rewrite it.
61253  # Note: m4 eats our [], so we need to use [ and ] instead.
61254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61255  if test "x$has_forbidden_chars" != x; then
61256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61257    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61258  fi
61259
61260
61261  windows_path="$new_path"
61262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61263    unix_path=`$CYGPATH -u "$windows_path"`
61264    new_path="$unix_path"
61265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61266    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61267    new_path="$unix_path"
61268  fi
61269
61270  if test "x$path" != "x$new_path"; then
61271    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61274  fi
61275
61276  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61277  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61278
61279    else
61280      # We're on a unix platform. Hooray! :)
61281      path="$POTENTIAL_FREETYPE_LIB_PATH"
61282      has_space=`$ECHO "$path" | $GREP " "`
61283      if test "x$has_space" != x; then
61284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61285$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61286        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61287      fi
61288
61289      # Use eval to expand a potential ~
61290      eval path="$path"
61291      if test ! -f "$path" && test ! -d "$path"; then
61292        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61293      fi
61294
61295      if test -d "$path"; then
61296        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61297      else
61298        dir="`$DIRNAME "$path"`"
61299        base="`$BASENAME "$path"`"
61300        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61301      fi
61302    fi
61303  fi
61304
61305
61306    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61307    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61308$as_echo_n "checking for freetype includes... " >&6; }
61309    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61310$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61311    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61312    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61313$as_echo_n "checking for freetype libraries... " >&6; }
61314    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61315$as_echo "$FREETYPE_LIB_PATH" >&6; }
61316  fi
61317
61318          fi
61319
61320          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61321            if test "x$FOUND_FREETYPE" != xyes; then
61322              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61323              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61324
61325  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61326  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61327  METHOD="well-known location"
61328
61329  # Let's start with an optimistic view of the world :-)
61330  FOUND_FREETYPE=yes
61331
61332  # First look for the canonical freetype main include file ft2build.h.
61333  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61334    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61335    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61336    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61337      # Fail.
61338      FOUND_FREETYPE=no
61339    fi
61340  fi
61341
61342  if test "x$FOUND_FREETYPE" = xyes; then
61343    # Include file found, let's continue the sanity check.
61344    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61345$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61346
61347    # Reset to default value
61348    FREETYPE_BASE_NAME=freetype
61349    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61350    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61351      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61352          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61353        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61354        # for the .6 version explicitly.
61355        FREETYPE_BASE_NAME=freetype.6
61356        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61357        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61358$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61359      else
61360        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61361$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61362        FOUND_FREETYPE=no
61363      fi
61364    else
61365      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61366        # On Windows, we will need both .lib and .dll file.
61367        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61368          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61369$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61370          FOUND_FREETYPE=no
61371        fi
61372      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61373          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61374        # Found lib in isa dir, use that instead.
61375        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61376        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61377$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61378      fi
61379    fi
61380  fi
61381
61382  if test "x$FOUND_FREETYPE" = xyes; then
61383
61384  # Only process if variable expands to non-empty
61385
61386  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61387    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61388
61389  # Input might be given as Windows format, start by converting to
61390  # unix format.
61391  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61392  new_path=`$CYGPATH -u "$path"`
61393
61394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61397  # "foo.exe" is OK but "foo" is an error.
61398  #
61399  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61400  # It is also a way to make sure we got the proper file name for the real test later on.
61401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61402  if test "x$test_shortpath" = x; then
61403    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61404$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61405    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61406  fi
61407
61408  # Call helper function which possibly converts this using DOS-style short mode.
61409  # If so, the updated path is stored in $new_path.
61410
61411  input_path="$new_path"
61412  # Check if we need to convert this using DOS-style short mode. If the path
61413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61414  # take no chances and rewrite it.
61415  # Note: m4 eats our [], so we need to use [ and ] instead.
61416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61417  if test "x$has_forbidden_chars" != x; then
61418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61419    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61420    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61421    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61422      # Going to short mode and back again did indeed matter. Since short mode is
61423      # case insensitive, let's make it lowercase to improve readability.
61424      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61425      # Now convert it back to Unix-style (cygpath)
61426      input_path=`$CYGPATH -u "$shortmode_path"`
61427      new_path="$input_path"
61428    fi
61429  fi
61430
61431  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61432  if test "x$test_cygdrive_prefix" = x; then
61433    # As a simple fix, exclude /usr/bin since it's not a real path.
61434    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61435      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61436      # a path prefixed by /cygdrive for fixpath to work.
61437      new_path="$CYGWIN_ROOT_PATH$input_path"
61438    fi
61439  fi
61440
61441
61442  if test "x$path" != "x$new_path"; then
61443    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61445$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61446  fi
61447
61448    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61449
61450  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61451  has_colon=`$ECHO $path | $GREP ^.:`
61452  new_path="$path"
61453  if test "x$has_colon" = x; then
61454    # Not in mixed or Windows style, start by that.
61455    new_path=`cmd //c echo $path`
61456  fi
61457
61458
61459  input_path="$new_path"
61460  # Check if we need to convert this using DOS-style short mode. If the path
61461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61462  # take no chances and rewrite it.
61463  # Note: m4 eats our [], so we need to use [ and ] instead.
61464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61465  if test "x$has_forbidden_chars" != x; then
61466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61467    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61468  fi
61469
61470
61471  windows_path="$new_path"
61472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61473    unix_path=`$CYGPATH -u "$windows_path"`
61474    new_path="$unix_path"
61475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61477    new_path="$unix_path"
61478  fi
61479
61480  if test "x$path" != "x$new_path"; then
61481    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61483$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61484  fi
61485
61486  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61487  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61488
61489    else
61490      # We're on a unix platform. Hooray! :)
61491      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61492      has_space=`$ECHO "$path" | $GREP " "`
61493      if test "x$has_space" != x; then
61494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61495$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61496        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61497      fi
61498
61499      # Use eval to expand a potential ~
61500      eval path="$path"
61501      if test ! -f "$path" && test ! -d "$path"; then
61502        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61503      fi
61504
61505      if test -d "$path"; then
61506        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61507      else
61508        dir="`$DIRNAME "$path"`"
61509        base="`$BASENAME "$path"`"
61510        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61511      fi
61512    fi
61513  fi
61514
61515
61516  # Only process if variable expands to non-empty
61517
61518  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61519    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61520
61521  # Input might be given as Windows format, start by converting to
61522  # unix format.
61523  path="$POTENTIAL_FREETYPE_LIB_PATH"
61524  new_path=`$CYGPATH -u "$path"`
61525
61526  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61527  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61528  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61529  # "foo.exe" is OK but "foo" is an error.
61530  #
61531  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61532  # It is also a way to make sure we got the proper file name for the real test later on.
61533  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61534  if test "x$test_shortpath" = x; then
61535    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61536$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61537    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61538  fi
61539
61540  # Call helper function which possibly converts this using DOS-style short mode.
61541  # If so, the updated path is stored in $new_path.
61542
61543  input_path="$new_path"
61544  # Check if we need to convert this using DOS-style short mode. If the path
61545  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61546  # take no chances and rewrite it.
61547  # Note: m4 eats our [], so we need to use [ and ] instead.
61548  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61549  if test "x$has_forbidden_chars" != x; then
61550    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61551    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61552    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61553    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61554      # Going to short mode and back again did indeed matter. Since short mode is
61555      # case insensitive, let's make it lowercase to improve readability.
61556      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61557      # Now convert it back to Unix-style (cygpath)
61558      input_path=`$CYGPATH -u "$shortmode_path"`
61559      new_path="$input_path"
61560    fi
61561  fi
61562
61563  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61564  if test "x$test_cygdrive_prefix" = x; then
61565    # As a simple fix, exclude /usr/bin since it's not a real path.
61566    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61567      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61568      # a path prefixed by /cygdrive for fixpath to work.
61569      new_path="$CYGWIN_ROOT_PATH$input_path"
61570    fi
61571  fi
61572
61573
61574  if test "x$path" != "x$new_path"; then
61575    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61576    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61577$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61578  fi
61579
61580    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61581
61582  path="$POTENTIAL_FREETYPE_LIB_PATH"
61583  has_colon=`$ECHO $path | $GREP ^.:`
61584  new_path="$path"
61585  if test "x$has_colon" = x; then
61586    # Not in mixed or Windows style, start by that.
61587    new_path=`cmd //c echo $path`
61588  fi
61589
61590
61591  input_path="$new_path"
61592  # Check if we need to convert this using DOS-style short mode. If the path
61593  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61594  # take no chances and rewrite it.
61595  # Note: m4 eats our [], so we need to use [ and ] instead.
61596  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61597  if test "x$has_forbidden_chars" != x; then
61598    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61599    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61600  fi
61601
61602
61603  windows_path="$new_path"
61604  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61605    unix_path=`$CYGPATH -u "$windows_path"`
61606    new_path="$unix_path"
61607  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61608    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61609    new_path="$unix_path"
61610  fi
61611
61612  if test "x$path" != "x$new_path"; then
61613    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61614    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61615$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61616  fi
61617
61618  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61619  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61620
61621    else
61622      # We're on a unix platform. Hooray! :)
61623      path="$POTENTIAL_FREETYPE_LIB_PATH"
61624      has_space=`$ECHO "$path" | $GREP " "`
61625      if test "x$has_space" != x; then
61626        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61628        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61629      fi
61630
61631      # Use eval to expand a potential ~
61632      eval path="$path"
61633      if test ! -f "$path" && test ! -d "$path"; then
61634        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61635      fi
61636
61637      if test -d "$path"; then
61638        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61639      else
61640        dir="`$DIRNAME "$path"`"
61641        base="`$BASENAME "$path"`"
61642        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61643      fi
61644    fi
61645  fi
61646
61647
61648    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61649    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61650$as_echo_n "checking for freetype includes... " >&6; }
61651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61652$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61653    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61654    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61655$as_echo_n "checking for freetype libraries... " >&6; }
61656    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61657$as_echo "$FREETYPE_LIB_PATH" >&6; }
61658  fi
61659
61660            fi
61661          fi
61662
61663          if test "x$FOUND_FREETYPE" != xyes; then
61664            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61665
61666  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61667  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61668  METHOD="well-known location"
61669
61670  # Let's start with an optimistic view of the world :-)
61671  FOUND_FREETYPE=yes
61672
61673  # First look for the canonical freetype main include file ft2build.h.
61674  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61675    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61676    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61677    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61678      # Fail.
61679      FOUND_FREETYPE=no
61680    fi
61681  fi
61682
61683  if test "x$FOUND_FREETYPE" = xyes; then
61684    # Include file found, let's continue the sanity check.
61685    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61686$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61687
61688    # Reset to default value
61689    FREETYPE_BASE_NAME=freetype
61690    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61691    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61692      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61693          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61694        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61695        # for the .6 version explicitly.
61696        FREETYPE_BASE_NAME=freetype.6
61697        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61698        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61699$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61700      else
61701        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61702$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61703        FOUND_FREETYPE=no
61704      fi
61705    else
61706      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61707        # On Windows, we will need both .lib and .dll file.
61708        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61709          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61710$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61711          FOUND_FREETYPE=no
61712        fi
61713      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61714          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61715        # Found lib in isa dir, use that instead.
61716        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61717        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61718$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61719      fi
61720    fi
61721  fi
61722
61723  if test "x$FOUND_FREETYPE" = xyes; then
61724
61725  # Only process if variable expands to non-empty
61726
61727  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61729
61730  # Input might be given as Windows format, start by converting to
61731  # unix format.
61732  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61733  new_path=`$CYGPATH -u "$path"`
61734
61735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61738  # "foo.exe" is OK but "foo" is an error.
61739  #
61740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61741  # It is also a way to make sure we got the proper file name for the real test later on.
61742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61743  if test "x$test_shortpath" = x; then
61744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61746    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61747  fi
61748
61749  # Call helper function which possibly converts this using DOS-style short mode.
61750  # If so, the updated path is stored in $new_path.
61751
61752  input_path="$new_path"
61753  # Check if we need to convert this using DOS-style short mode. If the path
61754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61755  # take no chances and rewrite it.
61756  # Note: m4 eats our [], so we need to use [ and ] instead.
61757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61758  if test "x$has_forbidden_chars" != x; then
61759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61763      # Going to short mode and back again did indeed matter. Since short mode is
61764      # case insensitive, let's make it lowercase to improve readability.
61765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61766      # Now convert it back to Unix-style (cygpath)
61767      input_path=`$CYGPATH -u "$shortmode_path"`
61768      new_path="$input_path"
61769    fi
61770  fi
61771
61772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61773  if test "x$test_cygdrive_prefix" = x; then
61774    # As a simple fix, exclude /usr/bin since it's not a real path.
61775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61777      # a path prefixed by /cygdrive for fixpath to work.
61778      new_path="$CYGWIN_ROOT_PATH$input_path"
61779    fi
61780  fi
61781
61782
61783  if test "x$path" != "x$new_path"; then
61784    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61787  fi
61788
61789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61790
61791  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61792  has_colon=`$ECHO $path | $GREP ^.:`
61793  new_path="$path"
61794  if test "x$has_colon" = x; then
61795    # Not in mixed or Windows style, start by that.
61796    new_path=`cmd //c echo $path`
61797  fi
61798
61799
61800  input_path="$new_path"
61801  # Check if we need to convert this using DOS-style short mode. If the path
61802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61803  # take no chances and rewrite it.
61804  # Note: m4 eats our [], so we need to use [ and ] instead.
61805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61806  if test "x$has_forbidden_chars" != x; then
61807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61809  fi
61810
61811
61812  windows_path="$new_path"
61813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61814    unix_path=`$CYGPATH -u "$windows_path"`
61815    new_path="$unix_path"
61816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61818    new_path="$unix_path"
61819  fi
61820
61821  if test "x$path" != "x$new_path"; then
61822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61825  fi
61826
61827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61829
61830    else
61831      # We're on a unix platform. Hooray! :)
61832      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61833      has_space=`$ECHO "$path" | $GREP " "`
61834      if test "x$has_space" != x; then
61835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61838      fi
61839
61840      # Use eval to expand a potential ~
61841      eval path="$path"
61842      if test ! -f "$path" && test ! -d "$path"; then
61843        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61844      fi
61845
61846      if test -d "$path"; then
61847        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61848      else
61849        dir="`$DIRNAME "$path"`"
61850        base="`$BASENAME "$path"`"
61851        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61852      fi
61853    fi
61854  fi
61855
61856
61857  # Only process if variable expands to non-empty
61858
61859  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61861
61862  # Input might be given as Windows format, start by converting to
61863  # unix format.
61864  path="$POTENTIAL_FREETYPE_LIB_PATH"
61865  new_path=`$CYGPATH -u "$path"`
61866
61867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61870  # "foo.exe" is OK but "foo" is an error.
61871  #
61872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61873  # It is also a way to make sure we got the proper file name for the real test later on.
61874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61875  if test "x$test_shortpath" = x; then
61876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61877$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61878    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61879  fi
61880
61881  # Call helper function which possibly converts this using DOS-style short mode.
61882  # If so, the updated path is stored in $new_path.
61883
61884  input_path="$new_path"
61885  # Check if we need to convert this using DOS-style short mode. If the path
61886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61887  # take no chances and rewrite it.
61888  # Note: m4 eats our [], so we need to use [ and ] instead.
61889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61890  if test "x$has_forbidden_chars" != x; then
61891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61895      # Going to short mode and back again did indeed matter. Since short mode is
61896      # case insensitive, let's make it lowercase to improve readability.
61897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61898      # Now convert it back to Unix-style (cygpath)
61899      input_path=`$CYGPATH -u "$shortmode_path"`
61900      new_path="$input_path"
61901    fi
61902  fi
61903
61904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61905  if test "x$test_cygdrive_prefix" = x; then
61906    # As a simple fix, exclude /usr/bin since it's not a real path.
61907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61909      # a path prefixed by /cygdrive for fixpath to work.
61910      new_path="$CYGWIN_ROOT_PATH$input_path"
61911    fi
61912  fi
61913
61914
61915  if test "x$path" != "x$new_path"; then
61916    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61918$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61919  fi
61920
61921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61922
61923  path="$POTENTIAL_FREETYPE_LIB_PATH"
61924  has_colon=`$ECHO $path | $GREP ^.:`
61925  new_path="$path"
61926  if test "x$has_colon" = x; then
61927    # Not in mixed or Windows style, start by that.
61928    new_path=`cmd //c echo $path`
61929  fi
61930
61931
61932  input_path="$new_path"
61933  # Check if we need to convert this using DOS-style short mode. If the path
61934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61935  # take no chances and rewrite it.
61936  # Note: m4 eats our [], so we need to use [ and ] instead.
61937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61938  if test "x$has_forbidden_chars" != x; then
61939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61941  fi
61942
61943
61944  windows_path="$new_path"
61945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61946    unix_path=`$CYGPATH -u "$windows_path"`
61947    new_path="$unix_path"
61948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61950    new_path="$unix_path"
61951  fi
61952
61953  if test "x$path" != "x$new_path"; then
61954    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61956$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61957  fi
61958
61959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61961
61962    else
61963      # We're on a unix platform. Hooray! :)
61964      path="$POTENTIAL_FREETYPE_LIB_PATH"
61965      has_space=`$ECHO "$path" | $GREP " "`
61966      if test "x$has_space" != x; then
61967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61969        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61970      fi
61971
61972      # Use eval to expand a potential ~
61973      eval path="$path"
61974      if test ! -f "$path" && test ! -d "$path"; then
61975        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61976      fi
61977
61978      if test -d "$path"; then
61979        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61980      else
61981        dir="`$DIRNAME "$path"`"
61982        base="`$BASENAME "$path"`"
61983        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61984      fi
61985    fi
61986  fi
61987
61988
61989    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61991$as_echo_n "checking for freetype includes... " >&6; }
61992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61993$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61994    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61996$as_echo_n "checking for freetype libraries... " >&6; }
61997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61998$as_echo "$FREETYPE_LIB_PATH" >&6; }
61999  fi
62000
62001          fi
62002
62003          if test "x$FOUND_FREETYPE" != xyes; then
62004            FREETYPE_BASE_DIR="$SYSROOT/usr"
62005            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62006
62007  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62008  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62009  METHOD="well-known location"
62010
62011  # Let's start with an optimistic view of the world :-)
62012  FOUND_FREETYPE=yes
62013
62014  # First look for the canonical freetype main include file ft2build.h.
62015  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62016    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62017    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62018    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62019      # Fail.
62020      FOUND_FREETYPE=no
62021    fi
62022  fi
62023
62024  if test "x$FOUND_FREETYPE" = xyes; then
62025    # Include file found, let's continue the sanity check.
62026    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62027$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62028
62029    # Reset to default value
62030    FREETYPE_BASE_NAME=freetype
62031    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62032    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62033      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62034          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62035        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62036        # for the .6 version explicitly.
62037        FREETYPE_BASE_NAME=freetype.6
62038        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62039        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62040$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62041      else
62042        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62043$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62044        FOUND_FREETYPE=no
62045      fi
62046    else
62047      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62048        # On Windows, we will need both .lib and .dll file.
62049        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62050          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62051$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62052          FOUND_FREETYPE=no
62053        fi
62054      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62055          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62056        # Found lib in isa dir, use that instead.
62057        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62058        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62059$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62060      fi
62061    fi
62062  fi
62063
62064  if test "x$FOUND_FREETYPE" = xyes; then
62065
62066  # Only process if variable expands to non-empty
62067
62068  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62070
62071  # Input might be given as Windows format, start by converting to
62072  # unix format.
62073  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62074  new_path=`$CYGPATH -u "$path"`
62075
62076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62079  # "foo.exe" is OK but "foo" is an error.
62080  #
62081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62082  # It is also a way to make sure we got the proper file name for the real test later on.
62083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62084  if test "x$test_shortpath" = x; then
62085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62088  fi
62089
62090  # Call helper function which possibly converts this using DOS-style short mode.
62091  # If so, the updated path is stored in $new_path.
62092
62093  input_path="$new_path"
62094  # Check if we need to convert this using DOS-style short mode. If the path
62095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62096  # take no chances and rewrite it.
62097  # Note: m4 eats our [], so we need to use [ and ] instead.
62098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62099  if test "x$has_forbidden_chars" != x; then
62100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62104      # Going to short mode and back again did indeed matter. Since short mode is
62105      # case insensitive, let's make it lowercase to improve readability.
62106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62107      # Now convert it back to Unix-style (cygpath)
62108      input_path=`$CYGPATH -u "$shortmode_path"`
62109      new_path="$input_path"
62110    fi
62111  fi
62112
62113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62114  if test "x$test_cygdrive_prefix" = x; then
62115    # As a simple fix, exclude /usr/bin since it's not a real path.
62116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62118      # a path prefixed by /cygdrive for fixpath to work.
62119      new_path="$CYGWIN_ROOT_PATH$input_path"
62120    fi
62121  fi
62122
62123
62124  if test "x$path" != "x$new_path"; then
62125    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62128  fi
62129
62130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62131
62132  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62133  has_colon=`$ECHO $path | $GREP ^.:`
62134  new_path="$path"
62135  if test "x$has_colon" = x; then
62136    # Not in mixed or Windows style, start by that.
62137    new_path=`cmd //c echo $path`
62138  fi
62139
62140
62141  input_path="$new_path"
62142  # Check if we need to convert this using DOS-style short mode. If the path
62143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62144  # take no chances and rewrite it.
62145  # Note: m4 eats our [], so we need to use [ and ] instead.
62146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62147  if test "x$has_forbidden_chars" != x; then
62148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62150  fi
62151
62152
62153  windows_path="$new_path"
62154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62155    unix_path=`$CYGPATH -u "$windows_path"`
62156    new_path="$unix_path"
62157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62159    new_path="$unix_path"
62160  fi
62161
62162  if test "x$path" != "x$new_path"; then
62163    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62166  fi
62167
62168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62170
62171    else
62172      # We're on a unix platform. Hooray! :)
62173      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62174      has_space=`$ECHO "$path" | $GREP " "`
62175      if test "x$has_space" != x; then
62176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62179      fi
62180
62181      # Use eval to expand a potential ~
62182      eval path="$path"
62183      if test ! -f "$path" && test ! -d "$path"; then
62184        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62185      fi
62186
62187      if test -d "$path"; then
62188        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62189      else
62190        dir="`$DIRNAME "$path"`"
62191        base="`$BASENAME "$path"`"
62192        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62193      fi
62194    fi
62195  fi
62196
62197
62198  # Only process if variable expands to non-empty
62199
62200  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62202
62203  # Input might be given as Windows format, start by converting to
62204  # unix format.
62205  path="$POTENTIAL_FREETYPE_LIB_PATH"
62206  new_path=`$CYGPATH -u "$path"`
62207
62208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62211  # "foo.exe" is OK but "foo" is an error.
62212  #
62213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62214  # It is also a way to make sure we got the proper file name for the real test later on.
62215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62216  if test "x$test_shortpath" = x; then
62217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62219    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62220  fi
62221
62222  # Call helper function which possibly converts this using DOS-style short mode.
62223  # If so, the updated path is stored in $new_path.
62224
62225  input_path="$new_path"
62226  # Check if we need to convert this using DOS-style short mode. If the path
62227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62228  # take no chances and rewrite it.
62229  # Note: m4 eats our [], so we need to use [ and ] instead.
62230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62231  if test "x$has_forbidden_chars" != x; then
62232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62236      # Going to short mode and back again did indeed matter. Since short mode is
62237      # case insensitive, let's make it lowercase to improve readability.
62238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62239      # Now convert it back to Unix-style (cygpath)
62240      input_path=`$CYGPATH -u "$shortmode_path"`
62241      new_path="$input_path"
62242    fi
62243  fi
62244
62245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62246  if test "x$test_cygdrive_prefix" = x; then
62247    # As a simple fix, exclude /usr/bin since it's not a real path.
62248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62250      # a path prefixed by /cygdrive for fixpath to work.
62251      new_path="$CYGWIN_ROOT_PATH$input_path"
62252    fi
62253  fi
62254
62255
62256  if test "x$path" != "x$new_path"; then
62257    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62259$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62260  fi
62261
62262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62263
62264  path="$POTENTIAL_FREETYPE_LIB_PATH"
62265  has_colon=`$ECHO $path | $GREP ^.:`
62266  new_path="$path"
62267  if test "x$has_colon" = x; then
62268    # Not in mixed or Windows style, start by that.
62269    new_path=`cmd //c echo $path`
62270  fi
62271
62272
62273  input_path="$new_path"
62274  # Check if we need to convert this using DOS-style short mode. If the path
62275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62276  # take no chances and rewrite it.
62277  # Note: m4 eats our [], so we need to use [ and ] instead.
62278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62279  if test "x$has_forbidden_chars" != x; then
62280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62282  fi
62283
62284
62285  windows_path="$new_path"
62286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62287    unix_path=`$CYGPATH -u "$windows_path"`
62288    new_path="$unix_path"
62289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62291    new_path="$unix_path"
62292  fi
62293
62294  if test "x$path" != "x$new_path"; then
62295    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62297$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62298  fi
62299
62300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62302
62303    else
62304      # We're on a unix platform. Hooray! :)
62305      path="$POTENTIAL_FREETYPE_LIB_PATH"
62306      has_space=`$ECHO "$path" | $GREP " "`
62307      if test "x$has_space" != x; then
62308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62309$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62311      fi
62312
62313      # Use eval to expand a potential ~
62314      eval path="$path"
62315      if test ! -f "$path" && test ! -d "$path"; then
62316        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62317      fi
62318
62319      if test -d "$path"; then
62320        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62321      else
62322        dir="`$DIRNAME "$path"`"
62323        base="`$BASENAME "$path"`"
62324        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62325      fi
62326    fi
62327  fi
62328
62329
62330    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62332$as_echo_n "checking for freetype includes... " >&6; }
62333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62334$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62335    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62337$as_echo_n "checking for freetype libraries... " >&6; }
62338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62339$as_echo "$FREETYPE_LIB_PATH" >&6; }
62340  fi
62341
62342            else
62343
62344  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62345  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62346  METHOD="well-known location"
62347
62348  # Let's start with an optimistic view of the world :-)
62349  FOUND_FREETYPE=yes
62350
62351  # First look for the canonical freetype main include file ft2build.h.
62352  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62353    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62354    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62355    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62356      # Fail.
62357      FOUND_FREETYPE=no
62358    fi
62359  fi
62360
62361  if test "x$FOUND_FREETYPE" = xyes; then
62362    # Include file found, let's continue the sanity check.
62363    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62364$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62365
62366    # Reset to default value
62367    FREETYPE_BASE_NAME=freetype
62368    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62369    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62370      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62371          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62372        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62373        # for the .6 version explicitly.
62374        FREETYPE_BASE_NAME=freetype.6
62375        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62376        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62377$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62378      else
62379        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62380$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62381        FOUND_FREETYPE=no
62382      fi
62383    else
62384      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62385        # On Windows, we will need both .lib and .dll file.
62386        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62387          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62388$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62389          FOUND_FREETYPE=no
62390        fi
62391      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62392          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62393        # Found lib in isa dir, use that instead.
62394        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62395        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62396$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62397      fi
62398    fi
62399  fi
62400
62401  if test "x$FOUND_FREETYPE" = xyes; then
62402
62403  # Only process if variable expands to non-empty
62404
62405  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62406    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62407
62408  # Input might be given as Windows format, start by converting to
62409  # unix format.
62410  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62411  new_path=`$CYGPATH -u "$path"`
62412
62413  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62414  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62415  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62416  # "foo.exe" is OK but "foo" is an error.
62417  #
62418  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62419  # It is also a way to make sure we got the proper file name for the real test later on.
62420  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62421  if test "x$test_shortpath" = x; then
62422    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62423$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62424    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62425  fi
62426
62427  # Call helper function which possibly converts this using DOS-style short mode.
62428  # If so, the updated path is stored in $new_path.
62429
62430  input_path="$new_path"
62431  # Check if we need to convert this using DOS-style short mode. If the path
62432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62433  # take no chances and rewrite it.
62434  # Note: m4 eats our [], so we need to use [ and ] instead.
62435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62436  if test "x$has_forbidden_chars" != x; then
62437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62438    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62439    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62440    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62441      # Going to short mode and back again did indeed matter. Since short mode is
62442      # case insensitive, let's make it lowercase to improve readability.
62443      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62444      # Now convert it back to Unix-style (cygpath)
62445      input_path=`$CYGPATH -u "$shortmode_path"`
62446      new_path="$input_path"
62447    fi
62448  fi
62449
62450  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62451  if test "x$test_cygdrive_prefix" = x; then
62452    # As a simple fix, exclude /usr/bin since it's not a real path.
62453    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62454      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62455      # a path prefixed by /cygdrive for fixpath to work.
62456      new_path="$CYGWIN_ROOT_PATH$input_path"
62457    fi
62458  fi
62459
62460
62461  if test "x$path" != "x$new_path"; then
62462    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62463    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62464$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62465  fi
62466
62467    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62468
62469  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62470  has_colon=`$ECHO $path | $GREP ^.:`
62471  new_path="$path"
62472  if test "x$has_colon" = x; then
62473    # Not in mixed or Windows style, start by that.
62474    new_path=`cmd //c echo $path`
62475  fi
62476
62477
62478  input_path="$new_path"
62479  # Check if we need to convert this using DOS-style short mode. If the path
62480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62481  # take no chances and rewrite it.
62482  # Note: m4 eats our [], so we need to use [ and ] instead.
62483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62484  if test "x$has_forbidden_chars" != x; then
62485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62486    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62487  fi
62488
62489
62490  windows_path="$new_path"
62491  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62492    unix_path=`$CYGPATH -u "$windows_path"`
62493    new_path="$unix_path"
62494  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62495    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62496    new_path="$unix_path"
62497  fi
62498
62499  if test "x$path" != "x$new_path"; then
62500    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62501    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62502$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62503  fi
62504
62505  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62506  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62507
62508    else
62509      # We're on a unix platform. Hooray! :)
62510      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62511      has_space=`$ECHO "$path" | $GREP " "`
62512      if test "x$has_space" != x; then
62513        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62514$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62515        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62516      fi
62517
62518      # Use eval to expand a potential ~
62519      eval path="$path"
62520      if test ! -f "$path" && test ! -d "$path"; then
62521        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62522      fi
62523
62524      if test -d "$path"; then
62525        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62526      else
62527        dir="`$DIRNAME "$path"`"
62528        base="`$BASENAME "$path"`"
62529        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62530      fi
62531    fi
62532  fi
62533
62534
62535  # Only process if variable expands to non-empty
62536
62537  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62538    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62539
62540  # Input might be given as Windows format, start by converting to
62541  # unix format.
62542  path="$POTENTIAL_FREETYPE_LIB_PATH"
62543  new_path=`$CYGPATH -u "$path"`
62544
62545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62548  # "foo.exe" is OK but "foo" is an error.
62549  #
62550  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62551  # It is also a way to make sure we got the proper file name for the real test later on.
62552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62553  if test "x$test_shortpath" = x; then
62554    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62555$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62556    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62557  fi
62558
62559  # Call helper function which possibly converts this using DOS-style short mode.
62560  # If so, the updated path is stored in $new_path.
62561
62562  input_path="$new_path"
62563  # Check if we need to convert this using DOS-style short mode. If the path
62564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62565  # take no chances and rewrite it.
62566  # Note: m4 eats our [], so we need to use [ and ] instead.
62567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62568  if test "x$has_forbidden_chars" != x; then
62569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62570    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62571    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62572    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62573      # Going to short mode and back again did indeed matter. Since short mode is
62574      # case insensitive, let's make it lowercase to improve readability.
62575      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62576      # Now convert it back to Unix-style (cygpath)
62577      input_path=`$CYGPATH -u "$shortmode_path"`
62578      new_path="$input_path"
62579    fi
62580  fi
62581
62582  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62583  if test "x$test_cygdrive_prefix" = x; then
62584    # As a simple fix, exclude /usr/bin since it's not a real path.
62585    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62586      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62587      # a path prefixed by /cygdrive for fixpath to work.
62588      new_path="$CYGWIN_ROOT_PATH$input_path"
62589    fi
62590  fi
62591
62592
62593  if test "x$path" != "x$new_path"; then
62594    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62595    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62596$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62597  fi
62598
62599    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62600
62601  path="$POTENTIAL_FREETYPE_LIB_PATH"
62602  has_colon=`$ECHO $path | $GREP ^.:`
62603  new_path="$path"
62604  if test "x$has_colon" = x; then
62605    # Not in mixed or Windows style, start by that.
62606    new_path=`cmd //c echo $path`
62607  fi
62608
62609
62610  input_path="$new_path"
62611  # Check if we need to convert this using DOS-style short mode. If the path
62612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62613  # take no chances and rewrite it.
62614  # Note: m4 eats our [], so we need to use [ and ] instead.
62615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62616  if test "x$has_forbidden_chars" != x; then
62617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62619  fi
62620
62621
62622  windows_path="$new_path"
62623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62624    unix_path=`$CYGPATH -u "$windows_path"`
62625    new_path="$unix_path"
62626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62628    new_path="$unix_path"
62629  fi
62630
62631  if test "x$path" != "x$new_path"; then
62632    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62634$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62635  fi
62636
62637  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62638  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62639
62640    else
62641      # We're on a unix platform. Hooray! :)
62642      path="$POTENTIAL_FREETYPE_LIB_PATH"
62643      has_space=`$ECHO "$path" | $GREP " "`
62644      if test "x$has_space" != x; then
62645        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62646$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62647        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62648      fi
62649
62650      # Use eval to expand a potential ~
62651      eval path="$path"
62652      if test ! -f "$path" && test ! -d "$path"; then
62653        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62654      fi
62655
62656      if test -d "$path"; then
62657        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62658      else
62659        dir="`$DIRNAME "$path"`"
62660        base="`$BASENAME "$path"`"
62661        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62662      fi
62663    fi
62664  fi
62665
62666
62667    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62668    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62669$as_echo_n "checking for freetype includes... " >&6; }
62670    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62671$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62672    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62674$as_echo_n "checking for freetype libraries... " >&6; }
62675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62676$as_echo "$FREETYPE_LIB_PATH" >&6; }
62677  fi
62678
62679              if test "x$FOUND_FREETYPE" != xyes; then
62680
62681  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62682  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62683  METHOD="well-known location"
62684
62685  # Let's start with an optimistic view of the world :-)
62686  FOUND_FREETYPE=yes
62687
62688  # First look for the canonical freetype main include file ft2build.h.
62689  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62690    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62691    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62692    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62693      # Fail.
62694      FOUND_FREETYPE=no
62695    fi
62696  fi
62697
62698  if test "x$FOUND_FREETYPE" = xyes; then
62699    # Include file found, let's continue the sanity check.
62700    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62701$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62702
62703    # Reset to default value
62704    FREETYPE_BASE_NAME=freetype
62705    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62706    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62707      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62708          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62709        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62710        # for the .6 version explicitly.
62711        FREETYPE_BASE_NAME=freetype.6
62712        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62713        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62714$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62715      else
62716        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62717$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62718        FOUND_FREETYPE=no
62719      fi
62720    else
62721      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62722        # On Windows, we will need both .lib and .dll file.
62723        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62724          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62725$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62726          FOUND_FREETYPE=no
62727        fi
62728      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62729          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62730        # Found lib in isa dir, use that instead.
62731        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62732        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62733$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62734      fi
62735    fi
62736  fi
62737
62738  if test "x$FOUND_FREETYPE" = xyes; then
62739
62740  # Only process if variable expands to non-empty
62741
62742  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62743    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62744
62745  # Input might be given as Windows format, start by converting to
62746  # unix format.
62747  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62748  new_path=`$CYGPATH -u "$path"`
62749
62750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62753  # "foo.exe" is OK but "foo" is an error.
62754  #
62755  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62756  # It is also a way to make sure we got the proper file name for the real test later on.
62757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62758  if test "x$test_shortpath" = x; then
62759    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62760$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62761    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62762  fi
62763
62764  # Call helper function which possibly converts this using DOS-style short mode.
62765  # If so, the updated path is stored in $new_path.
62766
62767  input_path="$new_path"
62768  # Check if we need to convert this using DOS-style short mode. If the path
62769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62770  # take no chances and rewrite it.
62771  # Note: m4 eats our [], so we need to use [ and ] instead.
62772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62773  if test "x$has_forbidden_chars" != x; then
62774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62775    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62776    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62777    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62778      # Going to short mode and back again did indeed matter. Since short mode is
62779      # case insensitive, let's make it lowercase to improve readability.
62780      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62781      # Now convert it back to Unix-style (cygpath)
62782      input_path=`$CYGPATH -u "$shortmode_path"`
62783      new_path="$input_path"
62784    fi
62785  fi
62786
62787  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62788  if test "x$test_cygdrive_prefix" = x; then
62789    # As a simple fix, exclude /usr/bin since it's not a real path.
62790    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62791      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62792      # a path prefixed by /cygdrive for fixpath to work.
62793      new_path="$CYGWIN_ROOT_PATH$input_path"
62794    fi
62795  fi
62796
62797
62798  if test "x$path" != "x$new_path"; then
62799    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62800    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62801$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62802  fi
62803
62804    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62805
62806  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62807  has_colon=`$ECHO $path | $GREP ^.:`
62808  new_path="$path"
62809  if test "x$has_colon" = x; then
62810    # Not in mixed or Windows style, start by that.
62811    new_path=`cmd //c echo $path`
62812  fi
62813
62814
62815  input_path="$new_path"
62816  # Check if we need to convert this using DOS-style short mode. If the path
62817  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62818  # take no chances and rewrite it.
62819  # Note: m4 eats our [], so we need to use [ and ] instead.
62820  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62821  if test "x$has_forbidden_chars" != x; then
62822    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62823    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62824  fi
62825
62826
62827  windows_path="$new_path"
62828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62829    unix_path=`$CYGPATH -u "$windows_path"`
62830    new_path="$unix_path"
62831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62833    new_path="$unix_path"
62834  fi
62835
62836  if test "x$path" != "x$new_path"; then
62837    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62840  fi
62841
62842  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62843  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62844
62845    else
62846      # We're on a unix platform. Hooray! :)
62847      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62848      has_space=`$ECHO "$path" | $GREP " "`
62849      if test "x$has_space" != x; then
62850        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62851$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62852        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62853      fi
62854
62855      # Use eval to expand a potential ~
62856      eval path="$path"
62857      if test ! -f "$path" && test ! -d "$path"; then
62858        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62859      fi
62860
62861      if test -d "$path"; then
62862        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62863      else
62864        dir="`$DIRNAME "$path"`"
62865        base="`$BASENAME "$path"`"
62866        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62867      fi
62868    fi
62869  fi
62870
62871
62872  # Only process if variable expands to non-empty
62873
62874  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62875    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62876
62877  # Input might be given as Windows format, start by converting to
62878  # unix format.
62879  path="$POTENTIAL_FREETYPE_LIB_PATH"
62880  new_path=`$CYGPATH -u "$path"`
62881
62882  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62883  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62884  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62885  # "foo.exe" is OK but "foo" is an error.
62886  #
62887  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62888  # It is also a way to make sure we got the proper file name for the real test later on.
62889  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62890  if test "x$test_shortpath" = x; then
62891    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62892$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62893    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62894  fi
62895
62896  # Call helper function which possibly converts this using DOS-style short mode.
62897  # If so, the updated path is stored in $new_path.
62898
62899  input_path="$new_path"
62900  # Check if we need to convert this using DOS-style short mode. If the path
62901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62902  # take no chances and rewrite it.
62903  # Note: m4 eats our [], so we need to use [ and ] instead.
62904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62905  if test "x$has_forbidden_chars" != x; then
62906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62910      # Going to short mode and back again did indeed matter. Since short mode is
62911      # case insensitive, let's make it lowercase to improve readability.
62912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62913      # Now convert it back to Unix-style (cygpath)
62914      input_path=`$CYGPATH -u "$shortmode_path"`
62915      new_path="$input_path"
62916    fi
62917  fi
62918
62919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62920  if test "x$test_cygdrive_prefix" = x; then
62921    # As a simple fix, exclude /usr/bin since it's not a real path.
62922    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62924      # a path prefixed by /cygdrive for fixpath to work.
62925      new_path="$CYGWIN_ROOT_PATH$input_path"
62926    fi
62927  fi
62928
62929
62930  if test "x$path" != "x$new_path"; then
62931    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62932    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62933$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62934  fi
62935
62936    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62937
62938  path="$POTENTIAL_FREETYPE_LIB_PATH"
62939  has_colon=`$ECHO $path | $GREP ^.:`
62940  new_path="$path"
62941  if test "x$has_colon" = x; then
62942    # Not in mixed or Windows style, start by that.
62943    new_path=`cmd //c echo $path`
62944  fi
62945
62946
62947  input_path="$new_path"
62948  # Check if we need to convert this using DOS-style short mode. If the path
62949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62950  # take no chances and rewrite it.
62951  # Note: m4 eats our [], so we need to use [ and ] instead.
62952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62953  if test "x$has_forbidden_chars" != x; then
62954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62955    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62956  fi
62957
62958
62959  windows_path="$new_path"
62960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62961    unix_path=`$CYGPATH -u "$windows_path"`
62962    new_path="$unix_path"
62963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62965    new_path="$unix_path"
62966  fi
62967
62968  if test "x$path" != "x$new_path"; then
62969    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62970    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62971$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62972  fi
62973
62974  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62975  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62976
62977    else
62978      # We're on a unix platform. Hooray! :)
62979      path="$POTENTIAL_FREETYPE_LIB_PATH"
62980      has_space=`$ECHO "$path" | $GREP " "`
62981      if test "x$has_space" != x; then
62982        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62983$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62984        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62985      fi
62986
62987      # Use eval to expand a potential ~
62988      eval path="$path"
62989      if test ! -f "$path" && test ! -d "$path"; then
62990        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62991      fi
62992
62993      if test -d "$path"; then
62994        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62995      else
62996        dir="`$DIRNAME "$path"`"
62997        base="`$BASENAME "$path"`"
62998        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62999      fi
63000    fi
63001  fi
63002
63003
63004    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63006$as_echo_n "checking for freetype includes... " >&6; }
63007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63008$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63009    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63010    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63011$as_echo_n "checking for freetype libraries... " >&6; }
63012    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63013$as_echo "$FREETYPE_LIB_PATH" >&6; }
63014  fi
63015
63016              fi
63017            fi
63018          fi
63019        fi
63020      fi # end check in well-known locations
63021
63022      if test "x$FOUND_FREETYPE" != xyes; then
63023
63024  # Print a helpful message on how to acquire the necessary build dependency.
63025  # freetype is the help tag: freetype, cups, alsa etc
63026  MISSING_DEPENDENCY=freetype
63027
63028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63029    cygwin_help $MISSING_DEPENDENCY
63030  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63031    msys_help $MISSING_DEPENDENCY
63032  else
63033    PKGHANDLER_COMMAND=
63034
63035    case $PKGHANDLER in
63036      apt-get)
63037        apt_help     $MISSING_DEPENDENCY ;;
63038      yum)
63039        yum_help     $MISSING_DEPENDENCY ;;
63040      port)
63041        port_help    $MISSING_DEPENDENCY ;;
63042      pkgutil)
63043        pkgutil_help $MISSING_DEPENDENCY ;;
63044      pkgadd)
63045        pkgadd_help  $MISSING_DEPENDENCY ;;
63046    esac
63047
63048    if test "x$PKGHANDLER_COMMAND" != x; then
63049      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63050    fi
63051  fi
63052
63053        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63054      fi
63055    fi # end user specified settings
63056
63057    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63058    if test "x$FREETYPE_CFLAGS" = x; then
63059
63060  # Only process if variable expands to non-empty
63061
63062  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63064
63065  # Input might be given as Windows format, start by converting to
63066  # unix format.
63067  path="$FREETYPE_INCLUDE_PATH"
63068  new_path=`$CYGPATH -u "$path"`
63069
63070  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63071  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63072  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63073  # "foo.exe" is OK but "foo" is an error.
63074  #
63075  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63076  # It is also a way to make sure we got the proper file name for the real test later on.
63077  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63078  if test "x$test_shortpath" = x; then
63079    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63080$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63081    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63082  fi
63083
63084  # Call helper function which possibly converts this using DOS-style short mode.
63085  # If so, the updated path is stored in $new_path.
63086
63087  input_path="$new_path"
63088  # Check if we need to convert this using DOS-style short mode. If the path
63089  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63090  # take no chances and rewrite it.
63091  # Note: m4 eats our [], so we need to use [ and ] instead.
63092  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63093  if test "x$has_forbidden_chars" != x; then
63094    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63095    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63096    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63097    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63098      # Going to short mode and back again did indeed matter. Since short mode is
63099      # case insensitive, let's make it lowercase to improve readability.
63100      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63101      # Now convert it back to Unix-style (cygpath)
63102      input_path=`$CYGPATH -u "$shortmode_path"`
63103      new_path="$input_path"
63104    fi
63105  fi
63106
63107  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63108  if test "x$test_cygdrive_prefix" = x; then
63109    # As a simple fix, exclude /usr/bin since it's not a real path.
63110    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63111      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63112      # a path prefixed by /cygdrive for fixpath to work.
63113      new_path="$CYGWIN_ROOT_PATH$input_path"
63114    fi
63115  fi
63116
63117
63118  if test "x$path" != "x$new_path"; then
63119    FREETYPE_INCLUDE_PATH="$new_path"
63120    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63121$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63122  fi
63123
63124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63125
63126  path="$FREETYPE_INCLUDE_PATH"
63127  has_colon=`$ECHO $path | $GREP ^.:`
63128  new_path="$path"
63129  if test "x$has_colon" = x; then
63130    # Not in mixed or Windows style, start by that.
63131    new_path=`cmd //c echo $path`
63132  fi
63133
63134
63135  input_path="$new_path"
63136  # Check if we need to convert this using DOS-style short mode. If the path
63137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63138  # take no chances and rewrite it.
63139  # Note: m4 eats our [], so we need to use [ and ] instead.
63140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63141  if test "x$has_forbidden_chars" != x; then
63142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63143    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63144  fi
63145
63146
63147  windows_path="$new_path"
63148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63149    unix_path=`$CYGPATH -u "$windows_path"`
63150    new_path="$unix_path"
63151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63153    new_path="$unix_path"
63154  fi
63155
63156  if test "x$path" != "x$new_path"; then
63157    FREETYPE_INCLUDE_PATH="$new_path"
63158    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63159$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63160  fi
63161
63162  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63163  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63164
63165    else
63166      # We're on a unix platform. Hooray! :)
63167      path="$FREETYPE_INCLUDE_PATH"
63168      has_space=`$ECHO "$path" | $GREP " "`
63169      if test "x$has_space" != x; then
63170        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63171$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63172        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63173      fi
63174
63175      # Use eval to expand a potential ~
63176      eval path="$path"
63177      if test ! -f "$path" && test ! -d "$path"; then
63178        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63179      fi
63180
63181      if test -d "$path"; then
63182        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63183      else
63184        dir="`$DIRNAME "$path"`"
63185        base="`$BASENAME "$path"`"
63186        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63187      fi
63188    fi
63189  fi
63190
63191      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63192        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63193      else
63194        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63195      fi
63196    fi
63197
63198    if test "x$FREETYPE_LIBS" = x; then
63199
63200  # Only process if variable expands to non-empty
63201
63202  if test "x$FREETYPE_LIB_PATH" != x; then
63203    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63204
63205  # Input might be given as Windows format, start by converting to
63206  # unix format.
63207  path="$FREETYPE_LIB_PATH"
63208  new_path=`$CYGPATH -u "$path"`
63209
63210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63213  # "foo.exe" is OK but "foo" is an error.
63214  #
63215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63216  # It is also a way to make sure we got the proper file name for the real test later on.
63217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63218  if test "x$test_shortpath" = x; then
63219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63220$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63221    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63222  fi
63223
63224  # Call helper function which possibly converts this using DOS-style short mode.
63225  # If so, the updated path is stored in $new_path.
63226
63227  input_path="$new_path"
63228  # Check if we need to convert this using DOS-style short mode. If the path
63229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63230  # take no chances and rewrite it.
63231  # Note: m4 eats our [], so we need to use [ and ] instead.
63232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63233  if test "x$has_forbidden_chars" != x; then
63234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63238      # Going to short mode and back again did indeed matter. Since short mode is
63239      # case insensitive, let's make it lowercase to improve readability.
63240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63241      # Now convert it back to Unix-style (cygpath)
63242      input_path=`$CYGPATH -u "$shortmode_path"`
63243      new_path="$input_path"
63244    fi
63245  fi
63246
63247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63248  if test "x$test_cygdrive_prefix" = x; then
63249    # As a simple fix, exclude /usr/bin since it's not a real path.
63250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63252      # a path prefixed by /cygdrive for fixpath to work.
63253      new_path="$CYGWIN_ROOT_PATH$input_path"
63254    fi
63255  fi
63256
63257
63258  if test "x$path" != "x$new_path"; then
63259    FREETYPE_LIB_PATH="$new_path"
63260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63261$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63262  fi
63263
63264    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63265
63266  path="$FREETYPE_LIB_PATH"
63267  has_colon=`$ECHO $path | $GREP ^.:`
63268  new_path="$path"
63269  if test "x$has_colon" = x; then
63270    # Not in mixed or Windows style, start by that.
63271    new_path=`cmd //c echo $path`
63272  fi
63273
63274
63275  input_path="$new_path"
63276  # Check if we need to convert this using DOS-style short mode. If the path
63277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63278  # take no chances and rewrite it.
63279  # Note: m4 eats our [], so we need to use [ and ] instead.
63280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63281  if test "x$has_forbidden_chars" != x; then
63282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63284  fi
63285
63286
63287  windows_path="$new_path"
63288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63289    unix_path=`$CYGPATH -u "$windows_path"`
63290    new_path="$unix_path"
63291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63293    new_path="$unix_path"
63294  fi
63295
63296  if test "x$path" != "x$new_path"; then
63297    FREETYPE_LIB_PATH="$new_path"
63298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63299$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63300  fi
63301
63302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63304
63305    else
63306      # We're on a unix platform. Hooray! :)
63307      path="$FREETYPE_LIB_PATH"
63308      has_space=`$ECHO "$path" | $GREP " "`
63309      if test "x$has_space" != x; then
63310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63311$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63312        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63313      fi
63314
63315      # Use eval to expand a potential ~
63316      eval path="$path"
63317      if test ! -f "$path" && test ! -d "$path"; then
63318        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63319      fi
63320
63321      if test -d "$path"; then
63322        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63323      else
63324        dir="`$DIRNAME "$path"`"
63325        base="`$BASENAME "$path"`"
63326        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63327      fi
63328    fi
63329  fi
63330
63331      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63332        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63333      else
63334        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63335      fi
63336    fi
63337
63338    # Try to compile it
63339    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63340$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63341    ac_ext=cpp
63342ac_cpp='$CXXCPP $CPPFLAGS'
63343ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63344ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63345ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63346
63347    PREV_CXXCFLAGS="$CXXFLAGS"
63348    PREV_LIBS="$LIBS"
63349    PREV_CXX="$CXX"
63350    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63351    LIBS="$LIBS $FREETYPE_LIBS"
63352    CXX="$FIXPATH $CXX"
63353    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63354/* end confdefs.h.  */
63355
63356          #include<ft2build.h>
63357          #include FT_FREETYPE_H
63358          int main () {
63359            FT_Init_FreeType(NULL);
63360            return 0;
63361          }
63362
63363_ACEOF
63364if ac_fn_cxx_try_link "$LINENO"; then :
63365
63366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63367$as_echo "yes" >&6; }
63368
63369else
63370
63371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63372$as_echo "no" >&6; }
63373          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63374$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63375          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63376$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63377
63378
63379  # Print a helpful message on how to acquire the necessary build dependency.
63380  # freetype is the help tag: freetype, cups, alsa etc
63381  MISSING_DEPENDENCY=freetype
63382
63383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63384    cygwin_help $MISSING_DEPENDENCY
63385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63386    msys_help $MISSING_DEPENDENCY
63387  else
63388    PKGHANDLER_COMMAND=
63389
63390    case $PKGHANDLER in
63391      apt-get)
63392        apt_help     $MISSING_DEPENDENCY ;;
63393      yum)
63394        yum_help     $MISSING_DEPENDENCY ;;
63395      port)
63396        port_help    $MISSING_DEPENDENCY ;;
63397      pkgutil)
63398        pkgutil_help $MISSING_DEPENDENCY ;;
63399      pkgadd)
63400        pkgadd_help  $MISSING_DEPENDENCY ;;
63401    esac
63402
63403    if test "x$PKGHANDLER_COMMAND" != x; then
63404      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63405    fi
63406  fi
63407
63408
63409          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63410
63411
63412fi
63413rm -f core conftest.err conftest.$ac_objext \
63414    conftest$ac_exeext conftest.$ac_ext
63415    CXXCFLAGS="$PREV_CXXFLAGS"
63416    LIBS="$PREV_LIBS"
63417    CXX="$PREV_CXX"
63418    ac_ext=cpp
63419ac_cpp='$CXXCPP $CPPFLAGS'
63420ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63421ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63422ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63423
63424
63425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63426$as_echo_n "checking if we should bundle freetype... " >&6; }
63427    if test "x$BUNDLE_FREETYPE" = xyes; then
63428      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63429    fi
63430    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63431$as_echo "$BUNDLE_FREETYPE" >&6; }
63432
63433  fi # end freetype needed
63434
63435
63436
63437
63438
63439
63440
63441# Check whether --with-alsa was given.
63442if test "${with_alsa+set}" = set; then :
63443  withval=$with_alsa;
63444fi
63445
63446
63447# Check whether --with-alsa-include was given.
63448if test "${with_alsa_include+set}" = set; then :
63449  withval=$with_alsa_include;
63450fi
63451
63452
63453# Check whether --with-alsa-lib was given.
63454if test "${with_alsa_lib+set}" = set; then :
63455  withval=$with_alsa_lib;
63456fi
63457
63458
63459  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63460    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63461        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63462        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63463      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63464$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63465    fi
63466    ALSA_CFLAGS=
63467    ALSA_LIBS=
63468  else
63469    ALSA_FOUND=no
63470
63471    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63472      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63473    fi
63474
63475    if test "x${with_alsa}" != x; then
63476      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63477      ALSA_CFLAGS="-I${with_alsa}/include"
63478      ALSA_FOUND=yes
63479    fi
63480    if test "x${with_alsa_include}" != x; then
63481      ALSA_CFLAGS="-I${with_alsa_include}"
63482      ALSA_FOUND=yes
63483    fi
63484    if test "x${with_alsa_lib}" != x; then
63485      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63486      ALSA_FOUND=yes
63487    fi
63488    # Do not try pkg-config if we have a sysroot set.
63489    if test "x$SYSROOT" = x; then
63490      if test "x$ALSA_FOUND" = xno; then
63491
63492pkg_failed=no
63493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63494$as_echo_n "checking for ALSA... " >&6; }
63495
63496if test -n "$ALSA_CFLAGS"; then
63497    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63498 elif test -n "$PKG_CONFIG"; then
63499    if test -n "$PKG_CONFIG" && \
63500    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63501  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63502  ac_status=$?
63503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63504  test $ac_status = 0; }; then
63505  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63506else
63507  pkg_failed=yes
63508fi
63509 else
63510    pkg_failed=untried
63511fi
63512if test -n "$ALSA_LIBS"; then
63513    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63514 elif test -n "$PKG_CONFIG"; then
63515    if test -n "$PKG_CONFIG" && \
63516    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63517  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63518  ac_status=$?
63519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63520  test $ac_status = 0; }; then
63521  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63522else
63523  pkg_failed=yes
63524fi
63525 else
63526    pkg_failed=untried
63527fi
63528
63529
63530
63531if test $pkg_failed = yes; then
63532
63533if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63534        _pkg_short_errors_supported=yes
63535else
63536        _pkg_short_errors_supported=no
63537fi
63538        if test $_pkg_short_errors_supported = yes; then
63539	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63540        else
63541	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63542        fi
63543	# Put the nasty error message in config.log where it belongs
63544	echo "$ALSA_PKG_ERRORS" >&5
63545
63546	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63547$as_echo "no" >&6; }
63548                ALSA_FOUND=no
63549elif test $pkg_failed = untried; then
63550	ALSA_FOUND=no
63551else
63552	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63553	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63555$as_echo "yes" >&6; }
63556	ALSA_FOUND=yes
63557fi
63558      fi
63559    fi
63560    if test "x$ALSA_FOUND" = xno; then
63561      for ac_header in alsa/asoundlib.h
63562do :
63563  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63564if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63565  cat >>confdefs.h <<_ACEOF
63566#define HAVE_ALSA_ASOUNDLIB_H 1
63567_ACEOF
63568
63569            ALSA_FOUND=yes
63570            ALSA_CFLAGS=-Iignoreme
63571            ALSA_LIBS=-lasound
63572            DEFAULT_ALSA=yes
63573
63574else
63575  ALSA_FOUND=no
63576
63577fi
63578
63579done
63580
63581    fi
63582    if test "x$ALSA_FOUND" = xno; then
63583
63584  # Print a helpful message on how to acquire the necessary build dependency.
63585  # alsa is the help tag: freetype, cups, alsa etc
63586  MISSING_DEPENDENCY=alsa
63587
63588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63589    cygwin_help $MISSING_DEPENDENCY
63590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63591    msys_help $MISSING_DEPENDENCY
63592  else
63593    PKGHANDLER_COMMAND=
63594
63595    case $PKGHANDLER in
63596      apt-get)
63597        apt_help     $MISSING_DEPENDENCY ;;
63598      yum)
63599        yum_help     $MISSING_DEPENDENCY ;;
63600      port)
63601        port_help    $MISSING_DEPENDENCY ;;
63602      pkgutil)
63603        pkgutil_help $MISSING_DEPENDENCY ;;
63604      pkgadd)
63605        pkgadd_help  $MISSING_DEPENDENCY ;;
63606    esac
63607
63608    if test "x$PKGHANDLER_COMMAND" != x; then
63609      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63610    fi
63611  fi
63612
63613      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63614    fi
63615  fi
63616
63617
63618
63619
63620
63621
63622# Check whether --with-libffi was given.
63623if test "${with_libffi+set}" = set; then :
63624  withval=$with_libffi;
63625fi
63626
63627
63628# Check whether --with-libffi-include was given.
63629if test "${with_libffi_include+set}" = set; then :
63630  withval=$with_libffi_include;
63631fi
63632
63633
63634# Check whether --with-libffi-lib was given.
63635if test "${with_libffi_lib+set}" = set; then :
63636  withval=$with_libffi_lib;
63637fi
63638
63639
63640  if test "x$NEEDS_LIB_FFI" = xfalse; then
63641    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63642        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63643        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63644      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63645$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63646    fi
63647    LIBFFI_CFLAGS=
63648    LIBFFI_LIBS=
63649  else
63650    LIBFFI_FOUND=no
63651
63652    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63653      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63654    fi
63655
63656    if test "x${with_libffi}" != x; then
63657      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63658      LIBFFI_CFLAGS="-I${with_libffi}/include"
63659      LIBFFI_FOUND=yes
63660    fi
63661    if test "x${with_libffi_include}" != x; then
63662      LIBFFI_CFLAGS="-I${with_libffi_include}"
63663      LIBFFI_FOUND=yes
63664    fi
63665    if test "x${with_libffi_lib}" != x; then
63666      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63667      LIBFFI_FOUND=yes
63668    fi
63669    # Do not try pkg-config if we have a sysroot set.
63670    if test "x$SYSROOT" = x; then
63671      if test "x$LIBFFI_FOUND" = xno; then
63672        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63673
63674pkg_failed=no
63675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63676$as_echo_n "checking for LIBFFI... " >&6; }
63677
63678if test -n "$LIBFFI_CFLAGS"; then
63679    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63680 elif test -n "$PKG_CONFIG"; then
63681    if test -n "$PKG_CONFIG" && \
63682    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63683  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63684  ac_status=$?
63685  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63686  test $ac_status = 0; }; then
63687  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63688else
63689  pkg_failed=yes
63690fi
63691 else
63692    pkg_failed=untried
63693fi
63694if test -n "$LIBFFI_LIBS"; then
63695    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63696 elif test -n "$PKG_CONFIG"; then
63697    if test -n "$PKG_CONFIG" && \
63698    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63699  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63700  ac_status=$?
63701  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63702  test $ac_status = 0; }; then
63703  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63704else
63705  pkg_failed=yes
63706fi
63707 else
63708    pkg_failed=untried
63709fi
63710
63711
63712
63713if test $pkg_failed = yes; then
63714
63715if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63716        _pkg_short_errors_supported=yes
63717else
63718        _pkg_short_errors_supported=no
63719fi
63720        if test $_pkg_short_errors_supported = yes; then
63721	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63722        else
63723	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63724        fi
63725	# Put the nasty error message in config.log where it belongs
63726	echo "$LIBFFI_PKG_ERRORS" >&5
63727
63728	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63729$as_echo "no" >&6; }
63730                LIBFFI_FOUND=no
63731elif test $pkg_failed = untried; then
63732	LIBFFI_FOUND=no
63733else
63734	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63735	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63737$as_echo "yes" >&6; }
63738	LIBFFI_FOUND=yes
63739fi
63740      fi
63741    fi
63742    if test "x$LIBFFI_FOUND" = xno; then
63743      for ac_header in ffi.h
63744do :
63745  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63746if test "x$ac_cv_header_ffi_h" = xyes; then :
63747  cat >>confdefs.h <<_ACEOF
63748#define HAVE_FFI_H 1
63749_ACEOF
63750
63751            LIBFFI_FOUND=yes
63752            LIBFFI_CFLAGS=
63753            LIBFFI_LIBS=-lffi
63754
63755else
63756  LIBFFI_FOUND=no
63757
63758fi
63759
63760done
63761
63762    fi
63763    if test "x$LIBFFI_FOUND" = xno; then
63764
63765  # Print a helpful message on how to acquire the necessary build dependency.
63766  # ffi is the help tag: freetype, cups, alsa etc
63767  MISSING_DEPENDENCY=ffi
63768
63769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63770    cygwin_help $MISSING_DEPENDENCY
63771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63772    msys_help $MISSING_DEPENDENCY
63773  else
63774    PKGHANDLER_COMMAND=
63775
63776    case $PKGHANDLER in
63777      apt-get)
63778        apt_help     $MISSING_DEPENDENCY ;;
63779      yum)
63780        yum_help     $MISSING_DEPENDENCY ;;
63781      port)
63782        port_help    $MISSING_DEPENDENCY ;;
63783      pkgutil)
63784        pkgutil_help $MISSING_DEPENDENCY ;;
63785      pkgadd)
63786        pkgadd_help  $MISSING_DEPENDENCY ;;
63787    esac
63788
63789    if test "x$PKGHANDLER_COMMAND" != x; then
63790      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63791    fi
63792  fi
63793
63794      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63795    fi
63796
63797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63798$as_echo_n "checking if libffi works... " >&6; }
63799    ac_ext=c
63800ac_cpp='$CPP $CPPFLAGS'
63801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63803ac_compiler_gnu=$ac_cv_c_compiler_gnu
63804
63805    OLD_CFLAGS="$CFLAGS"
63806    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63807    OLD_LIBS="$LIBS"
63808    LIBS="$LIBS $LIBFFI_LIBS"
63809    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63810/* end confdefs.h.  */
63811#include <ffi.h>
63812int
63813main ()
63814{
63815
63816          ffi_call(NULL, NULL, NULL, NULL);
63817          return 0;
63818
63819  ;
63820  return 0;
63821}
63822_ACEOF
63823if ac_fn_c_try_link "$LINENO"; then :
63824  LIBFFI_WORKS=yes
63825else
63826  LIBFFI_WORKS=no
63827
63828fi
63829rm -f core conftest.err conftest.$ac_objext \
63830    conftest$ac_exeext conftest.$ac_ext
63831    CFLAGS="$OLD_CFLAGS"
63832    LIBS="$OLD_LIBS"
63833    ac_ext=cpp
63834ac_cpp='$CXXCPP $CPPFLAGS'
63835ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63836ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63837ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63838
63839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63840$as_echo "$LIBFFI_WORKS" >&6; }
63841
63842    if test "x$LIBFFI_WORKS" = xno; then
63843
63844  # Print a helpful message on how to acquire the necessary build dependency.
63845  # ffi is the help tag: freetype, cups, alsa etc
63846  MISSING_DEPENDENCY=ffi
63847
63848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63849    cygwin_help $MISSING_DEPENDENCY
63850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63851    msys_help $MISSING_DEPENDENCY
63852  else
63853    PKGHANDLER_COMMAND=
63854
63855    case $PKGHANDLER in
63856      apt-get)
63857        apt_help     $MISSING_DEPENDENCY ;;
63858      yum)
63859        yum_help     $MISSING_DEPENDENCY ;;
63860      port)
63861        port_help    $MISSING_DEPENDENCY ;;
63862      pkgutil)
63863        pkgutil_help $MISSING_DEPENDENCY ;;
63864      pkgadd)
63865        pkgadd_help  $MISSING_DEPENDENCY ;;
63866    esac
63867
63868    if test "x$PKGHANDLER_COMMAND" != x; then
63869      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63870    fi
63871  fi
63872
63873      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63874    fi
63875  fi
63876
63877
63878
63879
63880
63881  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63882    # Extract the first word of "llvm-config", so it can be a program name with args.
63883set dummy llvm-config; ac_word=$2
63884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63885$as_echo_n "checking for $ac_word... " >&6; }
63886if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63887  $as_echo_n "(cached) " >&6
63888else
63889  if test -n "$LLVM_CONFIG"; then
63890  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63891else
63892as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63893for as_dir in $PATH
63894do
63895  IFS=$as_save_IFS
63896  test -z "$as_dir" && as_dir=.
63897    for ac_exec_ext in '' $ac_executable_extensions; do
63898  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63899    ac_cv_prog_LLVM_CONFIG="llvm-config"
63900    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63901    break 2
63902  fi
63903done
63904  done
63905IFS=$as_save_IFS
63906
63907fi
63908fi
63909LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63910if test -n "$LLVM_CONFIG"; then
63911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63912$as_echo "$LLVM_CONFIG" >&6; }
63913else
63914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63915$as_echo "no" >&6; }
63916fi
63917
63918
63919
63920    if test "x$LLVM_CONFIG" != xllvm-config; then
63921      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63922    fi
63923
63924    llvm_components="jit mcjit engine nativecodegen native"
63925    unset LLVM_CFLAGS
63926    for flag in $("$LLVM_CONFIG" --cxxflags); do
63927      if echo "${flag}" | grep -q '^-[ID]'; then
63928        if test "${flag}" != "-D_DEBUG" ; then
63929          if test "${LLVM_CFLAGS}" != "" ; then
63930            LLVM_CFLAGS="${LLVM_CFLAGS} "
63931          fi
63932          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63933        fi
63934      fi
63935    done
63936    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63937    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63938
63939    unset LLVM_LDFLAGS
63940    for flag in $("${LLVM_CONFIG}" --ldflags); do
63941      if echo "${flag}" | grep -q '^-L'; then
63942        if test "${LLVM_LDFLAGS}" != ""; then
63943          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63944        fi
63945        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63946      fi
63947    done
63948
63949    unset LLVM_LIBS
63950    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63951      if echo "${flag}" | grep -q '^-l'; then
63952        if test "${LLVM_LIBS}" != ""; then
63953          LLVM_LIBS="${LLVM_LIBS} "
63954        fi
63955        LLVM_LIBS="${LLVM_LIBS}${flag}"
63956      fi
63957    done
63958
63959    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63960    # always properly detect -ltinfo
63961    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63962
63963
63964
63965
63966  fi
63967
63968
63969
63970# Check whether --with-libjpeg was given.
63971if test "${with_libjpeg+set}" = set; then :
63972  withval=$with_libjpeg;
63973fi
63974
63975
63976  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63977$as_echo_n "checking for which libjpeg to use... " >&6; }
63978  # default is bundled
63979  DEFAULT_LIBJPEG=bundled
63980  # if user didn't specify, use DEFAULT_LIBJPEG
63981  if test "x${with_libjpeg}" = "x"; then
63982    with_libjpeg=${DEFAULT_LIBJPEG}
63983  fi
63984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63985$as_echo "${with_libjpeg}" >&6; }
63986
63987  if test "x${with_libjpeg}" = "xbundled"; then
63988    USE_EXTERNAL_LIBJPEG=false
63989  elif test "x${with_libjpeg}" = "xsystem"; then
63990    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63991if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63992
63993else
63994   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63995fi
63996
63997
63998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63999$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64000if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64001  $as_echo_n "(cached) " >&6
64002else
64003  ac_check_lib_save_LIBS=$LIBS
64004LIBS="-ljpeg  $LIBS"
64005cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64006/* end confdefs.h.  */
64007
64008/* Override any GCC internal prototype to avoid an error.
64009   Use char because int might match the return type of a GCC
64010   builtin and then its argument prototype would still apply.  */
64011#ifdef __cplusplus
64012extern "C"
64013#endif
64014char jpeg_CreateDecompress ();
64015int
64016main ()
64017{
64018return jpeg_CreateDecompress ();
64019  ;
64020  return 0;
64021}
64022_ACEOF
64023if ac_fn_cxx_try_link "$LINENO"; then :
64024  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64025else
64026  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64027fi
64028rm -f core conftest.err conftest.$ac_objext \
64029    conftest$ac_exeext conftest.$ac_ext
64030LIBS=$ac_check_lib_save_LIBS
64031fi
64032{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64033$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64034if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64035  cat >>confdefs.h <<_ACEOF
64036#define HAVE_LIBJPEG 1
64037_ACEOF
64038
64039  LIBS="-ljpeg $LIBS"
64040
64041else
64042   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64043fi
64044
64045
64046    USE_EXTERNAL_LIBJPEG=true
64047  else
64048    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64049  fi
64050
64051
64052
64053
64054
64055# Check whether --with-giflib was given.
64056if test "${with_giflib+set}" = set; then :
64057  withval=$with_giflib;
64058fi
64059
64060
64061  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64062$as_echo_n "checking for which giflib to use... " >&6; }
64063  # default is bundled
64064  DEFAULT_GIFLIB=bundled
64065  # if user didn't specify, use DEFAULT_GIFLIB
64066  if test "x${with_giflib}" = "x"; then
64067    with_giflib=${DEFAULT_GIFLIB}
64068  fi
64069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64070$as_echo "${with_giflib}" >&6; }
64071
64072  if test "x${with_giflib}" = "xbundled"; then
64073    USE_EXTERNAL_LIBGIF=false
64074  elif test "x${with_giflib}" = "xsystem"; then
64075    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64076if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64077
64078else
64079   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64080fi
64081
64082
64083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64084$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64085if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64086  $as_echo_n "(cached) " >&6
64087else
64088  ac_check_lib_save_LIBS=$LIBS
64089LIBS="-lgif  $LIBS"
64090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64091/* end confdefs.h.  */
64092
64093/* Override any GCC internal prototype to avoid an error.
64094   Use char because int might match the return type of a GCC
64095   builtin and then its argument prototype would still apply.  */
64096#ifdef __cplusplus
64097extern "C"
64098#endif
64099char DGifGetCode ();
64100int
64101main ()
64102{
64103return DGifGetCode ();
64104  ;
64105  return 0;
64106}
64107_ACEOF
64108if ac_fn_cxx_try_link "$LINENO"; then :
64109  ac_cv_lib_gif_DGifGetCode=yes
64110else
64111  ac_cv_lib_gif_DGifGetCode=no
64112fi
64113rm -f core conftest.err conftest.$ac_objext \
64114    conftest$ac_exeext conftest.$ac_ext
64115LIBS=$ac_check_lib_save_LIBS
64116fi
64117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64118$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64119if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64120  cat >>confdefs.h <<_ACEOF
64121#define HAVE_LIBGIF 1
64122_ACEOF
64123
64124  LIBS="-lgif $LIBS"
64125
64126else
64127   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64128fi
64129
64130
64131    USE_EXTERNAL_LIBGIF=true
64132  else
64133    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64134  fi
64135
64136
64137
64138
64139
64140# Check whether --with-libpng was given.
64141if test "${with_libpng+set}" = set; then :
64142  withval=$with_libpng;
64143fi
64144
64145
64146  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64147$as_echo_n "checking for which libpng to use... " >&6; }
64148
64149  # default is bundled
64150  DEFAULT_LIBPNG=bundled
64151  # if user didn't specify, use DEFAULT_LIBPNG
64152  if test "x${with_libpng}" = "x"; then
64153      with_libpng=${DEFAULT_LIBPNG}
64154  fi
64155
64156  if test "x${with_libpng}" = "xbundled"; then
64157      USE_EXTERNAL_LIBPNG=false
64158      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64159$as_echo "bundled" >&6; }
64160  elif test "x${with_libpng}" = "xsystem"; then
64161
64162pkg_failed=no
64163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64164$as_echo_n "checking for PNG... " >&6; }
64165
64166if test -n "$PNG_CFLAGS"; then
64167    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64168 elif test -n "$PKG_CONFIG"; then
64169    if test -n "$PKG_CONFIG" && \
64170    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64171  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64172  ac_status=$?
64173  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64174  test $ac_status = 0; }; then
64175  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64176else
64177  pkg_failed=yes
64178fi
64179 else
64180    pkg_failed=untried
64181fi
64182if test -n "$PNG_LIBS"; then
64183    pkg_cv_PNG_LIBS="$PNG_LIBS"
64184 elif test -n "$PKG_CONFIG"; then
64185    if test -n "$PKG_CONFIG" && \
64186    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64187  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64188  ac_status=$?
64189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64190  test $ac_status = 0; }; then
64191  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64192else
64193  pkg_failed=yes
64194fi
64195 else
64196    pkg_failed=untried
64197fi
64198
64199
64200
64201if test $pkg_failed = yes; then
64202
64203if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64204        _pkg_short_errors_supported=yes
64205else
64206        _pkg_short_errors_supported=no
64207fi
64208        if test $_pkg_short_errors_supported = yes; then
64209	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64210        else
64211	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64212        fi
64213	# Put the nasty error message in config.log where it belongs
64214	echo "$PNG_PKG_ERRORS" >&5
64215
64216	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64217$as_echo "no" >&6; }
64218                 LIBPNG_FOUND=no
64219elif test $pkg_failed = untried; then
64220	 LIBPNG_FOUND=no
64221else
64222	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64223	PNG_LIBS=$pkg_cv_PNG_LIBS
64224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64225$as_echo "yes" >&6; }
64226	 LIBPNG_FOUND=yes
64227fi
64228      if test "x${LIBPNG_FOUND}" = "xyes"; then
64229          USE_EXTERNAL_LIBPNG=true
64230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64231$as_echo "system" >&6; }
64232      else
64233          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64234$as_echo "system not found" >&6; }
64235          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64236      fi
64237  else
64238      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64239  fi
64240
64241
64242
64243
64244
64245# Check whether --with-zlib was given.
64246if test "${with_zlib+set}" = set; then :
64247  withval=$with_zlib;
64248fi
64249
64250
64251  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64252$as_echo_n "checking for compress in -lz... " >&6; }
64253if ${ac_cv_lib_z_compress+:} false; then :
64254  $as_echo_n "(cached) " >&6
64255else
64256  ac_check_lib_save_LIBS=$LIBS
64257LIBS="-lz  $LIBS"
64258cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64259/* end confdefs.h.  */
64260
64261/* Override any GCC internal prototype to avoid an error.
64262   Use char because int might match the return type of a GCC
64263   builtin and then its argument prototype would still apply.  */
64264#ifdef __cplusplus
64265extern "C"
64266#endif
64267char compress ();
64268int
64269main ()
64270{
64271return compress ();
64272  ;
64273  return 0;
64274}
64275_ACEOF
64276if ac_fn_cxx_try_link "$LINENO"; then :
64277  ac_cv_lib_z_compress=yes
64278else
64279  ac_cv_lib_z_compress=no
64280fi
64281rm -f core conftest.err conftest.$ac_objext \
64282    conftest$ac_exeext conftest.$ac_ext
64283LIBS=$ac_check_lib_save_LIBS
64284fi
64285{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64286$as_echo "$ac_cv_lib_z_compress" >&6; }
64287if test "x$ac_cv_lib_z_compress" = xyes; then :
64288   ZLIB_FOUND=yes
64289else
64290   ZLIB_FOUND=no
64291fi
64292
64293
64294  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64295$as_echo_n "checking for which zlib to use... " >&6; }
64296
64297  DEFAULT_ZLIB=system
64298  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64299    # On windows default is bundled...on others default is system
64300    DEFAULT_ZLIB=bundled
64301  fi
64302
64303  if test "x${ZLIB_FOUND}" != "xyes"; then
64304    # If we don't find any system...set default to bundled
64305    DEFAULT_ZLIB=bundled
64306  fi
64307
64308  # If user didn't specify, use DEFAULT_ZLIB
64309  if test "x${with_zlib}" = "x"; then
64310    with_zlib=${DEFAULT_ZLIB}
64311  fi
64312
64313  if test "x${with_zlib}" = "xbundled"; then
64314    USE_EXTERNAL_LIBZ=false
64315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64316$as_echo "bundled" >&6; }
64317  elif test "x${with_zlib}" = "xsystem"; then
64318    if test "x${ZLIB_FOUND}" = "xyes"; then
64319      USE_EXTERNAL_LIBZ=true
64320      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64321$as_echo "system" >&6; }
64322    else
64323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64324$as_echo "system not found" >&6; }
64325      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64326    fi
64327  else
64328    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64329  fi
64330
64331
64332
64333
64334
64335# Check whether --with-lcms was given.
64336if test "${with_lcms+set}" = set; then :
64337  withval=$with_lcms;
64338fi
64339
64340
64341  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64342$as_echo_n "checking for which lcms to use... " >&6; }
64343
64344  DEFAULT_LCMS=bundled
64345  # If user didn't specify, use DEFAULT_LCMS
64346  if test "x${with_lcms}" = "x"; then
64347      with_lcms=${DEFAULT_LCMS}
64348  fi
64349
64350  if test "x${with_lcms}" = "xbundled"; then
64351    USE_EXTERNAL_LCMS=false
64352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64353$as_echo "bundled" >&6; }
64354  elif test "x${with_lcms}" = "xsystem"; then
64355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64356$as_echo "system" >&6; }
64357
64358pkg_failed=no
64359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64360$as_echo_n "checking for LCMS... " >&6; }
64361
64362if test -n "$LCMS_CFLAGS"; then
64363    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64364 elif test -n "$PKG_CONFIG"; then
64365    if test -n "$PKG_CONFIG" && \
64366    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64367  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64368  ac_status=$?
64369  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64370  test $ac_status = 0; }; then
64371  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64372else
64373  pkg_failed=yes
64374fi
64375 else
64376    pkg_failed=untried
64377fi
64378if test -n "$LCMS_LIBS"; then
64379    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64380 elif test -n "$PKG_CONFIG"; then
64381    if test -n "$PKG_CONFIG" && \
64382    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64383  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64384  ac_status=$?
64385  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64386  test $ac_status = 0; }; then
64387  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64388else
64389  pkg_failed=yes
64390fi
64391 else
64392    pkg_failed=untried
64393fi
64394
64395
64396
64397if test $pkg_failed = yes; then
64398
64399if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64400        _pkg_short_errors_supported=yes
64401else
64402        _pkg_short_errors_supported=no
64403fi
64404        if test $_pkg_short_errors_supported = yes; then
64405	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64406        else
64407	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64408        fi
64409	# Put the nasty error message in config.log where it belongs
64410	echo "$LCMS_PKG_ERRORS" >&5
64411
64412	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64413$as_echo "no" >&6; }
64414                LCMS_FOUND=no
64415elif test $pkg_failed = untried; then
64416	LCMS_FOUND=no
64417else
64418	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64419	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64421$as_echo "yes" >&6; }
64422	LCMS_FOUND=yes
64423fi
64424    if test "x${LCMS_FOUND}" = "xyes"; then
64425      USE_EXTERNAL_LCMS=true
64426    else
64427      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64428    fi
64429  else
64430    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64431  fi
64432
64433
64434
64435
64436
64437
64438
64439
64440
64441
64442
64443  # Setup libm (the maths library)
64444  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64445    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64446$as_echo_n "checking for cos in -lm... " >&6; }
64447if ${ac_cv_lib_m_cos+:} false; then :
64448  $as_echo_n "(cached) " >&6
64449else
64450  ac_check_lib_save_LIBS=$LIBS
64451LIBS="-lm  $LIBS"
64452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64453/* end confdefs.h.  */
64454
64455/* Override any GCC internal prototype to avoid an error.
64456   Use char because int might match the return type of a GCC
64457   builtin and then its argument prototype would still apply.  */
64458#ifdef __cplusplus
64459extern "C"
64460#endif
64461char cos ();
64462int
64463main ()
64464{
64465return cos ();
64466  ;
64467  return 0;
64468}
64469_ACEOF
64470if ac_fn_cxx_try_link "$LINENO"; then :
64471  ac_cv_lib_m_cos=yes
64472else
64473  ac_cv_lib_m_cos=no
64474fi
64475rm -f core conftest.err conftest.$ac_objext \
64476    conftest$ac_exeext conftest.$ac_ext
64477LIBS=$ac_check_lib_save_LIBS
64478fi
64479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64480$as_echo "$ac_cv_lib_m_cos" >&6; }
64481if test "x$ac_cv_lib_m_cos" = xyes; then :
64482  cat >>confdefs.h <<_ACEOF
64483#define HAVE_LIBM 1
64484_ACEOF
64485
64486  LIBS="-lm $LIBS"
64487
64488else
64489
64490        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64491$as_echo "$as_me: Maths library was not found" >&6;}
64492
64493fi
64494
64495    LIBM="-lm"
64496  else
64497    LIBM=""
64498  fi
64499
64500
64501  # Setup libdl (for dynamic library loading)
64502  save_LIBS="$LIBS"
64503  LIBS=""
64504  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64505$as_echo_n "checking for dlopen in -ldl... " >&6; }
64506if ${ac_cv_lib_dl_dlopen+:} false; then :
64507  $as_echo_n "(cached) " >&6
64508else
64509  ac_check_lib_save_LIBS=$LIBS
64510LIBS="-ldl  $LIBS"
64511cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64512/* end confdefs.h.  */
64513
64514/* Override any GCC internal prototype to avoid an error.
64515   Use char because int might match the return type of a GCC
64516   builtin and then its argument prototype would still apply.  */
64517#ifdef __cplusplus
64518extern "C"
64519#endif
64520char dlopen ();
64521int
64522main ()
64523{
64524return dlopen ();
64525  ;
64526  return 0;
64527}
64528_ACEOF
64529if ac_fn_cxx_try_link "$LINENO"; then :
64530  ac_cv_lib_dl_dlopen=yes
64531else
64532  ac_cv_lib_dl_dlopen=no
64533fi
64534rm -f core conftest.err conftest.$ac_objext \
64535    conftest$ac_exeext conftest.$ac_ext
64536LIBS=$ac_check_lib_save_LIBS
64537fi
64538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64539$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64540if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64541  cat >>confdefs.h <<_ACEOF
64542#define HAVE_LIBDL 1
64543_ACEOF
64544
64545  LIBS="-ldl $LIBS"
64546
64547fi
64548
64549  LIBDL="$LIBS"
64550
64551  LIBS="$save_LIBS"
64552
64553  # Deprecated libraries, keep the flags for backwards compatibility
64554  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64555
64556
64557# Check whether --with-dxsdk was given.
64558if test "${with_dxsdk+set}" = set; then :
64559  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64560$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64561fi
64562
64563
64564
64565
64566# Check whether --with-dxsdk-lib was given.
64567if test "${with_dxsdk_lib+set}" = set; then :
64568  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64569$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64570fi
64571
64572
64573
64574
64575# Check whether --with-dxsdk-include was given.
64576if test "${with_dxsdk_include+set}" = set; then :
64577  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64578$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64579fi
64580
64581
64582  fi
64583
64584  # Control if libzip can use mmap. Available for purposes of overriding.
64585  LIBZIP_CAN_USE_MMAP=true
64586
64587
64588
64589  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64590    # Find the root of the Solaris Studio installation from the compiler path
64591    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64592    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64594$as_echo_n "checking for libstlport.so.1... " >&6; }
64595    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64596      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64597      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64598    fi
64599    if test -f "$STLPORT_LIB"; then
64600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64601$as_echo "yes, $STLPORT_LIB" >&6; }
64602
64603  # Only process if variable expands to non-empty
64604
64605  if test "x$STLPORT_LIB" != x; then
64606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64607
64608  # Input might be given as Windows format, start by converting to
64609  # unix format.
64610  path="$STLPORT_LIB"
64611  new_path=`$CYGPATH -u "$path"`
64612
64613  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64614  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64615  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64616  # "foo.exe" is OK but "foo" is an error.
64617  #
64618  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64619  # It is also a way to make sure we got the proper file name for the real test later on.
64620  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64621  if test "x$test_shortpath" = x; then
64622    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64623$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64624    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64625  fi
64626
64627  # Call helper function which possibly converts this using DOS-style short mode.
64628  # If so, the updated path is stored in $new_path.
64629
64630  input_path="$new_path"
64631  # Check if we need to convert this using DOS-style short mode. If the path
64632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64633  # take no chances and rewrite it.
64634  # Note: m4 eats our [], so we need to use [ and ] instead.
64635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64636  if test "x$has_forbidden_chars" != x; then
64637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64641      # Going to short mode and back again did indeed matter. Since short mode is
64642      # case insensitive, let's make it lowercase to improve readability.
64643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64644      # Now convert it back to Unix-style (cygpath)
64645      input_path=`$CYGPATH -u "$shortmode_path"`
64646      new_path="$input_path"
64647    fi
64648  fi
64649
64650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64651  if test "x$test_cygdrive_prefix" = x; then
64652    # As a simple fix, exclude /usr/bin since it's not a real path.
64653    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64655      # a path prefixed by /cygdrive for fixpath to work.
64656      new_path="$CYGWIN_ROOT_PATH$input_path"
64657    fi
64658  fi
64659
64660
64661  if test "x$path" != "x$new_path"; then
64662    STLPORT_LIB="$new_path"
64663    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64664$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64665  fi
64666
64667    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64668
64669  path="$STLPORT_LIB"
64670  has_colon=`$ECHO $path | $GREP ^.:`
64671  new_path="$path"
64672  if test "x$has_colon" = x; then
64673    # Not in mixed or Windows style, start by that.
64674    new_path=`cmd //c echo $path`
64675  fi
64676
64677
64678  input_path="$new_path"
64679  # Check if we need to convert this using DOS-style short mode. If the path
64680  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64681  # take no chances and rewrite it.
64682  # Note: m4 eats our [], so we need to use [ and ] instead.
64683  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64684  if test "x$has_forbidden_chars" != x; then
64685    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64686    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64687  fi
64688
64689
64690  windows_path="$new_path"
64691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64692    unix_path=`$CYGPATH -u "$windows_path"`
64693    new_path="$unix_path"
64694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64696    new_path="$unix_path"
64697  fi
64698
64699  if test "x$path" != "x$new_path"; then
64700    STLPORT_LIB="$new_path"
64701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64702$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64703  fi
64704
64705  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64706  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64707
64708    else
64709      # We're on a unix platform. Hooray! :)
64710      path="$STLPORT_LIB"
64711      has_space=`$ECHO "$path" | $GREP " "`
64712      if test "x$has_space" != x; then
64713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64714$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64715        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64716      fi
64717
64718      # Use eval to expand a potential ~
64719      eval path="$path"
64720      if test ! -f "$path" && test ! -d "$path"; then
64721        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64722      fi
64723
64724      if test -d "$path"; then
64725        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64726      else
64727        dir="`$DIRNAME "$path"`"
64728        base="`$BASENAME "$path"`"
64729        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64730      fi
64731    fi
64732  fi
64733
64734    else
64735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64736$as_echo "no, not found at $STLPORT_LIB" >&6; }
64737      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64738    fi
64739
64740  fi
64741
64742
64743
64744
64745
64746
64747
64748
64749
64750
64751
64752
64753
64754
64755###############################################################################
64756#
64757# We need to do some final tweaking, when everything else is done.
64758#
64759###############################################################################
64760
64761
64762  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64763$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64764
64765  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64766    ENABLE_INTREE_EC=yes
64767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64768$as_echo "yes" >&6; }
64769  else
64770    ENABLE_INTREE_EC=no
64771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64772$as_echo "no" >&6; }
64773  fi
64774
64775
64776
64777
64778  # Check whether --enable-jtreg-failure-handler was given.
64779if test "${enable_jtreg_failure_handler+set}" = set; then :
64780  enableval=$enable_jtreg_failure_handler;
64781fi
64782
64783
64784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64785$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64786
64787  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64788    if test "x$JT_HOME" = "x"; then
64789      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64790    else
64791      BUILD_FAILURE_HANDLER=true
64792      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64793$as_echo "yes, forced" >&6; }
64794    fi
64795  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64796    BUILD_FAILURE_HANDLER=false
64797    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64798$as_echo "no, forced" >&6; }
64799  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64800      || test "x$enable_jtreg_failure_handler" = "x"; then
64801    if test "x$JT_HOME" = "x"; then
64802      BUILD_FAILURE_HANDLER=false
64803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64804$as_echo "no, missing jtreg" >&6; }
64805    else
64806      BUILD_FAILURE_HANDLER=true
64807      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64808$as_echo "yes, jtreg present" >&6; }
64809    fi
64810  else
64811    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64812  fi
64813
64814
64815
64816
64817  # Check whether --enable-generate-classlist was given.
64818if test "${enable_generate_classlist+set}" = set; then :
64819  enableval=$enable_generate_classlist;
64820fi
64821
64822
64823  # Check if it's likely that it's possible to generate the classlist. Depending
64824  # on exact jvm configuration it could be possible anyway.
64825  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64826    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64827  else
64828    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64829  fi
64830
64831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64832$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64833  if test "x$enable_generate_classlist" = "xyes"; then
64834    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64835$as_echo "yes, forced" >&6; }
64836    ENABLE_GENERATE_CLASSLIST="true"
64837    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64838      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64839$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64840    fi
64841  elif test "x$enable_generate_classlist" = "xno"; then
64842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64843$as_echo "no, forced" >&6; }
64844    ENABLE_GENERATE_CLASSLIST="false"
64845  elif test "x$enable_generate_classlist" = "x"; then
64846    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64847      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64848$as_echo "yes" >&6; }
64849      ENABLE_GENERATE_CLASSLIST="true"
64850    else
64851      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64852$as_echo "no" >&6; }
64853      ENABLE_GENERATE_CLASSLIST="false"
64854    fi
64855  else
64856    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64857  fi
64858
64859
64860
64861
64862###############################################################################
64863#
64864# Configure parts of the build that only affect the build performance,
64865# not the result.
64866#
64867###############################################################################
64868
64869
64870  # How many cores do we have on this build system?
64871
64872# Check whether --with-num-cores was given.
64873if test "${with_num_cores+set}" = set; then :
64874  withval=$with_num_cores;
64875fi
64876
64877  if test "x$with_num_cores" = x; then
64878    # The number of cores were not specified, try to probe them.
64879
64880  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64881$as_echo_n "checking for number of cores... " >&6; }
64882  NUM_CORES=1
64883  FOUND_CORES=no
64884
64885  if test -f /proc/cpuinfo; then
64886    # Looks like a Linux (or cygwin) system
64887    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64888    FOUND_CORES=yes
64889  elif test -x /usr/sbin/psrinfo; then
64890    # Looks like a Solaris system
64891    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64892    FOUND_CORES=yes
64893  elif test -x /usr/sbin/sysctl; then
64894    # Looks like a MacOSX system
64895    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64896    FOUND_CORES=yes
64897  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64898    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64899    FOUND_CORES=yes
64900  elif test -n "$NUMBER_OF_PROCESSORS"; then
64901    # On windows, look in the env
64902    NUM_CORES=$NUMBER_OF_PROCESSORS
64903    FOUND_CORES=yes
64904  fi
64905
64906  if test "x$FOUND_CORES" = xyes; then
64907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64908$as_echo "$NUM_CORES" >&6; }
64909  else
64910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64911$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64912    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64913$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64914  fi
64915
64916  else
64917    NUM_CORES=$with_num_cores
64918  fi
64919
64920
64921
64922  # How much memory do we have on this build system?
64923
64924# Check whether --with-memory-size was given.
64925if test "${with_memory_size+set}" = set; then :
64926  withval=$with_memory_size;
64927fi
64928
64929  if test "x$with_memory_size" = x; then
64930    # The memory size was not specified, try to probe it.
64931
64932  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64933$as_echo_n "checking for memory size... " >&6; }
64934  # Default to 1024 MB
64935  MEMORY_SIZE=1024
64936  FOUND_MEM=no
64937
64938  if test -f /proc/meminfo; then
64939    # Looks like a Linux (or cygwin) system
64940    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64941    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64942    FOUND_MEM=yes
64943  elif test -x /usr/sbin/prtconf; then
64944    # Looks like a Solaris or AIX system
64945    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64946    FOUND_MEM=yes
64947  elif test -x /usr/sbin/sysctl; then
64948    # Looks like a MacOSX system
64949    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64950    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64951    FOUND_MEM=yes
64952  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64953    # Windows, but without cygwin
64954    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64955    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64956    FOUND_MEM=yes
64957  fi
64958
64959  if test "x$FOUND_MEM" = xyes; then
64960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64961$as_echo "$MEMORY_SIZE MB" >&6; }
64962  else
64963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64964$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64965    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64966$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64967  fi
64968
64969  else
64970    MEMORY_SIZE=$with_memory_size
64971  fi
64972
64973
64974
64975  # Provide a decent default number of parallel jobs for make depending on
64976  # number of cores, amount of memory and machine architecture.
64977
64978# Check whether --with-jobs was given.
64979if test "${with_jobs+set}" = set; then :
64980  withval=$with_jobs;
64981fi
64982
64983  if test "x$with_jobs" = x; then
64984    # Number of jobs was not specified, calculate.
64985    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64986$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64987    # Approximate memory in GB.
64988    memory_gb=`expr $MEMORY_SIZE / 1024`
64989    # Pick the lowest of memory in gb and number of cores.
64990    if test "$memory_gb" -lt "$NUM_CORES"; then
64991      JOBS="$memory_gb"
64992    else
64993      JOBS="$NUM_CORES"
64994    fi
64995    if test "$JOBS" -eq "0"; then
64996      JOBS=1
64997    fi
64998    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64999$as_echo "$JOBS" >&6; }
65000  else
65001    JOBS=$with_jobs
65002  fi
65003
65004
65005
65006  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65007
65008# Check whether --with-test-jobs was given.
65009if test "${with_test_jobs+set}" = set; then :
65010  withval=$with_test_jobs;
65011fi
65012
65013  if test "x$with_test_jobs" = x; then
65014      TEST_JOBS=0
65015  else
65016      TEST_JOBS=$with_test_jobs
65017  fi
65018
65019
65020
65021# Setup arguments for the boot jdk (after cores and memory have been setup)
65022
65023  ##############################################################################
65024  #
65025  # Specify jvm options for anything that is run with the Boot JDK.
65026  # Not all JVM:s accept the same arguments on the command line.
65027  #
65028
65029# Check whether --with-boot-jdk-jvmargs was given.
65030if test "${with_boot_jdk_jvmargs+set}" = set; then :
65031  withval=$with_boot_jdk_jvmargs;
65032fi
65033
65034
65035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65036$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65037
65038  # Disable special log output when a debug build is used as Boot JDK...
65039
65040  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65041  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65042  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65043  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65044  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65045  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65046    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65047    JVM_ARG_OK=true
65048  else
65049    $ECHO "Arg failed:" >&5
65050    $ECHO "$OUTPUT" >&5
65051    JVM_ARG_OK=false
65052  fi
65053
65054
65055  # Force en-US environment
65056
65057  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
65058  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
65059  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
65060  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65061  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65062  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65063    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
65064    JVM_ARG_OK=true
65065  else
65066    $ECHO "Arg failed:" >&5
65067    $ECHO "$OUTPUT" >&5
65068    JVM_ARG_OK=false
65069  fi
65070
65071
65072  # Apply user provided options.
65073
65074  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65075  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65076  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65077  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65078  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65079  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65080    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65081    JVM_ARG_OK=true
65082  else
65083    $ECHO "Arg failed:" >&5
65084    $ECHO "$OUTPUT" >&5
65085    JVM_ARG_OK=false
65086  fi
65087
65088
65089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65090$as_echo "$boot_jdk_jvmargs" >&6; }
65091
65092  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65093  JAVA_FLAGS=$boot_jdk_jvmargs
65094
65095
65096
65097  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65098$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65099
65100  # Starting amount of heap memory.
65101
65102  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65103  $ECHO "Command: $JAVA -Xms64M -version" >&5
65104  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65105  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65106  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65107  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65108    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65109    JVM_ARG_OK=true
65110  else
65111    $ECHO "Arg failed:" >&5
65112    $ECHO "$OUTPUT" >&5
65113    JVM_ARG_OK=false
65114  fi
65115
65116  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
65117
65118  # Maximum amount of heap memory and stack size.
65119  JVM_HEAP_LIMIT_32="1024"
65120  # Running a 64 bit JVM allows for and requires a bigger heap
65121  JVM_HEAP_LIMIT_64="1600"
65122  STACK_SIZE_32=768
65123  STACK_SIZE_64=1536
65124  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
65125  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
65126    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
65127  fi
65128  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
65129    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
65130  fi
65131  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
65132    JVM_HEAP_LIMIT_32=512
65133    JVM_HEAP_LIMIT_64=512
65134  fi
65135
65136  if test "x$BOOT_JDK_BITS" = "x32"; then
65137    STACK_SIZE=$STACK_SIZE_32
65138    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
65139  else
65140    STACK_SIZE=$STACK_SIZE_64
65141    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
65142  fi
65143
65144  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65145  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65146  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65147  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65148  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65149  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65150    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65151    JVM_ARG_OK=true
65152  else
65153    $ECHO "Arg failed:" >&5
65154    $ECHO "$OUTPUT" >&5
65155    JVM_ARG_OK=false
65156  fi
65157
65158
65159  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65160  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65161  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65162  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65163  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65164  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65165    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65166    JVM_ARG_OK=true
65167  else
65168    $ECHO "Arg failed:" >&5
65169    $ECHO "$OUTPUT" >&5
65170    JVM_ARG_OK=false
65171  fi
65172
65173
65174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65175$as_echo "$boot_jdk_jvmargs_big" >&6; }
65176
65177  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65178
65179
65180  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65181    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65182    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65183  else
65184    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65185    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65186  fi
65187  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65188  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65189  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65190$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65192$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65193
65194
65195  # By default, the main javac compilations use big
65196  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65197
65198
65199  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65200$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65201
65202  # Use serial gc for small short lived tools if possible
65203
65204  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65205  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65206  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65207  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65208  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65209  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65210    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65211    JVM_ARG_OK=true
65212  else
65213    $ECHO "Arg failed:" >&5
65214    $ECHO "$OUTPUT" >&5
65215    JVM_ARG_OK=false
65216  fi
65217
65218
65219  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65220  $ECHO "Command: $JAVA -Xms32M -version" >&5
65221  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65222  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65223  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65224  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65225    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65226    JVM_ARG_OK=true
65227  else
65228    $ECHO "Arg failed:" >&5
65229    $ECHO "$OUTPUT" >&5
65230    JVM_ARG_OK=false
65231  fi
65232
65233
65234  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65235  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65236  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65237  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65238  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65239  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65240    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65241    JVM_ARG_OK=true
65242  else
65243    $ECHO "Arg failed:" >&5
65244    $ECHO "$OUTPUT" >&5
65245    JVM_ARG_OK=false
65246  fi
65247
65248
65249  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65250  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65251  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65252  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65253  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65254  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65255    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65256    JVM_ARG_OK=true
65257  else
65258    $ECHO "Arg failed:" >&5
65259    $ECHO "$OUTPUT" >&5
65260    JVM_ARG_OK=false
65261  fi
65262
65263
65264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65265$as_echo "$boot_jdk_jvmargs_small" >&6; }
65266
65267  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65268
65269
65270  JAVA_TOOL_FLAGS_SMALL=""
65271  for f in $JAVA_FLAGS_SMALL; do
65272    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65273  done
65274
65275
65276
65277# Setup smart javac (after cores and memory have been setup)
65278
65279
65280# Check whether --with-sjavac-server-java was given.
65281if test "${with_sjavac_server_java+set}" = set; then :
65282  withval=$with_sjavac_server_java;
65283fi
65284
65285
65286  if test "x$with_sjavac_server_java" != x; then
65287    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65288    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65289    if test "x$FOUND_VERSION" = x; then
65290      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65291    fi
65292  else
65293    SJAVAC_SERVER_JAVA="$JAVA"
65294  fi
65295
65296
65297  if test "$MEMORY_SIZE" -gt "3000"; then
65298
65299  $ECHO "Check if jvm arg is ok: -d64" >&5
65300  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65301  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65302  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65303  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65304  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65305    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65306    JVM_ARG_OK=true
65307  else
65308    $ECHO "Arg failed:" >&5
65309    $ECHO "$OUTPUT" >&5
65310    JVM_ARG_OK=false
65311  fi
65312
65313    if test "$JVM_ARG_OK" = true; then
65314      JVM_64BIT=true
65315      JVM_ARG_OK=false
65316    fi
65317  fi
65318
65319  MX_VALUE=`expr $MEMORY_SIZE / 2`
65320  if test "$JVM_64BIT" = true; then
65321    # Set ms lower than mx since more than one instance of the server might
65322    # get launched at the same time before they figure out which instance won.
65323    MS_VALUE=512
65324    if test "$MX_VALUE" -gt "2048"; then
65325      MX_VALUE=2048
65326    fi
65327  else
65328    MS_VALUE=256
65329    if test "$MX_VALUE" -gt "1500"; then
65330      MX_VALUE=1500
65331    fi
65332  fi
65333  if test "$MX_VALUE" -lt "512"; then
65334    MX_VALUE=512
65335  fi
65336
65337  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65338  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65339  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65340  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65341  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65342  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65343    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65344    JVM_ARG_OK=true
65345  else
65346    $ECHO "Arg failed:" >&5
65347    $ECHO "$OUTPUT" >&5
65348    JVM_ARG_OK=false
65349  fi
65350
65351
65352
65353  # Check whether --enable-sjavac was given.
65354if test "${enable_sjavac+set}" = set; then :
65355  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65356else
65357  ENABLE_SJAVAC="no"
65358fi
65359
65360  if test "x$JVM_ARG_OK" = "xfalse"; then
65361    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65362$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65363    ENABLE_SJAVAC="no"
65364  fi
65365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65366$as_echo_n "checking whether to use sjavac... " >&6; }
65367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65368$as_echo "$ENABLE_SJAVAC" >&6; }
65369
65370
65371  # Check whether --enable-javac-server was given.
65372if test "${enable_javac_server+set}" = set; then :
65373  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65374else
65375  ENABLE_JAVAC_SERVER="yes"
65376fi
65377
65378  if test "x$JVM_ARG_OK" = "xfalse"; then
65379    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65380$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65381    ENABLE_JAVAC_SERVER="no"
65382  fi
65383  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65384$as_echo_n "checking whether to use javac server... " >&6; }
65385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65386$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65387
65388
65389  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65390    # When using a server javac, the small client instances do not need much
65391    # resources.
65392    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65393  fi
65394
65395
65396# Setup use of icecc if requested
65397
65398  # Check whether --enable-icecc was given.
65399if test "${enable_icecc+set}" = set; then :
65400  enableval=$enable_icecc;
65401fi
65402
65403
65404  if test "x${enable_icecc}" = "xyes"; then
65405
65406
65407
65408  # Publish this variable in the help.
65409
65410
65411  if [ -z "${ICECC_CMD+x}" ]; then
65412    # The variable is not set by user, try to locate tool using the code snippet
65413    for ac_prog in icecc
65414do
65415  # Extract the first word of "$ac_prog", so it can be a program name with args.
65416set dummy $ac_prog; ac_word=$2
65417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65418$as_echo_n "checking for $ac_word... " >&6; }
65419if ${ac_cv_path_ICECC_CMD+:} false; then :
65420  $as_echo_n "(cached) " >&6
65421else
65422  case $ICECC_CMD in
65423  [\\/]* | ?:[\\/]*)
65424  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65425  ;;
65426  *)
65427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65428for as_dir in $PATH
65429do
65430  IFS=$as_save_IFS
65431  test -z "$as_dir" && as_dir=.
65432    for ac_exec_ext in '' $ac_executable_extensions; do
65433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65434    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65436    break 2
65437  fi
65438done
65439  done
65440IFS=$as_save_IFS
65441
65442  ;;
65443esac
65444fi
65445ICECC_CMD=$ac_cv_path_ICECC_CMD
65446if test -n "$ICECC_CMD"; then
65447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65448$as_echo "$ICECC_CMD" >&6; }
65449else
65450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65451$as_echo "no" >&6; }
65452fi
65453
65454
65455  test -n "$ICECC_CMD" && break
65456done
65457
65458  else
65459    # The variable is set, but is it from the command line or the environment?
65460
65461    # Try to remove the string !ICECC_CMD! from our list.
65462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65464      # If it failed, the variable was not from the command line. Ignore it,
65465      # but warn the user (except for BASH, which is always set by the calling BASH).
65466      if test "xICECC_CMD" != xBASH; then
65467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65468$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65469      fi
65470      # Try to locate tool using the code snippet
65471      for ac_prog in icecc
65472do
65473  # Extract the first word of "$ac_prog", so it can be a program name with args.
65474set dummy $ac_prog; ac_word=$2
65475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65476$as_echo_n "checking for $ac_word... " >&6; }
65477if ${ac_cv_path_ICECC_CMD+:} false; then :
65478  $as_echo_n "(cached) " >&6
65479else
65480  case $ICECC_CMD in
65481  [\\/]* | ?:[\\/]*)
65482  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65483  ;;
65484  *)
65485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65486for as_dir in $PATH
65487do
65488  IFS=$as_save_IFS
65489  test -z "$as_dir" && as_dir=.
65490    for ac_exec_ext in '' $ac_executable_extensions; do
65491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65492    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65494    break 2
65495  fi
65496done
65497  done
65498IFS=$as_save_IFS
65499
65500  ;;
65501esac
65502fi
65503ICECC_CMD=$ac_cv_path_ICECC_CMD
65504if test -n "$ICECC_CMD"; then
65505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65506$as_echo "$ICECC_CMD" >&6; }
65507else
65508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65509$as_echo "no" >&6; }
65510fi
65511
65512
65513  test -n "$ICECC_CMD" && break
65514done
65515
65516    else
65517      # If it succeeded, then it was overridden by the user. We will use it
65518      # for the tool.
65519
65520      # First remove it from the list of overridden variables, so we can test
65521      # for unknown variables in the end.
65522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65523
65524      # Check if we try to supply an empty value
65525      if test "x$ICECC_CMD" = x; then
65526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65527$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65529$as_echo_n "checking for ICECC_CMD... " >&6; }
65530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65531$as_echo "disabled" >&6; }
65532      else
65533        # Check if the provided tool contains a complete path.
65534        tool_specified="$ICECC_CMD"
65535        tool_basename="${tool_specified##*/}"
65536        if test "x$tool_basename" = "x$tool_specified"; then
65537          # A command without a complete path is provided, search $PATH.
65538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65539$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65540          # Extract the first word of "$tool_basename", so it can be a program name with args.
65541set dummy $tool_basename; ac_word=$2
65542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65543$as_echo_n "checking for $ac_word... " >&6; }
65544if ${ac_cv_path_ICECC_CMD+:} false; then :
65545  $as_echo_n "(cached) " >&6
65546else
65547  case $ICECC_CMD in
65548  [\\/]* | ?:[\\/]*)
65549  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65550  ;;
65551  *)
65552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65553for as_dir in $PATH
65554do
65555  IFS=$as_save_IFS
65556  test -z "$as_dir" && as_dir=.
65557    for ac_exec_ext in '' $ac_executable_extensions; do
65558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65559    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65561    break 2
65562  fi
65563done
65564  done
65565IFS=$as_save_IFS
65566
65567  ;;
65568esac
65569fi
65570ICECC_CMD=$ac_cv_path_ICECC_CMD
65571if test -n "$ICECC_CMD"; then
65572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65573$as_echo "$ICECC_CMD" >&6; }
65574else
65575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65576$as_echo "no" >&6; }
65577fi
65578
65579
65580          if test "x$ICECC_CMD" = x; then
65581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65582          fi
65583        else
65584          # Otherwise we believe it is a complete path. Use it as it is.
65585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65586$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65588$as_echo_n "checking for ICECC_CMD... " >&6; }
65589          if test ! -x "$tool_specified"; then
65590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65591$as_echo "not found" >&6; }
65592            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65593          fi
65594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65595$as_echo "$tool_specified" >&6; }
65596        fi
65597      fi
65598    fi
65599
65600  fi
65601
65602
65603
65604  if test "x$ICECC_CMD" = x; then
65605    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65606  fi
65607
65608
65609    old_path="$PATH"
65610
65611    # Look for icecc-create-env in some known places
65612    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65613
65614
65615
65616  # Publish this variable in the help.
65617
65618
65619  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65620    # The variable is not set by user, try to locate tool using the code snippet
65621    for ac_prog in icecc-create-env
65622do
65623  # Extract the first word of "$ac_prog", so it can be a program name with args.
65624set dummy $ac_prog; ac_word=$2
65625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65626$as_echo_n "checking for $ac_word... " >&6; }
65627if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65628  $as_echo_n "(cached) " >&6
65629else
65630  case $ICECC_CREATE_ENV in
65631  [\\/]* | ?:[\\/]*)
65632  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65633  ;;
65634  *)
65635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65636for as_dir in $PATH
65637do
65638  IFS=$as_save_IFS
65639  test -z "$as_dir" && as_dir=.
65640    for ac_exec_ext in '' $ac_executable_extensions; do
65641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65642    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65644    break 2
65645  fi
65646done
65647  done
65648IFS=$as_save_IFS
65649
65650  ;;
65651esac
65652fi
65653ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65654if test -n "$ICECC_CREATE_ENV"; then
65655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65656$as_echo "$ICECC_CREATE_ENV" >&6; }
65657else
65658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65659$as_echo "no" >&6; }
65660fi
65661
65662
65663  test -n "$ICECC_CREATE_ENV" && break
65664done
65665
65666  else
65667    # The variable is set, but is it from the command line or the environment?
65668
65669    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65672      # If it failed, the variable was not from the command line. Ignore it,
65673      # but warn the user (except for BASH, which is always set by the calling BASH).
65674      if test "xICECC_CREATE_ENV" != xBASH; then
65675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65676$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65677      fi
65678      # Try to locate tool using the code snippet
65679      for ac_prog in icecc-create-env
65680do
65681  # Extract the first word of "$ac_prog", so it can be a program name with args.
65682set dummy $ac_prog; ac_word=$2
65683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65684$as_echo_n "checking for $ac_word... " >&6; }
65685if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65686  $as_echo_n "(cached) " >&6
65687else
65688  case $ICECC_CREATE_ENV in
65689  [\\/]* | ?:[\\/]*)
65690  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65691  ;;
65692  *)
65693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65694for as_dir in $PATH
65695do
65696  IFS=$as_save_IFS
65697  test -z "$as_dir" && as_dir=.
65698    for ac_exec_ext in '' $ac_executable_extensions; do
65699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65700    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65702    break 2
65703  fi
65704done
65705  done
65706IFS=$as_save_IFS
65707
65708  ;;
65709esac
65710fi
65711ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65712if test -n "$ICECC_CREATE_ENV"; then
65713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65714$as_echo "$ICECC_CREATE_ENV" >&6; }
65715else
65716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65717$as_echo "no" >&6; }
65718fi
65719
65720
65721  test -n "$ICECC_CREATE_ENV" && break
65722done
65723
65724    else
65725      # If it succeeded, then it was overridden by the user. We will use it
65726      # for the tool.
65727
65728      # First remove it from the list of overridden variables, so we can test
65729      # for unknown variables in the end.
65730      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65731
65732      # Check if we try to supply an empty value
65733      if test "x$ICECC_CREATE_ENV" = x; then
65734        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65735$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65736        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65737$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65738        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65739$as_echo "disabled" >&6; }
65740      else
65741        # Check if the provided tool contains a complete path.
65742        tool_specified="$ICECC_CREATE_ENV"
65743        tool_basename="${tool_specified##*/}"
65744        if test "x$tool_basename" = "x$tool_specified"; then
65745          # A command without a complete path is provided, search $PATH.
65746          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65747$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65748          # Extract the first word of "$tool_basename", so it can be a program name with args.
65749set dummy $tool_basename; ac_word=$2
65750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65751$as_echo_n "checking for $ac_word... " >&6; }
65752if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65753  $as_echo_n "(cached) " >&6
65754else
65755  case $ICECC_CREATE_ENV in
65756  [\\/]* | ?:[\\/]*)
65757  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65758  ;;
65759  *)
65760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65761for as_dir in $PATH
65762do
65763  IFS=$as_save_IFS
65764  test -z "$as_dir" && as_dir=.
65765    for ac_exec_ext in '' $ac_executable_extensions; do
65766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65767    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65769    break 2
65770  fi
65771done
65772  done
65773IFS=$as_save_IFS
65774
65775  ;;
65776esac
65777fi
65778ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65779if test -n "$ICECC_CREATE_ENV"; then
65780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65781$as_echo "$ICECC_CREATE_ENV" >&6; }
65782else
65783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65784$as_echo "no" >&6; }
65785fi
65786
65787
65788          if test "x$ICECC_CREATE_ENV" = x; then
65789            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65790          fi
65791        else
65792          # Otherwise we believe it is a complete path. Use it as it is.
65793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65794$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65795          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65796$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65797          if test ! -x "$tool_specified"; then
65798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65799$as_echo "not found" >&6; }
65800            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65801          fi
65802          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65803$as_echo "$tool_specified" >&6; }
65804        fi
65805      fi
65806    fi
65807
65808  fi
65809
65810
65811
65812  if test "x$ICECC_CREATE_ENV" = x; then
65813    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65814  fi
65815
65816
65817    # Use icecc-create-env to create a minimal compilation environment that can
65818    # be sent to the other hosts in the icecream cluster.
65819    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65820    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65821    # Older versions of icecc does not have the --gcc parameter
65822    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65823      icecc_gcc_arg="--gcc"
65824    fi
65825    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65826
65827  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65828      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65829          ${icecc_create_env_log} 2>&1 )
65830  if test "$?" != "0"; then
65831    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65832$as_echo "$as_me: icecc-create-env output:" >&6;}
65833    cat \
65834          ${icecc_create_env_log}
65835    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65836  fi
65837
65838    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65839      # For clang, the icecc compilerwrapper is needed. It usually resides next
65840      # to icecc-create-env.
65841
65842
65843
65844  # Publish this variable in the help.
65845
65846
65847  if [ -z "${ICECC_WRAPPER+x}" ]; then
65848    # The variable is not set by user, try to locate tool using the code snippet
65849    for ac_prog in compilerwrapper
65850do
65851  # Extract the first word of "$ac_prog", so it can be a program name with args.
65852set dummy $ac_prog; ac_word=$2
65853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65854$as_echo_n "checking for $ac_word... " >&6; }
65855if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65856  $as_echo_n "(cached) " >&6
65857else
65858  case $ICECC_WRAPPER in
65859  [\\/]* | ?:[\\/]*)
65860  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65861  ;;
65862  *)
65863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65864for as_dir in $PATH
65865do
65866  IFS=$as_save_IFS
65867  test -z "$as_dir" && as_dir=.
65868    for ac_exec_ext in '' $ac_executable_extensions; do
65869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65870    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65872    break 2
65873  fi
65874done
65875  done
65876IFS=$as_save_IFS
65877
65878  ;;
65879esac
65880fi
65881ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65882if test -n "$ICECC_WRAPPER"; then
65883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65884$as_echo "$ICECC_WRAPPER" >&6; }
65885else
65886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65887$as_echo "no" >&6; }
65888fi
65889
65890
65891  test -n "$ICECC_WRAPPER" && break
65892done
65893
65894  else
65895    # The variable is set, but is it from the command line or the environment?
65896
65897    # Try to remove the string !ICECC_WRAPPER! from our list.
65898    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65899    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65900      # If it failed, the variable was not from the command line. Ignore it,
65901      # but warn the user (except for BASH, which is always set by the calling BASH).
65902      if test "xICECC_WRAPPER" != xBASH; then
65903        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65904$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65905      fi
65906      # Try to locate tool using the code snippet
65907      for ac_prog in compilerwrapper
65908do
65909  # Extract the first word of "$ac_prog", so it can be a program name with args.
65910set dummy $ac_prog; ac_word=$2
65911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65912$as_echo_n "checking for $ac_word... " >&6; }
65913if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65914  $as_echo_n "(cached) " >&6
65915else
65916  case $ICECC_WRAPPER in
65917  [\\/]* | ?:[\\/]*)
65918  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65919  ;;
65920  *)
65921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65922for as_dir in $PATH
65923do
65924  IFS=$as_save_IFS
65925  test -z "$as_dir" && as_dir=.
65926    for ac_exec_ext in '' $ac_executable_extensions; do
65927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65928    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65930    break 2
65931  fi
65932done
65933  done
65934IFS=$as_save_IFS
65935
65936  ;;
65937esac
65938fi
65939ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65940if test -n "$ICECC_WRAPPER"; then
65941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65942$as_echo "$ICECC_WRAPPER" >&6; }
65943else
65944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65945$as_echo "no" >&6; }
65946fi
65947
65948
65949  test -n "$ICECC_WRAPPER" && break
65950done
65951
65952    else
65953      # If it succeeded, then it was overridden by the user. We will use it
65954      # for the tool.
65955
65956      # First remove it from the list of overridden variables, so we can test
65957      # for unknown variables in the end.
65958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65959
65960      # Check if we try to supply an empty value
65961      if test "x$ICECC_WRAPPER" = x; then
65962        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65963$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65965$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65966        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65967$as_echo "disabled" >&6; }
65968      else
65969        # Check if the provided tool contains a complete path.
65970        tool_specified="$ICECC_WRAPPER"
65971        tool_basename="${tool_specified##*/}"
65972        if test "x$tool_basename" = "x$tool_specified"; then
65973          # A command without a complete path is provided, search $PATH.
65974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65975$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65976          # Extract the first word of "$tool_basename", so it can be a program name with args.
65977set dummy $tool_basename; ac_word=$2
65978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65979$as_echo_n "checking for $ac_word... " >&6; }
65980if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65981  $as_echo_n "(cached) " >&6
65982else
65983  case $ICECC_WRAPPER in
65984  [\\/]* | ?:[\\/]*)
65985  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65986  ;;
65987  *)
65988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65989for as_dir in $PATH
65990do
65991  IFS=$as_save_IFS
65992  test -z "$as_dir" && as_dir=.
65993    for ac_exec_ext in '' $ac_executable_extensions; do
65994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65995    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65997    break 2
65998  fi
65999done
66000  done
66001IFS=$as_save_IFS
66002
66003  ;;
66004esac
66005fi
66006ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66007if test -n "$ICECC_WRAPPER"; then
66008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66009$as_echo "$ICECC_WRAPPER" >&6; }
66010else
66011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66012$as_echo "no" >&6; }
66013fi
66014
66015
66016          if test "x$ICECC_WRAPPER" = x; then
66017            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66018          fi
66019        else
66020          # Otherwise we believe it is a complete path. Use it as it is.
66021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66022$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66023          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66024$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66025          if test ! -x "$tool_specified"; then
66026            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66027$as_echo "not found" >&6; }
66028            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66029          fi
66030          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66031$as_echo "$tool_specified" >&6; }
66032        fi
66033      fi
66034    fi
66035
66036  fi
66037
66038
66039
66040  if test "x$ICECC_WRAPPER" = x; then
66041    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66042  fi
66043
66044
66045
66046  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66047      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66048  if test "$?" != "0"; then
66049    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66050$as_echo "$as_me: icecc-create-env output:" >&6;}
66051    cat ${icecc_create_env_log}
66052    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66053  fi
66054
66055    else
66056      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66057    fi
66058    PATH="$old_path"
66059    # The bundle with the compiler gets a name based on checksums. Parse log file
66060    # to find it.
66061    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66062    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66063    if test ! -f ${ICECC_ENV_BUNDLE}; then
66064      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66065    fi
66066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66067$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66069$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66070    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66071
66072    if test "x${COMPILE_TYPE}" = "xcross"; then
66073      # If cross compiling, create a separate env package for the build compiler
66074      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66075      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66076      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66077
66078  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66079      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66080            ${icecc_create_env_log_build} 2>&1 )
66081  if test "$?" != "0"; then
66082    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66083$as_echo "$as_me: icecc-create-env output:" >&6;}
66084    cat \
66085            ${icecc_create_env_log_build}
66086    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66087  fi
66088
66089      elif test "x${BUILD_CC##*/}" = "xclang"; then
66090
66091  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66092      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66093  if test "$?" != "0"; then
66094    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66095$as_echo "$as_me: icecc-create-env output:" >&6;}
66096    cat ${icecc_create_env_log_build}
66097    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66098  fi
66099
66100      else
66101        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66102      fi
66103      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66104      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66105      if test ! -f ${ICECC_ENV_BUNDLE}; then
66106        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66107      fi
66108      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66109$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66110      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66111$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66112      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66113          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66114    else
66115      BUILD_ICECC="${ICECC}"
66116    fi
66117
66118
66119  fi
66120
66121
66122# Can the C/C++ compiler use precompiled headers?
66123
66124
66125  ###############################################################################
66126  #
66127  # Can the C/C++ compiler use precompiled headers?
66128  #
66129  # Check whether --enable-precompiled-headers was given.
66130if test "${enable_precompiled_headers+set}" = set; then :
66131  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66132else
66133  ENABLE_PRECOMPH=yes
66134fi
66135
66136
66137  USE_PRECOMPILED_HEADER=1
66138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66139$as_echo_n "checking If precompiled header is enabled... " >&6; }
66140  if test "x$ENABLE_PRECOMPH" = xno; then
66141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66142$as_echo "no, forced" >&6; }
66143    USE_PRECOMPILED_HEADER=0
66144  elif test "x$ICECC" != "x"; then
66145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66146$as_echo "no, does not work effectively with icecc" >&6; }
66147    USE_PRECOMPILED_HEADER=0
66148  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66149    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66150$as_echo "no, does not work with Solaris Studio" >&6; }
66151    USE_PRECOMPILED_HEADER=0
66152  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66154$as_echo "no, does not work with xlc" >&6; }
66155    USE_PRECOMPILED_HEADER=0
66156  else
66157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66158$as_echo "yes" >&6; }
66159  fi
66160
66161  if test "x$ENABLE_PRECOMPH" = xyes; then
66162    # Check that the compiler actually supports precomp headers.
66163    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66164      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66165$as_echo_n "checking that precompiled headers work... " >&6; }
66166      echo "int alfa();" > conftest.h
66167      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66168      if test ! -f conftest.hpp.gch; then
66169        USE_PRECOMPILED_HEADER=0
66170        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66171$as_echo "no" >&6; }
66172      else
66173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66174$as_echo "yes" >&6; }
66175      fi
66176      $RM conftest.h conftest.hpp.gch
66177    fi
66178  fi
66179
66180
66181
66182
66183# Setup use of ccache, if available
66184
66185  # Check whether --enable-ccache was given.
66186if test "${enable_ccache+set}" = set; then :
66187  enableval=$enable_ccache;
66188fi
66189
66190
66191  CCACHE=
66192  CCACHE_STATUS=
66193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66194$as_echo_n "checking is ccache enabled... " >&6; }
66195  if test "x$enable_ccache" = xyes; then
66196    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66198$as_echo "yes" >&6; }
66199      OLD_PATH="$PATH"
66200      if test "x$TOOLCHAIN_PATH" != x; then
66201        PATH=$TOOLCHAIN_PATH:$PATH
66202      fi
66203
66204
66205
66206  # Publish this variable in the help.
66207
66208
66209  if [ -z "${CCACHE+x}" ]; then
66210    # The variable is not set by user, try to locate tool using the code snippet
66211    for ac_prog in ccache
66212do
66213  # Extract the first word of "$ac_prog", so it can be a program name with args.
66214set dummy $ac_prog; ac_word=$2
66215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66216$as_echo_n "checking for $ac_word... " >&6; }
66217if ${ac_cv_path_CCACHE+:} false; then :
66218  $as_echo_n "(cached) " >&6
66219else
66220  case $CCACHE in
66221  [\\/]* | ?:[\\/]*)
66222  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66223  ;;
66224  *)
66225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66226for as_dir in $PATH
66227do
66228  IFS=$as_save_IFS
66229  test -z "$as_dir" && as_dir=.
66230    for ac_exec_ext in '' $ac_executable_extensions; do
66231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66232    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66234    break 2
66235  fi
66236done
66237  done
66238IFS=$as_save_IFS
66239
66240  ;;
66241esac
66242fi
66243CCACHE=$ac_cv_path_CCACHE
66244if test -n "$CCACHE"; then
66245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66246$as_echo "$CCACHE" >&6; }
66247else
66248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66249$as_echo "no" >&6; }
66250fi
66251
66252
66253  test -n "$CCACHE" && break
66254done
66255
66256  else
66257    # The variable is set, but is it from the command line or the environment?
66258
66259    # Try to remove the string !CCACHE! from our list.
66260    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66261    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66262      # If it failed, the variable was not from the command line. Ignore it,
66263      # but warn the user (except for BASH, which is always set by the calling BASH).
66264      if test "xCCACHE" != xBASH; then
66265        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66266$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66267      fi
66268      # Try to locate tool using the code snippet
66269      for ac_prog in ccache
66270do
66271  # Extract the first word of "$ac_prog", so it can be a program name with args.
66272set dummy $ac_prog; ac_word=$2
66273{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66274$as_echo_n "checking for $ac_word... " >&6; }
66275if ${ac_cv_path_CCACHE+:} false; then :
66276  $as_echo_n "(cached) " >&6
66277else
66278  case $CCACHE in
66279  [\\/]* | ?:[\\/]*)
66280  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66281  ;;
66282  *)
66283  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66284for as_dir in $PATH
66285do
66286  IFS=$as_save_IFS
66287  test -z "$as_dir" && as_dir=.
66288    for ac_exec_ext in '' $ac_executable_extensions; do
66289  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66290    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66291    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66292    break 2
66293  fi
66294done
66295  done
66296IFS=$as_save_IFS
66297
66298  ;;
66299esac
66300fi
66301CCACHE=$ac_cv_path_CCACHE
66302if test -n "$CCACHE"; then
66303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66304$as_echo "$CCACHE" >&6; }
66305else
66306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66307$as_echo "no" >&6; }
66308fi
66309
66310
66311  test -n "$CCACHE" && break
66312done
66313
66314    else
66315      # If it succeeded, then it was overridden by the user. We will use it
66316      # for the tool.
66317
66318      # First remove it from the list of overridden variables, so we can test
66319      # for unknown variables in the end.
66320      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66321
66322      # Check if we try to supply an empty value
66323      if test "x$CCACHE" = x; then
66324        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66325$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66326        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66327$as_echo_n "checking for CCACHE... " >&6; }
66328        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66329$as_echo "disabled" >&6; }
66330      else
66331        # Check if the provided tool contains a complete path.
66332        tool_specified="$CCACHE"
66333        tool_basename="${tool_specified##*/}"
66334        if test "x$tool_basename" = "x$tool_specified"; then
66335          # A command without a complete path is provided, search $PATH.
66336          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66337$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66338          # Extract the first word of "$tool_basename", so it can be a program name with args.
66339set dummy $tool_basename; ac_word=$2
66340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66341$as_echo_n "checking for $ac_word... " >&6; }
66342if ${ac_cv_path_CCACHE+:} false; then :
66343  $as_echo_n "(cached) " >&6
66344else
66345  case $CCACHE in
66346  [\\/]* | ?:[\\/]*)
66347  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66348  ;;
66349  *)
66350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66351for as_dir in $PATH
66352do
66353  IFS=$as_save_IFS
66354  test -z "$as_dir" && as_dir=.
66355    for ac_exec_ext in '' $ac_executable_extensions; do
66356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66357    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66359    break 2
66360  fi
66361done
66362  done
66363IFS=$as_save_IFS
66364
66365  ;;
66366esac
66367fi
66368CCACHE=$ac_cv_path_CCACHE
66369if test -n "$CCACHE"; then
66370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66371$as_echo "$CCACHE" >&6; }
66372else
66373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66374$as_echo "no" >&6; }
66375fi
66376
66377
66378          if test "x$CCACHE" = x; then
66379            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66380          fi
66381        else
66382          # Otherwise we believe it is a complete path. Use it as it is.
66383          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66384$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66385          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66386$as_echo_n "checking for CCACHE... " >&6; }
66387          if test ! -x "$tool_specified"; then
66388            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66389$as_echo "not found" >&6; }
66390            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66391          fi
66392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66393$as_echo "$tool_specified" >&6; }
66394        fi
66395      fi
66396    fi
66397
66398  fi
66399
66400
66401
66402  if test "x$CCACHE" = x; then
66403    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66404  fi
66405
66406
66407      PATH="$OLD_PATH"
66408      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66409      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66410    else
66411      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66412$as_echo "no" >&6; }
66413      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66414$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66415    fi
66416  elif test "x$enable_ccache" = xno; then
66417    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66418$as_echo "no, explicitly disabled" >&6; }
66419    CCACHE_STATUS="Disabled"
66420  elif test "x$enable_ccache" = x; then
66421    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66422$as_echo "no" >&6; }
66423  else
66424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66425$as_echo "unknown" >&6; }
66426    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66427  fi
66428
66429
66430
66431# Check whether --with-ccache-dir was given.
66432if test "${with_ccache_dir+set}" = set; then :
66433  withval=$with_ccache_dir;
66434fi
66435
66436
66437  if test "x$with_ccache_dir" != x; then
66438    # When using a non home ccache directory, assume the use is to share ccache files
66439    # with other users. Thus change the umask.
66440    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66441    if test "x$CCACHE" = x; then
66442      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66443$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66444    fi
66445  fi
66446
66447  if test "x$CCACHE" != x; then
66448
66449  if test "x$CCACHE" != x; then
66450    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66451      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66452          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66453      if test "x$HAS_BAD_CCACHE" != "x"; then
66454        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66455      fi
66456      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66457$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66458      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66459      PUSHED_FLAGS="$CXXFLAGS"
66460      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66461      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66462/* end confdefs.h.  */
66463
66464int
66465main ()
66466{
66467
66468  ;
66469  return 0;
66470}
66471_ACEOF
66472if ac_fn_cxx_try_compile "$LINENO"; then :
66473  CC_KNOWS_CCACHE_TRICK=yes
66474else
66475  CC_KNOWS_CCACHE_TRICK=no
66476fi
66477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66478      CXXFLAGS="$PUSHED_FLAGS"
66479      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66480        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66481$as_echo "yes" >&6; }
66482        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66483
66484        CCACHE_SLOPPINESS=pch_defines,time_macros
66485      else
66486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66487$as_echo "no" >&6; }
66488        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66489      fi
66490    fi
66491
66492    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66493        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66494
66495    if test "x$SET_CCACHE_DIR" != x; then
66496      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66497      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66498    fi
66499  fi
66500
66501  fi
66502
66503
66504###############################################################################
66505#
66506# And now the finish...
66507#
66508###############################################################################
66509
66510# Check for some common pitfalls
66511
66512  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66513    file_to_test="$SRC_ROOT/LICENSE"
66514    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66515      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
66516    fi
66517  fi
66518
66519
66520  # Did user specify any unknown variables?
66521
66522  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66523    # Replace the separating ! with spaces before presenting for end user.
66524    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66525    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66526$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66527  fi
66528
66529
66530  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66531$as_echo_n "checking if build directory is on local disk... " >&6; }
66532
66533  # df -l lists only local disks; if the given directory is not found then
66534  # a non-zero exit code is given
66535  if test "x$DF" = x; then
66536    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66537      # msys does not have df; use Windows "net use" instead.
66538      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66539      if test "x$IS_NETWORK_DISK" = x; then
66540        OUTPUT_DIR_IS_LOCAL="yes"
66541      else
66542        OUTPUT_DIR_IS_LOCAL="no"
66543      fi
66544    else
66545      # No df here, say it's local
66546      OUTPUT_DIR_IS_LOCAL="yes"
66547    fi
66548  else
66549    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66550      OUTPUT_DIR_IS_LOCAL="yes"
66551    else
66552      OUTPUT_DIR_IS_LOCAL="no"
66553    fi
66554  fi
66555
66556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66557$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66558
66559
66560
66561  # Check if the user has any old-style ALT_ variables set.
66562  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66563
66564  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66565  # Since we can't properly handle the dependencies for this, warn the user about the situation
66566  if test -e $OUTPUT_ROOT/spec.gmk; then
66567    IS_RECONFIGURE=yes
66568  else
66569    IS_RECONFIGURE=no
66570  fi
66571
66572
66573# At the end, call the custom hook. (Dummy macro if no custom sources available)
66574
66575
66576# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66577
66578  # Keep feature lists sorted and free of duplicates
66579  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66580  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66581  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66582  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66583  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66584  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66585  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66586
66587  # Validate features
66588  for variant in $JVM_VARIANTS; do
66589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66590$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66591    features_var_name=JVM_FEATURES_$variant
66592    JVM_FEATURES_TO_TEST=${!features_var_name}
66593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66594$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66595    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66596    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66597    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66598    if test "x$INVALID_FEATURES" != x; then
66599      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66600    fi
66601  done
66602
66603
66604# We're messing a bit with internal autoconf variables to put the config.status
66605# in the output directory instead of the current directory.
66606CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66607
66608# Create the actual output files. Now the main work of configure is done.
66609cat >confcache <<\_ACEOF
66610# This file is a shell script that caches the results of configure
66611# tests run on this system so they can be shared between configure
66612# scripts and configure runs, see configure's option --config-cache.
66613# It is not useful on other systems.  If it contains results you don't
66614# want to keep, you may remove or edit it.
66615#
66616# config.status only pays attention to the cache file if you give it
66617# the --recheck option to rerun configure.
66618#
66619# `ac_cv_env_foo' variables (set or unset) will be overridden when
66620# loading this file, other *unset* `ac_cv_foo' will be assigned the
66621# following values.
66622
66623_ACEOF
66624
66625# The following way of writing the cache mishandles newlines in values,
66626# but we know of no workaround that is simple, portable, and efficient.
66627# So, we kill variables containing newlines.
66628# Ultrix sh set writes to stderr and can't be redirected directly,
66629# and sets the high bit in the cache file unless we assign to the vars.
66630(
66631  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66632    eval ac_val=\$$ac_var
66633    case $ac_val in #(
66634    *${as_nl}*)
66635      case $ac_var in #(
66636      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66637$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66638      esac
66639      case $ac_var in #(
66640      _ | IFS | as_nl) ;; #(
66641      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66642      *) { eval $ac_var=; unset $ac_var;} ;;
66643      esac ;;
66644    esac
66645  done
66646
66647  (set) 2>&1 |
66648    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66649    *${as_nl}ac_space=\ *)
66650      # `set' does not quote correctly, so add quotes: double-quote
66651      # substitution turns \\\\ into \\, and sed turns \\ into \.
66652      sed -n \
66653	"s/'/'\\\\''/g;
66654	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66655      ;; #(
66656    *)
66657      # `set' quotes correctly as required by POSIX, so do not add quotes.
66658      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66659      ;;
66660    esac |
66661    sort
66662) |
66663  sed '
66664     /^ac_cv_env_/b end
66665     t clear
66666     :clear
66667     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66668     t end
66669     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66670     :end' >>confcache
66671if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66672  if test -w "$cache_file"; then
66673    if test "x$cache_file" != "x/dev/null"; then
66674      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66675$as_echo "$as_me: updating cache $cache_file" >&6;}
66676      if test ! -f "$cache_file" || test -h "$cache_file"; then
66677	cat confcache >"$cache_file"
66678      else
66679        case $cache_file in #(
66680        */* | ?:*)
66681	  mv -f confcache "$cache_file"$$ &&
66682	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66683        *)
66684	  mv -f confcache "$cache_file" ;;
66685	esac
66686      fi
66687    fi
66688  else
66689    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66690$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66691  fi
66692fi
66693rm -f confcache
66694
66695test "x$prefix" = xNONE && prefix=$ac_default_prefix
66696# Let make expand exec_prefix.
66697test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66698
66699# Transform confdefs.h into DEFS.
66700# Protect against shell expansion while executing Makefile rules.
66701# Protect against Makefile macro expansion.
66702#
66703# If the first sed substitution is executed (which looks for macros that
66704# take arguments), then branch to the quote section.  Otherwise,
66705# look for a macro that doesn't take arguments.
66706ac_script='
66707:mline
66708/\\$/{
66709 N
66710 s,\\\n,,
66711 b mline
66712}
66713t clear
66714:clear
66715s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66716t quote
66717s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66718t quote
66719b any
66720:quote
66721s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66722s/\[/\\&/g
66723s/\]/\\&/g
66724s/\$/$$/g
66725H
66726:any
66727${
66728	g
66729	s/^\n//
66730	s/\n/ /g
66731	p
66732}
66733'
66734DEFS=`sed -n "$ac_script" confdefs.h`
66735
66736
66737ac_libobjs=
66738ac_ltlibobjs=
66739U=
66740for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66741  # 1. Remove the extension, and $U if already installed.
66742  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66743  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66744  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66745  #    will be set to the directory where LIBOBJS objects are built.
66746  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66747  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66748done
66749LIBOBJS=$ac_libobjs
66750
66751LTLIBOBJS=$ac_ltlibobjs
66752
66753
66754
66755: "${CONFIG_STATUS=./config.status}"
66756ac_write_fail=0
66757ac_clean_files_save=$ac_clean_files
66758ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66759{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66760$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66761as_write_fail=0
66762cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66763#! $SHELL
66764# Generated by $as_me.
66765# Run this file to recreate the current configuration.
66766# Compiler output produced by configure, useful for debugging
66767# configure, is in config.log if it exists.
66768
66769debug=false
66770ac_cs_recheck=false
66771ac_cs_silent=false
66772
66773SHELL=\${CONFIG_SHELL-$SHELL}
66774export SHELL
66775_ASEOF
66776cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66777## -------------------- ##
66778## M4sh Initialization. ##
66779## -------------------- ##
66780
66781# Be more Bourne compatible
66782DUALCASE=1; export DUALCASE # for MKS sh
66783if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66784  emulate sh
66785  NULLCMD=:
66786  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66787  # is contrary to our usage.  Disable this feature.
66788  alias -g '${1+"$@"}'='"$@"'
66789  setopt NO_GLOB_SUBST
66790else
66791  case `(set -o) 2>/dev/null` in #(
66792  *posix*) :
66793    set -o posix ;; #(
66794  *) :
66795     ;;
66796esac
66797fi
66798
66799
66800as_nl='
66801'
66802export as_nl
66803# Printing a long string crashes Solaris 7 /usr/bin/printf.
66804as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66805as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66806as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66807# Prefer a ksh shell builtin over an external printf program on Solaris,
66808# but without wasting forks for bash or zsh.
66809if test -z "$BASH_VERSION$ZSH_VERSION" \
66810    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66811  as_echo='print -r --'
66812  as_echo_n='print -rn --'
66813elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66814  as_echo='printf %s\n'
66815  as_echo_n='printf %s'
66816else
66817  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66818    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66819    as_echo_n='/usr/ucb/echo -n'
66820  else
66821    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66822    as_echo_n_body='eval
66823      arg=$1;
66824      case $arg in #(
66825      *"$as_nl"*)
66826	expr "X$arg" : "X\\(.*\\)$as_nl";
66827	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66828      esac;
66829      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66830    '
66831    export as_echo_n_body
66832    as_echo_n='sh -c $as_echo_n_body as_echo'
66833  fi
66834  export as_echo_body
66835  as_echo='sh -c $as_echo_body as_echo'
66836fi
66837
66838# The user is always right.
66839if test "${PATH_SEPARATOR+set}" != set; then
66840  PATH_SEPARATOR=:
66841  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66842    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66843      PATH_SEPARATOR=';'
66844  }
66845fi
66846
66847
66848# IFS
66849# We need space, tab and new line, in precisely that order.  Quoting is
66850# there to prevent editors from complaining about space-tab.
66851# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66852# splitting by setting IFS to empty value.)
66853IFS=" ""	$as_nl"
66854
66855# Find who we are.  Look in the path if we contain no directory separator.
66856as_myself=
66857case $0 in #((
66858  *[\\/]* ) as_myself=$0 ;;
66859  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66860for as_dir in $PATH
66861do
66862  IFS=$as_save_IFS
66863  test -z "$as_dir" && as_dir=.
66864    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66865  done
66866IFS=$as_save_IFS
66867
66868     ;;
66869esac
66870# We did not find ourselves, most probably we were run as `sh COMMAND'
66871# in which case we are not to be found in the path.
66872if test "x$as_myself" = x; then
66873  as_myself=$0
66874fi
66875if test ! -f "$as_myself"; then
66876  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66877  exit 1
66878fi
66879
66880# Unset variables that we do not need and which cause bugs (e.g. in
66881# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66882# suppresses any "Segmentation fault" message there.  '((' could
66883# trigger a bug in pdksh 5.2.14.
66884for as_var in BASH_ENV ENV MAIL MAILPATH
66885do eval test x\${$as_var+set} = xset \
66886  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66887done
66888PS1='$ '
66889PS2='> '
66890PS4='+ '
66891
66892# NLS nuisances.
66893LC_ALL=C
66894export LC_ALL
66895LANGUAGE=C
66896export LANGUAGE
66897
66898# CDPATH.
66899(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66900
66901
66902# as_fn_error STATUS ERROR [LINENO LOG_FD]
66903# ----------------------------------------
66904# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66905# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66906# script with STATUS, using 1 if that was 0.
66907as_fn_error ()
66908{
66909  as_status=$1; test $as_status -eq 0 && as_status=1
66910  if test "$4"; then
66911    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66912    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66913  fi
66914  $as_echo "$as_me: error: $2" >&2
66915  as_fn_exit $as_status
66916} # as_fn_error
66917
66918
66919# as_fn_set_status STATUS
66920# -----------------------
66921# Set $? to STATUS, without forking.
66922as_fn_set_status ()
66923{
66924  return $1
66925} # as_fn_set_status
66926
66927# as_fn_exit STATUS
66928# -----------------
66929# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66930as_fn_exit ()
66931{
66932  set +e
66933  as_fn_set_status $1
66934  exit $1
66935} # as_fn_exit
66936
66937# as_fn_unset VAR
66938# ---------------
66939# Portably unset VAR.
66940as_fn_unset ()
66941{
66942  { eval $1=; unset $1;}
66943}
66944as_unset=as_fn_unset
66945# as_fn_append VAR VALUE
66946# ----------------------
66947# Append the text in VALUE to the end of the definition contained in VAR. Take
66948# advantage of any shell optimizations that allow amortized linear growth over
66949# repeated appends, instead of the typical quadratic growth present in naive
66950# implementations.
66951if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66952  eval 'as_fn_append ()
66953  {
66954    eval $1+=\$2
66955  }'
66956else
66957  as_fn_append ()
66958  {
66959    eval $1=\$$1\$2
66960  }
66961fi # as_fn_append
66962
66963# as_fn_arith ARG...
66964# ------------------
66965# Perform arithmetic evaluation on the ARGs, and store the result in the
66966# global $as_val. Take advantage of shells that can avoid forks. The arguments
66967# must be portable across $(()) and expr.
66968if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66969  eval 'as_fn_arith ()
66970  {
66971    as_val=$(( $* ))
66972  }'
66973else
66974  as_fn_arith ()
66975  {
66976    as_val=`expr "$@" || test $? -eq 1`
66977  }
66978fi # as_fn_arith
66979
66980
66981if expr a : '\(a\)' >/dev/null 2>&1 &&
66982   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66983  as_expr=expr
66984else
66985  as_expr=false
66986fi
66987
66988if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66989  as_basename=basename
66990else
66991  as_basename=false
66992fi
66993
66994if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66995  as_dirname=dirname
66996else
66997  as_dirname=false
66998fi
66999
67000as_me=`$as_basename -- "$0" ||
67001$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
67002	 X"$0" : 'X\(//\)$' \| \
67003	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
67004$as_echo X/"$0" |
67005    sed '/^.*\/\([^/][^/]*\)\/*$/{
67006	    s//\1/
67007	    q
67008	  }
67009	  /^X\/\(\/\/\)$/{
67010	    s//\1/
67011	    q
67012	  }
67013	  /^X\/\(\/\).*/{
67014	    s//\1/
67015	    q
67016	  }
67017	  s/.*/./; q'`
67018
67019# Avoid depending upon Character Ranges.
67020as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67021as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67022as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67023as_cr_digits='0123456789'
67024as_cr_alnum=$as_cr_Letters$as_cr_digits
67025
67026ECHO_C= ECHO_N= ECHO_T=
67027case `echo -n x` in #(((((
67028-n*)
67029  case `echo 'xy\c'` in
67030  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67031  xy)  ECHO_C='\c';;
67032  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67033       ECHO_T='	';;
67034  esac;;
67035*)
67036  ECHO_N='-n';;
67037esac
67038
67039rm -f conf$$ conf$$.exe conf$$.file
67040if test -d conf$$.dir; then
67041  rm -f conf$$.dir/conf$$.file
67042else
67043  rm -f conf$$.dir
67044  mkdir conf$$.dir 2>/dev/null
67045fi
67046if (echo >conf$$.file) 2>/dev/null; then
67047  if ln -s conf$$.file conf$$ 2>/dev/null; then
67048    as_ln_s='ln -s'
67049    # ... but there are two gotchas:
67050    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67051    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67052    # In both cases, we have to default to `cp -pR'.
67053    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67054      as_ln_s='cp -pR'
67055  elif ln conf$$.file conf$$ 2>/dev/null; then
67056    as_ln_s=ln
67057  else
67058    as_ln_s='cp -pR'
67059  fi
67060else
67061  as_ln_s='cp -pR'
67062fi
67063rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67064rmdir conf$$.dir 2>/dev/null
67065
67066
67067# as_fn_mkdir_p
67068# -------------
67069# Create "$as_dir" as a directory, including parents if necessary.
67070as_fn_mkdir_p ()
67071{
67072
67073  case $as_dir in #(
67074  -*) as_dir=./$as_dir;;
67075  esac
67076  test -d "$as_dir" || eval $as_mkdir_p || {
67077    as_dirs=
67078    while :; do
67079      case $as_dir in #(
67080      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67081      *) as_qdir=$as_dir;;
67082      esac
67083      as_dirs="'$as_qdir' $as_dirs"
67084      as_dir=`$as_dirname -- "$as_dir" ||
67085$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67086	 X"$as_dir" : 'X\(//\)[^/]' \| \
67087	 X"$as_dir" : 'X\(//\)$' \| \
67088	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67089$as_echo X"$as_dir" |
67090    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67091	    s//\1/
67092	    q
67093	  }
67094	  /^X\(\/\/\)[^/].*/{
67095	    s//\1/
67096	    q
67097	  }
67098	  /^X\(\/\/\)$/{
67099	    s//\1/
67100	    q
67101	  }
67102	  /^X\(\/\).*/{
67103	    s//\1/
67104	    q
67105	  }
67106	  s/.*/./; q'`
67107      test -d "$as_dir" && break
67108    done
67109    test -z "$as_dirs" || eval "mkdir $as_dirs"
67110  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67111
67112
67113} # as_fn_mkdir_p
67114if mkdir -p . 2>/dev/null; then
67115  as_mkdir_p='mkdir -p "$as_dir"'
67116else
67117  test -d ./-p && rmdir ./-p
67118  as_mkdir_p=false
67119fi
67120
67121
67122# as_fn_executable_p FILE
67123# -----------------------
67124# Test if FILE is an executable regular file.
67125as_fn_executable_p ()
67126{
67127  test -f "$1" && test -x "$1"
67128} # as_fn_executable_p
67129as_test_x='test -x'
67130as_executable_p=as_fn_executable_p
67131
67132# Sed expression to map a string onto a valid CPP name.
67133as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67134
67135# Sed expression to map a string onto a valid variable name.
67136as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67137
67138
67139exec 6>&1
67140## ----------------------------------- ##
67141## Main body of $CONFIG_STATUS script. ##
67142## ----------------------------------- ##
67143_ASEOF
67144test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67145
67146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67147# Save the log message, to keep $0 and so on meaningful, and to
67148# report actual input values of CONFIG_FILES etc. instead of their
67149# values after options handling.
67150ac_log="
67151This file was extended by OpenJDK $as_me jdk9, which was
67152generated by GNU Autoconf 2.69.  Invocation command line was
67153
67154  CONFIG_FILES    = $CONFIG_FILES
67155  CONFIG_HEADERS  = $CONFIG_HEADERS
67156  CONFIG_LINKS    = $CONFIG_LINKS
67157  CONFIG_COMMANDS = $CONFIG_COMMANDS
67158  $ $0 $@
67159
67160on `(hostname || uname -n) 2>/dev/null | sed 1q`
67161"
67162
67163_ACEOF
67164
67165case $ac_config_files in *"
67166"*) set x $ac_config_files; shift; ac_config_files=$*;;
67167esac
67168
67169
67170
67171cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67172# Files that config.status was made for.
67173config_files="$ac_config_files"
67174
67175_ACEOF
67176
67177cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67178ac_cs_usage="\
67179\`$as_me' instantiates files and other configuration actions
67180from templates according to the current configuration.  Unless the files
67181and actions are specified as TAGs, all are instantiated by default.
67182
67183Usage: $0 [OPTION]... [TAG]...
67184
67185  -h, --help       print this help, then exit
67186  -V, --version    print version number and configuration settings, then exit
67187      --config     print configuration, then exit
67188  -q, --quiet, --silent
67189                   do not print progress messages
67190  -d, --debug      don't remove temporary files
67191      --recheck    update $as_me by reconfiguring in the same conditions
67192      --file=FILE[:TEMPLATE]
67193                   instantiate the configuration file FILE
67194
67195Configuration files:
67196$config_files
67197
67198Report bugs to <build-dev@openjdk.java.net>.
67199OpenJDK home page: <http://openjdk.java.net>."
67200
67201_ACEOF
67202cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67203ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67204ac_cs_version="\\
67205OpenJDK config.status jdk9
67206configured by $0, generated by GNU Autoconf 2.69,
67207  with options \\"\$ac_cs_config\\"
67208
67209Copyright (C) 2012 Free Software Foundation, Inc.
67210This config.status script is free software; the Free Software Foundation
67211gives unlimited permission to copy, distribute and modify it."
67212
67213ac_pwd='$ac_pwd'
67214srcdir='$srcdir'
67215AWK='$AWK'
67216test -n "\$AWK" || AWK=awk
67217_ACEOF
67218
67219cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67220# The default lists apply if the user does not specify any file.
67221ac_need_defaults=:
67222while test $# != 0
67223do
67224  case $1 in
67225  --*=?*)
67226    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67227    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67228    ac_shift=:
67229    ;;
67230  --*=)
67231    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67232    ac_optarg=
67233    ac_shift=:
67234    ;;
67235  *)
67236    ac_option=$1
67237    ac_optarg=$2
67238    ac_shift=shift
67239    ;;
67240  esac
67241
67242  case $ac_option in
67243  # Handling of the options.
67244  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67245    ac_cs_recheck=: ;;
67246  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67247    $as_echo "$ac_cs_version"; exit ;;
67248  --config | --confi | --conf | --con | --co | --c )
67249    $as_echo "$ac_cs_config"; exit ;;
67250  --debug | --debu | --deb | --de | --d | -d )
67251    debug=: ;;
67252  --file | --fil | --fi | --f )
67253    $ac_shift
67254    case $ac_optarg in
67255    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67256    '') as_fn_error $? "missing file argument" ;;
67257    esac
67258    as_fn_append CONFIG_FILES " '$ac_optarg'"
67259    ac_need_defaults=false;;
67260  --he | --h |  --help | --hel | -h )
67261    $as_echo "$ac_cs_usage"; exit ;;
67262  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67263  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67264    ac_cs_silent=: ;;
67265
67266  # This is an error.
67267  -*) as_fn_error $? "unrecognized option: \`$1'
67268Try \`$0 --help' for more information." ;;
67269
67270  *) as_fn_append ac_config_targets " $1"
67271     ac_need_defaults=false ;;
67272
67273  esac
67274  shift
67275done
67276
67277ac_configure_extra_args=
67278
67279if $ac_cs_silent; then
67280  exec 6>/dev/null
67281  ac_configure_extra_args="$ac_configure_extra_args --silent"
67282fi
67283
67284_ACEOF
67285cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67286if \$ac_cs_recheck; then
67287  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67288  shift
67289  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67290  CONFIG_SHELL='$SHELL'
67291  export CONFIG_SHELL
67292  exec "\$@"
67293fi
67294
67295_ACEOF
67296cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67297exec 5>>config.log
67298{
67299  echo
67300  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67301## Running $as_me. ##
67302_ASBOX
67303  $as_echo "$ac_log"
67304} >&5
67305
67306_ACEOF
67307cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67308_ACEOF
67309
67310cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67311
67312# Handling of arguments.
67313for ac_config_target in $ac_config_targets
67314do
67315  case $ac_config_target in
67316    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67317    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67318    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67319    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67320    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67321
67322  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67323  esac
67324done
67325
67326
67327# If the user did not use the arguments to specify the items to instantiate,
67328# then the envvar interface is used.  Set only those that are not.
67329# We use the long form for the default assignment because of an extremely
67330# bizarre bug on SunOS 4.1.3.
67331if $ac_need_defaults; then
67332  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67333fi
67334
67335# Have a temporary directory for convenience.  Make it in the build tree
67336# simply because there is no reason against having it here, and in addition,
67337# creating and moving files from /tmp can sometimes cause problems.
67338# Hook for its removal unless debugging.
67339# Note that there is a small window in which the directory will not be cleaned:
67340# after its creation but before its name has been assigned to `$tmp'.
67341$debug ||
67342{
67343  tmp= ac_tmp=
67344  trap 'exit_status=$?
67345  : "${ac_tmp:=$tmp}"
67346  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67347' 0
67348  trap 'as_fn_exit 1' 1 2 13 15
67349}
67350# Create a (secure) tmp directory for tmp files.
67351
67352{
67353  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67354  test -d "$tmp"
67355}  ||
67356{
67357  tmp=./conf$$-$RANDOM
67358  (umask 077 && mkdir "$tmp")
67359} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67360ac_tmp=$tmp
67361
67362# Set up the scripts for CONFIG_FILES section.
67363# No need to generate them if there are no CONFIG_FILES.
67364# This happens for instance with `./config.status config.h'.
67365if test -n "$CONFIG_FILES"; then
67366
67367
67368ac_cr=`echo X | tr X '\015'`
67369# On cygwin, bash can eat \r inside `` if the user requested igncr.
67370# But we know of no other shell where ac_cr would be empty at this
67371# point, so we can use a bashism as a fallback.
67372if test "x$ac_cr" = x; then
67373  eval ac_cr=\$\'\\r\'
67374fi
67375ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67376if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67377  ac_cs_awk_cr='\\r'
67378else
67379  ac_cs_awk_cr=$ac_cr
67380fi
67381
67382echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67383_ACEOF
67384
67385
67386{
67387  echo "cat >conf$$subs.awk <<_ACEOF" &&
67388  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67389  echo "_ACEOF"
67390} >conf$$subs.sh ||
67391  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67392ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67393ac_delim='%!_!# '
67394for ac_last_try in false false false false false :; do
67395  . ./conf$$subs.sh ||
67396    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67397
67398  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67399  if test $ac_delim_n = $ac_delim_num; then
67400    break
67401  elif $ac_last_try; then
67402    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67403  else
67404    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67405  fi
67406done
67407rm -f conf$$subs.sh
67408
67409cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67410cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67411_ACEOF
67412sed -n '
67413h
67414s/^/S["/; s/!.*/"]=/
67415p
67416g
67417s/^[^!]*!//
67418:repl
67419t repl
67420s/'"$ac_delim"'$//
67421t delim
67422:nl
67423h
67424s/\(.\{148\}\)..*/\1/
67425t more1
67426s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67427p
67428n
67429b repl
67430:more1
67431s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67432p
67433g
67434s/.\{148\}//
67435t nl
67436:delim
67437h
67438s/\(.\{148\}\)..*/\1/
67439t more2
67440s/["\\]/\\&/g; s/^/"/; s/$/"/
67441p
67442b
67443:more2
67444s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67445p
67446g
67447s/.\{148\}//
67448t delim
67449' <conf$$subs.awk | sed '
67450/^[^""]/{
67451  N
67452  s/\n//
67453}
67454' >>$CONFIG_STATUS || ac_write_fail=1
67455rm -f conf$$subs.awk
67456cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67457_ACAWK
67458cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67459  for (key in S) S_is_set[key] = 1
67460  FS = ""
67461
67462}
67463{
67464  line = $ 0
67465  nfields = split(line, field, "@")
67466  substed = 0
67467  len = length(field[1])
67468  for (i = 2; i < nfields; i++) {
67469    key = field[i]
67470    keylen = length(key)
67471    if (S_is_set[key]) {
67472      value = S[key]
67473      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67474      len += length(value) + length(field[++i])
67475      substed = 1
67476    } else
67477      len += 1 + keylen
67478  }
67479
67480  print line
67481}
67482
67483_ACAWK
67484_ACEOF
67485cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67486if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67487  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67488else
67489  cat
67490fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67491  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67492_ACEOF
67493
67494# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67495# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67496# trailing colons and then remove the whole line if VPATH becomes empty
67497# (actually we leave an empty line to preserve line numbers).
67498if test "x$srcdir" = x.; then
67499  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67500h
67501s///
67502s/^/:/
67503s/[	 ]*$/:/
67504s/:\$(srcdir):/:/g
67505s/:\${srcdir}:/:/g
67506s/:@srcdir@:/:/g
67507s/^:*//
67508s/:*$//
67509x
67510s/\(=[	 ]*\).*/\1/
67511G
67512s/\n//
67513s/^[^=]*=[	 ]*$//
67514}'
67515fi
67516
67517cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67518fi # test -n "$CONFIG_FILES"
67519
67520
67521eval set X "  :F $CONFIG_FILES      "
67522shift
67523for ac_tag
67524do
67525  case $ac_tag in
67526  :[FHLC]) ac_mode=$ac_tag; continue;;
67527  esac
67528  case $ac_mode$ac_tag in
67529  :[FHL]*:*);;
67530  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67531  :[FH]-) ac_tag=-:-;;
67532  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67533  esac
67534  ac_save_IFS=$IFS
67535  IFS=:
67536  set x $ac_tag
67537  IFS=$ac_save_IFS
67538  shift
67539  ac_file=$1
67540  shift
67541
67542  case $ac_mode in
67543  :L) ac_source=$1;;
67544  :[FH])
67545    ac_file_inputs=
67546    for ac_f
67547    do
67548      case $ac_f in
67549      -) ac_f="$ac_tmp/stdin";;
67550      *) # Look for the file first in the build tree, then in the source tree
67551	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67552	 # because $ac_f cannot contain `:'.
67553	 test -f "$ac_f" ||
67554	   case $ac_f in
67555	   [\\/$]*) false;;
67556	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67557	   esac ||
67558	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67559      esac
67560      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67561      as_fn_append ac_file_inputs " '$ac_f'"
67562    done
67563
67564    # Let's still pretend it is `configure' which instantiates (i.e., don't
67565    # use $as_me), people would be surprised to read:
67566    #    /* config.h.  Generated by config.status.  */
67567    configure_input='Generated from '`
67568	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67569	`' by configure.'
67570    if test x"$ac_file" != x-; then
67571      configure_input="$ac_file.  $configure_input"
67572      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67573$as_echo "$as_me: creating $ac_file" >&6;}
67574    fi
67575    # Neutralize special characters interpreted by sed in replacement strings.
67576    case $configure_input in #(
67577    *\&* | *\|* | *\\* )
67578       ac_sed_conf_input=`$as_echo "$configure_input" |
67579       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67580    *) ac_sed_conf_input=$configure_input;;
67581    esac
67582
67583    case $ac_tag in
67584    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67585      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67586    esac
67587    ;;
67588  esac
67589
67590  ac_dir=`$as_dirname -- "$ac_file" ||
67591$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67592	 X"$ac_file" : 'X\(//\)[^/]' \| \
67593	 X"$ac_file" : 'X\(//\)$' \| \
67594	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67595$as_echo X"$ac_file" |
67596    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67597	    s//\1/
67598	    q
67599	  }
67600	  /^X\(\/\/\)[^/].*/{
67601	    s//\1/
67602	    q
67603	  }
67604	  /^X\(\/\/\)$/{
67605	    s//\1/
67606	    q
67607	  }
67608	  /^X\(\/\).*/{
67609	    s//\1/
67610	    q
67611	  }
67612	  s/.*/./; q'`
67613  as_dir="$ac_dir"; as_fn_mkdir_p
67614  ac_builddir=.
67615
67616case "$ac_dir" in
67617.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67618*)
67619  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67620  # A ".." for each directory in $ac_dir_suffix.
67621  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67622  case $ac_top_builddir_sub in
67623  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67624  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67625  esac ;;
67626esac
67627ac_abs_top_builddir=$ac_pwd
67628ac_abs_builddir=$ac_pwd$ac_dir_suffix
67629# for backward compatibility:
67630ac_top_builddir=$ac_top_build_prefix
67631
67632case $srcdir in
67633  .)  # We are building in place.
67634    ac_srcdir=.
67635    ac_top_srcdir=$ac_top_builddir_sub
67636    ac_abs_top_srcdir=$ac_pwd ;;
67637  [\\/]* | ?:[\\/]* )  # Absolute name.
67638    ac_srcdir=$srcdir$ac_dir_suffix;
67639    ac_top_srcdir=$srcdir
67640    ac_abs_top_srcdir=$srcdir ;;
67641  *) # Relative name.
67642    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67643    ac_top_srcdir=$ac_top_build_prefix$srcdir
67644    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67645esac
67646ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67647
67648
67649  case $ac_mode in
67650  :F)
67651  #
67652  # CONFIG_FILE
67653  #
67654
67655_ACEOF
67656
67657cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67658# If the template does not know about datarootdir, expand it.
67659# FIXME: This hack should be removed a few years after 2.60.
67660ac_datarootdir_hack=; ac_datarootdir_seen=
67661ac_sed_dataroot='
67662/datarootdir/ {
67663  p
67664  q
67665}
67666/@datadir@/p
67667/@docdir@/p
67668/@infodir@/p
67669/@localedir@/p
67670/@mandir@/p'
67671case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67672*datarootdir*) ac_datarootdir_seen=yes;;
67673*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67674  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67675$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67676_ACEOF
67677cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67678  ac_datarootdir_hack='
67679  s&@datadir@&$datadir&g
67680  s&@docdir@&$docdir&g
67681  s&@infodir@&$infodir&g
67682  s&@localedir@&$localedir&g
67683  s&@mandir@&$mandir&g
67684  s&\\\${datarootdir}&$datarootdir&g' ;;
67685esac
67686_ACEOF
67687
67688# Neutralize VPATH when `$srcdir' = `.'.
67689# Shell code in configure.ac might set extrasub.
67690# FIXME: do we really want to maintain this feature?
67691cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67692ac_sed_extra="$ac_vpsub
67693$extrasub
67694_ACEOF
67695cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67696:t
67697/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67698s|@configure_input@|$ac_sed_conf_input|;t t
67699s&@top_builddir@&$ac_top_builddir_sub&;t t
67700s&@top_build_prefix@&$ac_top_build_prefix&;t t
67701s&@srcdir@&$ac_srcdir&;t t
67702s&@abs_srcdir@&$ac_abs_srcdir&;t t
67703s&@top_srcdir@&$ac_top_srcdir&;t t
67704s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67705s&@builddir@&$ac_builddir&;t t
67706s&@abs_builddir@&$ac_abs_builddir&;t t
67707s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67708$ac_datarootdir_hack
67709"
67710eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67711  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67712
67713test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67714  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67715  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67716      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67717  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67718which seems to be undefined.  Please make sure it is defined" >&5
67719$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67720which seems to be undefined.  Please make sure it is defined" >&2;}
67721
67722  rm -f "$ac_tmp/stdin"
67723  case $ac_file in
67724  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67725  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67726  esac \
67727  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67728 ;;
67729
67730
67731
67732  esac
67733
67734done # for ac_tag
67735
67736
67737as_fn_exit 0
67738_ACEOF
67739ac_clean_files=$ac_clean_files_save
67740
67741test $ac_write_fail = 0 ||
67742  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67743
67744
67745# configure is writing to config.log, and then calls config.status.
67746# config.status does its own redirection, appending to config.log.
67747# Unfortunately, on DOS this fails, as config.log is still kept open
67748# by configure, so config.status won't be able to write to it; its
67749# output is simply discarded.  So we exec the FD to /dev/null,
67750# effectively closing config.log, so it can be properly (re)opened and
67751# appended to by config.status.  When coming back to configure, we
67752# need to make the FD available again.
67753if test "$no_create" != yes; then
67754  ac_cs_success=:
67755  ac_config_status_args=
67756  test "$silent" = yes &&
67757    ac_config_status_args="$ac_config_status_args --quiet"
67758  exec 5>/dev/null
67759  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67760  exec 5>>config.log
67761  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67762  # would make configure fail if this is the last instruction.
67763  $ac_cs_success || as_fn_exit 1
67764fi
67765if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67766  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67767$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67768fi
67769
67770
67771# After AC_OUTPUT, we need to do final work
67772
67773
67774  # Try to move config.log (generated by autoconf) to the configure-support directory.
67775  if test -e ./config.log; then
67776    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67777  fi
67778
67779  # Rotate our log file (configure.log)
67780  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67781    $RM -f "$OUTPUT_ROOT/configure.log.old"
67782  fi
67783  if test -e "$OUTPUT_ROOT/configure.log"; then
67784    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67785  fi
67786
67787  # Move configure.log from current directory to the build output root
67788  if test -e ./configure.log; then
67789    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67790  fi
67791
67792  # Make the compare script executable
67793  $CHMOD +x $OUTPUT_ROOT/compare.sh
67794
67795
67796# Finally output some useful information to the user
67797
67798  # Finally output some useful information to the user
67799
67800  printf "\n"
67801  printf "====================================================\n"
67802  if test "x$no_create" != "xyes"; then
67803    if test "x$IS_RECONFIGURE" != "xyes"; then
67804      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67805    else
67806      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67807    fi
67808  else
67809    if test "x$IS_RECONFIGURE" != "xyes"; then
67810      printf "A configuration has been successfully checked but not created\n"
67811    else
67812      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67813    fi
67814  fi
67815  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67816    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67817  else
67818    printf "using default settings.\n"
67819  fi
67820
67821  printf "\n"
67822  printf "Configuration summary:\n"
67823  printf "* Debug level:    $DEBUG_LEVEL\n"
67824  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67825  printf "* JDK variant:    $JDK_VARIANT\n"
67826  printf "* JVM variants:   $JVM_VARIANTS\n"
67827  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67828  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67829
67830  printf "\n"
67831  printf "Tools summary:\n"
67832  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67833    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67834  fi
67835  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67836  if test "x$TOOLCHAIN_VERSION" != "x"; then
67837    print_version=" $TOOLCHAIN_VERSION"
67838  fi
67839  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67840  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67841  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67842
67843  printf "\n"
67844  printf "Build performance summary:\n"
67845  printf "* Cores to use:   $JOBS\n"
67846  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67847  if test "x$CCACHE_STATUS" != "x"; then
67848    printf "* ccache status:  $CCACHE_STATUS\n"
67849  fi
67850  printf "\n"
67851
67852  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67853    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67854    printf "will result in longer build times.\n"
67855    printf "\n"
67856  fi
67857
67858  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67859    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67860    printf "These are not respected, and will be ignored. It is recommended\n"
67861    printf "that you clean your environment. The following variables are set:\n"
67862    printf "$FOUND_ALT_VARIABLES\n"
67863    printf "\n"
67864  fi
67865
67866  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67867    printf "WARNING: Your build output directory is not on a local disk.\n"
67868    printf "This will severely degrade build performance!\n"
67869    printf "It is recommended that you create an output directory on a local disk,\n"
67870    printf "and run the configure script again from that directory.\n"
67871    printf "\n"
67872  fi
67873
67874  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67875    printf "WARNING: The result of this configuration has overridden an older\n"
67876    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67877    printf "proper build. Failure to do so might result in strange build problems.\n"
67878    printf "\n"
67879  fi
67880
67881  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67882    printf "WARNING: The result of this configuration was not saved.\n"
67883    printf "You should run without '--no-create | -n' to create the configuration.\n"
67884    printf "\n"
67885  fi
67886
67887
67888
67889  # Locate config.log.
67890  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67891    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67892  elif test -e "./config.log"; then
67893    CONFIG_LOG_PATH="."
67894  fi
67895
67896  if test -e "$CONFIG_LOG_PATH/config.log"; then
67897    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67898    if test $? -eq 0; then
67899      printf "The following warnings were produced. Repeated here for convenience:\n"
67900      # We must quote sed expression (using []) to stop m4 from eating the [].
67901      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67902      printf "\n"
67903    fi
67904  fi
67905
67906